1414#include " FileFinder.h"
1515#include " CacheUpdater.h"
1616
17+ #if HAVE_PRINTF_ZD
18+ # define ZD " %zd"
19+ # define ZD_TYPE ssize_t
20+ #else
21+ # define ZD " %ld"
22+ # define ZD_TYPE long
23+ #endif
24+
1725#define NOISY (x ) // x
1826
1927// ==========================================================================
@@ -566,11 +574,11 @@ static bool applyFileOverlay(Bundle *bundle,
566574 DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > baseFiles =
567575 baseGroup->getFiles ();
568576 for (size_t i=0 ; i < baseFiles.size (); i++) {
569- printf (" baseFile %zd has flavor %s\n " , i,
577+ printf (" baseFile " ZD " has flavor %s\n " , (ZD_TYPE) i,
570578 baseFiles.keyAt (i).toString ().string ());
571579 }
572580 for (size_t i=0 ; i < overlayFiles.size (); i++) {
573- printf (" overlayFile %zd has flavor %s\n " , i,
581+ printf (" overlayFile " ZD " has flavor %s\n " , (ZD_TYPE) i,
574582 overlayFiles.keyAt (i).toString ().string ());
575583 }
576584 }
@@ -584,8 +592,8 @@ static bool applyFileOverlay(Bundle *bundle,
584592 keyAt (overlayGroupIndex));
585593 if (baseFileIndex < UNKNOWN_ERROR) {
586594 if (bundle->getVerbose ()) {
587- printf (" found a match (%zd ) for overlay file %s, for flavor %s\n " ,
588- baseFileIndex,
595+ printf (" found a match (" ZD " ) for overlay file %s, for flavor %s\n " ,
596+ (ZD_TYPE) baseFileIndex,
589597 overlayGroup->getLeaf ().string (),
590598 overlayFiles.keyAt (overlayGroupIndex).toString ().string ());
591599 }
0 commit comments