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

[PATCH] Moved a misplaced #define

From: Refael Ackermann <mose_at_netvision.net.il>
Date: 2004-10-02 18:00:46 CEST

There is/was a badly placed define in libsvn_delta/compose_delta.c
It broke the build process for me (redifining #define MIN).
I moved the #define into libsvn_delta/delta.h wraped in #ifndef.

/moseack

[[[
Moving a badly placed #define from libsvn_delta/compose_delta.c

* subversion/libsvn_delta/compose_delta.c
   (copy_source_ops) Removed embedded #define MIN

* subversion/libsvn_delta/delta.h
   Added #define MIN inside #ifndef MIN
]]]

Index: subversion/libsvn_delta/compose_delta.c
===================================================================
--- subversion/libsvn_delta/compose_delta.c (revision 11207)
+++ subversion/libsvn_delta/compose_delta.c (working copy)
@@ -667,8 +667,6 @@
               apr_size_t fix_off = fix_offset;
               apr_size_t tgt_off = target_offset;
               assert(ptn_length > ptn_overlap);
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
               if (ptn_overlap >= 0)
                 {
                   /* Issue second subrange in the pattern. */
Index: subversion/libsvn_delta/delta.h
===================================================================
--- subversion/libsvn_delta/delta.h (revision 11207)
+++ subversion/libsvn_delta/delta.h (working copy)
@@ -28,7 +28,11 @@
 #ifndef SVN_LIBSVN_DELTA_H
 #define SVN_LIBSVN_DELTA_H
 
+#ifndef MIN /* Stiking in delta.c un-ifndef-ed is just wrong */
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 3 16:45:29 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.