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 | |||||
Victor Stinner | b71c7dc | 2014-10-10 11:55:41 +0200 | [diff] [blame] | 10 | #ifdef MS_WINDOWS |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 11 | #define SEP L'\\' |
12 | #define ALTSEP L'/' | ||||
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 13 | #define MAXPATHLEN 256 |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 14 | #define DELIM L';' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 15 | #endif |
16 | |||||
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 17 | #ifdef __VXWORKS__ |
18 | #define DELIM L';' | ||||
19 | #endif | ||||
20 | |||||
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 21 | /* Filename separator */ |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 22 | #ifndef SEP |
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 23 | #define SEP L'/' |
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 24 | #endif |
25 | |||||
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 26 | /* Max pathname length */ |
Stefan Krah | 6df5cae | 2012-11-12 20:14:36 +0100 | [diff] [blame] | 27 | #ifdef __hpux |
28 | #include <sys/param.h> | ||||
29 | #include <limits.h> | ||||
30 | #ifndef PATH_MAX | ||||
31 | #define PATH_MAX MAXPATHLEN | ||||
32 | #endif | ||||
33 | #endif | ||||
34 | |||||
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 35 | #ifndef MAXPATHLEN |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 |
37 | #define MAXPATHLEN PATH_MAX | ||||
38 | #else | ||||
Guido van Rossum | 355a33d | 1992-02-26 15:19:31 +0000 | [diff] [blame] | 39 | #define MAXPATHLEN 1024 |
40 | #endif | ||||
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 41 | #endif |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 42 | |
43 | /* Search path entry delimiter */ | ||||
44 | #ifndef DELIM | ||||
Martin v. Löwis | 790465f | 2008-04-05 20:41:37 +0000 | [diff] [blame] | 45 | #define DELIM L':' |
Guido van Rossum | 9b9ccd3 | 1992-03-23 18:20:32 +0000 | [diff] [blame] | 46 | #endif |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 47 | |
48 | #ifdef __cplusplus | ||||
49 | } | ||||
50 | #endif | ||||
51 | #endif /* !Py_OSDEFS_H */ |