summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2011-02-09 14:56:23 -0500
committerAnthony Green <green@moxielogic.com>2011-02-09 14:56:23 -0500
commit747d6c32d4abb07c10c3a1f93579c3929aaa2487 (patch)
tree6b4ace11a33808458c52c19f881ac0cdedb11a41 /patches
parenteab6e41cde382aa07de6c011d514a14c0d62eb47 (diff)
downloadlibffi-747d6c32d4abb07c10c3a1f93579c3929aaa2487.tar.gz
Add Interix support
Diffstat (limited to 'patches')
-rw-r--r--patches/interix95
-rw-r--r--patches/series1
2 files changed, 96 insertions, 0 deletions
diff --git a/patches/interix b/patches/interix
new file mode 100644
index 0000000..257a9bd
--- /dev/null
+++ b/patches/interix
@@ -0,0 +1,95 @@
+Index: libffi/configure
+===================================================================
+--- libffi.orig/configure
++++ libffi/configure
+@@ -12200,7 +12200,7 @@ case "$host" in
+ i?86-*-freebsd* | i?86-*-openbsd*)
+ TARGET=X86_FREEBSD; TARGETDIR=x86
+ ;;
+- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2*)
++ i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ TARGET=X86_WIN32; TARGETDIR=x86
+ # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
+ # We must also check with_cross_host to decide if this is a native
+Index: libffi/configure.ac
+===================================================================
+--- libffi.orig/configure.ac
++++ libffi/configure.ac
+@@ -88,7 +88,7 @@ case "$host" in
+ i?86-*-freebsd* | i?86-*-openbsd*)
+ TARGET=X86_FREEBSD; TARGETDIR=x86
+ ;;
+- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2*)
++ i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ TARGET=X86_WIN32; TARGETDIR=x86
+ # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
+ # We must also check with_cross_host to decide if this is a native
+Index: libffi/src/closures.c
+===================================================================
+--- libffi.orig/src/closures.c
++++ libffi/src/closures.c
+@@ -198,11 +198,11 @@ static int dlmalloc_trim(size_t) MAYBE_U
+ static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED;
+ static void dlmalloc_stats(void) MAYBE_UNUSED;
+
+-#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__)
++#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
+ /* Use these for mmap and munmap within dlmalloc.c. */
+ static void *dlmmap(void *, size_t, int, int, int, off_t);
+ static int dlmunmap(void *, size_t);
+-#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) */
++#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
+
+ #define mmap dlmmap
+ #define munmap dlmunmap
+@@ -212,7 +212,7 @@ static int dlmunmap(void *, size_t);
+ #undef mmap
+ #undef munmap
+
+-#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__)
++#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX)
+
+ /* A mutex used to synchronize access to *exec* variables in this file. */
+ static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
+@@ -527,7 +527,7 @@ segment_holding_code (mstate m, char* ad
+ }
+ #endif
+
+-#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) */
++#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) || defined(__INTERIX) */
+
+ /* Allocate a chunk of memory with the given size. Returns a pointer
+ to the writable address, and sets *CODE to the executable
+Index: libffi/ChangeLog
+===================================================================
+--- libffi.orig/ChangeLog
++++ libffi/ChangeLog
+@@ -1,5 +1,16 @@
+ 2011-02-09 Anthony Green <green@moxielogic.com>
+
++ * README: Mention Interix.
++
++2011-02-09 Jonathan Callen <abcd@gentoo.org>
++
++ * configure.ac: Add Interix to win32/cygwin/mingw case.
++ * configure: Ditto.
++ * src/closures.c: Treat Interix like Cygwin, instead of as a
++ generic win32.
++
++2011-02-09 Anthony Green <green@moxielogic.com>
++
+ * testsuite/libffi.call/err_bad_typedef.c: Remove xfail.
+ * testsuite/libffi.call/err_bad_abi.c: Remove xfail.
+ * src/x86/ffi64.c (UNLIKELY, LIKELY): Define.
+Index: libffi/README
+===================================================================
+--- libffi.orig/README
++++ libffi/README
+@@ -74,6 +74,7 @@ tested:
+ | SPARC64 | Linux |
+ | SPARC64 | FreeBSD |
+ | X86 | FreeBSD |
++| X86 | Interix |
+ | X86 | kFreeBSD |
+ | X86 | Linux |
+ | X86 | Mac OSX |
diff --git a/patches/series b/patches/series
index f0f1840..d864db1 100644
--- a/patches/series
+++ b/patches/series
@@ -14,3 +14,4 @@ hpux-mallinfo
copyright-updates
ios
fix-xfails
+interix