[fpc-pascal] errno codes fpOpen
Marco van de Voort
marcov at stack.nl
Fri Nov 9 10:20:42 CET 2007
> On 08 Nov 2007, at 20:43, afpTeam wrote:
>
> > I'm maybe lost in the doc searches, but is there a reference
> > explaining the
> > extended err codes for fpOpen and friends?
> > I could not find one.
>
> They are documented in the man pages of the *nix functions you are
> calling (man open), and the actual values corresponding to the
> symbolic errno numbers can be found in /usr/include/errno.h (or in one
> of the files it includes). The actual numerical values differ however
> from OS to OS, so it's best to use the symbolic constants in your
> program (they are all prefixed with ESys in FPC, so e.g. ESysEPERM,
> ESysEBUSY, etc).
Note that there can be slight differences between the FPC definitions and
the C file on some platforms. (kernel <-> libc. Mostly caused by
redistribution of functionality between kernel and libc).
So to obtain a number -> identifier (EPerm, EBusy) mapping, it might be
wisest to check the FPC .inc first, since that is more likely to correspond
to whatever interface the pascal code is using.
More information about the fpc-pascal
mailing list