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