From: Bruno Haible Date: Thu, 10 Feb 2005 15:50:31 +0000 (+0000) Subject: Work around AIX compiler bug. X-Git-Tag: v0.14.2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e91fd0df0bb3a1883f56be9c97e4cb4ea6d52e2f;p=thirdparty%2Fgettext.git Work around AIX compiler bug. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index e2a52f310..84b3b5242 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-02-10 Bruno Haible + + * allocsa.h (sa_alignof): Define differently with AIX xlc, to avoid + a bug of this compiler on AIX 3.2.5 dealing with enums. + 2005-02-07 Bruno Haible * c-strcase.h: New file, based on strcase.h. diff --git a/gettext-tools/lib/allocsa.h b/gettext-tools/lib/allocsa.h index 5ae49e507..dcc5e9b13 100644 --- a/gettext-tools/lib/allocsa.h +++ b/gettext-tools/lib/allocsa.h @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2004 Free Software Foundation, Inc. + Copyright (C) 2003-2005 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -81,6 +81,10 @@ extern void freesa (void *p); /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof values. */ # define sa_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 sa_alignof(type) 4 #else # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif