aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-02-03 00:37:44 -0800
committerPaul Eggert2016-02-03 00:38:38 -0800
commit5fcd89f52ec6b8b5b24641d20b9907998c4fa0b9 (patch)
tree66bbb463f01bc337d905d812e4e56115fb657279
parentaca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 (diff)
downloademacs-5fcd89f52ec6b8b5b24641d20b9907998c4fa0b9.tar.gz
emacs-5fcd89f52ec6b8b5b24641d20b9907998c4fa0b9.zip
Port aligned_alloc decl to Cygwin.
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.
-rw-r--r--configure.ac1
-rw-r--r--src/lisp.h5
2 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d97d9e5017a..1e076c71e94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3824,6 +3824,7 @@ if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \
3824 && test "$opsys" != darwin; then 3824 && test "$opsys" != darwin; then
3825 AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) 3825 AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break])
3826fi 3826fi
3827AC_CHECK_DECLS([aligned_alloc], [], [], [[#include <stdlib.h>]])
3827 3828
3828dnl Cannot use AC_CHECK_FUNCS 3829dnl Cannot use AC_CHECK_FUNCS
3829AC_CACHE_CHECK([for __builtin_unwind_init], 3830AC_CACHE_CHECK([for __builtin_unwind_init],
diff --git a/src/lisp.h b/src/lisp.h
index 54bce0fab0c..a99002bddda 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3774,10 +3774,9 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
3774/* Defined in gmalloc.c. */ 3774/* Defined in gmalloc.c. */
3775#if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC 3775#if !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC && !defined SYSTEM_MALLOC
3776extern size_t __malloc_extra_blocks; 3776extern size_t __malloc_extra_blocks;
3777extern void *aligned_alloc (size_t, size_t);
3778#endif 3777#endif
3779#if defined HYBRID_MALLOC && !defined HAVE_ALIGNED_ALLOC 3778#ifndef HAVE_DECL_ALIGNED_ALLOC
3780extern void *hybrid_aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2)); 3779extern void *aligned_alloc (size_t, size_t) ATTRIBUTE_MALLOC_SIZE ((2));
3781#endif 3780#endif
3782extern void malloc_enable_thread (void); 3781extern void malloc_enable_thread (void);
3783 3782