subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1488803 - in /subversion/trunk/build/generator: gen_base.py gen_win.py
Date Sun, 02 Jun 2013 22:34:53 GMT
Author: danielsh
Date: Sun Jun  2 22:34:53 2013
New Revision: 1488803

URL: http://svn.apache.org/r1488803
Log:
windows build: Silence a false positive warning.

Tested by: jcorvel

* build/generator/gen_base.py
  (GeneratorBase.write_errno_table): Make this an instance method, rather than
    a static one.  Use self.errno_filter.
  (GeneratorBase.errno_filter): Provide default implementation.

* build/generator/gen_win.py
  (WinGeneratorBase.errno_filter): Override the default implementation.

Modified:
    subversion/trunk/build/generator/gen_base.py
    subversion/trunk/build/generator/gen_win.py

Modified: subversion/trunk/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_base.py?rev=1488803&r1=1488802&r2=1488803&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_base.py (original)
+++ subversion/trunk/build/generator/gen_base.py Sun Jun  2 22:34:53 2013
@@ -239,8 +239,7 @@ class GeneratorBase:
         except: pass
         os.rename(new_hdrfile, hdrfile)
 
-  @staticmethod
-  def write_errno_table():
+  def write_errno_table(self):
     # ### We generate errorcode.inc at autogen.sh time (here!).
     # ###
     # ### Currently it's only used by maintainer-mode builds.  If this
@@ -278,9 +277,12 @@ class GeneratorBase:
 
     ## sanity check
     intersection = set(errno.errorcode.keys()) & set(dict(aprerr).keys())
-    if intersection:
+    if self.errno_filter(intersection):
         print("WARNING: errno intersects APR error codes: %r" % intersection)
 
+  def errno_filter(self, codes):
+    return codes
+
 class DependencyGraph:
   """Record dependencies between build items.
 

Modified: subversion/trunk/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1488803&r1=1488802&r2=1488803&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Sun Jun  2 22:34:53 2013
@@ -337,6 +337,11 @@ class WinGeneratorBase(GeneratorBase):
     else:
       print("%s not found; skipping SWIG file generation..." % self.swig_exe)
 
+  def errno_filter(self, codes):
+    "Callback for gen_base.write_errno_table()."
+    # Filter out apr_errno.h SOC* codes, which alias the windows API names.
+    return set(filter(lambda code: not (10000 <= code <= 10100), codes))
+
   def find_rootpath(self):
     "Gets the root path as understand by the project system"
     return os.path.relpath('.', self.projfilesdir) + "\\"



Mime
View raw message