== redcode ==
authorPeter Schlaile <peter@schlaile.de>
Tue, 10 Jun 2008 05:12:51 +0000 (05:12 +0000)
committerPeter Schlaile <peter@schlaile.de>
Tue, 10 Jun 2008 05:12:51 +0000 (05:12 +0000)
This makes it work for Mac OS X. Thanks to Jean-Luc Peuriere for the patch.

extern/libopenjpeg/opj_malloc.h
extern/libopenjpeg/patches/osx.patch [new file with mode: 0644]

index 79698f8ff1ba795ab077243cc91178c568c7c868..4e9727af0f37e62adac412ac15da3d5f8672148f 100644 (file)
@@ -76,8 +76,10 @@ Allocate memory aligned to a 16 byte boundry
        #if defined(__sun)
                        #define HAVE_MEMALIGN
                #elif defined(__GNUC__)
-                       #define HAVE_MEMALIGN
-                       #include <malloc.h>             
+                        #ifndef __APPLE__
+                           #define HAVE_MEMALIGN
+                           #include <malloc.h>
+                        #endif
                /* Linux x86_64 and OSX always align allocations to 16 bytes */
                #elif !defined(__amd64__) && !defined(__APPLE__)        
                        /* FIXME: Yes, this is a big assumption */
diff --git a/extern/libopenjpeg/patches/osx.patch b/extern/libopenjpeg/patches/osx.patch
new file mode 100644 (file)
index 0000000..c518978
--- /dev/null
@@ -0,0 +1,17 @@
+Index: opj_malloc.h
+===================================================================
+--- opj_malloc.h       (revision 15089)
++++ opj_malloc.h       (working copy)
+@@ -76,8 +76,10 @@
+       #if defined(__sun)
+                       #define HAVE_MEMALIGN
+               #elif defined(__GNUC__)
+-                      #define HAVE_MEMALIGN
+-                      #include <malloc.h>             
++                        #ifndef __APPLE__
++                          #define HAVE_MEMALIGN
++                          #include <malloc.h>
++                        #endif
+               /* Linux x86_64 and OSX always align allocations to 16 bytes */
+               #elif !defined(__amd64__) && !defined(__APPLE__)        
+                       /* FIXME: Yes, this is a big assumption */