Advertisement
Rufflewind

Fixing the machine integer types for Clang on Cygwin

Feb 16th, 2014
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.36 KB | None | 0 0
  1. --- /usr/include/machine/_default_types.h   2014-02-16 22:58:57.762432000 -0500
  2. +++ /usr/include/machine/_default_types.h   2014-02-16 21:05:32.428189100 -0500
  3. @@ -23,7 +23,7 @@
  4.  extern "C" {
  5.  #endif
  6.  
  7. -#ifdef __INT8_TYPE__
  8. +#if defined(__INT8_TYPE__) && defined(__UINT8_TYPE__)
  9.  typedef __INT8_TYPE__ __int8_t;
  10.  typedef __UINT8_TYPE__ __uint8_t;
  11.  #define ___int8_t_defined 1
  12. @@ -33,7 +33,7 @@
  13.  #define ___int8_t_defined 1
  14.  #endif
  15.  
  16. -#ifdef __INT16_TYPE__
  17. +#if defined(__INT16_TYPE__) && defined(__UINT16_TYPE__)
  18.  typedef __INT16_TYPE__ __int16_t;
  19.  typedef __UINT16_TYPE__ __uint16_t;
  20.  #define ___int16_t_defined 1
  21. @@ -51,7 +51,7 @@
  22.  #define ___int16_t_defined 1
  23.  #endif
  24.  
  25. -#ifdef __INT32_TYPE__
  26. +#if defined(__INT32_TYPE__) && defined(__UINT32_TYPE__)
  27.  typedef __INT32_TYPE__ __int32_t;
  28.  typedef __UINT32_TYPE__ __uint32_t;
  29.  #define ___int32_t_defined 1
  30. @@ -73,7 +73,7 @@
  31.  #define ___int32_t_defined 1
  32.  #endif
  33.  
  34. -#ifdef __INT64_TYPE__
  35. +#if defined(__INT64_TYPE__) && defined(__UINT64_TYPE__)
  36.  typedef __INT64_TYPE__ __int64_t;
  37.  typedef __UINT64_TYPE__ __uint64_t;
  38.  #define ___int64_t_defined 1
  39. @@ -164,7 +164,7 @@
  40.  #define ___int_least64_t_defined 1
  41.  #endif
  42.  
  43. -#ifdef __INTPTR_TYPE__
  44. +#if defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__)
  45.  typedef __INTPTR_TYPE__ __intptr_t;
  46.  typedef __UINTPTR_TYPE__ __uintptr_t;
  47.  #elif defined(__PTRDIFF_TYPE__)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement