summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-08-12 13:26:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-08-12 13:26:56 (GMT)
commit0cb3c635033dbfdf43de5b7c9ed2b2e3fe7d6fdf (patch)
tree867f808357b453503421783448aa9a591c2b899a /Modules
parenta9170c7eac4801d39e1fa813688e6826245b2258 (diff)
downloadcpython-0cb3c635033dbfdf43de5b7c9ed2b2e3fe7d6fdf.zip
cpython-0cb3c635033dbfdf43de5b7c9ed2b2e3fe7d6fdf.tar.gz
cpython-0cb3c635033dbfdf43de5b7c9ed2b2e3fe7d6fdf.tar.bz2
Patch #1005568: Use _SC_PAGESIZE on Irix.
Backported to 2.3.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/resource.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index c1b6377..c5bec79 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -202,7 +202,12 @@ resource_getpagesize(PyObject *self, PyObject *args)
#if defined(HAVE_GETPAGESIZE)
pagesize = getpagesize();
#elif defined(HAVE_SYSCONF)
+#if defined(_SC_PAGE_SIZE)
pagesize = sysconf(_SC_PAGE_SIZE);
+#else
+ /* Irix 5.3 has _SC_PAGESIZE, but not _SC_PAGE_SIZE */
+ pagesize = sysconf(_SC_PAGESIZE);
+#endif
#endif
return Py_BuildValue("i", pagesize);