diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-13 16:50:17 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-13 16:50:17 +0000 |
commit | 61ae2fbf8676dafa05a9a9a710fde421f30a2071 (patch) | |
tree | 4f497a4eee07a49f48be8badf49ad54f068f11f8 /mint/errno.h | |
parent | b8f0c030659550e4d527ee8f11cd2f012f1bd1b0 (diff) | |
download | perl-61ae2fbf8676dafa05a9a9a710fde421f30a2071.tar.gz |
Atari MiNT port by Guido Flohr <gufl0000@stud.uni-sb.de>
(the diffs were based on 5.004_02). Tested by Guido
and Frank Naumann <fnaumann@prinz-atm.CS.Uni-Magdeburg.De>.
p4raw-id: //depot/cfgperl@2594
Diffstat (limited to 'mint/errno.h')
-rw-r--r-- | mint/errno.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mint/errno.h b/mint/errno.h new file mode 100644 index 0000000000..5c19d0efa7 --- /dev/null +++ b/mint/errno.h @@ -0,0 +1,32 @@ +/* Wrapper around broken system errno.h. */ + +#ifndef _PERL_WRAPPER_AROUND_ERRNO_H +# define _PERL_WRAPPER_AROUND_ERRNO_H 1 + +/* First include the system file. */ +#include_next <errno.h> + +/* Now add the missing stuff. +#ifndef EAGAIN +# define EAGAIN EWOULDBLOCK +#endif + +/* This one is problematic. If you open() a directory with the + MiNTLib you can't detect from errno if it is really a directory + or if the file simply doesn't exist. You'll get ENOENT + ("file not found") in either case. + + Defining EISDIR as ENOENT is actually a bad idea but works fine + in general. In praxi, if code checks for errno == EISDIR it + will attempt an opendir() call on the file in question and this + call will also file if the file really can't be found. But + you may get compile-time errors if the errno checking is embedded + in a switch statement ("duplicate case value in switch"). + + Anyway, here the define works alright. */ +#ifndef EISDIR +# define EISDIR ENOENT +#endif + +#endif + |