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