qpcpp/ports/lint/stdint.h

44 lines
2.0 KiB
C
Raw Normal View History

2013-10-10 20:01:51 -04:00
/**
* \file
2014-04-13 21:35:34 -04:00
* \brief Exact-width integer types. WG14/N843 C99 Standard, Section 7.18
2012-08-14 18:00:48 -04:00
*
2014-04-13 21:35:34 -04:00
* \description
2013-10-10 20:01:51 -04:00
* This header is part of the ANSI C99 standard library to define the
* standard exact-width integer types (see C99 Section 7.18.1.1).
* If the compiler does not provide the stdint.h header file, you can
* either create one in the QP port directory, or you can typedef the
* 8 exact-width integer types directly in the qep_port.h header file.
2012-08-14 18:00:48 -04:00
*
2013-10-10 20:01:51 -04:00
* \note The version included in the QP documentation contains only the 8
* exact-width types actually used in QP. The actual definition of the
* exact-width integer types is platform dependent.
*/
2012-08-14 18:00:48 -04:00
#ifndef stdint_h
#define stdint_h
2013-02-12 10:02:51 -05:00
/*lint -save -e1960 MISRA-C++:2008 Rule 17-0-2, Re-use of C++ identifier */
2012-08-14 18:00:48 -04:00
/* Exact-width types. WG14/N843 C99 Standard, Section 7.18.1.1 */
2014-04-13 21:35:34 -04:00
typedef signed char int8_t; /*!< exact-width 8-bit signed int */
typedef signed short int16_t; /*!< exact-width 16-bit signed int */
typedef signed long int32_t; /*!< exact-width 32-bit signed int */
typedef signed long long int64_t; /*!< exact-width 64-bit signed int */
2012-08-14 18:00:48 -04:00
2014-04-13 21:35:34 -04:00
typedef unsigned char uint8_t; /*!< exact-width 8-bit unsigned int */
typedef unsigned short uint16_t; /*!< exact-width 16-bit unsigned int */
typedef unsigned long uint32_t; /*!< exact-width 32-bit unsigned int */
typedef unsigned long long uint64_t; /*!< exact-width 64-bit unsigned int */
/* Fastest minimum-width types. WG14/N843 C99 Standard, Section 7.18.1.3 */
typedef signed int int_fast8_t; /*!< fast at-least 8-bit signed int */
typedef unsigned int uint_fast8_t; /*!< fast at-least 8-bit unsigned int */
typedef signed int int_fast16_t; /*!< fast at-least 16-bit signed int */
typedef unsigned int uint_fast16_t; /*!< fast at-least 16-bit unsigned int */
typedef signed long int_fast32_t; /*!< fast at-least 32-bit signed int */
typedef unsigned long uint_fast32_t; /*!< fast at-least 32-bit unsigned int */
2012-08-14 18:00:48 -04:00
2013-02-12 10:02:51 -05:00
/*lint -restore */
2014-04-13 21:35:34 -04:00
#endif /* stdint_h */
2012-08-14 18:00:48 -04:00