osdefs.h 707 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // from CPython
  2. #ifndef Py_OSDEFS_H
  3. #define Py_OSDEFS_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Operating system dependencies */
  8. #ifdef MS_WINDOWS
  9. #define SEP L'\\'
  10. #define ALTSEP L'/'
  11. #define MAXPATHLEN 256
  12. #define DELIM L';'
  13. #endif
  14. /* Filename separator */
  15. #ifndef SEP
  16. #define SEP L'/'
  17. #endif
  18. /* Max pathname length */
  19. #ifdef __hpux
  20. #include <sys/param.h>
  21. #include <limits.h>
  22. #ifndef PATH_MAX
  23. #define PATH_MAX MAXPATHLEN
  24. #endif
  25. #endif
  26. #ifndef MAXPATHLEN
  27. #if defined(PATH_MAX) && PATH_MAX > 1024
  28. #define MAXPATHLEN PATH_MAX
  29. #else
  30. #define MAXPATHLEN 1024
  31. #endif
  32. #endif
  33. /* Search path entry delimiter */
  34. #ifndef DELIM
  35. #define DELIM L':'
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* !Py_OSDEFS_H */