]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Include/osdefs.h
AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 5/5.
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / PyMod-2.7.10 / Include / osdefs.h
1 /** @file
2 Operating system dependencies.
3
4 Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>
5 Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 **/
14
15 #ifndef Py_OSDEFS_H
16 #define Py_OSDEFS_H
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21
22 /* Mod by chrish: QNX has WATCOM, but isn't DOS */
23 #if !defined(__QNX__) && !defined(UEFI_C_SOURCE)
24 #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
25 #if defined(PYOS_OS2) && defined(PYCC_GCC)
26 #define MAXPATHLEN 260
27 #define SEP '/'
28 #define ALTSEP '\\'
29 #else
30 #define SEP '\\'
31 #define ALTSEP '/'
32 #define MAXPATHLEN 256
33 #endif
34 #define DELIM ';'
35 #endif
36 #endif
37
38 #ifdef RISCOS
39 #define SEP '.'
40 #define MAXPATHLEN 256
41 #define DELIM ','
42 #endif
43
44
45 /* Filename separator */
46 #ifndef SEP
47 #define SEP '/'
48 #define ALTSEP '\\'
49 #endif
50
51 /* Max pathname length */
52 #ifdef __hpux
53 # include <sys/param.h>
54 # include <limits.h>
55 # ifndef PATH_MAX
56 # define PATH_MAX MAXPATHLEN
57 # endif
58 #endif
59
60 #ifndef MAXPATHLEN
61 #if defined(PATH_MAX) && PATH_MAX > 1024
62 #define MAXPATHLEN PATH_MAX
63 #else
64 #define MAXPATHLEN 1024
65 #endif
66 #endif
67
68 /* Search path entry delimiter */
69 #ifndef DELIM
70 # ifdef UEFI_C_SOURCE
71 # define DELIM ';'
72 # define DELIM_STR ";"
73 # else
74 # define DELIM ':'
75 # endif
76 #endif
77
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif /* !Py_OSDEFS_H */