This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: stat'ing "/" vs "//"


DJ Delorie <dj@delorie.com> writes:
> 
> > Here's a trivial test case:
> 
> Linux returns 0 for both cases.

Linux is not an issue since leading '//' is not special. However, it is 
so for win32 derived systems, and I'm trying to figure out how GCC should
handle stripping multiping slashes. Currently gcc, or rather cpp, uses
stat to see if "/" and "//" both look the same, and if so, it strips
it; this causes obvious havoc for Cygwin. 

runtime		/	//
==========================
Cygwin 		0	0
MSVC 		0	-1
UWIN 		0	-1
Interix 	0	-1

If newer releases of Cygwin will continue to return 0 for "//", then
I can justify my upcoming fix to egcs; if it's going to switch to -1,
I'll put a note saying it should be removed in the future.

Regards,
Mumit