Don't use PRI?64 formatting derives from inttypes.h #3729

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_02_no_inttypes changing 9 files +19 −19
  1. laanwj commented at 8:53 AM on February 22, 2014: member

    As the tinyformat-based formatting system (introduced in b77dfdc) is type-safe, no special format characters are needed to specify sizes.

    Tinyformat can support (ignore) the C99 prefixes such as "ll" but chokes on mingw's inttypes.h prefixes such as "I64X". So don't include inttypes.h and define our own for compatibility. This also further reduces C99 dependency and platform variability.

    (a possibly better alternative would be to sweep the entire codebase using sed -i to get rid of the special size specifiers but this has less diff impact)

    Tested by strprintf numbers test: https://github.com/bitcoin/bitcoin/blob/master/src/test/util_tests.cpp#L310

    Fixes an issue in getpeerinfo on Windows noticed on the mailing list by Ronald Hoffman.

  2. laanwj added this to the milestone 0.9.0 on Feb 22, 2014
  3. Don't use PRIx64 formatting derives from inttypes.h
    As the tinyformat-based formatting system (introduced in b77dfdc) is
    type-safe, no special format characters are needed to specify sizes.
    
    Tinyformat can support (ignore) the C99 prefixes such as "ll" but
    chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't
    include inttypes.h and define our own for compatibility.
    
    (an alternative would be to sweep the entire codebase using sed -i to
    get rid of the size specifiers but this has less diff impact)
    d5f1e727a8
  4. BitcoinPullTester commented at 11:32 AM on February 22, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/d5f1e727a8896eec237acbbe4023685eb6b74881 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  5. ScripterRon commented at 4:08 PM on February 22, 2014: none

    This fixes the problem I was experiencing with getpeerinfo.

  6. sipa commented at 10:28 PM on February 22, 2014: member

    ACK

  7. laanwj referenced this in commit 4fd082ded7 on Feb 23, 2014
  8. laanwj merged this on Feb 23, 2014
  9. laanwj closed this on Feb 23, 2014

  10. laanwj referenced this in commit f48742c2bf on Mar 27, 2014
  11. laanwj deleted the branch on Apr 9, 2014
  12. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me