Commit Graph

46 Commits

Author SHA1 Message Date
Jeremy Hylton ee5adfbae6 add user-modifiable recursion_limit
ceval.c:
    define recurion_limit (static), default value is 2500
    define Py_GetRecursionLimit and Py_SetRecursionLimit
    raise RuntimeError if limit is exceeded
PC/config.h:
    remove plat-specific definition
sysmodule.c:
    add sys.(get|set)recursionlimit
2000-08-31 19:23:01 +00:00
Mark Hammond c756bdb66c From Rene Liebscher:
This patch makes it possible to use gnu-win32 and lcc-win32
(http://www.cs.virginia.edu/~lcc-win32/) compilers to build
extension modules. It adds compiler specific sections to
PC/config.h .
It also extends the Borland compiler section. This has then two parts,
one for Win32 and the other one for the rest. The Win32 part
should be almost complete.

*** This patch is not intended to make it possible to compile
     Python with these compilers, it is intended to be able to
     use these compilers to build extension modules. ****
2000-08-15 22:33:59 +00:00
Fredrik Lundh 6947d0b65e -- from Trent Mick: [Patch #101010] replace use of INT_PTR
with uintptr_t (fix MSVC 5.0 build)
2000-08-07 20:16:28 +00:00
Greg Ward ff7b562bc6 Pragmas that instruct the linker to link against python20.lib (or
python20_d.lib) only active on MSVC++; different library formats needed
for different compilers, and it's handled by the Distutils anyways.
2000-08-05 00:58:14 +00:00
Guido van Rossum 361b583e88 Only include <basetsd.h> for VC 6.0 and higher. 2000-06-30 22:17:53 +00:00
Guido van Rossum 47674029e1 As Neil Schemenauer points out, WITH_CYCLE_GC should be uncommented if
we want to have GC enabled in the beta.
2000-06-30 20:31:50 +00:00
Mark Hammond 306e2403fa Python's .lib is now named Python20.lib 2000-06-30 15:47:02 +00:00
Jeremy Hylton c5007aa5c3 final patches from Neil Schemenauer for garbage collection 2000-06-30 05:02:53 +00:00
Fred Drake a3f6e91307 This patch extends PC/config.h and configure.in as appropriate for
64-bit readiness (the config values are needed for patches that I will
be submitting later today. The changes are as follows:

- add SIZEOF_OFF_T #define's to PC/config.h (it was already in configure.in)

- add SIZEOF_TIME_T #define to PC/config.h and configure
Needed for some buffer overflow checking because sizeof(time_t) is
different on Win64.

- add SIZEOF_FPOS_T #define
Needed for the Win64 large file support implementation.

- add SIZEOF_HKEY in PC/config.h only
Needed for proper Win32 vs. Win64 handling in PC/winreg.c

- #define HAVE_LARGEFILE_SUPPORT for Win64

- typedef long intptr_t; for all Windows except Win64 (which defines it
itself)
This is a new ANSI (I think) type that is useful (and used by me) for
proper handling in msvcrtmodule.c and posixmodule.c

- indent the nested #ifdef's and #defines in PC/config.h
This is *so* much more readable. There cannot be a compiler
compatibilty issue here can there? Perl uses indented #defines and it
compiles with everything.
2000-06-29 20:44:47 +00:00
Fred Drake e39607f27e Changed the #error to a #warning when checking gcc versions, and
noted the minimum recommended version in the message.
2000-06-28 03:54:48 +00:00
Fred Drake 91c4e2bf12 Patch from Rene Liebscher <R.Liebscher@gmx.de>, slightly modified and
commented by Fred Drake, to prevent usage of sufficiently broken GCC
versions.
2000-06-19 13:41:54 +00:00
Guido van Rossum da5cc82d59 Trent Mick:
Use "win32" for sys.platform on Win64 instead of "win32" because:
1. While it may be confusing to the Python scriptor on Win64 that he has to
   check for win*32*, that is something that he will learn the first time. It
   is better than the alternative of the scriptor happily using "win64" and
   then that code not running on Win32 for no good reason.
2. The main question is: is Win64 so much more like Win32 than different from
   it that the common-case general Python programmer should not ever have to
   make the differentiation in his Python code. Or, at least, enough so that
   such differentiation by the Python scriptor is rare enough that some other
   provided mechanism is sufficient (even preferable). Currently the answer
   is yes. Hopefully MS will not change this answer.
2000-05-10 13:25:32 +00:00
Guido van Rossum c66ae966ed Trent Mick:
Changes to PC\config.[hc] for Win64. MSVC defines _WINxx to differentiate the
various windows platforms. Python's MS_WINxx are keyed off of these. Note
that _WIN32 (and hence MS_WIN32 in Python) are defined on Win32 *and* on
Win64. This is for compatibility reasons. The idea is that the common case is
that code specific to Win32 will also work on Win64 rather than being
specific to Win32 (i.e. there is more the same than different in WIn32 and
Win64).

The following modules are specifically excluded in the Win64 build:
audioop, binascii, imageop, rgbimg. They are advertised as heavily 32-bit
dependent.  [They should probably be fixed!  --GvR]

The patch to config.h looks big but it really is not. These are the effective
changes:
- MS_WINxx are keyed off _WINxx
- SIZEOF_VOID_P is set to 8 for Win64
- COMPILER string is changed appropriately for Win64
2000-05-08 14:14:48 +00:00
Guido van Rossum db575db0d6 Add definition of socklen_t so that socketmodule.c will compile on Windows. 2000-04-24 15:37:34 +00:00
Guido van Rossum 436364c8a0 Change the pragmas to use python16.lib instead of python15.lib. (Took
me half an hour to find why it was still linking with python15.dll!)
2000-03-29 01:48:29 +00:00
Guido van Rossum bffd683f73 The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha.  Mostly added casts etc.
2000-01-20 22:32:56 +00:00
Guido van Rossum 9f9fa6d0c9 Add HAVE_DYNAMIC_LOADING.
Define Py_DEBUG when compiling in debug mode.  (Is that a good idea?)
1999-12-20 22:57:41 +00:00
Guido van Rossum c87f5f4f7a Set the max recursion limit to 5000 -- rather conservative (this uses
0.5 MB of the 1 MB available by default for stack on Win32 platforms).
1999-06-09 15:36:37 +00:00
Guido van Rossum 3d37f43293 Jim Ahlstrom added some SIZEOF defs for VC and WATCOM (only). 1999-01-14 18:51:53 +00:00
Guido van Rossum 9df827f3ba Need to define DL_EXPORT, of course! 1998-12-10 16:50:49 +00:00
Guido van Rossum 4da55f0560 Add define of HAVE_STDDEF_H (to 1). Suggested by Greg Stein. 1998-09-23 13:35:45 +00:00
Guido van Rossum 78694d970f Patches from Greg Stein to support 'P' format in struct module's
native format, as void* (translated to Python int or long).
Also adds PyLong_FromVoidPtr and PyLong_AsVoidPtr to longobject.c.
1998-09-18 14:14:13 +00:00
Guido van Rossum b00d252586 Define SIZEOF_LONG_LONG (as 8) at Greg Stein's request. 1998-09-17 13:19:36 +00:00
Guido van Rossum 3293b07df5 Patch by Mark Hammond to support 64-bit ints on MS platforms.
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
1998-08-25 16:07:15 +00:00
Guido van Rossum 9b499d2a9c Define HAVE_STRERROR. 1998-08-12 02:10:05 +00:00
Guido van Rossum 1a87be1422 Shouldn't include the lib pragma when building python15.dll itself! 1998-08-08 18:25:43 +00:00
Guido van Rossum 446f033e23 For Win32, added pragmas specifying the python15[_d].lib library. 1998-08-07 15:32:00 +00:00
Guido van Rossum d3ab101fac Quick fix -- define SIZEOF_LONG and SIZEOF_INT. 1998-05-29 02:53:29 +00:00
Guido van Rossum 52f4915269 Oops, ".\DLLs" should be in the default path now. 1998-04-11 02:31:30 +00:00
Guido van Rossum 63096d48fa Add HAVE_MKTIME. 1998-04-10 21:28:49 +00:00
Guido van Rossum f4aeb84bc6 Enable CHECK_IMPORT_CASE on Win32. 1998-02-19 20:59:23 +00:00
Guido van Rossum d3af2f3815 win -> plat-win 1997-11-22 21:56:10 +00:00
Guido van Rossum ccf0a44d2d Fix PYTHONPATH for new names; rename tkinter to lib-tk, rename win to
plat-win, get rid of test (which is now a package).
1997-09-30 22:14:39 +00:00
Guido van Rossum f57c17034a Remove #ifdef __cplusplus. 1997-09-29 23:36:42 +00:00
Guido van Rossum 5137ea9e27 Remove #define main; remove vc40 from PYTHONPATH. 1997-08-13 19:52:26 +00:00
Guido van Rossum fcc7704ee9 Typo! \\lib\\<path> should be .\\lib\\<path> 1997-05-14 18:32:32 +00:00
Guido van Rossum e0332c7173 Longer default PYTHONPATH will find test, tkinter, and shared modules
in the build tree, when the current directory is the build tree root.
1997-05-13 19:21:22 +00:00
Guido van Rossum c339753fb3 Added HAVE_ macros for getpeername, getpid, setvbuf. 1997-05-06 15:58:18 +00:00
Guido van Rossum a31e084136 It turns out that VC1.5 does not necessarily define _WINDOWS. 1996-10-22 17:57:23 +00:00
Guido van Rossum cf6c0ea29c Add an XXX comment about apparent incompleteness of Borland defines. 1996-10-21 14:52:24 +00:00
Guido van Rossum 3db4103ecf Use MS_DLL_ID and similar changes 1996-08-23 18:42:39 +00:00
Guido van Rossum eaf9b6cd7b More changes for NT, Guido style 1996-08-22 00:06:59 +00:00
Guido van Rossum 950a12602f New versions of almost all files. 1996-07-30 17:38:17 +00:00
Guido van Rossum 1bc716f2fc Added PC files from Jim Ahlstrom. 1996-06-28 19:12:06 +00:00
Guido van Rossum f2e98b4f55 new versions from Jim A 1996-06-26 19:53:41 +00:00
Guido van Rossum 87d5e705c3 config files for DOS and Windows (all versions, all compilers) 1996-05-28 22:50:17 +00:00