Commit ce59c041 authored by Skip Montanaro's avatar Skip Montanaro

Remove support for SunOS 4.

Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
parent 09de7567
...@@ -389,13 +389,6 @@ extern int fclose(FILE *); ...@@ -389,13 +389,6 @@ extern int fclose(FILE *);
/* From Modules/posixmodule.c */ /* From Modules/posixmodule.c */
extern int fdatasync(int); extern int fdatasync(int);
/* XXX These are supposedly for SunOS4.1.3 but "shouldn't hurt elsewhere" */
extern int rename(const char *, const char *);
extern int pclose(FILE *);
extern int lstat(const char *, struct stat *);
extern int symlink(const char *, const char *);
extern int fsync(int fd);
#endif /* 0 */ #endif /* 0 */
......
...@@ -401,10 +401,6 @@ class PyBuildExt(build_ext): ...@@ -401,10 +401,6 @@ class PyBuildExt(build_ext):
# Curses support, requring the System V version of curses, often # Curses support, requring the System V version of curses, often
# provided by the ncurses library. # provided by the ncurses library.
if platform == 'sunos4':
inc_dirs += ['/usr/5include']
lib_dirs += ['/usr/5lib']
if (self.compiler.find_library_file(lib_dirs, 'ncurses')): if (self.compiler.find_library_file(lib_dirs, 'ncurses')):
curses_libs = ['ncurses'] curses_libs = ['ncurses']
exts.append( Extension('_curses', ['_cursesmodule.c'], exts.append( Extension('_curses', ['_cursesmodule.c'],
......
...@@ -361,8 +361,7 @@ GLHACK=-Dclear=__GLclear ...@@ -361,8 +361,7 @@ GLHACK=-Dclear=__GLclear
# Curses support, requring the System V version of curses, often # Curses support, requring the System V version of curses, often
# provided by the ncurses library. e.g. on Linux, link with -lncurses # provided by the ncurses library. e.g. on Linux, link with -lncurses
# instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include # instead of -lcurses).
# -L/usr/5lib before -lcurses).
# #
# First, look at Setup.config; configure may have set this for you. # First, look at Setup.config; configure may have set this for you.
......
...@@ -39,11 +39,6 @@ my_getpagesize(void) ...@@ -39,11 +39,6 @@ my_getpagesize(void)
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifndef MS_SYNC
/* This is missing e.g. on SunOS 4.1.4 */
#define MS_SYNC 0
#endif
#if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
static int static int
my_getpagesize(void) my_getpagesize(void)
......
...@@ -35,14 +35,6 @@ restrictions: ...@@ -35,14 +35,6 @@ restrictions:
modules, but which are not relevant to the outside. */ modules, but which are not relevant to the outside. */
/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
define a macro for memmove() if USE_BCOPY is defined. */
#ifdef USE_BCOPY
#undef memmove /* some systems may have a macro */
#define memmove(a, b, c) bcopy(b, a, c)
#endif
/* Standard C headers plus the external interface definition */ /* Standard C headers plus the external interface definition */
#include <ctype.h> #include <ctype.h>
......
...@@ -136,16 +136,6 @@ corresponding Unix manual entries for more information on calls."); ...@@ -136,16 +136,6 @@ corresponding Unix manual entries for more information on calls.");
#ifndef _MSC_VER #ifndef _MSC_VER
#if defined(sun) && !defined(__SVR4)
/* SunOS 4.1.4 doesn't have prototypes for these: */
extern int rename(const char *, const char *);
extern int pclose(FILE *);
extern int fclose(FILE *);
extern int fsync(int);
extern int lstat(const char *, struct stat *);
extern int symlink(const char *, const char *);
#endif
#if defined(__sgi)&&_COMPILER_VERSION>=700 #if defined(__sgi)&&_COMPILER_VERSION>=700
/* declare ctermid_r if compiling with MIPSPro 7.x in ANSI C mode /* declare ctermid_r if compiling with MIPSPro 7.x in ANSI C mode
(default) */ (default) */
...@@ -2117,11 +2107,7 @@ posix_execv(PyObject *self, PyObject *args) ...@@ -2117,11 +2107,7 @@ posix_execv(PyObject *self, PyObject *args)
} }
argvlist[argc] = NULL; argvlist[argc] = NULL;
#ifdef BAD_EXEC_PROTOTYPES
execv(path, (const char **) argvlist);
#else /* BAD_EXEC_PROTOTYPES */
execv(path, argvlist); execv(path, argvlist);
#endif /* BAD_EXEC_PROTOTYPES */
/* If we get here it's definitely an error */ /* If we get here it's definitely an error */
...@@ -2260,12 +2246,7 @@ posix_execve(PyObject *self, PyObject *args) ...@@ -2260,12 +2246,7 @@ posix_execve(PyObject *self, PyObject *args)
} }
envlist[envc] = 0; envlist[envc] = 0;
#ifdef BAD_EXEC_PROTOTYPES
execve(path, (const char **)argvlist, envlist);
#else /* BAD_EXEC_PROTOTYPES */
execve(path, argvlist, envlist); execve(path, argvlist, envlist);
#endif /* BAD_EXEC_PROTOTYPES */
/* If we get here it's definitely an error */ /* If we get here it's definitely an error */
......
...@@ -13,16 +13,6 @@ extern double fmod(double, double); ...@@ -13,16 +13,6 @@ extern double fmod(double, double);
extern double pow(double, double); extern double pow(double, double);
#endif #endif
#if defined(sun) && !defined(__SVR4)
/* On SunOS4.1 only libm.a exists. Make sure that references to all
needed math functions exist in the executable, so that dynamic
loading of mathmodule does not fail. */
double (*_Py_math_funcs_hack[])() = {
acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor,
fmod, log, log10, pow, sin, sinh, sqrt, tan, tanh
};
#endif
/* Special free list -- see comments for same code in intobject.c. */ /* Special free list -- see comments for same code in intobject.c. */
#define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */ #define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */
#define BHEAD_SIZE 8 /* Enough for a 64-bit pointer */ #define BHEAD_SIZE 8 /* Enough for a 64-bit pointer */
......
...@@ -348,10 +348,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ...@@ -348,10 +348,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if the closedir function returns void instead of int. */ /* Define if the closedir function returns void instead of int. */
/* #undef VOID_CLOSEDIR */ /* #undef VOID_CLOSEDIR */
/* Define if your <unistd.h> contains bad prototypes for exec*()
(as it does on SGI IRIX 4.x) */
/* #undef BAD_EXEC_PROTOTYPES */
/* Define if getpgrp() must be called as getpgrp(0) /* Define if getpgrp() must be called as getpgrp(0)
and (consequently) setpgrp() as setpgrp(0, 0). */ and (consequently) setpgrp() as setpgrp(0, 0). */
/* #undef GETPGRP_HAVE_ARGS */ /* #undef GETPGRP_HAVE_ARGS */
......
...@@ -67,10 +67,6 @@ ...@@ -67,10 +67,6 @@
and you want support for AIX C++ shared extension modules. */ and you want support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS #undef AIX_GENUINE_CPLUSPLUS
/* Define if your <unistd.h> contains bad prototypes for exec*()
(as it does on SGI IRIX 4.x) */
#undef BAD_EXEC_PROTOTYPES
/* Define if your compiler botches static forward declarations /* Define if your compiler botches static forward declarations
(as it does on SCI ODT 3.0) */ (as it does on SCI ODT 3.0) */
#undef BAD_STATIC_FORWARD #undef BAD_STATIC_FORWARD
......
...@@ -332,7 +332,7 @@ AC_AIX ...@@ -332,7 +332,7 @@ AC_AIX
# Check for unsupported systems # Check for unsupported systems
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
SunOS/4*|Linux*/1*) Linux*/1*)
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
echo See README for details. echo See README for details.
exit 1;; exit 1;;
...@@ -1221,7 +1221,7 @@ else ...@@ -1221,7 +1221,7 @@ else
fi fi
AC_MSG_RESULT($SO) AC_MSG_RESULT($SO)
# LDSHARED is the ld *command* used to create shared library # LDSHARED is the ld *command* used to create shared library
# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
# (Shared libraries in this instance are shared modules to be loaded into # (Shared libraries in this instance are shared modules to be loaded into
# Python, as opposed to building Python itself as a shared library.) # Python, as opposed to building Python itself as a shared library.)
AC_MSG_CHECKING(LDSHARED) AC_MSG_CHECKING(LDSHARED)
...@@ -1238,7 +1238,6 @@ then ...@@ -1238,7 +1238,6 @@ then
;; ;;
IRIX/5*) LDSHARED="ld -shared";; IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
SunOS/4*) LDSHARED="ld";;
SunOS/5*) SunOS/5*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared' then LDSHARED='$(CC) -shared'
...@@ -2426,18 +2425,6 @@ int foo(int x, ...) { ...@@ -2426,18 +2425,6 @@ int foo(int x, ...) {
]) ])
AC_MSG_RESULT($works) AC_MSG_RESULT($works)
if test "$have_prototypes" = yes; then
bad_prototypes=no
AC_MSG_CHECKING(for bad exec* prototypes)
AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
[Define if your <unistd.h> contains bad prototypes for exec*()
(as it does on SGI IRIX 4.x)])
bad_prototypes=yes
)
AC_MSG_RESULT($bad_prototypes)
fi
# check if sockaddr has sa_len member # check if sockaddr has sa_len member
AC_MSG_CHECKING(if sockaddr has sa_len member) AC_MSG_CHECKING(if sockaddr has sa_len member)
AC_TRY_COMPILE([#include <sys/types.h> AC_TRY_COMPILE([#include <sys/types.h>
......
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
/* Define this if you have AtheOS threads. */ /* Define this if you have AtheOS threads. */
#undef ATHEOS_THREADS #undef ATHEOS_THREADS
/* Define if your <unistd.h> contains bad prototypes for exec*() (as it does
on SGI IRIX 4.x) */
#undef BAD_EXEC_PROTOTYPES
/* Define this if you have BeOS threads. */ /* Define this if you have BeOS threads. */
#undef BEOS_THREADS #undef BEOS_THREADS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment