stdint.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2011 by Qualcomm Atheros.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software
  6. * for any purpose with or without fee is hereby granted, provided
  7. * that the above copyright notice and this permission notice appear
  8. * in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
  13. * THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
  14. * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  15. * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  16. * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  17. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. *
  19. *--------------------------------------------------------------------*/
  20. /*====================================================================*
  21. *
  22. * stdint.h - substitute stdint.h file for Windows;
  23. *
  24. * this is an important POSIX header that Microsoft ommits;
  25. *
  26. * Contributor(s):
  27. * Charles Maier
  28. *
  29. *--------------------------------------------------------------------*/
  30. #ifndef STDINT_HEADER
  31. #define STDINT_HEADER
  32. /*====================================================================*
  33. * system header files;
  34. *--------------------------------------------------------------------*/
  35. #include <limits.h>
  36. /*====================================================================*
  37. * variable types;
  38. *--------------------------------------------------------------------*/
  39. #ifdef _MSC_VER
  40. typedef __int8 int8_t;
  41. typedef __int16 int16_t;
  42. typedef __int32 int32_t;
  43. typedef __int64 int64_t;
  44. typedef unsigned __int8 uint8_t;
  45. typedef unsigned __int16 uint16_t;
  46. typedef unsigned __int32 uint32_t;
  47. typedef unsigned __int64 uint64_t;
  48. typedef long off_t;
  49. #endif
  50. /*====================================================================*
  51. *
  52. *--------------------------------------------------------------------*/
  53. #endif