remove support for BSD/OS (closes bpo-31624) (#3812)

This commit is contained in:
Benjamin Peterson 2017-09-28 22:44:27 -07:00 committed by GitHub
parent a106aec2ed
commit 288d1daada
10 changed files with 11 additions and 69 deletions

View File

@ -556,16 +556,6 @@ extern char * _getpty(int *, int, mode_t, int);
#include <sys/termio.h> #include <sys/termio.h>
#endif #endif
#if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY)
#if !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H)
/* BSDI does not supply a prototype for the 'openpty' and 'forkpty'
functions, even though they are included in libutil. */
#include <termios.h>
extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */
#endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */
/* On 4.4BSD-descendants, ctype functions serves the whole range of /* On 4.4BSD-descendants, ctype functions serves the whole range of
* wchar_t character set rather than single byte code points only. * wchar_t character set rather than single byte code points only.

View File

@ -104,10 +104,6 @@ typedef wchar_t Py_UNICODE /* Py_DEPRECATED(3.3) */;
#endif #endif
#ifdef HAVE_WCHAR_H #ifdef HAVE_WCHAR_H
/* Work around a cosmetic bug in BSDI 4.x wchar.h; thanks to Thomas Wouters */
# ifdef _HAVE_BSDI
# include <time.h>
# endif
# include <wchar.h> # include <wchar.h>
#endif #endif

View File

@ -53,8 +53,8 @@ def get_platform ():
(osname, host, release, version, machine) = os.uname() (osname, host, release, version, machine) = os.uname()
# Convert the OS name to lowercase, remove '/' characters # Convert the OS name to lowercase, remove '/' characters, and translate
# (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") # spaces (for "Power Macintosh")
osname = osname.lower().replace('/', '') osname = osname.lower().replace('/', '')
machine = machine.replace(' ', '_') machine = machine.replace(' ', '_')
machine = machine.replace('/', '-') machine = machine.replace('/', '-')

View File

@ -632,8 +632,8 @@ def get_platform():
# Try to distinguish various flavours of Unix # Try to distinguish various flavours of Unix
osname, host, release, version, machine = os.uname() osname, host, release, version, machine = os.uname()
# Convert the OS name to lowercase, remove '/' characters # Convert the OS name to lowercase, remove '/' characters, and translate
# (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") # spaces (for "Power Macintosh")
osname = osname.lower().replace('/', '') osname = osname.lower().replace('/', '')
machine = machine.replace(' ', '_') machine = machine.replace(' ', '_')
machine = machine.replace('/', '-') machine = machine.replace('/', '-')

View File

@ -22,7 +22,7 @@ def get_lockdata():
else: else:
start_len = "qq" start_len = "qq"
if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd', 'bsdos')) if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd'))
or sys.platform == 'darwin'): or sys.platform == 'darwin'):
if struct.calcsize('l') == 8: if struct.calcsize('l') == 8:
off_t = 'l' off_t = 'l'

View File

@ -0,0 +1 @@
Remove support for BSD/OS.

View File

@ -3967,7 +3967,7 @@ os_nice_impl(PyObject *module, int increment)
/* There are two flavours of 'nice': one that returns the new /* There are two flavours of 'nice': one that returns the new
priority (as required by almost all standards out there) and the priority (as required by almost all standards out there) and the
Linux/FreeBSD/BSDI one, which returns '0' on success and advices Linux/FreeBSD one, which returns '0' on success and advices
the use of getpriority() to get the new priority. the use of getpriority() to get the new priority.
If we are of the nice family that returns the new priority, we If we are of the nice family that returns the new priority, we

View File

@ -149,25 +149,6 @@ typedef struct {
/* /*
* Initialization. * Initialization.
*/ */
#if defined(_HAVE_BSDI)
static
void _noop(void)
{
}
static void
PyThread__init_thread(void)
{
/* DO AN INIT BY STARTING THE THREAD */
static int dummy = 0;
pthread_t thread1;
pthread_create(&thread1, NULL, (void *) _noop, &dummy);
pthread_join(thread1, NULL);
}
#else /* !_HAVE_BSDI */
static void static void
PyThread__init_thread(void) PyThread__init_thread(void)
{ {
@ -177,8 +158,6 @@ PyThread__init_thread(void)
#endif #endif
} }
#endif /* !_HAVE_BSDI */
/* /*
* Thread support. * Thread support.
*/ */

16
configure vendored
View File

@ -5703,13 +5703,6 @@ $as_echo "no" >&6; }
fi fi
rmdir CaseSensitiveTestDir rmdir CaseSensitiveTestDir
case $MACHDEP in
bsdos*)
case $CC in
gcc) CC="$CC -D_HAVE_BSDI";;
esac;;
esac
case $ac_sys_system in case $ac_sys_system in
hp*|HP*) hp*|HP*)
case $CC in case $CC in
@ -6263,8 +6256,8 @@ fi
case $MACHDEP in case $MACHDEP in
bsdos*|hp*|HP*) hp*|HP*)
# install -d does not work on BSDI or HP-UX # install -d does not work on HP-UX
if test -z "$INSTALL" if test -z "$INSTALL"
then then
INSTALL="${srcdir}/install-sh -c" INSTALL="${srcdir}/install-sh -c"
@ -9228,9 +9221,6 @@ then
Linux*|GNU*|QNX*) Linux*|GNU*|QNX*)
LDSHARED='$(CC) -shared' LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';; LDCXXSHARED='$(CXX) -shared';;
BSD/OS*/4*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
FreeBSD*) FreeBSD*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then then
@ -9298,7 +9288,6 @@ then
fi;; fi;;
Linux-android*) ;; Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";; Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*) OpenUNIX*|UnixWare*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
@ -9325,7 +9314,6 @@ then
hp*|HP*) hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s";; LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys # -u libsys_s pulls in all symbols in libsys

View File

@ -948,13 +948,6 @@ else
fi fi
rmdir CaseSensitiveTestDir rmdir CaseSensitiveTestDir
case $MACHDEP in
bsdos*)
case $CC in
gcc) CC="$CC -D_HAVE_BSDI";;
esac;;
esac
case $ac_sys_system in case $ac_sys_system in
hp*|HP*) hp*|HP*)
case $CC in case $CC in
@ -1191,8 +1184,8 @@ AC_SUBST(READELF)
case $MACHDEP in case $MACHDEP in
bsdos*|hp*|HP*) hp*|HP*)
# install -d does not work on BSDI or HP-UX # install -d does not work on HP-UX
if test -z "$INSTALL" if test -z "$INSTALL"
then then
INSTALL="${srcdir}/install-sh -c" INSTALL="${srcdir}/install-sh -c"
@ -2492,9 +2485,6 @@ then
Linux*|GNU*|QNX*) Linux*|GNU*|QNX*)
LDSHARED='$(CC) -shared' LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';; LDCXXSHARED='$(CXX) -shared';;
BSD/OS*/4*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
FreeBSD*) FreeBSD*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]] if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then then
@ -2560,7 +2550,6 @@ then
fi;; fi;;
Linux-android*) ;; Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";; Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*) OpenUNIX*|UnixWare*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
@ -2585,7 +2574,6 @@ then
hp*|HP*) hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s";; LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys # -u libsys_s pulls in all symbols in libsys