blob: bd84c1c12c19fdc1d15d39432a7fc4e0decf2831 [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
Victor Stinnerb71c7dc2014-10-10 11:55:41 +020010#ifdef MS_WINDOWS
Martin v. Löwis790465f2008-04-05 20:41:37 +000011#define SEP L'\\'
12#define ALTSEP L'/'
Guido van Rossum355a33d1992-02-26 15:19:31 +000013#define MAXPATHLEN 256
Martin v. Löwis790465f2008-04-05 20:41:37 +000014#define DELIM L';'
Guido van Rossum355a33d1992-02-26 15:19:31 +000015#endif
16
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000017/* Filename separator */
Guido van Rossum355a33d1992-02-26 15:19:31 +000018#ifndef SEP
Martin v. Löwis790465f2008-04-05 20:41:37 +000019#define SEP L'/'
Guido van Rossum355a33d1992-02-26 15:19:31 +000020#endif
21
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000022/* Max pathname length */
Stefan Krah6df5cae2012-11-12 20:14:36 +010023#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 Rossum355a33d1992-02-26 15:19:31 +000031#ifndef MAXPATHLEN
Thomas Wouters477c8d52006-05-27 19:21:47 +000032#if defined(PATH_MAX) && PATH_MAX > 1024
33#define MAXPATHLEN PATH_MAX
34#else
Guido van Rossum355a33d1992-02-26 15:19:31 +000035#define MAXPATHLEN 1024
36#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000037#endif
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000038
39/* Search path entry delimiter */
40#ifndef DELIM
Martin v. Löwis790465f2008-04-05 20:41:37 +000041#define DELIM L':'
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000042#endif
Guido van Rossuma3309961993-07-28 09:05:47 +000043
44#ifdef __cplusplus
45}
46#endif
47#endif /* !Py_OSDEFS_H */