Fix build with gcc 4.7 #1126

pull drizzt wants to merge 1 commits into bitcoin:master from drizzt:master changing 2 files +2 −0
  1. drizzt commented at 11:56 pm on April 19, 2012: contributor
    memset needs cstring and sprintf needs cstdio
  2. luke-jr commented at 0:02 am on April 20, 2012: member
    Is there a reason to use these instead of the standard string.h (memset) and stdio.h (sprintf)?
  3. jgarzik commented at 0:49 am on April 20, 2012: contributor

    I admit I’m unclear on the advantages of cstring/cstdio over the normal header.

    The bitcoin codebase does currently prefer the C variant ("#include <stdio.h>").

  4. laanwj commented at 5:30 am on April 20, 2012: member

    cstdio and such are more canonical c++.

    The actual difference is that stdio.h puts the symbols in the global namespace and cstdio puts them in std (http://stackoverflow.com/questions/7596406/stdio-h-not-standard-in-c).

    All in all, it doesn’t make much difference. But we should not mix them.

  5. drizzt commented at 10:48 am on April 20, 2012: contributor
    ok, I’ll change my pull request
  6. Add missing includes. (Fix bulding under GCC 4.7) 9553c35d89
  7. luke-jr commented at 3:35 pm on April 20, 2012: member
    Does this actually fix the GCC 4.7 build (without -fpermissive)?
  8. drizzt commented at 4:21 pm on April 20, 2012: contributor
    Yes. A log is better than 1000 words: http://paste.pocoo.org/show/584719/
  9. sipa commented at 9:07 pm on April 21, 2012: member
    ACK
  10. jgarzik commented at 10:12 pm on April 21, 2012: contributor
    ACK
  11. sipa referenced this in commit 6a7a42be16 on Apr 21, 2012
  12. sipa merged this on Apr 21, 2012
  13. sipa closed this on Apr 21, 2012

  14. coblee referenced this in commit e02f161f44 on Jul 17, 2012
  15. suprnurd referenced this in commit a4dfcae8f9 on Dec 5, 2017
  16. lateminer referenced this in commit 3abaeeb5b0 on Jan 22, 2019
  17. lateminer referenced this in commit c910490c53 on Dec 25, 2019
  18. 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: 2024-10-06 22:12 UTC

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