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

RE: svn commit: r39926 - trunk

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 10 Oct 2009 20:23:26 +0200 (Jerusalem Standard Time)

Bert Huijben wrote on Sat, 10 Oct 2009 at 19:26 +0200:
>
>
> > -----Original Message-----
> > From: Daniel Shahaf [mailto:d.s_at_daniel.shahaf.name]
> > Sent: zaterdag 10 oktober 2009 19:15
> > To: Bert Huijben
> > Cc: dev_at_subversion.tigris.org; svn_at_subversion.tigris.org
> > Subject: RE: svn commit: r39926 - trunk
> >
> > Bert Huijben wrote on Sat, 10 Oct 2009 at 18:51 +0200:
> > > > Fix the Windows build.
> > > >
> > > > * build.conf (libsvn_subr): Export svn_debug.h.
> > >
> > > This fixes the Windows shared library build for debug mode, but it
> > breaks
> > > the Windows build for release mode.. See the buildbots.
> > >
> >
> > Thanks, I haven't noticed they broke.
> >
> > > libsvn_subr.def : error LNK2001: unresolved external symbol
> > > svn_dbg__preamble
> > > libsvn_subr.def : error LNK2001: unresolved external symbol
> > svn_dbg__printf
> > > ..\..\..\Release\subversion\libsvn_subr\libsvn_subr-1.lib : fatal
> > error
> > > LNK1120: 2 unresolved externals
> > >
> >
> > What do you suggest then? Without this change I get the same error
> > when
> > I try to use SVN_DBG in debug builds.
> >
> > Could we just define the svn_dbg__* functions unconditionally? (and
> > make them no-ops if SVN_DEBUG is not defined)
>
> I think that would be safe. But we might just define them always as the
> macros remove the call sites anyway. (And this would allow using them from a
> debug mode application compiled against a release library).
>

Something like this? I tested it and it doesn't behave as I expected it
to; but I'm too confused to decide whether it's because the patch is bad
or because I'm not rebuilding correctly.

I should get some rest now...

Daniel

[[[
Index: subversion/include/private/svn_debug.h
===================================================================
--- subversion/include/private/svn_debug.h (revision 39926)
+++ subversion/include/private/svn_debug.h (working copy)
@@ -83,5 +83,8 @@ svn_dbg__printf(const char *fmt, ...);
 }
 #endif /* __cplusplus */
 
+#else /* SVN_DEBUG */
+#define SVN_DBG(ARGS) /* nothing */
 #endif /* SVN_DEBUG */
+
 #endif /* SVN_DEBUG_H */
Index: subversion/libsvn_subr/debug.c
===================================================================
--- subversion/libsvn_subr/debug.c (revision 39926)
+++ subversion/libsvn_subr/debug.c (working copy)
@@ -21,9 +21,6 @@
  * ====================================================================
  */
 
-/* These functions are only available to SVN developers. */
-#ifdef SVN_DEBUG
-
 #include <stdarg.h>
 
 #include "svn_types.h"
@@ -78,5 +75,3 @@ svn_dbg__printf(const char *fmt, ...)
   va_end(ap);
 }
 
-
-#endif /* SVN_DEBUG */
Index: subversion/svnversion/main.c
===================================================================
--- subversion/svnversion/main.c (revision 39926)
+++ subversion/svnversion/main.c (working copy)
@@ -26,6 +26,8 @@
 #include "svn_utf.h"
 #include "svn_opt.h"
 
+#include "private/svn_debug.h"
+
 #include "svn_private_config.h"
 
 #define SVNVERSION_OPT_VERSION SVN_OPT_FIRST_LONGOPT_ID
@@ -210,6 +212,8 @@ main(int argc, const char *argv[])
       return EXIT_FAILURE;
     }
 
+ SVN_DBG(("done options parsing\n"));
+
   SVN_INT_ERR(svn_utf_cstring_to_utf8
               (&wc_path, (os->ind < argc) ? os->argv[os->ind] : ".",
                pool));
]]]

> Bert
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406124
Received on 2009-10-10 20:23:39 CEST

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.