Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 1 | #ifndef Py_CONFIG_H |
| 2 | #define Py_CONFIG_H |
| 3 | |
| 4 | /********************************************************************** |
Tim Peters | 76f373d | 2001-07-26 21:34:59 +0000 | [diff] [blame] | 5 | * pyconfig.h. NOT Generated automatically by configure. |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 6 | * |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 7 | * This is a manually maintained version used for the IBM VisualAge |
| 8 | * C/C++ compiler on the OS/2 platform. It is a standard part of |
| 9 | * the Python distribution. |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 10 | * |
| 11 | * FILESYSTEM DEFINES: |
| 12 | * The code specific to a particular way of naming files and |
| 13 | * directory paths should be wrapped around one of the following |
| 14 | * #defines: |
| 15 | * |
| 16 | * DOSFILESYS PCDOS-Style (for PCDOS, Windows and OS/2) |
| 17 | * MACFILESYS Macintosh-Style |
| 18 | * UNIXFILESYS Unix-Style |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 19 | * AMIGAFILESYS AmigaDOS-Style |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 20 | * |
| 21 | * Because of the different compilers and operating systems in |
| 22 | * use on the Intel platform, neither the compiler name nor |
| 23 | * the operating system name is sufficient. |
| 24 | * |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 25 | * OS/2 DEFINES: |
| 26 | * The code specific to OS/2's Program API should be wrapped around |
| 27 | * |
| 28 | * __TOS_OS2__ Target Operating System, OS/2 |
| 29 | * |
| 30 | * Any code specific to the compiler itself should be wrapped with |
| 31 | * |
| 32 | * __IBMC__ IBM C Compiler |
| 33 | * __IBMCPP__ IBM C++ Compiler |
| 34 | * |
| 35 | * Note that since the VisualAge C/C++ compiler is also available |
| 36 | * for the Windows platform, it may be necessary to use both a |
| 37 | * __TOS_OS2__ and a __IBMC__ to select a very specific environment. |
| 38 | * |
| 39 | **********************************************************************/ |
| 40 | |
| 41 | /* |
| 42 | * Some systems require special declarations for data items imported |
| 43 | * or exported from dynamic link libraries. Note that the definition |
| 44 | * of DL_IMPORT covers both cases. Define USE_DL_IMPORT for the client |
| 45 | * of a DLL. Define USE_DL_EXPORT when making a DLL. |
| 46 | */ |
| 47 | |
| 48 | #include <io.h> |
| 49 | |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 50 | /* Configuration Options for Finding Modules */ |
| 51 | #define PREFIX "" |
| 52 | #define EXEC_PREFIX "" |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 53 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 54 | /* Provide a default library so writers of extension modules |
| 55 | * won't have to explicitly specify it anymore |
| 56 | */ |
Andrew MacIntyre | da4d6cb | 2004-03-29 11:53:38 +0000 | [diff] [blame] | 57 | #pragma library("Python24.lib") |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 58 | |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 59 | /***************************************************/ |
| 60 | /* 32-Bit IBM VisualAge C/C++ v3.0 for OS/2 */ |
| 61 | /* (Convert Compiler Flags into Useful Switches) */ |
| 62 | /***************************************************/ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 63 | #define PLATFORM "os2" |
| 64 | #define COMPILER "[VisualAge C/C++]" |
| 65 | #define PYOS_OS2 /* Define Indicator of Operating System */ |
| 66 | #define PYCC_VACPP /* Define Indicator of C Compiler */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 67 | |
| 68 | /* Platform Filesystem */ |
Georg Brandl | 6e47a33 | 2008-05-17 19:15:58 +0000 | [diff] [blame] | 69 | #define PYTHONPATH ".;.\\lib;.\\lib\\plat-win" |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 70 | #define DOSFILESYS /* OS/2 Uses the DOS File Naming Conventions */ |
| 71 | /* #define IMPORT_8x3_NAMES (let's move up to long filenames) */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 72 | |
| 73 | /* Platform CPU-Mode Dependencies */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 74 | #define WORD_BIT 32 /* OS/2 is a 32-Bit Operating System */ |
| 75 | #define LONG_BIT 32 |
| 76 | #define SIZEOF_INT 4 /* Count of Bytes in an (int) */ |
| 77 | #define SIZEOF_LONG 4 /* Count of Bytes in a (long) */ |
| 78 | #define SIZEOF_VOID_P 4 /* Count of Bytes in a (void *) */ |
| 79 | /* #define HAVE_LONG_LONG 1 */ /* VAC++ does not support (long long) */ |
| 80 | /* #define SIZEOF_LONG_LONG 8 */ /* Count of Bytes in a (long long) */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 81 | |
Tim Peters | 603c683 | 2001-11-05 02:45:59 +0000 | [diff] [blame] | 82 | /* unicode definines */ |
Tim Peters | 603c683 | 2001-11-05 02:45:59 +0000 | [diff] [blame] | 83 | #define PY_UNICODE_TYPE wchar_t |
| 84 | #define Py_UNICODE_SIZE SIZEOF_SHORT |
| 85 | |
| 86 | /* dynamic loading */ |
| 87 | #define HAVE_DYNAMIC_LOADING 1 |
| 88 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 89 | /* Define if type char is unsigned and you are not using gcc. */ |
| 90 | #ifndef __CHAR_UNSIGNED__ |
| 91 | /* #undef __CHAR_UNSIGNED__ */ |
| 92 | #endif |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 93 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 94 | typedef int mode_t; |
| 95 | typedef int uid_t; |
| 96 | typedef int gid_t; |
| 97 | typedef int pid_t; |
| 98 | |
| 99 | #if defined(__MULTI__) /* If Compiler /Gt+ Multithread Option Enabled, */ |
| 100 | #define WITH_THREAD 1 /* Enable Threading Throughout Python */ |
| 101 | #define OS2_THREADS 1 /* And Use the OS/2 Flavor of Threads */ |
| 102 | /* #define _REENTRANT 1 */ /* Use thread-safe errno, h_errno, and other fns */ |
| 103 | #endif |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 104 | |
| 105 | /* Compiler Runtime Library Capabilities */ |
| 106 | #include <ctype.h> |
| 107 | #include <direct.h> |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 108 | /* #undef BAD_STATIC_FORWARD */ /* if compiler botches static fwd decls */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 109 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 110 | #define STDC_HEADERS 1 /* VAC++ is an ANSI C Compiler */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 111 | #define HAVE_HYPOT 1 /* hypot() */ |
| 112 | #define HAVE_PUTENV 1 /* putenv() */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 113 | /* #define VA_LIST_IS_ARRAY 1 */ /* if va_list is an array of some kind */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 114 | /* #define HAVE_CONIO_H 1 */ /* #include <conio.h> */ |
| 115 | #define HAVE_ERRNO_H 1 /* #include <errno.h> */ |
| 116 | #define HAVE_SYS_STAT_H 1 /* #include <sys/stat.h> */ |
| 117 | #define HAVE_SYS_TYPES_H 1 /* #include <sys/types.h> */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 118 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 119 | /* Variable-Arguments/Prototypes */ |
| 120 | #define HAVE_PROTOTYPES 1 /* VAC++ supports C Function Prototypes */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 121 | #define HAVE_STDARG_PROTOTYPES 1 /* Our <stdarg.h> has prototypes */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 122 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 123 | /* String/Memory/Locale Operations */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 124 | #define HAVE_MEMMOVE 1 /* memmove() */ |
| 125 | #define HAVE_STRERROR 1 /* strerror() */ |
| 126 | #define HAVE_SETLOCALE 1 /* setlocale() */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 127 | #define MALLOC_ZERO_RETURNS_NULL 1 /* Our malloc(0) returns a NULL ptr */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 128 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 129 | /* Signal Handling */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 130 | #define HAVE_SIGNAL_H 1 /* signal.h */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 131 | #define RETSIGTYPE void /* Return type of handlers (int or void) */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 132 | /* #undef WANT_SIGFPE_HANDLER */ /* Handle SIGFPE (see Include/pyfpe.h) */ |
| 133 | /* #define HAVE_ALARM 1 */ /* alarm() */ |
| 134 | /* #define HAVE_SIGINTERRUPT 1 */ /* siginterrupt() */ |
| 135 | /* #define HAVE_SIGRELSE 1 */ /* sigrelse() */ |
| 136 | #define DONT_HAVE_SIG_ALARM 1 |
| 137 | #define DONT_HAVE_SIG_PAUSE 1 |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 138 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 139 | /* Clock/Time Support */ |
| 140 | #define HAVE_FTIME 1 /* We have ftime() in <sys/timeb.h> */ |
| 141 | #define HAVE_CLOCK 1 /* clock() */ |
| 142 | #define HAVE_STRFTIME 1 /* strftime() */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 143 | #define HAVE_MKTIME 1 /* mktime() */ |
| 144 | #define HAVE_TZNAME 1 /* No tm_zone but do have tzname[] */ |
| 145 | #define HAVE_TIMES 1 /* #include <sys/times.h> */ |
| 146 | #define HAVE_SYS_UTIME_H 1 /* #include <sys/utime.h> */ |
| 147 | /* #define HAVE_UTIME_H 1 */ /* #include <utime.h> */ |
| 148 | #define HAVE_SYS_TIME_H 1 /* #include <sys/time.h> */ |
| 149 | /* #define TM_IN_SYS_TIME 1 */ /* <sys/time.h> declares struct tm */ |
| 150 | #define HAVE_GETTIMEOFDAY 1 /* gettimeofday() */ |
| 151 | /* #define GETTIMEOFDAY_NO_TZ 1 */ /* gettimeofday() does not have 2nd arg */ |
| 152 | /* #define HAVE_TIMEGM 1 */ /* timegm() */ |
| 153 | #define TIME_WITH_SYS_TIME 1 /* Mix <sys/time.h> and <time.h> */ |
| 154 | #define SYS_SELECT_WITH_SYS_TIME 1 /* Mix <sys/select.h> and <sys/time.h> */ |
| 155 | /* #define HAVE_ALTZONE 1 */ /* if <time.h> defines altzone */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 156 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 157 | /* Network/Sockets Support */ |
| 158 | #define HAVE_SYS_SELECT_H 1 /* #include <sys/select.h> */ |
| 159 | #define BSD_SELECT 1 /* Use BSD versus OS/2 form of select() */ |
| 160 | #define HAVE_SELECT 1 /* select() */ |
| 161 | #define HAVE_GETPEERNAME 1 /* getpeername() */ |
| 162 | /* #undef HAVE_GETHOSTNAME_R 1 */ /* gethostname_r() */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 163 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 164 | /* File I/O */ |
| 165 | #define HAVE_DUP2 1 /* dup2() */ |
| 166 | #define HAVE_EXECV 1 /* execv() */ |
| 167 | #define HAVE_SETVBUF 1 /* setvbuf() */ |
| 168 | #define HAVE_GETCWD 1 /* getcwd() */ |
| 169 | #define HAVE_PIPE 1 /* pipe() [OS/2-specific code added] */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 170 | #define HAVE_IO_H 1 /* #include <io.h> */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 171 | #define HAVE_FCNTL_H 1 /* #include <fcntl.h> */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 172 | #define HAVE_DIRECT_H 1 /* #include <direct.h> */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 173 | /* #define HAVE_FLOCK 1 */ /* flock() */ |
| 174 | /* #define HAVE_TRUNCATE 1 */ /* truncate() */ |
| 175 | /* #define HAVE_FTRUNCATE 1 */ /* ftruncate() */ |
| 176 | /* #define HAVE_LSTAT 1 */ /* lstat() */ |
| 177 | /* #define HAVE_DIRENT_H 1 */ /* #include <dirent.h> */ |
| 178 | /* #define HAVE_OPENDIR 1 */ /* opendir() */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 179 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 180 | /* Process Operations */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 181 | #define HAVE_PROCESS_H 1 /* #include <process.h> */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 182 | #define HAVE_GETPID 1 /* getpid() */ |
| 183 | #define HAVE_SYSTEM 1 /* system() */ |
| 184 | #define HAVE_WAIT 1 /* wait() */ |
| 185 | #define HAVE_KILL 1 /* kill() [OS/2-specific code added] */ |
| 186 | #define HAVE_POPEN 1 /* popen() [OS/2-specific code added] */ |
| 187 | /* #define HAVE_GETPPID 1 */ /* getppid() */ |
| 188 | /* #define HAVE_WAITPID 1 */ /* waitpid() */ |
| 189 | /* #define HAVE_FORK 1 */ /* fork() */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 190 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 191 | /* User/Group ID Queries */ |
| 192 | /* #define HAVE_GETEGID 1 */ |
| 193 | /* #define HAVE_GETEUID 1 */ |
| 194 | /* #define HAVE_GETGID 1 */ |
| 195 | /* #define HAVE_GETUID 1 */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 196 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 197 | /* Unix-Specific */ |
Tim Peters | 603c683 | 2001-11-05 02:45:59 +0000 | [diff] [blame] | 198 | /* #define HAVE_SYS_UN_H 1 /* #include <sys/un.h> */ |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 199 | /* #define HAVE_SYS_UTSNAME_H 1 */ /* #include <sys/utsname.h> */ |
| 200 | /* #define HAVE_SYS_WAIT_H 1 */ /* #include <sys/wait.h> */ |
| 201 | /* #define HAVE_UNISTD_H 1 */ /* #include <unistd.h> */ |
| 202 | /* #define HAVE_UNAME 1 */ /* uname () */ |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 203 | |
Martin v. Löwis | 2befa48 | 2002-06-09 13:41:37 +0000 | [diff] [blame] | 204 | /* Define if you want documentation strings in extension modules */ |
| 205 | #define WITH_DOC_STRINGS 1 |
| 206 | |
Guido van Rossum | e8afe51 | 1998-09-28 22:02:40 +0000 | [diff] [blame] | 207 | #ifdef USE_DL_EXPORT |
| 208 | #define DL_IMPORT(RTYPE) RTYPE _System |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 209 | #endif |
| 210 | |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 211 | #endif /* !Py_CONFIG_H */ |
| 212 | |