Use modern names for standard headers

This commit is contained in:
Tim Wojtulewicz 2025-05-06 16:04:22 -07:00
parent 4b2ed67eaf
commit ad50443590
17 changed files with 23 additions and 26 deletions

View file

@ -9,7 +9,7 @@
#include "zeek/zeek-config.h" #include "zeek/zeek-config.h"
#include <stdio.h> #include <cstdio>
#include <set> #include <set>
#include <string> #include <string>

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <stdio.h> #include <cstdio>
namespace zeek::detail { namespace zeek::detail {

View file

@ -21,11 +21,10 @@
// Entries must be either a pointer to the data or nonzero data with // Entries must be either a pointer to the data or nonzero data with
// sizeof(data) <= sizeof(void*). // sizeof(data) <= sizeof(void*).
#include <stdarg.h>
#include <cassert> #include <cassert>
#include <cstdarg>
#include <initializer_list> #include <initializer_list>
#include <iterator> #include <iterator>
#include <utility>
#include "zeek/util.h" #include "zeek/util.h"

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <stdarg.h> #include <cstdarg>
#include <list> #include <list>
#include <map> #include <map>
#include <string> #include <string>

View file

@ -10,7 +10,7 @@
#include <pcap-int.h> #include <pcap-int.h>
#endif #endif
#include <stdio.h> #include <cstdio>
#include "zeek/Event.h" #include "zeek/Event.h"
#include "zeek/iosource/BPF_Program.h" #include "zeek/iosource/BPF_Program.h"

View file

@ -5,11 +5,11 @@
*/ */
%top{ %top{
// Include stdint.h at the start of the generated file. Typically // Include cstdint at the start of the generated file. Typically
// MSVC will include this header later, after the definitions of // MSVC will include this header later, after the definitions of
// the integral type macros. MSVC then complains that about the // the integral type macros. MSVC then complains that about the
// redefinition of the types. Including stdint.h early avoids this. // redefinition of the types. Including cstdint early avoids this.
#include <stdint.h> #include <cstdint>
} }
%{ %{

View file

@ -1,6 +1,6 @@
%{ %{
#include "zeek/zeek-config.h" #include "zeek/zeek-config.h"
#include <stdio.h> #include <cstdio>
#include <netinet/in.h> #include <netinet/in.h>
#include <vector> #include <vector>

View file

@ -1,9 +1,9 @@
%top{ %top{
// Include stdint.h at the start of the generated file. Typically // Include cstdint at the start of the generated file. Typically
// MSVC will include this header later, after the definitions of // MSVC will include this header later, after the definitions of
// the integral type macros. MSVC then complains that about the // the integral type macros. MSVC then complains that about the
// redefinition of the types. Including stdint.h early avoids this. // redefinition of the types. Including cstdint early avoids this.
#include <stdint.h> #include <cstdint>
} }
%{ %{

View file

@ -1,9 +1,9 @@
%top{ %top{
// Include stdint.h at the start of the generated file. Typically // Include cstdint at the start of the generated file. Typically
// MSVC will include this header later, after the definitions of // MSVC will include this header later, after the definitions of
// the integral type macros. MSVC then complains that about the // the integral type macros. MSVC then complains that about the
// redefinition of the types. Including stdint.h early avoids this. // redefinition of the types. Including cstdint early avoids this.
#include <stdint.h> #include <cstdint>
} }
%{ %{

View file

@ -9,10 +9,10 @@
#include <libproc.h> #include <libproc.h>
#include <mach/mach.h> #include <mach/mach.h>
#include <mach/task.h> #include <mach/task.h>
#include <math.h>
#include <stdlib.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <unistd.h> #include <unistd.h>
#include <cmath>
#include <cstdlib>
namespace zeek::telemetry::detail { namespace zeek::telemetry::detail {

View file

@ -63,8 +63,6 @@
extern HeapLeakChecker* heap_checker; extern HeapLeakChecker* heap_checker;
#endif #endif
#include <stdint.h>
extern "C" { extern "C" {
#include "zeek/3rdparty/modp_numtoa.h" #include "zeek/3rdparty/modp_numtoa.h"
} }

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <time.h> // for time_t #include <ctime> // for time_t
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <time.h> // for time_t #include <ctime> // for time_t
#include <list> #include <list>
#include <map> #include <map>
#include <string> #include <string>

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <time.h> // for time_t #include <ctime> // for time_t
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -4,7 +4,7 @@
#include "zeek/zeek-config.h" #include "zeek/zeek-config.h"
#include <time.h> // for time_t #include <ctime> // for time_t
#include <list> #include <list>
#include <map> #include <map>
#include <set> #include <set>

View file

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <time.h> // for time_t #include <ctime> // for time_t
#include <list> #include <list>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -4,7 +4,7 @@
#include "zeek/zeek-config.h" #include "zeek/zeek-config.h"
#include <time.h> // for time_t #include <ctime> // for time_t
#include <optional> #include <optional>
#include <string> #include <string>