osdefs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef Py_OSDEFS_H
  2. #define Py_OSDEFS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* Operating system dependencies */
  7. /* Mod by chrish: QNX has WATCOM, but isn't DOS */
  8. #if !defined(__QNX__)
  9. #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
  10. #if defined(PYOS_OS2) && defined(PYCC_GCC)
  11. #define MAXPATHLEN 260
  12. #define SEP '/'
  13. #define ALTSEP '\\'
  14. #else
  15. #define SEP '\\'
  16. #define ALTSEP '/'
  17. #define MAXPATHLEN 256
  18. #endif
  19. #define DELIM ';'
  20. #endif
  21. #endif
  22. #ifdef RISCOS
  23. #define SEP '.'
  24. #define MAXPATHLEN 256
  25. #define DELIM ','
  26. #endif
  27. /* Filename separator */
  28. #ifndef SEP
  29. #define SEP '/'
  30. #endif
  31. /* Max pathname length */
  32. #ifdef __hpux
  33. #include <sys/param.h>
  34. #include <limits.h>
  35. #ifndef PATH_MAX
  36. #define PATH_MAX MAXPATHLEN
  37. #endif
  38. #endif
  39. #ifndef MAXPATHLEN
  40. #if defined(PATH_MAX) && PATH_MAX > 1024
  41. #define MAXPATHLEN PATH_MAX
  42. #else
  43. #define MAXPATHLEN 1024
  44. #endif
  45. #endif
  46. /* Search path entry delimiter */
  47. #ifndef DELIM
  48. #define DELIM ':'
  49. #endif
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* !Py_OSDEFS_H */