fix Windows redefinition warning in compat.h #3321

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:redef_warn changing 1 files +2 −0
  1. Diapolo commented at 3:21 PM on November 27, 2013: none
    • also remove compat.h include from net.h as it comes from netbase.h (which is needed as base for net.h anyway)
  2. in src/compat.h:None in 93cfe9c26c outdated
      10 | @@ -11,7 +11,10 @@
      11 |  #undef _WIN32_WINNT
      12 |  #endif
      13 |  #define _WIN32_WINNT 0x0501
      14 | +#ifdef WIN32_LEAN_AND_MEAN
    


    laanwj commented at 5:25 PM on November 27, 2013:

    Why do you put an #ifdef around here? Now it's only defined if it was already defined, that's a bit pointless isn't it?


    Diapolo commented at 5:30 PM on November 27, 2013:

    Because I only want to #undef it, if it has been defined before?


    laanwj commented at 6:10 PM on November 27, 2013:

    Then why not:

    #ifndef WIN32_LEAN_AND_MEAN
    #define WIN32_LEAN_AND_MEAN 1
    #endif
    

    Diapolo commented at 6:20 PM on November 27, 2013:

    Good idea... and updated :).

  3. sipa commented at 7:18 PM on November 27, 2013: member

    NAK the "also remove compat.h"; net.h directly uses compat.h.

  4. prevent Windows redefinition warning cause by compat.h 0078841617
  5. BitcoinPullTester commented at 8:58 PM on November 27, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/00788416176a6f143e7a6484402d0ef8dd73f292 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.

  6. sipa commented at 9:09 PM on November 27, 2013: member

    ACK

  7. laanwj referenced this in commit 4ae42d43a4 on Nov 28, 2013
  8. laanwj merged this on Nov 28, 2013
  9. laanwj closed this on Nov 28, 2013

  10. Diapolo deleted the branch on Dec 1, 2013
  11. Bushstar referenced this in commit a9560655b3 on Apr 8, 2020
  12. Bushstar referenced this in commit 672e18e48f on Apr 8, 2020
  13. 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-21 18:16 UTC

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