strerror.c 514 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <features.h>
  8. #include <string.h>
  9. #include "_syserrmsg.h"
  10. /* Experimentally off - libc_hidden_proto(strerror) */
  11. /* libc_hidden_proto(__xpg_strerror_r) */
  12. char *strerror(int errnum)
  13. {
  14. static char buf[_STRERROR_BUFSIZE];
  15. __xpg_strerror_r(errnum, buf, sizeof(buf));
  16. return buf;
  17. }
  18. libc_hidden_def(strerror)