summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authormarcus <marcus>2005-01-27 15:16:43 +0000
committermarcus <marcus>2005-01-27 15:16:43 +0000
commita6278d8ea05978dc35f1114a854b9228b83db2fe (patch)
tree781aace9696ba79e8f1355df7eaf6f5ceba71170 /libc
parent5e1770e77ea7c7d603ac8923e9a5910ef6d00e8f (diff)
2005-01-27 Marcus Brinkmann <marcus@gnu.org>
* hurd-l4/sysdeps/l4/hurd/getpagesize.c: Removed. * hurd-l4/sysdeps/l4/getpagesize.c: New file.
Diffstat (limited to 'libc')
-rw-r--r--libc/ChangeLog3
-rw-r--r--libc/hurd-l4/sysdeps/l4/getpagesize.c (renamed from libc/hurd-l4/sysdeps/l4/hurd/getpagesize.c)16
2 files changed, 13 insertions, 6 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 25864da..2fe8b3d 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,5 +1,8 @@
2005-01-27 Marcus Brinkmann <marcus@gnu.org>
+ * hurd-l4/sysdeps/l4/hurd/getpagesize.c: Removed.
+ * hurd-l4/sysdeps/l4/getpagesize.c: New file.
+
* hurd-l4/sysdeps/l4/hurd/sigaction.c: New dummy file to prevent
including recursive dependencies from the BSD implementation.
* hurd-l4/sysdeps/l4/hurd/sigprocmask.c: Likewise.
diff --git a/libc/hurd-l4/sysdeps/l4/hurd/getpagesize.c b/libc/hurd-l4/sysdeps/l4/getpagesize.c
index 40ed1ee..4f75a15 100644
--- a/libc/hurd-l4/sysdeps/l4/hurd/getpagesize.c
+++ b/libc/hurd-l4/sysdeps/l4/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993,1995,1996,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,19 @@
#include <errno.h>
#include <unistd.h>
+#include <l4/kip.h>
+
/* Return the system page size. */
int
__getpagesize ()
{
- __set_errno (ENOSYS);
- return 0;
+ void *kip;
+ int min_page_bit;
+
+ kip = L4_GetKernelInterface ();
+ min_page_bit = ffs (L4_PageSizeMask (kip));
+
+ return 1 << (min_page_bit - 1);
}
libc_hidden_def (__getpagesize)
-stub_warning (getpagesize)
-
weak_alias (__getpagesize, getpagesize)
-#include <stub-tag.h>