Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting the CVS revision of Zsh



On Wed, 14 Jan 2009 19:54:02 +0100
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> FWIW, I use a git import which doesn't do any keyword expansion, so
> the define is empty in my case, which obviously breaks the build. I
> don't know if you want to a) not care b) add some #ifdef to set it to
> "unknown" or such or c) add some shell code for git to set it.
> 
> If b or c I can construct a patch.

If keyword expansion is properly turned off it shouldn't remove the CVS
one, although I don't know the details of how git works.  The second
option is probably the easiest; it's straightforward now sed outputs the
entire line, so the definition is completely missing if not found.

Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.153
diff -u -r1.153 params.c
--- Src/params.c	15 Jan 2009 14:49:51 -0000	1.153
+++ Src/params.c	15 Jan 2009 19:42:36 -0000
@@ -35,6 +35,11 @@
 #define ZSH_PATCHLEVEL	CUSTOM_PATCHLEVEL
 #else
 #include "patchlevel.h"
+
+/* If removed from the ChangeLog for some reason */
+#ifndef ZSH_PATCHLEVEL
+#define ZSH_PATCHLEVEL "unknown"
+#endif
 #endif
 
 /* what level of localness we are at */

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author