Patch #1005568: Use _SC_PAGESIZE on Irix.

Backported to 2.3.
This commit is contained in:
Martin v. Löwis 2004-08-12 13:26:56 +00:00
parent a9170c7eac
commit 0cb3c63503
1 changed files with 5 additions and 0 deletions

View 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);