__errno_location.c 448 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 "internal_errno.h"
  7. /* psm: moved to bits/errno.h: */
  8. int *
  9. #ifndef __UCLIBC_HAS_THREADS__
  10. weak_const_function
  11. #endif
  12. __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