Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Modernize deprecated C library headers #157

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autotest/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <stdio.h>
#include <cstdio>

#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[32m"
Expand Down
4 changes: 2 additions & 2 deletions cli/latch.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <stdint.h>
#include <string.h>
#include <cstdint>
#include <cstring>

namespace latch
{
Expand Down
2 changes: 1 addition & 1 deletion controlplane/acl/dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "rule.h"

#ifdef ACL_DEBUG
#include <stdio.h>
#include <cstdio>
#define debug(format...) printf(format)
#else
#define debug(format...)
Expand Down
2 changes: 1 addition & 1 deletion controlplane/acl_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <set>
#include <unordered_map>

#include <inttypes.h>
#include <cinttypes>

using tAclGroupId = uint32_t;

Expand Down
2 changes: 1 addition & 1 deletion controlplane/acl_tree.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <inttypes.h>
#include <cinttypes>

#include "common/acl.h"

Expand Down
2 changes: 1 addition & 1 deletion dataplane/checksum.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <inttypes.h>
#include <cinttypes>

#include <rte_icmp.h>
#include <rte_ip.h>
Expand Down
2 changes: 1 addition & 1 deletion dataplane/common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <arpa/inet.h>
#include <stdio.h>
#include <cstdio>

#include <rte_ether.h>
#include <rte_hash_crc.h>
Expand Down
2 changes: 1 addition & 1 deletion dataplane/debug_latch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#ifdef CONFIG_YADECAP_AUTOTEST

#include <stdint.h>
#include <cstdint>
#include <unistd.h>

#define LATCH_USLEEP_CYCLE 50
Expand Down
2 changes: 1 addition & 1 deletion dataplane/dynamic_table.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <inttypes.h>
#include <cinttypes>

#include "common/config.h"
#include "common/define.h"
Expand Down
2 changes: 1 addition & 1 deletion dataplane/flat.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <inttypes.h>
#include <cinttypes>

#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion dataplane/fragmentation.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <inttypes.h>
#include <cinttypes>

#include <atomic>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion dataplane/hashtable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <cstdint>
#include <memory.h>
#include <stdint.h>

#include <rte_byteorder.h>
#include <rte_common.h>
Expand Down
2 changes: 1 addition & 1 deletion dataplane/sock_dev.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <stdint.h>
#include <cstdint>

#define SOCK_DEV_PREFIX "sock_dev:"

Expand Down
2 changes: 1 addition & 1 deletion ext/murmurhash3.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#define FORCE_INLINE __forceinline

#include <stdlib.h>
#include <cstdlib>

#define ROTL32(x,y) _rotl(x,y)
#define ROTL64(x,y) _rotl64(x,y)
Expand Down
2 changes: 1 addition & 1 deletion ext/xxhash32.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

#pragma once
#include <stdint.h> // for uint32_t and uint64_t
#include <cstdint> // for uint32_t and uint64_t

/// XXHash (32 bit), based on Yann Collet's descriptions, see http://cyan4973.github.io/xxHash/
/** How to use:
Expand Down
2 changes: 1 addition & 1 deletion librib/libyabird.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extern "C"
//#define YANET_DEBUG

#ifdef YANET_DEBUG
#include <stdio.h>
#include <cstdio>

extern int yanet_logfd;
#define BP(fmt, ...) \
Expand Down
Loading