Commit Graph

115 Commits

Author SHA1 Message Date
Skip Montanaro 1a10aac87c make the gettmarg error message more correct by making it more vague ;-)
see SF bug 434143, part of which this addresses
2001-08-22 12:39:16 +00:00
Neil Schemenauer 7d4bb9f179 Add -E command line switch (ignore environment variables like PYTHONHOME
and PYTHONPATH).
2001-07-23 16:30:27 +00:00
Tim Peters 58e0a8c130 SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen. 2001-05-14 22:32:33 +00:00
Guido van Rossum bceccf5f43 Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger 2001-04-10 22:07:43 +00:00
Tim Peters 26ae7cd75a SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
2001-03-20 03:26:49 +00:00
Martin v. Löwis 2b6727bd8a Use Py_CHARMASK for ctype macros. Fixes bug #232787. 2001-03-06 12:12:02 +00:00
Guido van Rossum 258ccd4126 Fix typo in RISCOS patch inside MS #ifdef. (Probably my own fingers.) 2001-03-02 06:53:29 +00:00
Guido van Rossum 48a680c097 RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
Thomas Wouters fe385251f4 Make the 'time' argument to the timemodule functions strftime, asctime,
ctime, gmtime and localtime optional, defaulting to 'the current time' in
all cases. Adjust docs, add news item. Also convert all argument-handling to
METH_VARARGS. Closes SF patch #103265.
2001-01-19 23:16:56 +00:00
Jack Jansen 63596aeb33 The Mac C library (MSL from CodeWarrior 6) and I/O library (GUSI
2.1.3) finally agree on when the epoch is, so the code to convert
epochs has been disabled.
2000-12-12 22:42:30 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Barry Warsaw 9bfd2bf5ed Do the absolute minimal amount of modifications to eradicate
Py_FatalError() from module initialization functions.  The importing
mechanism already checks for PyErr_Occurred() after module importation
and it Does The Right Thing.

Unfortunately, the following either were not compiled or tested by the
regression suite, due to issues with my development platform:

	almodule.c
	cdmodule.c
	mpzmodule.c
	puremodule.c
	timingmodule.c
2000-09-01 09:01:32 +00:00
Fred Drake 56221a7cfa Chris Herborth <chrish@pobox.com>:
Minor updates for BeOS R5.

Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding
change in BeOS/README (by Fred).

This closes SourceForge patch #100978.
2000-08-15 18:52:33 +00:00
Andrew M. Kuchling a1abb728bc Use METH_OLDARGS instead of numeric constant 0 in method def. tables 2000-08-03 02:34:44 +00:00
Andrew M. Kuchling e365fb8d1f Use METH_VARARGS instead of numeric constant 1 in method def. tables 2000-08-03 02:06:16 +00:00
Peter Schneider-Kamp 7e01890986 merge Include/my*.h into Include/pyport.h
marked my*.h as obsolete
2000-07-31 15:28:04 +00:00
Thomas Wouters 334fb8985b Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.
2000-07-25 12:56:38 +00:00
Thomas Wouters ed77bac472 Fix floattime prototype ((void), not (double)) 2000-07-24 15:26:39 +00:00
Thomas Wouters 58d0510245 ANSIfy some more forward declarations. 2000-07-24 14:43:35 +00:00
Thomas Wouters 770e4042db ANSIfy yet another hidden function definition. 2000-07-24 11:26:25 +00:00
Thomas Wouters bd4bc4e9e9 Even more ANSIfication: fix as many function pointers and declarations as
possible.
2000-07-22 23:57:55 +00:00
Thomas Wouters f3f33dcf03 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.

All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:

long
func(a, b)
	long a;
	long b; /* flagword */
{

and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
2000-07-21 06:00:07 +00:00
Peter Schneider-Kamp 416d413527 ANSI-fication 2000-07-10 12:15:54 +00:00
Tim Peters dbd9ba6a6c Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. 2000-07-09 03:09:57 +00:00
Jack Jansen ee398fa058 Mac only: two epoch problem workarounds are no longer needed for GUSI
>= 2.0.5. One still is:-(
2000-07-03 21:37:27 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Fred Drake 0e12395190 Trent Mick <trentm@activestate.com>:
This patch fixes a possible overflow in the Sleep system call on
Win32/64 in the time_sleep() function in the time module. For very
large values of the give time to sleep the number of milliseconds can
overflow and give unexpected sleep intervals. THis patch raises an
OverflowError if the value overflows.

Closes SourceForge patch #100514.
2000-06-29 21:31:02 +00:00
Fred Drake dfb4ebda24 Trent Mick <trentm@activestate.com>:
Mark Hammond provided (a long time ago) a better Win32 specific
time_clock implementation in timemodule.c. The library for this
implementation does not exist on Win64 (yet, at least). This patch
makes Win64 fall back on the system's clock() function for
time_clock().

This closes SourceForge patch #100512.
2000-06-29 20:56:28 +00:00
Guido van Rossum fa48116993 Trent Mick: use size_t instead of int where appropriate (time_strftime()). 2000-06-28 21:33:59 +00:00
Fred Drake aff601804d M.-A. Lemburg <mal@lemburg.com>:
Fixed a bug due to a /* inside /*...*/. GCC doesn't like
this and bombs.
2000-05-09 19:52:40 +00:00
Guido van Rossum c410e92974 Jack Jansen:
This patch is a workaround for Macintosh, where the GUSI I/O library
(time, stat, etc) use the MacOS epoch of 1-Jan-1904 and the MSL C
library (ctime, localtime, etc) uses the (apparently ANSI standard)
epoch of 1-Jan-1900. Python programs see the MacOS epoch and we
convert values when needed.
2000-04-26 20:40:13 +00:00
Andrew M. Kuchling c24ca4b192 Fix probable bug; if errno == EINTR, floatsleep() doesn't break out of
a Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS block, but it
   calls Py_BLOCK_THREADS anyway. The change moves Py_BLOCK_THREADS
   to inside the if, so it's only executed when the function
   actually returns unexpectedly.
2000-03-24 20:35:20 +00:00
Jeremy Hylton 7ceab65468 Fix bogus error reporting on strptime: let PyArg_ParseTuple set exception.
Also, wrap long line.
2000-03-14 21:17:16 +00:00
Guido van Rossum 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Guido van Rossum b2b42ddcb1 The functions asctime() and mktime() are documented to take a 9-tuple
only.  Through some mysterious interaction, they would take 9 separate
arguments as well.  This misfeature is now disabled (to end a
difference with JPython).
2000-01-12 16:38:20 +00:00
Guido van Rossum 09cbb01989 Jack Jansen: Mac has no EINTR. 1999-11-08 15:32:27 +00:00
Guido van Rossum a5456d5042 In floatsleep(), when using select(), ignore EINTR error. 1999-08-19 14:40:27 +00:00
Guido van Rossum ea424e19f1 Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.
The test really wanted to distinguish between the two.  So now we test
for __GLIBC__ instead.  I have confirmed that this works for glibc and
I have an email from Christian Tanzer confirming that it works for
libc5, so it should be fine.
1999-04-23 20:59:05 +00:00
Guido van Rossum 0ffdd05cc3 Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
1999-04-05 21:54:14 +00:00
Guido van Rossum 4958f9af97 #$@%! Forgot to remove a #error directive used for testing. Sorry. 1999-03-29 19:12:41 +00:00
Guido van Rossum 57731607c3 Chris Lawrence writes:
"""
The GNU folks, in their infinite wisdom, have decided not to implement
altzone in libc6; this would not be horrible, except that timezone
(which is implemented) includes the current DST setting (i.e. timezone
for Central is 18000 in summer and 21600 in winter).  So Python's
timezone and altzone variables aren't set correctly during DST.

Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
show the "right" thing on Linux (by using the tm_gmtoff stuff
available in BSD, which is how the GLIBC manual claims things should
be done) and (b) should cope with the southern hemisphere.  In pursuit
of (b), I also took the liberty of renaming the "summer" and "winter"
variables to "july" and "jan".  This patch should also make certain
time calculations on Linux actually work right (like the tz-aware
functions in the rfc822 module).

(It's hard to find DST that's currently being used in the southern
hemisphere; I tested using Africa/Windhoek.)
"""
1999-03-29 19:12:04 +00:00
Guido van Rossum d3eb5774ad Patch by Chris Herborth for BeOS code.
He writes:

I had an off-by-1000 error in floatsleep(),
and the problem with time.clock() is that it's not implemented properly
on QNX... ANSI says it's supposed to return _CPU_ time used by the
process, but on QNX it returns the amount of real time used... so I was
confused.
1999-03-09 16:07:23 +00:00
Guido van Rossum c222ec28a5 Patch by Tadayoshi Funaba (with some changes) to be smarter about
guessing what happened when strftime() returns 0.  Is it buffer
overflow or was the result simply 0 bytes long?  (This happens for an
empty format string, or when the format string is a single %Z and the
timezone is unknown.)  if the buffer is at least 256 times as long as
the format, assume the latter.
1999-02-23 00:00:10 +00:00
Guido van Rossum 360eb9f278 We don't support leap seconds, so the seconds field of a time 9-tuple
should be in the range [0-59].  Noted by Tadayoshi Funaba.
1999-02-22 16:19:52 +00:00
Guido van Rossum 446ccfe1ac The doc string for strptime had the arguments reversed -- the string
comes first, the format second!  Scott Cotton discovered this.
1999-01-07 18:29:26 +00:00
Guido van Rossum 0a6363d7e1 Get rid of the strptype() declaration -- on some BSD systems, it's a
conflict, and it should be declared in time.h anyway.
(Too bad if gcc -Wall won't be happy if it isn't declared...)
1999-01-03 13:00:34 +00:00
Guido van Rossum 3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum c20687355b Make gcc -Wall happy:
(1) add dummy decl for strptime();
(2) move the code to set accept2dyear to the front of inittime().
1998-10-07 16:35:25 +00:00
Guido van Rossum 2645241add Fixes for OS/2 by Jeff Rush. 1998-09-28 22:07:11 +00:00