summaryrefslogtreecommitdiff
path: root/libc-parts/getpagesize.c
diff options
context:
space:
mode:
authorneal <neal>2008-01-24 12:45:03 +0000
committerneal <neal>2008-01-24 12:45:03 +0000
commit102c941601c8d9a190f4697be23365c3b3166ee7 (patch)
tree79b19c0fd51c59bbcba6217794112da91c6e836d /libc-parts/getpagesize.c
parentdaf9af1f4dc690cdddc7db6d7093d775a861f18f (diff)
libc-parts/
2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (ARCH_SOURCES): Rename from this... (ARCH_COMMON_SOURCES): ... to this. (ARCH_USER_SOURCES): New variable. (ARCH_KERNEL_SOURCES): Likewise. (noinst_LIBRARIES): Add libc-kernel.a. (common_sources): New variable. (libc_parts_a_SOURCES): Move most files to common_sources. Add $(ARCH_COMMON_SOURCES), $(ARCH_USER_SOURCES) (libc_parts_a_CPPFLAGS): Add -I$(LIBC)/include. (libc_kernel_a_SOURCES): New variable. (libc_kernel_a_CPPFLAGS): Likewise. (libc_kernel_a_LIBADD): Likewise. * s_printf.c: Move from ../ruth/output.c. (s_putchar) [RM_INTERN || _L4_TEST_ENVIRONMENT]: Add appropriate implementation. * _exit.c: New file. * getpagesize.c: Likewise. * ia32-cmain.c: Copied from ../ruth/ia32-cmain.c. Removed dead code. Don't include "ruth.h". Add prototype for main. (program_name): New variable. (finish): Setup program_name based on ARGV[0]. * ia32-crt0.S: Copied from ../ruth/ia32-crt0.c. * panic.c: Copied from ../ruth/panic.c. (panic_): Call _exit. * startup.c: New file. ruth/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (ARCH_SOURCES): Remove variable. (ruth_SOURCES): Set to ruth.c. (COMMON_CPPFLAGS): Remove -I$(top_builddir)/newlib/include, add -I$@LIBC@/include. * output.c: Move to ../libc-parts/s_printf.c. * output.h: Remove file. * panic.c: Move to ../libc-parts/panic.c. * ruth.h: Remove file. * malloc.c: Likewise. * malloc-wrap.c: Likewise. * ia32-cmain.c: Move to ../libc-parts/ia32-cmain.c. * ia32-crt0.S: Move to ../libc-parts/ia32-crt0.c. * ruth.c: Include <stdio.h>. Don't include "ruth.h". (output_debug): Declare, don't define. (exit): Remove function. (abort): Likewise. (getpagesize): Likewise. laden/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (laden_LDADD): Set to ../libc-parts/libc-kernel.a, not ../libc-parts/libc-parts.a. viengoos/ 2008-01-24 Neal H. Walfield <neal@gnu.org> * Makefile.am (viengoos_LDADD): Link with ../libc-parts/libc-kernel.a, not ../libc-parts/libc-parts.a
Diffstat (limited to 'libc-parts/getpagesize.c')
-rw-r--r--libc-parts/getpagesize.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libc-parts/getpagesize.c b/libc-parts/getpagesize.c
new file mode 100644
index 0000000..feaa5b9
--- /dev/null
+++ b/libc-parts/getpagesize.c
@@ -0,0 +1,29 @@
+/* getpagesize.c - getpagesize() implementation.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Neal H. Walfield <neal@gnu.org>.
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <hurd/stddef.h>
+
+size_t
+getpagesize (void)
+{
+ return PAGESIZE;
+}