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.



_______________________________________________
Bug-XBoard mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-xboard

Reply via email to