Mail Archives: djgpp/2000/10/07/07:17:01
> 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 -