aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-09-15 07:52:05 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-09-15 07:52:05 -0700
commita3abe794b734382295b89d6c2d1d176ce4bb9b4b (patch)
tree95e345dd609035922e9beeb9e22ec11cdc6308aa
parent2a7dcd0aef9ff770f4a215d2195d509763f6d3ce (diff)
parent63a13ab8230560f5b9610bb0fa6a47a54ebf8e9c (diff)
downloadexternal_qemu-a3abe794b734382295b89d6c2d1d176ce4bb9b4b.zip
external_qemu-a3abe794b734382295b89d6c2d1d176ce4bb9b4b.tar.gz
external_qemu-a3abe794b734382295b89d6c2d1d176ce4bb9b4b.tar.bz2
merge from open-source master
-rw-r--r--Makefile.android4
-rwxr-xr-xandroid-configure.sh11
-rw-r--r--android/build/common.sh6
-rw-r--r--android/config/freebsd-x86/config-host.h13
-rw-r--r--android/utils/timezone.c4
-rw-r--r--distrib/sdl-1.2.12/android/build/freebsd-x86/SDL_config.h126
-rw-r--r--slirp2/slirp.h4
7 files changed, 166 insertions, 2 deletions
diff --git a/Makefile.android b/Makefile.android
index a844a6b..734991e 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -510,6 +510,10 @@ ifeq ($(HOST_OS),windows)
LOCAL_LDLIBS += -mno-cygwin -mwindows -mconsole
endif
+ifeq ($(HOST_OS),freebsd)
+ LOCAL_LDLIBS += -L/usr/local/lib -lpthread -lX11 -lutil
+endif
+
LOCAL_SRC_FILES += $(VL_SOURCES)
ifeq ($(HOST_OS),linux)
diff --git a/android-configure.sh b/android-configure.sh
index 59ec9b4..16e0d4d 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -203,6 +203,12 @@ log "SDL-probe : SDL_LIBS = $SDL_LIBS"
EXTRA_CFLAGS="$SDL_CFLAGS"
EXTRA_LDFLAGS="$SDL_LIBS"
+case "$OS" in
+ freebsd-*)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -lpthread"
+ ;;
+esac
+
cat > $TMPC << EOF
#include <SDL.h>
#undef main
@@ -269,6 +275,8 @@ case "$OS" in
;;
linux-*) PROBE_ALSA=yes; PROBE_OSS=yes; PROBE_ESD=yes;
;;
+ freebsd-*) PROBE_OSS=yes;
+ ;;
windows) PROBE_WINAUDIO=yes
;;
esac
@@ -414,6 +422,9 @@ case "$OS" in
darwin-*) CONFIG_OS=DARWIN
BSD=1
;;
+ freebsd-*) CONFIG_OS=FREEBSD
+ BSD=1
+ ;;
windows*) CONFIG_OS=WIN32
;;
*) CONFIG_OS=$OS
diff --git a/android/build/common.sh b/android/build/common.sh
index 3f2c642..93ffba7 100644
--- a/android/build/common.sh
+++ b/android/build/common.sh
@@ -88,6 +88,9 @@ case "$OS" in
Linux)
# note that building 32-bit binaries on x86_64 is handled later
OS=linux-$CPU
+ ;;
+ FreeBSD)
+ OS=freebsd-$CPU
;;
CYGWIN*|*_NT-*)
OS=windows
@@ -123,6 +126,8 @@ case $OS in
;;
darwin-*) HOST_OS=darwin
;;
+ freebsd-*) HOST_OS=freebsd
+ ;;
*) HOST_OS=$OS
esac
@@ -161,6 +166,7 @@ force_32bit_binaries ()
case $OS in
linux-x86_64) OS=linux-x86 ;;
darwin-x86_64) OS=darwin-x86 ;;
+ freebsd-x86_64) OS=freebsd-x86 ;;
esac
HOST_ARCH=x86
CPU=x86
diff --git a/android/config/freebsd-x86/config-host.h b/android/config/freebsd-x86/config-host.h
new file mode 100644
index 0000000..8a08339
--- /dev/null
+++ b/android/config/freebsd-x86/config-host.h
@@ -0,0 +1,13 @@
+/* Automatically generated by configure - do not modify */
+#define CONFIG_QEMU_SHAREDIR "/usr/local/share/qemu"
+#define HOST_I386 1
+#define HOST_LONG_BITS 32
+#define CONFIG_GDBSTUB 1
+#define CONFIG_SLIRP 1
+#define CONFIG_OSS 1
+#define QEMU_VERSION "0.8.2"
+#define O_LARGEFILE 0
+#define MAP_ANONYMOUS MAP_ANON
+#define _BSD 1
+#define CONFIG_UNAME_RELEASE ""
+#define CONFIG_SKINS 1
diff --git a/android/utils/timezone.c b/android/utils/timezone.c
index b5588a3..f4b78db 100644
--- a/android/utils/timezone.c
+++ b/android/utils/timezone.c
@@ -96,7 +96,7 @@ bufprint_zoneinfo_timezone( char* p, char* end )
/* on OS X, the timezone directory is always /usr/share/zoneinfo
* this makes things easy.
*/
-#ifdef __APPLE__
+#if defined(__APPLE__)
#include <unistd.h>
#include <limits.h>
@@ -149,7 +149,7 @@ get_zoneinfo_timezone( void )
* the original timezone file. the only way to know which zoneinfo name to retrieve is to compare
* it with all files in $TZDIR (at least those that match Area/Location or Area/Location/SubLocation
*/
-#ifdef __linux__
+#if defined(__linux__) || defined (__FreeBSD__)
#include <unistd.h>
#include <limits.h>
diff --git a/distrib/sdl-1.2.12/android/build/freebsd-x86/SDL_config.h b/distrib/sdl-1.2.12/android/build/freebsd-x86/SDL_config.h
new file mode 100644
index 0000000..302a22a
--- /dev/null
+++ b/distrib/sdl-1.2.12/android/build/freebsd-x86/SDL_config.h
@@ -0,0 +1,126 @@
+/* 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 */
+/* #undef HAVE_ALLOCA_H */
+#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
+/* #undef HAVE_MALLOC_H */
+#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
+/* #undef HAVE_ICONV_H */
+#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
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#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
+/* #undef HAVE_ICONV */
+#define HAVE_SIGACTION 1
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_CLOCK_GETTIME 1
+/* #undef HAVE_DLVSYM */
+#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 */
+/* #undef SDL_AUDIO_DISABLED */
+#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 audio drivers */
+#define SDL_AUDIO_DRIVER_OSS 1
+
+/* 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 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/slirp2/slirp.h b/slirp2/slirp.h
index e69940b..3ee8111 100644
--- a/slirp2/slirp.h
+++ b/slirp2/slirp.h
@@ -14,6 +14,10 @@
#include <stddef.h>
#include "sockets.h"
+#ifdef _BSD
+#include <netinet/in.h>
+#endif
+
#ifdef _WIN32
# include <inttypes.h>