diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-04-11 20:46:23 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-04-11 20:46:23 (GMT) |
commit | 8ab04b4d65586829887822a78d038a33ee7a69fd (patch) | |
tree | f276fd46f065664b962b12a2e51d78a44fa86c14 /Modules | |
parent | 9b745f6665da02c4349e8a4e592dc42d6524b8d1 (diff) | |
download | cpython-8ab04b4d65586829887822a78d038a33ee7a69fd.zip cpython-8ab04b4d65586829887822a78d038a33ee7a69fd.tar.gz cpython-8ab04b4d65586829887822a78d038a33ee7a69fd.tar.bz2 |
Got rid of ifdefs for long-obsolete GUSI versions.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 15 | ||||
-rw-r--r-- | Modules/timemodule.c | 16 |
2 files changed, 0 insertions, 31 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 74e28f2..4366b17 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -149,9 +149,7 @@ Socket methods: # include <netdb.h> typedef size_t socklen_t; # else -# ifndef USE_GUSI1 # include <arpa/inet.h> -# endif # endif # ifndef RISCOS @@ -181,11 +179,6 @@ int h_errno; /* not used */ # define O_NDELAY O_NONBLOCK /* For QNX only? */ #endif -#ifdef USE_GUSI1 -/* fdopen() isn't declared in stdio.h (sigh) */ -# include <GUSI.h> -#endif - #include "addrinfo.h" #ifndef HAVE_INET_PTON @@ -2332,11 +2325,7 @@ PySocket_inet_aton(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) { return NULL; } -#ifdef USE_GUSI1 - packed_addr = inet_addr(ip_addr).s_addr; -#else packed_addr = inet_addr(ip_addr); -#endif if (packed_addr == INADDR_NONE) { /* invalid address */ PyErr_SetString(PySocket_Error, @@ -3331,11 +3320,7 @@ inet_pton (int af, const char *src, void *dst) { if(af == AF_INET){ long packed_addr; -#ifdef USE_GUSI1 - packed_addr = (long)inet_addr(src).s_addr; -#else packed_addr = inet_addr(src); -#endif if (packed_addr == INADDR_NONE) return 0; memcpy(dst, &packed_addr, 4); diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 9396826..dda2ce4 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -9,13 +9,6 @@ #ifdef macintosh #include <time.h> #include <OSUtils.h> -#ifdef USE_GUSI211 -/* GUSI, the I/O library which has the time() function and such uses the -** Mac epoch of 1904. MSL, the C library which has localtime() and so uses -** the ANSI epoch of 1900. -*/ -#define GUSI_TO_MSL_EPOCH (4*365*24*60*60) -#endif /* USE_GUSI2 */ #else #include <sys/types.h> #endif @@ -259,9 +252,6 @@ time_convert(time_t when, struct tm * (*function)(const time_t *)) { struct tm *p; errno = 0; -#if defined(macintosh) && defined(USE_GUSI204) - when = when + GUSI_TO_MSL_EPOCH; -#endif p = function(&when); if (p == NULL) { #ifdef EINVAL @@ -487,9 +477,6 @@ time_ctime(PyObject *self, PyObject *args) return NULL; tt = (time_t)dt; } -#if defined(macintosh) && defined(USE_GUSI204) - tt = tt + GUSI_TO_MSL_EPOCH; -#endif p = ctime(&tt); if (p == NULL) { PyErr_SetString(PyExc_ValueError, "unconvertible time"); @@ -526,9 +513,6 @@ time_mktime(PyObject *self, PyObject *args) "mktime argument out of range"); return NULL; } -#if defined(macintosh) && defined(USE_GUSI211) - tt = tt - GUSI_TO_MSL_EPOCH; -#endif return PyFloat_FromDouble((double)tt); } |