From: Bruno Haible Date: Wed, 13 May 2009 01:20:17 +0000 (+0200) Subject: Fix alignof macro. X-Git-Tag: v0.1~5919 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=4a5848d1059d31db026bb893fb28af28b4a97985;p=gnulib.git Fix alignof macro. --- diff --git a/ChangeLog b/ChangeLog index 35706e764..21a87627b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-05-12 Bruno Haible + 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 + Make the MAP_ANONYMOUS detection work on HP-UX 11. * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check whether mmap exists, but not whether its fully works. diff --git a/lib/alignof.h b/lib/alignof.h index 49e7757a0..3752ef394 100644 --- a/lib/alignof.h +++ b/lib/alignof.h @@ -26,14 +26,6 @@ #elif defined __cplusplus template struct alignof_helper { char __slot1; type __slot2; }; # define alignof(type) offsetof (alignof_helper, __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