Merge "Merge "AAPT fix printf %zd crash on Windows". Do not merge." into ics-mr1
This commit is contained in:
@@ -14,6 +14,14 @@
|
|||||||
#include "FileFinder.h"
|
#include "FileFinder.h"
|
||||||
#include "CacheUpdater.h"
|
#include "CacheUpdater.h"
|
||||||
|
|
||||||
|
#if HAVE_PRINTF_ZD
|
||||||
|
# define ZD "%zd"
|
||||||
|
# define ZD_TYPE ssize_t
|
||||||
|
#else
|
||||||
|
# define ZD "%ld"
|
||||||
|
# define ZD_TYPE long
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NOISY(x) // x
|
#define NOISY(x) // x
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@@ -566,11 +574,11 @@ static bool applyFileOverlay(Bundle *bundle,
|
|||||||
DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > baseFiles =
|
DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > baseFiles =
|
||||||
baseGroup->getFiles();
|
baseGroup->getFiles();
|
||||||
for (size_t i=0; i < baseFiles.size(); i++) {
|
for (size_t i=0; i < baseFiles.size(); i++) {
|
||||||
printf("baseFile %zd has flavor %s\n", i,
|
printf("baseFile " ZD " has flavor %s\n", (ZD_TYPE) i,
|
||||||
baseFiles.keyAt(i).toString().string());
|
baseFiles.keyAt(i).toString().string());
|
||||||
}
|
}
|
||||||
for (size_t i=0; i < overlayFiles.size(); i++) {
|
for (size_t i=0; i < overlayFiles.size(); i++) {
|
||||||
printf("overlayFile %zd has flavor %s\n", i,
|
printf("overlayFile " ZD " has flavor %s\n", (ZD_TYPE) i,
|
||||||
overlayFiles.keyAt(i).toString().string());
|
overlayFiles.keyAt(i).toString().string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -584,8 +592,8 @@ static bool applyFileOverlay(Bundle *bundle,
|
|||||||
keyAt(overlayGroupIndex));
|
keyAt(overlayGroupIndex));
|
||||||
if (baseFileIndex < UNKNOWN_ERROR) {
|
if (baseFileIndex < UNKNOWN_ERROR) {
|
||||||
if (bundle->getVerbose()) {
|
if (bundle->getVerbose()) {
|
||||||
printf("found a match (%zd) for overlay file %s, for flavor %s\n",
|
printf("found a match (" ZD ") for overlay file %s, for flavor %s\n",
|
||||||
baseFileIndex,
|
(ZD_TYPE) baseFileIndex,
|
||||||
overlayGroup->getLeaf().string(),
|
overlayGroup->getLeaf().string(),
|
||||||
overlayFiles.keyAt(overlayGroupIndex).toString().string());
|
overlayFiles.keyAt(overlayGroupIndex).toString().string());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
|
|
||||||
#include <utils/ByteOrder.h>
|
#include <utils/ByteOrder.h>
|
||||||
|
|
||||||
|
#if HAVE_PRINTF_ZD
|
||||||
|
# define ZD "%zd"
|
||||||
|
# define ZD_TYPE ssize_t
|
||||||
|
#else
|
||||||
|
# define ZD "%ld"
|
||||||
|
# define ZD_TYPE long
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NOISY(x) //x
|
#define NOISY(x) //x
|
||||||
|
|
||||||
void strcpy16_htod(uint16_t* dst, const uint16_t* src)
|
void strcpy16_htod(uint16_t* dst, const uint16_t* src)
|
||||||
@@ -30,7 +38,7 @@ void printStringPool(const ResStringPool* pool)
|
|||||||
str = String8(pool->stringAt(s, &len)).string();
|
str = String8(pool->stringAt(s, &len)).string();
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("String #%zd: %s\n", s, str);
|
printf("String #" ZD ": %s\n", (ZD_TYPE) s, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user