diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-03 18:54:12 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-03 18:54:12 +0000 |
commit | 41b152c5f6ec3a5a6e51b4f8f0f90291a5895edc (patch) | |
tree | db28131d5929a4805654a802b64cc0d980b9559e /AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h | |
parent | 58081f2c64fbc2f89ac5a9b47b2643c280bc8f99 (diff) | |
download | edk2-platforms-41b152c5f6ec3a5a6e51b4f8f0f90291a5895edc.tar.xz |
StdLib: Improve robustness of stat() and make basename() a public function.
AppPkg: Refinements to pyconfig.h and port of getpath.c to EDK II.
Signed-off-by: darylm503
Reviewed-by: geekboy15a
Reviewed-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12508 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h')
-rw-r--r-- | AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h b/AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h new file mode 100644 index 0000000000..4d25a8faa2 --- /dev/null +++ b/AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h @@ -0,0 +1,70 @@ +/** @file
+ Operating system dependencies.
+
+ Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
+#ifndef Py_OSDEFS_H
+#define Py_OSDEFS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Mod by chrish: QNX has WATCOM, but isn't DOS */
+#if !defined(__QNX__) && !defined(EFIAPI)
+#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
+#if defined(PYOS_OS2) && defined(PYCC_GCC)
+#define MAXPATHLEN 260
+#define SEP '/'
+#define ALTSEP '\\'
+#else
+#define SEP '\\'
+#define ALTSEP '/'
+#define MAXPATHLEN 256
+#endif
+#define DELIM ';'
+#endif
+#endif
+
+#ifdef RISCOS
+#define SEP '.'
+#define MAXPATHLEN 256
+#define DELIM ','
+#endif
+
+
+/* Filename separator */
+#ifndef SEP
+#define SEP '/'
+#define ALTSEP '\\'
+#endif
+
+/* Max pathname length */
+#ifndef MAXPATHLEN
+#if defined(PATH_MAX) && PATH_MAX > 1024
+#define MAXPATHLEN PATH_MAX
+#else
+#define MAXPATHLEN 1024
+#endif
+#endif
+
+/* Search path entry delimiter */
+#ifndef DELIM
+ #ifdef EFIAPI
+ #define DELIM ';'
+ #else
+ #define DELIM ':'
+ #endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OSDEFS_H */
|