Skip to content

Commit ce58aff

Browse files
committed
Remove cstdint.h
This is not a "real" header - definitions should be in stdint.h and cstdint.
1 parent c15b516 commit ce58aff

File tree

4 files changed

+22
-28
lines changed

4 files changed

+22
-28
lines changed

cpp/autosar/src/codingstandards/cpp/CommonTypes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import cpp as default
22

33
/*
4-
* Implementations of the C/C++ Fixed Width Types from cstdint.h.
4+
* Implementations of the C/C++ Fixed Width Types from cstdint.
55
*
66
* TODO: Deprecate once this is available in the CodeQL standard library.
77
*/
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
#ifndef _CPP_CSTDINT
2-
#define _CPP_CSTDINT
3-
4-
#define MAX_INT
5-
#include <cstdint.h>
6-
#endif
1+
#ifndef _GHLIBCPP_CSTDINT
2+
#define _GHLIBCPP_CSTDINT
3+
#include "stdint.h"
4+
namespace std {
5+
using ::int16_t;
6+
using ::int32_t;
7+
using ::int64_t;
8+
using ::int8_t;
9+
using ::intmax_t;
10+
using ::uint16_t;
11+
using ::uint32_t;
12+
using ::uint64_t;
13+
using ::uint8_t;
14+
using ::uint_fast16_t;
15+
using ::uint_fast32_t;
16+
using ::uint_fast64_t;
17+
using ::uint_fast8_t;
18+
using ::uintmax_t;
19+
} // namespace std
20+
#endif // _GHLIBCPP_CSTDINT

cpp/common/test/includes/standard-library/cstdint.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

cpp/common/test/includes/standard-library/random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef _GHLIBCPP_RANDOM
22
#define _GHLIBCPP_RANDOM
3-
#include "cstdint.h"
43
#include "stddef.h"
4+
#include <cstdint>
55
#include <string>
66

77
namespace std {

0 commit comments

Comments
 (0)