changeset 11568:e14e4bffdc96

Fix alignof macro.
author Bruno Haible <bruno@clisp.org>
date Wed, 13 May 2009 03:20:17 +0200
parents 18a6ae3e0516
children ad41328f771e
files ChangeLog lib/alignof.h
diffstat 2 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/alignof.h
+++ b/lib/alignof.h
@@ -26,14 +26,6 @@
 #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