Skip to content

Commit 42d9c73

Browse files
committed
For explicitly sized types, used size-explicit type names
1 parent a0cd271 commit 42d9c73

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

types.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,21 @@
2727
#ifndef _BRICK_EMU_TYPES_H_
2828
#define _BRICK_EMU_TYPES_H_
2929

30-
typedef signed char int8;
31-
typedef unsigned char uint8;
32-
typedef signed short int16;
33-
typedef unsigned short uint16;
34-
typedef signed int int32;
35-
typedef unsigned int uint32;
30+
#include <stdint.h>
31+
32+
typedef int8_t int8;
33+
typedef uint8_t uint8;
34+
typedef int16_t int16;
35+
typedef uint16_t uint16;
36+
typedef int32_t int32;
37+
typedef uint32_t uint32;
38+
typedef int64_t int64;
39+
typedef uint64_t uint64;
3640

3741
/*
3842
* Cycle count main data type
3943
*/
40-
typedef unsigned long long cycle_count_t;
44+
typedef uint64_t cycle_count_t;
4145

4246
/*
4347
* Cycle count printf format

0 commit comments

Comments
 (0)