]> git.saurik.com Git - android/aapt.git/commitdiff
Change assets to use 64-bit API
authorKenny Root <kroot@google.com>
Wed, 24 Nov 2010 20:56:06 +0000 (12:56 -0800)
committerKenny Root <kroot@google.com>
Wed, 8 Dec 2010 19:21:30 +0000 (11:21 -0800)
The asset system and supporting libraries were using off_t instead of
off64_t to access files larger than 2GB (32-bit signed). This change
replaces all off_t with off64_t and lseek64.

There is a new utils/Compat.h added for Mac OS compatibility.

Also fixed some size-related compiler warnings.

Bug: 3205336
Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e

Package.cpp
Resource.cpp
StringPool.cpp

index faae89ba29b216643533ad540b3b34c3e8310343..ab71f34b3c8fe5122d95484439d0bcea1abc9581 100644 (file)
@@ -461,7 +461,7 @@ ssize_t processJarFiles(Bundle* bundle, ZipFile* zip)
         ZipFile jar;
         err = jar.open(jars[i], ZipFile::kOpenReadOnly);
         if (err != 0) {
-            fprintf(stderr, "ERROR: unable to open '%s' as a zip file: %zd\n",
+            fprintf(stderr, "ERROR: unable to open '%s' as a zip file: %d\n",
                 jars[i], err);
             return err;
         }
index 7b745066548e36f2d406ca72723f3943b3ac1830..4614d6fd3bff1ad70ff737baaf296112a6793ab8 100644 (file)
@@ -542,11 +542,11 @@ static bool applyFileOverlay(Bundle *bundle,
                         DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > baseFiles =
                                 baseGroup->getFiles();
                         for (size_t i=0; i < baseFiles.size(); i++) {
-                            printf("baseFile %d has flavor %s\n", i,
+                            printf("baseFile %zd has flavor %s\n", i,
                                     baseFiles.keyAt(i).toString().string());
                         }
                         for (size_t i=0; i < overlayFiles.size(); i++) {
-                            printf("overlayFile %d has flavor %s\n", i,
+                            printf("overlayFile %zd has flavor %s\n", i,
                                     overlayFiles.keyAt(i).toString().string());
                         }
                     }
@@ -560,7 +560,7 @@ static bool applyFileOverlay(Bundle *bundle,
                                 keyAt(overlayGroupIndex));
                         if(baseFileIndex < UNKNOWN_ERROR) {
                             if (bundle->getVerbose()) {
-                                printf("found a match (%d) for overlay file %s, for flavor %s\n",
+                                printf("found a match (%zd) for overlay file %s, for flavor %s\n",
                                         baseFileIndex,
                                         overlayGroup->getLeaf().string(),
                                         overlayFiles.keyAt(overlayGroupIndex).toString().string());
index e28bdff410b0a9a28e9978129c1e6e28a956d795..d067d59006c66140f88339f6ea717bf0dcc05f8c 100644 (file)
@@ -30,7 +30,7 @@ void printStringPool(const ResStringPool* pool)
             str = String8(pool->stringAt(s, &len)).string();
         }
 
-        printf("String #%d: %s\n", s, str);
+        printf("String #%zd: %s\n", s, str);
     }
 }