Switch to C++ versions of standard C headers

This commit is contained in:
Alex Chernyakhovsky
2023-07-30 18:10:08 -04:00
committed by Alex Chernyakhovsky
parent 19ad493dcb
commit cf542739cc
56 changed files with 206 additions and 192 deletions
+2 -2
View File
@@ -30,8 +30,8 @@
also delete it here.
*/
#include <string.h>
#include <stdlib.h>
#include <cstdlib>
#include <cstring>
#include "src/util/fatal_assert.h"
#include "src/crypto/base64.h"
+1 -1
View File
@@ -30,7 +30,7 @@
also delete it here.
*/
#include <stdint.h>
#include <cstdint>
bool base64_decode( const char *b64, const size_t b64_len,
uint8_t *raw, size_t *raw_len );
+1 -1
View File
@@ -60,7 +60,7 @@
/* Use our fallback implementation, which is correct for any endianness. */
#include <stdint.h>
#include <cstdint>
/* Make sure they aren't macros */
#undef htobe64
+7 -6
View File
@@ -30,14 +30,15 @@
also delete it here.
*/
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/resource.h>
#include <cassert>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <sys/resource.h>
#include "src/crypto/byteorder.h"
#include "src/crypto/crypto.h"
#include "src/crypto/base64.h"
+5 -4
View File
@@ -34,11 +34,12 @@
#define CRYPTO_HPP
#include "src/crypto/ae.h"
#include <string>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <string>
long int myatoi( const char *str );
+2 -2
View File
@@ -87,8 +87,8 @@
#include "src/crypto/ae.h"
#include "src/crypto/crypto.h"
#include "src/util/fatal_assert.h"
#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <cstring>
#if defined(HAVE_STRINGS_H)
#include <strings.h>
#endif
+2 -2
View File
@@ -33,9 +33,9 @@
#ifndef PRNG_HPP
#define PRNG_HPP
#include <string>
#include <stdint.h>
#include <cstdint>
#include <fstream>
#include <string>
#include "src/crypto/crypto.h"