[Python-checkins] cpython: Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2

jesus.cea python-checkins at python.org
Mon Mar 14 17:37:05 CET 2011


http://hg.python.org/cpython/rev/15b090c9442a
changeset:   68457:15b090c9442a
user:        Jesus Cea <jcea at jcea.es>
date:        Mon Mar 14 17:36:54 2011 +0100
summary:
  Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2

files:
  Include/pymath.h
  Misc/NEWS
  Modules/_cursesmodule.c
  Modules/fpectlmodule.c
  Modules/mathmodule.c
  Modules/socketmodule.c
  Modules/termios.c
  Objects/floatobject.c
  Objects/typeslots.inc
  Python/thread_pth.h
  Python/thread_pthread.h
  configure
  configure.in
  pyconfig.h.in

diff --git a/Include/pymath.h b/Include/pymath.h
--- a/Include/pymath.h
+++ b/Include/pymath.h
@@ -37,12 +37,6 @@
 #endif /* __STDC__ */
 #endif /* _MSC_VER */
 
-#ifdef _OSF_SOURCE
-/* OSF1 5.1 doesn't make these available with XOPEN_SOURCE_EXTENDED defined */
-extern int finite(double);
-extern double copysign(double, double);
-#endif
-
 /* High precision defintion of pi and e (Euler)
  * The values are taken from libc6's math.h.
  */
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -183,6 +183,8 @@
 - Issue #11268: Prevent Mac OS X Installer failure if Documentation
   package had previously been installed.
 
+- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2.
+
 Tools/Demos
 -----------
 
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -105,10 +105,6 @@
 #include "Python.h"
 
 
-#ifdef __osf__
-#define STRICT_SYSV_CURSES      /* Don't use ncurses extensions */
-#endif
-
 #ifdef __hpux
 #define STRICT_SYSV_CURSES
 #endif
diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c
--- a/Modules/fpectlmodule.c
+++ b/Modules/fpectlmodule.c
@@ -174,17 +174,6 @@
     fp_enable(TRP_INVALID | TRP_DIV_BY_ZERO | TRP_OVERFLOW);
     PyOS_setsig(SIGFPE, handler);
 
-/*-- DEC ALPHA OSF --------------------------------------------------------*/
-#elif defined(__alpha) && defined(__osf__)
-    /* References:   exception_intro, ieee man pages */
-    /* cc -c -I/usr/local/python/include fpectlmodule.c */
-    /* ld -shared -o fpectlmodule.so fpectlmodule.o */
-#include <machine/fpu.h>
-    unsigned long fp_control =
-    IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF;
-    ieee_set_fp_control(fp_control);
-    PyOS_setsig(SIGFPE, handler);
-
 /*-- DEC ALPHA LINUX ------------------------------------------------------*/
 #elif defined(__alpha) && defined(linux)
 #include <asm/fpu.h>
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -55,11 +55,6 @@
 #include "Python.h"
 #include "_math.h"
 
-#ifdef _OSF_SOURCE
-/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
-extern double copysign(double, double);
-#endif
-
 /*
    sin(pi*x), giving accurate results for all finite x (especially x
    integral or close to an integer).  This is here for use in the
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -155,7 +155,7 @@
 #endif
 
 #ifdef HAVE_GETHOSTBYNAME_R
-# if defined(_AIX) || defined(__osf__)
+# if defined(_AIX)
 #  define HAVE_GETHOSTBYNAME_R_3_ARG
 # elif defined(__sun) || defined(__sgi)
 #  define HAVE_GETHOSTBYNAME_R_5_ARG
diff --git a/Modules/termios.c b/Modules/termios.c
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -9,11 +9,6 @@
 #endif
 
 #include <termios.h>
-#ifdef __osf__
-/* On OSF, sys/ioctl.h requires that struct termio already be defined,
- * so this needs to be included first on that platform. */
-#include <termio.h>
-#endif
 #include <sys/ioctl.h>
 
 /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -15,11 +15,6 @@
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 
 
-#ifdef _OSF_SOURCE
-/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
-extern int finite(double);
-#endif
-
 /* Special free list
 
    Since some Python programs can spend much of their time allocating
diff --git a/Objects/typeslots.inc b/Objects/typeslots.inc
--- a/Objects/typeslots.inc
+++ b/Objects/typeslots.inc
@@ -1,4 +1,4 @@
-/* Generated by typeslots.py $Revision: 87806 $ */
+/* Generated by typeslots.py $Revision$ */
 0,
 0,
 offsetof(PyHeapTypeObject, as_mapping.mp_ass_subscript),
diff --git a/Python/thread_pth.h b/Python/thread_pth.h
--- a/Python/thread_pth.h
+++ b/Python/thread_pth.h
@@ -69,9 +69,8 @@
     volatile pth_t threadid;
     if (!initialized)
         PyThread_init_thread();
-    /* Jump through some hoops for Alpha OSF/1 */
     threadid = pth_self();
-    return (long) *(long *) &threadid;
+    return (long) threadid;
 }
 
 void PyThread_exit_thread(void)
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -228,8 +228,7 @@
    hosed" because:
      - It does not guarantee the promise that a non-zero integer is returned.
      - The cast to long is inherently unsafe.
-     - It is not clear that the 'volatile' (for AIX?) and ugly casting in the
-       latter return statement (for Alpha OSF/1) are any longer necessary.
+     - It is not clear that the 'volatile' (for AIX?) are any longer necessary.
 */
 long
 PyThread_get_thread_ident(void)
@@ -237,13 +236,8 @@
     volatile pthread_t threadid;
     if (!initialized)
         PyThread_init_thread();
-    /* Jump through some hoops for Alpha OSF/1 */
     threadid = pthread_self();
-#if SIZEOF_PTHREAD_T <= SIZEOF_LONG
     return (long) threadid;
-#else
-    return (long) *(long *) &threadid;
-#endif
 }
 
 void
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -754,7 +754,6 @@
 enable_loadable_sqlite_extensions
 with_dbmliborder
 with_signal_module
-with_dec_threads
 with_threads
 with_thread
 enable_ipv6
@@ -777,7 +776,8 @@
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP'
+CPP
+CPPFLAGS'
 
 
 # Initialize some variables set by options.
@@ -1426,7 +1426,6 @@
                           colon separated string with the backend names
                           `ndbm', `gdbm' and `bdb'.
   --with-signal-module    disable/enable signal module
-  --with-dec-threads      use DEC Alpha/OSF1 thread-safe libraries
   --with(out)-threads[=DIRECTORY]
                           disable/enable thread support
   --with(out)-thread[=DIRECTORY]
@@ -4951,11 +4950,6 @@
 	  BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
 	  RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
 	  ;;
-    OSF*)
-	  LDLIBRARY='libpython$(LDVERSION).so'
-	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-	  ;;
     Darwin*)
     	LDLIBRARY='libpython$(LDVERSION).dylib'
 	BLDLIBRARY='-L. -lpython$(LDVERSION)'
@@ -5594,9 +5588,6 @@
 	    EXPORT_MACOSX_DEPLOYMENT_TARGET=''
 
 	    ;;
-	OSF*)
-	    BASECFLAGS="$BASECFLAGS -mieee"
-	    ;;
     esac
     ;;
 
@@ -5605,9 +5596,6 @@
     OpenUNIX*|UnixWare*)
 	BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
 	;;
-    OSF*)
-	BASECFLAGS="$BASECFLAGS -ieee -std"
-    	;;
     SCO_SV*)
 	BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
 	;;
@@ -6315,7 +6303,6 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
 $as_echo "$was_it_defined" >&6; }
 
-# Check whether using makedev requires defining _OSF_SOURCE
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
 $as_echo_n "checking for makedev... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6346,35 +6333,6 @@
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_has_makedev" = "no"; then
-    # we didn't link, try if _OSF_SOURCE will allow us to link
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define _OSF_SOURCE 1
-#include <sys/types.h>
-
-int
-main ()
-{
- makedev(0, 0)
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_has_makedev=yes
-else
-  ac_cv_has_makedev=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$ac_cv_has_makedev" = "yes"; then
-
-$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
-
-    fi
-fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
 $as_echo "$ac_cv_has_makedev" >&6; }
 if test "$ac_cv_has_makedev" = "yes"; then
@@ -7462,7 +7420,6 @@
 		else
 			LDSHARED='ld -b'
 		fi ;;
-	OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
 	Darwin/1.3*)
 		LDSHARED='$(CC) -bundle'
 		LDCXXSHARED='$(CXX) -bundle'
@@ -8281,23 +8238,6 @@
 
 USE_THREAD_MODULE=""
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
-$as_echo_n "checking for --with-dec-threads... " >&6; }
-
-
-# Check whether --with-dec-threads was given.
-if test "${with_dec_threads+set}" = set; then :
-  withval=$with_dec_threads;
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
-$as_echo "$withval" >&6; }
-LDLAST=-threads
-if test "${with_thread+set}" != set; then
-   with_thread="$withval";
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
 # Templates for things AC_DEFINEd more than once.
@@ -8761,15 +8701,6 @@
 fi
 
     fi
-
-    if test "$USE_THREAD_MODULE" != "#"
-    then
-        # If the above checks didn't disable threads, (at least) OSF1
-        # needs this '-threads' argument during linking.
-        case $ac_sys_system in
-        OSF1) LDLAST=-threads;;
-        esac
-    fi
 fi
 
 if test "$posix_threads" = "yes"; then
@@ -13811,10 +13742,6 @@
 esac
 
 
-case $ac_sys_system in
-  OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
-esac
-
 ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
 if test "x$ac_cv_func_pipe2" = xyes; then :
 
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -763,11 +763,6 @@
 	  BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
 	  RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
 	  ;;
-    OSF*)
-	  LDLIBRARY='libpython$(LDVERSION).so'
-	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-	  ;;
     Darwin*)
     	LDLIBRARY='libpython$(LDVERSION).dylib'
 	BLDLIBRARY='-L. -lpython$(LDVERSION)'
@@ -1068,9 +1063,6 @@
 	    EXPORT_MACOSX_DEPLOYMENT_TARGET=''
 
 	    ;;
-	OSF*)
-	    BASECFLAGS="$BASECFLAGS -mieee"
-	    ;;
     esac
     ;;
 
@@ -1079,9 +1071,6 @@
     OpenUNIX*|UnixWare*)
 	BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
 	;;
-    OSF*)
-	BASECFLAGS="$BASECFLAGS -ieee -std"
-    	;;
     SCO_SV*)
 	BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
 	;;
@@ -1322,7 +1311,6 @@
 ])
 AC_MSG_RESULT($was_it_defined)
 
-# Check whether using makedev requires defining _OSF_SOURCE
 AC_MSG_CHECKING(for makedev)
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #if defined(MAJOR_IN_MKDEV)
@@ -1335,19 +1323,6 @@
 ]], [[
   makedev(0, 0) ]])
 ],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
-if test "$ac_cv_has_makedev" = "no"; then
-    # we didn't link, try if _OSF_SOURCE will allow us to link
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#define _OSF_SOURCE 1
-#include <sys/types.h>
-    ]],
-    [[ makedev(0, 0) ]])],
-    [ac_cv_has_makedev=yes],
-    [ac_cv_has_makedev=no])
-    if test "$ac_cv_has_makedev" = "yes"; then
-        AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
-    fi
-fi
 AC_MSG_RESULT($ac_cv_has_makedev)
 if test "$ac_cv_has_makedev" = "yes"; then
     AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.])
@@ -1667,7 +1642,6 @@
 		else
 			LDSHARED='ld -b'
 		fi ;;
-	OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
 	Darwin/1.3*)
 		LDSHARED='$(CC) -bundle'
 		LDCXXSHARED='$(CXX) -bundle'
@@ -2022,17 +1996,7 @@
 AC_SUBST(USE_THREAD_MODULE)
 USE_THREAD_MODULE=""
 
-AC_MSG_CHECKING(for --with-dec-threads)
 AC_SUBST(LDLAST)
-AC_ARG_WITH(dec-threads,
-            AS_HELP_STRING([--with-dec-threads], [use DEC Alpha/OSF1 thread-safe libraries]),
-[
-AC_MSG_RESULT($withval)
-LDLAST=-threads
-if test "${with_thread+set}" != set; then
-   with_thread="$withval";
-fi],
-[AC_MSG_RESULT(no)])
 
 # Templates for things AC_DEFINEd more than once.
 # For a single AC_DEFINE, no template is needed.
@@ -2177,15 +2141,6 @@
       THREADOBJ="Python/thread.o"
       USE_THREAD_MODULE=""])
     fi
-
-    if test "$USE_THREAD_MODULE" != "#"
-    then
-        # If the above checks didn't disable threads, (at least) OSF1
-        # needs this '-threads' argument during linking.
-        case $ac_sys_system in
-        OSF1) LDLAST=-threads;;
-        esac
-    fi
 fi
 
 if test "$posix_threads" = "yes"; then
@@ -4247,10 +4202,6 @@
 esac
 
 
-case $ac_sys_system in
-  OSF*) AC_MSG_ERROR(OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606) ;;
-esac
-
 AC_CHECK_FUNC(pipe2, AC_DEFINE(HAVE_PIPE2, 1, [Define if the OS supports pipe2()]), )
 
 AC_SUBST(THREADHEADERS)
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1227,9 +1227,6 @@
 /* Define on NetBSD to activate all library features */
 #undef _NETBSD_SOURCE
 
-/* Define _OSF_SOURCE to get the makedev macro. */
-#undef _OSF_SOURCE
-
 /* Define to 2 if the system does not provide POSIX.1 features except with
    this defined. */
 #undef _POSIX_1_SOURCE

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list