Re: [Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-17 Thread Juergen Keil
Andreas Schwab wrote: Your reference to ULONG_MAX is a red herring. ULONG_MAX is the limit for unsigned long, and ULONG_LONG_MAX is the limit for unsigned long long. If your compiler does not support the long long type then ULONG_LONG_MAX should not be defined either. Instead, vl.c should

Re: [Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-16 Thread Ben Taylor
Johannes Schindelin [EMAIL PROTECTED] wrote: Hi Ben, On Sat, 15 Sep 2007, Ben Taylor wrote: +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX

Re: [Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-16 Thread Andreas Schwab
Ben Taylor [EMAIL PROTECTED] writes: Johannes Schindelin [EMAIL PROTECTED] wrote: Hi Ben, On Sat, 15 Sep 2007, Ben Taylor wrote: +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */

Re: [Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-16 Thread Johannes Schindelin
Hi, On Sun, 16 Sep 2007, Ben Taylor wrote: Johannes Schindelin [EMAIL PROTECTED] wrote: On Sat, 15 Sep 2007, Ben Taylor wrote: +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */

[Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-15 Thread Ben Taylor
Compiling the latest CVS code, I found that a function in vl.c uses a define called ULONG_LONG_MAX. The value is defined in solaris's sys/types.h, but only on _LP64 builds, so 32-bit builds won't pickup if I redefine it as ULONG_MAX. I'm looking for comments on this patch. --- qemu.ORIG/vl.h

Re: [Qemu-devel] Comment for Solaris fix for the HPTC

2007-09-15 Thread Johannes Schindelin
Hi Ben, On Sat, 15 Sep 2007, Ben Taylor wrote: +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX 18446744073709551615UL +#endif + These constants are always defined,