From: Paul Eggert Date: Sat, 18 Jun 2016 23:07:55 +0000 (+0200) Subject: Rename ALIGN to pointer_align X-Git-Tag: emacs-26.0.90~1840^2~209 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=13feb31c633a26ce47799315326e43d1e8b9345a;p=emacs.git Rename ALIGN to pointer_align * src/alloc.c (pointer_align): Rename from ALIGN. This fixes Bug#23764 in a simpler way. --- diff --git a/src/alloc.c b/src/alloc.c index 8173615992f..0a3e7d42a4f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -486,15 +486,10 @@ static void *pure_alloc (size_t, int); ? ((x) + (y) - 1) - ((x) + (y) - 1) % (y) \ : ((x) + (y) - 1) & ~ ((y) - 1)) -/* Bug#23764 */ -#ifdef ALIGN -# undef ALIGN -#endif - /* Return PTR rounded up to the next multiple of ALIGNMENT. */ static void * -ALIGN (void *ptr, int alignment) +pointer_align (void *ptr, int alignment) { return (void *) ROUNDUP ((uintptr_t) ptr, alignment); } @@ -1259,7 +1254,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type) abase = base = aligned_alloc (BLOCK_ALIGN, ABLOCKS_BYTES); #else base = malloc (ABLOCKS_BYTES); - abase = ALIGN (base, BLOCK_ALIGN); + abase = pointer_align (base, BLOCK_ALIGN); #endif if (base == 0) @@ -5178,7 +5173,7 @@ pure_alloc (size_t size, int type) { /* Allocate space for a Lisp object from the beginning of the free space with taking account of alignment. */ - result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); + result = pointer_align (purebeg + pure_bytes_used_lisp, GCALIGNMENT); pure_bytes_used_lisp = ((char *)result - (char *)purebeg) + size; } else