This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Predefining __OS_DOS__
- To: Peter Gerwinski <peter at gerwinski dot de>
- Subject: Re: Predefining __OS_DOS__
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Sun, 06 Dec 1998 03:56:21 -0700
- cc: egcs at cygnus dot com, Frank Heckenbach <frank at tim dot gerwinski dot de>
- Reply-To: law at cygnus dot com
In message <19981205125824.C299@esmeralda.gerwinski.de>you write:
> Hi, folks!
>
> It is important for GNU Pascal, but it might be useful for C
> programmers, too.
>
> What about adding "-D__OS_DOS__" to the `CPP_PREDEFINES' of all
> MS-DOS-like operating systems?
>
> This would result in this symbol being predefined when compiling
> a program for an MS-DOS-like target system. Programmers writing
> intended-to-be-portable programs can use this to determine
> whether a system supports drives etc.
You say it is important to Pascal -- why? Seems to me that is this purely
a target issue, why does Pascal about defining __OS_DOS__ for the target?
I'd actually recommend programmers use the specific case they care about. If
they want a #define for generic dos-like stuff, they can always add
#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
#define __OS_DOS__
#endif
To one of their common header files.
> This change would affect the following files:
>
> dsp16xx/dsp16xx.h (MSDOS)
Ick. This file probably shouldn't have MSDOS in its CPP predefines anyway.
> i386/go32-rtems.h (MSDOS)
Similarly.
jeff