On 8/4/2015 03:35, Martell Malone wrote:
> Clang defines __rdtsc as inline in intrin.h
> 
> mingw-w64-crt/intrincs/rdtsc.c:9:18: error: redefinition of '__rdtsc'
> unsigned __int64 __rdtsc(void)
>                  ^
> clang\3.7.0\include\ia32intrin.h:89:1: note: previous definition is here
> __rdtsc(void) {
> 
> This bypasses that inline when building the mingw-w64 crt
> 
> Please Review
> 
> diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c
> index 3a5e056..e24b30d 100644
> --- a/mingw-w64-crt/intrincs/rdtsc.c
> +++ b/mingw-w64-crt/intrincs/rdtsc.c
> @@ -4,7 +4,9 @@
>   * No warranty is given; refer to the file DISCLAIMER.PD within this
> package.
>   */
> 
> +#ifdef __GNUC__
>  #include <intrin.h>
> +#endif
> 
>  unsigned __int64 __rdtsc(void)
>  {
> 

It's simple enough, looks good to me.

Attachment: 0xD4EBC740.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to