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

"C. Michael Pilato" <[email protected]> 14 Oct 2004 12:15:25 -0500
Newsgroups gmane.comp.version-control.subversion.svn,gmane.mail.eyebrowse.devel
Message-ID <[email protected]>
[email protected] 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.