osdefs.h 691 B

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