| OLD | NEW |
| 1 | 1 |
| 2 /* POSIX module implementation */ | 2 /* POSIX module implementation */ |
| 3 | 3 |
| 4 /* This file is also used for Windows NT/MS-Win and OS/2. In that case the | 4 /* This file is also used for Windows NT/MS-Win and OS/2. In that case the |
| 5 module actually calls itself 'nt' or 'os2', not 'posix', and a few | 5 module actually calls itself 'nt' or 'os2', not 'posix', and a few |
| 6 functions are either unimplemented or implemented differently. The source | 6 functions are either unimplemented or implemented differently. The source |
| 7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent | 7 assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent |
| 8 of the compiler used. Different compilers define their own feature | 8 of the compiler used. Different compilers define their own feature |
| 9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler | 9 test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler |
| 10 independent macro PYOS_OS2 should be defined. On OS/2 the default | 10 independent macro PYOS_OS2 should be defined. On OS/2 the default |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 # pragma weak statvfs | 23 # pragma weak statvfs |
| 24 # pragma weak fstatvfs | 24 # pragma weak fstatvfs |
| 25 | 25 |
| 26 #endif /* __APPLE__ */ | 26 #endif /* __APPLE__ */ |
| 27 | 27 |
| 28 #define PY_SSIZE_T_CLEAN | 28 #define PY_SSIZE_T_CLEAN |
| 29 | 29 |
| 30 #include "Python.h" | 30 #include "Python.h" |
| 31 | 31 |
| 32 #if defined(__VMS) | 32 #if defined(__VMS) |
| 33 # error "VMS is now unsupported, and code will be removed in Python 3.4" |
| 33 # include <unixio.h> | 34 # include <unixio.h> |
| 34 #endif /* defined(__VMS) */ | 35 #endif /* defined(__VMS) */ |
| 35 | 36 |
| 36 #ifdef __cplusplus | 37 #ifdef __cplusplus |
| 37 extern "C" { | 38 extern "C" { |
| 38 #endif | 39 #endif |
| 39 | 40 |
| 40 PyDoc_STRVAR(posix__doc__, | 41 PyDoc_STRVAR(posix__doc__, |
| 41 "This module provides access to operating system functionality that is\n\ | 42 "This module provides access to operating system functionality that is\n\ |
| 42 standardized by the C Standard and the POSIX standard (a thinly\n\ | 43 standardized by the C Standard and the POSIX standard (a thinly\n\ |
| 43 disguised Unix interface). Refer to the library manual and\n\ | 44 disguised Unix interface). Refer to the library manual and\n\ |
| 44 corresponding Unix manual entries for more information on calls."); | 45 corresponding Unix manual entries for more information on calls."); |
| 45 | 46 |
| 46 | 47 |
| 47 #if defined(PYOS_OS2) | 48 #if defined(PYOS_OS2) |
| 49 #error "OS/2 is now unsupported, and code will be removed in Python 3.4" |
| 48 #define INCL_DOS | 50 #define INCL_DOS |
| 49 #define INCL_DOSERRORS | 51 #define INCL_DOSERRORS |
| 50 #define INCL_DOSPROCESS | 52 #define INCL_DOSPROCESS |
| 51 #define INCL_NOPMAPI | 53 #define INCL_NOPMAPI |
| 52 #include <os2.h> | 54 #include <os2.h> |
| 53 #if defined(PYCC_GCC) | 55 #if defined(PYCC_GCC) |
| 54 #include <ctype.h> | 56 #include <ctype.h> |
| 55 #include <io.h> | 57 #include <io.h> |
| 56 #include <stdio.h> | 58 #include <stdio.h> |
| 57 #include <process.h> | 59 #include <process.h> |
| (...skipping 10107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10165 | 10167 |
| 10166 | 10168 |
| 10167 #endif /* __APPLE__ */ | 10169 #endif /* __APPLE__ */ |
| 10168 return m; | 10170 return m; |
| 10169 | 10171 |
| 10170 } | 10172 } |
| 10171 | 10173 |
| 10172 #ifdef __cplusplus | 10174 #ifdef __cplusplus |
| 10173 } | 10175 } |
| 10174 #endif | 10176 #endif |
| OLD | NEW |