This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Predefining __OS_DOS__




  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]