]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify USE_ALIGNED_ALLOC
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Feb 2016 16:38:48 +0000 (08:38 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Feb 2016 16:40:12 +0000 (08:40 -0800)
* src/alloc.c (USE_ALIGNED_ALLOC): Simplify, now that we’ve merged
in the emacs-25 changes.  Omit no-longer-needed decl for aligned_alloc.

src/alloc.c

index f0e9f208ca33683c553db8c10de77ac3a695251e..ca86a84b06d3e20dc356d404f306505f16c2a43c 100644 (file)
@@ -1126,21 +1126,12 @@ lisp_free (void *block)
    unexmacosx.c, so don't use it on Darwin.  */
 
 #if ! ADDRESS_SANITIZER && !defined DARWIN_OS
-# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC
+# if (defined HAVE_ALIGNED_ALLOC                                       \
+      || (defined HYBRID_MALLOC                                                \
+         ? defined HAVE_POSIX_MEMALIGN                                 \
+         : !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC))
 #  define USE_ALIGNED_ALLOC 1
-#  ifndef HAVE_ALIGNED_ALLOC
-/* Defined in gmalloc.c.  */
-void *aligned_alloc (size_t, size_t);
-#  endif
-# elif defined HYBRID_MALLOC
-#  if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
-#   define USE_ALIGNED_ALLOC 1
-#  endif
-# elif !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC
-#  define USE_ALIGNED_ALLOC 1
-# elif defined HAVE_ALIGNED_ALLOC
-#  define USE_ALIGNED_ALLOC 1
-# elif defined HAVE_POSIX_MEMALIGN
+# elif !defined HYBRID_MALLOC && defined HAVE_POSIX_MEMALIGN
 #  define USE_ALIGNED_ALLOC 1
 static void *
 aligned_alloc (size_t alignment, size_t size)