Skip to content

Commit c15b516

Browse files
committed
Add stdint.h as a header, and move cstdint definitions
1 parent 1415a72 commit c15b516

File tree

2 files changed

+35
-14
lines changed

2 files changed

+35
-14
lines changed
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
#ifndef _GHLIBCPP_CSTDINT
22
#define _GHLIBCPP_CSTDINT
3+
#include "stdint.h"
34
namespace std {
4-
typedef signed char int8_t;
5-
typedef unsigned char uint8_t;
6-
typedef signed short int int16_t;
7-
typedef unsigned short int uint16_t;
8-
typedef signed int int32_t;
9-
typedef unsigned int uint32_t;
10-
typedef signed long int int64_t;
11-
typedef unsigned long int uint64_t;
12-
typedef int intmax_t;
13-
14-
typedef uint8_t uint_fast8_t;
15-
typedef uint16_t uint_fast16_t;
16-
typedef uint32_t uint_fast32_t;
17-
typedef uint64_t uint_fast64_t;
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;
1819
} // namespace std
1920
#endif // _GHLIBCPP_CSTDINT
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef _GHLIBCPP_STDINT
2+
#define _GHLIBCPP_STDINT
3+
4+
typedef signed char int8_t;
5+
typedef unsigned char uint8_t;
6+
typedef signed short int int16_t;
7+
typedef unsigned short int uint16_t;
8+
typedef signed int int32_t;
9+
typedef unsigned int uint32_t;
10+
typedef signed long int int64_t;
11+
typedef unsigned long int uint64_t;
12+
typedef int intmax_t;
13+
typedef unsigned int uintmax_t;
14+
15+
typedef uint8_t uint_fast8_t;
16+
typedef uint16_t uint_fast16_t;
17+
typedef uint32_t uint_fast32_t;
18+
typedef uint64_t uint_fast64_t;
19+
20+
#endif // _GHLIBCPP_STDINT

0 commit comments

Comments
 (0)