This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Predefining __OS_DOS__
- To: "law at cygnus dot com" <law at cygnus dot com>, "Peter Gerwinski" <peter at gerwinski dot de>
- Subject: Re: Predefining __OS_DOS__
- From: "Geert Bosch" <bosch at gnat dot com>
- Date: Fri, 11 Dec 1998 11:41:27 +0100
- Cc: "egcs at cygnus dot com" <egcs at cygnus dot com>, "Frank Heckenbach" <frank at tim dot gerwinski dot de>
- Reply-To: "Geert Bosch" <bosch at gnat dot com>
On Fri, 11 Dec 1998 00:51:55 -0700, Jeffrey A Law wrote:
True. And if you read GNU policy on being DOS friendly you'll find that
policy discourages catering to DOS braindamage.
[...]
Instead of writing
#ifdef DOS
do dos-like stuff
#endif
You write
#ifdef HAVE_SOME_FEATURE
do code to handle that feature
#endif
What would be most helpful for those of us using non-Unix systems
(whether Win32, OS/2, DOS, VMS or other) is not to embed knowledge
about things like filenames all over the place, but instead use functions
or macros like IS_DIR_SEP(X), IS_ROOTED_PATH(X) to test for directory
separators or rooted paths.
Such definitions can be set in the appropriate configuration files
and then there is no need for #ifdef's in the actual code.
Regards,
Geert