Fix alignof macro.
authorBruno Haible <bruno@clisp.org>
Wed, 13 May 2009 01:20:17 +0000 (03:20 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 13 May 2009 01:20:17 +0000 (03:20 +0200)
ChangeLog
lib/alignof.h

index 35706e7642576c1e729f7ec59770c3cba7e8af44..21a87627be573ad5af952d4b65de7537dde0ebd3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-12  Bruno Haible  <bruno@clisp.org>
+
+       Fix alignof macro.
+       * lib/alignof.h (alignof): Remove special cases for AIX and HP-UX
+       vendor compilers that are always correct.
+
 2009-05-12  Bruno Haible  <bruno@clisp.org>
 
        Make the MAP_ANONYMOUS detection work on HP-UX 11.
index 49e7757a0e28e3a590a353486f44123f0fad77d2..3752ef39424ee1f9fc808367c5b82102f6d6d4be 100644 (file)
 #elif defined __cplusplus
   template <class type> struct alignof_helper { char __slot1; type __slot2; };
 # define alignof(type) offsetof (alignof_helper<type>, __slot2)
-#elif defined __hpux
-  /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
-     values.  */
-# define alignof(type) (sizeof (type) <= 4 ? 4 : 8)
-#elif defined _AIX
-  /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
-     values.  */
-# define alignof(type) (sizeof (type) <= 4 ? 4 : 8)
 #else
 # define alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
 #endif