www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/04:38:51

Date: Mon, 17 Feb 1997 11:14:39 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Benjamin D Chambers <chambersb AT juno DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Forgive my ignorance, but can someone answer a question for me?
In-Reply-To: <19970216.130542.8487.2.chambersb@juno.com>
Message-ID: <Pine.SUN.3.91.970217111340.17765B-100000@is>
MIME-Version: 1.0

On Sun, 16 Feb 1997, Benjamin D Chambers wrote:

> Actually, djgpp treats both / and \ identically.

The problem is *not* the DJGPP support of slashes (that's inherent to
the DJGPP libc I/O functions).  The problem is that many Unix programs
have built-in assumptions about how valid pathnames look: they only
know about forward slashes, treat any pathname that doesn't begin with
a slash as relative to the working directory (what about "d:/path"?)
and don't know anything about drive letters.  The code based on these
assumptions and the '/' characters are scattered throughout the entire
program, which makes it a bitch porting them to DJGPP, unless you just
give up and decide to not support DOS-style pathnames.  (I think that
whoever ports a package should *not* give up.)

So it takes a lot of effort and some trickery to port a file-oriented
package, such as GNU Fileutils to DJGPP in a way that makes them
support both Unix-style and DOS-style pathnames.  The interested
reader should look into the sources of the ported packages to see how
this is done.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019