X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sun, 12 Dec 2004 23:38:52 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-ID: <01c4e093$Blat.v2.2.2$1e91c320@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: <20041212151634.CMIQ11445.fep4@[212.117.129.234]> (alexbodn AT 012 DOT net DOT il) Subject: Re: network files unc under windows xp References: <20041212151634.CMIQ11445.fep4@[212.117.129.234]> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: > Date: Sun, 12 Dec 2004 17:16:34 +0200 > > i have recently run into a failure to open unc named files locate on a network, when the os is windows xp. > > unc file format: \\servername\directory_tree\filename. > > this occures with files named //servername/..., which is the default notation under djgpp (e.g., argv[0]). > > thus, every filename should have the path separator converted to `\\', before been submitted to open(), access(), etc. Sorry, but you are wrong: Windows understands / and \ alike, and it understands "//servername/" exactly as "\\servername\". The problem is elsewhere: DJGPP simply does not support UNC-style file names. It might work for you in some simple cases, but will mysteriously fail in others. The reason for that is that some file-related functions need to know the drive letter of the volume where the file resides, and that is just too painful to compute for a UNC-style file name (and might even not exist in some configurations).