[CDRIVER-2245] Macro redefinition of printf integer formats for VS2015 Created: 14/Aug/17 Updated: 28/Oct/23 Resolved: 12/Oct/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson |
| Affects Version/s: | 1.7.0 |
| Fix Version/s: | 1.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7, Visual Studio 2015 |
||
| Issue Links: |
|
||||||||||||
| Epic Link: | mongoc-toolchain | ||||||||||||
| Description |
|
I notice the following build warnings when compiling the PHPC 1.3.0 for PHP 7.x in Visual Studio 2015 (x64 and x86):
Would it be best to wrap these definitions in conditionals? |
| Comments |
| Comment by Scott Willis [ 27/Oct/20 ] |
|
Hi @Kevin Albertson I think there may be some confusion between inttypes.h and stdint.h. The bson-compat.h I see #includes <stdint.h> but not <inttypes.h>. In the Microsoft Windows dev kits, the PRI symbols are defined in <inttypes.h>. |
| Comment by Kevin Albertson [ 27/Oct/20 ] |
|
Hi scottw@attinc.com, thank you for bringing that to our attention. I filed a new ticket, |
| Comment by Scott Willis [ 26/Oct/20 ] |
|
Some of the constants defined in bson-compat.h overlap those #defined in inttypes.h. Wrapping them in conditionals in bson-compat.h helps, however you will still get errors if bson.h (which #includes bson-compat.h) is #included before inttypes.h. This is because inttypes.h will not yet have #defined the constants, so bson-compat.h will #define them, then (if #included) inttypes.h will #define them again. |
| Comment by Githook User [ 12/Oct/17 ] |
|
Author: {'email': 'kevin.eric.albertson@gmail.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: Merge pull request #204 from kevinAlbs/cdriver2245
|
| Comment by Githook User [ 12/Oct/17 ] |
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: |