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 | |||||
Guido van Rossum | 7bf22de | 1997-12-02 20:34:19 +0000 | [diff] [blame] | 10 | /* Mod by chrish: QNX has WATCOM, but isn't DOS */ |
11 | #if !defined(__QNX__) | ||||
Guido van Rossum | 60aff2c | 1997-12-05 21:39:25 +0000 | [diff] [blame] | 12 | #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] | 13 | #if defined(PYOS_OS2) && defined(PYCC_GCC) |
14 | #define MAXPATHLEN 260 | ||||
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 15 | #define SEP L'/' |
16 | #define ALTSEP L'\\' | ||||
Andrew MacIntyre | 5e090fc | 2002-02-26 11:20:01 +0000 | [diff] [blame] | 17 | #else |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 18 | #define SEP L'\\' |
19 | #define ALTSEP L'/' | ||||
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 20 | #define MAXPATHLEN 256 |
Andrew MacIntyre | 5e090fc | 2002-02-26 11:20:01 +0000 | [diff] [blame] | 21 | #endif |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 22 | #define DELIM L';' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 23 | #endif |
Guido van Rossum | 7bf22de | 1997-12-02 20:34:19 +0000 | [diff] [blame] | 24 | #endif |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 25 | |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 26 | /* Filename separator */ |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 27 | #ifndef SEP |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 28 | #define SEP L'/' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 29 | #endif |
30 | |||||
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 31 | /* Max pathname length */ |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 32 | #ifndef MAXPATHLEN |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 33 | #if defined(PATH_MAX) && PATH_MAX > 1024 |
34 | #define MAXPATHLEN PATH_MAX | ||||
35 | #else | ||||
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 36 | #define MAXPATHLEN 1024 |
37 | #endif | ||||
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 38 | #endif |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 39 | |
40 | /* Search path entry delimiter */ | ||||
41 | #ifndef DELIM | ||||
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 42 | #define DELIM L':' |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 43 | #endif |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 44 | |
45 | #ifdef __cplusplus | ||||
46 | } | ||||
47 | #endif | ||||
48 | #endif /* !Py_OSDEFS_H */ |