2003-03-02 10:07:14 +03:00
|
|
|
/*
|
|
|
|
* If linux/types.h is already been included, assume it has defined
|
2003-03-06 19:09:18 +03:00
|
|
|
* everything we need. (cross fingers) Other header files may have
|
|
|
|
* also defined the types that we need.
|
2003-03-02 10:07:14 +03:00
|
|
|
*/
|
2004-04-03 19:20:26 +04:00
|
|
|
#if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H))
|
|
|
|
#define _UUID_STDINT_H
|
2003-03-02 10:07:14 +03:00
|
|
|
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef unsigned char uint8_t;
|
|
|
|
typedef signed char int8_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
|
|
|
|
#if (@SIZEOF_INT@ == 8)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef int int64_t;
|
|
|
|
typedef unsigned int uint64_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#elif (@SIZEOF_LONG@ == 8)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef long int64_t;
|
|
|
|
typedef unsigned long uint64_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#elif (@SIZEOF_LONG_LONG@ == 8)
|
|
|
|
#if defined(__GNUC__)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef __signed__ long long int64_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#else
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef signed long long int64_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#endif
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef unsigned long long uint64_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (@SIZEOF_INT@ == 2)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef int int16_t;
|
|
|
|
typedef unsigned int uint16_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#elif (@SIZEOF_SHORT@ == 2)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef short int16_t;
|
|
|
|
typedef unsigned short uint16_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#else
|
|
|
|
?==error: undefined 16 bit type
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (@SIZEOF_INT@ == 4)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef int int32_t;
|
|
|
|
typedef unsigned int uint32_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#elif (@SIZEOF_LONG@ == 4)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef long int32_t;
|
|
|
|
typedef unsigned long uint32_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#elif (@SIZEOF_SHORT@ == 4)
|
2004-04-03 19:20:26 +04:00
|
|
|
typedef short int32_t;
|
|
|
|
typedef unsigned short uint32_t;
|
2003-03-02 10:07:14 +03:00
|
|
|
#else
|
|
|
|
?== error: undefined 32 bit type
|
|
|
|
#endif
|
|
|
|
|
2004-04-03 19:20:26 +04:00
|
|
|
#endif
|