diff options
author | Elliott Hughes <enh@google.com> | 2015-02-17 20:59:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-17 20:59:15 +0000 |
commit | a18b309395beb83ab26a8499d35c771016a3cadd (patch) | |
tree | 2bd2aa6e84c7c59fd67c3dc44ab1db0889cc92ef | |
parent | cb9844add29614cd9e36fe1aeee5fecfa02522a3 (diff) | |
parent | 5cb12756f3876faa52b0d4491745fc4c7adbab00 (diff) | |
download | android_external_elfutils-a18b309395beb83ab26a8499d35c771016a3cadd.tar.gz android_external_elfutils-a18b309395beb83ab26a8499d35c771016a3cadd.tar.bz2 android_external_elfutils-a18b309395beb83ab26a8499d35c771016a3cadd.zip |
am 5cb12756: Merge "Clean up the libelf hacks."
* commit '5cb12756f3876faa52b0d4491745fc4c7adbab00':
Clean up the libelf hacks.
-rw-r--r-- | 0.153/bionic-fixup/error.h | 36 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/AndroidFixup.h | 97 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/argp.h | 22 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/byteswap.h | 37 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/endian.h | 24 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/error.h | 22 | ||||
-rw-r--r-- | 0.153/host-darwin-fixup/libintl.h | 22 | ||||
-rw-r--r-- | 0.153/host-linux-fixup/AndroidFixup.h | 22 | ||||
-rwxr-xr-x | 0.153/libdw/Android.mk | 5 | ||||
-rwxr-xr-x | 0.153/libdwfl/Android.mk | 5 | ||||
-rwxr-xr-x | 0.153/libebl/Android.mk | 4 | ||||
-rwxr-xr-x | 0.153/libelf/Android.mk | 5 |
12 files changed, 0 insertions, 301 deletions
diff --git a/0.153/bionic-fixup/error.h b/0.153/bionic-fixup/error.h deleted file mode 100644 index 1fcd9378..00000000 --- a/0.153/bionic-fixup/error.h +++ /dev/null @@ -1,36 +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_ERROR_H -#define ELFUTILS_ERROR_H - -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> - -static inline void __attribute__((noreturn)) -error(int status, int errnum, const char *fmt, ...) -{ - va_list lst; - va_start(lst, fmt); - vfprintf(stderr, fmt, lst); - fprintf(stderr, "error %d: %s\n", errnum, strerror(errno)); - va_end(lst); - exit(status); -} - -#endif /* ELFUTILS_ERROR_H */ diff --git a/0.153/host-darwin-fixup/AndroidFixup.h b/0.153/host-darwin-fixup/AndroidFixup.h deleted file mode 100644 index 0d43c0bc..00000000 --- a/0.153/host-darwin-fixup/AndroidFixup.h +++ /dev/null @@ -1,97 +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 ANDROID_FIXUP_H -#define ANDROID_FIXUP_H - -#define loff_t off_t -#define off64_t off_t - -#include <string.h> -#include <stdarg.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> -#include <locale.h> //LC_MESSAGES - -#ifndef TEMP_FAILURE_RETRY -#define TEMP_FAILURE_RETRY(exp) ({ \ - typeof (exp) _rc; \ - do { \ - _rc = (exp); \ - } while (_rc == -1 && errno == EINTR); \ - _rc; }) -#endif - -#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 -static inline size_t strnlen (const char *__string, size_t __maxlen) -{ - int len = 0; - while (__maxlen-- && *__string++) - len++; - return len; -} -#endif - -static inline void *mempcpy (void * __dest, const void * __src, size_t __n) -{ - memcpy(__dest, __src, __n); - return ((char *)__dest) + __n; -} - -#define __mempcpy mempcpy - -#define dgettext(domainname, msgid) dcgettext (domainname, msgid, LC_MESSAGES) - -static inline void __attribute__((noreturn)) error(int status, int errnum, const char *fmt, ...) -{ - va_list lst; - va_start(lst, fmt); - vfprintf(stderr, fmt, lst); - fprintf(stderr, "error %d: %s\n", errnum, strerror(errno)); - va_end(lst); - exit(status); -} - -static inline char *dcgettext (char *__domainname, char *__msgid, int __category) -{ - error(EXIT_FAILURE, 0, "%s not implemented!", __FUNCTION__); - return NULL; -} - -/* workaround for canonicalize_file_name */ -#define canonicalize_file_name(path) realpath(path, NULL) - -/* workaround for open64 */ -#define open64(path, flags) open(path, flags) - -/* rawmemchr */ -static inline void *rawmemchr(const void *s, int c) -{ - const unsigned char *ptr = s; - while (1) { - if (*ptr == c) return (void *) ptr; - ptr++; - } -} - -#define strndup(str, size) strdup(str) - -static void tdestroy(void *root, void (*free_node)(void *nodep)) -{ -} - -#endif /* ANDROID_FIXUP_H */ diff --git a/0.153/host-darwin-fixup/argp.h b/0.153/host-darwin-fixup/argp.h deleted file mode 100644 index 8a8e1bbe..00000000 --- a/0.153/host-darwin-fixup/argp.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_ARGP_H -#define ELFUTILS_ARGP_H - -/* intentionally blank */ - -#endif /* ELFUTILS_ARGP_H */ diff --git a/0.153/host-darwin-fixup/byteswap.h b/0.153/host-darwin-fixup/byteswap.h deleted file mode 100644 index a8d27d4f..00000000 --- a/0.153/host-darwin-fixup/byteswap.h +++ /dev/null @@ -1,37 +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_BYTESWAP_H -#define ELFUTILS_BYTESWAP_H - -static inline unsigned short bswap_16(unsigned short val) -{ - return ((val & 0xff) << 8) | ((val >> 8) & 0xff); -} - -static inline unsigned long bswap_32(unsigned long val) -{ - return bswap_16((unsigned short)val) << 16 | - bswap_16((unsigned short)(val >> 16)); -} - -static inline unsigned long long bswap_64(unsigned long long val) -{ - return ((((unsigned long long)bswap_32(val)) << 32) | - (((unsigned long long)bswap_32(val >> 32)) & 0xffffffffULL)); -} - -#endif /* ELFUTILS_BYTESWAP_H */ diff --git a/0.153/host-darwin-fixup/endian.h b/0.153/host-darwin-fixup/endian.h deleted file mode 100644 index 14bb32df..00000000 --- a/0.153/host-darwin-fixup/endian.h +++ /dev/null @@ -1,24 +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_ENDIAN_H -#define ELFUTILS_ENDIAN_H - -#define __LITTLE_ENDIAN (1234) -#define __BIG_ENDIAN (4321) -#define __BYTE_ORDER __LITTLE_ENDIAN - -#endif /* ELFUTILS_ENDIAN_H */ diff --git a/0.153/host-darwin-fixup/error.h b/0.153/host-darwin-fixup/error.h deleted file mode 100644 index 3c9569fd..00000000 --- a/0.153/host-darwin-fixup/error.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_ERROR_H -#define ELFUTILS_ERROR_H - -/* intentionally blank */ - -#endif /* ELFUTILS_ERROR_H */ diff --git a/0.153/host-darwin-fixup/libintl.h b/0.153/host-darwin-fixup/libintl.h deleted file mode 100644 index fe943486..00000000 --- a/0.153/host-darwin-fixup/libintl.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_LIBINTL_H -#define ELFUTILS_LIBINTL_H - -/* intentionally blank */ - -#endif /* ELFUTILS_LIBINTL_H */ diff --git a/0.153/host-linux-fixup/AndroidFixup.h b/0.153/host-linux-fixup/AndroidFixup.h deleted file mode 100644 index ea4d5a1f..00000000 --- a/0.153/host-linux-fixup/AndroidFixup.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 ANDROID_FIXUP_H -#define ANDROID_FIXUP_H - -/* intentionally blank */ - -#endif /* ANDROID_FIXUP_H */ diff --git a/0.153/libdw/Android.mk b/0.153/libdw/Android.mk index c951b1f9..df14cbaf 100755 --- a/0.153/libdw/Android.mk +++ b/0.153/libdw/Android.mk @@ -136,13 +136,8 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../libdw \ $(LOCAL_PATH)/../libelf -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../host-$(HOST_OS)-fixup - LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -DIS_LIBDW -# to fix machine-dependent issues -LOCAL_CFLAGS += -include $(LOCAL_PATH)/../host-$(HOST_OS)-fixup/AndroidFixup.h - # to suppress the "pointer of type ‘void *’ used in arithmetic" warning LOCAL_CFLAGS += -Wno-pointer-arith diff --git a/0.153/libdwfl/Android.mk b/0.153/libdwfl/Android.mk index f4172476..ca2983fa 100755 --- a/0.153/libdwfl/Android.mk +++ b/0.153/libdwfl/Android.mk @@ -61,16 +61,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../libdw \ $(LOCAL_PATH)/../libelf -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../host-$(HOST_OS)-fixup - LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE # to suppress the "pointer of type ‘void *’ used in arithmetic" warning LOCAL_CFLAGS += -Wno-pointer-arith -# to fix machine-dependent issues -LOCAL_CFLAGS += -include $(LOCAL_PATH)/../host-$(HOST_OS)-fixup/AndroidFixup.h - # Asserts are not compiled, so some debug variables appear unused. Rather than # fix, we prefer to turn off the warning locally. LOCAL_CFLAGS += -Wno-unused-but-set-variable diff --git a/0.153/libebl/Android.mk b/0.153/libebl/Android.mk index 58b6d0d6..440d328c 100755 --- a/0.153/libebl/Android.mk +++ b/0.153/libebl/Android.mk @@ -81,12 +81,8 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../libelf \ $(LOCAL_PATH)/../libdw -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../host-$(HOST_OS)-fixup - LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE -LOCAL_CFLAGS += -include $(LOCAL_PATH)/../host-$(HOST_OS)-fixup/AndroidFixup.h - LOCAL_CLANG := false LOCAL_MODULE:= libebl diff --git a/0.153/libelf/Android.mk b/0.153/libelf/Android.mk index 1a8f94ad..10efc642 100755 --- a/0.153/libelf/Android.mk +++ b/0.153/libelf/Android.mk @@ -145,16 +145,11 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../lib \ $(LOCAL_PATH)/../libelf -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../host-$(HOST_OS)-fixup - LOCAL_CFLAGS += -DHAVE_CONFIG_H -std=gnu99 -D_GNU_SOURCE # to suppress the "pointer of type ‘void *’ used in arithmetic" warning LOCAL_CFLAGS += -Wno-pointer-arith -# to fix machine-dependent issues -LOCAL_CFLAGS += -include $(LOCAL_PATH)/../host-$(HOST_OS)-fixup/AndroidFixup.h - LOCAL_MODULE := libelf include $(BUILD_HOST_STATIC_LIBRARY) |