libGLES_android: fix 64-bit compile errors

Fix size of vertex_t on 64-bit architectures
Fix __get_tls casts, the TLS area is a void**
Cast through uintptr_t to store integers in a pointer
Use %zu to print size_t

Change-Id: I91079ec76025237e6d2081784c5348518b0ce122
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index bbbda76..f925e7d 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -78,20 +78,20 @@
             pthread_key_create(&gEGLErrorKey, NULL);
         pthread_mutex_unlock(&gErrorKeyMutex);
     }
-    pthread_setspecific(gEGLErrorKey, (void*)error);
+    pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)error);
     return returnValue;
 }
 
 static GLint getError() {
     if (ggl_unlikely(gEGLErrorKey == -1))
         return EGL_SUCCESS;
-    GLint error = (GLint)pthread_getspecific(gEGLErrorKey);
+    GLint error = (GLint)(uintptr_t)pthread_getspecific(gEGLErrorKey);
     if (error == 0) {
         // The TLS key has been created by another thread, but the value for
         // this thread has not been initialized.
         return EGL_SUCCESS;
     }
-    pthread_setspecific(gEGLErrorKey, (void*)EGL_SUCCESS);
+    pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)EGL_SUCCESS);
     return error;
 }
 
@@ -1201,7 +1201,7 @@
         EGLint attribute, EGLint *value)
 {
     size_t numConfigs =  NELEM(gConfigs);
-    int index = (int)config;
+    int index = (int)(uintptr_t)config;
     if (uint32_t(index) >= numConfigs)
         return setError(EGL_BAD_CONFIG, EGL_FALSE);
 
@@ -1448,7 +1448,7 @@
     }
     GLint i;
     for (i=0 ; i<numConfigs && i<config_size ; i++) {
-        *configs++ = (EGLConfig)i;
+        *configs++ = (EGLConfig)(uintptr_t)i;
     }
     *num_config = i;
     return EGL_TRUE;
@@ -1519,7 +1519,7 @@
         if (configs) {
             for (int i=0 ; config_size && i<numConfigs ; i++) {
                 if (possibleMatch & (1<<i)) {
-                    *configs++ = (EGLConfig)i;
+                    *configs++ = (EGLConfig)(uintptr_t)i;
                     config_size--;
                     n++;
                 }