From 0815944ac4a190d1402079453b99d00fcc26dc25 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 4 Feb 2016 08:38:48 -0800 Subject: [PATCH] Simplify USE_ALIGNED_ALLOC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index f0e9f208ca3..ca86a84b06d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -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) -- 2.39.2