]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h
StdLib: Improve robustness of stat() and make basename() a public function.
[mirror_edk2.git] / AppPkg / Applications / Python / PyMod-2.7.2 / Include / osdefs.h
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 (file)
index 0000000..4d25a8f
--- /dev/null
@@ -0,0 +1,70 @@
+/** @file\r
+    Operating system dependencies.\r
+\r
+    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+#ifndef Py_OSDEFS_H\r
+#define Py_OSDEFS_H\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+\r
+/* Mod by chrish: QNX has WATCOM, but isn't DOS */\r
+#if !defined(__QNX__) && !defined(EFIAPI)\r
+#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)\r
+#if defined(PYOS_OS2) && defined(PYCC_GCC)\r
+#define MAXPATHLEN 260\r
+#define SEP '/'\r
+#define ALTSEP '\\'\r
+#else\r
+#define SEP '\\'\r
+#define ALTSEP '/'\r
+#define MAXPATHLEN 256\r
+#endif\r
+#define DELIM ';'\r
+#endif\r
+#endif\r
+\r
+#ifdef RISCOS\r
+#define SEP '.'\r
+#define MAXPATHLEN 256\r
+#define DELIM ','\r
+#endif\r
+\r
+\r
+/* Filename separator */\r
+#ifndef SEP\r
+#define SEP     '/'\r
+#define ALTSEP  '\\'\r
+#endif\r
+\r
+/* Max pathname length */\r
+#ifndef MAXPATHLEN\r
+#if defined(PATH_MAX) && PATH_MAX > 1024\r
+#define MAXPATHLEN PATH_MAX\r
+#else\r
+#define MAXPATHLEN 1024\r
+#endif\r
+#endif\r
+\r
+/* Search path entry delimiter */\r
+#ifndef DELIM\r
+  #ifdef  EFIAPI\r
+    #define DELIM   ';'\r
+  #else\r
+    #define DELIM   ':'\r
+  #endif\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif /* !Py_OSDEFS_H */\r