home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / PC / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  12.2 KB  |  470 lines

  1. #ifndef Py_CONFIG_H
  2. #define Py_CONFIG_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. /* config.h.  NOT Generated automatically by configure.
  8.  
  9. This is a manually maintained version used for the Watcom,
  10. Borland and and Microsoft Visual C++ compilers.  It is a
  11. standard part of the Python distribution.
  12.  
  13. WINDOWS DEFINES:
  14. The code specific to Windows should be wrapped around one of
  15. the following #defines
  16.  
  17. MS_WIN32 - Code specific to the MS Win32 API
  18. MS_WIN16 - Code specific to the old 16 bit Windows API.
  19. MS_WINDOWS - Code specific to Windows, but all versions.
  20. MS_COREDLL - Code if the Python core is built as a DLL.
  21.  
  22. Note that the old defines "NT" and "WIN32" are still supported, but
  23. will soon be dropped.
  24.  
  25. Also note that neither "_M_IX86" or "_MSC_VER" should be used for
  26. any purpose other than "Windows Intel x86 specific" and "Microsoft
  27. compiler specific".  Therefore, these should be very rare.
  28.  
  29. */
  30.  
  31. /*
  32.  Some systems require special declarations for data items imported
  33.  or exported from dynamic link libraries.  Note that the definition
  34.  of DL_IMPORT covers both cases.  Define USE_DL_IMPORT for the client
  35.  of a DLL.  Define USE_DL_EXPORT when making a DLL.
  36. */
  37.  
  38. #include <io.h>
  39. #define HAVE_LIMITS_H
  40. #define HAVE_HYPOT
  41. #define DONT_HAVE_SIG_ALARM
  42. #define DONT_HAVE_SIG_PAUSE
  43. #define LONG_BIT    32
  44. #define PREFIX ""
  45. #define EXEC_PREFIX ""
  46.  
  47. /* Microsoft C defines _MSC_VER */
  48.  
  49. #if defined(_MSC_VER) && _MSC_VER > 850
  50. /* Start of defines for MS_WIN32 using VC++ 2.0 and up */
  51. #define NT    /* NT is obsolete - please use MS_WIN32 instead */
  52. #define MS_WIN32
  53. #define MS_WINDOWS
  54.  
  55. /* For NT the Python core is in a DLL by default.  Test the
  56. standard macro MS_COREDLL to find out.  If you have an exception
  57. you must define MS_NO_COREDLL (do not test this macro) */
  58. #ifndef MS_NO_COREDLL
  59. #define MS_COREDLL    /* Python core is in a DLL */
  60. #define main Py_Main
  61. #ifndef USE_DL_EXPORT
  62. #define USE_DL_IMPORT
  63. #endif /* !USE_DL_EXPORT */
  64. #endif /* !MS_NO_COREDLL */
  65.  
  66. #ifdef _M_IX86
  67. #define COMPILER "[MSC 32 bit (Intel)]"
  68. #else
  69. #define COMPILER "[MSC (Unknown)]"
  70. #endif
  71. #define PYTHONPATH ".\\lib;.\\lib\\win"
  72. typedef int pid_t;
  73. #define WORD_BIT 32
  74. #pragma warning(disable:4113)
  75. #define hypot _hypot
  76. #include <stdio.h>
  77. #define HAVE_CLOCK
  78. #define HAVE_STRFTIME
  79. #define NT_THREADS
  80. #define WITH_THREAD
  81. #ifndef NETSCAPE_PI
  82. #define USE_SOCKET
  83. #endif
  84. #ifdef USE_DL_IMPORT
  85. #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
  86. #endif
  87. #ifdef USE_DL_EXPORT
  88. #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
  89. #endif
  90.  
  91. #endif /* _MSC_VER && > 850 */
  92.  
  93. #if defined(_MSC_VER) && _MSC_VER <= 850
  94. /* Start of defines for 16-bit Windows using VC++ 1.5 */
  95. #define COMPILER "[MSC 16-bit]"
  96. #define MS_WIN16
  97. #define MS_WINDOWS
  98. #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
  99. #define IMPORT_8x3_NAMES
  100. typedef int pid_t;
  101. #define WORD_BIT 16
  102. #pragma warning(disable:4113)
  103. #define memcpy memmove    /* memcpy dangerous pointer wrap in Win 3.1 */
  104. #define hypot _hypot
  105. #define SIGINT    2
  106. #include <stdio.h>
  107. /* Windows 3.1 will not tolerate any console io in a dll */
  108. #ifdef _USRDLL
  109. #include <time.h>
  110. #define stdin    ((FILE *)0)
  111. #define stdout    ((FILE *)1)
  112. #define stderr    ((FILE *)2)
  113. #define fflush    Py_fflush
  114. int Py_fflush(FILE *);
  115. #define fgets    Py_fgets
  116. char *Py_fgets(char *, int, FILE *);
  117. #define fileno    Py_fileno
  118. int Py_fileno(FILE *);
  119. #define fprintf    Py_fprintf
  120. int Py_fprintf(FILE *, const char *, ...);
  121. #define    printf    Py_printf
  122. int Py_printf(const char *, ...);
  123. #define sscanf    Py_sscanf
  124. int Py_sscanf(const char *, const char *, ...);
  125. clock_t clock();
  126. void _exit(int);
  127. void exit(int);
  128. int sscanf(const char *, const char *, ...);
  129. #endif /* _USRDLL */
  130. #ifndef NETSCAPE_PI
  131. /* use sockets, but not in a Netscape dll */
  132. #define USE_SOCKET
  133. #endif
  134. #endif /* MS_WIN16 */
  135.  
  136. /* The Watcom compiler defines __WATCOMC__ */
  137. #ifdef __WATCOMC__
  138. #define COMPILER "[Watcom]"
  139. #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
  140. #define IMPORT_8x3_NAMES
  141. #include <ctype.h>
  142. #include <direct.h>
  143. typedef int mode_t;
  144. typedef int uid_t;
  145. typedef int gid_t;
  146. typedef int pid_t;
  147. #if defined(__NT__)
  148. #define NT    /* NT is obsolete - please use MS_WIN32 instead */
  149. #define MS_WIN32
  150. #define MS_WINDOWS
  151. #define NT_THREADS
  152. #define USE_SOCKET
  153. #define WITH_THREAD
  154. #elif defined(__WINDOWS__)
  155. #define MS_WIN16
  156. #define MS_WINDOWS
  157. #endif
  158. #ifdef M_I386
  159. #define WORD_BIT 32
  160. #else
  161. #define WORD_BIT 16
  162. #endif
  163. #define VA_LIST_IS_ARRAY
  164. #define HAVE_CLOCK
  165. #define HAVE_STRFTIME
  166. #ifdef USE_DL_EXPORT
  167. #define DL_IMPORT(RTYPE) RTYPE __export
  168. #endif
  169. #endif /* __WATCOMC__ */
  170.  
  171. /* The Borland compiler defines __BORLANDC__ */
  172. /* XXX These defines are likely incomplete, but should be easy to fix. */
  173. #ifdef __BORLANDC__
  174. #define COMPILER "[Borland]"
  175. #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
  176. #define IMPORT_8x3_NAMES
  177. #define HAVE_CLOCK
  178. #define HAVE_STRFTIME
  179. #ifdef USE_DL_IMPORT
  180. #define DL_IMPORT(RTYPE)  RTYPE __import
  181. #endif
  182. #endif /* BORLANDC */
  183.  
  184. /* End of compilers - finish up */
  185.  
  186. #ifdef MS_WIN32
  187. #define PLATFORM "win32"
  188. #else
  189. #ifdef MS_WIN16
  190. #define PLATFORM "win16"
  191. #else
  192. #define PLATFORM "dos"
  193. #endif /* !MS_WIN16 */
  194. #endif /* !MS_WIN32 */
  195.  
  196. /* Fairly standard from here! */
  197.  
  198. /* Define if on AIX 3.
  199.    System headers sometimes define this.
  200.    We just want to avoid a redefinition error message.  */
  201. #ifndef _ALL_SOURCE
  202. /* #undef _ALL_SOURCE */
  203. #endif
  204.  
  205. /* Define to empty if the keyword does not work.  */
  206. /* #define const  */
  207.  
  208. /* Define if you have dirent.h.  */
  209. /* #define DIRENT 1 */
  210.  
  211. /* Define to the type of elements in the array set by `getgroups'.
  212.    Usually this is either `int' or `gid_t'.  */
  213. /* #undef GETGROUPS_T */
  214.  
  215. /* Define to `int' if <sys/types.h> doesn't define.  */
  216. /* #undef gid_t */
  217.  
  218. /* Define if your struct tm has tm_zone.  */
  219. /* #undef HAVE_TM_ZONE */
  220.  
  221. /* Define if you don't have tm_zone but do have the external array
  222.    tzname.  */
  223. #define HAVE_TZNAME
  224.  
  225. /* Define if on MINIX.  */
  226. /* #undef _MINIX */
  227.  
  228. /* Define to `int' if <sys/types.h> doesn't define.  */
  229. /* #undef mode_t */
  230.  
  231. /* Define if you don't have dirent.h, but have ndir.h.  */
  232. /* #undef NDIR */
  233.  
  234. /* Define to `long' if <sys/types.h> doesn't define.  */
  235. /* #undef off_t */
  236.  
  237. /* Define to `int' if <sys/types.h> doesn't define.  */
  238. /* #undef pid_t */
  239.  
  240. /* Define if the system does not provide POSIX.1 features except
  241.    with this defined.  */
  242. /* #undef _POSIX_1_SOURCE */
  243.  
  244. /* Define if you need to in order for stat and other things to work.  */
  245. /* #undef _POSIX_SOURCE */
  246.  
  247. /* Define as the return type of signal handlers (int or void).  */
  248. #define RETSIGTYPE void
  249.  
  250. /* Define to `unsigned' if <sys/types.h> doesn't define.  */
  251. /* #undef size_t */
  252.  
  253. /* Define if you have the ANSI C header files.  */
  254. #define STDC_HEADERS 1
  255.  
  256. /* Define if you don't have dirent.h, but have sys/dir.h.  */
  257. /* #undef SYSDIR */
  258.  
  259. /* Define if you don't have dirent.h, but have sys/ndir.h.  */
  260. /* #undef SYSNDIR */
  261.  
  262. /* Define if you can safely include both <sys/time.h> and <time.h>.  */
  263. /* #undef TIME_WITH_SYS_TIME */
  264.  
  265. /* Define if your <sys/time.h> declares struct tm.  */
  266. /* #define TM_IN_SYS_TIME 1 */
  267.  
  268. /* Define to `int' if <sys/types.h> doesn't define.  */
  269. /* #undef uid_t */
  270.  
  271. /* Define if the closedir function returns void instead of int.  */
  272. /* #undef VOID_CLOSEDIR */
  273.  
  274. /* Define if your <unistd.h> contains bad prototypes for exec*()
  275.    (as it does on SGI IRIX 4.x) */
  276. /* #undef BAD_EXEC_PROTOTYPES */
  277.  
  278. /* Define if your compiler botches static forward declarations
  279.    (as it does on SCI ODT 3.0) */
  280. #define BAD_STATIC_FORWARD 1
  281.  
  282. /* Define if getpgrp() must be called as getpgrp(0)
  283.    and (consequently) setpgrp() as setpgrp(0, 0). */
  284. /* #undef GETPGRP_HAVE_ARGS */
  285.  
  286. /* Define this if your time.h defines altzone */
  287. /* #define HAVE_ALTZONE */
  288.  
  289. /* Define if you have the putenv function.  */
  290. #ifdef MS_WIN32
  291. /* Does this exist on Win16? */
  292. #define HAVE_PUTENV
  293. #endif
  294.  
  295. /* Define if your compiler supports function prototypes */
  296. #define HAVE_PROTOTYPES
  297.  
  298. /* Define if  you can safely include both <sys/select.h> and <sys/time.h>
  299.    (which you can't on SCO ODT 3.0). */
  300. /* #undef SYS_SELECT_WITH_SYS_TIME */
  301.  
  302. /* Define if you want to use SGI (IRIX 4) dynamic linking.
  303.    This requires the "dl" library by Jack Jansen,
  304.    ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
  305.    Don't bother on IRIX 5, it already has dynamic linking using SunOS
  306.    style shared libraries */
  307. /* #undef WITH_SGI_DL */
  308.  
  309. /* Define if you want to emulate SGI (IRIX 4) dynamic linking.
  310.    This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
  311.    Sequent Symmetry (Dynix), and Atari ST.
  312.    This requires the "dl-dld" library,
  313.    ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
  314.    as well as the "GNU dld" library,
  315.    ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
  316.    Don't bother on SunOS 4 or 5, they already have dynamic linking using
  317.    shared libraries */
  318. /* #undef WITH_DL_DLD */
  319.  
  320. /* Define if you want to compile in rudimentary thread support */
  321. /* #undef WITH_THREAD */
  322.  
  323. /* Define if you want to use the GNU readline library */
  324. /* #define WITH_READLINE 1 */
  325.  
  326. /* Define if you have clock.  */
  327. /* #define HAVE_CLOCK */
  328.  
  329. /* Define if you have ftime.  */
  330. #define HAVE_FTIME
  331.  
  332. /* Define if you have getpeername.  */
  333. /* #undef HAVE_GETPEERNAME */
  334.  
  335. /* Define if you have getpgrp.  */
  336. /* #undef HAVE_GETPGRP */
  337.  
  338. /* Define if you have getpid.  */
  339. /* #undef HAVE_GETPID */
  340.  
  341. /* Define if you have gettimeofday.  */
  342. /* #undef HAVE_GETTIMEOFDAY */
  343.  
  344. /* Define if you have getwd.  */
  345. /* #undef HAVE_GETWD */
  346.  
  347. /* Define if you have lstat.  */
  348. /* #undef HAVE_LSTAT */
  349.  
  350. /* Define if you have nice.  */
  351. /* #undef HAVE_NICE */
  352.  
  353. /* Define if you have readlink.  */
  354. /* #undef HAVE_READLINK */
  355.  
  356. /* Define if you have select.  */
  357. /* #undef HAVE_SELECT */
  358.  
  359. /* Define if you have setpgid.  */
  360. /* #undef HAVE_SETPGID */
  361.  
  362. /* Define if you have setpgrp.  */
  363. /* #undef HAVE_SETPGRP */
  364.  
  365. /* Define if you have setsid.  */
  366. /* #undef HAVE_SETSID */
  367.  
  368. /* Define if you have siginterrupt.  */
  369. /* #undef HAVE_SIGINTERRUPT */
  370.  
  371. /* Define if you have symlink.  */
  372. /* #undef HAVE_SYMLINK */
  373.  
  374. /* Define if you have tcgetpgrp.  */
  375. /* #undef HAVE_TCGETPGRP */
  376.  
  377. /* Define if you have tcsetpgrp.  */
  378. /* #undef HAVE_TCSETPGRP */
  379.  
  380. /* Define if you have times.  */
  381. /* #undef HAVE_TIMES */
  382.  
  383. /* Define if you have uname.  */
  384. /* #undef HAVE_UNAME */
  385.  
  386. /* Define if you have waitpid.  */
  387. /* #undef HAVE_WAITPID */
  388.  
  389. /* Define if you have the <dlfcn.h> header file.  */
  390. /* #undef HAVE_DLFCN_H */
  391.  
  392. /* Define if you have the <fcntl.h> header file.  */
  393. #define HAVE_FCNTL_H 1
  394.  
  395. /* Define if you have the <signal.h> header file.  */
  396. #define HAVE_SIGNAL_H 1
  397.  
  398. /* Define if you have the <stdarg.h> header file.  */
  399. #define HAVE_STDARG_H 1
  400.  
  401. /* Define if you have the <stdarg.h> prototypes.  */
  402. #define HAVE_STDARG_PROTOTYPES
  403.  
  404. /* Define if you have the <stdlib.h> header file.  */
  405. #define HAVE_STDLIB_H 1
  406.  
  407. /* Define if you have the <sys/audioio.h> header file.  */
  408. /* #undef HAVE_SYS_AUDIOIO_H */
  409.  
  410. /* Define if you have the <sys/param.h> header file.  */
  411. /* #define HAVE_SYS_PARAM_H 1 */
  412.  
  413. /* Define if you have the <sys/select.h> header file.  */
  414. /* #define HAVE_SYS_SELECT_H 1 */
  415.  
  416. /* Define if you have the <sys/time.h> header file.  */
  417. /* #define HAVE_SYS_TIME_H 1 */
  418.  
  419. /* Define if you have the <sys/times.h> header file.  */
  420. /* #define HAVE_SYS_TIMES_H 1 */
  421.  
  422. /* Define if you have the <sys/un.h> header file.  */
  423. /* #define HAVE_SYS_UN_H 1 */
  424.  
  425. /* Define if you have the <sys/utime.h> header file.  */
  426. #define HAVE_SYS_UTIME_H 1
  427.  
  428. /* Define if you have the <sys/utsname.h> header file.  */
  429. /* #define HAVE_SYS_UTSNAME_H 1 */
  430.  
  431. /* Define if you have the <thread.h> header file.  */
  432. /* #undef HAVE_THREAD_H */
  433.  
  434. /* Define if you have the <unistd.h> header file.  */
  435. /* #define HAVE_UNISTD_H 1 */
  436.  
  437. /* Define if you have the <utime.h> header file.  */
  438. /* #define HAVE_UTIME_H 1 */
  439.  
  440. /* Define if you have the dl library (-ldl).  */
  441. /* #undef HAVE_LIBDL */
  442.  
  443. /* Define if you have the mpc library (-lmpc).  */
  444. /* #undef HAVE_LIBMPC */
  445.  
  446. /* Define if you have the nsl library (-lnsl).  */
  447. #define HAVE_LIBNSL 1
  448.  
  449. /* Define if you have the seq library (-lseq).  */
  450. /* #undef HAVE_LIBSEQ */
  451.  
  452. /* Define if you have the socket library (-lsocket).  */
  453. #define HAVE_LIBSOCKET 1
  454.  
  455. /* Define if you have the sun library (-lsun).  */
  456. /* #undef HAVE_LIBSUN */
  457.  
  458. /* Define if you have the termcap library (-ltermcap).  */
  459. /* #undef HAVE_LIBTERMCAP */
  460.  
  461. /* Define if you have the termlib library (-ltermlib).  */
  462. /* #undef HAVE_LIBTERMLIB */
  463.  
  464. /* Define if you have the thread library (-lthread).  */
  465. /* #undef HAVE_LIBTHREAD */
  466. #ifdef __cplusplus
  467. }
  468. #endif
  469. #endif /* !Py_CONFIG_H */
  470.