/PC/os2vacpp/pyconfig.h

http://unladen-swallow.googlecode.com/ · C++ Header · 213 lines · 83 code · 28 blank · 102 comment · 0 complexity · 4943a7a36051d6afdcbd38ee13c24b80 MD5 · raw file

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