/src/zziplib/zzip/stdint.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 45 lines · 32 code · 8 blank · 5 comment · 10 complexity · ea43ebe0ad246f96b6cb218b8f33d9e8 MD5 · raw file

  1. #ifndef _ZZIP__STDINT_H /* zzip-stdint.h */
  2. #define _ZZIP__STDINT_H 1
  3. /* this file ensures that we have some kind of typedef declarations for
  4. unsigned C9X typedefs. The ISO C 9X: 7.18 Integer types file is stdint.h
  5. */
  6. #include <zzip/conf.h>
  7. /* enforce use of ifdef'd C9X entries in system headers */
  8. #define __USE_ANSI 1
  9. #define __USE_ISOC9X 1
  10. #ifdef ZZIP_HAVE_STDINT_H
  11. /* ISO C 9X: 7.18 Integer types <stdint.h> */
  12. #include <stdint.h>
  13. #elif defined ZZIP_HAVE_SYS_INT_TYPES_H /*solaris*/
  14. #include <sys/int_types.h>
  15. #elif defined ZZIP_HAVE_INTTYPES_H /*freebsd*/
  16. #include <inttypes.h>
  17. #else
  18. typedef unsigned char uint8_t; typedef signed char int8_t;
  19. # if ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 2
  20. typedef unsigned int uint16_t; typedef signed int int16_t;
  21. # elif ZZIP_SIZEOF_SHORT && ZZIP_SIZEOF_SHORT == 2
  22. typedef unsigned short uint16_t; typedef signed short int16_t;
  23. # else
  24. # error unable to typedef int16_t from either int or short
  25. typedef unsigned short uint16_t; typedef signed short int16_t;
  26. # endif
  27. # if defined ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 4
  28. typedef unsigned int uint32_t; typedef signed int int32_t;
  29. # elif defined ZZIP_SIZEOF_LONG && ZZIP_SIZEOF_LONG == 4
  30. typedef unsigned long uint32_t; typedef signed long int32_t;
  31. # else
  32. # error unable to typedef int32_t from either int or long
  33. typedef unsigned long uint32_t; typedef signed long int32_t;
  34. # endif
  35. typedef unsigned _zzip___int64 uint64_t; typedef _zzip___int64 int64_t;
  36. #endif
  37. #endif /*_ZZIP_STDINT_H*/