From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3405 invoked by alias); 2 Oct 2003 13:39:10 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3396 invoked from network); 2 Oct 2003 13:39:09 -0000 Received: from unknown (HELO ROSMIME03.enterprise.veritas.com) (143.127.131.4) by sources.redhat.com with SMTP; 2 Oct 2003 13:39:09 -0000 Received: from ROSXCHCON1.enterprise.veritas.com (unverified) by ROSMIME03.enterprise.veritas.com (Content Technologies SMTPRS 4.3.10) with ESMTP id ; Thu, 2 Oct 2003 08:39:08 -0500 Received: from ROSXCHCLN1.enterprise.veritas.com ([10.82.152.191]) by ROSXCHCON1.enterprise.veritas.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 2 Oct 2003 08:39:08 -0500 x-mimeole: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: which macro does gcc define beforehand ? Date: Thu, 02 Oct 2003 13:39:00 -0000 Message-ID: <305FFEDE10E368449714750CCC448E1218E422@rosxchcln1.enterprise.veritas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Martin York" To: , X-OriginalArrivalTime: 02 Oct 2003 13:39:08.0095 (UTC) FILETIME=[8DE6E4F0:01C388EA] X-SW-Source: 2003-10/txt/msg00029.txt.bz2 Make sure file.c and/or file.cpp are empty (I now its metioned below but I = think it is worth mentioning again) or you will also print any defines that= are defined in these files. I also just want to emphasis what is implied below. That the defines for 'g= cc -E -dM file.c' and 'g++ -E -dM file.cpp' produces different outputs. -----Original Message----- From: lrtaylor@micron.com [mailto:lrtaylor@micron.com] Sent: Wednesday, October 01, 2003 6:19 PM To: silverdaz@yahoo.fr; gcc-help@gcc.gnu.org Subject: RE: which macro does gcc define beforehand ? I believe GCC defines "sun" on Solaris. A nice easy trick to see what GCC = defines by default is to touch a file (creating an empty one) and then run = the following command: gcc -c -E -dM file.c or g++ -c -E -dM file.cpp where file.c and file.cpp are simply empty files. This will print out all = the defines. Cheers, Lyle -----Original Message----- From: Daz [mailto:silverdaz@yahoo.fr]=20 Sent: Wednesday, October 01, 2003 4:14 PM To: gcc-help@gcc.gnu.org Subject: which macro does gcc define beforehand ? Hi all, I'm trying to find a macro for each platform I intend to use gcc. On windows platform, _WIN32 is defined, __APPLE__ or MACOSX are defined for the apple (powerpc) platforms. I would like to find one macro for the solaris platform, which will be diff= erent than a linux one. Basically, I'd like to do that #ifdef __THE_MACRO__ # define __MY_APP_PLATFORM_1__ #elif defined(__ANOTHER_MACRO__) # define __MY_APP_PLATFORM_2__ #endif etc... (It's somehow my way to "detect" which platform I'm running on. If anyone has a better suggestion, feel free to tell me :) ) Thanks @ + Daz ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais ! Yahoo! Mail : http://fr.mail.yahoo.com