Skip to content

Conversation

@Bushstar
Copy link
Contributor

Wrap preprocessor definition of NOMINMAX in ifndef conditional to suppress warning when cross compiling Windows.

fs.cpp:6:0: warning: "NOMINMAX" redefined
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the location of the previous definition #define NOMINMAX 1

#define NOMINMAX was introduced in the following merge.

#14426

@practicalswift
Copy link
Contributor

utACK 0b3a654

@promag
Copy link
Contributor

promag commented Apr 10, 2019

utACK 0b3a654.

@laanwj laanwj merged commit 0b3a654 into bitcoin:master Apr 11, 2019
laanwj added a commit that referenced this pull request Apr 11, 2019
0b3a654 Avoid redefine warning (Peter Bushnell)

Pull request description:

  Wrap preprocessor definition of NOMINMAX in ifndef conditional to suppress warning when cross compiling Windows.

  `fs.cpp:6:0: warning: "NOMINMAX" redefined`
  `/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the location of the previous definition
   #define NOMINMAX 1`

  #define NOMINMAX was introduced in the following merge.

  #14426

ACKs for commit 0b3a65:
  practicalswift:
    utACK 0b3a654
  promag:
    utACK 0b3a654.

Tree-SHA512: 0175195b88e63d3d44ffac2b8cc87ae7b285a45ed4e49605bca0cc82db073006c22024ef9c2f287980d357dac1099f798f1eeaa0bd75bb7a625919dc1632366c
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 5, 2020
Summary:
This removes a warning on the Windows build:
`../../src/fs.cpp:13: warning: "NOMINMAX" redefined`

Backport of Core [[bitcoin/bitcoin#15782 | PR15782]]

Test Plan: `ninja && ninja check-all`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7764
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
0b3a654 Avoid redefine warning (Peter Bushnell)

Pull request description:

  Wrap preprocessor definition of NOMINMAX in ifndef conditional to suppress warning when cross compiling Windows.

  `fs.cpp:6:0: warning: "NOMINMAX" redefined`
  `/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the location of the previous definition
   #define NOMINMAX 1`

  #define NOMINMAX was introduced in the following merge.

  bitcoin#14426

ACKs for commit 0b3a65:
  practicalswift:
    utACK 0b3a654
  promag:
    utACK 0b3a654.

Tree-SHA512: 0175195b88e63d3d44ffac2b8cc87ae7b285a45ed4e49605bca0cc82db073006c22024ef9c2f287980d357dac1099f798f1eeaa0bd75bb7a625919dc1632366c
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Aug 9, 2021
8c4b365 Fix WSL file locking by using flock instead of fcntl (Samuel Dobson)
189de2f Avoid redefine warning (Peter Bushnell)

Pull request description:

  Straight forward backport of bitcoin#15782 and bitcoin#18700 to address a bug in WSL1 environments that results in improper locking behavior; ie, a directory lock is not made exclusive as intended, thus resulting in multiple instances of the wallet/daemon being able to access the same datadir simultaneously instead of erroring out due to a locking conflict as intended.

  This is specific to WSL1 environments, as WSL2 (not yet fully supported/documented), standard linux, and macOS environments behave as intended.

ACKs for top commit:
  furszy:
    good, utACK 8c4b365
  random-zebra:
    utACK 8c4b365 and merging...

Tree-SHA512: 7ba7d054a858baae4df2ae6daa4d3ffc694bcff0b48958ba28b3203d6dc0d950d25596eb324dc3973b09a65a251946c29be035959b3da7ecf126f9110b7056d0
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 28, 2021
0b3a654 Avoid redefine warning (Peter Bushnell)

Pull request description:

  Wrap preprocessor definition of NOMINMAX in ifndef conditional to suppress warning when cross compiling Windows.

  `fs.cpp:6:0: warning: "NOMINMAX" redefined`
  `/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/os_defines.h:45:0: note: this is the location of the previous definition
   #define NOMINMAX 1`

  #define NOMINMAX was introduced in the following merge.

  bitcoin#14426

ACKs for commit 0b3a65:
  practicalswift:
    utACK 0b3a654
  promag:
    utACK 0b3a654.

Tree-SHA512: 0175195b88e63d3d44ffac2b8cc87ae7b285a45ed4e49605bca0cc82db073006c22024ef9c2f287980d357dac1099f798f1eeaa0bd75bb7a625919dc1632366c
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants