osdefs.h 862 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
/* Filename separator */
Guido van Rossum's avatar
Guido van Rossum committed
27 28 29 30
#ifndef SEP
#define SEP '/'
#endif

31
/* Max pathname length */
Guido van Rossum's avatar
Guido van Rossum committed
32
#ifndef MAXPATHLEN
33 34 35
#if defined(PATH_MAX) && PATH_MAX > 1024
#define MAXPATHLEN PATH_MAX
#else
Guido van Rossum's avatar
Guido van Rossum committed
36 37
#define MAXPATHLEN 1024
#endif
38
#endif
39 40 41 42 43

/* Search path entry delimiter */
#ifndef DELIM
#define DELIM ':'
#endif
44 45 46 47 48

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