[fpc-devel]fpStat() and LinuxError
Peter Vreman
peter at freepascal.org
Mon Dec 1 11:31:49 CET 2003
> How do I get the error code for fpStat() ?
>
> The oldlinux.stat() function returns FALSE on failure, and sets
> LinuxError.
>
> The libc.stat() function returns (-1) on failure, and sets errno.
>
> The baseunix.fpStat() function returns (-1) on failure,
> but it does not set LinuxError.
>
> If I call fpStat() on a non-existing file, "strace" shows
> the error is ENOENT, but LinuxError is still zero.
>
> ( I am using 1.9.0 [2003/11/05] for i386/Linux )
LinuxError is already removed. Use errno instead, just like C.
More information about the fpc-devel
mailing list