autoconf
[Top][All Lists]
Advanced

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

Re: Why AC_C_CHAR_UNSIGNED?


From: Ralf Wildenhues
Subject: Re: Why AC_C_CHAR_UNSIGNED?
Date: Mon, 23 Jun 2008 19:13:59 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello,

* Richard Ash wrote on Mon, Jun 23, 2008 at 06:27:57PM CEST:
> Hallvard B Furuseth wrote:
> > What's the point of the AC_C_CHAR_UNSIGNED macro?
> >     "If the C type `char' is unsigned, define `__CHAR_UNSIGNED__',
> >     unless the C compiler predefines it."
> >
> > This is what <limits.h> is for.  If you want to know if char is
> > unsigned, try #if CHAR_MIN == 0.  I would suggest at least mentioning
> > that option in the doc for AC_C_CHAR_UNSIGNED.

FWIW, I don't see a problem with this; but I'm not the most experienced
in this area.

> That assumes you have a correct limits.h on the system, which is an
> assumption you can't necessarily make on an old enough system.

Do you have any specific examples here, found outside of a museum?
Current Autoconf more or less tells users to assume C89 for new
programs, and limits.h exists in a free-standing implementation, too.

> It also
> assumes that the compiler matches the headers, which again might be wrong
> if someone has messed up a third party compiler install.

I don't think Autoconf should need to cater for intentionally broken
systems (except maybe in order to solve bootstrapping issues).

Cheers,
Ralf




reply via email to

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