bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils 6.6 HP-UX build error


From: Paul Eggert
Subject: Re: coreutils 6.6 HP-UX build error
Date: Wed, 22 Nov 2006 16:13:27 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> Thanks for the report and patch.
> What version of HP-UX (and, if possible, the compiler) is that?
> It must be rather old.

Come to think of it, since we want the code to stay portable to C89,
then we can't use switch (V) ... when V is of type off_t.  This is
because off_t is typically 'long long int', and C89 (which lacks 'long
long int') does not require support for a switch whose expression is
of type 'long long int'.

Also, I suspect that many would-be C99 compilers might have trouble
with this usage, since it's pretty rare to have a switch (off_t).
I suppose I should add a test to AC_TYPE_LONG_LONG_INT to catch this
particular diagnostic.  But even that wouldn't cure this particular
problem, since the code doesn't depend on HAVE_LONG_LONG_INT.  Sigh.

I'd say we should give up on this particular battle, and just rewrite
the 'switch' to if-then-else, as Matthew Woehlke suggested.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]