<div dir="ltr"><div>For review by anyone.</div><div><br></div><div>-----------------------------<br></div><div><br></div><div>Fix namespace cleanliness checks with GCC on Windows.<br><br>On Windows, object files created by GCC contain reference pointer symbols<br>beginning with ".refptr.". Ignore these symbols when doing namespace<br>cleanliness checks. They are an implementation detail. If there is<br>an issue with namespace cleanliness, then we can detect and report it for<br>the original symbol for which the reference point was generated.<br><br><a href="http://configure.ac">configure.ac</a>:<br>    Detect whether this platform is one that generates reference pointers<br>    in object code.<br><br><a href="http://Mmake.common.in">Mmake.common.in</a>:<br>    On platforms that have reference pointers, ignore all symbols beginning<br>    with ".refptr." when doing namespace cleanliness checks.<br><br>Julien.<br><br>diff --git a/<a href="http://Mmake.common.in">Mmake.common.in</a> b/<a href="http://Mmake.common.in">Mmake.common.in</a><br>index 7523a7ea1..9f3e0a2f9 100644<br>--- a/<a href="http://Mmake.common.in">Mmake.common.in</a><br>+++ b/<a href="http://Mmake.common.in">Mmake.common.in</a><br>@@ -479,6 +479,15 @@ else<br> MSVC_OBJ_PREFIX_EXPRS =<br> endif<br> <br>+# Ignore reference pointer symbols created by GCC on Windows.<br>+# (See definition of HAVE_REFPTR_SYMS in <a href="http://configure.ac">configure.ac</a> for details.)<br>+ifeq ("@HAVE_REFPTR_SYMS@","yes")<br>+GCC_WIN_OBJ_PREFIX_EXPRS = \<br>+     -e '^\.refptr\.'<br>+else<br>+GCC_WIN_OBJ_PREFIX_EXPRS =<br>+endif<br>+<br> MACRO_PREFIX_EXPRS = \<br>    $(GEN_MACRO_PREFIX_EXPRS) \<br>  $(LIB_MACRO_PREFIX_EXPRS) \<br>@@ -491,7 +500,8 @@ OBJ_PREFIX_EXPRS   = \<br>     $(BROWSER_OBJ_PREFIX_EXPRS) \<br>        $(MDBCOMP_OBJ_PREFIX_EXPRS) \<br>        $(SSDB_OBJ_PREFIX_EXPRS) \<br>-   $(MSVC_OBJ_PREFIX_EXPRS)<br>+     $(MSVC_OBJ_PREFIX_EXPRS) \<br>+   $(GCC_WIN_OBJ_PREFIX_EXPRS)<br> <br> HEADER_CLEAN_FILTER = \<br>   grep -v $(MACRO_PREFIX_EXPRS) | \<br>diff --git a/<a href="http://configure.ac">configure.ac</a> b/<a href="http://configure.ac">configure.ac</a><br>index e1e9ac2dd..5160e0768 100644<br>--- a/<a href="http://configure.ac">configure.ac</a><br>+++ b/<a href="http://configure.ac">configure.ac</a><br>@@ -3236,6 +3236,27 @@ AC_SUBST([SYMPREFIX])<br> <br> #-----------------------------------------------------------------------------#<br> <br>+# On Windows, GCC generates reference pointers in the object code that it<br>+# creates. These are intended to workaround limitations in the PE/COFF format.<br>+# Reference pointer symbol names begin with the prefix ".refptr.".<br>+# We ignore such symbols when doing namespace cleanliness checks since they<br>+# are an implementation detail and if there is a cleanliness issue we will<br>+# report it for the original symbol anyway.<br>+<br>+HAVE_REFPTR_SYMS=<br>+<br>+case "$host" in<br>+    *mingw*|*cygwin*)<br>+        case "$C_COMPILER_TYPE)" in<br>+            gcc*) HAVE_REFPTR_SYMS=yes ;;<br>+        esac<br>+    ;;<br>+esac<br>+<br>+AC_SUBST([HAVE_REFPTR_SYMS])<br>+<br>+#-----------------------------------------------------------------------------#<br>+<br> #<br> # Figure out which is the best grade to use for various different purposes.<br> # In particular, choose the default grade for compiling applications.<br></div><br><br></div>