Remove obsolete _MSC_VER check #10642

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:undefined-msc-ver changing 1 files +0 −2
  1. practicalswift commented at 11:22 AM on June 21, 2017: contributor

    Prior to this commit the _MSC_VER macro was being used regardless of being defined due to a misplaced #endif.

  2. fanquake added the label Windows on Jun 21, 2017
  3. laanwj commented at 11:27 AM on June 21, 2017: member

    Thanks. However I investigated and we can remove this check completely:

  4. practicalswift commented at 11:56 AM on June 21, 2017: contributor

    @laanwj Thanks for the clarification! If I understand it correctly the new diff should be:

    diff --git a/src/init.cpp b/src/init.cpp
    index ed76953..e213958 100644
    --- a/src/init.cpp
    +++ b/src/init.cpp
    @@ -844,8 +844,6 @@ bool AppInitBasicSetup()
         // Turn off Microsoft heap dump noise
         _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
         _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
    -#endif
    -#if _MSC_VER >= 1400
         // Disable confusing "helpful" text message on abort, Ctrl-C
         _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
     #endif
    

    In other words keeping the #ifdef _MSC_VER but removing the #if _MSC_VER >= 1400. Looks correct? :-)

  5. laanwj commented at 12:24 PM on June 21, 2017: member

    Yes, indeed. That retains the behavior to not do any of that stuff for non-MSVC compilers (e.g. mingw). (which I think is the intent? that code is ancient)

  6. Remove obsolete _MSC_VER check
    * MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005)
    * C++11 is supported since MSVC 2010
    * Compiling without C++11 support is no longer possible
    700d8d85bd
  7. practicalswift force-pushed on Jun 21, 2017
  8. practicalswift renamed this:
    Use the _MSC_VER macro only if it is defined
    Remove obsolete _MSC_VER check
    on Jun 21, 2017
  9. practicalswift commented at 12:35 PM on June 21, 2017: contributor

    @laanwj Updated accordingly :-)

  10. practicalswift commented at 1:21 PM on June 21, 2017: contributor

    Travis fails at p2p-segwit.py in one of the seven triggered builds. Seems totally unrelated. Non-determinism?

    Failed test:

    2017-06-21 12:40:32.262000 TestFramework (INFO): Testing detection of non-standard P2WSH witness
    2017-06-21 12:40:33.627000 TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 152, in main
        self.run_test()
      File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/p2p-segwit.py", line 1945, in run_test
        self.test_non_standard_witness()
      File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/p2p-segwit.py", line 1822, in test_non_standard_witness
        self.std_node.test_transaction_acceptance(p2wsh_txs[0], True, False, b'bad-witness-nonstandard')
      File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/p2p-segwit.py", line 81, in test_transaction_acceptance
        assert_equal(self.last_message["reject"].reason, reason)
      File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/util.py", line 418, in assert_equal
        raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
    AssertionError: not(b'bad-txns-vout-negative' == b'bad-witness-nonstandard')
    
  11. laanwj commented at 3:21 PM on June 21, 2017: member

    Not sure if it's worrying but that must be unrelated. I've restarted the travis build.

  12. theuni commented at 3:52 PM on June 21, 2017: member

    Test failure caused by attempting to spend a negative value in p2p_segwit: https://travis-ci.org/bitcoin/bitcoin/jobs/245346398#L3109

    CTransaction(nVersion=1 vin=[CTxIn(prevout=COutPoint(hash=6d7956f3bdf3f5c646146311bcf255305fcfbc7ccc60e6d70be216491278a54c n=0) scriptSig= nSequence=0)] vout=[CTxOut(nValue=-1.99996597 scriptPubKey=0014b472a266d0bd89c13706a4132ccfb16f7c3b9fcb)] ...

    I've seen this failure once or twice before from Travis. Looks like the test isn't verifying that the utxo it uses for splitting is large enough, though I'm not sure how it could end up negative. @jl2012 I think you added this test, mind having a look?

  13. laanwj merged this on Jun 22, 2017
  14. laanwj closed this on Jun 22, 2017

  15. laanwj referenced this in commit 1d991f6f18 on Jun 22, 2017
  16. PastaPastaPasta referenced this in commit 99fd0b4bd5 on Jul 6, 2019
  17. PastaPastaPasta referenced this in commit a1942cc8b7 on Jul 8, 2019
  18. PastaPastaPasta referenced this in commit 9d980c7304 on Jul 9, 2019
  19. PastaPastaPasta referenced this in commit 6b6ea24618 on Jul 11, 2019
  20. barrystyle referenced this in commit a4a28303ba on Jan 22, 2020
  21. practicalswift deleted the branch on Apr 10, 2021
  22. DrahtBot locked this on Aug 16, 2022

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-16 15:15 UTC

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