_syserrmsg.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #ifndef __SYSERRMSG_H
  8. #define __SYSERRMSG_H 1
  9. #include <bits/uClibc_uintmaxtostr.h>
  10. /**********************************************************************/
  11. /* NOTE: If we ever do internationalized syserr messages, this will
  12. * have to be changed! */
  13. #if defined(__mips__) || defined(__sparc__)
  14. /* sparce and mips have an extra error entry, as EDEADLK and EDEADLOCK have
  15. * different meanings on those platforms. */
  16. # define _SYS_NERR 126
  17. #else
  18. # define _SYS_NERR 125
  19. #endif
  20. #ifdef __UCLIBC_HAS_ERRNO_MESSAGES__
  21. # define _SYS_ERRMSG_MAXLEN 50
  22. #else /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
  23. # define _SYS_ERRMSG_MAXLEN 0
  24. #endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
  25. #if _SYS_ERRMSG_MAXLEN < __UIM_BUFLEN_INT + 14
  26. # define _STRERROR_BUFSIZE (__UIM_BUFLEN_INT + 14)
  27. #else
  28. # define _STRERROR_BUFSIZE _SYS_ERRMSG_MAXLEN
  29. #endif
  30. #endif