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__


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



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