Skip to content

Commit 5776663

Browse files
authored
bpo-42029: Remove IRIX code (GH-23023)
IRIX code was slowy removed in Python 2.4 (--with-sgi-dl), Python 3.3 (Irix threads), and Python 3.7.
1 parent 3505261 commit 5776663

File tree

4 files changed

+8
-25
lines changed

4 files changed

+8
-25
lines changed

Doc/library/posix.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Large File Support
3737

3838
.. sectionauthor:: Steve Clift <[email protected]>
3939

40-
Several operating systems (including AIX, HP-UX, Irix and Solaris) provide
40+
Several operating systems (including AIX, HP-UX and Solaris) provide
4141
support for files that are larger than 2 GiB from a C programming model where
4242
:c:type:`int` and :c:type:`long` are 32-bit values. This is typically accomplished
4343
by defining the relevant size and offset types as 64-bit values. Such files are
@@ -47,8 +47,8 @@ Large file support is enabled in Python when the size of an :c:type:`off_t` is
4747
larger than a :c:type:`long` and the :c:type:`long long` is at least as large
4848
as an :c:type:`off_t`.
4949
It may be necessary to configure and compile Python with certain compiler flags
50-
to enable this mode. For example, it is enabled by default with recent versions
51-
of Irix, but with Solaris 2.6 and 2.7 you need to do something like::
50+
to enable this mode. For example, with Solaris 2.6 and 2.7 you need to do
51+
something like::
5252

5353
CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS" \
5454
./configure

Lib/platform.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -524,16 +524,6 @@ def system_alias(system, release, version):
524524
# XXX Whatever the new SunOS marketing name is...
525525
system = 'Solaris'
526526

527-
elif system == 'IRIX64':
528-
# IRIX reports IRIX64 on platforms with 64-bit support; yet it
529-
# is really a version and not a different platform, since 32-bit
530-
# apps are also supported..
531-
system = 'IRIX'
532-
if version:
533-
version = version + ' (64bit)'
534-
else:
535-
version = '64bit'
536-
537527
elif system in ('win32', 'win16'):
538528
# In case one of the other tricks
539529
system = 'Windows'
@@ -698,9 +688,6 @@ def architecture(executable=sys.executable, bits='', linkage=''):
698688
# Bits
699689
if '32-bit' in fileout:
700690
bits = '32bit'
701-
elif 'N32' in fileout:
702-
# On Irix only
703-
bits = 'n32bit'
704691
elif '64-bit' in fileout:
705692
bits = '64bit'
706693

Modules/posixmodule.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6763,12 +6763,11 @@ os_sched_getaffinity_impl(PyObject *module, pid_t pid)
67636763

67646764

67656765
/* AIX uses /dev/ptc but is otherwise the same as /dev/ptmx */
6766-
/* IRIX has both /dev/ptc and /dev/ptmx, use ptmx */
67676766
#if defined(HAVE_DEV_PTC) && !defined(HAVE_DEV_PTMX)
6768-
#define DEV_PTY_FILE "/dev/ptc"
6769-
#define HAVE_DEV_PTMX
6767+
# define DEV_PTY_FILE "/dev/ptc"
6768+
# define HAVE_DEV_PTMX
67706769
#else
6771-
#define DEV_PTY_FILE "/dev/ptmx"
6770+
# define DEV_PTY_FILE "/dev/ptmx"
67726771
#endif
67736772

67746773
#if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX)

Modules/resource.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,10 @@ resource_getpagesize_impl(PyObject *module)
313313
long pagesize = 0;
314314
#if defined(HAVE_GETPAGESIZE)
315315
pagesize = getpagesize();
316-
#elif defined(HAVE_SYSCONF)
317-
#if defined(_SC_PAGE_SIZE)
316+
#elif defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
318317
pagesize = sysconf(_SC_PAGE_SIZE);
319318
#else
320-
/* Irix 5.3 has _SC_PAGESIZE, but not _SC_PAGE_SIZE */
321-
pagesize = sysconf(_SC_PAGESIZE);
322-
#endif
319+
# error "unsupported platform: resource.getpagesize()"
323320
#endif
324321
return pagesize;
325322
}

0 commit comments

Comments
 (0)