diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index b500a6b..34dc9fe 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <getopt.h>
+#include <inttypes.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stdbool.h>
@@ -368,7 +369,7 @@
 static bool setTagsProperty(uint64_t tags)
 {
     char buf[64];
-    snprintf(buf, 64, "%#llx", tags);
+    snprintf(buf, 64, "%#" PRIx64, tags);
     if (property_set(k_traceTagsProperty, buf) < 0) {
         fprintf(stderr, "error setting trace tags system property\n");
         return false;
@@ -665,7 +666,7 @@
     close(traceFD);
 }
 
-static void handleSignal(int signo)
+static void handleSignal(int /*signo*/)
 {
     if (!g_nohup) {
         g_traceAborted = true;
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index fe716ac..670e09c 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -469,7 +469,7 @@
         if (!mkdir(anr_traces_dir, 0775)) {
             chown(anr_traces_dir, AID_SYSTEM, AID_SYSTEM);
             chmod(anr_traces_dir, 0775);
-            if (selinux_android_restorecon(anr_traces_dir) == -1) {
+            if (selinux_android_restorecon(anr_traces_dir, 0) == -1) {
                 fprintf(stderr, "restorecon failed for %s: %s\n", anr_traces_dir, strerror(errno));
             }
         } else if (errno != EEXIST) {
diff --git a/cmds/flatland/Composers.cpp b/cmds/flatland/Composers.cpp
index 15cdb29..1173a81 100644
--- a/cmds/flatland/Composers.cpp
+++ b/cmds/flatland/Composers.cpp
@@ -122,12 +122,12 @@
     virtual void tearDown() {
     }
 
-    virtual bool compose(GLuint texName, const sp<GLConsumer>& glc) {
+    virtual bool compose(GLuint /*texName*/, const sp<GLConsumer>& /*glc*/) {
         return true;
     }
 
 protected:
-    virtual bool setUp(GLHelper* helper) {
+    virtual bool setUp(GLHelper* /*helper*/) {
         return true;
     }
 
diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp
index 42694b3..05d082b 100644
--- a/cmds/flatland/GLHelper.cpp
+++ b/cmds/flatland/GLHelper.cpp
@@ -332,7 +332,7 @@
 
 static void printShaderSource(const char* const* src) {
     for (size_t i = 0; i < MAX_SHADER_LINES && src[i] != NULL; i++) {
-        fprintf(stderr, "%3d: %s\n", i+1, src[i]);
+        fprintf(stderr, "%3zu: %s\n", i+1, src[i]);
     }
 }
 
diff --git a/cmds/flatland/Main.cpp b/cmds/flatland/Main.cpp
index d6ac3d2..c0e5b3d 100644
--- a/cmds/flatland/Main.cpp
+++ b/cmds/flatland/Main.cpp
@@ -600,7 +600,7 @@
 
     uint32_t runHeight = b.runHeights[run];
     uint32_t runWidth = b.width * runHeight / b.height;
-    printf(" %-*s | %4d x %4d | ", g_BenchmarkNameLen, b.name,
+    printf(" %-*s | %4d x %4d | ", static_cast<int>(g_BenchmarkNameLen), b.name,
             runWidth, runHeight);
     fflush(stdout);
 
@@ -690,8 +690,9 @@
     size_t len = strlen(scenario);
     size_t leftPad = (g_BenchmarkNameLen - len) / 2;
     size_t rightPad = g_BenchmarkNameLen - len - leftPad;
-    printf(" %*s%s%*s | Resolution  | Time (ms)\n", leftPad, "",
-            "Scenario", rightPad, "");
+    printf(" %*s%s%*s | Resolution  | Time (ms)\n",
+            static_cast<int>(leftPad), "",
+            "Scenario", static_cast<int>(rightPad), "");
 }
 
 // Run ALL the benchmarks!
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index e9d6b15..12e8cd1 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -1,19 +1,20 @@
 /*
 ** Copyright 2008, The Android Open Source Project
 **
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
 
+#include <inttypes.h>
 #include <sys/capability.h>
 #include "installd.h"
 #include <diskusage/dirsize.h>
@@ -91,7 +92,7 @@
         return -1;
     }
 
-    if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) {
+    if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
         ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
         unlink(libsymlink);
         unlink(pkgdir);
@@ -115,6 +116,8 @@
     if (create_pkg_path(pkgdir, pkgname, PKG_DIR_POSTFIX, userid))
         return -1;
 
+    remove_profile_file(pkgname);
+
     /* delete contents AND directory, no exceptions */
     return delete_dir_contents(pkgdir, 1, NULL);
 }
@@ -155,7 +158,7 @@
     if (stat(pkgdir, &s) < 0) return -1;
 
     if (s.st_uid != 0 || s.st_gid != 0) {
-        ALOGE("fixing uid of non-root pkg: %s %lu %lu\n", pkgdir, s.st_uid, s.st_gid);
+        ALOGE("fixing uid of non-root pkg: %s %" PRIu32 " %" PRIu32 "\n", pkgdir, s.st_uid, s.st_gid);
         return -1;
     }
 
@@ -245,7 +248,7 @@
         return -1;
     }
 
-    if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) {
+    if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
         ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
         unlink(libsymlink);
         unlink(pkgdir);
@@ -557,9 +560,9 @@
         return -1;
     }
 
-    dstlen = srclen + strlen(DALVIK_CACHE_PREFIX) + 
+    dstlen = srclen + strlen(DALVIK_CACHE_PREFIX) +
         strlen(DALVIK_CACHE_POSTFIX) + 1;
-    
+
     if (dstlen > PKG_PATH_MAX) {
         return -1;
     }
@@ -568,7 +571,7 @@
             DALVIK_CACHE_PREFIX,
             src + 1, /* skip the leading / */
             DALVIK_CACHE_POSTFIX);
-    
+
     for(tmp = path + strlen(DALVIK_CACHE_PREFIX); *tmp; tmp++) {
         if (*tmp == '/') {
             *tmp = '@';
@@ -579,8 +582,13 @@
 }
 
 static void run_dexopt(int zip_fd, int odex_fd, const char* input_file_name,
-    const char* output_file_name, const char* dexopt_flags)
+    const char* output_file_name)
 {
+    /* platform-specific flags affecting optimization and verification */
+    char dexopt_flags[PROPERTY_VALUE_MAX];
+    property_get("dalvik.vm.dexopt-flags", dexopt_flags, "");
+    ALOGV("dalvik.vm.dexopt-flags=%s\n", dexopt_flags);
+
     static const char* DEX_OPT_BIN = "/system/bin/dexopt";
     static const int MAX_INT_LEN = 12;      // '-'+10dig+'\0' -OR- 0x+8dig
     char zip_num[MAX_INT_LEN];
@@ -596,36 +604,46 @@
 }
 
 static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
-    const char* output_file_name, const char* dexopt_flags)
+    const char* output_file_name, const char *pkgname)
 {
+    char dex2oat_flags[PROPERTY_VALUE_MAX];
+    property_get("dalvik.vm.dex2oat-flags", dex2oat_flags, "");
+    ALOGV("dalvik.vm.dex2oat-flags=%s\n", dex2oat_flags);
+
     static const char* DEX2OAT_BIN = "/system/bin/dex2oat";
     static const int MAX_INT_LEN = 12;      // '-'+10dig+'\0' -OR- 0x+8dig
     char zip_fd_arg[strlen("--zip-fd=") + MAX_INT_LEN];
     char zip_location_arg[strlen("--zip-location=") + PKG_PATH_MAX];
     char oat_fd_arg[strlen("--oat-fd=") + MAX_INT_LEN];
     char oat_location_arg[strlen("--oat-name=") + PKG_PATH_MAX];
+    char profile_file[strlen("--profile-file=") + PKG_PATH_MAX];
 
     sprintf(zip_fd_arg, "--zip-fd=%d", zip_fd);
     sprintf(zip_location_arg, "--zip-location=%s", input_file_name);
     sprintf(oat_fd_arg, "--oat-fd=%d", oat_fd);
     sprintf(oat_location_arg, "--oat-location=%s", output_file_name);
+    if (strcmp(pkgname, "*") != 0) {
+        snprintf(profile_file, sizeof(profile_file), "--profile-file=%s/%s",
+                 DALVIK_CACHE_PREFIX "profiles", pkgname);
+    } else {
+        strcpy(profile_file, "--no-profile-file");
+    }
 
     ALOGV("Running %s in=%s out=%s\n", DEX2OAT_BIN, input_file_name, output_file_name);
     execl(DEX2OAT_BIN, DEX2OAT_BIN,
           zip_fd_arg, zip_location_arg,
           oat_fd_arg, oat_location_arg,
+          profile_file,
+          strlen(dex2oat_flags) > 0 ? dex2oat_flags : NULL,
           (char*) NULL);
     ALOGE("execl(%s) failed: %s\n", DEX2OAT_BIN, strerror(errno));
 }
 
-static int wait_dexopt(pid_t pid, const char* apk_path)
+static int wait_child(pid_t pid)
 {
     int status;
     pid_t got_pid;
 
-    /*
-     * Wait for the optimization process to finish.
-     */
     while (1) {
         got_pid = waitpid(pid, &status, 0);
         if (got_pid == -1 && errno == EINTR) {
@@ -641,21 +659,18 @@
     }
 
     if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
-        ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
         return 0;
     } else {
-        ALOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
-            apk_path, status);
         return status;      /* always nonzero */
     }
 }
 
-int dexopt(const char *apk_path, uid_t uid, int is_public)
+int dexopt(const char *apk_path, uid_t uid, int is_public,
+           const char *pkgname)
 {
     struct utimbuf ut;
     struct stat apk_stat, dex_stat;
     char out_path[PKG_PATH_MAX];
-    char dexopt_flags[PROPERTY_VALUE_MAX];
     char persist_sys_dalvik_vm_lib[PROPERTY_VALUE_MAX];
     char *end;
     int res, zip_fd=-1, out_fd=-1;
@@ -664,12 +679,8 @@
         return -1;
     }
 
-    /* platform-specific flags affecting optimization and verification */
-    property_get("dalvik.vm.dexopt-flags", dexopt_flags, "");
-    ALOGV("dalvik.vm.dexopt_flags=%s\n", dexopt_flags);
-
-    /* The command to run depend ones the value of persist.sys.dalvik.vm.lib */
-    property_get("persist.sys.dalvik.vm.lib", persist_sys_dalvik_vm_lib, "libdvm.so");
+    /* The command to run depend on the value of persist.sys.dalvik.vm.lib */
+    property_get("persist.sys.dalvik.vm.lib.1", persist_sys_dalvik_vm_lib, "libdvm.so");
 
     /* Before anything else: is there a .odex file?  If so, we have
      * precompiled the apk and there is nothing to do here.
@@ -709,6 +720,12 @@
         goto fail;
     }
 
+    // Create profile file if there is a package name present.
+    if (strcmp(pkgname, "*") != 0) {
+        create_profile_file(pkgname, uid);
+    }
+
+
     ALOGV("DexInv: --- BEGIN '%s' ---\n", apk_path);
 
     pid_t pid;
@@ -739,17 +756,19 @@
         }
 
         if (strncmp(persist_sys_dalvik_vm_lib, "libdvm", 6) == 0) {
-            run_dexopt(zip_fd, out_fd, apk_path, out_path, dexopt_flags);
+            run_dexopt(zip_fd, out_fd, apk_path, out_path);
         } else if (strncmp(persist_sys_dalvik_vm_lib, "libart", 6) == 0) {
-            run_dex2oat(zip_fd, out_fd, apk_path, out_path, dexopt_flags);
+            run_dex2oat(zip_fd, out_fd, apk_path, out_path, pkgname);
         } else {
             exit(69);   /* Unexpected persist.sys.dalvik.vm.lib value */
         }
         exit(68);   /* only get here on exec failure */
     } else {
-        res = wait_dexopt(pid, apk_path);
-        if (res != 0) {
-            ALOGE("dexopt in='%s' out='%s' res=%d\n", apk_path, out_path, res);
+        res = wait_child(pid);
+        if (res == 0) {
+            ALOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
+        } else {
+            ALOGE("DexInv: --- END '%s' --- status=0x%04x, process failed\n", apk_path, res);
             goto fail;
         }
     }
@@ -803,12 +822,12 @@
 
     int srcend = strlen(srcpath);
     int dstend = strlen(dstpath);
-    
+
     if (lstat(srcpath, statbuf) < 0) {
         ALOGW("Unable to stat %s: %s\n", srcpath, strerror(errno));
         return 1;
     }
-    
+
     if ((statbuf->st_mode&S_IFDIR) == 0) {
         mkinnerdirs(dstpath, dstbasepos, S_IRWXU|S_IRWXG|S_IXOTH,
                 dstuid, dstgid, statbuf);
@@ -834,7 +853,7 @@
     }
 
     res = 0;
-    
+
     while ((de = readdir(d))) {
         const char *name = de->d_name;
             /* always skip "." and ".." */
@@ -842,32 +861,32 @@
             if (name[1] == 0) continue;
             if ((name[1] == '.') && (name[2] == 0)) continue;
         }
-        
+
         if ((srcend+strlen(name)) >= (PKG_PATH_MAX-2)) {
             ALOGW("Source path too long; skipping: %s/%s\n", srcpath, name);
             continue;
         }
-        
+
         if ((dstend+strlen(name)) >= (PKG_PATH_MAX-2)) {
             ALOGW("Destination path too long; skipping: %s/%s\n", dstpath, name);
             continue;
         }
-        
+
         srcpath[srcend] = dstpath[dstend] = '/';
         strcpy(srcpath+srcend+1, name);
         strcpy(dstpath+dstend+1, name);
-        
+
         if (movefileordir(srcpath, dstpath, dstbasepos, dstuid, dstgid, statbuf) != 0) {
             res = 1;
         }
-        
+
         // Note: we will be leaving empty directories behind in srcpath,
         // but that is okay, the package manager will be erasing all of the
         // data associated with .apks that disappear.
-        
+
         srcpath[srcend] = dstpath[dstend] = 0;
     }
-    
+
     closedir(d);
     return res;
 }
@@ -909,7 +928,7 @@
                         UPDATE_COMMANDS_DIR_PREFIX, name);
                 continue;
             }
-            
+
             bufp = 0;
             bufe = 0;
             buf[PKG_PATH_MAX] = 0;
@@ -1103,3 +1122,144 @@
 
     return rc;
 }
+
+static void run_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd)
+{
+    static const char *IDMAP_BIN = "/system/bin/idmap";
+    static const size_t MAX_INT_LEN = 32;
+    char idmap_str[MAX_INT_LEN];
+
+    snprintf(idmap_str, sizeof(idmap_str), "%d", idmap_fd);
+
+    execl(IDMAP_BIN, IDMAP_BIN, "--fd", target_apk, overlay_apk, idmap_str, (char*)NULL);
+    ALOGE("execl(%s) failed: %s\n", IDMAP_BIN, strerror(errno));
+}
+
+// Transform string /a/b/c.apk to (prefix)/a@b@c.apk@(suffix)
+// eg /a/b/c.apk to /data/resource-cache/a@b@c.apk@idmap
+static int flatten_path(const char *prefix, const char *suffix,
+        const char *overlay_path, char *idmap_path, size_t N)
+{
+    if (overlay_path == NULL || idmap_path == NULL) {
+        return -1;
+    }
+    const size_t len_overlay_path = strlen(overlay_path);
+    // will access overlay_path + 1 further below; requires absolute path
+    if (len_overlay_path < 2 || *overlay_path != '/') {
+        return -1;
+    }
+    const size_t len_idmap_root = strlen(prefix);
+    const size_t len_suffix = strlen(suffix);
+    if (SIZE_MAX - len_idmap_root < len_overlay_path ||
+            SIZE_MAX - (len_idmap_root + len_overlay_path) < len_suffix) {
+        // additions below would cause overflow
+        return -1;
+    }
+    if (N < len_idmap_root + len_overlay_path + len_suffix) {
+        return -1;
+    }
+    memset(idmap_path, 0, N);
+    snprintf(idmap_path, N, "%s%s%s", prefix, overlay_path + 1, suffix);
+    char *ch = idmap_path + len_idmap_root;
+    while (*ch != '\0') {
+        if (*ch == '/') {
+            *ch = '@';
+        }
+        ++ch;
+    }
+    return 0;
+}
+
+int idmap(const char *target_apk, const char *overlay_apk, uid_t uid)
+{
+    ALOGV("idmap target_apk=%s overlay_apk=%s uid=%d\n", target_apk, overlay_apk, uid);
+
+    int idmap_fd = -1;
+    char idmap_path[PATH_MAX];
+
+    if (flatten_path(IDMAP_PREFIX, IDMAP_SUFFIX, overlay_apk,
+                idmap_path, sizeof(idmap_path)) == -1) {
+        ALOGE("idmap cannot generate idmap path for overlay %s\n", overlay_apk);
+        goto fail;
+    }
+
+    unlink(idmap_path);
+    idmap_fd = open(idmap_path, O_RDWR | O_CREAT | O_EXCL, 0644);
+    if (idmap_fd < 0) {
+        ALOGE("idmap cannot open '%s' for output: %s\n", idmap_path, strerror(errno));
+        goto fail;
+    }
+    if (fchown(idmap_fd, AID_SYSTEM, uid) < 0) {
+        ALOGE("idmap cannot chown '%s'\n", idmap_path);
+        goto fail;
+    }
+    if (fchmod(idmap_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) {
+        ALOGE("idmap cannot chmod '%s'\n", idmap_path);
+        goto fail;
+    }
+
+    pid_t pid;
+    pid = fork();
+    if (pid == 0) {
+        /* child -- drop privileges before continuing */
+        if (setgid(uid) != 0) {
+            ALOGE("setgid(%d) failed during idmap\n", uid);
+            exit(1);
+        }
+        if (setuid(uid) != 0) {
+            ALOGE("setuid(%d) failed during idmap\n", uid);
+            exit(1);
+        }
+        if (flock(idmap_fd, LOCK_EX | LOCK_NB) != 0) {
+            ALOGE("flock(%s) failed during idmap: %s\n", idmap_path, strerror(errno));
+            exit(1);
+        }
+
+        run_idmap(target_apk, overlay_apk, idmap_fd);
+        exit(1); /* only if exec call to idmap failed */
+    } else {
+        int status = wait_child(pid);
+        if (status != 0) {
+            ALOGE("idmap failed, status=0x%04x\n", status);
+            goto fail;
+        }
+    }
+
+    close(idmap_fd);
+    return 0;
+fail:
+    if (idmap_fd >= 0) {
+        close(idmap_fd);
+        unlink(idmap_path);
+    }
+    return -1;
+}
+
+int restorecon_data()
+{
+    char *data_dir = build_string2(android_data_dir.path, PRIMARY_USER_PREFIX);
+    char *user_dir = build_string2(android_data_dir.path, SECONDARY_USER_PREFIX);
+
+    unsigned int flags = SELINUX_ANDROID_RESTORECON_RECURSE |
+            SELINUX_ANDROID_RESTORECON_DATADATA;
+
+    int ret = 0;
+
+    if (!data_dir || !user_dir) {
+        return -1;
+    }
+
+    if (selinux_android_restorecon(data_dir, flags) < 0) {
+        ALOGE("restorecon failed for %s: %s\n", data_dir, strerror(errno));
+        ret |= -1;
+    }
+
+    if (selinux_android_restorecon(user_dir, flags) < 0) {
+        ALOGE("restorecon failed for %s: %s\n", user_dir, strerror(errno));
+        ret |= -1;
+    }
+
+    free(data_dir);
+    free(user_dir);
+    return ret;
+}
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index 0c80dac..40fc13f 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -38,8 +38,8 @@
 
 static int do_dexopt(char **arg, char reply[REPLY_MAX])
 {
-        /* apk_path, uid, is_public */
-    return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]));
+        /* apk_path, uid, is_public, pkgname */
+    return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3]);
 }
 
 static int do_move_dex(char **arg, char reply[REPLY_MAX])
@@ -124,6 +124,17 @@
     return linklib(arg[0], arg[1], atoi(arg[2]));
 }
 
+static int do_idmap(char **arg, char reply[REPLY_MAX])
+{
+    return idmap(arg[0], arg[1], atoi(arg[2]));
+}
+
+static int do_restorecon_data(char **arg __attribute__((unused)),
+    char reply[REPLY_MAX] __attribute__((unused)))
+{
+    return restorecon_data();
+}
+
 struct cmdinfo {
     const char *name;
     unsigned numargs;
@@ -133,7 +144,7 @@
 struct cmdinfo cmds[] = {
     { "ping",                 0, do_ping },
     { "install",              4, do_install },
-    { "dexopt",               3, do_dexopt },
+    { "dexopt",               4, do_dexopt },
     { "movedex",              2, do_move_dex },
     { "rmdex",                1, do_rm_dex },
     { "remove",               2, do_remove },
@@ -147,6 +158,8 @@
     { "linklib",              3, do_linklib },
     { "mkuserdata",           4, do_mk_user_data },
     { "rmuser",               1, do_rm_user },
+    { "idmap",                3, do_idmap },
+    { "restorecondata",       0, do_restorecon_data },
 };
 
 static int readx(int s, void *_buf, int count)
@@ -392,7 +405,7 @@
             goto fail;
         }
 
-        if (selinux_android_restorecon(android_media_dir.path)) {
+        if (selinux_android_restorecon(android_media_dir.path, 0)) {
             goto fail;
         }
 
@@ -515,6 +528,7 @@
     capdata[CAP_TO_INDEX(CAP_CHOWN)].permitted        |= CAP_TO_MASK(CAP_CHOWN);
     capdata[CAP_TO_INDEX(CAP_SETUID)].permitted       |= CAP_TO_MASK(CAP_SETUID);
     capdata[CAP_TO_INDEX(CAP_SETGID)].permitted       |= CAP_TO_MASK(CAP_SETGID);
+    capdata[CAP_TO_INDEX(CAP_FOWNER)].permitted       |= CAP_TO_MASK(CAP_FOWNER);
 
     capdata[0].effective = capdata[0].permitted;
     capdata[1].effective = capdata[1].permitted;
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 9ca2f86..3e9caf3 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -75,6 +75,9 @@
 
 #define UPDATE_COMMANDS_DIR_PREFIX  "/system/etc/updatecmds/"
 
+#define IDMAP_PREFIX           "/data/resource-cache/"
+#define IDMAP_SUFFIX           "@idmap"
+
 #define PKG_NAME_MAX  128   /* largest allowed package name */
 #define PKG_PATH_MAX  256   /* max size of any path we use */
 
@@ -186,6 +189,8 @@
 
 int ensure_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
 int ensure_media_user_dirs(userid_t userid);
+int create_profile_file(const char *pkgname, gid_t gid);
+void remove_profile_file(const char *pkgname);
 
 /* commands.c */
 
@@ -204,6 +209,8 @@
              const char *fwdlock_apkpath, const char *asecpath, int64_t *codesize,
              int64_t *datasize, int64_t *cachesize, int64_t *asecsize);
 int free_cache(int64_t free_size);
-int dexopt(const char *apk_path, uid_t uid, int is_public);
+int dexopt(const char *apk_path, uid_t uid, int is_public, const char *pkgName);
 int movefiles();
 int linklib(const char* target, const char* source, int userId);
+int idmap(const char *target_path, const char *overlay_path, uid_t uid);
+int restorecon_data();
diff --git a/cmds/installd/tests/Android.mk b/cmds/installd/tests/Android.mk
index c0192f4..4faf3c0 100644
--- a/cmds/installd/tests/Android.mk
+++ b/cmds/installd/tests/Android.mk
@@ -18,7 +18,7 @@
     libgtest_main
 
 c_includes := \
-    frameworks/base/cmds/installd
+    frameworks/native/cmds/installd
 
 $(foreach file,$(test_src_files), \
     $(eval include $(CLEAR_VARS)) \
diff --git a/cmds/installd/utils.c b/cmds/installd/utils.c
index ef634c6..8f4da65 100644
--- a/cmds/installd/utils.c
+++ b/cmds/installd/utils.c
@@ -1,16 +1,16 @@
 /*
 ** Copyright 2008, The Android Open Source Project
 **
-** Licensed under the Apache License, Version 2.0 (the "License"); 
-** you may not use this file except in compliance with the License. 
-** You may obtain a copy of the License at 
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
 **
-**     http://www.apache.org/licenses/LICENSE-2.0 
+**     http://www.apache.org/licenses/LICENSE-2.0
 **
-** Unless required by applicable law or agreed to in writing, software 
-** distributed under the License is distributed on an "AS IS" BASIS, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
 
@@ -435,7 +435,7 @@
 {
     cache->numCollected++;
     if ((cache->numCollected%20000) == 0) {
-        ALOGI("Collected cache so far: %d directories, %d files",
+        ALOGI("Collected cache so far: %zd directories, %zd files",
             cache->numDirs, cache->numFiles);
     }
 }
@@ -730,7 +730,7 @@
     int skip = 0;
     char path[PATH_MAX];
 
-    ALOGI("Collected cache files: %d directories, %d files",
+    ALOGI("Collected cache files: %zd directories, %zd files",
         cache->numDirs, cache->numFiles);
 
     CACHE_NOISY(ALOGI("Sorting files..."));
@@ -1005,3 +1005,59 @@
 
     return 0;
 }
+
+int create_profile_file(const char *pkgname, gid_t gid) {
+    const char *profile_dir = DALVIK_CACHE_PREFIX "profiles";
+    struct stat profileStat;
+    char profile_file[PKG_PATH_MAX];
+
+    // If we don't have a profile directory under dalvik-cache we need to create one.
+    if (stat(profile_dir, &profileStat) < 0) {
+        // Create the profile directory under dalvik-cache.
+        if (mkdir(profile_dir, 0711) < 0) {
+            ALOGE("cannot make profile dir '%s': %s\n", profile_dir, strerror(errno));
+            return -1;
+        }
+
+        // Make the profile directory write-only for group and other. Owner can rwx it.
+        if (chmod(profile_dir, 0711) < 0) {
+            ALOGE("cannot chown profile dir '%s': %s\n", profile_dir, strerror(errno));
+            unlink(profile_dir);
+            return -1;
+        }
+    }
+
+    snprintf(profile_file, sizeof(profile_file), "%s/%s", profile_dir, pkgname);
+
+    // The 'system' user needs to be able to read the profile to determine if dex2oat
+    // needs to be run.  This is done in dalvik.system.DexFile.isDexOptNeededInternal().  So
+    // we make it world readable.  Not a problem since the dalvik cache is world
+    // readable anyway.
+
+    int fd = open(profile_file, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0664);
+
+    // Open will fail if the file already exists.  We want to ignore that.
+    if (fd >= 0) {
+        if (fchown(fd, -1, gid) < 0) {
+            ALOGE("cannot chown profile file '%s': %s\n", profile_file, strerror(errno));
+            close(fd);
+            unlink(profile_file);
+            return -1;
+        }
+
+        if (fchmod(fd, 0664) < 0) {
+            ALOGE("cannot chmod profile file '%s': %s\n", profile_file, strerror(errno));
+            close(fd);
+            unlink(profile_file);
+            return -1;
+        }
+        close(fd);
+    }
+    return 0;
+}
+
+void remove_profile_file(const char *pkgname) {
+    char profile_file[PKG_PATH_MAX];
+    snprintf(profile_file, sizeof(profile_file), "%s/%s", DALVIK_CACHE_PREFIX "profiles", pkgname);
+    unlink(profile_file);
+}
diff --git a/cmds/servicemanager/Android.mk b/cmds/servicemanager/Android.mk
index 8840867..4ab8df6 100644
--- a/cmds/servicemanager/Android.mk
+++ b/cmds/servicemanager/Android.mk
@@ -1,12 +1,25 @@
 LOCAL_PATH:= $(call my-dir)
 
-#include $(CLEAR_VARS)
-#LOCAL_SRC_FILES := bctest.c binder.c
-#LOCAL_MODULE := bctest
-#include $(BUILD_EXECUTABLE)
+svc_c_flags =	\
+	-Wall -Wextra \
+
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+svc_c_flags += -DBINDER_IPC_32BIT=1
+endif
+endif
+
+include $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := liblog
+LOCAL_SRC_FILES := bctest.c binder.c
+LOCAL_CFLAGS += $(svc_c_flags)
+LOCAL_MODULE := bctest
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
 
 include $(CLEAR_VARS)
 LOCAL_SHARED_LIBRARIES := liblog
 LOCAL_SRC_FILES := service_manager.c binder.c
+LOCAL_CFLAGS += $(svc_c_flags)
 LOCAL_MODULE := servicemanager
 include $(BUILD_EXECUTABLE)
diff --git a/cmds/servicemanager/bctest.c b/cmds/servicemanager/bctest.c
index ff5aced..e02b45d 100644
--- a/cmds/servicemanager/bctest.c
+++ b/cmds/servicemanager/bctest.c
@@ -7,9 +7,9 @@
 
 #include "binder.h"
 
-void *svcmgr_lookup(struct binder_state *bs, void *target, const char *name)
+uint32_t svcmgr_lookup(struct binder_state *bs, uint32_t target, const char *name)
 {
-    void *ptr;
+    uint32_t handle;
     unsigned iodata[512/4];
     struct binder_io msg, reply;
 
@@ -21,19 +21,19 @@
     if (binder_call(bs, &msg, &reply, target, SVC_MGR_CHECK_SERVICE))
         return 0;
 
-    ptr = bio_get_ref(&reply);
+    handle = bio_get_ref(&reply);
 
-    if (ptr)
-        binder_acquire(bs, ptr);
+    if (handle)
+        binder_acquire(bs, handle);
 
     binder_done(bs, &msg, &reply);
 
-    return ptr;
+    return handle;
 }
 
-int svcmgr_publish(struct binder_state *bs, void *target, const char *name, void *ptr)
+int svcmgr_publish(struct binder_state *bs, uint32_t target, const char *name, void *ptr)
 {
-    unsigned status;
+    int status;
     unsigned iodata[512/4];
     struct binder_io msg, reply;
 
@@ -59,29 +59,33 @@
 {
     int fd;
     struct binder_state *bs;
-    void *svcmgr = BINDER_SERVICE_MANAGER;
+    uint32_t svcmgr = BINDER_SERVICE_MANAGER;
+    uint32_t handle;
 
     bs = binder_open(128*1024);
+    if (!bs) {
+        fprintf(stderr, "failed to open binder driver\n");
+        return -1;
+    }
 
     argc--;
     argv++;
     while (argc > 0) {
         if (!strcmp(argv[0],"alt")) {
-            void *ptr = svcmgr_lookup(bs, svcmgr, "alt_svc_mgr");
-            if (!ptr) {
+            handle = svcmgr_lookup(bs, svcmgr, "alt_svc_mgr");
+            if (!handle) {
                 fprintf(stderr,"cannot find alt_svc_mgr\n");
                 return -1;
             }
-            svcmgr = ptr;
-            fprintf(stderr,"svcmgr is via %p\n", ptr);
+            svcmgr = handle;
+            fprintf(stderr,"svcmgr is via %x\n", handle);
         } else if (!strcmp(argv[0],"lookup")) {
-            void *ptr;
             if (argc < 2) {
                 fprintf(stderr,"argument required\n");
                 return -1;
             }
-            ptr = svcmgr_lookup(bs, svcmgr, argv[1]);
-            fprintf(stderr,"lookup(%s) = %p\n", argv[1], ptr);
+            handle = svcmgr_lookup(bs, svcmgr, argv[1]);
+            fprintf(stderr,"lookup(%s) = %x\n", argv[1], handle);
             argc--;
             argv++;
         } else if (!strcmp(argv[0],"publish")) {
diff --git a/cmds/servicemanager/binder.c b/cmds/servicemanager/binder.c
index 1985756..db7632d 100644
--- a/cmds/servicemanager/binder.c
+++ b/cmds/servicemanager/binder.c
@@ -1,6 +1,7 @@
 /* Copyright 2008 The Android Open Source Project
  */
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -17,17 +18,17 @@
 #define LOG_TAG "Binder"
 #include <cutils/log.h>
 
-void bio_init_from_txn(struct binder_io *io, struct binder_txn *txn);
+void bio_init_from_txn(struct binder_io *io, struct binder_transaction_data *txn);
 
 #if TRACE
-void hexdump(void *_data, unsigned len)
+void hexdump(void *_data, size_t len)
 {
     unsigned char *data = _data;
-    unsigned count;
+    size_t count;
 
     for (count = 0; count < len; count++) {
         if ((count & 15) == 0)
-            fprintf(stderr,"%04x:", count);
+            fprintf(stderr,"%04zu:", count);
         fprintf(stderr," %02x %c", *data,
                 (*data < 32) || (*data > 126) ? '.' : *data);
         data++;
@@ -38,21 +39,21 @@
         fprintf(stderr,"\n");
 }
 
-void binder_dump_txn(struct binder_txn *txn)
+void binder_dump_txn(struct binder_transaction_data *txn)
 {
-    struct binder_object *obj;
-    unsigned *offs = txn->offs;
-    unsigned count = txn->offs_size / 4;
+    struct flat_binder_object *obj;
+    binder_size_t *offs = (binder_size_t *)(uintptr_t)txn->data.ptr.offsets;
+    size_t count = txn->offsets_size / sizeof(binder_size_t);
 
-    fprintf(stderr,"  target %p  cookie %p  code %08x  flags %08x\n",
-            txn->target, txn->cookie, txn->code, txn->flags);
-    fprintf(stderr,"  pid %8d  uid %8d  data %8d  offs %8d\n",
-            txn->sender_pid, txn->sender_euid, txn->data_size, txn->offs_size);
-    hexdump(txn->data, txn->data_size);
+    fprintf(stderr,"  target %016"PRIx64"  cookie %016"PRIx64"  code %08x  flags %08x\n",
+            (uint64_t)txn->target.ptr, (uint64_t)txn->cookie, txn->code, txn->flags);
+    fprintf(stderr,"  pid %8d  uid %8d  data %"PRIu64"  offs %"PRIu64"\n",
+            txn->sender_pid, txn->sender_euid, (uint64_t)txn->data_size, (uint64_t)txn->offsets_size);
+    hexdump((void *)(uintptr_t)txn->data.ptr.buffer, txn->data_size);
     while (count--) {
-        obj = (void*) (((char*) txn->data) + *offs++);
-        fprintf(stderr,"  - type %08x  flags %08x  ptr %p  cookie %p\n",
-                obj->type, obj->flags, obj->pointer, obj->cookie);
+        obj = (struct flat_binder_object *) (((char*)(uintptr_t)txn->data.ptr.buffer) + *offs++);
+        fprintf(stderr,"  - type %08x  flags %08x  ptr %016"PRIx64"  cookie %016"PRIx64"\n",
+                obj->type, obj->flags, (uint64_t)obj->binder, (uint64_t)obj->cookie);
     }
 }
 
@@ -88,17 +89,18 @@
 {
     int fd;
     void *mapped;
-    unsigned mapsize;
+    size_t mapsize;
 };
 
-struct binder_state *binder_open(unsigned mapsize)
+struct binder_state *binder_open(size_t mapsize)
 {
     struct binder_state *bs;
+    struct binder_version vers;
 
     bs = malloc(sizeof(*bs));
     if (!bs) {
         errno = ENOMEM;
-        return 0;
+        return NULL;
     }
 
     bs->fd = open("/dev/binder", O_RDWR);
@@ -108,6 +110,12 @@
         goto fail_open;
     }
 
+    if ((ioctl(bs->fd, BINDER_VERSION, &vers) == -1) ||
+        (vers.protocol_version != BINDER_CURRENT_PROTOCOL_VERSION)) {
+        fprintf(stderr, "binder: driver version differs from user space\n");
+        goto fail_open;
+    }
+
     bs->mapsize = mapsize;
     bs->mapped = mmap(NULL, mapsize, PROT_READ, MAP_PRIVATE, bs->fd, 0);
     if (bs->mapped == MAP_FAILED) {
@@ -116,15 +124,13 @@
         goto fail_map;
     }
 
-        /* TODO: check version */
-
     return bs;
 
 fail_map:
     close(bs->fd);
 fail_open:
     free(bs);
-    return 0;
+    return NULL;
 }
 
 void binder_close(struct binder_state *bs)
@@ -139,13 +145,14 @@
     return ioctl(bs->fd, BINDER_SET_CONTEXT_MGR, 0);
 }
 
-int binder_write(struct binder_state *bs, void *data, unsigned len)
+int binder_write(struct binder_state *bs, void *data, size_t len)
 {
     struct binder_write_read bwr;
     int res;
+
     bwr.write_size = len;
     bwr.write_consumed = 0;
-    bwr.write_buffer = (unsigned) data;
+    bwr.write_buffer = (uintptr_t) data;
     bwr.read_size = 0;
     bwr.read_consumed = 0;
     bwr.read_buffer = 0;
@@ -159,46 +166,47 @@
 
 void binder_send_reply(struct binder_state *bs,
                        struct binder_io *reply,
-                       void *buffer_to_free,
+                       binder_uintptr_t buffer_to_free,
                        int status)
 {
     struct {
         uint32_t cmd_free;
-        void *buffer;
+        binder_uintptr_t buffer;
         uint32_t cmd_reply;
-        struct binder_txn txn;
+        struct binder_transaction_data txn;
     } __attribute__((packed)) data;
 
     data.cmd_free = BC_FREE_BUFFER;
     data.buffer = buffer_to_free;
     data.cmd_reply = BC_REPLY;
-    data.txn.target = 0;
+    data.txn.target.ptr = 0;
     data.txn.cookie = 0;
     data.txn.code = 0;
     if (status) {
         data.txn.flags = TF_STATUS_CODE;
         data.txn.data_size = sizeof(int);
-        data.txn.offs_size = 0;
-        data.txn.data = &status;
-        data.txn.offs = 0;
+        data.txn.offsets_size = 0;
+        data.txn.data.ptr.buffer = (uintptr_t)&status;
+        data.txn.data.ptr.offsets = 0;
     } else {
         data.txn.flags = 0;
         data.txn.data_size = reply->data - reply->data0;
-        data.txn.offs_size = ((char*) reply->offs) - ((char*) reply->offs0);
-        data.txn.data = reply->data0;
-        data.txn.offs = reply->offs0;
+        data.txn.offsets_size = ((char*) reply->offs) - ((char*) reply->offs0);
+        data.txn.data.ptr.buffer = (uintptr_t)reply->data0;
+        data.txn.data.ptr.offsets = (uintptr_t)reply->offs0;
     }
     binder_write(bs, &data, sizeof(data));
 }
 
 int binder_parse(struct binder_state *bs, struct binder_io *bio,
-                 uint32_t *ptr, uint32_t size, binder_handler func)
+                 uintptr_t ptr, size_t size, binder_handler func)
 {
     int r = 1;
-    uint32_t *end = ptr + (size / 4);
+    uintptr_t end = ptr + (uintptr_t) size;
 
     while (ptr < end) {
-        uint32_t cmd = *ptr++;
+        uint32_t cmd = *(uint32_t *) ptr;
+        ptr += sizeof(uint32_t);
 #if TRACE
         fprintf(stderr,"%s:\n", cmd_name(cmd));
 #endif
@@ -212,13 +220,13 @@
         case BR_RELEASE:
         case BR_DECREFS:
 #if TRACE
-            fprintf(stderr,"  %08x %08x\n", ptr[0], ptr[1]);
+            fprintf(stderr,"  %p, %p\n", (void *)ptr, (void *)(ptr + sizeof(void *)));
 #endif
-            ptr += 2;
+            ptr += sizeof(struct binder_ptr_cookie);
             break;
         case BR_TRANSACTION: {
-            struct binder_txn *txn = (void *) ptr;
-            if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
+            struct binder_transaction_data *txn = (struct binder_transaction_data *) ptr;
+            if ((end - ptr) < sizeof(*txn)) {
                 ALOGE("parse: txn too small!\n");
                 return -1;
             }
@@ -232,14 +240,14 @@
                 bio_init(&reply, rdata, sizeof(rdata), 4);
                 bio_init_from_txn(&msg, txn);
                 res = func(bs, txn, &msg, &reply);
-                binder_send_reply(bs, &reply, txn->data, res);
+                binder_send_reply(bs, &reply, txn->data.ptr.buffer, res);
             }
-            ptr += sizeof(*txn) / sizeof(uint32_t);
+            ptr += sizeof(*txn);
             break;
         }
         case BR_REPLY: {
-            struct binder_txn *txn = (void*) ptr;
-            if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
+            struct binder_transaction_data *txn = (struct binder_transaction_data *) ptr;
+            if ((end - ptr) < sizeof(*txn)) {
                 ALOGE("parse: reply too small!\n");
                 return -1;
             }
@@ -248,14 +256,15 @@
                 bio_init_from_txn(bio, txn);
                 bio = 0;
             } else {
-                    /* todo FREE BUFFER */
+                /* todo FREE BUFFER */
             }
-            ptr += (sizeof(*txn) / sizeof(uint32_t));
+            ptr += sizeof(*txn);
             r = 0;
             break;
         }
         case BR_DEAD_BINDER: {
-            struct binder_death *death = (void*) *ptr++;
+            struct binder_death *death = (struct binder_death *)(uintptr_t) *(binder_uintptr_t *)ptr;
+            ptr += sizeof(binder_uintptr_t);
             death->func(bs, death->ptr);
             break;
         }
@@ -274,42 +283,45 @@
     return r;
 }
 
-void binder_acquire(struct binder_state *bs, void *ptr)
+void binder_acquire(struct binder_state *bs, uint32_t target)
 {
     uint32_t cmd[2];
     cmd[0] = BC_ACQUIRE;
-    cmd[1] = (uint32_t) ptr;
+    cmd[1] = target;
     binder_write(bs, cmd, sizeof(cmd));
 }
 
-void binder_release(struct binder_state *bs, void *ptr)
+void binder_release(struct binder_state *bs, uint32_t target)
 {
     uint32_t cmd[2];
     cmd[0] = BC_RELEASE;
-    cmd[1] = (uint32_t) ptr;
+    cmd[1] = target;
     binder_write(bs, cmd, sizeof(cmd));
 }
 
-void binder_link_to_death(struct binder_state *bs, void *ptr, struct binder_death *death)
+void binder_link_to_death(struct binder_state *bs, uint32_t target, struct binder_death *death)
 {
-    uint32_t cmd[3];
-    cmd[0] = BC_REQUEST_DEATH_NOTIFICATION;
-    cmd[1] = (uint32_t) ptr;
-    cmd[2] = (uint32_t) death;
-    binder_write(bs, cmd, sizeof(cmd));
-}
+    struct {
+        uint32_t cmd;
+        struct binder_handle_cookie payload;
+    } __attribute__((packed)) data;
 
+    data.cmd = BC_REQUEST_DEATH_NOTIFICATION;
+    data.payload.handle = target;
+    data.payload.cookie = (uintptr_t) death;
+    binder_write(bs, &data, sizeof(data));
+}
 
 int binder_call(struct binder_state *bs,
                 struct binder_io *msg, struct binder_io *reply,
-                void *target, uint32_t code)
+                uint32_t target, uint32_t code)
 {
     int res;
     struct binder_write_read bwr;
     struct {
         uint32_t cmd;
-        struct binder_txn txn;
-    } writebuf;
+        struct binder_transaction_data txn;
+    } __attribute__((packed)) writebuf;
     unsigned readbuf[32];
 
     if (msg->flags & BIO_F_OVERFLOW) {
@@ -318,23 +330,23 @@
     }
 
     writebuf.cmd = BC_TRANSACTION;
-    writebuf.txn.target = target;
+    writebuf.txn.target.handle = target;
     writebuf.txn.code = code;
     writebuf.txn.flags = 0;
     writebuf.txn.data_size = msg->data - msg->data0;
-    writebuf.txn.offs_size = ((char*) msg->offs) - ((char*) msg->offs0);
-    writebuf.txn.data = msg->data0;
-    writebuf.txn.offs = msg->offs0;
+    writebuf.txn.offsets_size = ((char*) msg->offs) - ((char*) msg->offs0);
+    writebuf.txn.data.ptr.buffer = (uintptr_t)msg->data0;
+    writebuf.txn.data.ptr.offsets = (uintptr_t)msg->offs0;
 
     bwr.write_size = sizeof(writebuf);
     bwr.write_consumed = 0;
-    bwr.write_buffer = (unsigned) &writebuf;
-    
+    bwr.write_buffer = (uintptr_t) &writebuf;
+
     hexdump(msg->data0, msg->data - msg->data0);
     for (;;) {
         bwr.read_size = sizeof(readbuf);
         bwr.read_consumed = 0;
-        bwr.read_buffer = (unsigned) readbuf;
+        bwr.read_buffer = (uintptr_t) readbuf;
 
         res = ioctl(bs->fd, BINDER_WRITE_READ, &bwr);
 
@@ -343,7 +355,7 @@
             goto fail;
         }
 
-        res = binder_parse(bs, reply, readbuf, bwr.read_consumed, 0);
+        res = binder_parse(bs, reply, (uintptr_t) readbuf, bwr.read_consumed, 0);
         if (res == 0) return 0;
         if (res < 0) goto fail;
     }
@@ -358,19 +370,19 @@
 {
     int res;
     struct binder_write_read bwr;
-    unsigned readbuf[32];
+    uint32_t readbuf[32];
 
     bwr.write_size = 0;
     bwr.write_consumed = 0;
     bwr.write_buffer = 0;
-    
+
     readbuf[0] = BC_ENTER_LOOPER;
-    binder_write(bs, readbuf, sizeof(unsigned));
+    binder_write(bs, readbuf, sizeof(uint32_t));
 
     for (;;) {
         bwr.read_size = sizeof(readbuf);
         bwr.read_consumed = 0;
-        bwr.read_buffer = (unsigned) readbuf;
+        bwr.read_buffer = (uintptr_t) readbuf;
 
         res = ioctl(bs->fd, BINDER_WRITE_READ, &bwr);
 
@@ -379,7 +391,7 @@
             break;
         }
 
-        res = binder_parse(bs, 0, readbuf, bwr.read_consumed, func);
+        res = binder_parse(bs, 0, (uintptr_t) readbuf, bwr.read_consumed, func);
         if (res == 0) {
             ALOGE("binder_loop: unexpected reply?!\n");
             break;
@@ -391,19 +403,19 @@
     }
 }
 
-void bio_init_from_txn(struct binder_io *bio, struct binder_txn *txn)
+void bio_init_from_txn(struct binder_io *bio, struct binder_transaction_data *txn)
 {
-    bio->data = bio->data0 = txn->data;
-    bio->offs = bio->offs0 = txn->offs;
+    bio->data = bio->data0 = (char *)(intptr_t)txn->data.ptr.buffer;
+    bio->offs = bio->offs0 = (binder_size_t *)(intptr_t)txn->data.ptr.offsets;
     bio->data_avail = txn->data_size;
-    bio->offs_avail = txn->offs_size / 4;
+    bio->offs_avail = txn->offsets_size / sizeof(size_t);
     bio->flags = BIO_F_SHARED;
 }
 
 void bio_init(struct binder_io *bio, void *data,
-              uint32_t maxdata, uint32_t maxoffs)
+              size_t maxdata, size_t maxoffs)
 {
-    uint32_t n = maxoffs * sizeof(uint32_t);
+    size_t n = maxoffs * sizeof(size_t);
 
     if (n > maxdata) {
         bio->flags = BIO_F_OVERFLOW;
@@ -419,12 +431,12 @@
     bio->flags = 0;
 }
 
-static void *bio_alloc(struct binder_io *bio, uint32_t size)
+static void *bio_alloc(struct binder_io *bio, size_t size)
 {
     size = (size + 3) & (~3);
     if (size > bio->data_avail) {
         bio->flags |= BIO_F_OVERFLOW;
-        return 0;
+        return NULL;
     } else {
         void *ptr = bio->data;
         bio->data += size;
@@ -437,21 +449,25 @@
                  struct binder_io *msg,
                  struct binder_io *reply)
 {
+    struct {
+        uint32_t cmd;
+        uintptr_t buffer;
+    } __attribute__((packed)) data;
+
     if (reply->flags & BIO_F_SHARED) {
-        uint32_t cmd[2];
-        cmd[0] = BC_FREE_BUFFER;
-        cmd[1] = (uint32_t) reply->data0;
-        binder_write(bs, cmd, sizeof(cmd));
+        data.cmd = BC_FREE_BUFFER;
+        data.buffer = (uintptr_t) reply->data0;
+        binder_write(bs, &data, sizeof(data));
         reply->flags = 0;
     }
 }
 
-static struct binder_object *bio_alloc_obj(struct binder_io *bio)
+static struct flat_binder_object *bio_alloc_obj(struct binder_io *bio)
 {
-    struct binder_object *obj;
+    struct flat_binder_object *obj;
 
     obj = bio_alloc(bio, sizeof(*obj));
-    
+
     if (obj && bio->offs_avail) {
         bio->offs_avail--;
         *bio->offs++ = ((char*) obj) - ((char*) bio->data0);
@@ -459,7 +475,7 @@
     }
 
     bio->flags |= BIO_F_OVERFLOW;
-    return 0;
+    return NULL;
 }
 
 void bio_put_uint32(struct binder_io *bio, uint32_t n)
@@ -471,7 +487,7 @@
 
 void bio_put_obj(struct binder_io *bio, void *ptr)
 {
-    struct binder_object *obj;
+    struct flat_binder_object *obj;
 
     obj = bio_alloc_obj(bio);
     if (!obj)
@@ -479,15 +495,15 @@
 
     obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
     obj->type = BINDER_TYPE_BINDER;
-    obj->pointer = ptr;
+    obj->binder = (uintptr_t)ptr;
     obj->cookie = 0;
 }
 
-void bio_put_ref(struct binder_io *bio, void *ptr)
+void bio_put_ref(struct binder_io *bio, uint32_t handle)
 {
-    struct binder_object *obj;
+    struct flat_binder_object *obj;
 
-    if (ptr)
+    if (handle)
         obj = bio_alloc_obj(bio);
     else
         obj = bio_alloc(bio, sizeof(*obj));
@@ -497,13 +513,13 @@
 
     obj->flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
     obj->type = BINDER_TYPE_HANDLE;
-    obj->pointer = ptr;
+    obj->handle = handle;
     obj->cookie = 0;
 }
 
 void bio_put_string16(struct binder_io *bio, const uint16_t *str)
 {
-    uint32_t len;
+    size_t len;
     uint16_t *ptr;
 
     if (!str) {
@@ -519,7 +535,8 @@
         return;
     }
 
-    bio_put_uint32(bio, len);
+    /* Note: The payload will carry 32bit size instead of size_t */
+    bio_put_uint32(bio, (uint32_t) len);
     len = (len + 1) * sizeof(uint16_t);
     ptr = bio_alloc(bio, len);
     if (ptr)
@@ -529,7 +546,7 @@
 void bio_put_string16_x(struct binder_io *bio, const char *_str)
 {
     unsigned char *str = (unsigned char*) _str;
-    uint32_t len;
+    size_t len;
     uint16_t *ptr;
 
     if (!str) {
@@ -544,6 +561,7 @@
         return;
     }
 
+    /* Note: The payload will carry 32bit size instead of size_t */
     bio_put_uint32(bio, len);
     ptr = bio_alloc(bio, (len + 1) * sizeof(uint16_t));
     if (!ptr)
@@ -554,14 +572,14 @@
     *ptr++ = 0;
 }
 
-static void *bio_get(struct binder_io *bio, uint32_t size)
+static void *bio_get(struct binder_io *bio, size_t size)
 {
     size = (size + 3) & (~3);
 
     if (bio->data_avail < size){
         bio->data_avail = 0;
         bio->flags |= BIO_F_OVERFLOW;
-        return 0;
+        return NULL;
     }  else {
         void *ptr = bio->data;
         bio->data += size;
@@ -576,41 +594,43 @@
     return ptr ? *ptr : 0;
 }
 
-uint16_t *bio_get_string16(struct binder_io *bio, unsigned *sz)
+uint16_t *bio_get_string16(struct binder_io *bio, size_t *sz)
 {
-    unsigned len;
-    len = bio_get_uint32(bio);
+    size_t len;
+
+    /* Note: The payload will carry 32bit size instead of size_t */
+    len = (size_t) bio_get_uint32(bio);
     if (sz)
         *sz = len;
     return bio_get(bio, (len + 1) * sizeof(uint16_t));
 }
 
-static struct binder_object *_bio_get_obj(struct binder_io *bio)
+static struct flat_binder_object *_bio_get_obj(struct binder_io *bio)
 {
-    unsigned n;
-    unsigned off = bio->data - bio->data0;
+    size_t n;
+    size_t off = bio->data - bio->data0;
 
-        /* TODO: be smarter about this? */
+    /* TODO: be smarter about this? */
     for (n = 0; n < bio->offs_avail; n++) {
         if (bio->offs[n] == off)
-            return bio_get(bio, sizeof(struct binder_object));
+            return bio_get(bio, sizeof(struct flat_binder_object));
     }
 
     bio->data_avail = 0;
     bio->flags |= BIO_F_OVERFLOW;
-    return 0;
+    return NULL;
 }
 
-void *bio_get_ref(struct binder_io *bio)
+uint32_t bio_get_ref(struct binder_io *bio)
 {
-    struct binder_object *obj;
+    struct flat_binder_object *obj;
 
     obj = _bio_get_obj(bio);
     if (!obj)
         return 0;
 
     if (obj->type == BINDER_TYPE_HANDLE)
-        return obj->pointer;
+        return obj->handle;
 
     return 0;
 }
diff --git a/cmds/servicemanager/binder.h b/cmds/servicemanager/binder.h
index d8c51ef..7915fc2 100644
--- a/cmds/servicemanager/binder.h
+++ b/cmds/servicemanager/binder.h
@@ -9,39 +9,15 @@
 
 struct binder_state;
 
-struct binder_object
-{
-    uint32_t type;
-    uint32_t flags;
-    void *pointer;
-    void *cookie;
-};
-
-struct binder_txn
-{
-    void *target;
-    void *cookie;
-    uint32_t code;
-    uint32_t flags;
-
-    uint32_t sender_pid;
-    uint32_t sender_euid;
-
-    uint32_t data_size;
-    uint32_t offs_size;
-    void *data;
-    void *offs;
-};
-
 struct binder_io
 {
     char *data;            /* pointer to read/write from */
-    uint32_t *offs;        /* array of offsets */
-    uint32_t data_avail;   /* bytes available in data buffer */
-    uint32_t offs_avail;   /* entries available in offsets array */
+    binder_size_t *offs;   /* array of offsets */
+    size_t data_avail;     /* bytes available in data buffer */
+    size_t offs_avail;     /* entries available in offsets array */
 
     char *data0;           /* start of data buffer */
-    uint32_t *offs0;       /* start of offsets buffer */
+    binder_size_t *offs0;  /* start of offsets buffer */
     uint32_t flags;
     uint32_t unused;
 };
@@ -49,14 +25,16 @@
 struct binder_death {
     void (*func)(struct binder_state *bs, void *ptr);
     void *ptr;
-};    
+};
 
-/* the one magic object */
-#define BINDER_SERVICE_MANAGER ((void*) 0)
+/* the one magic handle */
+#define BINDER_SERVICE_MANAGER  0U
 
 #define SVC_MGR_NAME "android.os.IServiceManager"
 
 enum {
+    /* Must match definitions in IBinder.h and IServiceManager.h */
+    PING_TRANSACTION  = B_PACK_CHARS('_','P','N','G'),
     SVC_MGR_GET_SERVICE = 1,
     SVC_MGR_CHECK_SERVICE,
     SVC_MGR_ADD_SERVICE,
@@ -64,11 +42,11 @@
 };
 
 typedef int (*binder_handler)(struct binder_state *bs,
-                              struct binder_txn *txn,
+                              struct binder_transaction_data *txn,
                               struct binder_io *msg,
                               struct binder_io *reply);
 
-struct binder_state *binder_open(unsigned mapsize);
+struct binder_state *binder_open(size_t mapsize);
 void binder_close(struct binder_state *bs);
 
 /* initiate a blocking binder call
@@ -76,7 +54,7 @@
  */
 int binder_call(struct binder_state *bs,
                 struct binder_io *msg, struct binder_io *reply,
-                void *target, uint32_t code);
+                uint32_t target, uint32_t code);
 
 /* release any state associate with the binder_io
  * - call once any necessary data has been extracted from the
@@ -87,10 +65,10 @@
                  struct binder_io *msg, struct binder_io *reply);
 
 /* manipulate strong references */
-void binder_acquire(struct binder_state *bs, void *ptr);
-void binder_release(struct binder_state *bs, void *ptr);
+void binder_acquire(struct binder_state *bs, uint32_t target);
+void binder_release(struct binder_state *bs, uint32_t target);
 
-void binder_link_to_death(struct binder_state *bs, void *ptr, struct binder_death *death);
+void binder_link_to_death(struct binder_state *bs, uint32_t target, struct binder_death *death);
 
 void binder_loop(struct binder_state *bs, binder_handler func);
 
@@ -101,19 +79,16 @@
  * offset entries to reserve from the buffer
  */
 void bio_init(struct binder_io *bio, void *data,
-           uint32_t maxdata, uint32_t maxobjects);
-
-void bio_destroy(struct binder_io *bio);
+           size_t maxdata, size_t maxobjects);
 
 void bio_put_obj(struct binder_io *bio, void *ptr);
-void bio_put_ref(struct binder_io *bio, void *ptr);
+void bio_put_ref(struct binder_io *bio, uint32_t handle);
 void bio_put_uint32(struct binder_io *bio, uint32_t n);
 void bio_put_string16(struct binder_io *bio, const uint16_t *str);
 void bio_put_string16_x(struct binder_io *bio, const char *_str);
 
 uint32_t bio_get_uint32(struct binder_io *bio);
-uint16_t *bio_get_string16(struct binder_io *bio, uint32_t *sz);
-void *bio_get_obj(struct binder_io *bio);
-void *bio_get_ref(struct binder_io *bio);
+uint16_t *bio_get_string16(struct binder_io *bio, size_t *sz);
+uint32_t bio_get_ref(struct binder_io *bio);
 
 #endif
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 3eaf1eb..79ce6ed 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -24,7 +24,7 @@
  * uid can register media.*, etc)
  */
 static struct {
-    unsigned uid;
+    uid_t uid;
     const char *name;
 } allowed[] = {
     { AID_MEDIA, "media.audio_flinger" },
@@ -50,9 +50,9 @@
     { AID_KEYSTORE, "android.security.keystore" },
 };
 
-void *svcmgr_handle;
+uint32_t svcmgr_handle;
 
-const char *str8(uint16_t *x)
+const char *str8(const uint16_t *x)
 {
     static char buf[128];
     unsigned max = 127;
@@ -67,7 +67,7 @@
     return buf;
 }
 
-int str16eq(uint16_t *a, const char *b)
+int str16eq(const uint16_t *a, const char *b)
 {
     while (*a && *b)
         if (*a++ != *b++) return 0;
@@ -76,10 +76,10 @@
     return 1;
 }
 
-int svc_can_register(unsigned uid, uint16_t *name)
+int svc_can_register(uid_t uid, const uint16_t *name)
 {
-    unsigned n;
-    
+    size_t n;
+
     if ((uid == 0) || (uid == AID_SYSTEM))
         return 1;
 
@@ -90,19 +90,19 @@
     return 0;
 }
 
-struct svcinfo 
+struct svcinfo
 {
     struct svcinfo *next;
-    void *ptr;
+    uint32_t handle;
     struct binder_death death;
     int allow_isolated;
-    unsigned len;
+    size_t len;
     uint16_t name[0];
 };
 
-struct svcinfo *svclist = 0;
+struct svcinfo *svclist = NULL;
 
-struct svcinfo *find_svc(uint16_t *s16, unsigned len)
+struct svcinfo *find_svc(const uint16_t *s16, size_t len)
 {
     struct svcinfo *si;
 
@@ -112,112 +112,117 @@
             return si;
         }
     }
-    return 0;
+    return NULL;
 }
 
 void svcinfo_death(struct binder_state *bs, void *ptr)
 {
-    struct svcinfo *si = ptr;
+    struct svcinfo *si = (struct svcinfo* ) ptr;
+
     ALOGI("service '%s' died\n", str8(si->name));
-    if (si->ptr) {
-        binder_release(bs, si->ptr);
-        si->ptr = 0;
-    }   
+    if (si->handle) {
+        binder_release(bs, si->handle);
+        si->handle = 0;
+    }
 }
 
-uint16_t svcmgr_id[] = { 
+uint16_t svcmgr_id[] = {
     'a','n','d','r','o','i','d','.','o','s','.',
-    'I','S','e','r','v','i','c','e','M','a','n','a','g','e','r' 
+    'I','S','e','r','v','i','c','e','M','a','n','a','g','e','r'
 };
-  
 
-void *do_find_service(struct binder_state *bs, uint16_t *s, unsigned len, unsigned uid)
+
+uint32_t do_find_service(struct binder_state *bs, const uint16_t *s, size_t len, uid_t uid)
 {
     struct svcinfo *si;
-    si = find_svc(s, len);
 
-//    ALOGI("check_service('%s') ptr = %p\n", str8(s), si ? si->ptr : 0);
-    if (si && si->ptr) {
+    si = find_svc(s, len);
+    //ALOGI("check_service('%s') handle = %x\n", str8(s), si ? si->handle : 0);
+    if (si && si->handle) {
         if (!si->allow_isolated) {
             // If this service doesn't allow access from isolated processes,
             // then check the uid to see if it is isolated.
-            unsigned appid = uid % AID_USER;
+            uid_t appid = uid % AID_USER;
             if (appid >= AID_ISOLATED_START && appid <= AID_ISOLATED_END) {
                 return 0;
             }
         }
-        return si->ptr;
+        return si->handle;
     } else {
         return 0;
     }
 }
 
 int do_add_service(struct binder_state *bs,
-                   uint16_t *s, unsigned len,
-                   void *ptr, unsigned uid, int allow_isolated)
+                   const uint16_t *s, size_t len,
+                   uint32_t handle, uid_t uid, int allow_isolated)
 {
     struct svcinfo *si;
-    //ALOGI("add_service('%s',%p,%s) uid=%d\n", str8(s), ptr,
+
+    //ALOGI("add_service('%s',%x,%s) uid=%d\n", str8(s), handle,
     //        allow_isolated ? "allow_isolated" : "!allow_isolated", uid);
 
-    if (!ptr || (len == 0) || (len > 127))
+    if (!handle || (len == 0) || (len > 127))
         return -1;
 
     if (!svc_can_register(uid, s)) {
-        ALOGE("add_service('%s',%p) uid=%d - PERMISSION DENIED\n",
-             str8(s), ptr, uid);
+        ALOGE("add_service('%s',%x) uid=%d - PERMISSION DENIED\n",
+             str8(s), handle, uid);
         return -1;
     }
 
     si = find_svc(s, len);
     if (si) {
-        if (si->ptr) {
-            ALOGE("add_service('%s',%p) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
-                 str8(s), ptr, uid);
+        if (si->handle) {
+            ALOGE("add_service('%s',%x) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
+                 str8(s), handle, uid);
             svcinfo_death(bs, si);
         }
-        si->ptr = ptr;
+        si->handle = handle;
     } else {
         si = malloc(sizeof(*si) + (len + 1) * sizeof(uint16_t));
         if (!si) {
-            ALOGE("add_service('%s',%p) uid=%d - OUT OF MEMORY\n",
-                 str8(s), ptr, uid);
+            ALOGE("add_service('%s',%x) uid=%d - OUT OF MEMORY\n",
+                 str8(s), handle, uid);
             return -1;
         }
-        si->ptr = ptr;
+        si->handle = handle;
         si->len = len;
         memcpy(si->name, s, (len + 1) * sizeof(uint16_t));
         si->name[len] = '\0';
-        si->death.func = svcinfo_death;
+        si->death.func = (void*) svcinfo_death;
         si->death.ptr = si;
         si->allow_isolated = allow_isolated;
         si->next = svclist;
         svclist = si;
     }
 
-    binder_acquire(bs, ptr);
-    binder_link_to_death(bs, ptr, &si->death);
+    binder_acquire(bs, handle);
+    binder_link_to_death(bs, handle, &si->death);
     return 0;
 }
 
 int svcmgr_handler(struct binder_state *bs,
-                   struct binder_txn *txn,
+                   struct binder_transaction_data *txn,
                    struct binder_io *msg,
                    struct binder_io *reply)
 {
     struct svcinfo *si;
     uint16_t *s;
-    unsigned len;
-    void *ptr;
+    size_t len;
+    uint32_t handle;
     uint32_t strict_policy;
     int allow_isolated;
 
-//    ALOGI("target=%p code=%d pid=%d uid=%d\n",
-//         txn->target, txn->code, txn->sender_pid, txn->sender_euid);
+    //ALOGI("target=%x code=%d pid=%d uid=%d\n",
+    //  txn->target.handle, txn->code, txn->sender_pid, txn->sender_euid);
 
-    if (txn->target != svcmgr_handle)
+    if (txn->target.handle != svcmgr_handle)
         return -1;
 
+    if (txn->code == PING_TRANSACTION)
+        return 0;
+
     // Equivalent to Parcel::enforceInterface(), reading the RPC
     // header with the strict mode policy mask and the interface name.
     // Note that we ignore the strict_policy and don't propagate it
@@ -234,22 +239,22 @@
     case SVC_MGR_GET_SERVICE:
     case SVC_MGR_CHECK_SERVICE:
         s = bio_get_string16(msg, &len);
-        ptr = do_find_service(bs, s, len, txn->sender_euid);
-        if (!ptr)
+        handle = do_find_service(bs, s, len, txn->sender_euid);
+        if (!handle)
             break;
-        bio_put_ref(reply, ptr);
+        bio_put_ref(reply, handle);
         return 0;
 
     case SVC_MGR_ADD_SERVICE:
         s = bio_get_string16(msg, &len);
-        ptr = bio_get_ref(msg);
+        handle = bio_get_ref(msg);
         allow_isolated = bio_get_uint32(msg) ? 1 : 0;
-        if (do_add_service(bs, s, len, ptr, txn->sender_euid, allow_isolated))
+        if (do_add_service(bs, s, len, handle, txn->sender_euid, allow_isolated))
             return -1;
         break;
 
     case SVC_MGR_LIST_SERVICES: {
-        unsigned n = bio_get_uint32(msg);
+        uint32_t n = bio_get_uint32(msg);
 
         si = svclist;
         while ((n-- > 0) && si)
@@ -272,16 +277,20 @@
 int main(int argc, char **argv)
 {
     struct binder_state *bs;
-    void *svcmgr = BINDER_SERVICE_MANAGER;
 
     bs = binder_open(128*1024);
+    if (!bs) {
+        ALOGE("failed to open binder driver\n");
+        return -1;
+    }
 
     if (binder_become_context_manager(bs)) {
         ALOGE("cannot become context manager (%s)\n", strerror(errno));
         return -1;
     }
 
-    svcmgr_handle = svcmgr;
+    svcmgr_handle = BINDER_SERVICE_MANAGER;
     binder_loop(bs, svcmgr_handler);
+
     return 0;
 }
diff --git a/include/android/input.h b/include/android/input.h
index fead769..a660761 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -583,7 +583,7 @@
  * and views. */
 float AMotionEvent_getXOffset(const AInputEvent* motion_event);
 
-/* Get the precision of the Y coordinates being reported.
+/* Get the Y coordinate offset.
  * For touch events on the screen, this is the delta that was added to the raw
  * screen coordinates to adjust for the absolute position of the containing windows
  * and views. */
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h
index 5bc123e..6e0c01b 100644
--- a/include/binder/IPCThreadState.h
+++ b/include/binder/IPCThreadState.h
@@ -107,7 +107,7 @@
     static  void                threadDestructor(void *st);
     static  void                freeBuffer(Parcel* parcel,
                                            const uint8_t* data, size_t dataSize,
-                                           const size_t* objects, size_t objectsSize,
+                                           const binder_size_t* objects, size_t objectsSize,
                                            void* cookie);
     
     const   sp<ProcessState>    mProcess;
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index 98f20de..ce630bd 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -23,6 +23,7 @@
 #include <utils/String16.h>
 #include <utils/Vector.h>
 #include <utils/Flattenable.h>
+#include <linux/binder.h>
 
 // ---------------------------------------------------------------------------
 namespace android {
@@ -35,9 +36,8 @@
 class String8;
 class TextOutput;
 
-struct flat_binder_object;  // defined in support_p/binder_module.h
-
 class Parcel {
+    friend class IPCThreadState;
 public:
     class ReadableBlob;
     class WritableBlob;
@@ -81,7 +81,10 @@
 
     void                freeData();
 
-    const size_t*       objects() const;
+private:
+    const binder_size_t* objects() const;
+
+public:
     size_t              objectsCount() const;
     
     status_t            errorCheck() const;
@@ -194,19 +197,21 @@
     // Explicitly close all file descriptors in the parcel.
     void                closeFileDescriptors();
     
+private:
     typedef void        (*release_func)(Parcel* parcel,
                                         const uint8_t* data, size_t dataSize,
-                                        const size_t* objects, size_t objectsSize,
+                                        const binder_size_t* objects, size_t objectsSize,
                                         void* cookie);
                         
-    const uint8_t*      ipcData() const;
+    uintptr_t           ipcData() const;
     size_t              ipcDataSize() const;
-    const size_t*       ipcObjects() const;
+    uintptr_t           ipcObjects() const;
     size_t              ipcObjectsCount() const;
     void                ipcSetDataReference(const uint8_t* data, size_t dataSize,
-                                            const size_t* objects, size_t objectsCount,
+                                            const binder_size_t* objects, size_t objectsCount,
                                             release_func relFunc, void* relCookie);
     
+public:
     void                print(TextOutput& to, uint32_t flags = 0) const;
 
 private:
@@ -219,6 +224,9 @@
     status_t            growData(size_t len);
     status_t            restartWrite(size_t desired);
     status_t            continueWrite(size_t desired);
+    status_t            writePointer(uintptr_t val);
+    status_t            readPointer(uintptr_t *pArg) const;
+    uintptr_t           readPointer() const;
     void                freeDataNoInit();
     void                initState();
     void                scanForFds() const;
@@ -236,7 +244,7 @@
     size_t              mDataSize;
     size_t              mDataCapacity;
     mutable size_t      mDataPos;
-    size_t*             mObjects;
+    binder_size_t*      mObjects;
     size_t              mObjectsSize;
     size_t              mObjectsCapacity;
     mutable size_t      mNextObjectHint;
diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk
index f3f8daf..673fc82 100644
--- a/libs/binder/Android.mk
+++ b/libs/binder/Android.mk
@@ -42,6 +42,11 @@
 LOCAL_MODULE := libbinder
 LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
 LOCAL_SRC_FILES := $(sources)
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1
+endif
+endif
 include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -49,4 +54,9 @@
 LOCAL_MODULE := libbinder
 LOCAL_STATIC_LIBRARIES += libutils
 LOCAL_SRC_FILES := $(sources)
+ifneq ($(TARGET_USES_64_BIT_BINDER),true)
+ifneq ($(TARGET_IS_64_BIT),true)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1
+endif
+endif
 include $(BUILD_STATIC_LIBRARY)
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index 1f21f9c..71e62ab 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -39,7 +39,7 @@
 
 // ---------------------------------------------------------------------------
 
-sp<IInterface>  IBinder::queryLocalInterface(const String16& descriptor)
+sp<IInterface>  IBinder::queryLocalInterface(const String16& /*descriptor*/)
 {
     return NULL;
 }
@@ -117,19 +117,20 @@
 }
 
 status_t BBinder::linkToDeath(
-    const sp<DeathRecipient>& recipient, void* cookie, uint32_t flags)
+    const sp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+    uint32_t /*flags*/)
 {
     return INVALID_OPERATION;
 }
 
 status_t BBinder::unlinkToDeath(
-    const wp<DeathRecipient>& recipient, void* cookie, uint32_t flags,
-    wp<DeathRecipient>* outRecipient)
+    const wp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
+    uint32_t /*flags*/, wp<DeathRecipient>* /*outRecipient*/)
 {
     return INVALID_OPERATION;
 }
 
-status_t BBinder::dump(int fd, const Vector<String16>& args)
+    status_t BBinder::dump(int /*fd*/, const Vector<String16>& /*args*/)
 {
     return NO_ERROR;
 }
@@ -142,8 +143,13 @@
 
     if (!e) {
         e = new Extras;
+#ifdef __LP64__
+        if (android_atomic_release_cas64(0, reinterpret_cast<int64_t>(e),
+                reinterpret_cast<volatile int64_t*>(&mExtras)) != 0) {
+#else
         if (android_atomic_cmpxchg(0, reinterpret_cast<int32_t>(e),
                 reinterpret_cast<volatile int32_t*>(&mExtras)) != 0) {
+#endif
             delete e;
             e = mExtras;
         }
@@ -184,7 +190,7 @@
 
 
 status_t BBinder::onTransact(
-    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t /*flags*/)
 {
     switch (code) {
         case INTERFACE_TRANSACTION:
@@ -246,14 +252,14 @@
     android_atomic_or(kRemoteAcquired, &mState);
 }
 
-void BpRefBase::onLastStrongRef(const void* id)
+void BpRefBase::onLastStrongRef(const void* /*id*/)
 {
     if (mRemote) {
         mRemote->decStrong(this);
     }
 }
 
-bool BpRefBase::onIncStrongAttempted(uint32_t flags, const void* id)
+bool BpRefBase::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
 {
     return mRemote ? mRefs->attemptIncStrong(this) : false;
 }
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index 47a62db..1bad67a 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -343,7 +343,7 @@
     if (ipc) ipc->incStrongHandle(mHandle);
 }
 
-void BpBinder::onLastStrongRef(const void* id)
+void BpBinder::onLastStrongRef(const void* /*id*/)
 {
     ALOGV("onLastStrongRef BpBinder %p handle %d\n", this, mHandle);
     IF_ALOGV() {
@@ -353,7 +353,7 @@
     if (ipc) ipc->decStrongHandle(mHandle);
 }
 
-bool BpBinder::onIncStrongAttempted(uint32_t flags, const void* id)
+bool BpBinder::onIncStrongAttempted(uint32_t /*flags*/, const void* /*id*/)
 {
     ALOGV("onIncStrongAttempted BpBinder %p handle %d\n", this, mHandle);
     IPCThreadState* ipc = IPCThreadState::self();
diff --git a/libs/binder/Debug.cpp b/libs/binder/Debug.cpp
index a8b6e83..0ffafbb 100644
--- a/libs/binder/Debug.cpp
+++ b/libs/binder/Debug.cpp
@@ -38,7 +38,7 @@
 
 // ---------------------------------------------------------------------
 
-static void defaultPrintFunc(void* cookie, const char* txt)
+static void defaultPrintFunc(void* /*cookie*/, const char* txt)
 {
     printf("%s", txt);
 }
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp
index 07cb41a..d8ed995 100644
--- a/libs/binder/IMemory.cpp
+++ b/libs/binder/IMemory.cpp
@@ -244,7 +244,7 @@
                 sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
 
                 if (VERBOSE) {
-                    ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
+                    ALOGD("UNMAPPING binder=%p, heap=%p, size=%zu, fd=%d",
                             binder.get(), this, mSize, mHeapId);
                     CallStack stack(LOG_TAG);
                 }
@@ -296,11 +296,11 @@
         uint32_t flags = reply.readInt32();
         uint32_t offset = reply.readInt32();
 
-        ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
+        ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%zd, err=%d (%s)",
                 asBinder().get(), parcel_fd, size, err, strerror(-err));
 
         int fd = dup( parcel_fd );
-        ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
+        ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%zd, err=%d (%s)",
                 parcel_fd, size, err, strerror(errno));
 
         int access = PROT_READ;
@@ -313,7 +313,7 @@
             mRealHeap = true;
             mBase = mmap(0, size, access, MAP_SHARED, fd, offset);
             if (mBase == MAP_FAILED) {
-                ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
+                ALOGE("cannot map BpMemoryHeap (binder=%p), size=%zd, fd=%d (%s)",
                         asBinder().get(), size, fd, strerror(errno));
                 close(fd);
             } else {
@@ -402,7 +402,7 @@
     if (i>=0) {
         heap_info_t& info = mHeapCache.editValueAt(i);
         ALOGD_IF(VERBOSE,
-                "found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+                "found binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
                 binder.get(), info.heap.get(),
                 static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
                 static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -435,7 +435,7 @@
             int32_t c = android_atomic_dec(&info.count);
             if (c == 1) {
                 ALOGD_IF(VERBOSE,
-                        "removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+                        "removing binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
                         binder.unsafe_get(), info.heap.get(),
                         static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
                         static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -466,7 +466,7 @@
     for (int i=0 ; i<c ; i++) {
         const heap_info_t& info = mHeapCache.valueAt(i);
         BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
-        ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
+        ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%zu)",
                 mHeapCache.keyAt(i).unsafe_get(),
                 info.heap.get(), info.count,
                 h->mHeapId, h->mBase, h->mSize);
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 5951a3f..35dba12 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -533,7 +533,7 @@
     return result;
 }
 
-void IPCThreadState::stopProcess(bool immediate)
+void IPCThreadState::stopProcess(bool /*immediate*/)
 {
     //ALOGI("**** STOPPING PROCESS");
     flushCommands();
@@ -635,6 +635,7 @@
 
 status_t IPCThreadState::attemptIncStrongHandle(int32_t handle)
 {
+#if HAS_BC_ATTEMPT_ACQUIRE
     LOG_REMOTEREFS("IPCThreadState::attemptIncStrongHandle(%d)\n", handle);
     mOut.writeInt32(BC_ATTEMPT_ACQUIRE);
     mOut.writeInt32(0); // xxx was thread priority
@@ -649,6 +650,11 @@
 #endif
     
     return result;
+#else
+    (void)handle;
+    ALOGE("%s(%d): Not supported\n", __func__, handle);
+    return INVALID_OPERATION;
+#endif
 }
 
 void IPCThreadState::expungeHandle(int32_t handle, IBinder* binder)
@@ -663,7 +669,7 @@
 {
     mOut.writeInt32(BC_REQUEST_DEATH_NOTIFICATION);
     mOut.writeInt32((int32_t)handle);
-    mOut.writeInt32((int32_t)proxy);
+    mOut.writePointer((uintptr_t)proxy);
     return NO_ERROR;
 }
 
@@ -671,7 +677,7 @@
 {
     mOut.writeInt32(BC_CLEAR_DEATH_NOTIFICATION);
     mOut.writeInt32((int32_t)handle);
-    mOut.writeInt32((int32_t)proxy);
+    mOut.writePointer((uintptr_t)proxy);
     return NO_ERROR;
 }
 
@@ -753,23 +759,23 @@
                         reply->ipcSetDataReference(
                             reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
                             tr.data_size,
-                            reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
-                            tr.offsets_size/sizeof(size_t),
+                            reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+                            tr.offsets_size/sizeof(binder_size_t),
                             freeBuffer, this);
                     } else {
-                        err = *static_cast<const status_t*>(tr.data.ptr.buffer);
+                        err = *reinterpret_cast<const status_t*>(tr.data.ptr.buffer);
                         freeBuffer(NULL,
                             reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
                             tr.data_size,
-                            reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
-                            tr.offsets_size/sizeof(size_t), this);
+                            reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+                            tr.offsets_size/sizeof(binder_size_t), this);
                     }
                 } else {
                     freeBuffer(NULL,
                         reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
                         tr.data_size,
-                        reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
-                        tr.offsets_size/sizeof(size_t), this);
+                        reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+                        tr.offsets_size/sizeof(binder_size_t), this);
                     continue;
                 }
             }
@@ -809,12 +815,12 @@
     const size_t outAvail = (!doReceive || needRead) ? mOut.dataSize() : 0;
     
     bwr.write_size = outAvail;
-    bwr.write_buffer = (long unsigned int)mOut.data();
+    bwr.write_buffer = (uintptr_t)mOut.data();
 
     // This is what we'll read.
     if (doReceive && needRead) {
         bwr.read_size = mIn.dataCapacity();
-        bwr.read_buffer = (long unsigned int)mIn.data();
+        bwr.read_buffer = (uintptr_t)mIn.data();
     } else {
         bwr.read_size = 0;
         bwr.read_buffer = 0;
@@ -861,14 +867,14 @@
     } while (err == -EINTR);
 
     IF_LOG_COMMANDS() {
-        alog << "Our err: " << (void*)err << ", write consumed: "
+        alog << "Our err: " << (void*)(intptr_t)err << ", write consumed: "
             << bwr.write_consumed << " (of " << mOut.dataSize()
                         << "), read consumed: " << bwr.read_consumed << endl;
     }
 
     if (err >= NO_ERROR) {
         if (bwr.write_consumed > 0) {
-            if (bwr.write_consumed < (ssize_t)mOut.dataSize())
+            if (bwr.write_consumed < mOut.dataSize())
                 mOut.remove(0, bwr.write_consumed);
             else
                 mOut.setDataSize(0);
@@ -898,6 +904,7 @@
 {
     binder_transaction_data tr;
 
+    tr.target.ptr = 0; /* Don't pass uninitialized stack data to a remote process */
     tr.target.handle = handle;
     tr.code = code;
     tr.flags = binderFlags;
@@ -909,15 +916,15 @@
     if (err == NO_ERROR) {
         tr.data_size = data.ipcDataSize();
         tr.data.ptr.buffer = data.ipcData();
-        tr.offsets_size = data.ipcObjectsCount()*sizeof(size_t);
+        tr.offsets_size = data.ipcObjectsCount()*sizeof(binder_size_t);
         tr.data.ptr.offsets = data.ipcObjects();
     } else if (statusBuffer) {
         tr.flags |= TF_STATUS_CODE;
         *statusBuffer = err;
         tr.data_size = sizeof(status_t);
-        tr.data.ptr.buffer = statusBuffer;
+        tr.data.ptr.buffer = reinterpret_cast<uintptr_t>(statusBuffer);
         tr.offsets_size = 0;
-        tr.data.ptr.offsets = NULL;
+        tr.data.ptr.offsets = 0;
     } else {
         return (mLastError = err);
     }
@@ -950,8 +957,8 @@
         break;
         
     case BR_ACQUIRE:
-        refs = (RefBase::weakref_type*)mIn.readInt32();
-        obj = (BBinder*)mIn.readInt32();
+        refs = (RefBase::weakref_type*)mIn.readPointer();
+        obj = (BBinder*)mIn.readPointer();
         ALOG_ASSERT(refs->refBase() == obj,
                    "BR_ACQUIRE: object %p does not match cookie %p (expected %p)",
                    refs, obj, refs->refBase());
@@ -961,13 +968,13 @@
             obj->printRefs();
         }
         mOut.writeInt32(BC_ACQUIRE_DONE);
-        mOut.writeInt32((int32_t)refs);
-        mOut.writeInt32((int32_t)obj);
+        mOut.writePointer((uintptr_t)refs);
+        mOut.writePointer((uintptr_t)obj);
         break;
         
     case BR_RELEASE:
-        refs = (RefBase::weakref_type*)mIn.readInt32();
-        obj = (BBinder*)mIn.readInt32();
+        refs = (RefBase::weakref_type*)mIn.readPointer();
+        obj = (BBinder*)mIn.readPointer();
         ALOG_ASSERT(refs->refBase() == obj,
                    "BR_RELEASE: object %p does not match cookie %p (expected %p)",
                    refs, obj, refs->refBase());
@@ -979,17 +986,17 @@
         break;
         
     case BR_INCREFS:
-        refs = (RefBase::weakref_type*)mIn.readInt32();
-        obj = (BBinder*)mIn.readInt32();
+        refs = (RefBase::weakref_type*)mIn.readPointer();
+        obj = (BBinder*)mIn.readPointer();
         refs->incWeak(mProcess.get());
         mOut.writeInt32(BC_INCREFS_DONE);
-        mOut.writeInt32((int32_t)refs);
-        mOut.writeInt32((int32_t)obj);
+        mOut.writePointer((uintptr_t)refs);
+        mOut.writePointer((uintptr_t)obj);
         break;
         
     case BR_DECREFS:
-        refs = (RefBase::weakref_type*)mIn.readInt32();
-        obj = (BBinder*)mIn.readInt32();
+        refs = (RefBase::weakref_type*)mIn.readPointer();
+        obj = (BBinder*)mIn.readPointer();
         // NOTE: This assertion is not valid, because the object may no
         // longer exist (thus the (BBinder*)cast above resulting in a different
         // memory address).
@@ -1000,8 +1007,8 @@
         break;
         
     case BR_ATTEMPT_ACQUIRE:
-        refs = (RefBase::weakref_type*)mIn.readInt32();
-        obj = (BBinder*)mIn.readInt32();
+        refs = (RefBase::weakref_type*)mIn.readPointer();
+        obj = (BBinder*)mIn.readPointer();
          
         {
             const bool success = refs->attemptIncStrong(mProcess.get());
@@ -1026,8 +1033,8 @@
             buffer.ipcSetDataReference(
                 reinterpret_cast<const uint8_t*>(tr.data.ptr.buffer),
                 tr.data_size,
-                reinterpret_cast<const size_t*>(tr.data.ptr.offsets),
-                tr.offsets_size/sizeof(size_t), freeBuffer, this);
+                reinterpret_cast<const binder_size_t*>(tr.data.ptr.offsets),
+                tr.offsets_size/sizeof(binder_size_t), freeBuffer, this);
             
             const pid_t origPid = mCallingPid;
             const uid_t origUid = mCallingUid;
@@ -1103,15 +1110,15 @@
     
     case BR_DEAD_BINDER:
         {
-            BpBinder *proxy = (BpBinder*)mIn.readInt32();
+            BpBinder *proxy = (BpBinder*)mIn.readPointer();
             proxy->sendObituary();
             mOut.writeInt32(BC_DEAD_BINDER_DONE);
-            mOut.writeInt32((int32_t)proxy);
+            mOut.writePointer((uintptr_t)proxy);
         } break;
         
     case BR_CLEAR_DEATH_NOTIFICATION_DONE:
         {
-            BpBinder *proxy = (BpBinder*)mIn.readInt32();
+            BpBinder *proxy = (BpBinder*)mIn.readPointer();
             proxy->getWeakRefs()->decWeak(proxy);
         } break;
         
@@ -1154,9 +1161,10 @@
 }
 
 
-void IPCThreadState::freeBuffer(Parcel* parcel, const uint8_t* data, size_t dataSize,
-                                const size_t* objects, size_t objectsSize,
-                                void* cookie)
+void IPCThreadState::freeBuffer(Parcel* parcel, const uint8_t* data,
+                                size_t /*dataSize*/,
+                                const binder_size_t* /*objects*/,
+                                size_t /*objectsSize*/, void* /*cookie*/)
 {
     //ALOGI("Freeing parcel %p", &parcel);
     IF_LOG_COMMANDS() {
@@ -1166,7 +1174,7 @@
     if (parcel != NULL) parcel->closeFileDescriptors();
     IPCThreadState* state = self();
     state->mOut.writeInt32(BC_FREE_BUFFER);
-    state->mOut.writeInt32((int32_t)data);
+    state->mOut.writePointer((uintptr_t)data);
 }
 
 }; // namespace android
diff --git a/libs/binder/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp
index 8d0e0a7..a14c100 100644
--- a/libs/binder/MemoryDealer.cpp
+++ b/libs/binder/MemoryDealer.cpp
@@ -210,7 +210,7 @@
 #ifdef MADV_REMOVE
             if (size) {
                 int err = madvise(start_ptr, size, MADV_REMOVE);
-                ALOGW_IF(err, "madvise(%p, %u, MADV_REMOVE) returned %s",
+                ALOGW_IF(err, "madvise(%p, %zu, MADV_REMOVE) returned %s",
                         start_ptr, size, err<0 ? strerror(errno) : "Ok");
             }
 #endif
@@ -445,8 +445,8 @@
         int np = ((cur->next) && cur->next->prev != cur) ? 1 : 0;
         int pn = ((cur->prev) && cur->prev->next != cur) ? 2 : 0;
 
-        snprintf(buffer, SIZE, "  %3u: %08x | 0x%08X | 0x%08X | %s %s\n",
-            i, int(cur), int(cur->start*kMemoryAlign),
+        snprintf(buffer, SIZE, "  %3u: %p | 0x%08X | 0x%08X | %s %s\n",
+            i, cur, int(cur->start*kMemoryAlign),
             int(cur->size*kMemoryAlign),
                     int(cur->free) ? "F" : "A",
                     errs[np|pn]);
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index db9e0a1..67cb428 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -78,12 +78,12 @@
         case BINDER_TYPE_BINDER:
             if (obj.binder) {
                 LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie);
-                static_cast<IBinder*>(obj.cookie)->incStrong(who);
+                reinterpret_cast<IBinder*>(obj.cookie)->incStrong(who);
             }
             return;
         case BINDER_TYPE_WEAK_BINDER:
             if (obj.binder)
-                static_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who);
+                reinterpret_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who);
             return;
         case BINDER_TYPE_HANDLE: {
             const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle);
@@ -105,7 +105,7 @@
         }
     }
 
-    ALOGD("Invalid object type 0x%08lx", obj.type);
+    ALOGD("Invalid object type 0x%08x", obj.type);
 }
 
 void release_object(const sp<ProcessState>& proc,
@@ -115,12 +115,12 @@
         case BINDER_TYPE_BINDER:
             if (obj.binder) {
                 LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie);
-                static_cast<IBinder*>(obj.cookie)->decStrong(who);
+                reinterpret_cast<IBinder*>(obj.cookie)->decStrong(who);
             }
             return;
         case BINDER_TYPE_WEAK_BINDER:
             if (obj.binder)
-                static_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who);
+                reinterpret_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who);
             return;
         case BINDER_TYPE_HANDLE: {
             const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle);
@@ -136,21 +136,21 @@
             return;
         }
         case BINDER_TYPE_FD: {
-            if (obj.cookie != (void*)0) close(obj.handle);
+            if (obj.cookie != 0) close(obj.handle);
             return;
         }
     }
 
-    ALOGE("Invalid object type 0x%08lx", obj.type);
+    ALOGE("Invalid object type 0x%08x", obj.type);
 }
 
 inline static status_t finish_flatten_binder(
-    const sp<IBinder>& binder, const flat_binder_object& flat, Parcel* out)
+    const sp<IBinder>& /*binder*/, const flat_binder_object& flat, Parcel* out)
 {
     return out->writeObject(flat, false);
 }
 
-status_t flatten_binder(const sp<ProcessState>& proc,
+status_t flatten_binder(const sp<ProcessState>& /*proc*/,
     const sp<IBinder>& binder, Parcel* out)
 {
     flat_binder_object obj;
@@ -165,23 +165,24 @@
             }
             const int32_t handle = proxy ? proxy->handle() : 0;
             obj.type = BINDER_TYPE_HANDLE;
+            obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
             obj.handle = handle;
-            obj.cookie = NULL;
+            obj.cookie = 0;
         } else {
             obj.type = BINDER_TYPE_BINDER;
-            obj.binder = local->getWeakRefs();
-            obj.cookie = local;
+            obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs());
+            obj.cookie = reinterpret_cast<uintptr_t>(local);
         }
     } else {
         obj.type = BINDER_TYPE_BINDER;
-        obj.binder = NULL;
-        obj.cookie = NULL;
+        obj.binder = 0;
+        obj.cookie = 0;
     }
     
     return finish_flatten_binder(binder, obj, out);
 }
 
-status_t flatten_binder(const sp<ProcessState>& proc,
+status_t flatten_binder(const sp<ProcessState>& /*proc*/,
     const wp<IBinder>& binder, Parcel* out)
 {
     flat_binder_object obj;
@@ -198,12 +199,13 @@
                 }
                 const int32_t handle = proxy ? proxy->handle() : 0;
                 obj.type = BINDER_TYPE_WEAK_HANDLE;
+                obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
                 obj.handle = handle;
-                obj.cookie = NULL;
+                obj.cookie = 0;
             } else {
                 obj.type = BINDER_TYPE_WEAK_BINDER;
-                obj.binder = binder.get_refs();
-                obj.cookie = binder.unsafe_get();
+                obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs());
+                obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get());
             }
             return finish_flatten_binder(real, obj, out);
         }
@@ -217,20 +219,21 @@
         // implementation we are using.
         ALOGE("Unable to unflatten Binder weak reference!");
         obj.type = BINDER_TYPE_BINDER;
-        obj.binder = NULL;
-        obj.cookie = NULL;
+        obj.binder = 0;
+        obj.cookie = 0;
         return finish_flatten_binder(NULL, obj, out);
     
     } else {
         obj.type = BINDER_TYPE_BINDER;
-        obj.binder = NULL;
-        obj.cookie = NULL;
+        obj.binder = 0;
+        obj.cookie = 0;
         return finish_flatten_binder(NULL, obj, out);
     }
 }
 
 inline static status_t finish_unflatten_binder(
-    BpBinder* proxy, const flat_binder_object& flat, const Parcel& in)
+    BpBinder* /*proxy*/, const flat_binder_object& /*flat*/,
+    const Parcel& /*in*/)
 {
     return NO_ERROR;
 }
@@ -243,7 +246,7 @@
     if (flat) {
         switch (flat->type) {
             case BINDER_TYPE_BINDER:
-                *out = static_cast<IBinder*>(flat->cookie);
+                *out = reinterpret_cast<IBinder*>(flat->cookie);
                 return finish_unflatten_binder(NULL, *flat, in);
             case BINDER_TYPE_HANDLE:
                 *out = proc->getStrongProxyForHandle(flat->handle);
@@ -262,13 +265,13 @@
     if (flat) {
         switch (flat->type) {
             case BINDER_TYPE_BINDER:
-                *out = static_cast<IBinder*>(flat->cookie);
+                *out = reinterpret_cast<IBinder*>(flat->cookie);
                 return finish_unflatten_binder(NULL, *flat, in);
             case BINDER_TYPE_WEAK_BINDER:
-                if (flat->binder != NULL) {
+                if (flat->binder != 0) {
                     out->set_object_and_refs(
-                        static_cast<IBinder*>(flat->cookie),
-                        static_cast<RefBase::weakref_type*>(flat->binder));
+                        reinterpret_cast<IBinder*>(flat->cookie),
+                        reinterpret_cast<RefBase::weakref_type*>(flat->binder));
                 } else {
                     *out = NULL;
                 }
@@ -365,7 +368,7 @@
     const sp<ProcessState> proc(ProcessState::self());
     status_t err;
     const uint8_t *data = parcel->mData;
-    const size_t *objects = parcel->mObjects;
+    const binder_size_t *objects = parcel->mObjects;
     size_t size = parcel->mObjectsSize;
     int startPos = mDataPos;
     int firstIndex = -1, lastIndex = -2;
@@ -412,9 +415,9 @@
         // grow objects
         if (mObjectsCapacity < mObjectsSize + numObjects) {
             int newSize = ((mObjectsSize + numObjects)*3)/2;
-            size_t *objects =
-                (size_t*)realloc(mObjects, newSize*sizeof(size_t));
-            if (objects == (size_t*)0) {
+            binder_size_t *objects =
+                (binder_size_t*)realloc(mObjects, newSize*sizeof(binder_size_t));
+            if (objects == (binder_size_t*)0) {
                 return NO_MEMORY;
             }
             mObjects = objects;
@@ -437,7 +440,7 @@
                 // new Parcel now owns its own fd, and can declare that we
                 // officially know we have fds.
                 flat->handle = dup(flat->handle);
-                flat->cookie = (void*)1;
+                flat->cookie = 1;
                 mHasFds = mFdsKnown = true;
                 if (!mAllowFds) {
                     err = FDS_NOT_ALLOWED;
@@ -512,7 +515,7 @@
     }
 }
 
-const size_t* Parcel::objects() const
+const binder_size_t* Parcel::objects() const
 {
     return mObjects;
 }
@@ -644,6 +647,11 @@
     return writeAligned(val);
 }
 
+status_t Parcel::writePointer(uintptr_t val)
+{
+    return writeAligned<binder_uintptr_t>(val);
+}
+
 status_t Parcel::writeFloat(float val)
 {
     return writeAligned(val);
@@ -753,8 +761,9 @@
     flat_binder_object obj;
     obj.type = BINDER_TYPE_FD;
     obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS;
+    obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */
     obj.handle = fd;
-    obj.cookie = (void*) (takeOwnership ? 1 : 0);
+    obj.cookie = takeOwnership ? 1 : 0;
     return writeObject(obj, true);
 }
 
@@ -864,7 +873,7 @@
         *reinterpret_cast<flat_binder_object*>(mData+mDataPos) = val;
         
         // Need to write meta-data?
-        if (nullMetaData || val.binder != NULL) {
+        if (nullMetaData || val.binder != 0) {
             mObjects[mObjectsSize] = mDataPos;
             acquire_object(ProcessState::self(), val, this);
             mObjectsSize++;
@@ -887,7 +896,7 @@
     }
     if (!enoughObjects) {
         size_t newSize = ((mObjectsSize+2)*3)/2;
-        size_t* objects = (size_t*)realloc(mObjects, newSize*sizeof(size_t));
+        binder_size_t* objects = (binder_size_t*)realloc(mObjects, newSize*sizeof(binder_size_t));
         if (objects == NULL) return NO_MEMORY;
         mObjects = objects;
         mObjectsCapacity = newSize;
@@ -901,7 +910,7 @@
     return writeInt32(0);
 }
 
-void Parcel::remove(size_t start, size_t amt)
+void Parcel::remove(size_t /*start*/, size_t /*amt*/)
 {
     LOG_ALWAYS_FATAL("Parcel::remove() not yet implemented!");
 }
@@ -991,6 +1000,22 @@
     return readAligned<int64_t>();
 }
 
+status_t Parcel::readPointer(uintptr_t *pArg) const
+{
+    status_t ret;
+    binder_uintptr_t ptr;
+    ret = readAligned(&ptr);
+    if (!ret)
+        *pArg = ptr;
+    return ret;
+}
+
+uintptr_t Parcel::readPointer() const
+{
+    return readAligned<binder_uintptr_t>();
+}
+
+
 status_t Parcel::readFloat(float *pArg) const
 {
     return readAligned(pArg);
@@ -1236,7 +1261,7 @@
         const flat_binder_object* obj
                 = reinterpret_cast<const flat_binder_object*>(mData+DPOS);
         mDataPos = DPOS + sizeof(flat_binder_object);
-        if (!nullMetaData && (obj->cookie == NULL && obj->binder == NULL)) {
+        if (!nullMetaData && (obj->cookie == 0 && obj->binder == 0)) {
             // When transferring a NULL object, we don't write it into
             // the object list, so we don't want to check for it when
             // reading.
@@ -1245,7 +1270,7 @@
         }
         
         // Ensure that this object is valid...
-        size_t* const OBJS = mObjects;
+        binder_size_t* const OBJS = mObjects;
         const size_t N = mObjectsSize;
         size_t opos = mNextObjectHint;
         
@@ -1284,7 +1309,7 @@
                 return obj;
             }
         }
-        ALOGW("Attempt to read object from Parcel %p at offset %d that is not in the object list",
+        ALOGW("Attempt to read object from Parcel %p at offset %zu that is not in the object list",
              this, DPOS);
     }
     return NULL;
@@ -1307,9 +1332,9 @@
     }
 }
 
-const uint8_t* Parcel::ipcData() const
+uintptr_t Parcel::ipcData() const
 {
-    return mData;
+    return reinterpret_cast<uintptr_t>(mData);
 }
 
 size_t Parcel::ipcDataSize() const
@@ -1317,9 +1342,9 @@
     return (mDataSize > mDataPos ? mDataSize : mDataPos);
 }
 
-const size_t* Parcel::ipcObjects() const
+uintptr_t Parcel::ipcObjects() const
 {
-    return mObjects;
+    return reinterpret_cast<uintptr_t>(mObjects);
 }
 
 size_t Parcel::ipcObjectsCount() const
@@ -1328,9 +1353,9 @@
 }
 
 void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize,
-    const size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie)
+    const binder_size_t* objects, size_t objectsCount, release_func relFunc, void* relCookie)
 {
-    size_t minOffset = 0;
+    binder_size_t minOffset = 0;
     freeDataNoInit();
     mError = NO_ERROR;
     mData = const_cast<uint8_t*>(data);
@@ -1338,16 +1363,16 @@
     //ALOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
     mDataPos = 0;
     ALOGV("setDataReference Setting data pos of %p to %d\n", this, mDataPos);
-    mObjects = const_cast<size_t*>(objects);
+    mObjects = const_cast<binder_size_t*>(objects);
     mObjectsSize = mObjectsCapacity = objectsCount;
     mNextObjectHint = 0;
     mOwner = relFunc;
     mOwnerCookie = relCookie;
     for (size_t i = 0; i < mObjectsSize; i++) {
-        size_t offset = mObjects[i];
+        binder_size_t offset = mObjects[i];
         if (offset < minOffset) {
-            ALOGE("%s: bad object offset %zu < %zu\n",
-                  __func__, offset, minOffset);
+            ALOGE("%s: bad object offset %"PRIu64" < %"PRIu64"\n",
+                  __func__, (uint64_t)offset, (uint64_t)minOffset);
             mObjectsSize = 0;
             break;
         }
@@ -1356,17 +1381,17 @@
     scanForFds();
 }
 
-void Parcel::print(TextOutput& to, uint32_t flags) const
+void Parcel::print(TextOutput& to, uint32_t /*flags*/) const
 {
     to << "Parcel(";
     
     if (errorCheck() != NO_ERROR) {
         const status_t err = errorCheck();
-        to << "Error: " << (void*)err << " \"" << strerror(-err) << "\"";
+        to << "Error: " << (void*)(intptr_t)err << " \"" << strerror(-err) << "\"";
     } else if (dataSize() > 0) {
         const uint8_t* DATA = data();
         to << indent << HexDump(DATA, dataSize()) << dedent;
-        const size_t* OBJS = objects();
+        const binder_size_t* OBJS = objects();
         const size_t N = objectsCount();
         for (size_t i=0; i<N; i++) {
             const flat_binder_object* flat
@@ -1387,7 +1412,7 @@
     const sp<ProcessState> proc(ProcessState::self());
     size_t i = mObjectsSize;
     uint8_t* const data = mData;
-    size_t* const objects = mObjects;
+    binder_size_t* const objects = mObjects;
     while (i > 0) {
         i--;
         const flat_binder_object* flat
@@ -1401,7 +1426,7 @@
     const sp<ProcessState> proc(ProcessState::self());
     size_t i = mObjectsSize;
     uint8_t* const data = mData;
-    size_t* const objects = mObjects;
+    binder_size_t* const objects = mObjects;
     while (i > 0) {
         i--;
         const flat_binder_object* flat
@@ -1502,10 +1527,10 @@
             mError = NO_MEMORY;
             return NO_MEMORY;
         }
-        size_t* objects = NULL;
+        binder_size_t* objects = NULL;
         
         if (objectsSize) {
-            objects = (size_t*)malloc(objectsSize*sizeof(size_t));
+            objects = (binder_size_t*)malloc(objectsSize*sizeof(binder_size_t));
             if (!objects) {
                 free(data);
 
@@ -1525,7 +1550,7 @@
             memcpy(data, mData, mDataSize < desired ? mDataSize : desired);
         }
         if (objects && mObjects) {
-            memcpy(objects, mObjects, objectsSize*sizeof(size_t));
+            memcpy(objects, mObjects, objectsSize*sizeof(binder_size_t));
         }
         //ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
         mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
@@ -1552,8 +1577,8 @@
                 }
                 release_object(proc, *flat, this);
             }
-            size_t* objects =
-                (size_t*)realloc(mObjects, objectsSize*sizeof(size_t));
+            binder_size_t* objects =
+                (binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t));
             if (objects) {
                 mObjects = objects;
             }
@@ -1592,7 +1617,7 @@
 
         if(!(mDataCapacity == 0 && mObjects == NULL
              && mObjectsCapacity == 0)) {
-            ALOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
+            ALOGE("continueWrite: %zu/%p/%zu/%zu", mDataCapacity, mObjects, mObjectsCapacity, desired);
         }
         
         mData = data;
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index c1e49bc..19ed047 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -86,7 +86,7 @@
     setContextObject(object, String16("default"));
 }
 
-sp<IBinder> ProcessState::getContextObject(const sp<IBinder>& caller)
+sp<IBinder> ProcessState::getContextObject(const sp<IBinder>& /*caller*/)
 {
     return getStrongProxyForHandle(0);
 }
@@ -345,7 +345,7 @@
     int fd = open("/dev/binder", O_RDWR);
     if (fd >= 0) {
         fcntl(fd, F_SETFD, FD_CLOEXEC);
-        int vers;
+        int vers = 0;
         status_t result = ioctl(fd, BINDER_VERSION, &vers);
         if (result == -1) {
             ALOGE("Binder ioctl to obtain version failed: %s", strerror(errno));
diff --git a/libs/gui/tests/CpuConsumer_test.cpp b/libs/gui/tests/CpuConsumer_test.cpp
index afbc026..b370a2d 100644
--- a/libs/gui/tests/CpuConsumer_test.cpp
+++ b/libs/gui/tests/CpuConsumer_test.cpp
@@ -656,7 +656,7 @@
     ALOGV("Locking frame %d (too many)", params.maxLockedBuffers);
     CpuConsumer::LockedBuffer bTooMuch;
     err = mCC->lockNextBuffer(&bTooMuch);
-    ASSERT_TRUE(err == INVALID_OPERATION) << "Allowing too many locks";
+    ASSERT_TRUE(err == NOT_ENOUGH_DATA) << "Allowing too many locks";
 
     ALOGV("Unlocking frame 0");
     err = mCC->unlockBuffer(b[0]);
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 31a69b2..918f2e7 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -259,8 +259,8 @@
     return 0;
 }
 
-int FramebufferNativeWindow::lockBuffer_DEPRECATED(ANativeWindow* window, 
-        ANativeWindowBuffer* buffer)
+int FramebufferNativeWindow::lockBuffer_DEPRECATED(ANativeWindow* /*window*/, 
+        ANativeWindowBuffer* /*buffer*/)
 {
     return NO_ERROR;
 }
@@ -326,7 +326,7 @@
     return BAD_VALUE;
 }
 
-int FramebufferNativeWindow::perform(ANativeWindow* window,
+int FramebufferNativeWindow::perform(ANativeWindow* /*window*/,
         int operation, ...)
 {
     switch (operation) {
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index e5abcf5..6d58f56 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -16,6 +16,7 @@
 
 #define LOG_TAG "Region"
 
+#include <inttypes.h>
 #include <limits.h>
 
 #include <utils/Log.h>
@@ -798,7 +799,7 @@
     size_t SIZE = 256;
     char buffer[SIZE];
 
-    snprintf(buffer, SIZE, "  Region %s (this=%p, count=%d)\n",
+    snprintf(buffer, SIZE, "  Region %s (this=%p, count=%" PRIdPTR ")\n",
             what, this, tail-head);
     out.append(buffer);
     while (head != tail) {
@@ -814,7 +815,7 @@
     (void)flags;
     const_iterator head = begin();
     const_iterator const tail = end();
-    ALOGD("  Region %s (this=%p, count=%d)\n", what, this, tail-head);
+    ALOGD("  Region %s (this=%p, count=%" PRIdPTR ")\n", what, this, tail-head);
     while (head != tail) {
         ALOGD("    [%3d, %3d, %3d, %3d]\n",
                 head->left, head->top, head->right, head->bottom);
diff --git a/libs/ui/tests/Android.mk b/libs/ui/tests/Android.mk
index 6f62a55..b0c57db 100644
--- a/libs/ui/tests/Android.mk
+++ b/libs/ui/tests/Android.mk
@@ -26,8 +26,6 @@
 )
 
 # Build the unit tests.
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
 
 # Build the manual test programs.
 include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 95a8ef2..32bc5d9 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -29,17 +29,13 @@
 LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils liblog libpixelflinger libETC1 libui
 LOCAL_LDLIBS := -lpthread -ldl
 
-ifeq ($(TARGET_ARCH),arm)
-	LOCAL_SRC_FILES += fixed_asm.S iterators.S
-	LOCAL_CFLAGS += -fstrict-aliasing
-endif
+LOCAL_SRC_FILES_arm += fixed_asm.S iterators.S
+LOCAL_CFLAGS_arm += -fstrict-aliasing
 
-ifeq ($(TARGET_ARCH),mips)
-    LOCAL_SRC_FILES += arch-$(TARGET_ARCH)/fixed_asm.S
-    LOCAL_CFLAGS += -fstrict-aliasing
-    # The graphics code can generate division by zero
-    LOCAL_CFLAGS += -mno-check-zero-division
-endif
+LOCAL_SRC_FILES_mips += arch-mips/fixed_asm.S
+LOCAL_CFLAGS_mips += -fstrict-aliasing
+# The graphics code can generate division by zero
+LOCAL_CFLAGS_mips += -mno-check-zero-division
 
 # we need to access the private Bionic header <bionic_tls.h>
 LOCAL_C_INCLUDES += bionic/libc/private
diff --git a/opengl/libagl/BufferObjectManager.h b/opengl/libagl/BufferObjectManager.h
index 9e9340a..6487faa 100644
--- a/opengl/libagl/BufferObjectManager.h
+++ b/opengl/libagl/BufferObjectManager.h
@@ -69,10 +69,10 @@
     KeyedVector<GLuint, gl::buffer_t*>  mBuffers;
 };
 
-void EGLBufferObjectManager::incStrong(const void* id) const {
+void EGLBufferObjectManager::incStrong(const void* /*id*/) const {
     android_atomic_inc(&mCount);
 }
-void EGLBufferObjectManager::decStrong(const void* id) const {
+void EGLBufferObjectManager::decStrong(const void* /*id*/) const {
     if (android_atomic_dec(&mCount) == 1) {
         delete this;
     }
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
index 7fbe9b5..54207fa 100644
--- a/opengl/libagl/array.cpp
+++ b/opengl/libagl/array.cpp
@@ -397,9 +397,9 @@
     }
 }
 
+#if VC_CACHE_STATISTICS
 void vertex_cache_t::dump_stats(GLenum mode)
 {
-#if VC_CACHE_STATISTICS
     nsecs_t time = systemTime(SYSTEM_TIME_THREAD) - startTime;
     uint32_t hits = total - misses;
     uint32_t prim_count;
@@ -418,8 +418,12 @@
             total, hits, misses, (hits*100)/total,
             prim_count, int(ns2us(time)), int(prim_count*float(seconds(1))/time),
             float(misses) / prim_count);
-#endif
 }
+#else
+void vertex_cache_t::dump_stats(GLenum /*mode*/)
+{
+}
+#endif
 
 // ----------------------------------------------------------------------------
 #if 0
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index f925e7d..1feac8b 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -206,7 +206,7 @@
     return EGL_BUFFER_PRESERVED;
 }
 EGLBoolean egl_surface_t::setSwapRectangle(
-        EGLint l, EGLint t, EGLint w, EGLint h)
+        EGLint /*l*/, EGLint /*t*/, EGLint /*w*/, EGLint /*h*/)
 {
     return EGL_FALSE;
 }
@@ -793,7 +793,7 @@
     static bool mask(GLint reqValue, GLint confValue) {
         return (confValue & reqValue) == reqValue;
     }
-    static bool ignore(GLint reqValue, GLint confValue) {
+    static bool ignore(GLint /*reqValue*/, GLint /*confValue*/) {
         return true;
     }
 };
@@ -1197,7 +1197,7 @@
     return 0;
 }
 
-static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
+static EGLBoolean getConfigAttrib(EGLDisplay /*dpy*/, EGLConfig config,
         EGLint attribute, EGLint *value)
 {
     size_t numConfigs =  NELEM(gConfigs);
@@ -1227,7 +1227,7 @@
 }
 
 static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
-        NativeWindowType window, const EGLint *attrib_list)
+        NativeWindowType window, const EGLint* /*attrib_list*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1276,7 +1276,7 @@
 }
 
 static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config,
-        NativePixmapType pixmap, const EGLint *attrib_list)
+        NativePixmapType pixmap, const EGLint* /*attrib_list*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1655,7 +1655,7 @@
 }
 
 EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
-                            EGLContext share_list, const EGLint *attrib_list)
+                            EGLContext /*share_list*/, const EGLint* /*attrib_list*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1853,7 +1853,7 @@
     return EGL_TRUE;
 }
 
-EGLBoolean eglWaitNative(EGLint engine)
+EGLBoolean eglWaitNative(EGLint /*engine*/)
 {
     return EGL_TRUE;
 }
@@ -1887,8 +1887,8 @@
     return EGL_TRUE;
 }
 
-EGLBoolean eglCopyBuffers(  EGLDisplay dpy, EGLSurface surface,
-                            NativePixmapType target)
+EGLBoolean eglCopyBuffers(  EGLDisplay dpy, EGLSurface /*surface*/,
+                            NativePixmapType /*target*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1924,7 +1924,7 @@
 // ----------------------------------------------------------------------------
 
 EGLBoolean eglSurfaceAttrib(
-        EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
+        EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*attribute*/, EGLint /*value*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1933,7 +1933,7 @@
 }
 
 EGLBoolean eglBindTexImage(
-        EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+        EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1942,7 +1942,7 @@
 }
 
 EGLBoolean eglReleaseTexImage(
-        EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+        EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1950,7 +1950,7 @@
     return setError(EGL_BAD_PARAMETER, EGL_FALSE);
 }
 
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
+EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint /*interval*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1987,8 +1987,8 @@
 }
 
 EGLSurface eglCreatePbufferFromClientBuffer(
-          EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
-          EGLConfig config, const EGLint *attrib_list)
+          EGLDisplay dpy, EGLenum /*buftype*/, EGLClientBuffer /*buffer*/,
+          EGLConfig /*config*/, const EGLint* /*attrib_list*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE)
         return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -2011,21 +2011,21 @@
     return NULL;
 }
 
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
-        const EGLint *attrib_list)
+EGLBoolean eglLockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/,
+        const EGLint* /*attrib_list*/)
 {
     EGLBoolean result = EGL_FALSE;
     return result;
 }
 
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
+EGLBoolean eglUnlockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/)
 {
     EGLBoolean result = EGL_FALSE;
     return result;
 }
 
 EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
-        EGLClientBuffer buffer, const EGLint *attrib_list)
+        EGLClientBuffer buffer, const EGLint* /*attrib_list*/)
 {
     if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
         return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR);
@@ -2106,7 +2106,7 @@
     return FENCE_SYNC_HANDLE;
 }
 
-EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
+EGLBoolean eglDestroySyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync)
 {
     if (sync != FENCE_SYNC_HANDLE) {
         return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2115,8 +2115,8 @@
     return EGL_TRUE;
 }
 
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags,
-        EGLTimeKHR timeout)
+EGLint eglClientWaitSyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync, EGLint /*flags*/,
+        EGLTimeKHR /*timeout*/)
 {
     if (sync != FENCE_SYNC_HANDLE) {
         return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2125,7 +2125,7 @@
     return EGL_CONDITION_SATISFIED_KHR;
 }
 
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
+EGLBoolean eglGetSyncAttribKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync,
         EGLint attribute, EGLint *value)
 {
     if (sync != FENCE_SYNC_HANDLE) {
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
index fafec3f..479bf7e 100644
--- a/opengl/libagl/light.cpp
+++ b/opengl/libagl/light.cpp
@@ -105,7 +105,7 @@
     c->lighting.shadeModel = GL_SMOOTH;
 }
 
-void ogles_uninit_light(ogles_context_t* c)
+void ogles_uninit_light(ogles_context_t* /*c*/)
 {
 }
 
@@ -285,7 +285,7 @@
     invalidate_lighting(c);
 }
 
-void lightVertexNop(ogles_context_t*, vertex_t* v)
+void lightVertexNop(ogles_context_t*, vertex_t* /*v*/)
 {
     // we should never end-up here
 }
diff --git a/opengl/libagl/primitives.cpp b/opengl/libagl/primitives.cpp
index 769ec40..57a798d 100644
--- a/opengl/libagl/primitives.cpp
+++ b/opengl/libagl/primitives.cpp
@@ -94,7 +94,7 @@
 }
 
 static void lightTriangleDarkFlat(ogles_context_t* c,
-        vertex_t* v0, vertex_t* v1, vertex_t* v2)
+        vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
 {
     if (!(v2->flags & vertex_t::LIT)) {
         v2->flags |= vertex_t::LIT;
@@ -118,7 +118,7 @@
 }
 
 static void lightTriangleFlat(ogles_context_t* c,
-        vertex_t* v0, vertex_t* v1, vertex_t* v2)
+        vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
 {
     if (!(v2->flags & vertex_t::LIT))
         c->lighting.lightVertex(c, v2);
@@ -567,8 +567,8 @@
 #pragma mark Triangle
 #endif
 
-void primitive_nop_triangle(ogles_context_t* c,
-        vertex_t* v0, vertex_t* v1, vertex_t* v2) {
+void primitive_nop_triangle(ogles_context_t* /*c*/,
+        vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/) {
 }
 
 void primitive_clip_triangle(ogles_context_t* c,
@@ -823,7 +823,7 @@
 
 
 static inline
-bool cull_triangle(ogles_context_t* c, vertex_t* v0, vertex_t* v1, vertex_t* v2)
+bool cull_triangle(ogles_context_t* c, vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/)
 {
     if (ggl_likely(c->cull.enable)) {
         const GLenum winding = (c->lerp.area() > 0) ? GL_CW : GL_CCW;
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index 4bc653a..1d5def5 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -219,11 +219,11 @@
 #endif
 
 // These ones are super-easy, we're not supporting those features!
-void glSampleCoverage(GLclampf value, GLboolean invert) {
+void glSampleCoverage(GLclampf /*value*/, GLboolean /*invert*/) {
 }
-void glSampleCoveragex(GLclampx value, GLboolean invert) {
+void glSampleCoveragex(GLclampx /*value*/, GLboolean /*invert*/) {
 }
-void glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+void glStencilFunc(GLenum func, GLint /*ref*/, GLuint /*mask*/) {
     ogles_context_t* c = ogles_context_t::get();
     if (func < GL_NEVER || func > GL_ALWAYS) {
         ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 08536df..9aa1c4f 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1223,10 +1223,10 @@
 // ----------------------------------------------------------------------------
 
 void glCompressedTexSubImage2D(
-        GLenum target, GLint level, GLint xoffset,
-        GLint yoffset, GLsizei width, GLsizei height,
-        GLenum format, GLsizei imageSize,
-        const GLvoid *data)
+        GLenum /*target*/, GLint /*level*/, GLint /*xoffset*/,
+        GLint /*yoffset*/, GLsizei /*width*/, GLsizei /*height*/,
+        GLenum /*format*/, GLsizei /*imageSize*/,
+        const GLvoid* /*data*/)
 {
     ogles_context_t* c = ogles_context_t::get();
     ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/vertex.cpp b/opengl/libagl/vertex.cpp
index dad04d6..9aacdb3 100644
--- a/opengl/libagl/vertex.cpp
+++ b/opengl/libagl/vertex.cpp
@@ -41,7 +41,7 @@
     c->currentNormal.z = 0x10000;
 }
 
-void ogles_uninit_vertex(ogles_context_t* c)
+void ogles_uninit_vertex(ogles_context_t* /*c*/)
 {
 }
 
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 02914a0..e528831 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -187,8 +187,13 @@
 
     LOG_ALWAYS_FATAL_IF(!hnd, "couldn't find an OpenGL ES implementation");
 
+#if defined(__LP64__)
+    cnx->libGles2 = load_wrapper("/system/lib64/libGLESv2.so");
+    cnx->libGles1 = load_wrapper("/system/lib64/libGLESv1_CM.so");
+#else
     cnx->libGles2 = load_wrapper("/system/lib/libGLESv2.so");
     cnx->libGles1 = load_wrapper("/system/lib/libGLESv1_CM.so");
+#endif
     LOG_ALWAYS_FATAL_IF(!cnx->libGles2 || !cnx->libGles1,
             "couldn't load system OpenGL ES wrapper libraries");
 
@@ -268,8 +273,13 @@
             String8 pattern;
             pattern.appendFormat("lib%s", kind);
             const char* const searchPaths[] = {
+#if defined(__LP64__)
+                    "/vendor/lib64/egl",
+                    "/system/lib64/egl"
+#else
                     "/vendor/lib/egl",
                     "/system/lib/egl"
+#endif
             };
 
             // first, we search for the exact name of the GLES userspace
@@ -310,7 +320,11 @@
             if (checkGlesEmulationStatus() == 0) {
                 ALOGD("Emulator without GPU support detected. "
                       "Fallback to software renderer.");
+#if defined(__LP64__)
+                result.setTo("/system/lib64/egl/libGLES_android.so");
+#else
                 result.setTo("/system/lib/egl/libGLES_android.so");
+#endif
                 return true;
             }
 
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 26240f1..7784ca6 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -313,7 +313,7 @@
 }
 
 EGLBoolean egl_display_t::makeCurrent(egl_context_t* c, egl_context_t* cur_c,
-        EGLSurface draw, EGLSurface read, EGLContext ctx,
+        EGLSurface draw, EGLSurface read, EGLContext /*ctx*/,
         EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx)
 {
     EGLBoolean result;
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 18ef6f9..893577b 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -53,34 +53,34 @@
 }
 
 void glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
-        const GLvoid *ptr, GLsizei count) {
+        const GLvoid *ptr, GLsizei /*count*/) {
     glColorPointer(size, type, stride, ptr);
 }
 void glNormalPointerBounds(GLenum type, GLsizei stride,
-        const GLvoid *pointer, GLsizei count) {
+        const GLvoid *pointer, GLsizei /*count*/) {
     glNormalPointer(type, stride, pointer);
 }
 void glTexCoordPointerBounds(GLint size, GLenum type,
-        GLsizei stride, const GLvoid *pointer, GLsizei count) {
+        GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
     glTexCoordPointer(size, type, stride, pointer);
 }
 void glVertexPointerBounds(GLint size, GLenum type,
-        GLsizei stride, const GLvoid *pointer, GLsizei count) {
+        GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
     glVertexPointer(size, type, stride, pointer);
 }
 
 void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
-        GLsizei stride, const GLvoid *pointer, GLsizei count) {
+        GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
     glPointSizePointerOES(type, stride, pointer);
 }
 
 GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
-        GLsizei stride, const GLvoid *pointer, GLsizei count) {
+        GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
     glMatrixIndexPointerOES(size, type, stride, pointer);
 }
 
 GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
-        GLsizei stride, const GLvoid *pointer, GLsizei count) {
+        GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
     glWeightPointerOES(size, type, stride, pointer);
 }
 
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index 2b1a702..e2cd0d8 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -113,8 +113,8 @@
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -478,8 +478,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // copy argument usage
     GLMessage_DataType *arg_usage = glmsg.add_args();
@@ -531,8 +531,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -842,8 +842,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -919,8 +919,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1188,8 +1188,8 @@
     // copy argument buffers
     GLMessage_DataType *arg_buffers = glmsg.add_args();
     arg_buffers->set_isarray(false);
-    arg_buffers->set_type(GLMessage::DataType::INT);
-    arg_buffers->add_intvalue((int)buffers);
+    arg_buffers->set_type(GLMessage::DataType::INT64);
+    arg_buffers->add_int64value((uintptr_t)buffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1223,8 +1223,8 @@
     // copy argument framebuffers
     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
     arg_framebuffers->set_isarray(false);
-    arg_framebuffers->set_type(GLMessage::DataType::INT);
-    arg_framebuffers->add_intvalue((int)framebuffers);
+    arg_framebuffers->set_type(GLMessage::DataType::INT64);
+    arg_framebuffers->add_int64value((uintptr_t)framebuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1286,8 +1286,8 @@
     // copy argument renderbuffers
     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
     arg_renderbuffers->set_isarray(false);
-    arg_renderbuffers->set_type(GLMessage::DataType::INT);
-    arg_renderbuffers->add_intvalue((int)renderbuffers);
+    arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1349,8 +1349,8 @@
     // copy argument textures
     GLMessage_DataType *arg_textures = glmsg.add_args();
     arg_textures->set_isarray(false);
-    arg_textures->set_type(GLMessage::DataType::INT);
-    arg_textures->add_intvalue((int)textures);
+    arg_textures->set_type(GLMessage::DataType::INT64);
+    arg_textures->add_int64value((uintptr_t)textures);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1616,8 +1616,8 @@
     // copy argument indices
     GLMessage_DataType *arg_indices = glmsg.add_args();
     arg_indices->set_isarray(false);
-    arg_indices->set_type(GLMessage::DataType::INT);
-    arg_indices->add_intvalue((int)indices);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1877,8 +1877,8 @@
     // copy argument buffers
     GLMessage_DataType *arg_buffers = glmsg.add_args();
     arg_buffers->set_isarray(false);
-    arg_buffers->set_type(GLMessage::DataType::INT);
-    arg_buffers->add_intvalue((int)buffers);
+    arg_buffers->set_type(GLMessage::DataType::INT64);
+    arg_buffers->add_int64value((uintptr_t)buffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1940,8 +1940,8 @@
     // copy argument framebuffers
     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
     arg_framebuffers->set_isarray(false);
-    arg_framebuffers->set_type(GLMessage::DataType::INT);
-    arg_framebuffers->add_intvalue((int)framebuffers);
+    arg_framebuffers->set_type(GLMessage::DataType::INT64);
+    arg_framebuffers->add_int64value((uintptr_t)framebuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -1975,8 +1975,8 @@
     // copy argument renderbuffers
     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
     arg_renderbuffers->set_isarray(false);
-    arg_renderbuffers->set_type(GLMessage::DataType::INT);
-    arg_renderbuffers->add_intvalue((int)renderbuffers);
+    arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2010,8 +2010,8 @@
     // copy argument textures
     GLMessage_DataType *arg_textures = glmsg.add_args();
     arg_textures->set_isarray(false);
-    arg_textures->set_type(GLMessage::DataType::INT);
-    arg_textures->add_intvalue((int)textures);
+    arg_textures->set_type(GLMessage::DataType::INT64);
+    arg_textures->add_int64value((uintptr_t)textures);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2057,26 +2057,26 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument size
     GLMessage_DataType *arg_size = glmsg.add_args();
     arg_size->set_isarray(false);
-    arg_size->set_type(GLMessage::DataType::INT);
-    arg_size->add_intvalue((int)size);
+    arg_size->set_type(GLMessage::DataType::INT64);
+    arg_size->add_int64value((uintptr_t)size);
 
     // copy argument type
     GLMessage_DataType *arg_type = glmsg.add_args();
     arg_type->set_isarray(false);
-    arg_type->set_type(GLMessage::DataType::INT);
-    arg_type->add_intvalue((int)type);
+    arg_type->set_type(GLMessage::DataType::INT64);
+    arg_type->add_int64value((uintptr_t)type);
 
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2125,26 +2125,26 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument size
     GLMessage_DataType *arg_size = glmsg.add_args();
     arg_size->set_isarray(false);
-    arg_size->set_type(GLMessage::DataType::INT);
-    arg_size->add_intvalue((int)size);
+    arg_size->set_type(GLMessage::DataType::INT64);
+    arg_size->add_int64value((uintptr_t)size);
 
     // copy argument type
     GLMessage_DataType *arg_type = glmsg.add_args();
     arg_type->set_isarray(false);
-    arg_type->set_type(GLMessage::DataType::INT);
-    arg_type->add_intvalue((int)type);
+    arg_type->set_type(GLMessage::DataType::INT64);
+    arg_type->add_int64value((uintptr_t)type);
 
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2187,14 +2187,14 @@
     // copy argument count
     GLMessage_DataType *arg_count = glmsg.add_args();
     arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue((int)count);
+    arg_count->set_type(GLMessage::DataType::INT64);
+    arg_count->add_int64value((uintptr_t)count);
 
     // copy argument shaders
     GLMessage_DataType *arg_shaders = glmsg.add_args();
     arg_shaders->set_isarray(false);
-    arg_shaders->set_type(GLMessage::DataType::INT);
-    arg_shaders->add_intvalue((int)shaders);
+    arg_shaders->set_type(GLMessage::DataType::INT64);
+    arg_shaders->add_int64value((uintptr_t)shaders);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2229,8 +2229,8 @@
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2272,8 +2272,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2313,8 +2313,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2378,8 +2378,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2425,8 +2425,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2460,8 +2460,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2501,8 +2501,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2542,14 +2542,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument infolog
     GLMessage_DataType *arg_infolog = glmsg.add_args();
     arg_infolog->set_isarray(false);
-    arg_infolog->set_type(GLMessage::DataType::INT);
-    arg_infolog->add_intvalue((int)infolog);
+    arg_infolog->set_type(GLMessage::DataType::INT64);
+    arg_infolog->add_int64value((uintptr_t)infolog);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2590,8 +2590,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2631,8 +2631,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2672,14 +2672,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument infolog
     GLMessage_DataType *arg_infolog = glmsg.add_args();
     arg_infolog->set_isarray(false);
-    arg_infolog->set_type(GLMessage::DataType::INT);
-    arg_infolog->add_intvalue((int)infolog);
+    arg_infolog->set_type(GLMessage::DataType::INT64);
+    arg_infolog->add_int64value((uintptr_t)infolog);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2720,14 +2720,14 @@
     // copy argument range
     GLMessage_DataType *arg_range = glmsg.add_args();
     arg_range->set_isarray(false);
-    arg_range->set_type(GLMessage::DataType::INT);
-    arg_range->add_intvalue((int)range);
+    arg_range->set_type(GLMessage::DataType::INT64);
+    arg_range->add_int64value((uintptr_t)range);
 
     // copy argument precision
     GLMessage_DataType *arg_precision = glmsg.add_args();
     arg_precision->set_isarray(false);
-    arg_precision->set_type(GLMessage::DataType::INT);
-    arg_precision->add_intvalue((int)precision);
+    arg_precision->set_type(GLMessage::DataType::INT64);
+    arg_precision->add_int64value((uintptr_t)precision);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2768,14 +2768,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument source
     GLMessage_DataType *arg_source = glmsg.add_args();
     arg_source->set_isarray(false);
-    arg_source->set_type(GLMessage::DataType::INT);
-    arg_source->add_intvalue((int)source);
+    arg_source->set_type(GLMessage::DataType::INT64);
+    arg_source->add_int64value((uintptr_t)source);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2817,8 +2817,8 @@
     // set return value
     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
     rt->set_isarray(false);
-    rt->set_type(GLMessage::DataType::INT);
-    rt->add_intvalue((int)retValue);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
 
     void *pointerArgs[] = {
         (void *) retValue,
@@ -2853,8 +2853,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2894,8 +2894,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2935,8 +2935,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -2976,8 +2976,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3011,8 +3011,8 @@
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3060,8 +3060,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3101,8 +3101,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3142,8 +3142,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3617,8 +3617,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -3800,8 +3800,8 @@
     // copy argument shaders
     GLMessage_DataType *arg_shaders = glmsg.add_args();
     arg_shaders->set_isarray(false);
-    arg_shaders->set_type(GLMessage::DataType::INT);
-    arg_shaders->add_intvalue((int)shaders);
+    arg_shaders->set_type(GLMessage::DataType::INT64);
+    arg_shaders->add_int64value((uintptr_t)shaders);
 
     // copy argument binaryformat
     GLMessage_DataType *arg_binaryformat = glmsg.add_args();
@@ -3812,8 +3812,8 @@
     // copy argument binary
     GLMessage_DataType *arg_binary = glmsg.add_args();
     arg_binary->set_isarray(false);
-    arg_binary->set_type(GLMessage::DataType::INT);
-    arg_binary->add_intvalue((int)binary);
+    arg_binary->set_type(GLMessage::DataType::INT64);
+    arg_binary->add_int64value((uintptr_t)binary);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -3860,14 +3860,14 @@
     // copy argument string
     GLMessage_DataType *arg_string = glmsg.add_args();
     arg_string->set_isarray(false);
-    arg_string->set_type(GLMessage::DataType::INT);
-    arg_string->add_intvalue((int)string);
+    arg_string->set_type(GLMessage::DataType::INT64);
+    arg_string->add_int64value((uintptr_t)string);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4178,8 +4178,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4259,8 +4259,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4340,8 +4340,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4417,8 +4417,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4492,8 +4492,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4567,8 +4567,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4648,8 +4648,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4729,8 +4729,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4816,8 +4816,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4903,8 +4903,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -4996,8 +4996,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5089,8 +5089,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5136,8 +5136,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5183,8 +5183,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5230,8 +5230,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5355,8 +5355,8 @@
     // copy argument values
     GLMessage_DataType *arg_values = glmsg.add_args();
     arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT);
-    arg_values->add_intvalue((int)values);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5430,8 +5430,8 @@
     // copy argument values
     GLMessage_DataType *arg_values = glmsg.add_args();
     arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT);
-    arg_values->add_intvalue((int)values);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5511,8 +5511,8 @@
     // copy argument values
     GLMessage_DataType *arg_values = glmsg.add_args();
     arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT);
-    arg_values->add_intvalue((int)values);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5598,8 +5598,8 @@
     // copy argument values
     GLMessage_DataType *arg_values = glmsg.add_args();
     arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT);
-    arg_values->add_intvalue((int)values);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5657,8 +5657,8 @@
     // copy argument ptr
     GLMessage_DataType *arg_ptr = glmsg.add_args();
     arg_ptr->set_isarray(false);
-    arg_ptr->set_type(GLMessage::DataType::INT);
-    arg_ptr->add_intvalue((int)ptr);
+    arg_ptr->set_type(GLMessage::DataType::INT64);
+    arg_ptr->add_int64value((uintptr_t)ptr);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5790,8 +5790,8 @@
     // copy argument indices
     GLMessage_DataType *arg_indices = glmsg.add_args();
     arg_indices->set_isarray(false);
-    arg_indices->set_type(GLMessage::DataType::INT);
-    arg_indices->add_intvalue((int)indices);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5873,8 +5873,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -5962,8 +5962,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6115,8 +6115,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6204,8 +6204,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6239,8 +6239,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6274,8 +6274,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6413,8 +6413,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6454,8 +6454,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6531,8 +6531,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6566,8 +6566,8 @@
     // copy argument bufs
     GLMessage_DataType *arg_bufs = glmsg.add_args();
     arg_bufs->set_isarray(false);
-    arg_bufs->set_type(GLMessage::DataType::INT);
-    arg_bufs->add_intvalue((int)bufs);
+    arg_bufs->set_type(GLMessage::DataType::INT64);
+    arg_bufs->add_int64value((uintptr_t)bufs);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6613,8 +6613,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6660,8 +6660,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6707,8 +6707,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6754,8 +6754,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6801,8 +6801,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -6848,8 +6848,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7094,8 +7094,8 @@
     // set return value
     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
     rt->set_isarray(false);
-    rt->set_type(GLMessage::DataType::INT);
-    rt->add_intvalue((int)retValue);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
 
     void *pointerArgs[] = {
         (void *) retValue,
@@ -7192,8 +7192,8 @@
     // copy argument arrays
     GLMessage_DataType *arg_arrays = glmsg.add_args();
     arg_arrays->set_isarray(false);
-    arg_arrays->set_type(GLMessage::DataType::INT);
-    arg_arrays->add_intvalue((int)arrays);
+    arg_arrays->set_type(GLMessage::DataType::INT64);
+    arg_arrays->add_int64value((uintptr_t)arrays);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7227,8 +7227,8 @@
     // copy argument arrays
     GLMessage_DataType *arg_arrays = glmsg.add_args();
     arg_arrays->set_isarray(false);
-    arg_arrays->set_type(GLMessage::DataType::INT);
-    arg_arrays->add_intvalue((int)arrays);
+    arg_arrays->set_type(GLMessage::DataType::INT64);
+    arg_arrays->add_int64value((uintptr_t)arrays);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7304,8 +7304,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7487,8 +7487,8 @@
     // copy argument varyings
     GLMessage_DataType *arg_varyings = glmsg.add_args();
     arg_varyings->set_isarray(false);
-    arg_varyings->set_type(GLMessage::DataType::INT);
-    arg_varyings->add_intvalue((int)varyings);
+    arg_varyings->set_type(GLMessage::DataType::INT64);
+    arg_varyings->add_int64value((uintptr_t)varyings);
 
     // copy argument bufferMode
     GLMessage_DataType *arg_bufferMode = glmsg.add_args();
@@ -7540,26 +7540,26 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument size
     GLMessage_DataType *arg_size = glmsg.add_args();
     arg_size->set_isarray(false);
-    arg_size->set_type(GLMessage::DataType::INT);
-    arg_size->add_intvalue((int)size);
+    arg_size->set_type(GLMessage::DataType::INT64);
+    arg_size->add_int64value((uintptr_t)size);
 
     // copy argument type
     GLMessage_DataType *arg_type = glmsg.add_args();
     arg_type->set_isarray(false);
-    arg_type->set_type(GLMessage::DataType::INT);
-    arg_type->add_intvalue((int)type);
+    arg_type->set_type(GLMessage::DataType::INT64);
+    arg_type->add_int64value((uintptr_t)type);
 
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7614,8 +7614,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7655,8 +7655,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7696,8 +7696,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7835,8 +7835,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7870,8 +7870,8 @@
     // copy argument v
     GLMessage_DataType *arg_v = glmsg.add_args();
     arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT);
-    arg_v->add_intvalue((int)v);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7911,8 +7911,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -7946,8 +7946,8 @@
     // copy argument name
     GLMessage_DataType *arg_name = glmsg.add_args();
     arg_name->set_isarray(false);
-    arg_name->set_type(GLMessage::DataType::INT);
-    arg_name->add_intvalue((int)name);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8167,8 +8167,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8208,8 +8208,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8249,8 +8249,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8290,8 +8290,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8331,8 +8331,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8372,8 +8372,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8413,8 +8413,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8507,8 +8507,8 @@
     // set return value
     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
     rt->set_isarray(false);
-    rt->set_type(GLMessage::DataType::INT);
-    rt->add_intvalue((int)retValue);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
 
     void *pointerArgs[] = {
         (void *) retValue,
@@ -8595,14 +8595,14 @@
     // copy argument uniformNames
     GLMessage_DataType *arg_uniformNames = glmsg.add_args();
     arg_uniformNames->set_isarray(false);
-    arg_uniformNames->set_type(GLMessage::DataType::INT);
-    arg_uniformNames->add_intvalue((int)uniformNames);
+    arg_uniformNames->set_type(GLMessage::DataType::INT64);
+    arg_uniformNames->add_int64value((uintptr_t)uniformNames);
 
     // copy argument uniformIndices
     GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
     arg_uniformIndices->set_isarray(false);
-    arg_uniformIndices->set_type(GLMessage::DataType::INT);
-    arg_uniformIndices->add_intvalue((int)uniformIndices);
+    arg_uniformIndices->set_type(GLMessage::DataType::INT64);
+    arg_uniformIndices->add_int64value((uintptr_t)uniformIndices);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8643,8 +8643,8 @@
     // copy argument uniformIndices
     GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
     arg_uniformIndices->set_isarray(false);
-    arg_uniformIndices->set_type(GLMessage::DataType::INT);
-    arg_uniformIndices->add_intvalue((int)uniformIndices);
+    arg_uniformIndices->set_type(GLMessage::DataType::INT64);
+    arg_uniformIndices->add_int64value((uintptr_t)uniformIndices);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -8655,8 +8655,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8691,8 +8691,8 @@
     // copy argument uniformBlockName
     GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
     arg_uniformBlockName->set_isarray(false);
-    arg_uniformBlockName->set_type(GLMessage::DataType::INT);
-    arg_uniformBlockName->add_intvalue((int)uniformBlockName);
+    arg_uniformBlockName->set_type(GLMessage::DataType::INT64);
+    arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8746,8 +8746,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8793,14 +8793,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument uniformBlockName
     GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
     arg_uniformBlockName->set_isarray(false);
-    arg_uniformBlockName->set_type(GLMessage::DataType::INT);
-    arg_uniformBlockName->add_intvalue((int)uniformBlockName);
+    arg_uniformBlockName->set_type(GLMessage::DataType::INT64);
+    arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -8933,8 +8933,8 @@
     // copy argument indices
     GLMessage_DataType *arg_indices = glmsg.add_args();
     arg_indices->set_isarray(false);
-    arg_indices->set_type(GLMessage::DataType::INT);
-    arg_indices->add_intvalue((int)indices);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
 
     // copy argument instanceCount
     GLMessage_DataType *arg_instanceCount = glmsg.add_args();
@@ -8987,8 +8987,8 @@
     // set return value
     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
     rt->set_isarray(false);
-    rt->set_type(GLMessage::DataType::INT);
-    rt->add_intvalue((int)retValue);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
 
     void *pointerArgs[] = {
         (void *) retValue,
@@ -9011,8 +9011,8 @@
     // copy argument sync
     GLMessage_DataType *arg_sync = glmsg.add_args();
     arg_sync->set_isarray(false);
-    arg_sync->set_type(GLMessage::DataType::INT);
-    arg_sync->add_intvalue((int)sync);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9048,8 +9048,8 @@
     // copy argument sync
     GLMessage_DataType *arg_sync = glmsg.add_args();
     arg_sync->set_isarray(false);
-    arg_sync->set_type(GLMessage::DataType::INT);
-    arg_sync->add_intvalue((int)sync);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9077,8 +9077,8 @@
     // copy argument sync
     GLMessage_DataType *arg_sync = glmsg.add_args();
     arg_sync->set_isarray(false);
-    arg_sync->set_type(GLMessage::DataType::INT);
-    arg_sync->add_intvalue((int)sync);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
 
     // copy argument flags
     GLMessage_DataType *arg_flags = glmsg.add_args();
@@ -9126,8 +9126,8 @@
     // copy argument sync
     GLMessage_DataType *arg_sync = glmsg.add_args();
     arg_sync->set_isarray(false);
-    arg_sync->set_type(GLMessage::DataType::INT);
-    arg_sync->add_intvalue((int)sync);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
 
     // copy argument flags
     GLMessage_DataType *arg_flags = glmsg.add_args();
@@ -9173,8 +9173,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9202,8 +9202,8 @@
     // copy argument sync
     GLMessage_DataType *arg_sync = glmsg.add_args();
     arg_sync->set_isarray(false);
-    arg_sync->set_type(GLMessage::DataType::INT);
-    arg_sync->add_intvalue((int)sync);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -9220,14 +9220,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument values
     GLMessage_DataType *arg_values = glmsg.add_args();
     arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT);
-    arg_values->add_intvalue((int)values);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9269,8 +9269,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9310,8 +9310,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9345,8 +9345,8 @@
     // copy argument samplers
     GLMessage_DataType *arg_samplers = glmsg.add_args();
     arg_samplers->set_isarray(false);
-    arg_samplers->set_type(GLMessage::DataType::INT);
-    arg_samplers->add_intvalue((int)samplers);
+    arg_samplers->set_type(GLMessage::DataType::INT64);
+    arg_samplers->add_int64value((uintptr_t)samplers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9380,8 +9380,8 @@
     // copy argument samplers
     GLMessage_DataType *arg_samplers = glmsg.add_args();
     arg_samplers->set_isarray(false);
-    arg_samplers->set_type(GLMessage::DataType::INT);
-    arg_samplers->add_intvalue((int)samplers);
+    arg_samplers->set_type(GLMessage::DataType::INT64);
+    arg_samplers->add_int64value((uintptr_t)samplers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9531,8 +9531,8 @@
     // copy argument param
     GLMessage_DataType *arg_param = glmsg.add_args();
     arg_param->set_isarray(false);
-    arg_param->set_type(GLMessage::DataType::INT);
-    arg_param->add_intvalue((int)param);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9612,8 +9612,8 @@
     // copy argument param
     GLMessage_DataType *arg_param = glmsg.add_args();
     arg_param->set_isarray(false);
-    arg_param->set_type(GLMessage::DataType::INT);
-    arg_param->add_intvalue((int)param);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9653,8 +9653,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9694,8 +9694,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9797,8 +9797,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9832,8 +9832,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -9953,20 +9953,20 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument binaryFormat
     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
     arg_binaryFormat->set_isarray(false);
-    arg_binaryFormat->set_type(GLMessage::DataType::INT);
-    arg_binaryFormat->add_intvalue((int)binaryFormat);
+    arg_binaryFormat->set_type(GLMessage::DataType::INT64);
+    arg_binaryFormat->add_int64value((uintptr_t)binaryFormat);
 
     // copy argument binary
     GLMessage_DataType *arg_binary = glmsg.add_args();
     arg_binary->set_isarray(false);
-    arg_binary->set_type(GLMessage::DataType::INT);
-    arg_binary->add_intvalue((int)binary);
+    arg_binary->set_type(GLMessage::DataType::INT64);
+    arg_binary->add_int64value((uintptr_t)binary);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10008,8 +10008,8 @@
     // copy argument binary
     GLMessage_DataType *arg_binary = glmsg.add_args();
     arg_binary->set_isarray(false);
-    arg_binary->set_type(GLMessage::DataType::INT);
-    arg_binary->add_intvalue((int)binary);
+    arg_binary->set_type(GLMessage::DataType::INT64);
+    arg_binary->add_int64value((uintptr_t)binary);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -10095,8 +10095,8 @@
     // copy argument attachments
     GLMessage_DataType *arg_attachments = glmsg.add_args();
     arg_attachments->set_isarray(false);
-    arg_attachments->set_type(GLMessage::DataType::INT);
-    arg_attachments->add_intvalue((int)attachments);
+    arg_attachments->set_type(GLMessage::DataType::INT64);
+    arg_attachments->add_int64value((uintptr_t)attachments);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10136,8 +10136,8 @@
     // copy argument attachments
     GLMessage_DataType *arg_attachments = glmsg.add_args();
     arg_attachments->set_isarray(false);
-    arg_attachments->set_type(GLMessage::DataType::INT);
-    arg_attachments->add_intvalue((int)attachments);
+    arg_attachments->set_type(GLMessage::DataType::INT64);
+    arg_attachments->add_int64value((uintptr_t)attachments);
 
     // copy argument x
     GLMessage_DataType *arg_x = glmsg.add_args();
@@ -10323,8 +10323,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10361,8 +10361,8 @@
     // copy argument image
     GLMessage_DataType *arg_image = glmsg.add_args();
     arg_image->set_isarray(false);
-    arg_image->set_type(GLMessage::DataType::INT);
-    arg_image->add_intvalue((int)image);
+    arg_image->set_type(GLMessage::DataType::INT64);
+    arg_image->add_int64value((uintptr_t)image);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10396,8 +10396,8 @@
     // copy argument image
     GLMessage_DataType *arg_image = glmsg.add_args();
     arg_image->set_isarray(false);
-    arg_image->set_type(GLMessage::DataType::INT);
-    arg_image->add_intvalue((int)image);
+    arg_image->set_type(GLMessage::DataType::INT64);
+    arg_image->add_int64value((uintptr_t)image);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10437,20 +10437,20 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument binaryFormat
     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
     arg_binaryFormat->set_isarray(false);
-    arg_binaryFormat->set_type(GLMessage::DataType::INT);
-    arg_binaryFormat->add_intvalue((int)binaryFormat);
+    arg_binaryFormat->set_type(GLMessage::DataType::INT64);
+    arg_binaryFormat->add_int64value((uintptr_t)binaryFormat);
 
     // copy argument binary
     GLMessage_DataType *arg_binary = glmsg.add_args();
     arg_binary->set_isarray(false);
-    arg_binary->set_type(GLMessage::DataType::INT);
-    arg_binary->add_intvalue((int)binary);
+    arg_binary->set_type(GLMessage::DataType::INT64);
+    arg_binary->add_int64value((uintptr_t)binary);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10492,8 +10492,8 @@
     // copy argument binary
     GLMessage_DataType *arg_binary = glmsg.add_args();
     arg_binary->set_isarray(false);
-    arg_binary->set_type(GLMessage::DataType::INT);
-    arg_binary->add_intvalue((int)binary);
+    arg_binary->set_type(GLMessage::DataType::INT64);
+    arg_binary->add_int64value((uintptr_t)binary);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -10546,8 +10546,8 @@
     // set return value
     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
     rt->set_isarray(false);
-    rt->set_type(GLMessage::DataType::INT);
-    rt->add_intvalue((int)retValue);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
 
     void *pointerArgs[] = {
         (void *) retValue,
@@ -10618,8 +10618,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10701,8 +10701,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10790,8 +10790,8 @@
     // copy argument pixels
     GLMessage_DataType *arg_pixels = glmsg.add_args();
     arg_pixels->set_isarray(false);
-    arg_pixels->set_type(GLMessage::DataType::INT);
-    arg_pixels->add_intvalue((int)pixels);
+    arg_pixels->set_type(GLMessage::DataType::INT64);
+    arg_pixels->add_int64value((uintptr_t)pixels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -10943,8 +10943,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11032,8 +11032,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11153,8 +11153,8 @@
     // copy argument arrays
     GLMessage_DataType *arg_arrays = glmsg.add_args();
     arg_arrays->set_isarray(false);
-    arg_arrays->set_type(GLMessage::DataType::INT);
-    arg_arrays->add_intvalue((int)arrays);
+    arg_arrays->set_type(GLMessage::DataType::INT64);
+    arg_arrays->add_int64value((uintptr_t)arrays);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11188,8 +11188,8 @@
     // copy argument arrays
     GLMessage_DataType *arg_arrays = glmsg.add_args();
     arg_arrays->set_isarray(false);
-    arg_arrays->set_type(GLMessage::DataType::INT);
-    arg_arrays->add_intvalue((int)arrays);
+    arg_arrays->set_type(GLMessage::DataType::INT64);
+    arg_arrays->add_int64value((uintptr_t)arrays);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11253,8 +11253,8 @@
     // copy argument numGroups
     GLMessage_DataType *arg_numGroups = glmsg.add_args();
     arg_numGroups->set_isarray(false);
-    arg_numGroups->set_type(GLMessage::DataType::INT);
-    arg_numGroups->add_intvalue((int)numGroups);
+    arg_numGroups->set_type(GLMessage::DataType::INT64);
+    arg_numGroups->add_int64value((uintptr_t)numGroups);
 
     // copy argument groupsSize
     GLMessage_DataType *arg_groupsSize = glmsg.add_args();
@@ -11265,8 +11265,8 @@
     // copy argument groups
     GLMessage_DataType *arg_groups = glmsg.add_args();
     arg_groups->set_isarray(false);
-    arg_groups->set_type(GLMessage::DataType::INT);
-    arg_groups->add_intvalue((int)groups);
+    arg_groups->set_type(GLMessage::DataType::INT64);
+    arg_groups->add_int64value((uintptr_t)groups);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11301,14 +11301,14 @@
     // copy argument numCounters
     GLMessage_DataType *arg_numCounters = glmsg.add_args();
     arg_numCounters->set_isarray(false);
-    arg_numCounters->set_type(GLMessage::DataType::INT);
-    arg_numCounters->add_intvalue((int)numCounters);
+    arg_numCounters->set_type(GLMessage::DataType::INT64);
+    arg_numCounters->add_int64value((uintptr_t)numCounters);
 
     // copy argument maxActiveCounters
     GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
     arg_maxActiveCounters->set_isarray(false);
-    arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
-    arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
+    arg_maxActiveCounters->set_type(GLMessage::DataType::INT64);
+    arg_maxActiveCounters->add_int64value((uintptr_t)maxActiveCounters);
 
     // copy argument counterSize
     GLMessage_DataType *arg_counterSize = glmsg.add_args();
@@ -11319,8 +11319,8 @@
     // copy argument counters
     GLMessage_DataType *arg_counters = glmsg.add_args();
     arg_counters->set_isarray(false);
-    arg_counters->set_type(GLMessage::DataType::INT);
-    arg_counters->add_intvalue((int)counters);
+    arg_counters->set_type(GLMessage::DataType::INT64);
+    arg_counters->add_int64value((uintptr_t)counters);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11362,14 +11362,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument groupString
     GLMessage_DataType *arg_groupString = glmsg.add_args();
     arg_groupString->set_isarray(false);
-    arg_groupString->set_type(GLMessage::DataType::INT);
-    arg_groupString->add_intvalue((int)groupString);
+    arg_groupString->set_type(GLMessage::DataType::INT64);
+    arg_groupString->add_int64value((uintptr_t)groupString);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11416,14 +11416,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument counterString
     GLMessage_DataType *arg_counterString = glmsg.add_args();
     arg_counterString->set_isarray(false);
-    arg_counterString->set_type(GLMessage::DataType::INT);
-    arg_counterString->add_intvalue((int)counterString);
+    arg_counterString->set_type(GLMessage::DataType::INT64);
+    arg_counterString->add_int64value((uintptr_t)counterString);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11470,8 +11470,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11505,8 +11505,8 @@
     // copy argument monitors
     GLMessage_DataType *arg_monitors = glmsg.add_args();
     arg_monitors->set_isarray(false);
-    arg_monitors->set_type(GLMessage::DataType::INT);
-    arg_monitors->add_intvalue((int)monitors);
+    arg_monitors->set_type(GLMessage::DataType::INT64);
+    arg_monitors->add_int64value((uintptr_t)monitors);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11540,8 +11540,8 @@
     // copy argument monitors
     GLMessage_DataType *arg_monitors = glmsg.add_args();
     arg_monitors->set_isarray(false);
-    arg_monitors->set_type(GLMessage::DataType::INT);
-    arg_monitors->add_intvalue((int)monitors);
+    arg_monitors->set_type(GLMessage::DataType::INT64);
+    arg_monitors->add_int64value((uintptr_t)monitors);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11593,8 +11593,8 @@
     // copy argument countersList
     GLMessage_DataType *arg_countersList = glmsg.add_args();
     arg_countersList->set_isarray(false);
-    arg_countersList->set_type(GLMessage::DataType::INT);
-    arg_countersList->add_intvalue((int)countersList);
+    arg_countersList->set_type(GLMessage::DataType::INT64);
+    arg_countersList->add_int64value((uintptr_t)countersList);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11696,14 +11696,14 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // copy argument bytesWritten
     GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
     arg_bytesWritten->set_isarray(false);
-    arg_bytesWritten->set_type(GLMessage::DataType::INT);
-    arg_bytesWritten->add_intvalue((int)bytesWritten);
+    arg_bytesWritten->set_type(GLMessage::DataType::INT64);
+    arg_bytesWritten->add_int64value((uintptr_t)bytesWritten);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -11958,8 +11958,8 @@
     // copy argument label
     GLMessage_DataType *arg_label = glmsg.add_args();
     arg_label->set_isarray(false);
-    arg_label->set_type(GLMessage::DataType::INT);
-    arg_label->add_intvalue((int)label);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12005,14 +12005,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument label
     GLMessage_DataType *arg_label = glmsg.add_args();
     arg_label->set_isarray(false);
-    arg_label->set_type(GLMessage::DataType::INT);
-    arg_label->add_intvalue((int)label);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12047,8 +12047,8 @@
     // copy argument marker
     GLMessage_DataType *arg_marker = glmsg.add_args();
     arg_marker->set_isarray(false);
-    arg_marker->set_type(GLMessage::DataType::INT);
-    arg_marker->add_intvalue((int)marker);
+    arg_marker->set_type(GLMessage::DataType::INT64);
+    arg_marker->add_int64value((uintptr_t)marker);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12082,8 +12082,8 @@
     // copy argument marker
     GLMessage_DataType *arg_marker = glmsg.add_args();
     arg_marker->set_isarray(false);
-    arg_marker->set_type(GLMessage::DataType::INT);
-    arg_marker->add_intvalue((int)marker);
+    arg_marker->set_type(GLMessage::DataType::INT64);
+    arg_marker->add_int64value((uintptr_t)marker);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12145,8 +12145,8 @@
     // copy argument attachments
     GLMessage_DataType *arg_attachments = glmsg.add_args();
     arg_attachments->set_isarray(false);
-    arg_attachments->set_type(GLMessage::DataType::INT);
-    arg_attachments->add_intvalue((int)attachments);
+    arg_attachments->set_type(GLMessage::DataType::INT64);
+    arg_attachments->add_int64value((uintptr_t)attachments);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12290,14 +12290,14 @@
     // copy argument first
     GLMessage_DataType *arg_first = glmsg.add_args();
     arg_first->set_isarray(false);
-    arg_first->set_type(GLMessage::DataType::INT);
-    arg_first->add_intvalue((int)first);
+    arg_first->set_type(GLMessage::DataType::INT64);
+    arg_first->add_int64value((uintptr_t)first);
 
     // copy argument count
     GLMessage_DataType *arg_count = glmsg.add_args();
     arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue((int)count);
+    arg_count->set_type(GLMessage::DataType::INT64);
+    arg_count->add_int64value((uintptr_t)count);
 
     // copy argument primcount
     GLMessage_DataType *arg_primcount = glmsg.add_args();
@@ -12338,8 +12338,8 @@
     // copy argument count
     GLMessage_DataType *arg_count = glmsg.add_args();
     arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue((int)count);
+    arg_count->set_type(GLMessage::DataType::INT64);
+    arg_count->add_int64value((uintptr_t)count);
 
     // copy argument type
     GLMessage_DataType *arg_type = glmsg.add_args();
@@ -12350,8 +12350,8 @@
     // copy argument indices
     GLMessage_DataType *arg_indices = glmsg.add_args();
     arg_indices->set_isarray(false);
-    arg_indices->set_type(GLMessage::DataType::INT);
-    arg_indices->add_intvalue((int)indices);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
 
     // copy argument primcount
     GLMessage_DataType *arg_primcount = glmsg.add_args();
@@ -12392,8 +12392,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12427,8 +12427,8 @@
     // copy argument ids
     GLMessage_DataType *arg_ids = glmsg.add_args();
     arg_ids->set_isarray(false);
-    arg_ids->set_type(GLMessage::DataType::INT);
-    arg_ids->add_intvalue((int)ids);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12566,8 +12566,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12607,8 +12607,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12708,8 +12708,8 @@
     // copy argument data
     GLMessage_DataType *arg_data = glmsg.add_args();
     arg_data->set_isarray(false);
-    arg_data->set_type(GLMessage::DataType::INT);
-    arg_data->add_intvalue((int)data);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12755,8 +12755,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12802,8 +12802,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12917,8 +12917,8 @@
     // copy argument strings
     GLMessage_DataType *arg_strings = glmsg.add_args();
     arg_strings->set_isarray(false);
-    arg_strings->set_type(GLMessage::DataType::INT);
-    arg_strings->add_intvalue((int)strings);
+    arg_strings->set_type(GLMessage::DataType::INT64);
+    arg_strings->add_int64value((uintptr_t)strings);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -12988,8 +12988,8 @@
     // copy argument pipelines
     GLMessage_DataType *arg_pipelines = glmsg.add_args();
     arg_pipelines->set_isarray(false);
-    arg_pipelines->set_type(GLMessage::DataType::INT);
-    arg_pipelines->add_intvalue((int)pipelines);
+    arg_pipelines->set_type(GLMessage::DataType::INT64);
+    arg_pipelines->add_int64value((uintptr_t)pipelines);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13023,8 +13023,8 @@
     // copy argument pipelines
     GLMessage_DataType *arg_pipelines = glmsg.add_args();
     arg_pipelines->set_isarray(false);
-    arg_pipelines->set_type(GLMessage::DataType::INT);
-    arg_pipelines->add_intvalue((int)pipelines);
+    arg_pipelines->set_type(GLMessage::DataType::INT64);
+    arg_pipelines->add_int64value((uintptr_t)pipelines);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13140,8 +13140,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13579,8 +13579,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13626,8 +13626,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13673,8 +13673,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13720,8 +13720,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13767,8 +13767,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13814,8 +13814,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13861,8 +13861,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13908,8 +13908,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -13961,8 +13961,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14014,8 +14014,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14067,8 +14067,8 @@
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
     arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT);
-    arg_value->add_intvalue((int)value);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14136,14 +14136,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument infoLog
     GLMessage_DataType *arg_infoLog = glmsg.add_args();
     arg_infoLog->set_isarray(false);
-    arg_infoLog->set_type(GLMessage::DataType::INT);
-    arg_infoLog->add_intvalue((int)infoLog);
+    arg_infoLog->set_type(GLMessage::DataType::INT64);
+    arg_infoLog->add_int64value((uintptr_t)infoLog);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14674,8 +14674,8 @@
     // copy argument bufs
     GLMessage_DataType *arg_bufs = glmsg.add_args();
     arg_bufs->set_isarray(false);
-    arg_bufs->set_type(GLMessage::DataType::INT);
-    arg_bufs->add_intvalue((int)bufs);
+    arg_bufs->set_type(GLMessage::DataType::INT64);
+    arg_bufs->add_int64value((uintptr_t)bufs);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14709,8 +14709,8 @@
     // copy argument fences
     GLMessage_DataType *arg_fences = glmsg.add_args();
     arg_fences->set_isarray(false);
-    arg_fences->set_type(GLMessage::DataType::INT);
-    arg_fences->add_intvalue((int)fences);
+    arg_fences->set_type(GLMessage::DataType::INT64);
+    arg_fences->add_int64value((uintptr_t)fences);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14744,8 +14744,8 @@
     // copy argument fences
     GLMessage_DataType *arg_fences = glmsg.add_args();
     arg_fences->set_isarray(false);
-    arg_fences->set_type(GLMessage::DataType::INT);
-    arg_fences->add_intvalue((int)fences);
+    arg_fences->set_type(GLMessage::DataType::INT64);
+    arg_fences->add_int64value((uintptr_t)fences);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -14857,8 +14857,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15010,8 +15010,8 @@
     // copy argument num
     GLMessage_DataType *arg_num = glmsg.add_args();
     arg_num->set_isarray(false);
-    arg_num->set_type(GLMessage::DataType::INT);
-    arg_num->add_intvalue((int)num);
+    arg_num->set_type(GLMessage::DataType::INT64);
+    arg_num->add_int64value((uintptr_t)num);
 
     // copy argument size
     GLMessage_DataType *arg_size = glmsg.add_args();
@@ -15022,8 +15022,8 @@
     // copy argument driverControls
     GLMessage_DataType *arg_driverControls = glmsg.add_args();
     arg_driverControls->set_isarray(false);
-    arg_driverControls->set_type(GLMessage::DataType::INT);
-    arg_driverControls->add_intvalue((int)driverControls);
+    arg_driverControls->set_type(GLMessage::DataType::INT64);
+    arg_driverControls->add_int64value((uintptr_t)driverControls);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15064,14 +15064,14 @@
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // copy argument driverControlString
     GLMessage_DataType *arg_driverControlString = glmsg.add_args();
     arg_driverControlString->set_isarray(false);
-    arg_driverControlString->set_type(GLMessage::DataType::INT);
-    arg_driverControlString->add_intvalue((int)driverControlString);
+    arg_driverControlString->set_type(GLMessage::DataType::INT64);
+    arg_driverControlString->add_int64value((uintptr_t)driverControlString);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15156,8 +15156,8 @@
     // copy argument textures
     GLMessage_DataType *arg_textures = glmsg.add_args();
     arg_textures->set_isarray(false);
-    arg_textures->set_type(GLMessage::DataType::INT);
-    arg_textures->add_intvalue((int)textures);
+    arg_textures->set_type(GLMessage::DataType::INT64);
+    arg_textures->add_int64value((uintptr_t)textures);
 
     // copy argument maxTextures
     GLMessage_DataType *arg_maxTextures = glmsg.add_args();
@@ -15168,8 +15168,8 @@
     // copy argument numTextures
     GLMessage_DataType *arg_numTextures = glmsg.add_args();
     arg_numTextures->set_isarray(false);
-    arg_numTextures->set_type(GLMessage::DataType::INT);
-    arg_numTextures->add_intvalue((int)numTextures);
+    arg_numTextures->set_type(GLMessage::DataType::INT64);
+    arg_numTextures->add_int64value((uintptr_t)numTextures);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15198,8 +15198,8 @@
     // copy argument buffers
     GLMessage_DataType *arg_buffers = glmsg.add_args();
     arg_buffers->set_isarray(false);
-    arg_buffers->set_type(GLMessage::DataType::INT);
-    arg_buffers->add_intvalue((int)buffers);
+    arg_buffers->set_type(GLMessage::DataType::INT64);
+    arg_buffers->add_int64value((uintptr_t)buffers);
 
     // copy argument maxBuffers
     GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
@@ -15210,8 +15210,8 @@
     // copy argument numBuffers
     GLMessage_DataType *arg_numBuffers = glmsg.add_args();
     arg_numBuffers->set_isarray(false);
-    arg_numBuffers->set_type(GLMessage::DataType::INT);
-    arg_numBuffers->add_intvalue((int)numBuffers);
+    arg_numBuffers->set_type(GLMessage::DataType::INT64);
+    arg_numBuffers->add_int64value((uintptr_t)numBuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15240,8 +15240,8 @@
     // copy argument renderbuffers
     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
     arg_renderbuffers->set_isarray(false);
-    arg_renderbuffers->set_type(GLMessage::DataType::INT);
-    arg_renderbuffers->add_intvalue((int)renderbuffers);
+    arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
 
     // copy argument maxRenderbuffers
     GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
@@ -15252,8 +15252,8 @@
     // copy argument numRenderbuffers
     GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
     arg_numRenderbuffers->set_isarray(false);
-    arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
-    arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
+    arg_numRenderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_numRenderbuffers->add_int64value((uintptr_t)numRenderbuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15282,8 +15282,8 @@
     // copy argument framebuffers
     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
     arg_framebuffers->set_isarray(false);
-    arg_framebuffers->set_type(GLMessage::DataType::INT);
-    arg_framebuffers->add_intvalue((int)framebuffers);
+    arg_framebuffers->set_type(GLMessage::DataType::INT64);
+    arg_framebuffers->add_int64value((uintptr_t)framebuffers);
 
     // copy argument maxFramebuffers
     GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
@@ -15294,8 +15294,8 @@
     // copy argument numFramebuffers
     GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
     arg_numFramebuffers->set_isarray(false);
-    arg_numFramebuffers->set_type(GLMessage::DataType::INT);
-    arg_numFramebuffers->add_intvalue((int)numFramebuffers);
+    arg_numFramebuffers->set_type(GLMessage::DataType::INT64);
+    arg_numFramebuffers->add_int64value((uintptr_t)numFramebuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15348,8 +15348,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15477,8 +15477,8 @@
     // copy argument texels
     GLMessage_DataType *arg_texels = glmsg.add_args();
     arg_texels->set_isarray(false);
-    arg_texels->set_type(GLMessage::DataType::INT);
-    arg_texels->add_intvalue((int)texels);
+    arg_texels->set_type(GLMessage::DataType::INT64);
+    arg_texels->add_int64value((uintptr_t)texels);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15512,8 +15512,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15541,8 +15541,8 @@
     // copy argument shaders
     GLMessage_DataType *arg_shaders = glmsg.add_args();
     arg_shaders->set_isarray(false);
-    arg_shaders->set_type(GLMessage::DataType::INT);
-    arg_shaders->add_intvalue((int)shaders);
+    arg_shaders->set_type(GLMessage::DataType::INT64);
+    arg_shaders->add_int64value((uintptr_t)shaders);
 
     // copy argument maxShaders
     GLMessage_DataType *arg_maxShaders = glmsg.add_args();
@@ -15553,8 +15553,8 @@
     // copy argument numShaders
     GLMessage_DataType *arg_numShaders = glmsg.add_args();
     arg_numShaders->set_isarray(false);
-    arg_numShaders->set_type(GLMessage::DataType::INT);
-    arg_numShaders->add_intvalue((int)numShaders);
+    arg_numShaders->set_type(GLMessage::DataType::INT64);
+    arg_numShaders->add_int64value((uintptr_t)numShaders);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15583,8 +15583,8 @@
     // copy argument programs
     GLMessage_DataType *arg_programs = glmsg.add_args();
     arg_programs->set_isarray(false);
-    arg_programs->set_type(GLMessage::DataType::INT);
-    arg_programs->add_intvalue((int)programs);
+    arg_programs->set_type(GLMessage::DataType::INT64);
+    arg_programs->add_int64value((uintptr_t)programs);
 
     // copy argument maxPrograms
     GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
@@ -15595,8 +15595,8 @@
     // copy argument numPrograms
     GLMessage_DataType *arg_numPrograms = glmsg.add_args();
     arg_numPrograms->set_isarray(false);
-    arg_numPrograms->set_type(GLMessage::DataType::INT);
-    arg_numPrograms->add_intvalue((int)numPrograms);
+    arg_numPrograms->set_type(GLMessage::DataType::INT64);
+    arg_numPrograms->add_int64value((uintptr_t)numPrograms);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15673,14 +15673,14 @@
     // copy argument source
     GLMessage_DataType *arg_source = glmsg.add_args();
     arg_source->set_isarray(false);
-    arg_source->set_type(GLMessage::DataType::INT);
-    arg_source->add_intvalue((int)source);
+    arg_source->set_type(GLMessage::DataType::INT64);
+    arg_source->add_int64value((uintptr_t)source);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
     arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT);
-    arg_length->add_intvalue((int)length);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15832,8 +15832,8 @@
     // copy argument equation
     GLMessage_DataType *arg_equation = glmsg.add_args();
     arg_equation->set_isarray(false);
-    arg_equation->set_type(GLMessage::DataType::INT);
-    arg_equation->add_intvalue((int)equation);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -15947,8 +15947,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16040,8 +16040,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16081,8 +16081,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16122,8 +16122,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16163,8 +16163,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16232,8 +16232,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16313,8 +16313,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16342,8 +16342,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16423,8 +16423,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16452,8 +16452,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16671,8 +16671,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -16866,8 +16866,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17077,8 +17077,8 @@
     // copy argument equation
     GLMessage_DataType *arg_equation = glmsg.add_args();
     arg_equation->set_isarray(false);
-    arg_equation->set_type(GLMessage::DataType::INT);
-    arg_equation->add_intvalue((int)equation);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17216,8 +17216,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17375,8 +17375,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17468,8 +17468,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17503,8 +17503,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17544,8 +17544,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17585,8 +17585,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17620,8 +17620,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17661,8 +17661,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17702,8 +17702,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17743,8 +17743,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17812,8 +17812,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17893,8 +17893,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -17972,8 +17972,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18081,8 +18081,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18138,8 +18138,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18271,8 +18271,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18398,8 +18398,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18699,8 +18699,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18820,8 +18820,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18861,8 +18861,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -18942,8 +18942,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19029,8 +19029,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19070,8 +19070,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19366,8 +19366,8 @@
     // copy argument coords
     GLMessage_DataType *arg_coords = glmsg.add_args();
     arg_coords->set_isarray(false);
-    arg_coords->set_type(GLMessage::DataType::INT);
-    arg_coords->add_intvalue((int)coords);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19395,8 +19395,8 @@
     // copy argument coords
     GLMessage_DataType *arg_coords = glmsg.add_args();
     arg_coords->set_isarray(false);
-    arg_coords->set_type(GLMessage::DataType::INT);
-    arg_coords->add_intvalue((int)coords);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19424,8 +19424,8 @@
     // copy argument coords
     GLMessage_DataType *arg_coords = glmsg.add_args();
     arg_coords->set_isarray(false);
-    arg_coords->set_type(GLMessage::DataType::INT);
-    arg_coords->add_intvalue((int)coords);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19505,8 +19505,8 @@
     // copy argument coords
     GLMessage_DataType *arg_coords = glmsg.add_args();
     arg_coords->set_isarray(false);
-    arg_coords->set_type(GLMessage::DataType::INT);
-    arg_coords->add_intvalue((int)coords);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19648,8 +19648,8 @@
     // copy argument equation
     GLMessage_DataType *arg_equation = glmsg.add_args();
     arg_equation->set_isarray(false);
-    arg_equation->set_type(GLMessage::DataType::INT);
-    arg_equation->add_intvalue((int)equation);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19797,8 +19797,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19890,8 +19890,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19925,8 +19925,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -19966,8 +19966,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20007,8 +20007,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20048,8 +20048,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20089,8 +20089,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20158,8 +20158,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20239,8 +20239,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20296,8 +20296,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20377,8 +20377,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20406,8 +20406,8 @@
     // copy argument m
     GLMessage_DataType *arg_m = glmsg.add_args();
     arg_m->set_isarray(false);
-    arg_m->set_type(GLMessage::DataType::INT);
-    arg_m->add_intvalue((int)m);
+    arg_m->set_type(GLMessage::DataType::INT64);
+    arg_m->add_int64value((uintptr_t)m);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20625,8 +20625,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20888,8 +20888,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -20969,8 +20969,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21114,8 +21114,8 @@
     // copy argument renderbuffers
     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
     arg_renderbuffers->set_isarray(false);
-    arg_renderbuffers->set_type(GLMessage::DataType::INT);
-    arg_renderbuffers->add_intvalue((int)renderbuffers);
+    arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21149,8 +21149,8 @@
     // copy argument renderbuffers
     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
     arg_renderbuffers->set_isarray(false);
-    arg_renderbuffers->set_type(GLMessage::DataType::INT);
-    arg_renderbuffers->add_intvalue((int)renderbuffers);
+    arg_renderbuffers->set_type(GLMessage::DataType::INT64);
+    arg_renderbuffers->add_int64value((uintptr_t)renderbuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21236,8 +21236,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21341,8 +21341,8 @@
     // copy argument framebuffers
     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
     arg_framebuffers->set_isarray(false);
-    arg_framebuffers->set_type(GLMessage::DataType::INT);
-    arg_framebuffers->add_intvalue((int)framebuffers);
+    arg_framebuffers->set_type(GLMessage::DataType::INT64);
+    arg_framebuffers->add_int64value((uintptr_t)framebuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21376,8 +21376,8 @@
     // copy argument framebuffers
     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
     arg_framebuffers->set_isarray(false);
-    arg_framebuffers->set_type(GLMessage::DataType::INT);
-    arg_framebuffers->add_intvalue((int)framebuffers);
+    arg_framebuffers->set_type(GLMessage::DataType::INT64);
+    arg_framebuffers->add_int64value((uintptr_t)framebuffers);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21557,8 +21557,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21682,8 +21682,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21729,8 +21729,8 @@
     // copy argument pointer
     GLMessage_DataType *arg_pointer = glmsg.add_args();
     arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT);
-    arg_pointer->add_intvalue((int)pointer);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21758,14 +21758,14 @@
     // copy argument mantissa
     GLMessage_DataType *arg_mantissa = glmsg.add_args();
     arg_mantissa->set_isarray(false);
-    arg_mantissa->set_type(GLMessage::DataType::INT);
-    arg_mantissa->add_intvalue((int)mantissa);
+    arg_mantissa->set_type(GLMessage::DataType::INT64);
+    arg_mantissa->add_int64value((uintptr_t)mantissa);
 
     // copy argument exponent
     GLMessage_DataType *arg_exponent = glmsg.add_args();
     arg_exponent->set_isarray(false);
-    arg_exponent->set_type(GLMessage::DataType::INT);
-    arg_exponent->add_intvalue((int)exponent);
+    arg_exponent->set_type(GLMessage::DataType::INT64);
+    arg_exponent->add_int64value((uintptr_t)exponent);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21958,8 +21958,8 @@
     // copy argument equation
     GLMessage_DataType *arg_equation = glmsg.add_args();
     arg_equation->set_isarray(false);
-    arg_equation->set_type(GLMessage::DataType::INT);
-    arg_equation->add_intvalue((int)equation);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -21993,8 +21993,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22102,8 +22102,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22183,8 +22183,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22264,8 +22264,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22305,8 +22305,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22346,8 +22346,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22387,8 +22387,8 @@
     // copy argument params
     GLMessage_DataType *arg_params = glmsg.add_args();
     arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT);
-    arg_params->add_intvalue((int)params);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22422,8 +22422,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -22457,8 +22457,8 @@
     // copy argument eqn
     GLMessage_DataType *arg_eqn = glmsg.add_args();
     arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT);
-    arg_eqn->add_intvalue((int)eqn);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.cpp b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
index 9d1682a..4f9b006 100644
--- a/opengl/libs/GLES_trace/src/gltrace_egl.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
@@ -71,7 +71,7 @@
     glContext->traceGLMessage(&glmessage);
 }
 
-void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
+void GLTrace_eglSwapBuffers(void* /*dpy*/, void* /*draw*/) {
     GLMessage glmessage;
     GLTraceContext *glContext = getGLTraceContext();
 
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index 60686eb..76f7c78 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -25,9 +25,9 @@
 #   To generate C++ files, this script uses the 'pyratemp' template
 #   module. The only reason to use pyratemp is that it is extremly
 #   simple to install:
-#   $ wget http://www.simple-is-better.org/template/pyratemp-current/pyratemp.py
-#   Put the file in the GLES_trace/tools folder, or update PYTHONPATH
-#   to point to wherever it was downloaded.
+#   $ wget http://www.simple-is-better.org/template/pyratemp-0.3.2.tgz
+#   Extract and put the pyratemp.py file in the GLES_trace/tools folder,
+#   or update PYTHONPATH to point to wherever it was downloaded.
 #
 # USAGE
 #   $ cd GLES_trace       - run the program from GLES2_trace folder
@@ -44,16 +44,18 @@
         self.name = name
 
     def __str__(self):
-        if self.name == "pointer":  # pointers map to the INT DataType
-            return "INT"
+        if self.name == "pointer":  # pointers map to the INT64 DataType
+            return "INT64"
         return self.name.upper()
 
     def getProtobufCall(self):
         if self.name == "void":
             raise ValueError("Attempt to set void value")
         elif self.name == "char" or self.name == "byte" \
-                or self.name == "pointer" or self.name == "enum":
+                or self.name == "enum":
             return "add_intvalue((int)"
+        elif self.name == "pointer":
+            return "add_int64value((uintptr_t)"
         elif self.name == "int":
             return "add_intvalue("
         elif self.name == "float":
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
index 3e8ea8d..dfaa6c1 100644
--- a/opengl/tests/hwc/hwcStress.cpp
+++ b/opengl/tests/hwc/hwcStress.cpp
@@ -574,8 +574,8 @@
         // mod the wMod/hMod value must be equal to 0.
         size_t w = (width * maxSizeRatio) * testRandFract();
         size_t h = (height * maxSizeRatio) * testRandFract();
-        w = max(1u, w);
-        h = max(1u, h);
+        w = max(size_t(1u), w);
+        h = max(size_t(1u), h);
         if ((w % formatPtr->wMod) != 0) {
             w += formatPtr->wMod - (w % formatPtr->wMod);
         }
diff --git a/opengl/tools/glgen/src/JType.java b/opengl/tools/glgen/src/JType.java
index b10e7e2..c6e227e 100644
--- a/opengl/tools/glgen/src/JType.java
+++ b/opengl/tools/glgen/src/JType.java
@@ -57,8 +57,8 @@
     typeMapping.put(new CType("EGLenum"), new JType("int"));
     typeMapping.put(new CType("EGLNativePixmapType"), new JType("int"));
     typeMapping.put(new CType("EGLNativeWindowType"), new JType("int"));
-    typeMapping.put(new CType("EGLNativeDisplayType"), new JType("int"));
-    typeMapping.put(new CType("EGLClientBuffer"), new JType("int"));
+    typeMapping.put(new CType("EGLNativeDisplayType"), new JType("long"));
+    typeMapping.put(new CType("EGLClientBuffer"), new JType("long"));
     typeMapping.put(new CType("EGLnsecsANDROID"), new JType("long"));
 
     // EGL nonprimitive types
diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java
index b1bd1fd..e51b7a2 100644
--- a/opengl/tools/glgen/src/JniCodeEmitter.java
+++ b/opengl/tools/glgen/src/JniCodeEmitter.java
@@ -1283,7 +1283,7 @@
             for (int i = 0; i < numArgs; i++) {
                 String typecast;
                 if (i == numArgs - 1 && isPointerOffsetFunc) {
-                    typecast = "(GLvoid *)";
+                    typecast = "reinterpret_cast<GLvoid *>";
                 } else {
                     typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")";
                 }
@@ -1297,6 +1297,8 @@
                 if (cfunc.getArgType(i).isEGLHandle() &&
                     !cfunc.getArgType(i).isPointer()){
                     out.print(cfunc.getArgName(i)+"_native");
+                } else if (i == numArgs - 1 && isPointerOffsetFunc){
+                    out.print("("+cfunc.getArgName(i)+")");
                 } else {
                     out.print(cfunc.getArgName(i));
                 }
diff --git a/opengl/tools/glgen/static/egl/EGLConfig.java b/opengl/tools/glgen/static/egl/EGLConfig.java
index a7a6bbb..9881070 100644
--- a/opengl/tools/glgen/static/egl/EGLConfig.java
+++ b/opengl/tools/glgen/static/egl/EGLConfig.java
@@ -22,7 +22,7 @@
  *
  */
 public class EGLConfig extends EGLObjectHandle {
-    private EGLConfig(int handle) {
+    private EGLConfig(long handle) {
         super(handle);
     }
 
@@ -32,6 +32,6 @@
         if (!(o instanceof EGLConfig)) return false;
 
         EGLConfig that = (EGLConfig) o;
-        return getHandle() == that.getHandle();
+        return getNativeHandle() == that.getNativeHandle();
     }
 }
diff --git a/opengl/tools/glgen/static/egl/EGLContext.java b/opengl/tools/glgen/static/egl/EGLContext.java
index c93bd6e..f791e7e 100644
--- a/opengl/tools/glgen/static/egl/EGLContext.java
+++ b/opengl/tools/glgen/static/egl/EGLContext.java
@@ -22,7 +22,7 @@
  *
  */
 public class EGLContext extends EGLObjectHandle {
-    private EGLContext(int handle) {
+    private EGLContext(long handle) {
         super(handle);
     }
 
@@ -32,6 +32,6 @@
         if (!(o instanceof EGLContext)) return false;
 
         EGLContext that = (EGLContext) o;
-        return getHandle() == that.getHandle();
+        return getNativeHandle() == that.getNativeHandle();
     }
 }
diff --git a/opengl/tools/glgen/static/egl/EGLDisplay.java b/opengl/tools/glgen/static/egl/EGLDisplay.java
index 5b8043a..e872761 100644
--- a/opengl/tools/glgen/static/egl/EGLDisplay.java
+++ b/opengl/tools/glgen/static/egl/EGLDisplay.java
@@ -22,7 +22,7 @@
  *
  */
 public class EGLDisplay extends EGLObjectHandle {
-    private EGLDisplay(int handle) {
+    private EGLDisplay(long handle) {
         super(handle);
     }
 
@@ -32,6 +32,6 @@
         if (!(o instanceof EGLDisplay)) return false;
 
         EGLDisplay that = (EGLDisplay) o;
-        return getHandle() == that.getHandle();
+        return getNativeHandle() == that.getNativeHandle();
     }
 }
diff --git a/opengl/tools/glgen/static/egl/EGLObjectHandle.java b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
index d2710de..e6e3976 100644
--- a/opengl/tools/glgen/static/egl/EGLObjectHandle.java
+++ b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
@@ -22,12 +22,20 @@
  *
  */
 public abstract class EGLObjectHandle {
-    private final int mHandle;
+    private final long mHandle;
 
+    // TODO Deprecate EGLObjectHandle(int) method
     protected EGLObjectHandle(int handle) {
         mHandle = handle;
     }
-
+    // TODO Unhide the EGLObjectHandle(long) method
+    /**
+     * {@hide}
+     */
+    protected EGLObjectHandle(long handle) {
+        mHandle = handle;
+    }
+    // TODO Deprecate getHandle() method in favor of getNativeHandle()
     /**
      * Returns the native handle of the wrapped EGL object. This handle can be
      * cast to the corresponding native type on the native side.
@@ -37,11 +45,27 @@
      * @return the native handle of the wrapped EGL object.
      */
     public int getHandle() {
-        return mHandle;
+        if ((mHandle & 0xffffffffL) != mHandle) {
+            throw new UnsupportedOperationException();
+        }
+        return (int)mHandle;
     }
 
+    // TODO Unhide getNativeHandle() method
+    /**
+     * {@hide}
+     */
+    public long getNativeHandle() {
+        return mHandle;
+    }
     @Override
     public int hashCode() {
-        return getHandle();
+        /*
+         * Based on the algorithm suggested in
+         * http://developer.android.com/reference/java/lang/Object.html
+         */
+        int result = 17;
+        result = 31 * result + (int) (mHandle ^ (mHandle >>> 32));
+        return result;
     }
 }
diff --git a/opengl/tools/glgen/static/egl/EGLSurface.java b/opengl/tools/glgen/static/egl/EGLSurface.java
index c379dc9..c200f72 100644
--- a/opengl/tools/glgen/static/egl/EGLSurface.java
+++ b/opengl/tools/glgen/static/egl/EGLSurface.java
@@ -22,7 +22,7 @@
  *
  */
 public class EGLSurface extends EGLObjectHandle {
-    private EGLSurface(int handle) {
+    private EGLSurface(long handle) {
         super(handle);
     }
 
@@ -32,6 +32,6 @@
         if (!(o instanceof EGLSurface)) return false;
 
         EGLSurface that = (EGLSurface) o;
-        return getHandle() == that.getHandle();
+        return getNativeHandle() == that.getNativeHandle();
     }
 }
diff --git a/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp b/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp
index 54de1e7..a372362 100644
--- a/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp
+++ b/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp
@@ -69,22 +69,22 @@
     jclass eglconfigClassLocal = _env->FindClass("android/opengl/EGLConfig");
     eglconfigClass = (jclass) _env->NewGlobalRef(eglconfigClassLocal);
 
-    egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getHandle", "()I");
-    eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getHandle", "()I");
-    eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getHandle", "()I");
-    eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getHandle", "()I");
+    egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getNativeHandle", "()J");
+    eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getNativeHandle", "()J");
+    eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getNativeHandle", "()J");
+    eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getNativeHandle", "()J");
 
 
-    egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(I)V");
-    eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(I)V");
-    eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(I)V");
-    eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(I)V");
+    egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(J)V");
+    eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(J)V");
+    eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(J)V");
+    eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(J)V");
 
-    jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, (jint)EGL_NO_CONTEXT);
+    jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, reinterpret_cast<jlong>(EGL_NO_CONTEXT));
     eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject);
-    jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, (jint)EGL_NO_DISPLAY);
+    jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, reinterpret_cast<jlong>(EGL_NO_DISPLAY));
     eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject);
-    jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, (jint)EGL_NO_SURFACE);
+    jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, reinterpret_cast<jlong>(EGL_NO_SURFACE));
     eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
 
 
@@ -106,7 +106,8 @@
                           "Object is set to null.");
     }
 
-    return (void*) (_env->CallIntMethod(obj, mid));
+    jlong handle = _env->CallLongMethod(obj, mid);
+    return reinterpret_cast<void*>(handle);
 }
 
 static jobject
@@ -126,7 +127,7 @@
            return eglNoSurfaceObject;
     }
 
-    return _env->NewObject(cls, con, (jint)handle);
+    return _env->NewObject(cls, con, reinterpret_cast<jlong>(handle));
 }
 
 // --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp b/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp
index 5e1ffa1..b5c19df 100644
--- a/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp
+++ b/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp
@@ -70,22 +70,22 @@
     jclass eglconfigClassLocal = _env->FindClass("android/opengl/EGLConfig");
     eglconfigClass = (jclass) _env->NewGlobalRef(eglconfigClassLocal);
 
-    egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getHandle", "()I");
-    eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getHandle", "()I");
-    eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getHandle", "()I");
-    eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getHandle", "()I");
+    egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getNativeHandle", "()J");
+    eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getNativeHandle", "()J");
+    eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getNativeHandle", "()J");
+    eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getNativeHandle", "()J");
 
 
-    egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(I)V");
-    eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(I)V");
-    eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(I)V");
-    eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(I)V");
+    egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(J)V");
+    eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(J)V");
+    eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(J)V");
+    eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(J)V");
 
-    jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, (jint)EGL_NO_CONTEXT);
+    jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, reinterpret_cast<jlong>(EGL_NO_CONTEXT));
     eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject);
-    jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, (jint)EGL_NO_DISPLAY);
+    jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, reinterpret_cast<jlong>(EGL_NO_DISPLAY));
     eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject);
-    jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, (jint)EGL_NO_SURFACE);
+    jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, reinterpret_cast<jlong>(EGL_NO_SURFACE));
     eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
 
 
@@ -107,7 +107,7 @@
                           "Object is set to null.");
     }
 
-    return (void*) (_env->CallIntMethod(obj, mid));
+    return reinterpret_cast<void*>(_env->CallLongMethod(obj, mid));
 }
 
 static jobject
@@ -127,7 +127,7 @@
            return eglNoSurfaceObject;
     }
 
-    return _env->NewObject(cls, con, (jint)handle);
+    return _env->NewObject(cls, con, reinterpret_cast<jlong>(handle));
 }
 
 // --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.cpp b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.cpp
new file mode 100755
index 0000000..f09c171
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.cpp
@@ -0,0 +1,74 @@
+/* EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) */
+static jobject
+android_eglCreatePbufferFromClientBuffer
+  (JNIEnv *_env, jobject _this, jobject dpy, jint buftype, jlong buffer, jobject config, jintArray attrib_list_ref, jint offset) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    EGLSurface _returnValue = (EGLSurface) 0;
+    EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+    EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+    bool attrib_list_sentinel = false;
+    EGLint *attrib_list_base = (EGLint *) 0;
+    jint _remaining;
+    EGLint *attrib_list = (EGLint *) 0;
+
+    if (!attrib_list_ref) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "attrib_list == null";
+        goto exit;
+    }
+    if (offset < 0) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "offset < 0";
+        goto exit;
+    }
+    _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+    attrib_list_base = (EGLint *)
+        _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+    attrib_list = attrib_list_base + offset;
+    attrib_list_sentinel = false;
+    for (int i = _remaining - 1; i >= 0; i--)  {
+        if (attrib_list[i] == EGL_NONE){
+            attrib_list_sentinel = true;
+            break;
+        }
+    }
+    if (attrib_list_sentinel == false) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "attrib_list must contain EGL_NONE!";
+        goto exit;
+    }
+
+    _returnValue = eglCreatePbufferFromClientBuffer(
+        (EGLDisplay)dpy_native,
+        (EGLenum)buftype,
+        reinterpret_cast<EGLClientBuffer>(buffer),
+        (EGLConfig)config_native,
+        (EGLint *)attrib_list
+    );
+
+exit:
+    if (attrib_list_base) {
+        _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+            JNI_ABORT);
+    }
+    if (_exception) {
+        jniThrowException(_env, _exceptionType, _exceptionMessage);
+    }
+    return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+
+static jobject
+android_eglCreatePbufferFromClientBufferInt
+  (JNIEnv *_env, jobject _this, jobject dpy, jint buftype, jint buffer, jobject config, jintArray attrib_list_ref, jint offset) {
+    if(sizeof(void*) != sizeof(uint32_t)) {
+        jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglCreatePbufferFromClientBuffer");
+        return 0;
+    }
+    return android_eglCreatePbufferFromClientBuffer(_env, _this, dpy, buftype, buffer, config, attrib_list_ref, offset);
+}
+
diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.java b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.java
new file mode 100755
index 0000000..c2ed1d7
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.java
@@ -0,0 +1,23 @@
+    // C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list )
+    // TODO Deprecate the below method
+    public static native EGLSurface eglCreatePbufferFromClientBuffer(
+        EGLDisplay dpy,
+        int buftype,
+        int buffer,
+        EGLConfig config,
+        int[] attrib_list,
+        int offset
+    );
+    // TODO Unhide the below method
+    /**
+     * {@hide}
+     */
+    public static native EGLSurface eglCreatePbufferFromClientBuffer(
+        EGLDisplay dpy,
+        int buftype,
+        long buffer,
+        EGLConfig config,
+        int[] attrib_list,
+        int offset
+    );
+
diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.nativeReg b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.nativeReg
new file mode 100755
index 0000000..477e625
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglCreatePbufferFromClientBuffer.nativeReg
@@ -0,0 +1,2 @@
+{"eglCreatePbufferFromClientBuffer", "(Landroid/opengl/EGLDisplay;IILandroid/opengl/EGLConfig;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePbufferFromClientBufferInt },
+{"eglCreatePbufferFromClientBuffer", "(Landroid/opengl/EGLDisplay;IJLandroid/opengl/EGLConfig;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePbufferFromClientBuffer },
\ No newline at end of file
diff --git a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp
index 0cfd886..0b6bf58 100644
--- a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp
+++ b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp
@@ -116,7 +116,7 @@
     if (producer == NULL)
         goto not_valid_surface;
 
-    window = new android::Surface(producer);
+    window = new android::Surface(producer, true);
 
     if (window == NULL)
         goto not_valid_surface;
diff --git a/opengl/tools/glgen/stubs/egl/eglGetDisplay.cpp b/opengl/tools/glgen/stubs/egl/eglGetDisplay.cpp
new file mode 100755
index 0000000..003efd3
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglGetDisplay.cpp
@@ -0,0 +1,23 @@
+/* EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+static jobject
+android_eglGetDisplay
+  (JNIEnv *_env, jobject _this, jlong display_id) {
+    EGLDisplay _returnValue = (EGLDisplay) 0;
+    _returnValue = eglGetDisplay(
+        reinterpret_cast<EGLNativeDisplayType>(display_id)
+    );
+    return toEGLHandle(_env, egldisplayClass, egldisplayConstructor, _returnValue);
+}
+
+/* EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+static jobject
+android_eglGetDisplayInt
+  (JNIEnv *_env, jobject _this, jint display_id) {
+
+    if ((EGLNativeDisplayType)display_id != EGL_DEFAULT_DISPLAY) {
+        jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglGetDisplay");
+        return 0;
+    }
+    return android_eglGetDisplay(_env, _this, display_id);
+}
+
diff --git a/opengl/tools/glgen/stubs/egl/eglGetDisplay.java b/opengl/tools/glgen/stubs/egl/eglGetDisplay.java
new file mode 100755
index 0000000..7532abf
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglGetDisplay.java
@@ -0,0 +1,13 @@
+    // C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id )
+
+    public static native EGLDisplay eglGetDisplay(
+        int display_id
+    );
+
+    /**
+     * {@hide}
+     */
+    public static native EGLDisplay eglGetDisplay(
+        long display_id
+    );
+
diff --git a/opengl/tools/glgen/stubs/egl/eglGetDisplay.nativeReg b/opengl/tools/glgen/stubs/egl/eglGetDisplay.nativeReg
new file mode 100755
index 0000000..acfbb1a
--- /dev/null
+++ b/opengl/tools/glgen/stubs/egl/eglGetDisplay.nativeReg
@@ -0,0 +1,2 @@
+{"eglGetDisplay", "(I)Landroid/opengl/EGLDisplay;", (void *) android_eglGetDisplayInt },
+{"eglGetDisplay", "(J)Landroid/opengl/EGLDisplay;", (void *) android_eglGetDisplay },
\ No newline at end of file
diff --git a/opengl/tools/glgen/stubs/gles11/common.cpp b/opengl/tools/glgen/stubs/gles11/common.cpp
index 75b75cb..c5a7a24 100644
--- a/opengl/tools/glgen/stubs/gles11/common.cpp
+++ b/opengl/tools/glgen/stubs/gles11/common.cpp
@@ -89,7 +89,7 @@
             getBasePointerID, buffer);
     if (pointer != 0L) {
         *array = NULL;
-        return (void *) (jint) pointer;
+        return reinterpret_cast<void*>(pointer);
     }
 
     *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.cpp b/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.cpp
index 27b91fc..7d414d8 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.cpp
+++ b/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.cpp
@@ -157,7 +157,7 @@
         (GLsizei *)length,
         (GLint *)size,
         (GLenum *)type,
-        (char *)name
+        reinterpret_cast<char *>(name)
     );
     if (_typeArray) {
         releasePointer(_env, _typeArray, type, JNI_TRUE);
diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.cpp b/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.cpp
index 58f704c..a7376ba 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.cpp
+++ b/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.cpp
@@ -157,7 +157,7 @@
         (GLsizei *)length,
         (GLint *)size,
         (GLenum *)type,
-        (char *)name
+        reinterpret_cast<char *>(name)
     );
     if (_typeArray) {
         releasePointer(_env, _typeArray, type, JNI_TRUE);
diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderSource.cpp b/opengl/tools/glgen/stubs/gles11/glGetShaderSource.cpp
index a7e1cd2..c995d9c 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetShaderSource.cpp
+++ b/opengl/tools/glgen/stubs/gles11/glGetShaderSource.cpp
@@ -85,7 +85,7 @@
         (GLuint)shader,
         (GLsizei)bufsize,
         (GLsizei *)length,
-        (char *)source
+        reinterpret_cast<char *>(source)
     );
     if (_array) {
         releasePointer(_env, _array, length, JNI_TRUE);
diff --git a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
index cc10336..df11c53 100644
--- a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
+++ b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
@@ -128,7 +128,7 @@
             getBasePointerID, buffer);
     if (pointer != 0L) {
         *array = NULL;
-        return (void *) (jint) pointer;
+        return reinterpret_cast<void *>(pointer);
     }
 
     *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
@@ -182,7 +182,7 @@
             if (array) {
                 releasePointer(_env, array, buf, 0);
             }
-            buf = buf + offset;
+            buf = (char*)buf + offset;
         } else {
             jniThrowException(_env, "java/lang/IllegalArgumentException",
                               "Must use a native order direct Buffer");
diff --git a/services/sensorservice/CorrectedGyroSensor.cpp b/services/sensorservice/CorrectedGyroSensor.cpp
index 31487a7..b07d544 100644
--- a/services/sensorservice/CorrectedGyroSensor.cpp
+++ b/services/sensorservice/CorrectedGyroSensor.cpp
@@ -61,7 +61,7 @@
     return mSensorFusion.activate(ident, enabled);
 }
 
-status_t CorrectedGyroSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t CorrectedGyroSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
     mSensorDevice.setDelay(ident, mGyro.getHandle(), ns);
     return mSensorFusion.setDelay(ident, ns);
 }
diff --git a/services/sensorservice/GravitySensor.cpp b/services/sensorservice/GravitySensor.cpp
index dd1f650..3cb3745 100644
--- a/services/sensorservice/GravitySensor.cpp
+++ b/services/sensorservice/GravitySensor.cpp
@@ -70,7 +70,7 @@
     return mSensorFusion.activate(ident, enabled);
 }
 
-status_t GravitySensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t GravitySensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
     return mSensorFusion.setDelay(ident, ns);
 }
 
diff --git a/services/sensorservice/OrientationSensor.cpp b/services/sensorservice/OrientationSensor.cpp
index 10b391c..6d85cca 100644
--- a/services/sensorservice/OrientationSensor.cpp
+++ b/services/sensorservice/OrientationSensor.cpp
@@ -69,7 +69,7 @@
     return mSensorFusion.activate(ident, enabled);
 }
 
-status_t OrientationSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t OrientationSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
     return mSensorFusion.setDelay(ident, ns);
 }
 
diff --git a/services/sensorservice/RotationVectorSensor.cpp b/services/sensorservice/RotationVectorSensor.cpp
index a2157b4..cb305eb 100644
--- a/services/sensorservice/RotationVectorSensor.cpp
+++ b/services/sensorservice/RotationVectorSensor.cpp
@@ -56,7 +56,7 @@
     return mSensorFusion.activate(ident, enabled);
 }
 
-status_t RotationVectorSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t RotationVectorSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
     return mSensorFusion.setDelay(ident, ns);
 }
 
@@ -105,7 +105,7 @@
     return mSensorFusion.activate(ident, enabled);
 }
 
-status_t GyroDriftSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t GyroDriftSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
     return mSensorFusion.setDelay(ident, ns);
 }
 
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
index 19caa5c..3b64f0a 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -78,7 +78,7 @@
     Mutex::Autolock _l(mLock);
     for (size_t i=0 ; i<size_t(count) ; i++) {
         const Info& info = mActivationCount.valueFor(list[i].handle);
-        result.appendFormat("handle=0x%08x, active-count=%d, batch_period(ms)={ ", list[i].handle,
+        result.appendFormat("handle=0x%08x, active-count=%zu, batch_period(ms)={ ", list[i].handle,
                             info.batchParams.size());
         for (size_t j = 0; j < info.batchParams.size(); j++) {
             BatchParams params = info.batchParams.valueAt(j);
@@ -87,7 +87,7 @@
         }
         result.appendFormat(" }, selected=%4.1f ms\n", info.bestBatchParams.batchDelay / 1e6f);
 
-        result.appendFormat("handle=0x%08x, active-count=%d, batch_timeout(ms)={ ", list[i].handle,
+        result.appendFormat("handle=0x%08x, active-count=%zu, batch_timeout(ms)={ ", list[i].handle,
                             info.batchParams.size());
         for (size_t j = 0; j < info.batchParams.size(); j++) {
             BatchParams params = info.batchParams.valueAt(j);
@@ -309,7 +309,7 @@
     return mSensorDevice->common.version;
 }
 
-status_t SensorDevice::flush(void* ident, int handle) {
+status_t SensorDevice::flush(void* /*ident*/, int handle) {
     if (getHalDeviceVersion() < SENSORS_DEVICE_API_VERSION_1_1) {
         return INVALID_OPERATION;
     }
diff --git a/services/sensorservice/SensorFusion.cpp b/services/sensorservice/SensorFusion.cpp
index 8512d6b..6d93009 100644
--- a/services/sensorservice/SensorFusion.cpp
+++ b/services/sensorservice/SensorFusion.cpp
@@ -139,7 +139,7 @@
 
 void SensorFusion::dump(String8& result) {
     const Fusion& fusion(mFusion);
-    result.appendFormat("9-axis fusion %s (%d clients), gyro-rate=%7.2fHz, "
+    result.appendFormat("9-axis fusion %s (%zd clients), gyro-rate=%7.2fHz, "
             "q=< %g, %g, %g, %g > (%g), "
             "b=< %g, %g, %g >\n",
             mEnabled ? "enabled" : "disabled",
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
index f1d1663..2bf5e72 100644
--- a/services/sensorservice/SensorInterface.cpp
+++ b/services/sensorservice/SensorInterface.cpp
@@ -50,7 +50,7 @@
     return mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
 }
 
-status_t HardwareSensor::batch(void* ident, int handle, int flags,
+status_t HardwareSensor::batch(void* ident, int /*handle*/, int flags,
                                int64_t samplingPeriodNs, int64_t maxBatchReportLatencyNs) {
     return mSensorDevice.batch(ident, mSensor.getHandle(), flags, samplingPeriodNs,
                                maxBatchReportLatencyNs);
diff --git a/services/sensorservice/SensorInterface.h b/services/sensorservice/SensorInterface.h
index c295e22..3e76377 100644
--- a/services/sensorservice/SensorInterface.h
+++ b/services/sensorservice/SensorInterface.h
@@ -40,7 +40,7 @@
     virtual status_t setDelay(void* ident, int handle, int64_t ns) = 0;
 
     // Not all sensors need to support batching.
-    virtual status_t batch(void* ident, int handle, int flags, int64_t samplingPeriodNs,
+    virtual status_t batch(void* ident, int handle, int /*flags*/, int64_t samplingPeriodNs,
                            int64_t maxBatchReportLatencyNs) {
         if (maxBatchReportLatencyNs == 0) {
             return setDelay(ident, handle, samplingPeriodNs);
@@ -48,13 +48,13 @@
         return -EINVAL;
     }
 
-    virtual status_t flush(void* ident, int handle) {
+    virtual status_t flush(void* /*ident*/, int /*handle*/) {
         return -EINVAL;
     }
 
     virtual Sensor getSensor() const = 0;
     virtual bool isVirtual() const = 0;
-    virtual void autoDisable(void *ident, int handle) { }
+    virtual void autoDisable(void* /*ident*/, int /*handle*/) { }
 };
 
 // ---------------------------------------------------------------------------
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index f6705f6..6df6315 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -14,8 +14,9 @@
  * limitations under the License.
  */
 
-#include <stdint.h>
+#include <inttypes.h>
 #include <math.h>
+#include <stdint.h>
 #include <sys/types.h>
 
 #include <cutils/properties.h>
@@ -153,7 +154,7 @@
             char line[128];
             if (fp != NULL && fgets(line, sizeof(line), fp) != NULL) {
                 line[sizeof(line) - 1] = '\0';
-                sscanf(line, "%u", &mSocketBufferSize);
+                sscanf(line, "%zu", &mSocketBufferSize);
                 if (mSocketBufferSize > MAX_SOCKET_BUFFER_SIZE_BATCHED) {
                     mSocketBufferSize = MAX_SOCKET_BUFFER_SIZE_BATCHED;
                 }
@@ -200,7 +201,7 @@
 
 static const String16 sDump("android.permission.DUMP");
 
-status_t SensorService::dump(int fd, const Vector<String16>& args)
+status_t SensorService::dump(int fd, const Vector<String16>& /*args*/)
 {
     String8 result;
     if (!PermissionCache::checkCallingPermission(sDump)) {
@@ -257,7 +258,7 @@
                     result.appendFormat( "last=<%f>\n", e.data[0]);
                     break;
                 case SENSOR_TYPE_STEP_COUNTER:
-                    result.appendFormat( "last=<%llu>\n", e.u64.step_counter);
+                    result.appendFormat( "last=<%" PRIu64 ">\n", e.u64.step_counter);
                     break;
                 default:
                     // default to 3 values
@@ -273,19 +274,19 @@
         result.append("Active sensors:\n");
         for (size_t i=0 ; i<mActiveSensors.size() ; i++) {
             int handle = mActiveSensors.keyAt(i);
-            result.appendFormat("%s (handle=0x%08x, connections=%d)\n",
+            result.appendFormat("%s (handle=0x%08x, connections=%zu)\n",
                     getSensorName(handle).string(),
                     handle,
                     mActiveSensors.valueAt(i)->getNumConnections());
         }
 
-        result.appendFormat("%u Max Socket Buffer size\n", mSocketBufferSize);
-        result.appendFormat("%d active connections\n", mActiveConnections.size());
+        result.appendFormat("%zu Max Socket Buffer size\n", mSocketBufferSize);
+        result.appendFormat("%zd active connections\n", mActiveConnections.size());
 
         for (size_t i=0 ; i < mActiveConnections.size() ; i++) {
             sp<SensorEventConnection> connection(mActiveConnections[i].promote());
             if (connection != 0) {
-                result.appendFormat("Connection Number: %d \n", i);
+                result.appendFormat("Connection Number: %zu \n", i);
                 connection->dump(result);
             }
         }
diff --git a/services/sensorservice/main_sensorservice.cpp b/services/sensorservice/main_sensorservice.cpp
index 303b65f..0a96f42 100644
--- a/services/sensorservice/main_sensorservice.cpp
+++ b/services/sensorservice/main_sensorservice.cpp
@@ -19,7 +19,7 @@
 
 using namespace android;
 
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
     SensorService::publishAndJoinThreadPool();
     return 0;
 }
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index b2bc550..49a017f 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -120,6 +120,10 @@
 
 LOCAL_MODULE:= surfaceflinger
 
+ifdef TARGET_32_BIT_SURFACEFLINGER
+LOCAL_32_BIT_ONLY := true
+endif
+
 include $(BUILD_EXECUTABLE)
 
 ###############################################################
diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp
index ce07ab5..602f20a 100644
--- a/services/surfaceflinger/DispSync.cpp
+++ b/services/surfaceflinger/DispSync.cpp
@@ -287,7 +287,7 @@
 public:
     ZeroPhaseTracer() : mParity(false) {}
 
-    virtual void onDispSyncEvent(nsecs_t when) {
+    virtual void onDispSyncEvent(nsecs_t /*when*/) {
         mParity = !mParity;
         ATRACE_INT("ZERO_PHASE_VSYNC", mParity ? 1 : 0);
     }
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 0d0f98d..a1430b9 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -77,16 +77,6 @@
     mNativeWindow = new Surface(producer, false);
     ANativeWindow* const window = mNativeWindow.get();
 
-    // Make sure that composition can never be stalled by a virtual display
-    // consumer that isn't processing buffers fast enough. We have to do this
-    // in two places:
-    // * Here, in case the display is composed entirely by HWC.
-    // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the
-    //   window's swap interval in eglMakeCurrent, so they'll override the
-    //   interval we set here.
-    if (mType >= DisplayDevice::DISPLAY_VIRTUAL)
-        window->setSwapInterval(window, 0);
-
     /*
      * Create our display's surface
      */
@@ -101,6 +91,16 @@
     eglQuerySurface(display, surface, EGL_WIDTH,  &mDisplayWidth);
     eglQuerySurface(display, surface, EGL_HEIGHT, &mDisplayHeight);
 
+    // Make sure that composition can never be stalled by a virtual display
+    // consumer that isn't processing buffers fast enough. We have to do this
+    // in two places:
+    // * Here, in case the display is composed entirely by HWC.
+    // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the
+    //   window's swap interval in eglMakeCurrent, so they'll override the
+    //   interval we set here.
+    if (mType >= DisplayDevice::DISPLAY_VIRTUAL)
+        window->setSwapInterval(window, 0);
+
     mDisplay = display;
     mSurface = surface;
     mFormat  = format;
@@ -462,7 +462,7 @@
     result.appendFormat(
         "+ DisplayDevice: %s\n"
         "   type=%x, hwcId=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p, orient=%2d (type=%08x), "
-        "flips=%u, isSecure=%d, secureVis=%d, acquired=%d, numLayers=%u\n"
+        "flips=%u, isSecure=%d, secureVis=%d, acquired=%d, numLayers=%zu\n"
         "   v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d],"
         "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
         mDisplayName.string(), mType, mHwcDisplayId,
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index 8c634ed..7d4b196 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -72,7 +72,7 @@
     return NO_ERROR;
 }
 
-status_t FramebufferSurface::prepareFrame(CompositionType compositionType) {
+status_t FramebufferSurface::prepareFrame(CompositionType /*compositionType*/) {
     return NO_ERROR;
 }
 
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 1b652c3..a48582e 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -16,12 +16,13 @@
 
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
 
+#include <inttypes.h>
+#include <math.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
-#include <math.h>
 
 #include <utils/CallStack.h>
 #include <utils/Errors.h>
@@ -1022,12 +1023,12 @@
                     mFlinger->getLayerSortedByZForHwcDisplay(i);
 
             result.appendFormat(
-                    "  Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n",
+                    "  Display[%zd] : %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n",
                     i, disp.width, disp.height, disp.xdpi, disp.ydpi, disp.refresh);
 
             if (disp.list) {
                 result.appendFormat(
-                        "  numHwLayers=%u, flags=%08x\n",
+                        "  numHwLayers=%zu, flags=%08x\n",
                         disp.list->numHwLayers, disp.list->flags);
 
                 result.append(
@@ -1066,7 +1067,7 @@
 
                     if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
                         result.appendFormat(
-                                " %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
+                                " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
                                         compositionTypeName[type],
                                         intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
                                         l.sourceCropf.left, l.sourceCropf.top, l.sourceCropf.right, l.sourceCropf.bottom,
@@ -1074,7 +1075,7 @@
                                         name.string());
                     } else {
                         result.appendFormat(
-                                " %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
+                                " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
                                         compositionTypeName[type],
                                         intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
                                         l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom,
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 3528b62..d868f32 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -328,7 +328,7 @@
             mDebugVsyncEnabled?"enabled":"disabled");
     result.appendFormat("  soft-vsync: %s\n",
             mUseSoftwareVSync?"enabled":"disabled");
-    result.appendFormat("  numListeners=%u,\n  events-delivered: %u\n",
+    result.appendFormat("  numListeners=%zu,\n  events-delivered: %u\n",
             mDisplayEventConnections.size(),
             mVSyncEvent[DisplayDevice::DISPLAY_PRIMARY].vsync.count);
     for (size_t i=0 ; i<mDisplayEventConnections.size() ; i++) {
diff --git a/services/surfaceflinger/FrameTracker.cpp b/services/surfaceflinger/FrameTracker.cpp
index d406672..2fb665e 100644
--- a/services/surfaceflinger/FrameTracker.cpp
+++ b/services/surfaceflinger/FrameTracker.cpp
@@ -17,6 +17,8 @@
 // This is needed for stdint.h to define INT64_MAX in C++
 #define __STDC_LIMIT_MACROS
 
+#include <inttypes.h>
+
 #include <cutils/log.h>
 
 #include <ui/Fence.h>
@@ -211,7 +213,7 @@
     const size_t o = mOffset;
     for (size_t i = 1; i < NUM_FRAME_RECORDS; i++) {
         const size_t index = (o+i) % NUM_FRAME_RECORDS;
-        result.appendFormat("%lld\t%lld\t%lld\n",
+        result.appendFormat("%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n",
             mFrameRecords[index].desiredPresentTime,
             mFrameRecords[index].actualPresentTime,
             mFrameRecords[index].frameReadyTime);
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
index cc672b6..1ad86a6 100644
--- a/services/surfaceflinger/MessageQueue.cpp
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -179,7 +179,7 @@
     return queue->eventReceiver(fd, events);
 }
 
-int MessageQueue::eventReceiver(int fd, int events) {
+int MessageQueue::eventReceiver(int /*fd*/, int /*events*/) {
     ssize_t n;
     DisplayEventReceiver::Event buffer[8];
     while ((n = DisplayEventReceiver::getEvents(mEventTube, buffer, 8)) > 0) {
diff --git a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
index 521a5d2..cbff320 100644
--- a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
@@ -237,7 +237,7 @@
     }
 }
 
-void GLES11RenderEngine::beginGroup(const mat4& colorTransform) {
+void GLES11RenderEngine::beginGroup(const mat4& /*colorTransform*/) {
     // doesn't do anything in GLES 1.1
 }
 
diff --git a/services/surfaceflinger/RenderEngine/Program.cpp b/services/surfaceflinger/RenderEngine/Program.cpp
index 4a7fb58..0424e0c 100644
--- a/services/surfaceflinger/RenderEngine/Program.cpp
+++ b/services/surfaceflinger/RenderEngine/Program.cpp
@@ -25,7 +25,7 @@
 
 namespace android {
 
-Program::Program(const ProgramCache::Key& needs, const char* vertex, const char* fragment)
+Program::Program(const ProgramCache::Key& /*needs*/, const char* vertex, const char* fragment)
         : mInitialized(false) {
     GLuint vertexId = buildShader(vertex, GL_VERTEX_SHADER);
     GLuint fragmentId = buildShader(fragment, GL_FRAGMENT_SHADER);
@@ -112,7 +112,7 @@
     return shader;
 }
 
-String8& Program::dumpShader(String8& result, GLenum type) {
+String8& Program::dumpShader(String8& result, GLenum /*type*/) {
     GLuint shader = GL_FRAGMENT_SHADER ? mFragmentShader : mVertexShader;
     GLint l;
     glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &l);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 86be6c3..a12db6d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <math.h>
 #include <dlfcn.h>
+#include <inttypes.h>
 
 #include <EGL/egl.h>
 
@@ -429,7 +430,7 @@
                 // FIXME: currently we don't get blank/unblank requests
                 // for displays other than the main display, so we always
                 // assume a connected display is unblanked.
-                ALOGD("marking display %d as acquired/unblanked", i);
+                ALOGD("marking display %zu as acquired/unblanked", i);
                 hw->acquireScreen();
             }
             mDisplays.add(token, hw);
@@ -1639,7 +1640,7 @@
                     case HWC_FRAMEBUFFER_TARGET: {
                         // this should not happen as the iterator shouldn't
                         // let us get there.
-                        ALOGW("HWC_FRAMEBUFFER_TARGET found in hwc list (index=%d)", i);
+                        ALOGW("HWC_FRAMEBUFFER_TARGET found in hwc list (index=%zu)", i);
                         break;
                     }
                 }
@@ -2226,7 +2227,7 @@
 
     const nsecs_t period =
             getHwComposer().getRefreshPeriod(HWC_DISPLAY_PRIMARY);
-    result.appendFormat("%lld\n", period);
+    result.appendFormat("%" PRId64 "\n", period);
 
     if (name.isEmpty()) {
         mAnimFrameTracker.dump(result);
@@ -2339,7 +2340,7 @@
     const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
     const size_t count = currentLayers.size();
     colorizer.bold(result);
-    result.appendFormat("Visible layers (count = %d)\n", count);
+    result.appendFormat("Visible layers (count = %zu)\n", count);
     colorizer.reset(result);
     for (size_t i=0 ; i<count ; i++) {
         const sp<Layer>& layer(currentLayers[i]);
@@ -2351,7 +2352,7 @@
      */
 
     colorizer.bold(result);
-    result.appendFormat("Displays (%d entries)\n", mDisplays.size());
+    result.appendFormat("Displays (%zu entries)\n", mDisplays.size());
     colorizer.reset(result);
     for (size_t dpy=0 ; dpy<mDisplays.size() ; dpy++) {
         const sp<const DisplayDevice>& hw(mDisplays[dpy]);
@@ -2934,7 +2935,7 @@
             const bool visible = (state.layerStack == hw->getLayerStack())
                                 && (state.z >= minLayerZ && state.z <= maxLayerZ)
                                 && (layer->isVisible());
-            ALOGE("%c index=%d, name=%s, layerStack=%d, z=%d, visible=%d, flags=%x, alpha=%x",
+            ALOGE("%c index=%zu, name=%s, layerStack=%d, z=%d, visible=%d, flags=%x, alpha=%x",
                     visible ? '+' : '-',
                             i, layer->getName().string(), state.layerStack, state.z,
                             layer->isVisible(), state.flags, state.alpha);
