summaryrefslogtreecommitdiffstats
path: root/libc/include/limits.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-02-24 15:55:31 -0800
committerElliott Hughes <enh@google.com>2014-02-24 15:55:31 -0800
commit0e44bc3baeb1677e5fbdda87a737b9c508c95132 (patch)
tree1470737507c2d3924297e61e463edc18a191cc8e /libc/include/limits.h
parentb26e4944e2a5bf4b7e33fa38fb17a3b76c7fe0f7 (diff)
downloadbionic-0e44bc3baeb1677e5fbdda87a737b9c508c95132.zip
bionic-0e44bc3baeb1677e5fbdda87a737b9c508c95132.tar.gz
bionic-0e44bc3baeb1677e5fbdda87a737b9c508c95132.tar.bz2
Remove <asm/page.h>.
If we have PAGE_SIZE/PAGESIZE, POSIX says they should be in <limits.h>. Change-Id: I3c2d574ea2aea81f524874a156361411a4ffa18e
Diffstat (limited to 'libc/include/limits.h')
-rw-r--r--libc/include/limits.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/include/limits.h b/libc/include/limits.h
index b9d4354..471d380 100644
--- a/libc/include/limits.h
+++ b/libc/include/limits.h
@@ -105,9 +105,15 @@
#define ULONG_LONG_MAX ULLONG_MAX
#endif
+/* New code should use sysconf(_SC_PAGE_SIZE) instead. */
+#ifndef PAGE_SIZE
+#define PAGE_SIZE 4096
+#endif
#ifndef PAGESIZE
-#include <asm/page.h>
#define PAGESIZE PAGE_SIZE
#endif
+/* glibc's PAGE_MASK is the bitwise negation of BSD's! TODO: remove? */
+#define PAGE_MASK (~(PAGE_SIZE - 1))
+
#endif /* !_LIMITS_H_ */