]> code.delx.au - gnu-emacs/commitdiff
Port aligned_alloc decl to Cygwin.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Feb 2016 08:37:44 +0000 (00:37 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Feb 2016 08:38:38 +0000 (00:38 -0800)
Problem reported by Ken Brown (Bug#22522#38).
* configure.ac (aligned_alloc): Check for decl too.
* src/lisp.h (aligned_alloc): Declare if not already declared.

configure.ac
src/lisp.h

index d97d9e5017a6f522590d728219b714693cf8ff42..1e076c71e942ab41ea83e0f607f4fa19fb8d9ffa 100644 (file)
@@ -3824,6 +3824,7 @@ if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \
   && test "$opsys" != darwin; then
   AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break])
 fi
+AC_CHECK_DECLS([aligned_alloc], [], [], [[#include <stdlib.h>]])
 
 dnl Cannot use AC_CHECK_FUNCS
 AC_CACHE_CHECK([for __builtin_unwind_init],
index 54bce0fab0c1f6d2d10444940530b6416938a125..a99002bdddaf55198a51a8dc5870f7356de51743 100644 (file)
@@ -3774,10 +3774,9 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
 /* Defined in gmalloc.c.  */
 #if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC
 extern size_t __malloc_extra_blocks;
-extern void *aligned_alloc (size_t, size_t);
 #endif
-#if defined HYBRID_MALLOC && !defined HAVE_ALIGNED_ALLOC
-extern void *hybrid_aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2));
+#ifndef HAVE_DECL_ALIGNED_ALLOC
+extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2));
 #endif
 extern void malloc_enable_thread (void);