aboutsummaryrefslogtreecommitdiff
path: root/libffi/src/closures.c
diff options
context:
space:
mode:
authorDan Witte <dwitte@mozilla.com>2010-08-06 12:36:26 +0000
committerAnthony Green <green@gcc.gnu.org>2010-08-06 12:36:26 +0000
commit49f6cd1f259bb6060bcd6f912781f1edd96a8dff (patch)
tree02af6ec2048061606bff1bfc6d433e5b59af24a1 /libffi/src/closures.c
parent3d420bdf4deea364fde519d56be32731a83a6ad4 (diff)
downloadgcc-49f6cd1f259bb6060bcd6f912781f1edd96a8dff.zip
gcc-49f6cd1f259bb6060bcd6f912781f1edd96a8dff.tar.gz
gcc-49f6cd1f259bb6060bcd6f912781f1edd96a8dff.tar.bz2
Add OS/2 Support
Co-Authored-By: Walter Meinl <wuno@lsvw.de> From-SVN: r162946
Diffstat (limited to 'libffi/src/closures.c')
-rw-r--r--libffi/src/closures.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libffi/src/closures.c b/libffi/src/closures.c
index 124ed44..8f295dd 100644
--- a/libffi/src/closures.c
+++ b/libffi/src/closures.c
@@ -44,7 +44,7 @@
# define FFI_MMAP_EXEC_WRIT 1
# define HAVE_MNTENT 1
# endif
-# if defined(X86_WIN32) || defined(X86_WIN64)
+# if defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)
/* Windows systems may have Data Execution Protection (DEP) enabled,
which requires the use of VirtualMalloc/VirtualFree to alloc/free
executable memory. */
@@ -193,11 +193,11 @@ static int dlmalloc_trim(size_t) MAYBE_UNUSED;
static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED;
static void dlmalloc_stats(void) MAYBE_UNUSED;
-#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
+#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__)
/* 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 (__CYGWIN__) */
+#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) */
#define mmap dlmmap
#define munmap dlmunmap
@@ -207,7 +207,7 @@ static int dlmunmap(void *, size_t);
#undef mmap
#undef munmap
-#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
+#if !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__)
/* A mutex used to synchronize access to *exec* variables in this file. */
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -522,7 +522,7 @@ segment_holding_code (mstate m, char* addr)
}
#endif
-#endif /* !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__) */
+#endif /* !(defined(X86_WIN32) || defined(X86_WIN64) || defined(__OS2__)) || defined (__CYGWIN__) */
/* Allocate a chunk of memory with the given size. Returns a pointer
to the writable address, and sets *CODE to the executable