mirror of https://github.com/python/cpython
parent
e1b0287c04
commit
069306312a
|
@ -1086,19 +1086,16 @@ other utility module.
|
|||
|
||||
Return a string that identifies the current platform. This is used mainly to
|
||||
distinguish platform-specific build directories and platform-specific built
|
||||
distributions. Typically includes the OS name and version and the architecture
|
||||
(as supplied by 'os.uname()'), although the exact information included depends
|
||||
on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only
|
||||
runs on SGI hardware), but for Linux the kernel version isn't particularly
|
||||
important.
|
||||
distributions. Typically includes the OS name and version and the
|
||||
architecture (as supplied by 'os.uname()'), although the exact information
|
||||
included depends on the OS; e.g., on Linux, the kernel version isn't
|
||||
particularly important.
|
||||
|
||||
Examples of returned values:
|
||||
|
||||
* ``linux-i586``
|
||||
* ``linux-alpha``
|
||||
* ``solaris-2.6-sun4u``
|
||||
* ``irix-5.3``
|
||||
* ``irix64-6.2``
|
||||
|
||||
For non-POSIX platforms, currently just returns ``sys.platform``.
|
||||
|
||||
|
|
|
@ -173,18 +173,15 @@ Other functions
|
|||
|
||||
This is used mainly to distinguish platform-specific build directories and
|
||||
platform-specific built distributions. Typically includes the OS name and
|
||||
version and the architecture (as supplied by :func:`os.uname`), although the
|
||||
exact information included depends on the OS; e.g. for IRIX the architecture
|
||||
isn't particularly important (IRIX only runs on SGI hardware), but for Linux
|
||||
the kernel version isn't particularly important.
|
||||
version and the architecture (as supplied by 'os.uname()'), although the
|
||||
exact information included depends on the OS; e.g., on Linux, the kernel
|
||||
version isn't particularly important.
|
||||
|
||||
Examples of returned values:
|
||||
|
||||
- linux-i586
|
||||
- linux-alpha (?)
|
||||
- solaris-2.6-sun4u
|
||||
- irix-5.3
|
||||
- irix64-6.2
|
||||
|
||||
Windows will return one of:
|
||||
|
||||
|
|
|
@ -51,14 +51,6 @@ class UnixCCompilerTestCase(unittest.TestCase):
|
|||
|
||||
sysconfig.get_config_var = old_gcv
|
||||
|
||||
# irix646
|
||||
sys.platform = 'irix646'
|
||||
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
|
||||
|
||||
# osf1V5
|
||||
sys.platform = 'osf1V5'
|
||||
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
|
||||
|
||||
# GCC GNULD
|
||||
sys.platform = 'bar'
|
||||
def gcv(v):
|
||||
|
|
|
@ -233,8 +233,6 @@ class UnixCCompiler(CCompiler):
|
|||
if self._is_gcc(compiler):
|
||||
return ["-Wl,+s", "-L" + dir]
|
||||
return ["+s", "-L" + dir]
|
||||
elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
|
||||
return ["-rpath", dir]
|
||||
else:
|
||||
if self._is_gcc(compiler):
|
||||
# gcc on non-GNU systems does not need -Wl, but can
|
||||
|
|
|
@ -16,21 +16,17 @@ from distutils import log
|
|||
from distutils.errors import DistutilsByteCompileError
|
||||
|
||||
def get_platform ():
|
||||
"""Return a string that identifies the current platform. This is used
|
||||
mainly to distinguish platform-specific build directories and
|
||||
platform-specific built distributions. Typically includes the OS name
|
||||
and version and the architecture (as supplied by 'os.uname()'),
|
||||
although the exact information included depends on the OS; eg. for IRIX
|
||||
the architecture isn't particularly important (IRIX only runs on SGI
|
||||
hardware), but for Linux the kernel version isn't particularly
|
||||
important.
|
||||
"""Return a string that identifies the current platform. This is used mainly to
|
||||
distinguish platform-specific build directories and platform-specific built
|
||||
distributions. Typically includes the OS name and version and the
|
||||
architecture (as supplied by 'os.uname()'), although the exact information
|
||||
included depends on the OS; eg. on Linux, the kernel version isn't
|
||||
particularly important.
|
||||
|
||||
Examples of returned values:
|
||||
linux-i586
|
||||
linux-alpha (?)
|
||||
solaris-2.6-sun4u
|
||||
irix-5.3
|
||||
irix64-6.2
|
||||
|
||||
Windows will return one of:
|
||||
win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
|
||||
|
@ -38,6 +34,7 @@ def get_platform ():
|
|||
win32 (all others - specifically, sys.platform is returned)
|
||||
|
||||
For other non-POSIX platforms, currently just returns 'sys.platform'.
|
||||
|
||||
"""
|
||||
if os.name == 'nt':
|
||||
# sniff sys.version for architecture.
|
||||
|
@ -87,8 +84,6 @@ def get_platform ():
|
|||
bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
|
||||
machine += ".%s" % bitness[sys.maxsize]
|
||||
# fall through to standard osname-release-machine representation
|
||||
elif osname[:4] == "irix": # could be "irix64"!
|
||||
return "%s-%s" % (osname, release)
|
||||
elif osname[:3] == "aix":
|
||||
return "%s-%s.%s" % (osname, version, release)
|
||||
elif osname[:6] == "cygwin":
|
||||
|
|
|
@ -599,19 +599,15 @@ def get_platform():
|
|||
"""Return a string that identifies the current platform.
|
||||
|
||||
This is used mainly to distinguish platform-specific build directories and
|
||||
platform-specific built distributions. Typically includes the OS name
|
||||
and version and the architecture (as supplied by 'os.uname()'),
|
||||
although the exact information included depends on the OS; eg. for IRIX
|
||||
the architecture isn't particularly important (IRIX only runs on SGI
|
||||
hardware), but for Linux the kernel version isn't particularly
|
||||
important.
|
||||
platform-specific built distributions. Typically includes the OS name and
|
||||
version and the architecture (as supplied by 'os.uname()'), although the
|
||||
exact information included depends on the OS; on Linux, the kernel version
|
||||
isn't particularly important.
|
||||
|
||||
Examples of returned values:
|
||||
linux-i586
|
||||
linux-alpha (?)
|
||||
solaris-2.6-sun4u
|
||||
irix-5.3
|
||||
irix64-6.2
|
||||
|
||||
Windows will return one of:
|
||||
win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
|
||||
|
@ -619,6 +615,7 @@ def get_platform():
|
|||
win32 (all others - specifically, sys.platform is returned)
|
||||
|
||||
For other non-POSIX platforms, currently just returns 'sys.platform'.
|
||||
|
||||
"""
|
||||
if os.name == 'nt':
|
||||
# sniff sys.version for architecture.
|
||||
|
@ -666,8 +663,6 @@ def get_platform():
|
|||
bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
|
||||
machine += ".%s" % bitness[sys.maxsize]
|
||||
# fall through to standard osname-release-machine representation
|
||||
elif osname[:4] == "irix": # could be "irix64"!
|
||||
return "%s-%s" % (osname, release)
|
||||
elif osname[:3] == "aix":
|
||||
return "%s-%s.%s" % (osname, version, release)
|
||||
elif osname[:6] == "cygwin":
|
||||
|
|
|
@ -24,12 +24,12 @@ else:
|
|||
|
||||
|
||||
def normalize_output(data):
|
||||
# Some operating systems do conversions on newline. We could possibly
|
||||
# fix that by doing the appropriate termios.tcsetattr()s. I couldn't
|
||||
# figure out the right combo on Tru64 and I don't have an IRIX box.
|
||||
# So just normalize the output and doc the problem O/Ses by allowing
|
||||
# certain combinations for some platforms, but avoid allowing other
|
||||
# differences (like extra whitespace, trailing garbage, etc.)
|
||||
# Some operating systems do conversions on newline. We could possibly fix
|
||||
# that by doing the appropriate termios.tcsetattr()s. I couldn't figure out
|
||||
# the right combo on Tru64. So, just normalize the output and doc the
|
||||
# problem O/Ses by allowing certain combinations for some platforms, but
|
||||
# avoid allowing other differences (like extra whitespace, trailing garbage,
|
||||
# etc.)
|
||||
|
||||
# This is about the best we can do without getting some feedback
|
||||
# from someone more knowledgable.
|
||||
|
@ -38,7 +38,6 @@ def normalize_output(data):
|
|||
if data.endswith(b'\r\r\n'):
|
||||
return data.replace(b'\r\r\n', b'\n')
|
||||
|
||||
# IRIX apparently turns \n into \r\n.
|
||||
if data.endswith(b'\r\n'):
|
||||
return data.replace(b'\r\n', b'\n')
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ def _lanscan_getnode():
|
|||
|
||||
def _netstat_getnode():
|
||||
"""Get the hardware address on Unix by running netstat."""
|
||||
# This might work on AIX, Tru64 UNIX and presumably on IRIX.
|
||||
# This might work on AIX, Tru64 UNIX.
|
||||
try:
|
||||
proc = _popen('netstat', '-ia')
|
||||
if not proc:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Per PEP 11, support for the IRIX operating system was removed.
|
|
@ -350,9 +350,6 @@ _symtable symtablemodule.c
|
|||
# The library to link fpectl with is platform specific.
|
||||
# Choose *one* of the options below for fpectl:
|
||||
|
||||
# For SGI IRIX (tested on 5.3):
|
||||
#fpectl fpectlmodule.c -lfpe
|
||||
|
||||
# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
|
||||
# (Without the compiler you don't have -lsunmath.)
|
||||
#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
|
||||
|
|
|
@ -111,29 +111,8 @@ static void fpe_reset(Sigfunc *handler)
|
|||
* handler for SIGFPE to the given handler.
|
||||
*/
|
||||
|
||||
/*-- IRIX -----------------------------------------------------------------*/
|
||||
#if defined(sgi)
|
||||
/* See man page on handle_sigfpes -- must link with -lfpe
|
||||
* My usage doesn't follow the man page exactly. Maybe somebody
|
||||
* else can explain handle_sigfpes to me....
|
||||
* cc -c -I/usr/local/python/include fpectlmodule.c
|
||||
* ld -shared -o fpectlmodule.so fpectlmodule.o -lfpe
|
||||
*/
|
||||
#include <sigfpe.h>
|
||||
typedef void user_routine (unsigned[5], int[2]);
|
||||
typedef void abort_routine (unsigned long);
|
||||
handle_sigfpes(_OFF, 0,
|
||||
(user_routine *)0,
|
||||
_TURN_OFF_HANDLER_ON_ERROR,
|
||||
NULL);
|
||||
handle_sigfpes(_ON, _EN_OVERFL | _EN_DIVZERO | _EN_INVALID,
|
||||
(user_routine *)0,
|
||||
_ABORT_ON_ERROR,
|
||||
NULL);
|
||||
PyOS_setsig(SIGFPE, handler);
|
||||
|
||||
/*-- SunOS and Solaris ----------------------------------------------------*/
|
||||
#elif defined(sun)
|
||||
#if defined(sun)
|
||||
/* References: ieee_handler, ieee_sun, ieee_functions, and ieee_flags
|
||||
man pages (SunOS or Solaris)
|
||||
cc -c -I/usr/local/python/include fpectlmodule.c
|
||||
|
|
|
@ -268,10 +268,8 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
|
|||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
/* Irix 6.5 fails to define this variable at all. This is needed
|
||||
for both GCC and SGI's compiler. I'd say that the SGI headers
|
||||
are just busted. Same thing for Solaris. */
|
||||
#if (defined(__sgi) || defined(sun)) && !defined(INET_ADDRSTRLEN)
|
||||
/* Solaris fails to define this variable at all. */
|
||||
#if defined(sun) && !defined(INET_ADDRSTRLEN)
|
||||
#define INET_ADDRSTRLEN 16
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# objgraph
|
||||
#
|
||||
# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
|
||||
# and print various interesting listings, such as:
|
||||
# Read "nm -o" input of a set of libraries or modules and print various
|
||||
# interesting listings, such as:
|
||||
#
|
||||
# - which names are used but not defined in the set (and used where),
|
||||
# - which names are defined in the set (and where),
|
||||
|
@ -15,7 +15,7 @@
|
|||
# -d: print callees per objectfile
|
||||
# -u: print usage of undefined symbols
|
||||
# If none of -cdu is specified, all are assumed.
|
||||
# Use "nm -o" to generate the input (on IRIX: "nm -Bo"),
|
||||
# Use "nm -o" to generate the input
|
||||
# e.g.: nm -o /lib/libc.a | objgraph
|
||||
|
||||
|
||||
|
@ -161,7 +161,7 @@ def main():
|
|||
print('-d: print callees per objectfile')
|
||||
print('-u: print usage of undefined symbols')
|
||||
print('If none of -cdu is specified, all are assumed.')
|
||||
print('Use "nm -o" to generate the input (on IRIX: "nm -Bo"),')
|
||||
print('Use "nm -o" to generate the input')
|
||||
print('e.g.: nm -o /lib/libc.a | objgraph')
|
||||
return 1
|
||||
optu = optc = optd = 0
|
||||
|
|
|
@ -2993,12 +2993,6 @@ $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
|
|||
$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
|
||||
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
|
||||
|
||||
$as_echo "#define _BSD_TYPES 1" >>confdefs.h
|
||||
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
|
||||
# them.
|
||||
|
@ -3298,7 +3292,6 @@ then
|
|||
linux*) MACHDEP="linux";;
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
irix646) MACHDEP="irix6";;
|
||||
'') MACHDEP="unknown";;
|
||||
esac
|
||||
fi
|
||||
|
@ -9136,7 +9129,7 @@ fi
|
|||
$as_echo "$SHLIB_SUFFIX" >&6; }
|
||||
|
||||
# LDSHARED is the ld *command* used to create shared library
|
||||
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
|
||||
# -- "cc -G" on SunOS 5.x.
|
||||
# (Shared libraries in this instance are shared modules to be loaded into
|
||||
# Python, as opposed to building Python itself as a shared library.)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
|
||||
|
@ -9148,8 +9141,6 @@ then
|
|||
BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
|
||||
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
|
||||
;;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/5*)
|
||||
if test "$GCC" = "yes" ; then
|
||||
LDSHARED='$(CC) -shared'
|
||||
|
@ -9309,10 +9300,6 @@ then
|
|||
then CCSHARED="-fPIC"
|
||||
else CCSHARED="-Kpic -belf"
|
||||
fi;;
|
||||
IRIX*/6*) case $CC in
|
||||
*gcc*) CCSHARED="-shared";;
|
||||
*) CCSHARED="";;
|
||||
esac;;
|
||||
esac
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -133,10 +133,6 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
|
|||
# them.
|
||||
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
|
||||
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
|
||||
|
||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
|
||||
# them.
|
||||
|
@ -406,7 +402,6 @@ then
|
|||
linux*) MACHDEP="linux";;
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
irix646) MACHDEP="irix6";;
|
||||
'') MACHDEP="unknown";;
|
||||
esac
|
||||
fi
|
||||
|
@ -2402,7 +2397,7 @@ fi
|
|||
AC_MSG_RESULT($SHLIB_SUFFIX)
|
||||
|
||||
# LDSHARED is the ld *command* used to create shared library
|
||||
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
|
||||
# -- "cc -G" on SunOS 5.x.
|
||||
# (Shared libraries in this instance are shared modules to be loaded into
|
||||
# Python, as opposed to building Python itself as a shared library.)
|
||||
AC_MSG_CHECKING(LDSHARED)
|
||||
|
@ -2413,8 +2408,6 @@ then
|
|||
BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
|
||||
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
|
||||
;;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/5*)
|
||||
if test "$GCC" = "yes" ; then
|
||||
LDSHARED='$(CC) -shared'
|
||||
|
@ -2572,10 +2565,6 @@ then
|
|||
then CCSHARED="-fPIC"
|
||||
else CCSHARED="-Kpic -belf"
|
||||
fi;;
|
||||
IRIX*/6*) case $CC in
|
||||
*gcc*) CCSHARED="-shared";;
|
||||
*) CCSHARED="";;
|
||||
esac;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CCSHARED)
|
||||
|
|
|
@ -1415,9 +1415,6 @@
|
|||
/* Define on OpenBSD to activate all library features */
|
||||
#undef _BSD_SOURCE
|
||||
|
||||
/* Define on Irix to enable u_int */
|
||||
#undef _BSD_TYPES
|
||||
|
||||
/* Define on Darwin to activate all library features */
|
||||
#undef _DARWIN_C_SOURCE
|
||||
|
||||
|
|
Loading…
Reference in New Issue