diff options
author | Patrick Scott <phanna@android.com> | 2010-10-01 11:39:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-01 11:39:15 -0700 |
commit | 861ae25ee467b1c61efac79b19f3f072b2380669 (patch) | |
tree | 9c16dadf1f8b024c1613cf10fb4e8b6d8826e7b7 | |
parent | 3f7126408d27e1125110468d0fbdf0eeb446fefe (diff) | |
parent | 49139a52abc21019da7fcbafdef393ad960ea0e2 (diff) | |
download | external_chromium-861ae25ee467b1c61efac79b19f3f072b2380669.zip external_chromium-861ae25ee467b1c61efac79b19f3f072b2380669.tar.gz external_chromium-861ae25ee467b1c61efac79b19f3f072b2380669.tar.bz2 |
Merge "Build fixes for the simulator."
-rw-r--r-- | Android.mk | 25 | ||||
-rwxr-xr-x | android/generateAndroidForwardingHeader.pl | 2 | ||||
-rw-r--r-- | base/file_path.h | 2 | ||||
-rw-r--r-- | base/file_util_android.cc | 2 | ||||
-rw-r--r-- | net/base/file_stream_posix.cc | 6 | ||||
-rw-r--r-- | net/base/net_util.cc | 2 | ||||
-rw-r--r-- | third_party/libevent/select.c | 2 |
7 files changed, 24 insertions, 17 deletions
@@ -1,5 +1,3 @@ -ifneq ($(TARGET_SIMULATOR),true) - LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -329,13 +327,9 @@ LOCAL_SRC_FILES += \ third_party/libjingle/source/talk/xmllite/xmlparser.cc \ third_party/libjingle/source/talk/xmllite/xmlprinter.cc -# external/chromium/android is a directory to intercept stl headers that we do -# not support yet. LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/android \ $(LOCAL_PATH)/chrome \ $(LOCAL_PATH)/chrome/browser \ - $(LOCAL_PATH)/sdch/linux \ $(LOCAL_PATH)/sdch/open-vcdiff/src \ $(LOCAL_PATH)/third_party/libevent/compat \ external/expat \ @@ -348,8 +342,6 @@ LOCAL_C_INCLUDES := \ external/webkit/WebKit/android \ external/zlib \ external \ - bionic \ - bionic/libc/include \ $(LOCAL_PATH)/base/third_party/dmg_fp \ $(LOCAL_PATH)/third_party/icu/public/common \ $(LOCAL_PATH)/third_party/libevent/android \ @@ -404,9 +396,20 @@ LOCAL_GENERATED_SOURCES += $(GEN) LOCAL_SRC_FILES += $(LOCAL_GENERATED_SOURCES) -include external/stlport/libstlport.mk +LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -fvisibility=hidden -DEXPAT_RELATIVE_PATH -LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -include "android/prefix.h" -fvisibility=hidden -DEXPAT_RELATIVE_PATH +ifneq ($(TARGET_SIMULATOR),true) +# Just a few definitions not provided by bionic. +LOCAL_CFLAGS += -include "android/prefix.h" -include $(BUILD_STATIC_LIBRARY) +# external/chromium/android is a directory to intercept stl headers that we do +# not support yet. +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/android \ + $(LOCAL_C_INCLUDES) + +# Including this will modify the include path +include external/stlport/libstlport.mk endif + +include $(BUILD_STATIC_LIBRARY) diff --git a/android/generateAndroidForwardingHeader.pl b/android/generateAndroidForwardingHeader.pl index 39df21f..6984200 100755 --- a/android/generateAndroidForwardingHeader.pl +++ b/android/generateAndroidForwardingHeader.pl @@ -60,7 +60,7 @@ my$ header = "// This file has been generated by generateAndroidForwardingHeader $forward =~ m/(.*)\//s; mkpath($1); $guard = $forward; -$guard =~ s/[\.\/\\]/_/g; +$guard =~ s/[\.\/\\-]/_/g; open(my $handle, ">", $forward) or die $!; print $handle "$copyright\n"; print $handle "$header\n\n\n"; diff --git a/base/file_path.h b/base/file_path.h index e14655c..6887cdc 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -367,7 +367,7 @@ class FilePath { // Provide a hash function so that hash_sets and maps can contain FilePath // objects. #if defined(COMPILER_GCC) -namespace std { +namespace __gnu_cxx { template<> struct hash<FilePath> { diff --git a/base/file_util_android.cc b/base/file_util_android.cc index 59fb2de..e101e34 100644 --- a/base/file_util_android.cc +++ b/base/file_util_android.cc @@ -49,8 +49,10 @@ _mktemp(char *path) return(_gettemp(path, (int *)NULL, 0, 0) ? path : (char *)NULL); } +#ifdef __BIONIC__ __warn_references(mktemp, "warning: mktemp() possibly used unsafely; consider using mkstemp()"); +#endif char * mktemp(char *path) diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc index 6b2656a..b83729a 100644 --- a/net/base/file_stream_posix.cc +++ b/net/base/file_stream_posix.cc @@ -26,9 +26,11 @@ #include "net/base/net_errors.h" // We cast back and forth, so make sure it's the size we're expecting. -//COMPILE_ASSERT(sizeof(int64) == sizeof(off_t), off_t_64_bit); +#ifdef __BIONIC__ COMPILE_ASSERT(sizeof(int32) == sizeof(off_t), off_t_32_bit); -// I don't tink this will be a problem for now +#else +COMPILE_ASSERT(sizeof(int64) == sizeof(off_t), off_t_64_bit); +#endif // Make sure our Whence mappings match the system headers. COMPILE_ASSERT(net::FROM_BEGIN == SEEK_SET && diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 4accc49..b0715e3 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -67,7 +67,7 @@ #include "unicode/datefmt.h" -#ifdef ANDROID +#ifdef __BIONIC__ #include "netinet/in6.h" #endif diff --git a/third_party/libevent/select.c b/third_party/libevent/select.c index 778cfd7..65e5997 100644 --- a/third_party/libevent/select.c +++ b/third_party/libevent/select.c @@ -61,7 +61,7 @@ #endif //#ifndef _EVENT_HAVE_FD_MASK -#ifdef ANDROID +#ifdef __BIONIC__ /* This type is mandatory, but Android doesn't define it. */ #undef NFDBITS #define NFDBITS (sizeof(long)*8) |