summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove include-file-dependant half-prototype of clnt_create().Thomas Wouters2001-01-221-3/+0
|
* Move declaration of 'clnt_create()' NIS function to pyport.h, as it'sThomas Wouters2001-01-211-0/+3
| | | | | | supposed to be declared in system include files (with a proper prototype.) Should be moved to a platform-specific block if anyone finds out which broken platforms need it :-)
* Move distributed and duplicated config for stat() and fstat() into pyport.h.Tim Peters2001-01-181-2/+34
|
* Change LONG_BIT error warning to mention glibc, too, since this is reallyAndrew M. Kuchling2001-01-121-1/+1
| | | | a glibc, not a gcc, problem.
* Added Py_FPROTO macro which was available in Python 1.5.x and below.Marc-André Lemburg2000-10-051-0/+3
| | | | | | | This should not be used for new code, but will probably make porting old extensions to 2.0 a lot easier. Also see Bug #116011.
* Move LONG_BIT from intobject.c to pyport.h. #error if it's already beenTim Peters2000-10-051-0/+13
| | | | | | #define'd to an unreasonable value (several recent gcc systems have misdefined it, causing bogus overflows in integer multiplication). Nuke CHAR_BIT entirely.
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-261-0/+32
| | | | | | | | Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
* Close SF bug 110826: a complaint about the way Python #define'd NULL.Tim Peters2000-09-101-4/+0
| | | | | | | | | | | | | | | It's hard to sort out what the bug was, exactly. So, Big Hammer: 1. Python shouldn't be in the business of #define'ing NULL, period. 2. Users of the Python C API shouldn't be in the business of not including Python.h, period. Hence: 1. Removed all #define's of NULL in Python source code (pyport.h and object.h). 2. Since we're *relying* on stdio.h defining NULL, put an #error in Python.h after its #include of stdio.h if NULL isn't defined then.
* A #define didn't start in column 1. Closes SF bug 113888.Tim Peters2000-09-081-1/+1
|
* Add missing Py_PROTO macro for backward compatibility with old extensionsVladimir Marangozov2000-09-081-1/+7
| | | | | (sources) which may still use it and now fail to compile. Reported by M-A Lemburg. Closes [ Bug #113576 ].
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-8/+0
| | | | This should match the situation in the 1.6b1 tree.
* Moved LONG_LONG #define from longobject.h to here, since it's neededBarry Warsaw2000-08-181-0/+43
| | | | | | | | | | by the following. typedef in a portable way the Python name for the C9X uintptr_t type. This latter is the most portable way to spell an integral type to which a void* can be cast to and back again without losing information. Parallel checkin hacks configure to check if the platform/compiler supports the C9X name.
* Fix for http://sourceforge.net/bugs/?func=detailbug&bug_id=111866&group_id=5470.Tim Peters2000-08-151-1/+9
| | | | | | | | | | | This was a misleading bug -- the true "bug" was that hash(x) gave an error return when x is an infinity. Fixed that. Added new Py_IS_INFINITY macro to pyport.h. Rearranged code to reduce growing duplication in hashing of float and complex numbers, pushing Trent's earlier stab at that to a logical conclusion. Fixed exceedingly rare bug where hashing of floats could return -1 even if there wasn't an error (didn't waste time trying to construct a test case, it was simply obvious from the code that it *could* happen). Improved complex hash so that hash(complex(x, y)) doesn't systematically equal hash(complex(y, x)) anymore.
* #include reordering so that extern "C" does not interfere withVladimir Marangozov2000-08-111-38/+40
| | | | | | standard C++ specific includes. Closes patch 101061.
* remove all occurence of math.rint() from the sourcesPeter Schneider-Kamp2000-08-101-2/+0
| | | | (and yes, "Currintly" also counts <0.5 wink>)
* Of course, you meant "#if 0" and not "#ifdef 0". :)Guido van Rossum2000-08-011-1/+1
|
* Guido said this is food for the beta-testers<wink>Peter Schneider-Kamp2000-08-011-0/+5
|
* patch from Vladimir (move Py_Mem* interface to Include/pymem.h)Peter Schneider-Kamp2000-07-311-154/+5
|
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-0/+317
| | | | marked my*.h as obsolete
* Make mode_t available for the declaration of _getpty().Sjoerd Mullender2000-07-261-1/+1
|
* Create a new section of pyport.h to hold all external function declarationsThomas Wouters2000-07-241-0/+62
| | | | | | | | | | | | | | for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though.
* Removed all instances of RETSIGTYPE from the source code: signalTim Peters2000-07-231-17/+0
| | | | | | | handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules).
* Included assert.h in Python.h -- it's absurd that this basic tool ofTim Peters2000-07-231-0/+17
| | | | | | | | good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro.
* Recent ANSIfication introduced a couple instances ofTim Peters2000-07-231-1/+25
| | | | | | | | | | | #if RETSIGTYPE != void That isn't C, and MSVC properly refuses to compile it. Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h to expand to the correct thing based on RETSIGTYPE. However, only void is ANSI! Do we still have platforms that return int? The Unix config mess appears to #define RETSIGTYPE by magic without being asked to, so I assume it's "a problem" across Unices still.
* Remove the "1" that Tim sticked to the preprocessor symbol for unknown reasonsVladimir Marangozov2000-07-101-1/+1
| | | | (cf. the rest of the headers in the distribution)
* Cray J90 fixes for long ints.Tim Peters2000-07-081-0/+57
This was a convenient excuse to create the pyport.h file recently discussed! Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a signed int and you *need* sign-extension. This is #define'd in pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS. If you're running on a platform that needs that symbol #define'd, the std tests never would have worked for you (in particular, at least test_long would have failed). The autoconfig stuff got added to Python after my Unix days, so I don't know how that works. Would someone please look into doing & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS symbol? It needs to be defined if & only if, e.g., (-1) >> 3 is not -1.