This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: gcc/Cygwin awareness
John Williams wrote:
> Elfyn McBratney wrote:
>> You could use this
>>
>> #if defined(__GNUC__) && defined(__CYGWIN__)
>
> So __CYGWIN__ is defined in the preprocessor environment when compiling
> under Cygwin? That's precisely what I'm after, thanks.
General answer to this kind of question:
$ gcc -E -dM -xc /dev/null
yields:
#define _X86_ 1
#define __HAVE_BUILTIN_SETJMP__ 1
#define __tune_pentium2__ 1
#define __unix__ 1
#define unix 1
#define __i386__ 1
#define __SIZE_TYPE__ unsigned int
#define __GNUC_PATCHLEVEL__ 0
#define _stdcall __attribute__((__stdcall__))
#define __CYGWIN__ 1
#define __unix 1
#define __USER_LABEL_PREFIX__ _
#define __STDC_HOSTED__ 1
#define __stdcall __attribute__((__stdcall__))
#define __tune_i686__ 1
#define __WCHAR_TYPE__ short unsigned int
#define __WINT_TYPE__ unsigned int
#define __GNUC__ 3
#define _cdecl __attribute__((__cdecl__))
#define __tune_pentium3__ 1
#define __tune_pentiumpro__ 1
#define __fastcall __attribute__((__fastcall__))
#define _fastcall __attribute__((__fastcall__))
#define __CYGWIN32__ 1
#define __GXX_ABI_VERSION 102
#define i386 1
#define __GNUC_MINOR__ 2
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __REGISTER_PREFIX__
#define __cdecl __attribute__((__cdecl__))
#define __NO_INLINE__ 1
#define __i386 1
#define __VERSION__ "3.2 20020927 (prerelease)"
#define __declspec(x) __attribute__((x))
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/