diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2008-02-29 09:33:41 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2008-02-29 09:33:41 +0000 |
| commit | 6d1f3ecc9f792b8039328fb871b524d61fc0e481 (patch) | |
| tree | f71a883e2c1bd2e29dd0612708f25ddd9b86edd5 /libopenjpeg/opj_malloc.h | |
| parent | 396cb1e1025d59e679b187aaa2971ea42c4c1c58 (diff) | |
Fixed openjpeg.c for proper initialization of codec context structures (dinfo in opj_create_compress() and opj_create_decompress(). Bug fix suggested by Andrey V. Kiselev
Clean up of opj_aligned_malloc(), to just forgo the use of posix_memalign(), as apparently memalign() is what is working better for everyone. Patch by Callum.
Diffstat (limited to 'libopenjpeg/opj_malloc.h')
| -rw-r--r-- | libopenjpeg/opj_malloc.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libopenjpeg/opj_malloc.h b/libopenjpeg/opj_malloc.h index 1f117b6a..9b48c256 100644 --- a/libopenjpeg/opj_malloc.h +++ b/libopenjpeg/opj_malloc.h @@ -74,21 +74,14 @@ Allocate memory aligned to a 16 byte boundry #endif
#else /* Not WIN32 */
#if defined(__sun)
- #define HAVE_MEMALIGN
- #elif defined(__GNUC__)
- #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 */
- #define HAVE_POSIX_MEMALIGN
+ #define HAVE_MEMALIGN
+ /* Linux x86_64 and OSX always align allocations to 16 bytes */
+ #elif !defined(__amd64__) && !defined(__APPLE__)
+ #define HAVE_MEMALIGN
+ #include <malloc.h>
#endif
#endif
-
-
#define opj_aligned_malloc(size) malloc(size)
#define opj_aligned_free(m) free(m)
|
