This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Predefining __OS_DOS__
- To: "Jeffrey A Law" <law at hurl dot cygnus dot com>, "Kamil Iskra" <kamil at dwd dot interkom dot pl>
- Subject: Re: Predefining __OS_DOS__
- From: "Geert Bosch" <bosch at gnat dot com>
- Date: Sun, 13 Dec 1998 00:36:34 +0100
- Cc: "egcs at cygnus dot com" <egcs at cygnus dot com>
- Reply-To: "Geert Bosch" <bosch at gnat dot com>
On Sat, 12 Dec 1998 14:59:59 +0100 (EET), Kamil Iskra wrote:
Using DIR_SEPARATOR is *NOT* appropriate, strictly speaking. It implies
that only one character can be used for dir separation. This is true under
UNIX, but not under AmigaOS, for example, where ':' can be used in some
cases (and, unlike under Dos, it is usually NOT followed by
DIR_SEPARATOR).
This is true in DOS-like systems and Unix as well:
1. C:\>DIR A:X
2. C:\>DIR A:\X
3. C:\>DIR \\SERVER\RESOURCE\X
4. dublin% ls /usr//bin
Here all ':', '/' and '\' are directory separators, and case 2, 3 and 4 are
rooted directories. In VMS multiple dir seps are used as well.
But actually I agree with you that using IS_DIR_SEPARATOR still is too low-level
to do in most cases, and more high level file handling functions would be
better. OTOH, better have something than nothing at all.
Regards,
Geert