1 /* libc/sys/linux/sys/errno.h - Errno variable and codes */ 2 3 /* Written 2000 by Werner Almesberger */ 4 5 6 #ifndef _SYS_ERRNO_H 7 #define _SYS_ERRNO_H 8 9 /* --- from newlin's sys/errno.h --- */ 10 11 #include <sys/reent.h> 12 13 #ifndef _REENT_ONLY 14 #define errno (*__errno()) 15 extern int *__errno _PARAMS ((void)); 16 #endif 17 18 extern __IMPORT _CONST char * _CONST _sys_errlist[]; 19 extern __IMPORT int _sys_nerr; 20 21 #define __errno_r(ptr) ((ptr)->_errno) 22 23 /* --- end of slight redundancy (the use of struct _reent->_errno is 24 hard-coded in perror.c so why pretend anything else could work too ? */ 25 26 #define __set_errno(x) (errno = (x)) 27 28 #include <asm/errno.h> 29 30 #define ENOTSUP EOPNOTSUPP 31 #define EFTYPE 79 /* Inappropriate file type or format */ 32 #define EILSEQ 84 33 34 #endif 35