mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge bitcoin/bitcoin#26832: compat: move (win) S_* defines into bdb
54e4061189
refactor: don't avoid sys/types.h on when building for Windows (fanquake) Pull request description: This is the only place these defines are used. They may also be available when building for Windows. `sys/stat.h` is available, and we already use it unguarded in other code. So move the defines into bdb, after the stat.h include, and remove compat from bdb.cpp. ACKs for top commit: TheCharlatan: re-ACK54e4061189
hebasto: ACK54e4061189
, I have reviewed the code and it looks OK. Tree-SHA512: b75bb120654b4dec9ccc83aa407ee1a50969fec92f196a3722ec51282b91ac50e455af04f07211f3e93270ab83660f1efdeef43928b44b1e4296f6b06ea807c8
This commit is contained in:
commit
23a899b27c
4 changed files with 13 additions and 12 deletions
|
@ -62,15 +62,6 @@ typedef unsigned int SOCKET;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// Windows doesn't define S_IRUSR or S_IWUSR. We define both
|
||||
// here, with the same values as glibc (see stat.h).
|
||||
#ifdef WIN32
|
||||
#ifndef S_IRUSR
|
||||
#define S_IRUSR 0400
|
||||
#define S_IWUSR 0200
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Windows defines MAX_PATH as it's maximum path length.
|
||||
// We define MAX_PATH for use on non-Windows systems.
|
||||
#ifndef WIN32
|
||||
|
|
|
@ -24,11 +24,12 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <sys/types.h> // must go before a number of other headers
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#include <winreg.h>
|
||||
#else
|
||||
#include <sys/types.h> // must go before a number of other headers
|
||||
#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/resource.h>
|
||||
|
|
|
@ -35,9 +35,11 @@
|
|||
#include <univalue.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,8 +15,15 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/stat.h>
|
||||
|
||||
// Windows may not define S_IRUSR or S_IWUSR. We define both
|
||||
// here, with the same values as glibc (see stat.h).
|
||||
#ifdef WIN32
|
||||
#ifndef S_IRUSR
|
||||
#define S_IRUSR 0400
|
||||
#define S_IWUSR 0200
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace wallet {
|
||||
|
|
Loading…
Add table
Reference in a new issue