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