Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1368

libbson fprintf PRI specifiers for visual studio 2013

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.6.0
    • Affects Version/s: 1.3.5
    • Component/s: libbson
    • None
    • Environment:
      Windows 64bit
      Visual studio 2013

      Character string literals for the fprintf() and fwprintf() family of functions (PRIxxx) are declared differently in bson-compat.h and in inttypes.h.

      bson-compat.h

      1. define PRIi32 "d"
      2. define PRId32 "d"
      3. define PRIu32 "u"
      4. define PRIi64 "I64i"
      5. define PRId64 "I64i"
      6. define PRIu64 "I64u"

      inttypes.h

      #define _PFX_8 "hh"
      #define _PFX_16 "h"
      #define _PFX_32 "l"
      #define _PFX_64 "ll"

      #define PRIi32 _PFX_32 "i"
      #define PRId32 _PFX_32 "d"
      #define PRIu32 _PFX_32 "u"
      #define PRIi64 _PFX_64 "i"
      #define PRId64 _PFX_64 "d"
      #define PRIu64 _PFX_64 "u"

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            Mansuro Almansour Belleh Blanco [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: