Make private/bionic_page.h available as platform/bionic/page.h.
Bug: http://b/145825270
Test: treehugger
Change-Id: I52958f370c0df2c02cb8250e2cf0705d4e93e908
diff --git a/libc/bionic/bionic_allocator.cpp b/libc/bionic/bionic_allocator.cpp
index 168d6ba..7fd7067 100644
--- a/libc/bionic/bionic_allocator.cpp
+++ b/libc/bionic/bionic_allocator.cpp
@@ -40,8 +40,8 @@
#include <async_safe/log.h>
#include <async_safe/CHECK.h>
+#include "platform/bionic/page.h"
#include "private/bionic_macros.h"
-#include "private/bionic_page.h"
//
// BionicAllocator is a general purpose allocator designed to provide the same
diff --git a/libc/bionic/libc_init_static.cpp b/libc/bionic/libc_init_static.cpp
index 5c1d27e..d2a5334 100644
--- a/libc/bionic/libc_init_static.cpp
+++ b/libc/bionic/libc_init_static.cpp
@@ -39,11 +39,11 @@
#include "libc_init_common.h"
#include "pthread_internal.h"
+#include "platform/bionic/page.h"
#include "private/bionic_call_ifunc_resolver.h"
#include "private/bionic_elf_tls.h"
#include "private/bionic_globals.h"
#include "private/bionic_macros.h"
-#include "private/bionic_page.h"
#include "private/bionic_tls.h"
#include "private/KernelArgumentBlock.h"
diff --git a/libc/private/bionic_page.h b/libc/platform/bionic/page.h
similarity index 92%
rename from libc/private/bionic_page.h
rename to libc/platform/bionic/page.h
index 0beb708..d063a98 100644
--- a/libc/private/bionic_page.h
+++ b/libc/platform/bionic/page.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef _BIONIC_PAGE_H_
-#define _BIONIC_PAGE_H_
+#pragma once
// Get PAGE_SIZE and PAGE_MASK.
#include <sys/user.h>
@@ -29,5 +28,3 @@
// Returns the address of the next page after address 'x', unless 'x' is
// itself at the start of a page.
#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
-
-#endif // _BIONIC_PAGE_H_
diff --git a/libc/private/CFIShadow.h b/libc/private/CFIShadow.h
index 1423d86..84fbea5 100644
--- a/libc/private/CFIShadow.h
+++ b/libc/private/CFIShadow.h
@@ -19,7 +19,7 @@
#include <stdint.h>
-#include "private/bionic_page.h"
+#include "platform/bionic/page.h"
#include "private/bionic_macros.h"
constexpr unsigned kLibraryAlignmentBits = 18;