Mail Archives: djgpp/1997/10/19/11:21:52
On 16 Oct 1997 mark AT bigdog DOT fred DOT net wrote:
> main()
> {
> struct stat s;
>
> printf("%d\n",stat("test",&s));
> }
>
> Now if I run this on the linux box the return values for stat
> are correct (0 if it's there, -1 if not). But compiling with
> dos_gcc and running on a win95 machine it always returns a 0.
I cannot reproduce this. On my machine, also with Windows 95, the
program prints -1 when the file `test' isn't there, 0 when it is.
Please make sure that the file `test' indeed doesn't exist when you
think it doesn't (it might be hidden or something).
If you cannot find the reason to your behavior, please change your
program to print all the members of struct stat that are returned for
`test' and post the output.
- Raw text -