I also find out there are so many macros such as __i486__, __i586__, _M_IX86, _X86_, WIN32_LEAN_AND_MEAN, __USE_W32_SOCKETS... , etc. They are not in the textbooks I bought. I bought "GCC The complete Reference" and some c++ books, they do not mention so many variables. Can someone tell me where I can find the information of those Macros?
That's a long story, now..
* Some macros are built in to GCC (__i486__, etc.)
* Some macros are required by the platform header files for enabling or disabling certain bits of functionality (e.g. WIN32_LEAN_AND_MEAN, etc.) For these, the rule is that you use them if the platform documentation tells you to use them. (I.e. *RTFM* first!)
There's a nice way to tell you what the "standard GCC macros" for a platform are:
% touch xx.c # empty file % gcc -dN -E xx.c # or -dM
This will dump out a nice dump of all the macros that are compiled in to cc1, or are passed in from the spec file. -dN will print only the names, while -dM will print the full #define statements.
Really useful..
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/