Want more features on Pastebin? Sign Up, it's FREE!
Guest

Fixing the machine integer types for Clang on Cygwin

By: Rufflewind on Feb 16th, 2014  |  syntax: Diff  |  size: 1.36 KB  |  views: 219  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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__)
clone this paste RAW Paste Data