This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

setup & gcc3 WORKING :-) [Decision required on modification to setup (min/max macros]


OK! I've successfully compiled setup with gcc3. It's 100KB larger (comparing
stripped binaries), but hopefully upx will nullify most of that.

I want to get feedback on the best way to properly get around a problem I
have kludged my way around:

The problem is: Certain .cc files in setup use min/max macros, and expect
them to be defined in windows.h.
However, certain parts of the STL with gcc3, either undefine min&max, or
fail to compile if they are defined. Quite possibly, the best solution might
be to fix STL to not be so sensitive to a users macro definitions, but its
going to be much easier to fix setup. It is possible to avoid the issue by
careful re-ordering of #includes, but I think the best solution might be to
change setup to define and use MINIMUM(a,b) and MAXIMUM(a,b). All-caps means
they are unlikely to clash with any non-macro symbols, and the long names
make them pretty unambiguous. Once that is done, we can define NOMINMAX
before including windows.h, so avoiding any reliance on the rather
troublesome names min and max.

Please comment - I need to know what style to use in the patch I will
submit.

Thanks,

Max.


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