• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Operating system dependencies.
2 //
3 // Define constants:
4 //
5 // - ALTSEP
6 // - DELIM
7 // - MAXPATHLEN
8 // - SEP
9 
10 #ifndef Py_OSDEFS_H
11 #define Py_OSDEFS_H
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #ifdef MS_WINDOWS
17 #  define SEP L'\\'
18 #  define ALTSEP L'/'
19 #  define MAXPATHLEN 256
20 #  define DELIM L';'
21 #endif
22 
23 #ifdef __VXWORKS__
24 #  define DELIM L';'
25 #endif
26 
27 /* Filename separator */
28 #ifndef SEP
29 #  define SEP L'/'
30 #endif
31 
32 /* Max pathname length */
33 #ifdef __hpux
34 #  include <sys/param.h>
35 #  include <limits.h>
36 #  ifndef PATH_MAX
37 #    define PATH_MAX MAXPATHLEN
38 #  endif
39 #endif
40 
41 #ifndef MAXPATHLEN
42 #  if defined(PATH_MAX) && PATH_MAX > 1024
43 #    define MAXPATHLEN PATH_MAX
44 #  else
45 #    define MAXPATHLEN 1024
46 #  endif
47 #endif
48 
49 /* Search path entry delimiter */
50 #ifndef DELIM
51 #  define DELIM L':'
52 #endif
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 #endif   // !Py_OSDEFS_H
58