blob: 90b430a635b76a4ed9319afbb6968f4eb132374d [file] [log] [blame]
Guido van Rossuma3309961993-07-28 09:05:47 +00001#ifndef Py_OSDEFS_H
2#define Py_OSDEFS_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Guido van Rossum355a33d1992-02-26 15:19:31 +00007
8/* Operating system dependencies */
9
Guido van Rossum7bf22de1997-12-02 20:34:19 +000010/* Mod by chrish: QNX has WATCOM, but isn't DOS */
11#if !defined(__QNX__)
Guido van Rossum60aff2c1997-12-05 21:39:25 +000012#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
Andrew MacIntyre5e090fc2002-02-26 11:20:01 +000013#if defined(PYOS_OS2) && defined(PYCC_GCC)
14#define MAXPATHLEN 260
Martin v. Löwis790465f2008-04-05 20:41:37 +000015#define SEP L'/'
16#define ALTSEP L'\\'
Andrew MacIntyre5e090fc2002-02-26 11:20:01 +000017#else
Martin v. Löwis790465f2008-04-05 20:41:37 +000018#define SEP L'\\'
19#define ALTSEP L'/'
Guido van Rossum355a33d1992-02-26 15:19:31 +000020#define MAXPATHLEN 256
Andrew MacIntyre5e090fc2002-02-26 11:20:01 +000021#endif
Martin v. Löwis790465f2008-04-05 20:41:37 +000022#define DELIM L';'
Guido van Rossum355a33d1992-02-26 15:19:31 +000023#endif
Guido van Rossum7bf22de1997-12-02 20:34:19 +000024#endif
Guido van Rossum355a33d1992-02-26 15:19:31 +000025
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000026/* Filename separator */
Guido van Rossum355a33d1992-02-26 15:19:31 +000027#ifndef SEP
Martin v. Löwis790465f2008-04-05 20:41:37 +000028#define SEP L'/'
Guido van Rossum355a33d1992-02-26 15:19:31 +000029#endif
30
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000031/* Max pathname length */
Guido van Rossum355a33d1992-02-26 15:19:31 +000032#ifndef MAXPATHLEN
Thomas Wouters477c8d52006-05-27 19:21:47 +000033#if defined(PATH_MAX) && PATH_MAX > 1024
34#define MAXPATHLEN PATH_MAX
35#else
Guido van Rossum355a33d1992-02-26 15:19:31 +000036#define MAXPATHLEN 1024
37#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000038#endif
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000039
40/* Search path entry delimiter */
41#ifndef DELIM
Martin v. Löwis790465f2008-04-05 20:41:37 +000042#define DELIM L':'
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000043#endif
Guido van Rossuma3309961993-07-28 09:05:47 +000044
45#ifdef __cplusplus
46}
47#endif
48#endif /* !Py_OSDEFS_H */