mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
refactor: use <cstdlib> over stdlib.h
We currently use both. Consolidate on the former.
This commit is contained in:
parent
100949af0e
commit
a63d4cb26a
@ -6,7 +6,7 @@
|
||||
#ifndef BITCOIN_CONSENSUS_CONSENSUS_H
|
||||
#define BITCOIN_CONSENSUS_CONSENSUS_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
|
||||
/** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_CHACHA20_H
|
||||
#define BITCOIN_CRYPTO_CHACHA20_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A class for ChaCha20 256-bit stream cipher developed by Daniel J. Bernstein
|
||||
https://cr.yp.to/chacha/chacha-20080128.pdf */
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <crypto/hmac_sha256.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32) */
|
||||
class CHKDF_HMAC_SHA256_L32
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <crypto/sha256.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A hasher class for HMAC-SHA-256. */
|
||||
class CHMAC_SHA256
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <crypto/sha512.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A hasher class for HMAC-SHA-512. */
|
||||
class CHMAC_SHA512
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_POLY1305_H
|
||||
#define BITCOIN_CRYPTO_POLY1305_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define POLY1305_KEYLEN 32
|
||||
#define POLY1305_TAGLEN 16
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_RIPEMD160_H
|
||||
#define BITCOIN_CRYPTO_RIPEMD160_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A hasher class for RIPEMD-160. */
|
||||
class CRIPEMD160
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_SHA1_H
|
||||
#define BITCOIN_CRYPTO_SHA1_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A hasher class for SHA1. */
|
||||
class CSHA1
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_SHA256_H
|
||||
#define BITCOIN_CRYPTO_SHA256_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
/** A hasher class for SHA-256. */
|
||||
|
@ -5,8 +5,8 @@
|
||||
// This is a translation to GCC extended asm syntax from YASM code by Intel
|
||||
// (available at the bottom of this file).
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(__x86_64__) || defined(__amd64__)
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <span.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
//! The Keccak-f[1600] transform.
|
||||
void KeccakF(uint64_t (&st)[25]);
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef BITCOIN_CRYPTO_SHA512_H
|
||||
#define BITCOIN_CRYPTO_SHA512_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** A hasher class for SHA-512. */
|
||||
class CSHA512
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include <util/translation.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -13,10 +13,10 @@
|
||||
#include <util/system.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
@ -10,10 +10,10 @@
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <system_error>
|
||||
#include <unistd.h>
|
||||
|
@ -8,9 +8,8 @@
|
||||
#include <indirectmap.h>
|
||||
#include <prevector.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define BITCOIN_PREVECTOR_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <util/time.h> // for GetTimeMicros()
|
||||
|
||||
#include <cmath>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <thread>
|
||||
|
||||
#ifndef WIN32
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <policy/policy.h>
|
||||
#include <primitives/transaction.h>
|
||||
|
@ -6,7 +6,7 @@
|
||||
#ifndef BITCOIN_SUPPORT_CLEANSE_H
|
||||
#define BITCOIN_SUPPORT_CLEANSE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
/** Secure overwrite a buffer (possibly containing secret data) with zero-bytes. The write
|
||||
* operation will not be optimized out by the compiler. */
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <chain.h>
|
||||
#include <rpc/blockchain.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/string.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
/* Equality between doubles is imprecise. Comparison should be done
|
||||
* with a small threshold of tolerance, rather than exact equality.
|
||||
*/
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <support/events.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user