This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PACKAGE and VERSION defines


> 
> i want to use PACKAGE and VERSION to store the version etc. of _my_program_  because those defines are standard to do so (gnu
> autoconf).
> but i can't do that now, because libstc++ blocks those defines and i have to care about the order of the includes in my programs to
> let the right define through.
> 
> so i ask if you could drop those defines in libstdc++. i think this wouldn't be a problem because you have the __GLIBCPP__ define to
> store the version.


Yeah. I understand you--config.h is actually appended to c++config.h, as 
a hack so that std_cmath and std_cctype (maybe others) will do the right 
things depending on the host platform. As such, things like PACKAGE and 
VERSION are defined as well as the needed HAVE_STRTOLD etc. etc. etc., and 
placed into an unguarded namespace at the end of c++config.h.

This behavior is obviously wrong. The (clean, elegant) solution, however, 
it a bunch of  work that I am unable (unwilling?) to do at the moment, 
and involves not appending config.h to c++config.h, and using 
fixincludes or some other, undetermined-at-this-time method to clean and 
prune standard headers for a particular host environment.  Some of the 
issues surrounding this were discussed on this list under this thread:

http://sourceware.cygnus.com/ml/libstdc++/1999-q4/msg00011.html

You might want to take a look at it. Perhaps this issue should be put on 
the TODO list? Some brave volunteer want to step up? Any quick hacks for 
not emitting PACKAGE and VERSION in config.h? I suppose this will 
be more and more of an issue as people actually start to use v-3, and 
may eventually become more of a priority than say, validating iostreams. 

-benjamin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]