bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] We distribute wrongly compiled WinBoard binaries


From: Eric Mullins
Subject: Re: [Bug-XBoard] We distribute wrongly compiled WinBoard binaries
Date: Wed, 03 Feb 2010 09:57:02 -0700
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Eric Mullins wrote:
I explained the problem already.  Fix it however you wish.
After some coffee, I wasn't so irritated.  Here's what I would do:

/* unsigned int 64 for engine nodes work and display */
#if defined(_MSC_VER)
   #define u64 unsigned __int64
   #define s64 signed __int64
   #define u64Const(c) (c ## UI64)
   #define s64Const(c) (c ## I64)
#else
   #define u64 unsigned long long
   #define s64 signed long long
   #define u64Const(c) (c ## ull)
   #define s64Const(c) (c ## ll)
#endif

/* format specification for u64 & s64 -- depends on the C runtime we're using */
#ifdef _WIN32
   // assume all windows links with msvcrt which can't handle %lld
   #define u64Display "%I64u"
   #define s64Display "%I64d"
#else
   #define u64Display "%llu"
   #define s64Display "%lld"
#endif


You could isolate by compiler when doing the format specification, so checking _MSC_VER wouldn't be wrong necessarily.

I don't know where intel (__INTEL_COMPILER) belongs in here, and I don't currently have it installed. But other compilers like borland probably handle the type and the format specification correctly. gcc (__GNUC__) always needs "long long", but on windows must still use %I64 because it links with the msvcrt.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]