blob: 3243944a1483e95904b4d7d75d0e152ac00824e5 [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
pxinwr32f5fdd2019-02-27 19:09:28 +080017#ifdef __VXWORKS__
18#define DELIM L';'
19#endif
20
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000021/* Filename separator */
Guido van Rossum355a33d1992-02-26 15:19:31 +000022#ifndef SEP
Martin v. Löwis790465f2008-04-05 20:41:37 +000023#define SEP L'/'
Guido van Rossum355a33d1992-02-26 15:19:31 +000024#endif
25
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000026/* Max pathname length */
Stefan Krah6df5cae2012-11-12 20:14:36 +010027#ifdef __hpux
28#include <sys/param.h>
29#include <limits.h>
30#ifndef PATH_MAX
31#define PATH_MAX MAXPATHLEN
32#endif
33#endif
34
Guido van Rossum355a33d1992-02-26 15:19:31 +000035#ifndef MAXPATHLEN
Thomas Wouters477c8d52006-05-27 19:21:47 +000036#if defined(PATH_MAX) && PATH_MAX > 1024
37#define MAXPATHLEN PATH_MAX
38#else
Guido van Rossum355a33d1992-02-26 15:19:31 +000039#define MAXPATHLEN 1024
40#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000041#endif
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000042
43/* Search path entry delimiter */
44#ifndef DELIM
Martin v. Löwis790465f2008-04-05 20:41:37 +000045#define DELIM L':'
Guido van Rossum9b9ccd31992-03-23 18:20:32 +000046#endif
Guido van Rossuma3309961993-07-28 09:05:47 +000047
48#ifdef __cplusplus
49}
50#endif
51#endif /* !Py_OSDEFS_H */