Skip to content

Commit beec6fb

Browse files
author
montanaro
committed
Remove support for SunOS 4.
Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition). git-svn-id: http://svn.python.org/projects/python/trunk@35119 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 58ed6bb commit beec6fb

11 files changed

Lines changed: 3 additions & 82 deletions

File tree

Include/pyport.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,6 @@ extern int fclose(FILE *);
389389

390390
/* From Modules/posixmodule.c */
391391
extern int fdatasync(int);
392-
/* XXX These are supposedly for SunOS4.1.3 but "shouldn't hurt elsewhere" */
393-
extern int rename(const char *, const char *);
394-
extern int pclose(FILE *);
395-
extern int lstat(const char *, struct stat *);
396-
extern int symlink(const char *, const char *);
397-
extern int fsync(int fd);
398-
399392
#endif /* 0 */
400393

401394

Misc/BeOS-setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ def detect_modules(self):
401401

402402
# Curses support, requring the System V version of curses, often
403403
# provided by the ncurses library.
404-
if platform == 'sunos4':
405-
inc_dirs += ['/usr/5include']
406-
lib_dirs += ['/usr/5lib']
407-
408404
if (self.compiler.find_library_file(lib_dirs, 'ncurses')):
409405
curses_libs = ['ncurses']
410406
exts.append( Extension('_curses', ['_cursesmodule.c'],

Modules/Setup.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ GLHACK=-Dclear=__GLclear
361361

362362
# Curses support, requring the System V version of curses, often
363363
# provided by the ncurses library. e.g. on Linux, link with -lncurses
364-
# instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include
365-
# -L/usr/5lib before -lcurses).
364+
# instead of -lcurses).
366365
#
367366
# First, look at Setup.config; configure may have set this for you.
368367

Modules/mmapmodule.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ my_getpagesize(void)
3939
#include <sys/mman.h>
4040
#include <sys/stat.h>
4141

42-
#ifndef MS_SYNC
43-
/* This is missing e.g. on SunOS 4.1.4 */
44-
#define MS_SYNC 0
45-
#endif
46-
4742
#if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
4843
static int
4944
my_getpagesize(void)

Modules/pcre-int.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ computer system, and to redistribute it freely, subject to the following
3535
modules, but which are not relevant to the outside. */
3636

3737

38-
/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
39-
define a macro for memmove() if USE_BCOPY is defined. */
40-
41-
#ifdef USE_BCOPY
42-
#undef memmove /* some systems may have a macro */
43-
#define memmove(a, b, c) bcopy(b, a, c)
44-
#endif
45-
4638
/* Standard C headers plus the external interface definition */
4739

4840
#include <ctype.h>

Modules/posixmodule.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,6 @@ corresponding Unix manual entries for more information on calls.");
136136

137137
#ifndef _MSC_VER
138138

139-
#if defined(sun) && !defined(__SVR4)
140-
/* SunOS 4.1.4 doesn't have prototypes for these: */
141-
extern int rename(const char *, const char *);
142-
extern int pclose(FILE *);
143-
extern int fclose(FILE *);
144-
extern int fsync(int);
145-
extern int lstat(const char *, struct stat *);
146-
extern int symlink(const char *, const char *);
147-
#endif
148-
149139
#if defined(__sgi)&&_COMPILER_VERSION>=700
150140
/* declare ctermid_r if compiling with MIPSPro 7.x in ANSI C mode
151141
(default) */
@@ -2117,11 +2107,7 @@ posix_execv(PyObject *self, PyObject *args)
21172107
}
21182108
argvlist[argc] = NULL;
21192109

2120-
#ifdef BAD_EXEC_PROTOTYPES
2121-
execv(path, (const char **) argvlist);
2122-
#else /* BAD_EXEC_PROTOTYPES */
21232110
execv(path, argvlist);
2124-
#endif /* BAD_EXEC_PROTOTYPES */
21252111

21262112
/* If we get here it's definitely an error */
21272113

@@ -2260,12 +2246,7 @@ posix_execve(PyObject *self, PyObject *args)
22602246
}
22612247
envlist[envc] = 0;
22622248

2263-
2264-
#ifdef BAD_EXEC_PROTOTYPES
2265-
execve(path, (const char **)argvlist, envlist);
2266-
#else /* BAD_EXEC_PROTOTYPES */
22672249
execve(path, argvlist, envlist);
2268-
#endif /* BAD_EXEC_PROTOTYPES */
22692250

22702251
/* If we get here it's definitely an error */
22712252

Objects/floatobject.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ extern double fmod(double, double);
1313
extern double pow(double, double);
1414
#endif
1515

16-
#if defined(sun) && !defined(__SVR4)
17-
/* On SunOS4.1 only libm.a exists. Make sure that references to all
18-
needed math functions exist in the executable, so that dynamic
19-
loading of mathmodule does not fail. */
20-
double (*_Py_math_funcs_hack[])() = {
21-
acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor,
22-
fmod, log, log10, pow, sin, sinh, sqrt, tan, tanh
23-
};
24-
#endif
25-
2616
/* Special free list -- see comments for same code in intobject.c. */
2717
#define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */
2818
#define BHEAD_SIZE 8 /* Enough for a 64-bit pointer */

PC/pyconfig.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
348348
/* Define if the closedir function returns void instead of int. */
349349
/* #undef VOID_CLOSEDIR */
350350

351-
/* Define if your <unistd.h> contains bad prototypes for exec*()
352-
(as it does on SGI IRIX 4.x) */
353-
/* #undef BAD_EXEC_PROTOTYPES */
354-
355351
/* Define if getpgrp() must be called as getpgrp(0)
356352
and (consequently) setpgrp() as setpgrp(0, 0). */
357353
/* #undef GETPGRP_HAVE_ARGS */

RISCOS/pyconfig.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@
6767
and you want support for AIX C++ shared extension modules. */
6868
#undef AIX_GENUINE_CPLUSPLUS
6969

70-
/* Define if your <unistd.h> contains bad prototypes for exec*()
71-
(as it does on SGI IRIX 4.x) */
72-
#undef BAD_EXEC_PROTOTYPES
73-
7470
/* Define if your compiler botches static forward declarations
7571
(as it does on SCI ODT 3.0) */
7672
#undef BAD_STATIC_FORWARD

configure.in

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ AC_AIX
332332

333333
# Check for unsupported systems
334334
case $ac_sys_system/$ac_sys_release in
335-
SunOS/4*|Linux*/1*)
335+
Linux*/1*)
336336
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
337337
echo See README for details.
338338
exit 1;;
@@ -1221,7 +1221,7 @@ else
12211221
fi
12221222
AC_MSG_RESULT($SO)
12231223
# LDSHARED is the ld *command* used to create shared library
1224-
# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
1224+
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
12251225
# (Shared libraries in this instance are shared modules to be loaded into
12261226
# Python, as opposed to building Python itself as a shared library.)
12271227
AC_MSG_CHECKING(LDSHARED)
@@ -1238,7 +1238,6 @@ then
12381238
;;
12391239
IRIX/5*) LDSHARED="ld -shared";;
12401240
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
1241-
SunOS/4*) LDSHARED="ld";;
12421241
SunOS/5*)
12431242
if test "$GCC" = "yes"
12441243
then LDSHARED='$(CC) -shared'
@@ -2426,18 +2425,6 @@ int foo(int x, ...) {
24262425
])
24272426
AC_MSG_RESULT($works)
24282427

2429-
if test "$have_prototypes" = yes; then
2430-
bad_prototypes=no
2431-
AC_MSG_CHECKING(for bad exec* prototypes)
2432-
AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
2433-
AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
2434-
[Define if your <unistd.h> contains bad prototypes for exec*()
2435-
(as it does on SGI IRIX 4.x)])
2436-
bad_prototypes=yes
2437-
)
2438-
AC_MSG_RESULT($bad_prototypes)
2439-
fi
2440-
24412428
# check if sockaddr has sa_len member
24422429
AC_MSG_CHECKING(if sockaddr has sa_len member)
24432430
AC_TRY_COMPILE([#include <sys/types.h>

0 commit comments

Comments
 (0)