With a -mno-cygwin compile %llu and %lld are definitely not understood
by scanf and printf, although they are by the compiler. In stead, %I64u
seems to work. Put it in under control of a switch USE_I64, which is
defined only in the gcc makefile when MINGW is used.
#else
/* place holder
* or dummy types for other compiler
+ * [HGM] seems that -mno-cygwin comple needs %I64?
*/
#define u64 unsigned long long
#define s64 signed long long
- #define u64Display "%llu"
- #define s64Display "%lld"
+ #ifdef USE_I64
+ #define u64Display "%I64u"
+ #define s64Display "%I64d"
+ #else
+ #define u64Display "%llu"
+ #define s64Display "%lld"
+ #endif
#define u64Const(c) (c ## ULL)
#define s64Const(c) (c ## LL)
#endif
\r
# set up for cygwin or not\r
ifeq ($(USE_MINGW),1)\r
-CFCYG = -mno-cygwin\r
+CFCYG = -mno-cygwin -DUSE_I64\r
LFCYG = -mno-cygwin -lmsvcrt\r
endif\r
\r