<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Fix reldate.h problem



Hi,

with the latest commit the ChangeLog file contains non-ASCII data (a first name). As this line isn't valid UTF-8 (my locale), cut(1) on FreeBSD complains about invalid UTF-8 sequences and thus would leave the value for ReleaseDate empty.

The attached patch runs cut(1) under the C locale (but just any other non-multibyte character set would do, I guess).

  bye, Rocco
--
:wq!
diff --git a/Makefile.am b/Makefile.am
index dfd5ea5..ec2ee91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -125,7 +125,7 @@ keymap_alldefs.h: $(srcdir)/OPS $(srcdir
                        > $(srcdir)/keymap_alldefs.h
 
 reldate.h: $(srcdir)/ChangeLog
-       echo 'const char *ReleaseDate = "'`head -n 1 $(srcdir)/ChangeLog | cut 
-d ' ' -f 1`'";' > reldate.h
+       echo 'const char *ReleaseDate = "'`head -n 1 $(srcdir)/ChangeLog | 
LC_ALL=C cut -d ' ' -f 1`'";' > reldate.h
 
 patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh
        $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c