diff options
author | Ben Cheng <bccheng@google.com> | 2013-11-26 16:25:30 -0800 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2013-12-03 14:11:35 -0800 |
commit | 01135f8bd36ae488422c1edb6066b93ea4172f42 (patch) | |
tree | 8a04084cd020c473f49393f16a529f5096102d31 /0.153 | |
parent | 2083d2c3bbf1ead07c37334373c9b426cc51dde5 (diff) | |
download | android_external_elfutils-01135f8bd36ae488422c1edb6066b93ea4172f42.tar.gz android_external_elfutils-01135f8bd36ae488422c1edb6066b93ea4172f42.tar.bz2 android_external_elfutils-01135f8bd36ae488422c1edb6066b93ea4172f42.zip |
Cleanup elfutil patches needed by bionic.
Change-Id: Ie1800c782657e6bdfbc818d711fbd8f066c5aaf6
Diffstat (limited to '0.153')
-rw-r--r-- | 0.153/bionic-fixup/AndroidFixup.h | 39 | ||||
-rw-r--r-- | 0.153/bionic-fixup/libintl.h | 5 | ||||
-rw-r--r-- | 0.153/bionic-fixup/stdio_ext.h | 22 |
3 files changed, 19 insertions, 47 deletions
diff --git a/0.153/bionic-fixup/AndroidFixup.h b/0.153/bionic-fixup/AndroidFixup.h index 6a58eda3..be88af89 100644 --- a/0.153/bionic-fixup/AndroidFixup.h +++ b/0.153/bionic-fixup/AndroidFixup.h @@ -17,8 +17,7 @@ #ifndef ANDROID_FIXUP_H #define ANDROID_FIXUP_H -#include <stdio.h> -#include <libgen.h> // for basename +#include <libgen.h> // for basename #define off_t loff_t @@ -30,18 +29,16 @@ #define MIN(x,y) ((x) < (y) ? (x) : (y)) #endif -#ifndef powerof2 -#define powerof2(x) (((x - 1) & (x)) == 0) -#endif - -/* workaround for canonicalize_file_name */ -#define canonicalize_file_name(path) realpath(path, NULL) - -/* workaround for open64 */ -#define open64(path, flags) open(path, ((flags) | O_LARGEFILE)) - -/* no internalization */ -#define gettext(x) (x) +/* workaround for stpcpy */ +static inline char *stpcpy(char *dst, const char *src) +{ + while (*src) { + *dst++ = *src++; + } + // Need to copy the NULL terminator + *dst = *src; + return dst; +} /* _mempcpy and mempcpy */ #ifndef __mempcpy @@ -68,16 +65,10 @@ static inline void *rawmemchr(const void *s, int c) } } -/* workaround for stpcpy */ -static inline char *stpcpy(char *dst, const char *src) -{ - while (*src) { - *dst++ = *src++; - } - return dst; -} +/* workaround for canonicalize_file_name */ +#define canonicalize_file_name(path) realpath(path, NULL) -/* forward declarations */ -char * dgettext (const char * domainname, const char * msgid); +/* workaround for open64 */ +#define open64(path, flags) open(path, ((flags) | O_LARGEFILE)) #endif /* ANDROID_FIXUP_H */ diff --git a/0.153/bionic-fixup/libintl.h b/0.153/bionic-fixup/libintl.h index fe943486..27f5e306 100644 --- a/0.153/bionic-fixup/libintl.h +++ b/0.153/bionic-fixup/libintl.h @@ -17,6 +17,9 @@ #ifndef ELFUTILS_LIBINTL_H #define ELFUTILS_LIBINTL_H -/* intentionally blank */ +/* no internalization */ +#define gettext(x) (x) + +char * dgettext (const char * domainname, const char * msgid); #endif /* ELFUTILS_LIBINTL_H */ diff --git a/0.153/bionic-fixup/stdio_ext.h b/0.153/bionic-fixup/stdio_ext.h deleted file mode 100644 index 254e19b0..00000000 --- a/0.153/bionic-fixup/stdio_ext.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2013, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ELFUTILS_BIONIC_FIXUP_STDIO_EXT_H -#define ELFUTILS_BIONIC_FIXUP_STDIO_EXT_H - -/* intentionally blank */ - -#endif /* ELFUTILS_BIONIC_FIXUP_STDIO_EXT_H */ |