2012/12/22 Jacek Caban <ja...@codeweavers.com>

>  On 12/22/12 1:43 PM, Ruben Van Boxem wrote:
>
>  2012/12/22 Jacek Caban <ja...@codeweavers.com>
>
>>  On 12/22/12 12:23 PM, Kai Tietz wrote:
>> > Please include first the windows.h header, and then do other includes.
>> >
>> > There is nothing to fix on mingw-w64's side.  It might be a
>> > gcc-intrinsic header bug, as API should be artificial but still has
>> > language-binding.  AFAIR there is already a bug-report on gcc's bz
>> > about that.
>> >
>> > See Windows.cpp: line 59 ... move this include at to of include-chain.
>> >
>>
>>  We already have workarounds for this kind of things in the tree, we just
>> need to extend it for this particular intrin. I will prepare a patch
>> later.
>>
>
>  Thanks!
>
>
> Here is a patch ready for tests:
>
> http://repo.or.cz/w/mingw-w64/jacek.git/commitdiff/5fae66d9afe5ed89f4a5f6123a5559b138ac23e1
> I will have it tested and ready for commit tomorrow, after my cron jobs
> run with it deployed.
>

My quick testing by manually applying the patch to the previously built
toolchain shows you missed one in winnt.h:
In file included from
m:\development\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.0\include\x86intrin.h:27:0,
                 from
m:\development\mingw64\include\c++\4.8.0\bits\opt_random.h:33,
                 from m:\development\mingw64\include\c++\4.8.0\random:51,
                 from
m:\development\mingw64\include\c++\4.8.0\bits\stl_algo.h:67,
                 from m:\development\mingw64\include\c++\4.8.0\algorithm:63,
                 from
..\..\..\Source\Ambrosia\libAmbrosia\Include/Ambrosia/algorithm.h:33,
                 from
..\..\..\Source\Ambrosia\libAmbrosia\Source\Platform\windows.cpp:23:
m:\development\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.0\include\ia32intrin.h:95:1:
error: previous declaration of 'long long unsigned int __rdtsc()' with
'C++' linkage
 __rdtsc (void)
 ^
In file included from
m:\development\mingw64\x86_64-w64-mingw32\include\windef.h:139:0,
                 from
m:\development\mingw64\x86_64-w64-mingw32\include\windows.h:69,
                 from
..\..\..\Source\Ambrosia\libAmbrosia\Source\Platform\windows.cpp:53:
m:\development\mingw64\x86_64-w64-mingw32\include\winnt.h:1513:52: error:
conflicts with new declaration with 'C' linkage
     __MINGW_EXTENSION unsigned __int64 __rdtsc(void);
                                                    ^

Guarding this declaration with #ifndef __GNUC__ ... #endif allows my code
to be compiled as previously was possible.

Thanks!

Ruben


>
> Jacek
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to