summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libmalloc/getpagesize.h
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1993-09-24 13:03:39 +0000
committerrgrimes <rgrimes@FreeBSD.org>1993-09-24 13:03:39 +0000
commit509c338632330844c4fd664b6d420016b3ee250b (patch)
treee2352bd37359240f85f3c95ab6952f4cb9cbe94d /gnu/lib/libmalloc/getpagesize.h
parentb4519e302839d9e55d4f47120541b4fca847ff6c (diff)
downloadFreeBSD-src-509c338632330844c4fd664b6d420016b3ee250b.zip
FreeBSD-src-509c338632330844c4fd664b6d420016b3ee250b.tar.gz
This is gnu lib malloc from NetBSD verbatium, here is the version info
that Chris created: this version of GNU malloc was obtained from prep.ai.mit.edu on 9/22/1993. There was no version noted.
Diffstat (limited to 'gnu/lib/libmalloc/getpagesize.h')
-rw-r--r--gnu/lib/libmalloc/getpagesize.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/lib/libmalloc/getpagesize.h b/gnu/lib/libmalloc/getpagesize.h
new file mode 100644
index 0000000..2d43f26
--- /dev/null
+++ b/gnu/lib/libmalloc/getpagesize.h
@@ -0,0 +1,38 @@
+#ifdef BSD
+#ifndef BSD4_1
+#define HAVE_GETPAGESIZE
+#endif
+#endif
+
+#ifndef HAVE_GETPAGESIZE
+
+#ifdef VMS
+#define getpagesize() 512
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _SC_PAGESIZE
+#define getpagesize() sysconf(_SC_PAGESIZE)
+#else
+
+#include <sys/param.h>
+
+#ifdef EXEC_PAGESIZE
+#define getpagesize() EXEC_PAGESIZE
+#else
+#ifdef NBPG
+#define getpagesize() NBPG * CLSIZE
+#ifndef CLSIZE
+#define CLSIZE 1
+#endif /* no CLSIZE */
+#else /* no NBPG */
+#define getpagesize() NBPC
+#endif /* no NBPG */
+#endif /* no EXEC_PAGESIZE */
+#endif /* no _SC_PAGESIZE */
+
+#endif /* not HAVE_GETPAGESIZE */
+
OpenPOWER on IntegriCloud