Merge "Prefer __BIONIC_DEPRECATED_PAGE_SIZE_MACRO" into main am: 117478dd4e

Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031891

Change-Id: Iae5942153997783191260723890ba27203ef992e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Steven Moreland 2024-04-10 21:05:38 +00:00 committed by Automerger Merge Worker
commit 966616ee8f

View file

@ -32,7 +32,16 @@
__BEGIN_DECLS __BEGIN_DECLS
#if !defined(__BIONIC_NO_PAGE_SIZE_MACRO) || defined(__BIONIC_DEPRECATED_PAGE_SIZE_MACRO) // PAGE_SIZE is going away in Android. Prefer getpagesize() instead.
//
// For more info, see https://developer.android.com/16kb-page-size.
//
// To restore the original behavior, use __BIONIC_DEPRECATED_PAGE_SIZE_MACRO.
#if (defined(__NDK_MAJOR__) && __NDK_MAJOR__ <= 27 && !defined(__BIONIC_NO_PAGE_SIZE_MACRO)) \
|| defined(__BIONIC_DEPRECATED_PAGE_SIZE_MACRO) \
|| defined(__arm__) \
|| defined(__i386__)
#define PAGE_SIZE 4096 #define PAGE_SIZE 4096
#define PAGE_MASK (~(PAGE_SIZE - 1)) #define PAGE_MASK (~(PAGE_SIZE - 1))
#endif #endif