[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[patch] Don't define snprintf for Ruby MSDEV projects in gen_win.py

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-04-22 23:31:11 CEST

I'm trying to reduce the noise when building the Ruby bindings. So I
don't get too used to so many warnings.

[[[
Deal with compiler warning for narrowing conversion

* build/generator/gen_win.py
(get_win_defines): Don't define snprintf for the Ruby projects since ruby.h
has its own definition available.

]]]

Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py (revision 24695)
+++ build/generator/gen_win.py (working copy)
@@ -747,12 +747,15 @@
     "Return the list of defines for target"

     fakedefines = ["WIN32","_WINDOWS","alloca=_alloca",
- "snprintf=_snprintf", "_CRT_SECURE_NO_DEPRECATE=",
+ "_CRT_SECURE_NO_DEPRECATE=",
                    "_CRT_NONSTDC_NO_DEPRECATE="]
     if isinstance(target, gen_base.TargetApacheMod):
       if target.name == 'mod_dav_svn':
         fakedefines.extend(["AP_DECLARE_EXPORT"])

+ if -1 == target.name.find('ruby'):
+ fakedefines.append("snprintf=_snprintf")
+
     if isinstance(target, gen_base.TargetSWIG):
       fakedefines.append("SWIG_GLOBAL")

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 22 23:31:22 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.