__errno_location.c 529 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <errno.h>
  7. #undef errno
  8. extern int errno;
  9. libc_hidden_proto(errno)
  10. /* psm: moved to bits/errno.h: libc_hidden_proto(__errno_location) */
  11. libc_hidden_proto(__errno_location)
  12. int * weak_const_function __errno_location (void)
  13. {
  14. return &errno;
  15. }
  16. #ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
  17. libc_hidden_weak(__errno_location)
  18. #endif