Re: [Mingw-w64-public] [PATCH] headers: Temporarily undefine _Bool when typedeffing std::_Bool

2018-02-23 Thread Martin Storsjö

On Fri, 23 Feb 2018, Kai Tietz via Mingw-w64-public wrote:


Ok, thanks.


Thanks, pushed both.

// Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] headers: Temporarily undefine _Bool when typedeffing std::_Bool

2018-02-23 Thread Kai Tietz via Mingw-w64-public
Ok, thanks.

Cheers,
Kai

2018-02-23 11:02 GMT+01:00 Martin Storsjö :
> This fixes building the following with libc++:
>
> #include 
> #include 
>
> With libc++, yvals.h is implicitly included by anything that includes
> locales (via xlocinfo.h).
>
> Signed-off-by: Martin Storsjö 
> ---
>  mingw-w64-headers/crt/yvals.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/mingw-w64-headers/crt/yvals.h b/mingw-w64-headers/crt/yvals.h
> index 70593c4..15130e4 100644
> --- a/mingw-w64-headers/crt/yvals.h
> +++ b/mingw-w64-headers/crt/yvals.h
> @@ -163,9 +163,12 @@
>  #define _Restrict __restrict__
>
>  #ifdef __cplusplus
> +#pragma push_macro("_Bool")
> +#undef _Bool
>  _STD_BEGIN
>  typedef bool _Bool;
>  _STD_END
> +#pragma pop_macro("_Bool")
>  #endif
>
>  #define _LONGLONG /* __MINGW_EXTENSION */ __int64
> --
> 2.7.4
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] headers: Temporarily undefine _Bool when typedeffing std::_Bool

2018-02-23 Thread Martin Storsjö
This fixes building the following with libc++:

#include 
#include 

With libc++, yvals.h is implicitly included by anything that includes
locales (via xlocinfo.h).

Signed-off-by: Martin Storsjö 
---
 mingw-w64-headers/crt/yvals.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mingw-w64-headers/crt/yvals.h b/mingw-w64-headers/crt/yvals.h
index 70593c4..15130e4 100644
--- a/mingw-w64-headers/crt/yvals.h
+++ b/mingw-w64-headers/crt/yvals.h
@@ -163,9 +163,12 @@
 #define _Restrict __restrict__
 
 #ifdef __cplusplus
+#pragma push_macro("_Bool")
+#undef _Bool
 _STD_BEGIN
 typedef bool _Bool;
 _STD_END
+#pragma pop_macro("_Bool")
 #endif
 
 #define _LONGLONG /* __MINGW_EXTENSION */ __int64
-- 
2.7.4


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public