There is a compile warning coming from intrincs/membarrier.c:

/../../mingw-w64/mingw-w64-crt/intrincs/membarrier.c:4:6: warning: no previous prototype for 'MemoryBarrier' [-Wmissing-prototypes]/

There are two ways to fix it.

1) The easy, non-controversial way is to just add the prototype to the file. And maybe to add the x64 version of code for slightly faster performance.

2) Of course I'm going to recommend the other fix which is to delete this file. MemoryBarrier is NOT an intrinsic (ie it is not implemented as a builtin by the MSVC compiler). According to MSDN <http://msdn.microsoft.com/en-us/library/ms684208%28v=VS.85%29.aspx> It's just an macro that's defined in winnt.h. Which we already do.

The attached patch does the delete. I can create the other patch instead if that seems like a better approach.

dw


Index: intrincs/membarrier.c
===================================================================
--- intrincs/membarrier.c	(revision 5979)
+++ intrincs/membarrier.c	(working copy)
@@ -1,10 +0,0 @@
-#include <intrin.h>
-
-/* for x86 only */
-void MemoryBarrier (void)
-{
-    __LONG32 Barrier = 0;
-    __asm__ __volatile__("xchgl %%eax,%0 "
-      :"=r" (Barrier));
-}
-
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 5979)
+++ Makefile.am	(working copy)
@@ -287,7 +287,7 @@
 
 # these only go into the 32 bit version:
 src_intrincs32=\
-  intrincs/membarrier.c   intrincs/readfsbyte.c   intrincs/readfsword.c   intrincs/readfsdword.c  \
+  intrincs/readfsbyte.c   intrincs/readfsword.c   intrincs/readfsdword.c  \
   intrincs/writefsbyte.c  intrincs/writefsword.c  intrincs/writefsdword.c
 
 if LIB32
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to