https://github.com/python/cpython/commit/ca824a9c3e32bc9a59705fd3661e70b97bad304c
commit: ca824a9c3e32bc9a59705fd3661e70b97bad304c
branch: main
author: Vasiliy Kiryanov <[email protected]>
committer: vstinner <[email protected]>
date: 2026-11-05T17:08:07+01:00
summary:
gh-157949: Remove dead UnixWare, OpenServer and ReliantUNIX support code
(#157950)
files:
A Misc/NEWS.d/next/Build/2026-09-22-09-13-06.gh-issue-157949.EZ8avp.rst
M Lib/test/test_fcntl.py
M Modules/_cursesmodule.c
M Modules/posixmodule.c
M PC/pyconfig.h
M Tools/build/check_capi_macros_ignored.txt
M configure
M configure.ac
M pyconfig.h.in
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py
index f20a9d407670a9..d04539df7c96fe 100644
--- a/Lib/test/test_fcntl.py
+++ b/Lib/test/test_fcntl.py
@@ -73,7 +73,7 @@ def get_lockdata():
fcntl.F_WRLCK, 0)
elif sys.platform.startswith('gnukfreebsd'):
lockdata = struct.pack('qqihhi', 0, 0, 0, fcntl.F_WRLCK, 0, 0)
- elif sys.platform in ['hp-uxB', 'unixware7']:
+ elif sys.platform == 'hp-uxB':
lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
else:
lockdata = struct.pack('hh'+start_len+'hh', fcntl.F_WRLCK, 0, 0,
0, 0, 0)
diff --git
a/Misc/NEWS.d/next/Build/2026-09-22-09-13-06.gh-issue-157949.EZ8avp.rst
b/Misc/NEWS.d/next/Build/2026-09-22-09-13-06.gh-issue-157949.EZ8avp.rst
new file mode 100644
index 00000000000000..0b1034807b7dd1
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-09-22-09-13-06.gh-issue-157949.EZ8avp.rst
@@ -0,0 +1,2 @@
+Remove dead build and preprocessor code for SCO UnixWare, OpenUNIX, SCO
+OpenServer and ReliantUNIX.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index d97db7417b5545..52b87e7cc0e8b9 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -120,7 +120,7 @@ static const char PyCursesVersion[] = "2.2";
#include <langinfo.h>
#endif
-#if !defined(NCURSES_VERSION) && (defined(__sun) || defined(SCO5))
+#if !defined(NCURSES_VERSION) && defined(__sun)
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
typedef chtype attr_t; /* No attr_t type is available */
#endif
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 3999b21efdfc21..9709c4e1c9454b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -14146,11 +14146,6 @@ os_WSTOPSIG_impl(PyObject *module, int status)
#if defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)
-#ifdef _SCO_DS
-/* SCO OpenServer 5.0 and later requires _SVID3 before it reveals the
- needed definitions in sys/statvfs.h */
-#define _SVID3
-#endif
#include <sys/statvfs.h>
#ifdef __APPLE__
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 4216847e2eaec4..f969525c1db5c7 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -506,8 +506,7 @@ Py_NO_ENABLE_SHARED to find out. Also support
MS_NO_COREDLL for b/w compat */
/* Define if you have the putenv function. */
#define HAVE_PUTENV
-/* Define if you can safely include both <sys/select.h> and <sys/time.h>
- (which you can't on SCO ODT 3.0). */
+/* Define if you can safely include both <sys/select.h> and <sys/time.h> */
/* #undef SYS_SELECT_WITH_SYS_TIME */
/* Define if you want build the _decimal module using a coroutine-local rather
diff --git a/Tools/build/check_capi_macros_ignored.txt
b/Tools/build/check_capi_macros_ignored.txt
index 1bcc319e1a2422..1800a2c4ec8946 100644
--- a/Tools/build/check_capi_macros_ignored.txt
+++ b/Tools/build/check_capi_macros_ignored.txt
@@ -717,7 +717,6 @@ SSTATE_INTERNED_IMMORTAL_STATIC
SSTATE_INTERNED_MORTAL
SSTATE_NOT_INTERNED
STDC_HEADERS
-STRICT_SYSV_CURSES
SYS_SELECT_WITH_SYS_TIME
S_IFLNK
S_IFMT
diff --git a/configure b/configure
index 47df4c586b4dde..fca5669c3756b4 100755
--- a/configure
+++ b/configure
@@ -4226,8 +4226,7 @@ then
ac_sys_release=
else
ac_sys_system=`uname -s`
- if test "$ac_sys_system" = "AIX" \
- -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
+ if test "$ac_sys_system" = "AIX"; then
ac_sys_release=`uname -v`
else
ac_sys_release=`uname -r`
@@ -4913,15 +4912,6 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h
# A lower level is defined below.
SunOS/*)
define_xopen_source=no;;
- # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
- # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
- # Reconfirmed for 7.1.4 by Martin v. Loewis.
- OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
- define_xopen_source=no;;
- # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
- # but used in struct sockaddr.sa_family. Reported by Tim Rice.
- SCO_SV/3.2)
- define_xopen_source=no;;
# On MacOS X 10.2, a bug in ncurses.h means that it craps out if
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
# identifies itself as Darwin/7.*
@@ -10185,11 +10175,6 @@ then
OPT="-O3 -Wall"
;;
esac
-
- case $ac_sys_system in
- SCO_SV*) OPT="$OPT -m486 -DSCO5"
- ;;
- esac
;;
*)
@@ -11531,10 +11516,6 @@ fi
esac
case $ac_sys_system in
- SCO_SV*)
- BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
- ;;
-
Darwin*)
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
# used to be here, but non-Apple gcc doesn't accept them.
@@ -11750,18 +11731,6 @@ rm -f core conftest.err conftest.$ac_objext
conftest.beam \
;;
esac
-else case e in #(
- e)
- case $ac_sys_system in
- OpenUNIX*|UnixWare*)
- BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
- ;;
- SCO_SV*)
- BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
- ;;
- esac
- ;;
-esac
fi
# Check for --enable-experimental-jit:
@@ -13223,13 +13192,6 @@ printf "%s\n" "#define _FILE_OFFSET_BITS 64"
>>confdefs.h
fi
-# Add some code to confdefs.h so that the test for off_t works on SCO
-cat >> confdefs.h <<\EOF
-#if defined(SCO_DS)
-#undef _OFF_T
-#endif
-EOF
-
# Type availability checks
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t"
"$ac_includes_default"
if test "x$ac_cv_type_mode_t" = xyes
@@ -14770,17 +14732,6 @@ then
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
- OpenUNIX*|UnixWare*)
- if test "$ac_cv_gcc_compat" = "yes" ; then
- LDSHARED='$(CC) -shared'
- LDCXXSHARED='$(CXX) -shared'
- else
- LDSHARED='$(CC) -G'
- LDCXXSHARED='$(CXX) -G'
- fi;;
- SCO_SV*)
- LDSHARED='$(CC) -Wl,-G,-Bexport'
- LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
WASI*)
if test "x$enable_wasm_dynamic_linking" = xyes
then :
@@ -14835,16 +14786,6 @@ then :
fi;;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
- OpenUNIX*|UnixWare*)
- if test "$ac_cv_gcc_compat" = "yes"
- then CCSHARED="-fPIC"
- else CCSHARED="-KPIC"
- fi;;
- SCO_SV*)
- if test "$ac_cv_gcc_compat" = "yes"
- then CCSHARED="-fPIC"
- else CCSHARED="-Kpic -belf"
- fi;;
VxWorks*)
CCSHARED="-fpic -D__SO_PICABILINUX__
-ftls-model=global-dynamic"
esac
@@ -14897,9 +14838,6 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size"
>>confdefs.h
fi
fi
;;
- OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
- SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
- ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
diff --git a/configure.ac b/configure.ac
index 1c4a8fac991f48..753f997a20da4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,11 +238,6 @@ AH_TOP([
#define Py_PYCONFIG_H
])
AH_BOTTOM([
-/* Define the macros needed if on a UnixWare 7.x system. */
-#if defined(__USLC__) && defined(__SCO_VERSION__)
-#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
-#endif
-
#endif /*Py_PYCONFIG_H*/
])
@@ -377,8 +372,7 @@ then
ac_sys_release=
else
ac_sys_system=`uname -s`
- if test "$ac_sys_system" = "AIX" \
- -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
+ if test "$ac_sys_system" = "AIX"; then
ac_sys_release=`uname -v`
else
ac_sys_release=`uname -r`
@@ -1019,15 +1013,6 @@ case $ac_sys_system/$ac_sys_release in
# A lower level is defined below.
SunOS/*)
define_xopen_source=no;;
- # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
- # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
- # Reconfirmed for 7.1.4 by Martin v. Loewis.
- OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
- define_xopen_source=no;;
- # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
- # but used in struct sockaddr.sa_family. Reported by Tim Rice.
- SCO_SV/3.2)
- define_xopen_source=no;;
# On MacOS X 10.2, a bug in ncurses.h means that it craps out if
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
# identifies itself as Darwin/7.*
@@ -2622,11 +2607,6 @@ then
OPT="-O3 -Wall"
;;
esac
-
- case $ac_sys_system in
- SCO_SV*) OPT="$OPT -m486 -DSCO5"
- ;;
- esac
;;
*)
@@ -2994,10 +2974,6 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
esac
case $ac_sys_system in
- SCO_SV*)
- BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
- ;;
-
Darwin*)
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
# used to be here, but non-Apple gcc doesn't accept them.
@@ -3151,15 +3127,6 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
# end of Darwin* tests
;;
esac
-], [
- case $ac_sys_system in
- OpenUNIX*|UnixWare*)
- BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
- ;;
- SCO_SV*)
- BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
- ;;
- esac
])
# Check for --enable-experimental-jit:
@@ -3542,13 +3509,6 @@ AC_DEFINE([_FILE_OFFSET_BITS], [64],
[This must be set to 64 on some systems to enable large file support.])
fi
-# Add some code to confdefs.h so that the test for off_t works on SCO
-cat >> confdefs.h <<\EOF
-#if defined(SCO_DS)
-#undef _OFF_T
-#endif
-EOF
-
# Type availability checks
AC_TYPE_MODE_T
AC_TYPE_OFF_T
@@ -3967,17 +3927,6 @@ then
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
- OpenUNIX*|UnixWare*)
- if test "$ac_cv_gcc_compat" = "yes" ; then
- LDSHARED='$(CC) -shared'
- LDCXXSHARED='$(CXX) -shared'
- else
- LDSHARED='$(CC) -G'
- LDCXXSHARED='$(CXX) -G'
- fi;;
- SCO_SV*)
- LDSHARED='$(CC) -Wl,-G,-Bexport'
- LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
WASI*)
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
dnl not implemented yet
@@ -4025,16 +3974,6 @@ then
]);;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
- OpenUNIX*|UnixWare*)
- if test "$ac_cv_gcc_compat" = "yes"
- then CCSHARED="-fPIC"
- else CCSHARED="-KPIC"
- fi;;
- SCO_SV*)
- if test "$ac_cv_gcc_compat" = "yes"
- then CCSHARED="-fPIC"
- else CCSHARED="-Kpic -belf"
- fi;;
VxWorks*)
CCSHARED="-fpic -D__SO_PICABILINUX__
-ftls-model=global-dynamic"
esac
@@ -4085,9 +4024,6 @@ then
fi
fi
;;
- OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
- SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
- ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
@@ -6364,8 +6300,7 @@ AS_VAR_IF([ac_cv_device_macros], [yes], [
dnl no longer used, now always defined for backwards compatibility
AC_DEFINE([SYS_SELECT_WITH_SYS_TIME], [1],
- [Define if you can safely include both <sys/select.h> and <sys/time.h>
- (which you can't on SCO ODT 3.0).])
+ [Define if you can safely include both <sys/select.h> and <sys/time.h>])
# On OSF/1 V5.1, getaddrinfo is available, but a define
# for [no]getaddrinfo in netdb.h.
diff --git a/pyconfig.h.in b/pyconfig.h.in
index c575cbf0bf1c77..dba7d193bcb3d1 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1922,8 +1922,7 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Define if you can safely include both <sys/select.h> and <sys/time.h>
- (which you can't on SCO ODT 3.0). */
+/* Define if you can safely include both <sys/select.h> and <sys/time.h> */
#undef SYS_SELECT_WITH_SYS_TIME
/* Custom thread stack size depending on chosen sanitizer runtimes. */
@@ -2233,10 +2232,5 @@
#undef uid_t
-/* Define the macros needed if on a UnixWare 7.x system. */
-#if defined(__USLC__) && defined(__SCO_VERSION__)
-#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
-#endif
-
#endif /*Py_PYCONFIG_H*/
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]