]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1005568: Use _SC_PAGESIZE on Irix.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 12 Aug 2004 13:26:33 +0000 (13:26 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 12 Aug 2004 13:26:33 +0000 (13:26 +0000)
Misc/NEWS
Modules/resource.c

index fcdb8b73942ecfe3a223b8a629ebc2c59f3eaec1..6ae47d2e9aec5bf743386b8a54a0f0fe92dc89e4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,8 @@ Core and builtins
 Extension modules
 -----------------
 
+- Patch #1005568: Use _SC_PAGESIZE on Irix in resourcemoudle.
+
 - Patch #924294: Do no check for AF_INET6 if it is not defined.
 
 - Patch #954115: Properly handle UNC roots in nt.stat.
index c1b637758dced4f0a63edb781d6d90a565bd033b..c5bec79043d25d3a7955e78a7e7f51cd8f1ed73f 100644 (file)
@@ -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);