From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByxZP-0001Gb-Fb for qemu-devel@nongnu.org; Sun, 22 Aug 2004 14:59:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByxZN-0001G2-Sb for qemu-devel@nongnu.org; Sun, 22 Aug 2004 14:59:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByxZN-0001Fz-Nt for qemu-devel@nongnu.org; Sun, 22 Aug 2004 14:59:57 -0400 Received: from [216.239.56.248] (helo=mproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByxUb-0002CA-F6 for qemu-devel@nongnu.org; Sun, 22 Aug 2004 14:55:11 -0400 Received: by mproxy.gmail.com with SMTP id q44so7746cwc for ; Sun, 22 Aug 2004 11:54:52 -0700 (PDT) Message-ID: Date: Sun, 22 Aug 2004 15:54:52 -0300 From: Pablo Bendersky In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_18_7603886.1093200892598" References: <41279F64.4080004@pagesmiths.com> Subject: [Qemu-devel] Re: [Darwine] QEMU+WINE Reply-To: Pablo Bendersky , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: emmanuel maillard Cc: qemu-devel@nongnu.org, Darwine Devel ------=_Part_18_7603886.1093200892598 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Here's a patch from my working copy to the CVS. It's mostly a patch that Pierre sent me with a few additions, to make the getdents syscall work. It is able to run sha1 and ls (but not with all the options). I haven't tried qruncom (I'm actually new to both qemu and darwine). On Sun, 22 Aug 2004 14:42:59 +0200, emmanuel maillard wrote: > Hi, >=20 > did you try to build and run qruncom, i can't get it work. >=20 > ../qruncom pi_10.com > qemu: SIGSEGV pc=3D0x001708a0 address=3D001708a0 w=3D1 oldset=3D0x0000000= 0 > unhandled cpu_exec return code (0xe) > EAX=3D00000000 EBX=3D00000000 ECX=3D000000ff EDX=3D00000600 > ESI=3D00000100 EDI=3D0000fffe EBP=3D00000900 ESP=3D0000fffc > EIP=3D00000100 EFL=3D00020202 [-------] CPL=3D3 II=3D0 A20=3D1 > ES =3D1000 00010000 0000ffff 00000000 > CS =3D1000 00010000 0000ffff 00000000 > SS =3D1000 00010000 0000ffff 00000000 > DS =3D1000 00010000 0000ffff 00000000 > FS =3D1000 00010000 0000ffff 00000000 > GS =3D1000 00010000 0000ffff 00000000 > LDT=3D0000 00000000 0000ffff 00008000 > TR =3D0000 00000000 0000ffff 00008000 > GDT=3D 00000000 0000ffff > IDT=3D 0016d850 000007ff > CR0=3D80010001 CR2=3D001708a0 CR3=3D00000000 CR4=3D00000000 >=20 > Pierre or Pablo can you send me a patch with your i386-user work, no > doubt that it can be more useful than my actual hack. >=20 > thanks >=20 > emmanuel >=20 > Le 22 ao=FBt 04, =E0 00:38, Pablo Bendersky a =E9crit : >=20 >=20 >=20 > > No, but I didn't ask much on the qemu-devel list, so probably that's > > why. I agree that a darwin-i386-user should be easier to achieve, as > > some linux syscalls and structs are different on Darwin. > > > > On Sat, 21 Aug 2004 23:41:44 +0200, Pierre d'Herbemont > > wrote: > >> Did you get any feedback from Fabrice about the (linux-)i386-user Mac > >> OS X Port? I remember him to be not so encouraging with this Port. For > >> my part I think it should be possible to have something working a lot > >> better, but I am not sure about the real difficulties. And a > >> darwin-i386-user would be probably easy to create. > >> > >> Fabrice could you give us a hint about what you think? > >> > >> Pierre. > >> > >> PS: I am CC-ing this thread to the qemu-devel and to Fabrice. > >> > >> Le 21 ao=FBt 04, =E0 22:36, Pablo Bendersky a =E9crit : > >> > >> > >> > >>> I got Pierre's patch and tried to extend it for more syscall > >>> emulation, but didn't got much further... I was able to run linux/x86 > >>> binary of ls (but it fails with ls -la, don't know why yet). > >>> I'm interested on moving forward with that, but not sure on how to > >>> continue. > >>> > >>> On Sat, 21 Aug 2004 22:29:00 +0200, Pierre d'Herbemont > >>> wrote: > >>>> Yes, I did. I got some very simple linux/x86 binary running (the > >>>> sha-1 > >>>> tool) on a Mac OS X host. Going deeper is more tricky since we have > >>>> to > >>>> emulate linux syscall and behaviour. Basically having qemu-user > >>>> running > >>>> on Mac OS X for Darwin/x86 binaries is having a mach-o loader, and > >>>> having the necessary call conversion. It is also a lot of work, but > >>>> it > >>>> is interesting. Then it would require Wine Darwin/x86 port, but that > >>>> one is much more easier. > >>>> > >>>> Pierre. > >>>> > >>>> Le 21 ao=FBt 04, =E0 21:15, Jim White a =E9crit : > >>>> > >>>> > >>>> > >>>>> I just noticed the bit on QEMU's home page about User Mode and how > >>>>> it > >>>>> can be used to run Linux targets like WINE. Seems to me like that > >>>>> could be a quick way to run X86 binaries. Has anyone looked into > >>>>> if/how this would work? > >>>>> > >>>>> http://fabrice.bellard.free.fr/qemu/ > >>>>> > >>>>> Jim > >>>>> > >>>>> > >>>>> > >>>>> ------------------------------------------------------- > >>>>> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank > >>>>> Media > >>>>> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > >>>>> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > >>>>> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >>>>> _______________________________________________ > >>>>> Darwine-devel mailing list > >>>>> Darwine-devel@lists.sourceforge.net > >>>>> https://lists.sourceforge.net/lists/listinfo/darwine-devel > >>>>> > >>>> > >>>> ------------------------------------------------------- > >>>> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank > >>>> Media > >>>> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > >>>> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > >>>> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >>>> _______________________________________________ > >>>> Darwine-devel mailing list > >>>> Darwine-devel@lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/darwine-devel > >>>> > >>> > >>> > >>> ------------------------------------------------------- > >>> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank > >>> Media > >>> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > >>> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > >>> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >>> _______________________________________________ > >>> Darwine-devel mailing list > >>> Darwine-devel@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/darwine-devel > >>> > >> > >> > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > _______________________________________________ > > Darwine-devel mailing list > > Darwine-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/darwine-devel > > >=20 > ------=_Part_18_7603886.1093200892598 Content-Type: text/plain; name="darwin-patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="darwin-patch.txt" ? patch ? qemu-mkcow ? vmdk2raw Index: Makefile.target =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/Makefile.target,v retrieving revision 1.39 diff -r1.39 Makefile.target 104a105,107 > ifdef CONFIG_DARWIN > LDFLAGS+=3D-W$(SRC_PATH)/ppc.ld > else 106a110 > endif Index: bswap.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/bswap.h,v retrieving revision 1.4 diff -r1.4 bswap.h 9a10,14 > #elif defined(__APPLE__) > #include > #define bswap_16(x) NXSwapShort(x) > #define bswap_32(x) NXSwapInt(x) > #define bswap_64(x) NXSwapLongLong(x) Index: cpu-exec.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/cpu-exec.c,v retrieving revision 1.38 diff -r1.38 cpu-exec.c 812c812 < int cpu_signal_handler(int host_signum, struct siginfo *info,=20 --- > int cpu_signal_handler(int host_signum, struct __siginfo *info,=20 906c906 < int cpu_signal_handler(int host_signum, struct siginfo *info,=20 --- > int cpu_signal_handler(int host_signum, struct __siginfo *info,=20 Index: dyngen-exec.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v retrieving revision 1.15 diff -r1.15 dyngen-exec.h 38,40d37 < typedef signed char int8_t; < typedef signed short int16_t; < typedef signed int int32_t; 59a57,60 > #ifdef __APPLE__ > /* stdin, stdout, stderr special declaration */ > #include > #else 60a62 > #endif Index: linux-user/ioctls.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/linux-user/ioctls.h,v retrieving revision 1.8 diff -r1.8 ioctls.h 2c2,5 <=20 --- > #ifdef __APPLE__ > #define TCGETS 0x5401 > =09IOCTL_STRANGE(TCGETS, TIOCGETA, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios= ))) > #else 6a10 > #endif 9a14,16 > #ifdef __APPLE__ > //=09 IOCTL_STRANGE(TCGETA, TIOCGETA, IOC_R, MK_PTR(TYPE_INT)) > #else 17a25 > #endif 28a37 > #ifndef __APPLE__ 31a41 > #endif 32a43 > #ifndef __APPLE__ 34a46 > #endif 35a48 > #ifndef __APPLE__ 36a50 > #endif 39a54 > #ifndef __APPLE__ 40a56,57 > #endif > #ifndef __APPLE__ 41a59,60 > #endif > #ifndef __APPLE__ 53c72,73 <=20 --- > #endif > #ifndef __APPLE__ 59c79,80 <=20 --- > #endif > #ifndef __APPLE__ 69a91 > #endif /* __APPLE__ */ 76a99 > #ifndef __APPLE__ 117c140,141 <=20 --- > #endif > #ifndef __APPLE__ 152c176 <=20 --- > #endif /* __APPLE__ */ 164a189 > #ifndef __APPLE__ 187a213 > #endif /* __APPLE__ */ 228a255 > #ifndef __APPLE__ 283c310,311 <=20 --- > #endif > #ifndef __APPLE__ 302a331 > #endif /* __APPLE__ */ \ No newline at end of file Index: linux-user/mmap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/linux-user/mmap.c,v retrieving revision 1.7 diff -r1.7 mmap.c 30c30,34 < //#define DEBUG_MMAP --- > #define DEBUG_MMAP >=20 > #if defined(__APPLE__) && defined(DEBUG_MMAP) > #define MAP_TYPE 0x0f > #endif // __APPLE__ && DEBUG_MMAP 126a131 > #ifndef __APPLE__ 127a133,135 > #else > if ((flags & MAP_SHARED) && > #endif 243a252 > #ifndef __APPLE__ 244a254,256 > #else > if ((flags & MAP_SHARED) && > #endif 370a383 > #ifndef __APPLE__ 372a386,389 > #else > =09munmap((void *)old_addr, old_size); > =09new_addr =3D mmap((void *)old_addr, new_size, prot, flags, NULL, 0); > #endif Index: linux-user/signal.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/linux-user/signal.c,v retrieving revision 1.23 diff -r1.23 signal.c 38c38 < //#define DEBUG_SIGNAL --- > #define DEBUG_SIGNAL 95a96 > #ifdef SIGPWR 96a98 > #endif 206a209 > #ifndef __APPLE__ 223a227,229 > #else > =09printf("host_to_target_siginfo_noswap not supprted\n"); > #endif 256a263 > #ifndef __APPLE__ 263a271,273 > #else > =09printf("target_to_host_siginfo not supported\n"); > #endif Index: linux-user/syscall.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v retrieving revision 1.50 diff -r1.50 syscall.c 20d19 < #include 21a21 > #include 24a25 > #ifndef __APPLE__ 25a27 > #endif 36a39 > #ifndef __APPLE__ 37a41 > #endif 40d43 < #include 46c49 < #include --- > //#include 47a51,67 > #include > #include > #include > #include > #include > #include > #include > //#include > #include > #include >=20 > #ifdef __APPLE__ > #include > #endif // __APPLE__ >=20 > #include > #include 57c77,81 <=20 --- > #ifdef __APPLE__ > #include > #include > #endif > #ifndef __APPLE__ 65a90,92 > #else > #include > #endif 69c96,107 < //#define DEBUG --- > // #define DEBUG >=20 > #ifdef __APPLE__ > #define sys_uname uname > #define sys_statfs statfs > #define sys_fstatfs fstatfs > #define sys_getcwd1 getcwd > #define sys_rt_sigqueueinfo rt_sigqueueinfo > #endif > #ifndef CMSG_ALIGN > #define CMSG_ALIGN(n)=09=09(((n) + 3) & ~3) > #endif 140a179,182 > #ifdef __APPLE__ > #define __sc_loadargs_0(name, dummy...)=09=09=09=09=09\ > =09__sc_0 =3D SYS_##name > #elif __linux__ 142a185 > #endif 202a246 > #ifdef __linux__ 221a266,268 > #endif /* __linux__ */ >=20 > #ifdef __linux__ 233a281,284 > #elif defined(__APPLE__) > //_syscall2(int,statfs,const char *,path,struct kernel_statfs *,buf) > //_syscall2(int,fstatfs,int,fd,struct kernel_statfs *,buf) > #endif /* __linux__ */ 242a294 > #ifndef __APPLE__ 243a296 > #endif 272c325,330 <=20 --- > =09 > // PGB > #ifdef DEBUG > =09gemu_log(" new_brk 0x%x, target_original_brk 0x%x\n", new_brk, target_= original_brk); > #endif // DEBUG > =09 287a346 > #if !defined(__APPLE__) 290a350,354 > #else > mapped_addr =3D get_errno(target_mmap((unsigned long)brk_page, new_al= loc_size,=20 > PROT_READ|PROT_WRITE, > MAP_ANON|MAP_FIXED|MAP_PRIVATE, -= 1, 0)); > #endif // __APPLE__ 535a600 > #ifndef __APPLE__ 601a667,670 > #else > =09gemu_log("do_setsockopt not yet supported\n"); > return -ENOSYS; > #endif 614a684 > #ifdef SO_PEERCRED 615a686,687 > #endif > #ifdef SO_PEERNAME 616a689 > #endif 949a1023 > #ifdef SHM_LOCK 950a1025,1026 > #endif > #ifdef SHM_LOCK 951a1028,1029 > #endif >=20 1000a1079,1080 > #define IOCTL_STRANGE(target_cmd, host_cmd, access, types...) \ > { TARGET_ ## target_cmd, host_cmd, #host_cmd, access, { types } }, 1024c1104 < gemu_log("ioctl: cmd=3D0x%04lx (%s)\n", cmd, ie->name); --- > gemu_log("ioctl: cmd=3D0x%04lx (%s) arg_type[0]:0x%x\n", cmd, ie->nam= e, arg_type[0]); 1067a1148 > #ifdef IGNBRK 1068a1150,1151 > #endif > #ifdef BRKINT 1069a1153,1154 > #endif > #ifdef IGNPAR 1070a1156,1157 > #endif > #ifdef PARMRK 1071a1159,1160 > #endif > #ifdef INPCK 1072a1162,1163 > #endif > #ifdef ISTRIP 1073a1165,1166 > #endif > #ifdef INLCR 1074a1168,1169 > #endif > #ifdef IGNCR 1075a1171,1172 > #endif > #ifdef ICRNL 1076a1174,1175 > #endif > #ifdef IUCLC 1077a1177,1178 > #endif > #ifdef IXON 1078a1180,1181 > #endif > #ifdef IXANY 1079a1183,1184 > #endif > #ifdef IXOFF 1080a1186,1187 > #endif > #ifdef IMAXBEL 1081a1189 > #endif 1085a1194 > #ifdef OPOST 1086a1196,1197 > #endif > #ifdef OLCUC 1087a1199,1200 > #endif > #ifdef OLCUC 1088a1202,1203 > #endif > #ifdef OCRNL 1089a1205,1206 > #endif > #ifdef ONOCR 1090a1208,1209 > #endif > #ifdef ONLRET 1091a1211,1212 > #endif > #ifdef OFILL 1092a1214,1215 > #endif > #ifdef OFDEL 1093a1217,1218 > #endif > #ifdef NL0 1094a1220,1221 > #endif > #ifdef NL1 1095a1223,1224 > #endif > #ifdef CR0 1096a1226,1227 > #endif > #ifdef CR1 1097a1229,1230 > #endif > #ifdef CR2 1098a1232,1233 > #endif > #ifdef CR3 1099a1235,1236 > #endif > #ifdef TAB0 1100a1238,1239 > #endif > #ifdef TAB1 1101a1241,1242 > #endif > #ifdef TAB2 1102a1244,1245 > #endif > #ifdef TAB3 1103a1247,1248 > #endif > #ifdef BS0 1104a1250,1251 > #endif > #ifdef BS1 1105a1253,1254 > #endif > #ifdef VT0 1106a1256,1257 > #endif > #ifdef VT1 1107a1259,1260 > #endif > #ifdef FF0 1108a1262,1263 > #endif > #ifdef FF1 1109a1265 > #endif 1113a1270 > #ifdef CBAUD 1133a1291 > #endif 1150a1309 > #ifdef XCASE 1151a1311 > #endif 1179a1340 > #ifndef __APPLE__ 1180a1342 > #endif 1188,1189c1350,1353 < host->c_cc[VMIN] =3D target->c_cc[TARGET_VMIN]; =20 < host->c_cc[VSWTC] =3D target->c_cc[TARGET_VSWTC];=20 --- > host->c_cc[VMIN] =3D target->c_cc[TARGET_VMIN]; > #ifdef VSWTC > host->c_cc[VSWTC] =3D target->c_cc[TARGET_VSWTC]; > #endif 1213a1378 > #ifndef __APPLE__ 1215c1380,1381 < =20 --- > #endif >=20 1222a1389 > #ifdef VSWTC 1223a1391 > #endif 1245a1414 > #ifdef MAP_GROWSDOWN 1246a1416,1417 > #endif > #ifdef MAP_DENYWRITE 1247a1419,1420 > #endif > #ifdef MAP_EXECUTABLE 1248a1422,1423 > #endif > #ifdef MAP_LOCKED 1249a1425 > #endif 1261a1438 > #ifdef O_SYNC 1262a1440 > #endif 1263a1442 > #ifdef O_DIRECTORY 1264a1444 > #endif 1405a1586 > #ifndef __APPLE__ 1458a1640,1643 > #else > =09printf("do_fork not supported\n"); > =09return -EINVAL; > #endif 1707a1893 > #ifndef __APPLE__ 1710a1897,1898 > #endif > #ifndef __APPLE__ 1718a1907 > #endif 1815a2005 > #ifndef __APPLE__ 1818a2009 > #endif 1898a2090 > #ifndef __APPLE__ 1910a2103 > #endif 2009a2203 > #ifndef __APPLE__ 2032a2227,2228 > #endif > #ifndef __APPLE__ 2039a2236 > #endif 2127a2325 > #ifndef __APPLE__ 2130a2329 > #endif 2280a2480 >=20 2283a2484 >=20 2293c2494,2498 < #if defined(TARGET_PPC) --- > #if defined(__APPLE__) > target_st->st_mode =3D tswap16(st.st_mode); /* XXX: check= this */ > target_st->st_uid =3D tswap32(st.st_uid); > target_st->st_gid =3D tswap32(st.st_gid); > #elif defined(TARGET_PPC) 2320a2526 > #ifndef __APPLE__ 2323a2530 > #endif 2347a2555 > #ifndef __APPLE__ 2350a2559,2560 > #endif > #ifndef __APPLE__ 2374a2585 > #endif 2425a2637 > //#ifndef __APPLE__ 2427c2639 < ret =3D get_errno(personality(arg1)); --- > ret =3D 0;//get_errno(personality(arg1)); 2428a2641 > //#endif 2430a2644 > //#ifndef __APPLE__ 2433c2647,2651 < #if defined (__x86_64__) --- > #if defined (__APPLE__) > ret =3D get_errno(lseek(arg1, ((uint64_t)arg2 << 32) | arg3, = \ > arg5)); > *(int64_t *)arg4 =3D tswap64(ret); > #elif defined (__x86_64__) 2435c2653 < *(int64_t *)arg4 =3D ret; --- > *(int64_t *)arg4 =3D tswap64(ret); 2442a2661 > //#endif 2444c2663,2703 < #if TARGET_LONG_SIZE !=3D 4 --- > #if defined (__APPLE__) > { > struct target_dirent *target_de =3D (void *)arg2; > unsigned short target_reclen; > struct dirent *de; > struct dirent *buffer; > long count =3D arg3; > int ret2 =3D 0; > long basep =3D 0; >=20 > buffer =3D (struct dirent *) malloc(count); > if (!buffer) > return -ENOMEM; >=20 > ret =3D get_errno(getdirentries(arg1, buffer, count, &basep))= ; > =20 > if (!is_error(ret)) { > de =3D (struct dirent *) buffer; > while (ret > 0 && de->d_reclen > 0) { > target_de->d_ino =3D tswapl(de->d_fileno); > target_de->d_off =3D 0; > target_reclen =3D sizeof(target_de->d_ino) + \ > sizeof(target_de->d_off) + \ > sizeof(target_de->d_reclen) + \ > strlen(de->d_name) +1; > target_de->d_reclen =3D tswap16(target_reclen); > strcpy(target_de->d_name, de->d_name); > =20 > ret -=3D de->d_reclen; > ret2 +=3D target_reclen; > =20 > ((char *) de) +=3D de->d_reclen; > ((char *) target_de) +=3D target_reclen; > } > =20 > ret =3D ret2; > } > =20 > free(buffer); > } > #elif TARGET_LONG_SIZE !=3D 4 2510a2770 > #ifndef __APPLE__ 2535a2796 > #endif 2598a2860 > #ifndef __APPLE__ 2601a2864 > #endif 2603a2867 > #ifndef __APPLE__ 2611a2876,2877 > #endif > #ifndef __APPLE__ 2621a2888,2889 > #endif > #ifndef __APPLE__ 2629a2898,2899 > #endif > #ifndef __APPLE__ 2632a2903 > #endif 2641a2913 > #ifndef __APPLE__ 2652a2925 > #endif 2700a2974 > #ifndef __APPLE__ 2703a2978 > #endif 2755a3031 > #ifndef __APPLE__ 2758a3035 > #endif 2807a3085 > #ifndef __APPLE__ 2814a3093,3094 > #endif > #ifndef __APPLE__ 2827a3108,3109 > #endif > #ifndef __APPLE__ 2834a3117,3118 > #endif > #ifndef __APPLE__ 2847a3132 > #endif 2856a3142 > #ifndef __APPLE__ 2859a3146,3147 > #endif > #ifndef __APPLE__ 2862a3151 > #endif 2864c3153 <=20 --- > #ifndef __APPLE__ 2867a3157 > #endif 2892a3183 > #ifndef __APPLE__ 2895a3187,3188 > #endif > #ifndef __APPLE__ 2906a3200,3201 > #endif > #ifndef __APPLE__ 2909a3205,3206 > #endif > #ifndef __APPLE__ 2920a3218 > #endif 2929a3228 > #ifndef __APPLE__ 2932a3232,3233 > #endif > #ifndef __APPLE__ 2935a3237 > #endif 2947a3250 > #ifndef __APPLE__ 2979a3283 > #endif /* APPLE */ 2989a3294 > #ifndef __APPLE__ 2992a3298 > #endif Index: target-i386/cpu.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/target-i386/cpu.h,v retrieving revision 1.18 diff -r1.18 cpu.h 444,445c444,445 < struct siginfo; < int cpu_x86_signal_handler(int host_signum, struct siginfo *info,=20 --- > struct __siginfo; > int cpu_x86_signal_handler(int host_signum, struct __siginfo *info,=20 446a447 >=20 Index: target-ppc/helper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/target-ppc/helper.c,v retrieving revision 1.15 diff -r1.15 helper.c 29a30 >=20 Index: target-ppc/op_helper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v retrieving revision 1.8 diff -r1.8 op_helper.c 466a467 >=20 ------=_Part_18_7603886.1093200892598--