[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf 2.52 vs Solaris 2.6 AC_SYS_LARGEFILE problems
From: |
Akim Demaille |
Subject: |
Re: autoconf 2.52 vs Solaris 2.6 AC_SYS_LARGEFILE problems |
Date: |
31 Jan 2002 12:12:15 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
>>>>> "Paul" == Paul Eggert <address@hidden> writes:
>> From: Akim Demaille <address@hidden> Date: 29 Jan 2002 18:20:06
>> +0100
>>
>> Paul, anything we should leave in autoconf.texi about this story?
Paul> How about something like this?
Thanks Paul! That's what I had in mind.
Nevertheless, I'm trying to set up a different section for compiler
portability issues, and I think that's where this paragraph should be.
Maybe you'll want to revamp the layout of the said section: I trust
you, just structure it the way you want. For the time being it
consists only of:
@node Specific Compiler Characteristics
@subsection Specific Compiler Characteristics
Some compilers exhibit different behaviors.
@table @asis
@item Static/Dynamic Expressions
Autoconf relies on a trick to extract one bit of information from the C
compiler: using negative array sizes. For instance the following
excerpt of a C source demonstrates how to test whether @samp{int}s are 4
bytes long:
@example
int
main (void)
@{
static int test_array [(unsigned long) (sizeof (int)) == 4 ? 1 : -1];
test_array [0] = 0
return 0;
@}
@end example
@noindent
To our knowledge, there is a single compiler that does not support this
trick: the HP C compilers (the real one, not only the ``bundled'') on
HP-UX 11.00:
@example
$ @kbd{cc -c -Ae +O2 +Onolimit conftest.c}
cc: "conftest.c": error 1879: Variable-length arrays cannot \
have static storage.
@end example
@end table