From 49f6cd1f259bb6060bcd6f912781f1edd96a8dff Mon Sep 17 00:00:00 2001 From: Dan Witte Date: Fri, 6 Aug 2010 12:36:26 +0000 Subject: Add OS/2 Support Co-Authored-By: Walter Meinl From-SVN: r162946 --- libffi/src/closures.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libffi/src/closures.c') 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 -- cgit v1.1