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

Re: svn commit: r11400 - trunk/subversion/libsvn_delta

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2004-10-14 19:15:25 CEST

kfogel@tigris.org writes:

> Author: kfogel
> Date: Thu Oct 14 11:54:59 2004
> New Revision: 11400
>
> Modified:
> trunk/subversion/libsvn_delta/compose_delta.c
> Log:
> Resolve issue #2096: We were temporarily #defining MIN, and then
> #undefining it when done. But some systems define MIN themselves, and
> not only did our definition replace theirs (not a big deal, since ours
> almost certainly did exactly the same thing as the system's), when we
> later undefined it, we effectively removed both definitions. Oops.
> Solution: use a different name.
>
> * subversion/libsvn_delta/compose_delta.c
> (copy_source_ops): Use TMP_MIN instead of MIN, to avoid overlap with
> a possible system-defined MIN.

Er. I'd feel much better about one of the following two solutions
over the one chosen:

  1. Use conditional definition:

         #ifndef MIN
         #define MIN(a, b) ((a) < (b) ? (a) : (b))
         #endif

      And remove the #undef altogether.

  2. Use SVN_MIN instead of TMP_MIN.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 14 19:17:57 2004

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.