aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/config/linux-x86_64/SDL_config.h123
-rw-r--r--android/utils/mapfile.c10
-rw-r--r--android/utils/mapfile.h2
-rw-r--r--android/utils/system.c2
-rw-r--r--android/utils/timezone.c2
5 files changed, 131 insertions, 8 deletions
diff --git a/android/config/linux-x86_64/SDL_config.h b/android/config/linux-x86_64/SDL_config.h
new file mode 100644
index 0000000..529beb0
--- /dev/null
+++ b/android/config/linux-x86_64/SDL_config.h
@@ -0,0 +1,123 @@
+/* This file was autogenerated by 'android-configure.sh' - do not edit */
+#ifndef _SDL_config_h
+#define _SDL_config_h
+
+#include "SDL_platform.h"
+
+#define SDL_HAS_64BIT_TYPE 1
+#define SDL_BYTEORDER 1234
+
+#define HAVE_LIBC 1
+#if HAVE_LIBC
+
+/* Useful headers */
+#define HAVE_ALLOCA_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_ICONV_H 1
+#define HAVE_SIGNAL_H 1
+/* #undef HAVE_ALTIVEC_H */
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+/* #undef HAVE_ALLOC */
+#ifndef _WIN32 /* Don't use on Windows */
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#endif
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+#define HAVE_STRDUP 1
+/* #undef HAVE__STRREV */
+/* #undef HAVE__STRUPR */
+/* #undef HAVE__STRLWR */
+#define HAVE_INDEX 1
+#define HAVE_RINDEX 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+/* #undef HAVE_ITOA */
+/* #undef HAVE__LTOA */
+/* #undef HAVE__UITOA */
+/* #undef HAVE__ULTOA */
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+/* #undef HAVE__I64TOA */
+/* #undef HAVE__UI64TOA */
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+/* #undef HAVE__STRICMP */
+#define HAVE_STRCASECMP 1
+/* #undef HAVE__STRNICMP */
+#define HAVE_VSNPRINTF 1
+#define HAVE_ICONV 1
+#define HAVE_SIGACTION 1
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_DLVSYM 1
+#define HAVE_GETPAGESIZE 1
+#else
+/* We may need some replacement for stdarg.h here */
+#include <stdarg.h>
+#endif /* HAVE_LIBC */
+
+/* Allow disabling of core subsystems */
+#define SDL_AUDIO_DISABLED 1
+#define SDL_CDROM_DISABLED 1
+/* #undef SDL_CPUINFO_DISABLED */
+/* #undef SDL_EVENTS_DISABLED */
+#define SDL_FILE_DISABLED 1
+#define SDL_JOYSTICK_DISABLED 1
+/* #undef SDL_LOADSO_DISABLED */
+/* #undef SDL_THREADS_DISABLED */
+/* #undef SDL_TIMERS_DISABLED */
+/* #undef SDL_VIDEO_DISABLED */
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_DLOPEN 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_PTHREAD 1
+#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_UNIX 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_X11 1
+#define SDL_VIDEO_DRIVER_X11_DPMS 1
+#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
+#define SDL_VIDEO_DRIVER_X11_XME 1
+#define SDL_MAIN_DUMMY 1
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "libXrandr.so.2"
+#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER "libXrender.so.1"
+#endif /* _SDL_config_h */
diff --git a/android/utils/mapfile.c b/android/utils/mapfile.c
index 102dfd8..61b57c4 100644
--- a/android/utils/mapfile.c
+++ b/android/utils/mapfile.c
@@ -88,7 +88,7 @@ mapfile_open(const char* path, int oflag, int share_mode)
int file_handle = open(path, oflag, share_mode);
#endif // WIN32
- return (MapFile*)file_handle;
+ return (MapFile*)(ptrdiff_t)file_handle;
}
int
@@ -102,7 +102,7 @@ mapfile_close(MapFile* handle)
return -1;
}
#else // WIN32
- return close((int)handle);
+ return close((int)(ptrdiff_t)handle);
#endif // WIN32
}
@@ -122,7 +122,7 @@ mapfile_read(MapFile* handle, void* buf, size_t nbyte)
#else // WIN32
ssize_t ret;
do {
- ret = read((int)handle, buf, nbyte);
+ ret = read((int)(ptrdiff_t)handle, buf, nbyte);
} while (ret < 0 && errno == EINTR);
return ret;
#endif // WIN32
@@ -142,7 +142,7 @@ mapfile_read_at(MapFile* handle, size_t offset, void* buf, size_t nbyte)
}
return mapfile_read(handle, buf, nbyte);
#else // WIN32
- ssize_t res = lseek((int)handle, offset, SEEK_SET);
+ ssize_t res = lseek((int)(ptrdiff_t)handle, offset, SEEK_SET);
return res >= 0 ? mapfile_read(handle, buf, nbyte) : res;
#endif // WIN32
}
@@ -223,7 +223,7 @@ mapfile_map(MapFile* handle,
}
#else // WIN32
mapped_at =
- mmap(0, map_size, PROT_READ, MAP_SHARED, (int)handle, map_offset);
+ mmap(0, map_size, PROT_READ, MAP_SHARED, (int)(ptrdiff_t)handle, map_offset);
if (mapped_at == MAP_FAILED) {
return NULL;
}
diff --git a/android/utils/mapfile.h b/android/utils/mapfile.h
index c125337..18f8845 100644
--- a/android/utils/mapfile.h
+++ b/android/utils/mapfile.h
@@ -39,7 +39,7 @@ typedef struct MapFile MapFile;
static inline int
mapfile_is_valid(MapFile* handle)
{
- return (int)handle != -1;
+ return handle != (void*)(ptrdiff_t)-1;
}
/* Opens file in selected mode.
diff --git a/android/utils/system.c b/android/utils/system.c
index 8443877..5b20b4b 100644
--- a/android/utils/system.c
+++ b/android/utils/system.c
@@ -66,7 +66,7 @@ android_realloc( void* block, size_t size )
if (block2 != NULL)
return block2;
- fprintf(stderr, "PANIC: not enough memory to reallocate %d bytes\n", size);
+ fprintf(stderr, "PANIC: not enough memory to reallocate %lld bytes\n", (uint64_t)size);
exit(1);
return NULL;
}
diff --git a/android/utils/timezone.c b/android/utils/timezone.c
index 2707e2e..1b99917 100644
--- a/android/utils/timezone.c
+++ b/android/utils/timezone.c
@@ -185,7 +185,7 @@ compare_timezone_to_localtime( ScanDataRec* scan,
}
if ( st.st_size != scan->localtime_st.st_size ) {
- D( " size mistmatch (%lld != %lld)\n", st.st_size, scan->localtime_st.st_size );
+ D( " size mistmatch (%zd != %zd)\n", (size_t)st.st_size, (size_t)scan->localtime_st.st_size );
return 0;
}