? arm-user ? build ? config-host.h ? config-host.mak ? dyngen ? i386 ? i386-softmmu ? i386-user ? ppc-user ? qemu-doc.html ? qemu-mkcow ? qemu.1 ? qemu.xcode ? sparc-user Index: Makefile =================================================================== RCS file: /cvsroot/qemu/qemu/Makefile,v retrieving revision 1.54 diff -u -r1.54 Makefile --- Makefile 4 Jan 2004 16:10:12 -0000 1.54 +++ Makefile 20 Jan 2004 18:53:03 -0000 @@ -1,6 +1,6 @@ include config-host.mak -CFLAGS=-Wall -O2 -g +CFLAGS=-Wall -O2 -g $(ARCHCFLAGS) LDFLAGS=-g LIBS= DEFINES+=-D_GNU_SOURCE Index: Makefile.target =================================================================== RCS file: /cvsroot/qemu/qemu/Makefile.target,v retrieving revision 1.13 diff -u -r1.13 Makefile.target --- Makefile.target 5 Jan 2004 00:08:14 -0000 1.13 +++ Makefile.target 20 Jan 2004 18:53:03 -0000 @@ -2,7 +2,7 @@ TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH) VPATH=$(SRC_PATH):$(TARGET_PATH) -CFLAGS=-Wall -O2 -g +CFLAGS=-Wall -O2 -g $(ARCHCFLAGS) LDFLAGS=-g LIBS= DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) Index: configure =================================================================== RCS file: /cvsroot/qemu/qemu/configure,v retrieving revision 1.24 diff -u -r1.24 configure --- configure 4 Jan 2004 23:49:02 -0000 1.24 +++ configure 20 Jan 2004 18:53:04 -0000 @@ -257,6 +257,8 @@ echo "ARCH=arm" >> $config_mak echo "#define HOST_ARM 1" >> $config_h elif test "$cpu" = "powerpc" ; then + # make sure __powerpc__ is defined (it is not on darwin) + echo "ARCHCFLAGS=-D__powerpc__" >> $config_mak echo "ARCH=ppc" >> $config_mak echo "#define HOST_PPC 1" >> $config_h elif test "$cpu" = "mips" ; then @@ -288,7 +290,14 @@ echo "WORDS_BIGENDIAN=yes" >> $config_mak echo "#define WORDS_BIGENDIAN 1" >> $config_h fi + echo "#define HAVE_BYTESWAP_H 1" >> $config_h +echo "#define HAVE_LINUX_IF_TUN_H 1" >> $config_h +echo "#define HAVE_LINUX_IF_H 1" >> $config_h +echo "#define HAVE_MALLOC_H 1" >> $config_h +echo "/* #undef HAVE_SYS_MALLOC_H */" >> $config_h +echo "#define HAVE_LSEEK64 1" >> $config_h + if test "$gprof" = "yes" ; then echo "TARGET_GPROF=yes" >> $config_mak echo "#define HAVE_GPROF 1" >> $config_h Index: dyngen-exec.h =================================================================== RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v retrieving revision 1.8 diff -u -r1.8 dyngen-exec.h --- dyngen-exec.h 4 Jan 2004 17:44:08 -0000 1.8 +++ dyngen-exec.h 20 Jan 2004 18:53:05 -0000 @@ -27,10 +27,15 @@ typedef unsigned int uint32_t; typedef unsigned long long uint64_t; +#ifdef __APPLE__ +/* Already defined here */ +# include +#else typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef signed long long int64_t; +#endif #define INT8_MIN (-128) #define INT16_MIN (-32767-1) Index: elfload.c =================================================================== RCS file: /cvsroot/qemu/qemu/elfload.c,v retrieving revision 1.17 diff -u -r1.17 elfload.c --- elfload.c 4 Jan 2004 15:46:50 -0000 1.17 +++ elfload.c 20 Jan 2004 18:53:08 -0000 @@ -13,6 +13,19 @@ #include "qemu.h" #include "disas.h" +#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +# define MAP_ANONYMOUS MAP_ANON +#endif + +#ifndef MAP_DENYWRITE +# define MAP_DENYWRITE 0 +#endif + +#if !defined(ELIBBAD) && defined(ESHLIBVERS) +# define ELIBBAD ESHLIBVERS +#endif + + #ifdef TARGET_I386 #define ELF_START_MMAP 0x80000000 Index: main.c =================================================================== RCS file: /cvsroot/qemu/qemu/main.c,v retrieving revision 1.43 diff -u -r1.43 main.c --- main.c 4 Jan 2004 23:54:31 -0000 1.43 +++ main.c 20 Jan 2004 18:53:10 -0000 @@ -26,6 +26,11 @@ #include "qemu.h" +#ifdef __APPLE__ +# include +# define environ *_NSGetEnviron() +#endif + #define DEBUG_LOGFILE "/tmp/qemu.log" static const char *interp_prefix = CONFIG_QEMU_PREFIX; Index: mmap.c =================================================================== RCS file: /cvsroot/qemu/qemu/mmap.c,v retrieving revision 1.4 diff -u -r1.4 mmap.c --- mmap.c 9 Jun 2003 15:24:18 -0000 1.4 +++ mmap.c 20 Jan 2004 18:53:39 -0000 @@ -29,6 +29,14 @@ //#define DEBUG_MMAP +#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +# define MAP_ANONYMOUS MAP_ANON +#endif + +#ifndef MAP_TYPE +# define MAP_TYPE (PROT_NONE|PROT_READ|PROT_WRITE|PROT_EXEC) +#endif + /* NOTE: all the constants are the HOST ones */ int target_mprotect(unsigned long start, unsigned long len, int prot) { Index: qemu-mkcow.c =================================================================== RCS file: /cvsroot/qemu/qemu/qemu-mkcow.c,v retrieving revision 1.1 diff -u -r1.1 qemu-mkcow.c --- qemu-mkcow.c 30 Sep 2003 20:59:51 -0000 1.1 +++ qemu-mkcow.c 20 Jan 2004 18:53:49 -0000 @@ -33,7 +33,12 @@ #include #include #include -#include +#ifdef HAVE_MALLOC_H +# include +#endif +#ifdef HAVE_SYS_MALLOC_H +# include +#endif #include #include #include @@ -44,6 +49,10 @@ #include "vl.h" #include "bswap.h" + +#ifndef HAVE_LSEEK64 +# define lseek64 lseek +#endif int cow_create(int cow_fd, const char *image_filename, int64_t image_sectors) Index: signal.c =================================================================== RCS file: /cvsroot/qemu/qemu/signal.c,v retrieving revision 1.20 diff -u -r1.20 signal.c --- signal.c 4 Jan 2004 17:15:59 -0000 1.20 +++ signal.c 20 Jan 2004 18:54:20 -0000 @@ -93,7 +93,9 @@ [SIGPROF] = TARGET_SIGPROF, [SIGWINCH] = TARGET_SIGWINCH, [SIGIO] = TARGET_SIGIO, +#ifdef SIGPWR [SIGPWR] = TARGET_SIGPWR, +#endif [SIGSYS] = TARGET_SIGSYS, /* next signals stay the same */ }; @@ -197,8 +199,13 @@ tinfo->_sifields._rt._pid = info->si_pid; tinfo->_sifields._rt._uid = info->si_uid; /* XXX: potential problem if 64 bit */ +#ifdef __APPLE__ + tinfo->_sifields._rt._sigval.sival_ptr = + (target_ulong)info->si_value.sigval_ptr; +#else tinfo->_sifields._rt._sigval.sival_ptr = (target_ulong)info->si_value.sival_ptr; +#endif } } @@ -238,8 +245,14 @@ info->si_code = tswap32(tinfo->si_code); info->si_pid = tswap32(tinfo->_sifields._rt._pid); info->si_uid = tswap32(tinfo->_sifields._rt._uid); +#ifdef __APPLE__ + info->si_value.sigval_ptr = + (void *)tswapl(tinfo->_sifields._rt._sigval.sival_ptr); +#else info->si_value.sival_ptr = (void *)tswapl(tinfo->_sifields._rt._sigval.sival_ptr); +#endif + } void signal_init(void) Index: syscall.c =================================================================== RCS file: /cvsroot/qemu/qemu/syscall.c,v retrieving revision 1.42 diff -u -r1.42 syscall.c --- syscall.c 4 Jan 2004 23:57:22 -0000 1.42 +++ syscall.c 20 Jan 2004 18:54:27 -0000 @@ -75,7 +75,7 @@ #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2]) -#if defined(__powerpc__) +#if defined(__powerpc__) && !defined(__APPLE__) #undef __syscall_nr #undef __sc_loadargs_0 #undef __sc_loadargs_1 Index: vl.c =================================================================== RCS file: /cvsroot/qemu/qemu/vl.c,v retrieving revision 1.37 diff -u -r1.37 vl.c --- vl.c 5 Jan 2004 00:02:06 -0000 1.37 +++ vl.c 20 Jan 2004 18:54:35 -0000 @@ -34,7 +34,9 @@ #include #include #include +#ifdef HAVE_MALLOC_H #include +#endif #include #include #include @@ -42,8 +44,13 @@ #include #include -#include -#include + +#ifdef HAVE_LINUX_IF_H +# include +#endif +#ifdef HAVE_LINUX_IF_TUN_H +# include +#endif #include "cpu.h" #include "disas.h"