Date: Mon, 16 Mar 1998 16:46:32 +0200 (IST) From: Eli Zaretskii To: Martin Stromberg cc: djgpp-workers AT delorie DOT com Subject: Re: Where to get the latest sources for djtar In-Reply-To: <199803161246.NAA22720@propus.lu.erisoft.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 16 Mar 1998, Martin Stromberg wrote: > Yes for djtar, but I'd like better errno's from mkdir, so it's more like > Unix. A better errno from `mkdir' library function? If you can do that without bloating the source too much, go ahead and submit a patch. But I should warn you up front that DOS makes it very hard to provide good diagnostics without doing a lot of expensive tests. DOS error codes just don't map too well into the Posix errno values. > > I think the limitation is not 24 slashes, it's the length of the path > > name. Anything longer than 64 characters should make DOS barf. > > Hmm. "1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25" > is 55 long, so that's not right. This is a relative path name. What is its absolute name? The limits are imposed on absolute names, including the drive letter and the colon. > Uggh! So is it possible to get more information from DOS, why the operation > failed and set errno from that? It's possible, but it's hard. The best way would be probably to bypass `mkdir', call `__dpmi_int' directly and examine the DOS error code. However, IMHO this is only justified if we think that this is a common situation which needs good diagnostics. > > `_truename' will give you hell and high water if the drive is mounted > > via a network. I think it's better to use `_fixpath', if you need that. > > ? What's the question? What I meant was that you might get names like "\\server\volume\dir\foo" from `_truename', which will utterly confuse some DOS calls and even your slash count (DOS doesn't count the first 3 slashes in such names).