diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 23:20:30 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 23:20:30 +0000 |
commit | 190da1cd0c221438c563b5b605ff811e9075e210 (patch) | |
tree | ca5177a27d154dfa08b85d678ce6e33ac0672522 /include/errno.h | |
parent | e0605c73da33c6f06b13c4bdf5cb42db97cd4b30 (diff) |
sync with psm: update errno handling to be the same on all arches
Diffstat (limited to 'include/errno.h')
-rw-r--r-- | include/errno.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/errno.h b/include/errno.h index 9f3c6efcb..aef117e87 100644 --- a/include/errno.h +++ b/include/errno.h @@ -43,30 +43,32 @@ __BEGIN_DECLS variable. This redeclaration using the macro still works, but it will be a function declaration without a prototype and may trigger a -Wstrict-prototypes warning. */ -# ifndef __ASSEMBLER__ -# ifndef errno +#ifndef errno extern int errno; -# endif +#endif -# if defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ +#if defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of ARGV[0] (this works only if you use GNU ld). */ extern char *program_invocation_name, *program_invocation_short_name; -# endif /* __USE_GNU */ -# endif /* __ASSEMBLER__ */ +#endif /* __USE_GNU */ #endif /* _ERRNO_H */ __END_DECLS +#if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc ) +#include <bits/uClibc_errno.h> +#endif + #endif /* _ERRNO_H */ /* The Hurd <bits/errno.h> defines `error_t' as an enumerated type so that printing `error_t' values in the debugger shows the names. We might need this definition sometimes even if this file was included before. */ -#if ( defined __USE_GNU || defined __need_error_t ) && !defined __ASSEMBLER__ +#if defined __USE_GNU || defined __need_error_t # ifndef __error_t_defined typedef int error_t; # define __error_t_defined 1 |