Skip to content

Commit 779ffc0

Browse files
committed
Add compile-time errors for unsupported systems.
1 parent 7a98e80 commit 779ffc0

4 files changed

Lines changed: 73 additions & 4 deletions

File tree

‎Python/thread_pthread.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131
#if defined(__ultrix) && defined(__mips) && defined(_DECTHREADS_)
3232
/* _DECTHREADS_ is defined in cma.h which is included by pthread.h */
3333
# define PY_PTHREAD_D4
34+
# error Systems with PY_PTHREAD_D4 are unsupported. See README.
3435

3536
#elif defined(__osf__) && defined (__alpha)
3637
/* _DECTHREADS_ is defined in cma.h which is included by pthread.h */
3738
# if !defined(_PTHREAD_ENV_ALPHA) || defined(_PTHREAD_USE_D4) || defined(PTHREAD_USE_D4)
3839
# define PY_PTHREAD_D4
40+
# error Systems with PY_PTHREAD_D4 are unsupported. See README.
3941
# else
4042
# define PY_PTHREAD_STD
4143
# endif
@@ -50,13 +52,16 @@
5052
# define PY_PTHREAD_STD
5153
# else
5254
# define PY_PTHREAD_D7
55+
# error Systems with PY_PTHREAD_D7 are unsupported. See README.
5356
# endif
5457

5558
#elif defined(__DGUX)
5659
# define PY_PTHREAD_D6
60+
# error Systems with PY_PTHREAD_D6 are unsupported. See README.
5761

5862
#elif defined(__hpux) && defined(_DECTHREADS_)
5963
# define PY_PTHREAD_D4
64+
# error Systems with PY_PTHREAD_D4 are unsupported. See README.
6065

6166
#else /* Default case */
6267
# define PY_PTHREAD_STD

‎README‎

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,28 @@ old K&R-C-only compilers is no longer possible. ANSI C compilers are
224224
available for all modern systems, either in the form of updated
225225
compilers from the vendor, or one of the free compilers (gcc).
226226

227+
Unsupported systems
228+
-------------------
229+
230+
A number of features are not supported in Python 2.3 anymore. Some
231+
support code is still present, but will be removed in Python 2.4.
232+
If you still need to use current Python versions on these systems,
233+
please send a message to python-dev@python.org indicating that you
234+
volunteer to support this system.
235+
236+
More specifically, the following systems are not supported any
237+
longer:
238+
- SunOS 4
239+
- DYNIX
240+
- dgux
241+
- Minix
242+
- Irix 4 and --with-sgi-dl
243+
- Linux 1
244+
- Systems defining __d6_pthread_create (configure.in)
245+
- Systems defining PY_PTHREAD_D4, PY_PTHREAD_D6,
246+
or PY_PTHREAD_D7 in thread_pthread.h
247+
- Systems using --with-dl-dld
248+
227249
Platform specific notes
228250
-----------------------
229251

@@ -351,6 +373,7 @@ UnixWare: There are known bugs in the math library of the system, as well as
351373
SunOS 4.x: When using the SunPro C compiler, you may want to use the
352374
'-Xa' option instead of '-Xc', to enable some needed non-ANSI
353375
Sunisms.
376+
THIS SYSTEM IS NO LONGER SUPPORTED.
354377

355378
NeXT: Not supported anymore. Start with the MacOSX/Darwin code if you
356379
want to revive it.
@@ -886,7 +909,7 @@ Modules/getpath.o.
886909
library) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
887910
is the absolute pathname of the dl library. (Don't bother on
888911
IRIX 5, it already has dynamic linking using SunOS style
889-
shared libraries.) Support for this feature is deprecated.
912+
shared libraries.) THIS OPTION IS UNSUPPORTED.
890913

891914
--with-dl-dld: Dynamic loading of modules is rumored to be supported
892915
on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
@@ -902,8 +925,7 @@ Modules/getpath.o.
902925
the absolute pathname of the dl emulation library and
903926
DLD_DIRECTORY is the absolute pathname of the GNU dld library.
904927
(Don't bother on SunOS 4 or 5, they already have dynamic
905-
linking using shared libraries.) Support for this feature is
906-
deprecated.
928+
linking using shared libraries.) THIS OPTION IS UNSUPPORTED.
907929

908930
--with-libm, --with-libc: It is possible to specify alternative
909931
versions for the Math library (default -lm) and the C library

‎configure‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 1.371 .
2+
# From configure.in Revision: 1.372 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.53 for python 2.3.
55
#
@@ -2999,6 +2999,20 @@ _ACEOF
29992999
fi
30003000
30013001
3002+
# Check for unsupported systems
3003+
case $ac_sys_system/$ac_sys_release in
3004+
SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3005+
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3006+
echo See README for details.
3007+
exit 1;;
3008+
esac
3009+
3010+
if test "$MINIX" = yes; then
3011+
echo This system \(MINIX\) is no longer supported.
3012+
echo Read README for details.
3013+
exit 1
3014+
fi
3015+
30023016
30033017
echo "$as_me:$LINENO: checking for --with-suffix" >&5
30043018
echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
@@ -10866,6 +10880,9 @@ if test $ac_cv_lib_thread___d6_pthread_create = yes; then
1086610880
#define WITH_THREAD 1
1086710881
_ACEOF
1086810882
10883+
echo Systems with __d6_pthread_create are not supported anymore.
10884+
echo See README
10885+
exit 1
1086910886
posix_threads=yes
1087010887
LIBS="$LIBS -lthread"
1087110888
THREADOBJ="Python/thread.o"
@@ -11733,6 +11750,8 @@ if test "${with_sgi_dl+set}" = set; then
1173311750
1173411751
echo "$as_me:$LINENO: result: $withval" >&5
1173511752
echo "${ECHO_T}$withval" >&6
11753+
echo --with-sgi-dl is unsupported; see README
11754+
exit 1
1173611755
1173711756
cat >>confdefs.h <<\_ACEOF
1173811757
#define WITH_SGI_DL 1
@@ -11762,6 +11781,8 @@ if test "${with_dl_dld+set}" = set; then
1176211781
1176311782
echo "$as_me:$LINENO: result: $withval" >&5
1176411783
echo "${ECHO_T}$withval" >&6
11784+
echo --with-dl-dld is unsupported; see README
11785+
exit 1
1176511786
1176611787
cat >>confdefs.h <<\_ACEOF
1176711788
#define WITH_DL_DLD 1

‎configure.in‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,20 @@ AC_PROG_CC
261261
AC_AIX
262262
AC_MINIX
263263

264+
# Check for unsupported systems
265+
case $ac_sys_system/$ac_sys_release in
266+
SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
267+
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
268+
echo See README for details.
269+
exit 1;;
270+
esac
271+
272+
if test "$MINIX" = yes; then
273+
echo This system \(MINIX\) is no longer supported.
274+
echo Read README for details.
275+
exit 1
276+
fi
277+
264278
AC_EXEEXT
265279
AC_MSG_CHECKING(for --with-suffix)
266280
AC_ARG_WITH(suffix,
@@ -1338,6 +1352,9 @@ pthread_create (NULL, NULL, start_routine, NULL)], [
13381352
LIBS="$LIBS -lc_r"
13391353
THREADOBJ="Python/thread.o"], [
13401354
AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
1355+
echo Systems with __d6_pthread_create are not supported anymore.
1356+
echo See README
1357+
exit 1
13411358
posix_threads=yes
13421359
LIBS="$LIBS -lthread"
13431360
THREADOBJ="Python/thread.o"], [
@@ -1650,6 +1667,8 @@ AC_ARG_WITH(sgi-dl,
16501667
AC_HELP_STRING(--with-sgi-dl=DIRECTORY, IRIX 4 dynamic linking),
16511668
[
16521669
AC_MSG_RESULT($withval)
1670+
echo --with-sgi-dl is unsupported; see README
1671+
exit 1
16531672
AC_DEFINE(WITH_SGI_DL, 1,
16541673
[Define if you want to use SGI (IRIX 4) dynamic linking.
16551674
This requires the "dl" library by Jack Jansen,
@@ -1670,6 +1689,8 @@ AC_ARG_WITH(dl-dld,
16701689
AC_HELP_STRING(--with-dl-dld=DL_DIR, GNU dynamic linking),
16711690
[
16721691
AC_MSG_RESULT($withval)
1692+
echo --with-dl-dld is unsupported; see README
1693+
exit 1
16731694
AC_DEFINE(WITH_DL_DLD, 1,
16741695
[Define if you want to emulate SGI (IRIX 4) dynamic linking.
16751696
This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),

0 commit comments

Comments
 (0)