[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: allocsa module update
From: |
Ralf Wildenhues |
Subject: |
Re: allocsa module update |
Date: |
Sun, 6 Aug 2006 14:54:11 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Hello Bruno,
A while ago you applied this go gnulib:
* Bruno Haible wrote on Sat, Jul 22, 2006 at 03:53:42PM CEST:
> Merge from gettext:
> 2005-02-10 Bruno Haible <address@hidden>
>
> * allocsa.h (sa_alignof): Define differently with AIX xlc, to avoid
> a bug of this compiler on AIX 3.2.5 dealing with enums.
> *** allocsa.h 14 May 2005 06:03:57 -0000 1.4
> --- allocsa.h 22 Jul 2006 13:55:31 -0000
> ***************
> *** 81,86 ****
> --- 92,101 ----
> /* 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
It looks rather scary to me, for two reasons: First, the alignment may
be altered by the -qalign compiler option; granted, this is not so much
of a concern in practice as it creates binary-incompatible software.
But second, newer AIX versions may align 'long long' on an 8 byte
boundary. So, if sa_alignof needs only mention an upper bound (which I
don't know, as I don't know this code), then that should be 8. But
maybe it's either not worth catering for AIX 3.2.5 any more (hey, AIX
4.3.3 has reached end of service life for a while), or you could at
least check for something like
#elif defined _AIX && !defined _AIX41
to limit impact for newer versions (AFAIK all newer versions define
the macro _AIX41), given that this is fixed there.
What was the original bug report that prompted this, by the way? It
should affect some Autoconf proper code as well.
Cheers,
Ralf
- Re: allocsa module update,
Ralf Wildenhues <=