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

Re: [PATCH] Moved a misplaced #define

From: Refael Ackermann <mose_at_netvision.net.il>
Date: 2004-10-03 14:33:39 CEST

At 03:17 03/10/2004, you wrote:
>On Sat, 2004-10-02 at 17:00, Refael Ackermann wrote:
> > There is/was a badly placed define in libsvn_delta/compose_delta.c
> > It broke the build process for me (redefining #define MIN).
> > I moved the #define into libsvn_delta/delta.h wrapped in #ifndef.
>
>I can understand the #ifndef test, but why the move to delta.h?

Where I come from #defines are centralized in the local .h file.

> > +#ifndef MIN /* Stiking in delta.c un-ifndef-ed is just wrong */
> > +#define MIN(a, b) ((a) < (b) ? (a) : (b))
> > +#endif
>
>This comment won't make any sense to a reader unfamiliar with the
>history of the code.

The comment was a hot-headed mistake.
It could be removed or replaced with

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 /* Used in compose_delta.c(copy_source_ops) */
+#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 14:33:55 2004

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