summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/src
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-05-13 03:08:28 +0200
committerBruno Haible <bruno@clisp.org>2011-06-07 23:39:48 +0200
commita3bc03e3da4304a4ea5b7e5c69b1eea3107b478b (patch)
tree37a7c34c56e319fcdf3949dceda1bf66b158e438 /gettext-runtime/src
parentddd5eb4f30eeea7fdef64e09b6668c12500c0ee3 (diff)
downloadexternal_gettext-a3bc03e3da4304a4ea5b7e5c69b1eea3107b478b.zip
external_gettext-a3bc03e3da4304a4ea5b7e5c69b1eea3107b478b.tar.gz
external_gettext-a3bc03e3da4304a4ea5b7e5c69b1eea3107b478b.tar.bz2
Avoid reference to unset shell variable.
Diffstat (limited to 'gettext-runtime/src')
-rw-r--r--gettext-runtime/src/ChangeLog5
-rw-r--r--gettext-runtime/src/gettext.sh.in4
2 files changed, 7 insertions, 2 deletions
diff --git a/gettext-runtime/src/ChangeLog b/gettext-runtime/src/ChangeLog
index 8c2d8e3..54bfca3 100644
--- a/gettext-runtime/src/ChangeLog
+++ b/gettext-runtime/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-12 Bruno Haible <bruno@clisp.org>
+
+ * gettext.sh.in: Avoid reference to unset shell variable ZSH_VERSION.
+ Reported by Thorsten Kampe <thorsten@thorstenkampe.de>.
+
2010-06-04 Bruno Haible <bruno@clisp.org>
* gettext-0.18.1 released.
diff --git a/gettext-runtime/src/gettext.sh.in b/gettext-runtime/src/gettext.sh.in
index 5c2c107..7e415dc 100644
--- a/gettext-runtime/src/gettext.sh.in
+++ b/gettext-runtime/src/gettext.sh.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2007, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
@@ -40,7 +40,7 @@ fi
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
# the Filesystem Hierarchy Standard when doing so, this script is executable.
# Therefore it needs to support the standard --help and --version.
-if test -z "$ZSH_VERSION"; then
+if test -z "${ZSH_VERSION+set}"; then
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
# fortunately we know that when running under zsh, this script is always