osdefs.h 942 Bytes
Newer Older
1 2 3 4 5 6
#ifndef Py_OSDEFS_H
#define Py_OSDEFS_H
#ifdef __cplusplus
extern "C" {
#endif

Guido van Rossum's avatar
Guido van Rossum committed
7 8 9

/* Operating system dependencies */

10 11
/* Mod by chrish: QNX has WATCOM, but isn't DOS */
#if !defined(__QNX__)
12
#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
13 14 15 16 17
#if defined(PYOS_OS2) && defined(PYCC_GCC)
#define MAXPATHLEN 260
#define SEP '/'
#define ALTSEP '\\'
#else
Guido van Rossum's avatar
Guido van Rossum committed
18
#define SEP '\\'
19
#define ALTSEP '/'
Guido van Rossum's avatar
Guido van Rossum committed
20
#define MAXPATHLEN 256
21
#endif
22
#define DELIM ';'
Guido van Rossum's avatar
Guido van Rossum committed
23
#endif
24
#endif
Guido van Rossum's avatar
Guido van Rossum committed
25

26 27 28 29 30 31 32
#ifdef RISCOS
#define SEP '.'
#define MAXPATHLEN 256
#define DELIM ','
#endif


33
/* Filename separator */
Guido van Rossum's avatar
Guido van Rossum committed
34 35 36 37
#ifndef SEP
#define SEP '/'
#endif

38
/* Max pathname length */
Guido van Rossum's avatar
Guido van Rossum committed
39
#ifndef MAXPATHLEN
40 41 42
#if defined(PATH_MAX) && PATH_MAX > 1024
#define MAXPATHLEN PATH_MAX
#else
Guido van Rossum's avatar
Guido van Rossum committed
43 44
#define MAXPATHLEN 1024
#endif
45
#endif
46 47 48 49 50

/* Search path entry delimiter */
#ifndef DELIM
#define DELIM ':'
#endif
51 52 53 54 55

#ifdef __cplusplus
}
#endif
#endif /* !Py_OSDEFS_H */