Don't expose non-standard basename_r and dirname_r in LP64.

Bug: 17407423
Change-Id: I47fe499a4c396bf09d7b78fd828728d04777398b
This commit is contained in:
Elliott Hughes
2014-09-05 16:12:42 -07:00
parent 5beddb7d64
commit f0e9458ea5
3 changed files with 28 additions and 37 deletions

View File

@@ -64,7 +64,7 @@ TEST(libgen, dirname) {
TestDirname("/", "/");
}
#if defined(__BIONIC__)
#if defined(__BIONIC__) && !defined(__LP64__)
static void TestBasename(const char* in, const char* expected_out, int expected_rc,
char* buf, size_t buf_size, int expected_errno) {
errno = 0;
@@ -89,7 +89,7 @@ static void TestDirname(const char* in, const char* expected_out, int expected_r
#endif // __BIONIC__
TEST(libgen, basename_r) {
#if defined(__BIONIC__)
#if defined(__BIONIC__) && !defined(__LP64__)
char buf[256];
TestBasename("", ".", 1, NULL, 0, 0);
TestBasename("", ".", -1, buf, 0, ERANGE);
@@ -108,7 +108,7 @@ TEST(libgen, basename_r) {
}
TEST(libgen, dirname_r) {
#if defined(__BIONIC__)
#if defined(__BIONIC__) && !defined(__LP64__)
char buf[256];
TestDirname("", ".", 1, NULL, 0, 0);
TestDirname("", ".", -1, buf, 0, ERANGE);