config_elast.h 993 B

123456789101112131415161718192021222324252627282930313233343536
  1. //===----------------------- config_elast.h -------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_CONFIG_ELAST
  10. #define _LIBCPP_CONFIG_ELAST
  11. #if defined(_WIN32)
  12. #include <stdlib.h>
  13. #else
  14. #include <errno.h>
  15. #endif
  16. #if defined(ELAST)
  17. #define _LIBCPP_ELAST ELAST
  18. #elif defined(_NEWLIB_VERSION)
  19. #define _LIBCPP_ELAST __ELASTERROR
  20. #elif defined(__linux__)
  21. #define _LIBCPP_ELAST 4095
  22. #elif defined(__APPLE__)
  23. // No _LIBCPP_ELAST needed on Apple
  24. #elif defined(__sun__)
  25. #define _LIBCPP_ELAST ESTALE
  26. #elif defined(_WIN32)
  27. #define _LIBCPP_ELAST _sys_nerr
  28. #else
  29. // Warn here so that the person doing the libcxx port has an easier time:
  30. #warning ELAST for this platform not yet implemented
  31. #endif
  32. #endif // _LIBCPP_CONFIG_ELAST