[Top][All Lists]

[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: Tue, 02 Feb 2010 11:32:13 -0700
User-agent: Thunderbird (Windows/20090812)

Tim Mann wrote:
That's odd; I thought %I64 was only used by the Microsoft C library.
Maybe with -mno-cygwin, gcc is linking scanf to a version from the
Microsoft runtime library?

That is exactly the problem. You want to use %I64u/%I64d when linking with msvcrt, otherwise %llu/%lld. Later versions such as msvcr70.dll work correctly with the %lld syntax, but using -mno-cygwin causes linkage with msvcrt.dll (version 6) which requires %I64 syntax. The data types themselves still must check _MSC_VER, but you can't check that for determining the proper u64Display setting.

There's no easy way to determine this either. The real issue is linking against msvcrt, and I don't know a reliable way to be sure. I find it best to check against _WIN32 and use %I64 in that case. That would probably break for borland or watcom or other compilers, but it will succeed for gcc in or out of windows, and for ms compilers.

reply via email to

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