From 3827476ac89e400a2383107a2c1919e36970f486 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 12 Apr 2025 15:02:33 -0700 Subject: [PATCH] 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 . --- ChangeLog | 7 +++++++ lib/immutable.c | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) 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 -- 2.39.5