h.g. muller wrote:
That can be done. But if you do that, then in makefile.ms, you must
always -DUSE_I64.
That case would already be covered because the _MSC_VER switch is set
there, not?
because then you would also need other basic type names and constant
suffixes for
the long data types. So I was thinking about a structure like
#ifdef _WIN32
#ifdef _MSC_VER
//define MSCtypes
#define u64Display "%I64u"
#else
//define standard C types
#ifdef USE_I64
#define u64Display "%I64u"
#else
#define u64Display "%llu"
#endif
#else
//define standard C types
#define u64Display "%llu"
#endif
(where only the innermost #ifdef is new).
No. You do not want to check against _MSC_VER for the format
specification. What matters is linking against the msvcrt, not the
compiler used. You *could* check the _MSC_VER in order to prefer "%lld"
when you know you'll be linking with non-buggy versions. But since they
are back-compatible to support the %I64 syntax, it isn't necessary.
You DO want to check against _MSC_VER for the data type itself. When
using MS compilers, it needs to be __int64 of some flavor, and long long
for non-MS compilers. Linking with the msvcrt is irrelevant for the
data type itself.
_______________________________________________
Bug-XBoard mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-xboard