Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 1 | #ifndef Py_OSDEFS_H |
| 2 | #define Py_OSDEFS_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 7 | |
| 8 | /* Operating system dependencies */ |
| 9 | |
| 10 | #ifdef macintosh |
| 11 | #define SEP ':' |
| 12 | #define MAXPATHLEN 256 |
Jack Jansen | 234fd7e | 1994-12-14 12:57:12 +0000 | [diff] [blame] | 13 | /* Mod by Jack: newline is less likely to occur in filenames than space */ |
| 14 | #define DELIM '\n' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 15 | #endif |
| 16 | |
Guido van Rossum | 7bf22de | 1997-12-02 20:34:19 +0000 | [diff] [blame] | 17 | /* Mod by chrish: QNX has WATCOM, but isn't DOS */ |
| 18 | #if !defined(__QNX__) |
Guido van Rossum | 60aff2c | 1997-12-05 21:39:25 +0000 | [diff] [blame] | 19 | #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2) |
Andrew MacIntyre | 5e090fc | 2002-02-26 11:20:01 +0000 | [diff] [blame] | 20 | #if defined(PYOS_OS2) && defined(PYCC_GCC) |
| 21 | #define MAXPATHLEN 260 |
| 22 | #define SEP '/' |
| 23 | #define ALTSEP '\\' |
| 24 | #else |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 25 | #define SEP '\\' |
Guido van Rossum | c8ce571 | 1996-09-11 20:20:58 +0000 | [diff] [blame] | 26 | #define ALTSEP '/' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 27 | #define MAXPATHLEN 256 |
Andrew MacIntyre | 5e090fc | 2002-02-26 11:20:01 +0000 | [diff] [blame] | 28 | #endif |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 29 | #define DELIM ';' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 30 | #endif |
Guido van Rossum | 7bf22de | 1997-12-02 20:34:19 +0000 | [diff] [blame] | 31 | #endif |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 32 | |
Guido van Rossum | f0ee4b2 | 2001-03-02 06:10:17 +0000 | [diff] [blame] | 33 | #ifdef RISCOS |
| 34 | #define SEP '.' |
| 35 | #define MAXPATHLEN 256 |
| 36 | #define DELIM ',' |
| 37 | #endif |
| 38 | |
| 39 | |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 40 | /* Filename separator */ |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 41 | #ifndef SEP |
| 42 | #define SEP '/' |
| 43 | #endif |
| 44 | |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 45 | /* Max pathname length */ |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 46 | #ifndef MAXPATHLEN |
| 47 | #define MAXPATHLEN 1024 |
| 48 | #endif |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 49 | |
| 50 | /* Search path entry delimiter */ |
| 51 | #ifndef DELIM |
| 52 | #define DELIM ':' |
| 53 | #endif |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 54 | |
| 55 | #ifdef __cplusplus |
| 56 | } |
| 57 | #endif |
| 58 | #endif /* !Py_OSDEFS_H */ |