From: Andreas Schwab <schwab@suse.de>
To: sol10x86@cox.net
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Comment for Solaris fix for the HPTC
Date: Sun, 16 Sep 2007 18:35:38 +0200 [thread overview]
Message-ID: <jemyvmfu05.fsf@sykes.suse.de> (raw)
In-Reply-To: <26700091.1189955481400.JavaMail.root@eastrmwml11> (Ben Taylor's message of "Sun\, 16 Sep 2007 11\:11\:21 -0400")
Ben Taylor <sol10x86@cox.net> writes:
> ---- Johannes Schindelin <Johannes.Schindelin@gmx.de> 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 18446744073709551615UL
>> > +#endif
>> > +
>>
>> These constants are always defined, right? So why not "#ifndef
>> ULONG_LONG_MAX"?
>
> I fear I may not have explained this well.
>
> On the Solaris systems I have access to, I find no system include file
> that defines "ULONG_LONG_MAX".
>
> There are defines for ULONG_MAX which is equivilent to the value that
> ULONG_LONG_MAX is, but only when the system is being compiled on
> an "_LP64" (ie x86_64) system. When the system is 32-bit, ULONG_MAX
> defaults to a typical max value for a 32-bit unsigned int.
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 use
UINT64_MAX.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2007-09-16 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-16 15:11 [Qemu-devel] Comment for Solaris fix for the HPTC Ben Taylor
2007-09-16 16:35 ` Andreas Schwab [this message]
2007-09-16 17:18 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2007-09-17 9:12 Juergen Keil
2007-09-15 21:53 Ben Taylor
2007-09-15 22:23 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jemyvmfu05.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=sol10x86@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.