Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8ab04b4d
Commit
8ab04b4d
authored
Apr 11, 2002
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of ifdefs for long-obsolete GUSI versions.
parent
9b745f66
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
84 deletions
+1
-84
Include/pyport.h
Include/pyport.h
+0
-7
Mac/Include/pyconfig.h
Mac/Include/pyconfig.h
+1
-1
Mac/Modules/macmodule.c
Mac/Modules/macmodule.c
+0
-20
Mac/Python/macgetcompiler.c
Mac/Python/macgetcompiler.c
+0
-4
Modules/socketmodule.c
Modules/socketmodule.c
+0
-15
Modules/timemodule.c
Modules/timemodule.c
+0
-16
Python/import.c
Python/import.c
+0
-21
No files found.
Include/pyport.h
View file @
8ab04b4d
...
...
@@ -117,13 +117,6 @@ typedef LONG_LONG Py_intptr_t;
#include <sys/select.h>
#else
/* !HAVE_SYS_SELECT_H */
#ifdef USE_GUSI1
/* If we don't have sys/select the definition may be in unistd.h */
#include <GUSI.h>
#endif
#endif
/* !HAVE_SYS_SELECT_H */
/*******************************
...
...
Mac/Include/pyconfig.h
View file @
8ab04b4d
...
...
@@ -36,7 +36,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define macintosh
#endif
#if defined(USE_GUSI
1) || defined(USE_GUSI
2)
#if defined(USE_GUSI2)
#define USE_GUSI
#endif
...
...
Mac/Modules/macmodule.c
View file @
8ab04b4d
...
...
@@ -46,9 +46,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#undef S_IWRITE
#undef S_IEXEC
#ifdef USE_GUSI1
#include <GUSI.h>
#endif
/* USE_GUSI1 */
#include <sys/types.h>
#include <sys/stat.h>
#else
/* USE_GUSI */
...
...
@@ -181,17 +178,7 @@ mac_chdir(self, args)
PyObject
*
self
;
PyObject
*
args
;
{
#ifdef USE_GUSI1
PyObject
*
rv
;
/* Change MacOS's idea of wd too */
rv
=
mac_1str
(
args
,
chdir
);
PyMac_FixGUSIcd
();
return
rv
;
#else
return
mac_1str
(
args
,
chdir
);
#endif
}
static
PyObject
*
...
...
@@ -205,11 +192,8 @@ mac_close(self, args)
Py_BEGIN_ALLOW_THREADS
res
=
close
(
fd
);
Py_END_ALLOW_THREADS
#ifndef USE_GUSI1
/* GUSI gives surious errors here? */
if
(
res
<
0
)
return
mac_error
();
#endif
Py_INCREF
(
Py_None
);
return
Py_None
;
}
...
...
@@ -385,11 +369,7 @@ mac_mkdir(self, args)
if
(
!
PyArg_ParseTuple
(
args
,
"s|i"
,
&
path
,
&
mode
))
return
NULL
;
Py_BEGIN_ALLOW_THREADS
#ifdef USE_GUSI1
res
=
mkdir
(
path
);
#else
res
=
mkdir
(
path
,
mode
);
#endif
Py_END_ALLOW_THREADS
if
(
res
<
0
)
return
mac_error
();
...
...
Mac/Python/macgetcompiler.c
View file @
8ab04b4d
...
...
@@ -35,15 +35,11 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#ifdef __MWERKS__
#ifdef USE_GUSI1
#define HASGUSI " GUSI1"
#else
#ifdef USE_GUSI2
#define HASGUSI " GUSI2"
#else
#define HASGUSI ""
#endif
#endif
#ifdef WITH_THREAD
#define HASTHREAD " THREADS"
...
...
Modules/socketmodule.c
View file @
8ab04b4d
...
...
@@ -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
);
...
...
Modules/timemodule.c
View file @
8ab04b4d
...
...
@@ -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
);
}
...
...
Python/import.c
View file @
8ab04b4d
...
...
@@ -1139,9 +1139,6 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
#elif defined(macintosh)
#include <TextUtils.h>
#ifdef USE_GUSI1
#include "TFileSpec.h"
/* for Path2FSSpec() */
#endif
#elif defined(__MACH__) && defined(__APPLE__) && defined(HAVE_DIRENT_H)
#include <sys/types.h>
...
...
@@ -1215,25 +1212,7 @@ case_ok(char *buf, int len, int namelen, char *name)
if
(
Py_GETENV
(
"PYTHONCASEOK"
)
!=
NULL
)
return
1
;
#ifndef USE_GUSI1
err
=
FSMakeFSSpec
(
0
,
0
,
Pstring
(
buf
),
&
fss
);
#else
/* GUSI's Path2FSSpec() resolves all possible aliases nicely on
the way, which is fine for all directories, but here we need
the original name of the alias file (say, Dlg.ppc.slb, not
toolboxmodules.ppc.slb). */
char
*
colon
;
err
=
Path2FSSpec
(
buf
,
&
fss
);
if
(
err
==
noErr
)
{
colon
=
strrchr
(
buf
,
':'
);
/* find filename */
if
(
colon
!=
NULL
)
err
=
FSMakeFSSpec
(
fss
.
vRefNum
,
fss
.
parID
,
Pstring
(
colon
+
1
),
&
fss
);
else
err
=
FSMakeFSSpec
(
fss
.
vRefNum
,
fss
.
parID
,
fss
.
name
,
&
fss
);
}
#endif
if
(
err
)
{
PyErr_Format
(
PyExc_NameError
,
"Can't find file for module %.100s
\n
(filename %.300s)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment