to recompile tethereal.o etc each time the svn version has changed,
relinking is sufficient.
I'm not sure what to do about mergecap, as it currently doesn't link
against version_info, so it's "overhead" either way.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15371
f5534014-38df-0310-8fa8-
9805f1628bb7
#include "text_page.h"
#endif
#include "text_page.h"
#endif
-#include "svnversion.h"
-
#include "../image/eicon3d64.xpm"
#include "gtkglobals.h"
#include "../image/eicon3d64.xpm"
#include "gtkglobals.h"
+#include "version_info.h"
extern GString *comp_info_str, *runtime_info_str;
extern GString *comp_info_str, *runtime_info_str;
/* Construct the message string */
message = g_strdup_printf(
/* Construct the message string */
message = g_strdup_printf(
- "Version " VERSION
-#ifdef SVNVERSION
- " (" SVNVERSION ")"
-#endif
+ "Version " VERSION "%s"
" (C) 1998-2005 Gerald Combs <gerald@ethereal.com>\n\n"
"%s\n\n"
"%s\n\n"
" (C) 1998-2005 Gerald Combs <gerald@ethereal.com>\n\n"
"%s\n\n"
"%s\n\n"
"Ethereal is Open Source Software released under the GNU General Public License.\n\n"
"Check the man page and http://www.ethereal.com for more information.",
"Ethereal is Open Source Software released under the GNU General Public License.\n\n"
"Check the man page and http://www.ethereal.com for more information.",
- comp_info_str->str, runtime_info_str->str);
+ svnversion, comp_info_str->str, runtime_info_str->str);
msg_label = gtk_label_new(message);
g_free(message);
msg_label = gtk_label_new(message);
g_free(message);
#include <epan/addr_resolv.h>
/* general (not GTK specific) */
#include <epan/addr_resolv.h>
/* general (not GTK specific) */
#include "file.h"
#include "summary.h"
#include "filters.h"
#include "file.h"
#include "summary.h"
#include "filters.h"
if (print_ver) {
output = stdout;
if (print_ver) {
output = stdout;
- fprintf(output, "This is "PACKAGE " " VERSION
-#ifdef SVNVERSION
- " (" SVNVERSION ")"
-#endif
+ fprintf(output, "This is "PACKAGE " " VERSION "%s"
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\n\n%s\n\n%s\n",
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\n\n%s\n\n%s\n",
- comp_info_str->str, runtime_info_str->str);
+ svnversion, comp_info_str->str, runtime_info_str->str);
} else {
output = stderr;
}
} else {
output = stderr;
}
#include "getopt.h"
#endif
#include "getopt.h"
#endif
-#include "svnversion.h"
-
#include <glib.h>
#include <epan/epan.h>
#include <epan/filesystem.h>
#include <glib.h>
#include <epan/epan.h>
#include <epan/filesystem.h>
if (print_ver) {
output = stdout;
if (print_ver) {
output = stdout;
- fprintf(output, "This is GNU t" PACKAGE " " VERSION
-#ifdef SVNVERSION
- " (" SVNVERSION ")"
-#endif
+ fprintf(output, "This is GNU t" PACKAGE " " VERSION "%s"
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\n%s\n%s\n",
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\n%s\n%s\n",
- comp_info_str->str, runtime_info_str->str);
+ svnversion, comp_info_str->str, runtime_info_str->str);
} else {
output = stderr;
}
} else {
output = stderr;
}
}
break;
case 'v': /* Show version and exit */
}
break;
case 'v': /* Show version and exit */
- printf("t" PACKAGE " " VERSION
-#ifdef SVNVERSION
- " (" SVNVERSION ")"
-#endif
- "\n%s\n%s\n",
- comp_info_str->str, runtime_info_str->str);
+ printf("t" PACKAGE " " VERSION "%s\n%s\n%s\n",
+ svnversion, comp_info_str->str, runtime_info_str->str);
exit(0);
break;
case 'w': /* Write to capture file xxx */
exit(0);
break;
case 'w': /* Write to capture file xxx */
#include "version_info.h"
#include "pcap-util.h"
#include "version_info.h"
#include "pcap-util.h"
+#include "svnversion.h"
+
+#ifdef SVNVERSION
+ const char *svnversion = " (" SVNVERSION ")";
+#else
+ const char *svnversion = "";
+#endif
+
+
/*
* See whether the last line in the string goes past column 80; if so,
* replace the blank at the specified point with a newline.
/*
* See whether the last line in the string goes past column 80; if so,
* replace the blank at the specified point with a newline.
extern "C" {
#endif /* __cplusplus */
extern "C" {
#endif /* __cplusplus */
+/*
+ * The svn version string or ""
+ */
+const gchar *svnversion;
+
/*
* Get various library compile-time versions and append them to
* the specified GString.
/*
* Get various library compile-time versions and append them to
* the specified GString.