Skip to content

Commit 590d206

Browse files
committed
Merge bitcoin/bitcoin#26150: build: remove stdio.h from header checks
55aad5f build: remove stdio.h from header checks (fanquake) b956331 refactor: use <cstdio> over stdio.h (fanquake) Pull request description: We already use a mix of `<cstdio>` and `stdio.h` unconditionally throughout the codebase. Us checking this header also duplicates work already done by autotools. Currently `stdio.h` is checked for 3 times during a ./configure run, after this change, at least it's only twice. ACKs for top commit: TheCharlatan: ACK 55aad5f kristapsk: ACK 55aad5f Tree-SHA512: a83cc724528ab92aacfa53048b12fcccec3962637ca7fad30f6c610365edeb0e951f74e37832ad7d3f79ca9b8d7203cb10165c89d0e4b63eeda7a970dab82dfb
2 parents 2b2c970 + 55aad5f commit 590d206

File tree

7 files changed

+6
-9
lines changed

7 files changed

+6
-9
lines changed

build_msvc/bitcoin_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@
146146
/* Define to 1 if you have the <stdint.h> header file. */
147147
#define HAVE_STDINT_H 1
148148

149-
/* Define to 1 if you have the <stdio.h> header file. */
150-
#define HAVE_STDIO_H 1
151-
152149
/* Define to 1 if you have the <stdlib.h> header file. */
153150
#define HAVE_STDLIB_H 1
154151

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ if test "$TARGET_OS" = "darwin"; then
10101010
AX_CHECK_LINK_FLAG([-Wl,-bind_at_load], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"], [], [$LDFLAG_WERROR])
10111011
fi
10121012

1013-
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
1013+
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdlib.h unistd.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
10141014

10151015
AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
10161016
[#include <sys/types.h>

src/bitcoin-tx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include <util/system.h>
2828
#include <util/translation.h>
2929

30+
#include <cstdio>
3031
#include <functional>
3132
#include <memory>
32-
#include <stdio.h>
3333

3434
static bool fCreateBlank;
3535
static std::map<std::string,UniValue> registers;

src/httpserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#include <util/threadnames.h>
2222
#include <util/translation.h>
2323

24+
#include <cstdio>
2425
#include <deque>
2526
#include <memory>
2627
#include <optional>
27-
#include <stdio.h>
2828
#include <stdlib.h>
2929
#include <string>
3030

src/ipc/interfaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#include <tinyformat.h>
1313
#include <util/system.h>
1414

15+
#include <cstdio>
1516
#include <functional>
1617
#include <memory>
1718
#include <stdexcept>
18-
#include <stdio.h>
1919
#include <stdlib.h>
2020
#include <string.h>
2121
#include <string>

src/qt/utilitydialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <util/system.h>
1818
#include <util/strencodings.h>
1919

20-
#include <stdio.h>
20+
#include <cstdio>
2121

2222
#include <QCloseEvent>
2323
#include <QLabel>

src/streams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
#include <algorithm>
1515
#include <assert.h>
16+
#include <cstdio>
1617
#include <ios>
1718
#include <limits>
1819
#include <optional>
1920
#include <stdint.h>
20-
#include <stdio.h>
2121
#include <string.h>
2222
#include <string>
2323
#include <utility>

0 commit comments

Comments
 (0)