[Top][All Lists]

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

Re: dont! Re: stdbool macro, take 2

From: address@hidden
Subject: Re: dont! Re: stdbool macro, take 2
Date: Fri, 9 Nov 2001 10:52:36 +0200

[ note: it's always me, Paolo Bonzini, writing from a web account where I
cannot set a From header :-( ]

> being a person who has been doing some tricky stuff with a generated
> file called stdint.h, I would like to oject on generating a stdbool.h
> file for a specific reason - installable headerfiles of a project.

I don't have precise knowledge of how package managers
handle conflicts with already-present files.  However, gcc for
example has its stdbool.h in /usr/lib/gcc-lib/... so it would
override any pre-installed stdbool.h.  I don't feel it would make
any harm to install an stdbool.h in if it is absent; updated
C libraries and compilers can always overwrite it or override it.

Note that however you'd then need a way to tell
that the file is there (si that it is installed).  Having to write an
"install-data-local" rule by hand would be ugly, I'd rather use a
substitution variable like the STDBOOL_H that I had proposed.

I could modify my patch to create a gstdbool.h that #includes
stdbool.h instead of removing stdbool.h.  Then gstdbool.h
would be installable -- this is similar to what you did with the
gstdint.h-generating macro.

Another way, possibly the simplest, would be to have
AC_HEADER_STDBOOL test whether stdbool.h works, and
have the programmers worry about substituting a working
one if necessary

  #include <stdbool.h>
     ...The contents of the file that my macro creates...

But it's ugly, and many people would be tempted to do the
same wrong thing that I did (creating a stdbool.h, possibly
from the Makefile like Bruno Haible did in gettext).  I don't
like having to copy boilerplate code from Autoconf's manual
like you have to do with the 'xxxdir' mess.

I think you all know better about this though.


reply via email to

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