delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/22/06:36:20

Date: Sat, 22 Jun 2002 12:43:03 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Message-Id: <2950-Sat22Jun2002124302+0300-eliz@is.elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3D139EAB.9DCB25C9@phekda.freeserve.co.uk> (message from Richard
Dawe on Fri, 21 Jun 2002 22:46:19 +0100)
Subject: Re: gcc-3.1: old problem with temporary files
References: <3D08D753 DOT 9898 DOT 186F2D1 AT localhost> (pavenis AT lanet DOT lv) <3D08F9D5 DOT 4065 DOT 4B0BFF AT localhost> <3D139EAB DOT 9DCB25C9 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 21 Jun 2002 22:46:19 +0100
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> I think there's actually a bug in _put_path. There's code to remove a trailing
> slash, but it only does that for forward slashes.

We simply imitate the DOS/Windows behavior for backslashes (their
system calls fail when there are extra trailing slashes), but emulate
the Posix behavior with forward slashes.

On balance, I'm not sure C:/temp\ is a case important enough to change
the current behavior.  What would be the user-level situation where
such a file name could be born?

> IMHO it should do this for
> backward slashes too. The diff below contains a patch for this. So far I've
> only tested it with a demo program, but it should be tested with more
> heavy-duty stuff, given how important _put_path is.

Watch out for UNCs: we shouldn't break them, even though we don't
really support them.

> I also noticed what I think is a bug in findfirst. It does not restrict the
> attrib argument in any way. We need to restrict it to be <= 255, otherwise we
> the bits 8-15 end up being required attributes in the DOS call.

Yes, that's a bug.

- Raw text -


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