Merge git://factorcode.org/git/erg
commit
fcbf7b4c4c
6
Makefile
6
Makefile
|
@ -65,6 +65,7 @@ default:
|
|||
@echo "solaris-x86-64"
|
||||
@echo "windows-ce-arm"
|
||||
@echo "windows-nt-x86-32"
|
||||
@echo "windows-nt-x86-64"
|
||||
@echo ""
|
||||
@echo "Additional modifiers:"
|
||||
@echo ""
|
||||
|
@ -125,6 +126,9 @@ solaris-x86-64:
|
|||
windows-nt-x86-32:
|
||||
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.32
|
||||
|
||||
windows-nt-x86-64:
|
||||
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.nt.x86.64
|
||||
|
||||
windows-ce-arm:
|
||||
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.ce.arm
|
||||
|
||||
|
@ -151,7 +155,7 @@ clean:
|
|||
rm -f factor*.dll libfactor*.*
|
||||
|
||||
vm/resources.o:
|
||||
windres vm/factor.rs vm/resources.o
|
||||
$(WINDRES) vm/factor.rs vm/resources.o
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
|
|
@ -6,7 +6,7 @@ IN: ogg.theora
|
|||
|
||||
<<
|
||||
"theora" {
|
||||
{ [ win32? ] [ "libtheora.dll" ] }
|
||||
{ [ win32? ] [ "theora.dll" ] }
|
||||
{ [ macosx? ] [ "libtheora.0.dylib" ] }
|
||||
{ [ unix? ] [ "libtheora.so" ] }
|
||||
} cond "cdecl" add-library
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2007 Chris Double.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
!
|
||||
USING: kernel system combinators alien alien.syntax ;
|
||||
USING: kernel system combinators alien alien.syntax ogg ;
|
||||
IN: ogg.vorbis
|
||||
|
||||
<<
|
||||
|
|
|
@ -233,6 +233,16 @@ maybe_download_dlls() {
|
|||
check_ret wget
|
||||
wget http://factorcode.org/dlls/zlib1.dll
|
||||
check_ret wget
|
||||
wget http://factorcode.org/dlls/OpenAL32.dll
|
||||
check_ret wget
|
||||
wget http://factorcode.org/dlls/alut.dll
|
||||
check_ret wget
|
||||
wget http://factorcode.org/dlls/ogg.dll
|
||||
check_ret wget
|
||||
wget http://factorcode.org/dlls/theora.dll
|
||||
check_ret wget
|
||||
wget http://factorcode.org/dlls/vorbis.dll
|
||||
check_ret wget
|
||||
chmod 777 *.dll
|
||||
check_ret chmod
|
||||
fi
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
WINDRES=windres
|
||||
include vm/Config.windows.nt
|
||||
include vm/Config.x86.32
|
||||
#error "lolllll"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
CC=/k/target/bin/x86_64-pc-mingw32-gcc
|
||||
#WIN64_PATH=/k/MinGW/win64/bin
|
||||
WIN64_PATH=/cygdrive/k/MinGW/win64/bin/x86_64-pc-mingw32
|
||||
CC=$(WIN64_PATH)-gcc.exe
|
||||
WINDRES=$(WIN64_PATH)-windres.exe
|
||||
include vm/Config.windows.nt
|
||||
include vm/Config.x86.64
|
||||
WINDRES = /k/target/bin/windres
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#define ESP Esp
|
||||
#define EIP Eip
|
|
@ -0,0 +1,2 @@
|
|||
#define ESP Rsp
|
||||
#define EIP Rip
|
|
@ -57,26 +57,26 @@ long exception_handler(PEXCEPTION_POINTERS pe)
|
|||
PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
|
||||
CONTEXT *c = (CONTEXT*)pe->ContextRecord;
|
||||
|
||||
if(in_code_heap_p(c->Eip))
|
||||
signal_callstack_top = (void *)c->Esp;
|
||||
if(in_code_heap_p(c->EIP))
|
||||
signal_callstack_top = (void *)c->ESP;
|
||||
else
|
||||
signal_callstack_top = NULL;
|
||||
|
||||
if(e->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
|
||||
{
|
||||
signal_fault_addr = e->ExceptionInformation[1];
|
||||
c->Eip = (CELL)memory_signal_handler_impl;
|
||||
c->EIP = (CELL)memory_signal_handler_impl;
|
||||
}
|
||||
else if(e->ExceptionCode == EXCEPTION_FLT_DIVIDE_BY_ZERO
|
||||
|| e->ExceptionCode == EXCEPTION_INT_DIVIDE_BY_ZERO)
|
||||
{
|
||||
signal_number = ERROR_DIVIDE_BY_ZERO;
|
||||
c->Eip = (CELL)divide_by_zero_signal_handler_impl;
|
||||
c->EIP = (CELL)divide_by_zero_signal_handler_impl;
|
||||
}
|
||||
else
|
||||
{
|
||||
signal_number = 11;
|
||||
c->Eip = (CELL)misc_signal_handler_impl;
|
||||
c->EIP = (CELL)misc_signal_handler_impl;
|
||||
}
|
||||
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#if defined(__arm__)
|
||||
#define FACTOR_ARM
|
||||
#elif defined(__amd64__) || defined(__x86_64__)
|
||||
#define FACTOR_AMD64
|
||||
#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(WIN32)
|
||||
#define FACTOR_X86
|
||||
#elif defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)
|
||||
#define FACTOR_PPC
|
||||
#elif defined(__amd64__) || defined(__x86_64__)
|
||||
#define FACTOR_AMD64
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
@ -18,6 +18,11 @@
|
|||
#endif
|
||||
|
||||
#include "os-windows.h"
|
||||
#if defined(FACTOR_AMD64)
|
||||
#include "os-windows-nt.64.h"
|
||||
#elif defined(FACTOR_X86)
|
||||
#include "os-windows-nt.32.h"
|
||||
#endif
|
||||
#else
|
||||
#include "os-unix.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue