]> Savannah Git Hosting - gnulib.git/commitdiff
immutable: Simplify a macro definition and improve comment.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 12 Apr 2025 22:02:33 +0000 (15:02 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sat, 12 Apr 2025 22:02:33 +0000 (15:02 -0700)
Suggested by Bruno Haible.

* lib/immutable.c (ALIGNMENT): Undefine without checking. Mention that
the #undef is for AIX which defines it beforehand in <sys/socket.h>.

ChangeLog
lib/immutable.c

index dbd51b54020554646fc03940d970613b195c3e55..f94208c5f775ab7e295223749f49db683f873b97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-04-12  Collin Funk  <collin.funk1@gmail.com>
+
+       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 <sys/socket.h>.
+
 2025-04-12  Bruno Haible  <bruno@clisp.org>
 
        vasnprintf tests: Add a test case that showcases a Solaris bug.
index 012740703b5a63a1aeb0f81413d4648aae578ccc..d38419b3746fbaa7f52c09342b9dfcf7a2a0ab62 100644 (file)
@@ -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 <sys/socket.h>.  Undefine it.  */
+# undef ALIGNMENT
 # define ALIGNMENT sizeof (void *)
 # define PAGE_RESERVED_HEADER_SIZE SHARED_LINK_HEADER_SIZE