Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
On 07/01/2017 05:01 PM, Martell Malone wrote: > Can I apply this to master? > I have pigged this 3 times > I don't see any obvious issues with it, go ahead. signature.asc Description: OpenPGP digital signature -- 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] intrincs: check for __rdtsc
Can I apply this to master? I have pigged this 3 times On Sun, Jun 4, 2017 at 1:21 AM, Martell Malonewrote: > ping, don't let this one die on me please :) > > On Sun, May 21, 2017 at 7:05 PM, Martell Malone > wrote: > >> ping :) >> >> On Thu, May 11, 2017 at 2:10 PM, Martell Malone >> wrote: >> >>> Thanks Kai, >>> >>> We probably don't need to push and pop because this is not a header to >>> be installed >>> >>> Updated diff >>> >>> diff --git a/mingw-w64-crt/intrincs/rdtsc.c >>> b/mingw-w64-crt/intrincs/rdtsc.c >>> index fd9cb75d..bf9c03b3 100644 >>> --- a/mingw-w64-crt/intrincs/rdtsc.c >>> +++ b/mingw-w64-crt/intrincs/rdtsc.c >>> @@ -4,11 +4,14 @@ >>> * No warranty is given; refer to the file DISCLAIMER.PD within this >>> package. >>> */ >>> -#ifdef __clang__ >>> -#define __IA32INTRIN_H >>> -#endif >>> #include >>> +/* Clang has support for MSVC builtins, GCC doesn't */ >>> +#ifndef __has_builtin >>> + #define __has_builtin(x) 0 >>> +#endif >>> + >>> +#if !__has_builtin(__rdtsc) >>> unsigned __int64 __rdtsc(void) >>> { >>> #ifdef _WIN64 >>> @@ -21,4 +24,4 @@ unsigned __int64 __rdtsc(void) >>>: "=a" (val1), "=d" (val2)); >>>return ((unsigned __int64)val1) | (((unsigned __int64)val2) << >>> 32); >>> } >>> - >>> +#endif >>> >>> On Thu, May 11, 2017 at 1:15 PM, Kai Tietz >>> wrote: >>> Hmm, where is the corresponding pop_macro pragma? Regards, Kai 2017-05-11 14:09 GMT+02:00 Martell Malone : >> >> While it's not "good form" to have the prototype >> in multiple places... > > Attached updated diff > > Please Review > > diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c > index fd9cb75d..7c5adeb0 100644 > --- a/mingw-w64-crt/intrincs/rdtsc.c > +++ b/mingw-w64-crt/intrincs/rdtsc.c > @@ -4,11 +4,15 @@ > * No warranty is given; refer to the file DISCLAIMER.PD within this > package. > */ > -#ifdef __clang__ > -#define __IA32INTRIN_H > -#endif > #include > +/* Clang has support for MSVC builtins, GCC doesn't */ > +#pragma push_macro("__has_builtin") > +#ifndef __has_builtin > + #define __has_builtin(x) 0 > +#endif > + > +#if !__has_builtin(__rdtsc) > unsigned __int64 __rdtsc(void) > { > #ifdef _WIN64 > @@ -21,4 +25,4 @@ unsigned __int64 __rdtsc(void) >: "=a" (val1), "=d" (val2)); >return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); > } > - > +#endif > > On Sun, Apr 16, 2017 at 3:06 AM, David Wohlferd < d...@limegreensocks.com> > wrote: > >> On 4/14/2017 7:14 AM, Martell Malone wrote: >> > Updated clang no longer defines __IA32INTRIN_H so lets do this properly. >> >> It appears that the only use for in that file is the >> prototype for __rdtsc. While it's not "good form" to have the prototype >> in multiple places... >> >> > I assume intrin-impl.h is only ever included by intrin.h? >> >> Fraid not. >> >> mingw-w64-headers\include\winbase.h:#include >> mingw-w64-headers\include\winnt.h:#include >> >> > If not I will have to find a way to deal with __has_builtin in both files >> >> >> >> -- >> 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 -- 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
Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
ping, don't let this one die on me please :) On Sun, May 21, 2017 at 7:05 PM, Martell Malonewrote: > ping :) > > On Thu, May 11, 2017 at 2:10 PM, Martell Malone > wrote: > >> Thanks Kai, >> >> We probably don't need to push and pop because this is not a header to be >> installed >> >> Updated diff >> >> diff --git a/mingw-w64-crt/intrincs/rdtsc.c >> b/mingw-w64-crt/intrincs/rdtsc.c >> index fd9cb75d..bf9c03b3 100644 >> --- a/mingw-w64-crt/intrincs/rdtsc.c >> +++ b/mingw-w64-crt/intrincs/rdtsc.c >> @@ -4,11 +4,14 @@ >> * No warranty is given; refer to the file DISCLAIMER.PD within this >> package. >> */ >> -#ifdef __clang__ >> -#define __IA32INTRIN_H >> -#endif >> #include >> +/* Clang has support for MSVC builtins, GCC doesn't */ >> +#ifndef __has_builtin >> + #define __has_builtin(x) 0 >> +#endif >> + >> +#if !__has_builtin(__rdtsc) >> unsigned __int64 __rdtsc(void) >> { >> #ifdef _WIN64 >> @@ -21,4 +24,4 @@ unsigned __int64 __rdtsc(void) >>: "=a" (val1), "=d" (val2)); >>return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); >> } >> - >> +#endif >> >> On Thu, May 11, 2017 at 1:15 PM, Kai Tietz >> wrote: >> >>> Hmm, where is the corresponding pop_macro pragma? >>> >>> Regards, >>> Kai >>> >>> 2017-05-11 14:09 GMT+02:00 Martell Malone : >>> >> >>> >> While it's not "good form" to have the prototype >>> >> in multiple places... >>> > >>> > Attached updated diff >>> > >>> > Please Review >>> > >>> > diff --git a/mingw-w64-crt/intrincs/rdtsc.c >>> b/mingw-w64-crt/intrincs/rdtsc.c >>> > index fd9cb75d..7c5adeb0 100644 >>> > --- a/mingw-w64-crt/intrincs/rdtsc.c >>> > +++ b/mingw-w64-crt/intrincs/rdtsc.c >>> > @@ -4,11 +4,15 @@ >>> > * No warranty is given; refer to the file DISCLAIMER.PD within this >>> > package. >>> > */ >>> > -#ifdef __clang__ >>> > -#define __IA32INTRIN_H >>> > -#endif >>> > #include >>> > +/* Clang has support for MSVC builtins, GCC doesn't */ >>> > +#pragma push_macro("__has_builtin") >>> > +#ifndef __has_builtin >>> > + #define __has_builtin(x) 0 >>> > +#endif >>> > + >>> > +#if !__has_builtin(__rdtsc) >>> > unsigned __int64 __rdtsc(void) >>> > { >>> > #ifdef _WIN64 >>> > @@ -21,4 +25,4 @@ unsigned __int64 __rdtsc(void) >>> >: "=a" (val1), "=d" (val2)); >>> >return ((unsigned __int64)val1) | (((unsigned __int64)val2) << >>> 32); >>> > } >>> > - >>> > +#endif >>> > >>> > On Sun, Apr 16, 2017 at 3:06 AM, David Wohlferd >> > >>> > wrote: >>> > >>> >> On 4/14/2017 7:14 AM, Martell Malone wrote: >>> >> > Updated clang no longer defines __IA32INTRIN_H so lets do this >>> properly. >>> >> >>> >> It appears that the only use for in that file is the >>> >> prototype for __rdtsc. While it's not "good form" to have the >>> prototype >>> >> in multiple places... >>> >> >>> >> > I assume intrin-impl.h is only ever included by intrin.h? >>> >> >>> >> Fraid not. >>> >> >>> >> mingw-w64-headers\include\winbase.h:#include >>> >> mingw-w64-headers\include\winnt.h:#include >>> >> >>> >> > If not I will have to find a way to deal with __has_builtin in both >>> files >>> >> >>> >> >>> >> >>> >> -- >>> >> 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 >>> >>> >>> -- >>> 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
Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
ping :) On Thu, May 11, 2017 at 2:10 PM, Martell Malonewrote: > Thanks Kai, > > We probably don't need to push and pop because this is not a header to be > installed > > Updated diff > > diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/ > rdtsc.c > index fd9cb75d..bf9c03b3 100644 > --- a/mingw-w64-crt/intrincs/rdtsc.c > +++ b/mingw-w64-crt/intrincs/rdtsc.c > @@ -4,11 +4,14 @@ > * No warranty is given; refer to the file DISCLAIMER.PD within this > package. > */ > -#ifdef __clang__ > -#define __IA32INTRIN_H > -#endif > #include > +/* Clang has support for MSVC builtins, GCC doesn't */ > +#ifndef __has_builtin > + #define __has_builtin(x) 0 > +#endif > + > +#if !__has_builtin(__rdtsc) > unsigned __int64 __rdtsc(void) > { > #ifdef _WIN64 > @@ -21,4 +24,4 @@ unsigned __int64 __rdtsc(void) >: "=a" (val1), "=d" (val2)); >return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); > } > - > +#endif > > On Thu, May 11, 2017 at 1:15 PM, Kai Tietz > wrote: > >> Hmm, where is the corresponding pop_macro pragma? >> >> Regards, >> Kai >> >> 2017-05-11 14:09 GMT+02:00 Martell Malone : >> >> >> >> While it's not "good form" to have the prototype >> >> in multiple places... >> > >> > Attached updated diff >> > >> > Please Review >> > >> > diff --git a/mingw-w64-crt/intrincs/rdtsc.c >> b/mingw-w64-crt/intrincs/rdtsc.c >> > index fd9cb75d..7c5adeb0 100644 >> > --- a/mingw-w64-crt/intrincs/rdtsc.c >> > +++ b/mingw-w64-crt/intrincs/rdtsc.c >> > @@ -4,11 +4,15 @@ >> > * No warranty is given; refer to the file DISCLAIMER.PD within this >> > package. >> > */ >> > -#ifdef __clang__ >> > -#define __IA32INTRIN_H >> > -#endif >> > #include >> > +/* Clang has support for MSVC builtins, GCC doesn't */ >> > +#pragma push_macro("__has_builtin") >> > +#ifndef __has_builtin >> > + #define __has_builtin(x) 0 >> > +#endif >> > + >> > +#if !__has_builtin(__rdtsc) >> > unsigned __int64 __rdtsc(void) >> > { >> > #ifdef _WIN64 >> > @@ -21,4 +25,4 @@ unsigned __int64 __rdtsc(void) >> >: "=a" (val1), "=d" (val2)); >> >return ((unsigned __int64)val1) | (((unsigned __int64)val2) << >> 32); >> > } >> > - >> > +#endif >> > >> > On Sun, Apr 16, 2017 at 3:06 AM, David Wohlferd >> > wrote: >> > >> >> On 4/14/2017 7:14 AM, Martell Malone wrote: >> >> > Updated clang no longer defines __IA32INTRIN_H so lets do this >> properly. >> >> >> >> It appears that the only use for in that file is the >> >> prototype for __rdtsc. While it's not "good form" to have the >> prototype >> >> in multiple places... >> >> >> >> > I assume intrin-impl.h is only ever included by intrin.h? >> >> >> >> Fraid not. >> >> >> >> mingw-w64-headers\include\winbase.h:#include >> >> mingw-w64-headers\include\winnt.h:#include >> >> >> >> > If not I will have to find a way to deal with __has_builtin in both >> files >> >> >> >> >> >> >> >> -- >> >> 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 >> >> >> -- >> 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
Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
Thanks Kai, We probably don't need to push and pop because this is not a header to be installed Updated diff diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c index fd9cb75d..bf9c03b3 100644 --- a/mingw-w64-crt/intrincs/rdtsc.c +++ b/mingw-w64-crt/intrincs/rdtsc.c @@ -4,11 +4,14 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ -#ifdef __clang__ -#define __IA32INTRIN_H -#endif #include +/* Clang has support for MSVC builtins, GCC doesn't */ +#ifndef __has_builtin + #define __has_builtin(x) 0 +#endif + +#if !__has_builtin(__rdtsc) unsigned __int64 __rdtsc(void) { #ifdef _WIN64 @@ -21,4 +24,4 @@ unsigned __int64 __rdtsc(void) : "=a" (val1), "=d" (val2)); return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); } - +#endif On Thu, May 11, 2017 at 1:15 PM, Kai Tietzwrote: > Hmm, where is the corresponding pop_macro pragma? > > Regards, > Kai > > 2017-05-11 14:09 GMT+02:00 Martell Malone : > >> > >> While it's not "good form" to have the prototype > >> in multiple places... > > > > Attached updated diff > > > > Please Review > > > > diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/ > rdtsc.c > > index fd9cb75d..7c5adeb0 100644 > > --- a/mingw-w64-crt/intrincs/rdtsc.c > > +++ b/mingw-w64-crt/intrincs/rdtsc.c > > @@ -4,11 +4,15 @@ > > * No warranty is given; refer to the file DISCLAIMER.PD within this > > package. > > */ > > -#ifdef __clang__ > > -#define __IA32INTRIN_H > > -#endif > > #include > > +/* Clang has support for MSVC builtins, GCC doesn't */ > > +#pragma push_macro("__has_builtin") > > +#ifndef __has_builtin > > + #define __has_builtin(x) 0 > > +#endif > > + > > +#if !__has_builtin(__rdtsc) > > unsigned __int64 __rdtsc(void) > > { > > #ifdef _WIN64 > > @@ -21,4 +25,4 @@ unsigned __int64 __rdtsc(void) > >: "=a" (val1), "=d" (val2)); > >return ((unsigned __int64)val1) | (((unsigned __int64)val2) << > 32); > > } > > - > > +#endif > > > > On Sun, Apr 16, 2017 at 3:06 AM, David Wohlferd > > wrote: > > > >> On 4/14/2017 7:14 AM, Martell Malone wrote: > >> > Updated clang no longer defines __IA32INTRIN_H so lets do this > properly. > >> > >> It appears that the only use for in that file is the > >> prototype for __rdtsc. While it's not "good form" to have the prototype > >> in multiple places... > >> > >> > I assume intrin-impl.h is only ever included by intrin.h? > >> > >> Fraid not. > >> > >> mingw-w64-headers\include\winbase.h:#include > >> mingw-w64-headers\include\winnt.h:#include > >> > >> > If not I will have to find a way to deal with __has_builtin in both > files > >> > >> > >> > >> -- > >> 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 > > > -- > 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
Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
> > While it's not "good form" to have the prototype > in multiple places... Attached updated diff Please Review diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c index fd9cb75d..7c5adeb0 100644 --- a/mingw-w64-crt/intrincs/rdtsc.c +++ b/mingw-w64-crt/intrincs/rdtsc.c @@ -4,11 +4,15 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ -#ifdef __clang__ -#define __IA32INTRIN_H -#endif #include +/* Clang has support for MSVC builtins, GCC doesn't */ +#pragma push_macro("__has_builtin") +#ifndef __has_builtin + #define __has_builtin(x) 0 +#endif + +#if !__has_builtin(__rdtsc) unsigned __int64 __rdtsc(void) { #ifdef _WIN64 @@ -21,4 +25,4 @@ unsigned __int64 __rdtsc(void) : "=a" (val1), "=d" (val2)); return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); } - +#endif On Sun, Apr 16, 2017 at 3:06 AM, David Wohlferdwrote: > On 4/14/2017 7:14 AM, Martell Malone wrote: > > Updated clang no longer defines __IA32INTRIN_H so lets do this properly. > > It appears that the only use for in that file is the > prototype for __rdtsc. While it's not "good form" to have the prototype > in multiple places... > > > I assume intrin-impl.h is only ever included by intrin.h? > > Fraid not. > > mingw-w64-headers\include\winbase.h:#include > mingw-w64-headers\include\winnt.h:#include > > > If not I will have to find a way to deal with __has_builtin in both files > > > > -- > 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
Re: [Mingw-w64-public] [PATCH] intrincs: check for __rdtsc
On 4/14/2017 7:14 AM, Martell Malone wrote: > Updated clang no longer defines __IA32INTRIN_H so lets do this properly. It appears that the only use for in that file is the prototype for __rdtsc. While it's not "good form" to have the prototype in multiple places... > I assume intrin-impl.h is only ever included by intrin.h? Fraid not. mingw-w64-headers\include\winbase.h:#include mingw-w64-headers\include\winnt.h:#include > If not I will have to find a way to deal with __has_builtin in both files -- 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] intrincs: check for __rdtsc
Updated clang no longer defines __IA32INTRIN_H so lets do this properly. I assume intrin-impl.h is only ever included by intrin.h? If not I will have to find a way to deal with __has_builtin in both files Please Review Kind Regards Martell diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c index fd9cb75d..11e8d597 100644 --- a/mingw-w64-crt/intrincs/rdtsc.c +++ b/mingw-w64-crt/intrincs/rdtsc.c @@ -4,11 +4,9 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ -#ifdef __clang__ -#define __IA32INTRIN_H -#endif #include +#if !__has_builtin(__rdtsc) unsigned __int64 __rdtsc(void) { #ifdef _WIN64 @@ -21,4 +19,4 @@ unsigned __int64 __rdtsc(void) : "=a" (val1), "=d" (val2)); return ((unsigned __int64)val1) | (((unsigned __int64)val2) << 32); } - +#endif diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h index 0b2343fb..75bc3e30 100644 --- a/mingw-w64-headers/crt/intrin.h +++ b/mingw-w64-headers/crt/intrin.h @@ -38,6 +38,13 @@ #include #endif #include + +/* Clang has support for MSVC builtins, GCC doesn't */ +#pragma push_macro("__has_builtin") +#ifndef __has_builtin + #define __has_builtin(x) 0 +#endif + #include /* diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-headers/include/psdk_inc/intrin-impl.h index 340d6fba..58af8804 100644 --- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h +++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h @@ -61,12 +61,6 @@ __INTRINSICS_USEINLINE #ifdef __MINGW_INTRIN_INLINE -/* Clang has support for MSVC builtins, GCC doesn't */ -#pragma push_macro("__has_builtin") -#ifndef __has_builtin - #define __has_builtin(x) 0 -#endif - /* These macros are used by the routines below. While this file may be included multiple times, these macros only need to be defined once. */ #ifndef _INTRIN_MAC_ -- 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