errno.c 333 B

1234567891011121314151617
  1. #include <features.h>
  2. #undef errno
  3. extern int errno;
  4. extern int h_errno;
  5. #if 0
  6. /* Unfortunately, this doesn't work... */
  7. int h_errno __attribute__ ((section (".bss"))) = 0;
  8. int errno __attribute__ ((section (".bss"))) = 0;
  9. #else
  10. int _errno = 0;
  11. int _h_errno = 0;
  12. #endif
  13. weak_alias (_errno, errno)
  14. weak_alias(_h_errno, h_errno);