SCP: Leverage stdint.h for environments where it is available
This commit is contained in:
parent
a6552b823d
commit
e9d5e2e3c9
1 changed files with 20 additions and 8 deletions
26
sim_defs.h
26
sim_defs.h
|
@ -181,16 +181,28 @@ extern "C" {
|
||||||
|
|
||||||
/* Length specific integer declarations */
|
/* Length specific integer declarations */
|
||||||
|
|
||||||
|
/* Handle the special/unusual cases first with everything else leveraging stdints.h */
|
||||||
#if defined (VMS)
|
#if defined (VMS)
|
||||||
#include <ints.h>
|
#include <ints.h>
|
||||||
|
#elif defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||||
|
typedef __int8 int8;
|
||||||
|
typedef __int16 int16;
|
||||||
|
typedef __int32 int32;
|
||||||
|
typedef unsigned __int8 uint8;
|
||||||
|
typedef unsigned __int16 uint16;
|
||||||
|
typedef unsigned __int32 uint32;
|
||||||
#else
|
#else
|
||||||
typedef signed char int8;
|
/* All modern/standard compiler environments */
|
||||||
typedef signed short int16;
|
/* any other environment needa a special case above */
|
||||||
typedef signed int int32;
|
#include <stdint.h>
|
||||||
typedef unsigned char uint8;
|
typedef int8_t int8;
|
||||||
typedef unsigned short uint16;
|
typedef int16_t int16;
|
||||||
typedef unsigned int uint32;
|
typedef int32_t int32;
|
||||||
#endif
|
typedef uint8_t uint8;
|
||||||
|
typedef uint16_t uint16;
|
||||||
|
typedef uint32_t uint32;
|
||||||
|
#endif /* end standard integers */
|
||||||
|
|
||||||
typedef int t_stat; /* status */
|
typedef int t_stat; /* status */
|
||||||
typedef int t_bool; /* boolean */
|
typedef int t_bool; /* boolean */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue