delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/07/07:17:01

Date: Sat, 07 Oct 2000 13:17:27 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: jbfraleigh AT hotmail DOT com
Message-Id: <2110-Sat07Oct2000131727+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h
CC: djgpp AT delorie DOT com
In-reply-to: <8rl79u$mce$1@nnrp1.deja.com> (jbfraleigh@hotmail.com)
Subject: Re: DJGPP, FreeDOS and file access
References: <8rkmnt$8sq$1 AT nnrp1 DOT deja DOT com> <8rl79u$mce$1 AT nnrp1 DOT deja DOT com>
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

> From: jbfraleigh AT hotmail DOT com
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 06 Oct 2000 18:57:03 GMT
> 
> I am using the Allegro library -- One of the functions was calling
> findfirst which was generating the ENOENT.  I modified the routines to
> call _dos_findfirst instead which has corrected that problem.

IMHO, such ``solutions'' are not a good idea: they tend to sweep
problems under the carpet rather than really solve them.  A ``real''
solution would mean that the reason for such a problem is well
understood and acted upon.  For example, if this is a bug in FreeDOS,
a proper description should be added to the DJGPP FAQ list and the
library docs, so that others won't need to fight those same problems;
if it's a bug in the DJGPP library, it should be corrected; etc.

Is it possible that FreeDOS has some long-file-name emulation in it?
If so, please try to turn it off, and see if that helps.  The only
real difference between findfirst and _dos_findfirst is that the
latter doesn't try to use the long file-name API, even if it is
present.  Otherwise, the two functions do the same.

> ---- code ----
> FILE *fp;
> 
> fp = fopen("TEMP.TMP", "r");
> if (!fp) {
>   printf("We have a problem.");
>   exit(1);
> }
> 
> ---- end -----
> 
> When I run this code from a dos window (under Windows 98) or from a
> Windows 98 boot disk, it works fine.  When I run it from my FreeDOS
> boot disk, I receive the error message.

Again, please try to run this program with the long-file-name module
disabled.

- Raw text -


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