about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2001-07-15 15:25:23 +0000
committerAndreas Schwab <schwab@suse.de>2001-07-15 15:25:23 +0000
commitb20895bd7fa3a327e409037d64b274d44397b128 (patch)
tree2e736241c2e342f6396037178fc81ef795625ace
parent09e57bdf01126950243df0cd2cb8a846010060f2 (diff)
downloadglibc-b20895bd7fa3a327e409037d64b274d44397b128.tar.gz
glibc-b20895bd7fa3a327e409037d64b274d44397b128.tar.xz
glibc-b20895bd7fa3a327e409037d64b274d44397b128.zip
* sysdeps/unix/sysv/linux/m68k/getpagesize.c: Check _dl_pagesize
	first.  Default to 4096, not EXEC_PAGESIZE.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/m68k/getpagesize.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d1773f5597..d1649e2b23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-07-15  Andreas Schwab  <schwab@suse.de>
 
+	* sysdeps/unix/sysv/linux/m68k/getpagesize.c: Check _dl_pagesize
+	first.  Default to 4096, not EXEC_PAGESIZE.
+
 	* iconv/loop.c (put16) [!_STRING_ARCH_unaligned && BIG_ENDIAN]:
 	Fix index.
 
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index cfe98fc5ad..009f7f1cca 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -28,8 +28,13 @@
 int
 __getpagesize ()
 {
+  extern size_t _dl_pagesize;
 #ifdef __NR_getpagesize
   int result;
+#endif
+
+  if (_dl_pagesize != 0)
+    return _dl_pagesize;
 
   result = INLINE_SYSCALL (getpagesize, 0);
   /* The only possible error is ENOSYS.  */
@@ -37,7 +42,7 @@ __getpagesize ()
     return result;
 #endif
 
-  return EXEC_PAGESIZE;
+  return 4096;
 }
 
 weak_alias (__getpagesize, getpagesize)