1 /* Wrapper around broken system errno.h. */
3 #ifndef _PERL_WRAPPER_AROUND_ERRNO_H
4 # define _PERL_WRAPPER_AROUND_ERRNO_H 1
6 /* First include the system file. */
7 #include_next <errno.h>
9 /* Now add the missing stuff.
11 # define EAGAIN EWOULDBLOCK
14 /* This one is problematic. If you open() a directory with the
15 MiNTLib you can't detect from errno if it is really a directory
16 or if the file simply doesn't exist. You'll get ENOENT
17 ("file not found") in either case.
19 Defining EISDIR as ENOENT is actually a bad idea but works fine
20 in general. In praxi, if code checks for errno == EISDIR it
21 will attempt an opendir() call on the file in question and this
22 call will also file if the file really can't be found. But
23 you may get compile-time errors if the errno checking is embedded
24 in a switch statement ("duplicate case value in switch").
26 Anyway, here the define works alright. */
28 # define EISDIR ENOENT