From: Collin Funk Date: Sat, 12 Apr 2025 22:02:33 +0000 (-0700) Subject: immutable: Simplify a macro definition and improve comment. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3827476ac89e400a2383107a2c1919e36970f486;p=gnulib.git immutable: Simplify a macro definition and improve comment. Suggested by Bruno Haible. * lib/immutable.c (ALIGNMENT): Undefine without checking. Mention that the #undef is for AIX which defines it beforehand in . --- diff --git a/ChangeLog b/ChangeLog index dbd51b5402..f94208c5f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-04-12 Collin Funk + + immutable: Simplify a macro definition and improve comment. + Suggested by Bruno Haible. + * lib/immutable.c (ALIGNMENT): Undefine without checking. Mention that + the #undef is for AIX which defines it beforehand in . + 2025-04-12 Bruno Haible vasnprintf tests: Add a test case that showcases a Solaris bug. diff --git a/lib/immutable.c b/lib/immutable.c index 012740703b..d38419b374 100644 --- a/lib/immutable.c +++ b/lib/immutable.c @@ -275,10 +275,8 @@ free_pages (uintptr_t pages, size_t size) # define ALLOC_PAGES alloc_pages # define FREE_PAGES free_pages -/* Avoid redefined macro on AIX. */ -# ifdef ALIGNMENT -# undef ALIGNMENT -# endif +/* AIX defines a macro ALIGNMENT in . Undefine it. */ +# undef ALIGNMENT # define ALIGNMENT sizeof (void *) # define PAGE_RESERVED_HEADER_SIZE SHARED_LINK_HEADER_SIZE