about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-01-15 14:49:50 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-01-15 14:49:50 +0000
commit45bee14fec248d79a345ef970ad4933540d50dac (patch)
tree75fcdc9b1e9a2516c2e5aff534f64409e1719bf1
parent3af9307d1428a20718e8a0ace3242c5d2dd0a43b (diff)
downloadzsh-45bee14fec248d79a345ef970ad4933540d50dac.tar.gz
zsh-45bee14fec248d79a345ef970ad4933540d50dac.tar.xz
zsh-45bee14fec248d79a345ef970ad4933540d50dac.zip
26313: --enable-custom-patchlevel
unposted: WARN_CREATE_GLOBAL in tcp_log
-rw-r--r--ChangeLog8
-rw-r--r--Functions/TCP/tcp_log4
-rw-r--r--INSTALL13
-rw-r--r--Src/params.c4
-rw-r--r--configure.ac8
5 files changed, 34 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cc9545be..fcc16693c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-01-15  Peter Stephenson  <pws@csr.com>
 
+	* 26313: INSTALL, configure.ac, Src/params.c: add
+	--enable-custom-patchlevel for tweaked shells.
+
+	* Functions/TCP/tcp_log: unposted: suppress WARN_CREATE_GLOBAL
+	message.
+
 	* 26312: Phil Pennock: Doc/Zsh/cond.yo, Doc/Zsh/mod_pcre.yo,
 	Doc/Zsh/mod_regex.yo: Document no variables altered on failed
 	match.
@@ -10913,5 +10919,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4509 $                         
+* $Revision: 1.4510 $                         
 *****************************************************
diff --git a/Functions/TCP/tcp_log b/Functions/TCP/tcp_log
index e8ebaca23..04f3735fe 100644
--- a/Functions/TCP/tcp_log
+++ b/Functions/TCP/tcp_log
@@ -76,7 +76,7 @@ if (( $# != 1 )); then
 fi
 
 if [[ -n $sess ]]; then
-  TCP_LOG_SESS=$1
+  typeset -g TCP_LOG_SESS=$1
   if [[ -z $append ]]; then
     local sesslogs
     integer i
@@ -87,7 +87,7 @@ if [[ -n $sess ]]; then
     done
   fi
 else
-  TCP_LOG=$1
+  typeset -g TCP_LOG=$1
   [[ -z $append ]] && : >$TCP_LOG
 fi
 
diff --git a/INSTALL b/INSTALL
index f2b9bd04d..55c51aa3b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -271,6 +271,19 @@ may wish not to install the zsh/newuser module.
 CONFIGURATION OPTIONS
 =====================
 
+Modified versions of zsh
+------------------------
+
+If you are making local modifications to zsh, you are strongly
+advised to configure with the option
+
+  --enable-local-patchlevel="<my-mod-string>"
+
+so that the variable $ZSH_PATCHLEVEL indicates this is not a standard
+version of the shell.  The argument is arbitrary, but should indicate
+the entity that is customizing the shell, for example the OS vendor
+or distributor.
+
 Multibyte Character Support
 ---------------------------
 
diff --git a/Src/params.c b/Src/params.c
index 89ab76bbf..28dff3684 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -31,7 +31,11 @@
 #include "params.pro"
 
 #include "version.h"
+#ifdef CUSTOM_PATCHLEVEL
+#define ZSH_PATCHLEVEL	CUSTOM_PATCHLEVEL
+#else
 #include "patchlevel.h"
+#endif
 
 /* what level of localness we are at */
  
diff --git a/configure.ac b/configure.ac
index 4b73c2bad..50658e573 100644
--- a/configure.ac
+++ b/configure.ac
@@ -304,6 +304,14 @@ fi], [sitescriptdir=${datadir}/${tzsh_name}/scripts])
 AC_SUBST(scriptdir)dnl
 AC_SUBST(sitescriptdir)dnl
 
+AH_TEMPLATE([CUSTOM_PATCHLEVEL],
+[Define to a custom value for the ZSH_PATCHLEVEL parameter])
+AC_ARG_ENABLE(custom-patchlevel,
+AC_HELP_STRING([--enable-custom-patchlevel], [set a custom ZSH_PATCHLEVEL value]),
+[if test x$enableval != x && test x$enableval != xno; then
+  AC_DEFINE_UNQUOTED([CUSTOM_PATCHLEVEL], ["$enableval"])
+fi])
+
 dnl Do you want maildir support?
 ifdef([maildir_support],[undefine([maildir_support])])dnl
 AH_TEMPLATE([MAILDIR_SUPPORT],