autoconf
[Top][All Lists]
Advanced

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

Re: ac_cv_sizeof_X, et al.


From: Philip Prindeville
Subject: Re: ac_cv_sizeof_X, et al.
Date: Tue, 15 Jul 2008 00:06:44 -0700
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Philip Prindeville on 7/14/2008 5:27 PM:

| I'm looking at sox-12.17.9 and seeing in their "configure" file (which
|  claims to be generated via Autoconf 2.59)

Newer autoconf versions are able to accurately determine type sizes when
cross-compiling, making life much easier for porting to a
cross-compilation platform.  You may want to consider putting pressure on
the sox maintainers to use a newer autoconf version for their next release.

|
| I'm also not sure why there's "ac_cv_sizeof_long" and
| "ac_cv_sizeof_long_int", etc. except perhaps to make the cross-compiling
| distro-manager's life hellish.  :-)

Unfortunately, the C standard specifies several alternative spellings for
the same intrinsic type, so you have to worry about all of the possibilities.

How hard would it be to parse out the type, and generate a warning for anything other than the "canonical" name for a given intrinsic type?

unsigned long int => unsigned long

(actually, do you even need to differentiate between "unsigned" and signed?


|
| Likewise with the "ac_cv_sizeof_charp" versus "ac_cv_sizeof_char_p",

That may (although I haven't checked) stem from a difference in 'char*'
vs. 'char *', where the space is being converted to _.

That should be easy enough to standardize, right?

-Philip



| and
| "ac_cv_sizeof_char" versus "ac_cv_sizeof_unsigned_char" (are these
| *ever* different???).

C requires sizeof(char), sizeof(signed char), and sizeof(unsigned char) to
all be equal to 1.  Any compiler where this is not true is broken.  Thus,
any package that has a configure test for this is wasting time.  A recent
thread was posted proposing adding a warning if the user does
AC_CHECK_SIZEOF([char]), but no one has implemented something that works
on all the variant spellings.






reply via email to

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