Fixed patch so it don't remove newline at the end of file.

2016-09-28 11:54 GMT+02:00 Mateusz <[email protected]>:

> Fixes this error when compiling with clang:
> "D:\projekty\msys2\clang\msys64\mingw32\i686-w64-mingw32\include\uchar.h:34:24:
> e   rror: cannot combine with previous 'type-name' declaration specifier
> typedef uint_least16_t char16_t;
>                        ^
> D:\projekty\msys2\clang\msys64\mingw32\i686-w64-mingw32\include\uchar.h:35:24:
> e   rror: cannot combine with previous 'type-name' declaration specifier
> typedef uint_least32_t char32_t;
>                        ^
> 2 errors generated.
> "
>
> From e98ec7a116256108831f035eb0a7f0f2fdf049e9 Mon Sep 17 00:00:00 2001
> From: mati865 <[email protected]>
> Date: Wed, 28 Sep 2016 11:45:40 +0200
> Subject: [PATCH] fix uchar.h for Clang
>
> Clang defines itself as GCC 4.2.1 and triggers check for GCC lower than
> 4.4.0.\
> This patch adds additional !defined(__clang__) check
> ---
>  mingw-w64-headers/crt/uchar.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mingw-w64-headers/crt/uchar.h b/mingw-w64-headers/crt/uchar.h
> index 475ad87..ab8a26d 100644
> --- a/mingw-w64-headers/crt/uchar.h
> +++ b/mingw-w64-headers/crt/uchar.h
> @@ -30,7 +30,7 @@
>  /* Remember that g++ >= 4.4 defines these types only in c++0x mode */
>  #if !(defined(__cplusplus) && defined(__GXX_EXPERIMENTAL_CXX0X__)) ||
> \
>      !defined(__GNUC__) ||                        \
> -    (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
> +    (!defined(__clang__) && (__GNUC__ < 4 || (__GNUC__ == 4 &&
> __GNUC_MINOR__ < 4)))
>  typedef uint_least16_t char16_t;
>  typedef uint_least32_t char32_t;
>  #endif
> @@ -70,4 +70,3 @@ size_t c32rtomb (char *__restrict__ s,
>  #endif
>
>  #endif /* __UCHAR_H */
> -
> --
> 2.9.1
>
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to