qemu compile fix
Hi,
this is needed to make qemu compile with gcc 3.3, plus a fix for shift width >= type width.
It still doesn't work for me on Alpha for nontrivial programs, I think there's a problem with larger heap allocations, e. g.:
falk@juist:/src/qemu% ./i386/qemu /src/qemu.works3/tests/prime2 400000 There are 33860 prime numbers less than 400000 falk@juist:/src/qemu% ./i386/qemu /src/qemu.works3/tests/prime2 800000
qemu: uncaught target signal 11 (Segmentation fault) - exiting
prime2 just does a sieve and allocates n*4 bytes...
Signature · 1 line
Falk
? ChangeLog
? arm
? config-host.h
? config-host.mak
? dyngen
? i386
? i386-softmmu
? qemu-doc.html
? vlmkcow
Index: signal.c
===================================================================
RCS file: /cvsroot/qemu/qemu/signal.c,v
retrieving revision 1.17
signal.c +1 -1
@@ -152,7 +152,7 @@ void target_to_host_sigset(sigset_t *d, ((unsigned long *)d)[i] = tswapl(s->sig[i]); }#elif TARGET_LONG_BITS == 32 && HOST_LONG_BITS == 64 && TARGET_NSIG_WORDS == 2 - ((unsigned long *)d)[0 ] = sigmask | (tswapl (s->sig[1 ]) <<32 ); + ((unsigned long *)d)[0 ] = sigmask | ((unsigned long )tswapl (s->sig[1 ]) <<32 );#else #error target_to_host_sigset#endif /* TARGET_LONG_BITS */
Index: vl.h
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.h,v
retrieving revision 1.3
vl.h +1 -1
@@ -60,7 +60,7 @@ int bdrv_commit(BlockDriverState *bs);struct cow_header_v2 {uint32_t magic; -uint32_t long version; +uint32_t version;char backing_file[1024 ];int32_t mtime;uint64_t size;