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

Macro redefinition of printf integer formats for VS2015

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: 1.7.0
    • Component/s: libbson
    • Environment:
      Windows 7, Visual Studio 2015

      I notice the following build warnings when compiling the PHPC 1.3.0 for PHP 7.x in Visual Studio 2015 (x64 and x86):

      c:\php-sdk\phpdev\vc14\x64\pecl\mongodb\src\libbson\src\bson\bson-compat.h(115): warning C4005: 'PRIi32': macro redefinition
      C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(130): note: see previous definition of 'PRIi32'
      c:\php-sdk\phpdev\vc14\x64\pecl\mongodb\src\libbson\src\bson\bson-compat.h(118): warning C4005: 'PRIi64': macro redefinition
      C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(131): note: see previous definition of 'PRIi64'
      c:\php-sdk\phpdev\vc14\x64\pecl\mongodb\src\libbson\src\bson\bson-compat.h(119): warning C4005: 'PRId64': macro redefinition
      C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(112): note: see previous definition of 'PRId64'
      c:\php-sdk\phpdev\vc14\x64\pecl\mongodb\src\libbson\src\bson\bson-compat.h(120): warning C4005: 'PRIu64': macro redefinition
      C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(169): note: see previous definition of 'PRIu64'
      

      Would it be best to wrap these definitions in conditionals?

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: