Change 31702 by [EMAIL PROTECTED] on 2007/08/12 14:10:10

        Use sysconf/getpagesize/page.h to determine page size on Linux,
        in that order.
        
        Subject: Re: [PATCH] Various Gentoo Patches
        From: Marcus Holland-Moritz <[EMAIL PROTECTED]>
        Date: Sun, 12 Aug 2007 13:16:52 +0200
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/ext/IPC/SysV/SysV.xs#18 edit

Differences ...

==== //depot/perl/ext/IPC/SysV/SysV.xs#18 (text) ====
Index: perl/ext/IPC/SysV/SysV.xs
--- perl/ext/IPC/SysV/SysV.xs#17~29977~ 2007-01-25 12:57:56.000000000 -0800
+++ perl/ext/IPC/SysV/SysV.xs   2007-08-12 07:10:10.000000000 -0700
@@ -3,9 +3,6 @@
 #include "XSUB.h"
 
 #include <sys/types.h>
-#ifdef __linux__
-#   include <asm/page.h>
-#endif
 #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
 #ifndef HAS_SEM
 #   include <sys/ipc.h>
@@ -21,9 +18,14 @@
 #      ifndef HAS_SHMAT_PROTOTYPE
            extern Shmat_t shmat (int, char *, int);
 #      endif
-#      if defined(__sparc__) && (defined(__NetBSD__) || defined(__OpenBSD__))
+#      if defined(HAS_SYSCONF) && defined(_SC_PAGESIZE)
+#          undef  SHMLBA /* not static: determined at boot time */
+#          define SHMLBA sysconf(_SC_PAGESIZE)
+#      elif defined(HAS_GETPAGESIZE)
 #          undef  SHMLBA /* not static: determined at boot time */
 #          define SHMLBA getpagesize()
+#      elif defined(__linux__)
+#          include <asm/page.h>          
 #      endif
 #   endif
 #endif
End of Patch.

Reply via email to