1 /* HSTDINT.H    (c) Copyright Roger Bowler, 2006                     */
2 /*              Hercules standard integer definitions                */
3 
4 /*-------------------------------------------------------------------*/
5 /* The purpose of this file is to define the following typedefs:     */
6 /*      uint8_t, uint16_t, uint32_t, uint64_t                        */
7 /*      int8_t, int16_t, int32_t, int64_t                            */
8 /* For Windows, the MSVC-specific C sized integer types are used.    */
9 /* For Unix, definitions are included from stdint.h if it exists,    */
10 /* otherwise from inttypes.h (if it exists), otherwise unistd.h      */
11 /*-------------------------------------------------------------------*/
12 
13 #ifndef _HSTDINT_H
14 #define _HSTDINT_H
15 
16 #ifdef HAVE_CONFIG_H
17   #include <config.h>           /* Hercules build configuration      */
18 #endif
19 
20 #if defined(_MSVC_)
21   typedef unsigned __int8  uint8_t;
22   typedef unsigned __int16 uint16_t;
23   typedef unsigned __int32 uint32_t;
24   typedef unsigned __int64 uint64_t;
25   typedef signed __int8  int8_t;
26   typedef signed __int16 int16_t;
27   typedef signed __int32 int32_t;
28   typedef signed __int64 int64_t;
29 #elif defined(HAVE_STDINT_H)
30   #include <stdint.h>           /* Standard integer definitions      */
31 #elif defined(HAVE_INTTYPES_H)
32   #include <inttypes.h>         /* Fixed size integral types         */
33 #else
34   #include <unistd.h>           /* Unix standard definitions         */
35 #endif
36 
37 #endif /*_HSTDINT_H*/
38