Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Shankar Unni Subject: Re: [Runtime macro] Where can I find those stuffs? Date: Wed, 25 Feb 2004 10:19:14 -0800 Lines: 29 Message-ID: References: <001f01c3fb08$662f9390$1701a8c0 AT Alvyn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: adsl-68-122-43-220.dsl.pltn13.pacbell.net User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) In-Reply-To: <001f01c3fb08$662f9390$1701a8c0@Alvyn> Alvyn Liang wrote: > 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/