Is there a OS name defined by gcc or g++?

From: Dave (kaatzd_at_hotmail.com)
Date: 08/11/04


Date: 10 Aug 2004 16:15:03 -0700

I'm looking something like a compiler under Win32 will define _WIN32
for me, so then I can have my conditional code thus:

#ifdef _WIN32
...
#elif defined __OS2__
...
#elif defined LINUX
...
#endif

Thanks in advance,
Dave



Relevant Pages

  • Re: plataform dependent code
    ... >I am using wxPython and i want to have some code plataform dependent. ... import sys ... if sys.platform == 'win32': ... elif sys.platform == 'linux2': ...
    (comp.lang.python)
  • Who defines the platform specific macros eg LINUX VXWORKS etc
    ... #elif defined VXWORKS ... #elif defined MACOSX ... #elif defined WIN32 ...
    (comp.lang.c)
  • Re: Detecting WIN32 or .NET example in a compiler directive
    ... WriteLn('Welcome to the WIN32 world!'); ... there's no reason for the compiler directives ... Delphi for Win32 ...
    (alt.comp.lang.borland-delphi)
  • Re: The New Roadmap
    ... C# and Chrome don't have these issues because they don't have Win32 ... between different versions of the compiler and in both Win32 and .Net ... The question was "What's better in Delphi for .NET than C# or Chrome?", ... Forward migration of WinForms projects works ...
    (borland.public.delphi.non-technical)
  • Re: Can Someone Change My Mind About .NET?
    ... >> Win32 is not going away with LH. ... > the compiler that optimizes it for the current known processors. ... > If you do not recompile the .NET applcation and conventional program, ... > laid out in a certain memory order at the moment you compiled and linked. ...
    (microsoft.public.dotnet.general)