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

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

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-04-23 18:13:48 CEST

On Sun, 22 Apr 2007, Joe Swatosh wrote:

> 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")

I'd rather see this writter as "target.name.find('ruby') == -1"

> +
> if isinstance(target, gen_base.TargetSWIG):
> fakedefines.append("SWIG_GLOBAL")

  • application/pgp-signature attachment: stored
Received on Mon Apr 23 18:14:24 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.