Commit graph

17 commits

Author SHA1 Message Date
Rafael Sadowski d9b18c1290
Fix build with Boost 1.77.0
BOOST_FILESYSTEM_C_STR changed to accept the path as an argument

Github-Pull: bitcoin/bitcoin#22713
Rebased-From: acb7aad27ec8a184808aa7905887e3b2c5d54e9c
2021-08-27 09:54:05 +03:00
MarcoFalke fa193c6b1b
Add missing includes to fix compile errors
fs.cpp:35:17: error: no member named 'strerror' in namespace 'std'
    return std::strerror(errno);
           ~~~~~^
fs.cpp:49:9: error: use of undeclared identifier 'close'
        close(fd);
        ^
2 errors generated.

./interfaces/chain.h:265:55: error: ‘std::function’ has not been declared
     virtual void rpcRunLater(const std::string& name, std::function<void()> fn, int64_t seconds) = 0;
                                                       ^~~
2020-06-16 15:15:46 -04:00
Samuel Dobson e8fa0a3d20 Fix WSL file locking by using flock instead of fcntl
Co-authored-by: sipa <pieter@wuille.net>
2020-04-26 12:16:22 +12:00
Hennadii Stepanov fac86ac7b3
scripted-diff: Add missed copyright headers
-BEGIN VERIFY SCRIPT-
s() { contrib/devtools/copyright_header.py insert "$1"; }

s build_msvc/bitcoin_config.h
s build_msvc/msvc-autogen.py
s build_msvc/testconsensus/testconsensus.cpp
s contrib/devtools/circular-dependencies.py
s contrib/devtools/gen-manpages.sh
s contrib/filter-lcov.py
s contrib/gitian-build.py
s contrib/install_db4.sh
s src/crypto/sha256_avx2.cpp
s src/crypto/sha256_sse41.cpp
s src/fs.cpp
s src/qt/test/addressbooktests.cpp
s src/qt/test/addressbooktests.h
s src/qt/test/util.cpp
s src/qt/test/util.h
s src/qt/test/wallettests.cpp
s src/qt/test/wallettests.h
s src/test/blockchain_tests.cpp
s test/functional/combine_logs.py
s test/lint/lint-locale-dependence.sh
sed -i '1G' test/lint/lint-shebang.sh
s test/lint/lint-shebang.sh
-END VERIFY SCRIPT-
2020-01-04 20:18:28 +02:00
Wladimir J. van der Laan f3b51eb935 Fix occurences of c_str() used with size() to data()
Using `data()` better communicates the intent here.

Also, depending on how `c_str()` is implemented, this fixes undefined
behavior: The part of the string after the first NULL character might
have undefined contents.
2019-10-28 13:41:45 +01:00
Peter Bushnell 0b3a65455a Avoid redefine warning 2019-04-10 12:16:52 +01:00
Chun Kuan Lee 6ad79cbd56 wallet: Use fsbridge::ifstream to fix Windows path issue 2019-02-23 23:44:28 +08:00
Chun Kuan Lee 369244f654 utils: Fix broken Windows filelock 2018-10-19 02:29:25 +08:00
Chun Kuan Lee 86eb3b3f1a utils: Add fsbridge fstream function wrapper 2018-09-26 08:47:42 +08:00
Wladimir J. van der Laan d73205ef36
Merge #14192: utils: Convert fs::filesystem_error messages from local multibyte to utf-8 on Windows
e221368932 utils: Convert fs error messages from multibyte to utf-8 (Chun Kuan Lee)

Pull request description:

  Before:
  ![default](https://user-images.githubusercontent.com/11154118/45318798-8d83f480-b570-11e8-8cbb-c729a54f6b9e.png)
  After:
  ![2](https://user-images.githubusercontent.com/11154118/45318806-91177b80-b570-11e8-9474-a62342c92dbd.png)

Tree-SHA512: 0a598bd159286f6784d117b8a24888b2650d5402d687ab0e8d0849e0c3d53797e266647d8177bb6614307c9598019cd7477311bb9895b1bb52a6bd77b460fda1
2018-09-13 17:30:27 +02:00
Chun Kuan Lee e221368932 utils: Convert fs error messages from multibyte to utf-8 2018-09-11 03:11:39 +08:00
Chun Kuan Lee b9babc82dd utils: Use _wfopen and _wreopen on Windows
The fopen function does not support unicode filename on Windows, so use Windows specific function do deal with it
2018-08-31 21:02:53 +08:00
practicalswift 75ea00f391 Remove unused fsbridge::freopen 2018-08-29 16:05:51 +02:00
Chun Kuan Lee 1661a472b8 add unicode compatible file_lock for Windows
boost::interprocess::file_lock cannot open the files that contain characters which cannot be parsed by the user's code page on Windows.
This commit add a new class to handle those specific file for Windows.
2018-08-28 00:55:13 +08:00
MeshCollider 1a445343f6 scripted-diff: Replace #include "" with #include <> (ryanofsky)
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
practicalswift 49de096c2a Remove unused Boost includes 2017-06-09 10:25:26 +02:00
Wladimir J. van der Laan 19e36bbef6 Add fs.cpp/h 2017-04-03 12:32:32 +02:00