Add missing checks. Fix crash on failed allocation.
[openjpeg.git] / src / lib / openjp2 / opj_config_private.h.cmake.in
index 8a02c79d9dc414b6340c32172d05bb65c1d6cf6f..97c9fdc5b5f367993cd1d1e93bd78f4b640b5382 100644 (file)
 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
 #cmakedefine OPJ_HAVE_FSEEKO @OPJ_HAVE_FSEEKO@
 
+/* find whether or not have <malloc.h> */
+#cmakedefine HAVE_MALLOC_H
+/* check if function `aligned_alloc` exists */
+#cmakedefine HAVE_ALIGNED_ALLOC
+/* check if function `_aligned_malloc` exists */
+#cmakedefine HAVE__ALIGNED_MALLOC
+/* check if function `memalign` exists */
+#cmakedefine HAVE_MEMALIGN
+/* check if function `posix_memalign` exists */
+#cmakedefine HAVE_POSIX_MEMALIGN
+
 /* Byte order.  */
 /* All compilers that support Mac OS X define either __BIG_ENDIAN__ or
 __LITTLE_ENDIAN__ to match the endianness of the architecture being
@@ -28,4 +39,4 @@ On other platforms we use the result of the TRY_RUN. */
 #cmakedefine OPJ_BIG_ENDIAN
 #elif defined(__BIG_ENDIAN__)
 # define OPJ_BIG_ENDIAN
-#endif
\ No newline at end of file
+#endif