diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/bits/errno.h | 17 | ||||
-rw-r--r-- | sysdeps/generic/make_siglist.c | 8 | ||||
-rw-r--r-- | sysdeps/generic/readdir_r.c | 2 |
3 files changed, 15 insertions, 12 deletions
diff --git a/sysdeps/generic/bits/errno.h b/sysdeps/generic/bits/errno.h index cb61da7836..622c2c9de4 100644 --- a/sysdeps/generic/bits/errno.h +++ b/sysdeps/generic/bits/errno.h @@ -22,20 +22,15 @@ #undef __need_Emath #define __Emath_defined 1 -# define EDOM 1 -# define ERANGE 2 +# define EDOM XXX <--- fill in what is actually needed +# define ERANGE XXX <--- fill in what is actually needed #endif #ifdef _ERRNO_H -# define ENOSYS 3 -# define EINVAL 4 -# define ESPIPE 5 -# define EBADF 6 -# define ENOMEM 7 -# define EACCES 8 -# define ENFILE 9 -# define EMFILE 10 -# define ENOMSG 11 +# error "Define here all the missing error messages for the port. These" +# error "must match the numbers of the kernel." +# define Exxxx XXX +... #endif #define __set_errno(val) errno = (val) diff --git a/sysdeps/generic/make_siglist.c b/sysdeps/generic/make_siglist.c index b670baf434..2cfd4988dd 100644 --- a/sysdeps/generic/make_siglist.c +++ b/sysdeps/generic/make_siglist.c @@ -17,6 +17,11 @@ Boston, MA 02111-1307, USA. */ #include <stdio.h> + +/* Include signal.h now so that we can safely reinclude it again in + signame.c later on. We completely override the definitions, we + just have to be sure that the include guard in signal.h keeps it + from redefining the signal values. */ #include <signal.h> /* Get this configuration's defns of the signal numbers. */ @@ -32,6 +37,9 @@ #define HAVE_PSIGNAL #define sys_siglist my_siglist /* Avoid clash with signal.h. */ +#undef NSIG +#define NSIG _NSIG /* make sure that the value from SIGNUM_H is used. */ + #include "signame.c" diff --git a/sysdeps/generic/readdir_r.c b/sysdeps/generic/readdir_r.c index ae14d18160..41bf87fca2 100644 --- a/sysdeps/generic/readdir_r.c +++ b/sysdeps/generic/readdir_r.c @@ -27,7 +27,7 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result) { __set_errno (ENOSYS); *result = NULL; - return -1; + return ENOSYS; } weak_alias (__readdir_r, readdir_r) |