bug-gnulib
[Top][All Lists]
Advanced

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

*printf: support for 'long long' on mingw


From: Bruno Haible
Subject: *printf: support for 'long long' on mingw
Date: Fri, 18 May 2007 19:34:55 +0200
User-agent: KMail/1.5.4

On mingw, the native printf does not support directives like "%lld". This
works around it.

2007-05-18  Bruno Haible  <address@hidden>

        * lib/vasnprintf.m4 (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
        for printing 64-bit integers. Needed for mingw.

*** lib/vasnprintf.c    6 May 2007 23:02:10 -0000       1.42
--- lib/vasnprintf.c    18 May 2007 17:31:05 -0000
***************
*** 1088,1095 ****
--- 1088,1102 ----
  #if HAVE_LONG_LONG_INT
                  case TYPE_LONGLONGINT:
                  case TYPE_ULONGLONGINT:
+ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+                   *fbp++ = 'I';
+                   *fbp++ = '6';
+                   *fbp++ = '4';
+                   break;
+ # else
                    *fbp++ = 'l';
                    /*FALLTHROUGH*/
+ # endif
  #endif
                  case TYPE_LONGINT:
                  case TYPE_ULONGINT:





reply via email to

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