Consistently use #if defined(__BIONIC__) in tests.

I've also switched some tests to be positive rather than negative,
because !defined is slightly harder to reason about and there are
only two cases: bionic and glibc.

Change-Id: I8d3ac40420ca5aead3e88c69cf293f267273c8ef
This commit is contained in:
Elliott Hughes
2014-05-13 11:19:57 -07:00
parent a26dd781fe
commit 063525c61d
11 changed files with 22 additions and 22 deletions

View File

@@ -18,7 +18,7 @@
#include <sys/resource.h>
#if __GLIBC__
#if defined(__GLIBC__)
/* The host glibc we're currently building with doesn't have prlimit64 yet. */
static int prlimit64(pid_t, int resource, const struct rlimit64* new_limit, struct rlimit64* old_limit) {
if (new_limit != NULL) {
@@ -30,7 +30,7 @@ static int prlimit64(pid_t, int resource, const struct rlimit64* new_limit, stru
#endif
TEST(sys_resource, smoke) {
#if __LP64__ || __GLIBC__
#if defined(__LP64__) || defined(__GLIBC__)
ASSERT_EQ(sizeof(rlimit), sizeof(rlimit64));
ASSERT_EQ(8U, sizeof(rlim_t));
#else