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

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

ChangeLog
tests/test-aligned-malloc.c

index f94208c5f775ab7e295223749f49db683f873b97..d8b202df02e0bfe3f676d2336aca04373270a5c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-04-12  Collin Funk  <collin.funk1@gmail.com>
 
+       aligned-malloc tests: Simplify a macro definition and improve comment.
+       Suggested by Bruno Haible.
+       * tests/test-aligned-malloc.c (ALIGNMENT): Undefine without checking.
+       Mention that the #undef is for AIX which defines it beforehand in
+       <sys/socket.h>.
+
        immutable: Simplify a macro definition and improve comment.
        Suggested by Bruno Haible.
        * lib/immutable.c (ALIGNMENT): Undefine without checking. Mention that
index e577804d22c18c5a17f622cc84b617232365f29c..1a1795f051b7b5fc4a2c7322b4c29c3d72888ed8 100644 (file)
 #include <stdint.h>
 #include <stdlib.h>
 
-/* Avoid redefinition on AIX.  */
-#ifdef ALIGNMENT
-# undef ALIGNMENT
-#endif
+/* AIX defines a macro ALIGNMENT in <sys/socket.h>.  Undefine it.  */
+#undef ALIGNMENT
 #define ALIGNMENT 4
 #define aligned_malloc aligned4_malloc
 #define aligned_free aligned4_free