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