]> sjero.net Git - wget/commitdiff
version.c string token concatenation.
authorMicah Cowan <micah@cowan.name>
Sun, 22 Jun 2008 18:39:13 +0000 (11:39 -0700)
committerMicah Cowan <micah@cowan.name>
Sun, 22 Jun 2008 18:39:13 +0000 (11:39 -0700)
src/ChangeLog
src/Makefile.am

index deee0232f34d4ebe67aae6f077374bd497046165..c9da1c8e27dbaf47305d5e482f06723e2c4dfa69 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-22  Micah Cowan  <micah@cowan.name>
+
+       * Makefile.am (version.c): Fixed version string invocation so it
+       once again can't result in unterminated strings, made all the
+       string vars pointers-to-const, and moved line lengths
+       below 80 (in Makefile.am, not in version.c).
+
 2008-06-16  Micah Cowan  <micah@cowan.name>
 
        * http.c (http_loop): When hstat.len is higher than the
index c8485cfd8125d3877160f990d1a805aa02ee10d2..56ba6108f8e91d2b4c3d144928aee158b1de3090 100644 (file)
@@ -55,12 +55,14 @@ version.c:  $(wget_SOURCES) $(LDADD) $(srcdir)/Makefile.am
        echo '/* version.c */' > $@
        echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> $@
        echo '' >> $@
-       echo -n 'char* version_string = "@VERSION@ ' >> $@
-       -hg log -r . --template=' ({node|short})"\n' 2>/dev/null >> $@
+       echo -n 'const char *version_string = "@VERSION@"' >> $@
+       -hg log -r . --template='" ({node|short})"\n' 2>/dev/null >> $@
        echo ';' >> $@
-       echo 'char* compilation_string = "'$(COMPILE)'";' | $(ESCAPEQUOTE) >> $@
-       echo 'char* link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' | $(ESCAPEQUOTE) >> $@
+       echo 'const char *compilation_string = "'$(COMPILE)'";' \
+           | $(ESCAPEQUOTE) >> $@
+       echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
+           | $(ESCAPEQUOTE) >> $@
 
 check_LIBRARIES = libunittest.a
 libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h