From: Martin v. Löwis Date: Thu, 12 Aug 2004 13:26:33 +0000 (+0000) Subject: Patch #1005568: Use _SC_PAGESIZE on Irix. X-Git-Tag: v2.3.5c1~137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ea64250f15cd1012af7b613f04f7de6de06d0b9a;p=thirdparty%2FPython%2Fcpython.git Patch #1005568: Use _SC_PAGESIZE on Irix. --- diff --git a/Misc/NEWS b/Misc/NEWS index fcdb8b73942e..6ae47d2e9aec 100644 --- 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. diff --git a/Modules/resource.c b/Modules/resource.c index c1b637758dce..c5bec79043d2 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);