Fix issues that will be present in C++11
- char16_t is a distinct type, so stay consistent
with it throughout the code base.
- char16_t is defined as minimum size of 16 bits.
Since we mmap and cast data structures onto raw memory,
we need a precise definition (uint16_t), so we cast between
that (and static_assert that they are the same size).
Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
diff --git a/libs/androidfw/Android.mk b/libs/androidfw/Android.mk
index dbee7ed..20d5470 100644
--- a/libs/androidfw/Android.mk
+++ b/libs/androidfw/Android.mk
@@ -14,7 +14,7 @@
LOCAL_PATH:= $(call my-dir)
-# libandroidfw is partially built for the host (used by obbtool and others)
+# libandroidfw is partially built for the host (used by obbtool, aapt, and others)
# These files are common to host and target builds.
commonSources := \
@@ -35,26 +35,17 @@
BackupHelpers.cpp \
CursorWindow.cpp
-hostSources := \
- $(commonSources)
+hostSources := $(commonSources)
# For the host
# =====================================================
-
include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= $(hostSources)
-
LOCAL_MODULE:= libandroidfw
-
LOCAL_MODULE_TAGS := optional
-
LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
-
-LOCAL_C_INCLUDES := \
- external/zlib
-
-LOCAL_STATIC_LIBRARIES := liblog libziparchive-host libutils
+LOCAL_SRC_FILES:= $(hostSources)
+LOCAL_C_INCLUDES := external/zlib
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -64,8 +55,13 @@
include $(CLEAR_VARS)
+LOCAL_MODULE:= libandroidfw
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:= $(deviceSources)
-
+LOCAL_C_INCLUDES := \
+ external/zlib \
+ system/core/include
+LOCAL_STATIC_LIBRARIES := libziparchive
LOCAL_SHARED_LIBRARIES := \
libbinder \
liblog \
@@ -73,16 +69,6 @@
libutils \
libz
-LOCAL_STATIC_LIBRARIES := libziparchive
-
-LOCAL_C_INCLUDES := \
- external/zlib \
- system/core/include
-
-LOCAL_MODULE:= libandroidfw
-
-LOCAL_MODULE_TAGS := optional
-
include $(BUILD_SHARED_LIBRARY)