summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-22 16:18:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-22 16:18:54 +0000
commite210f8d614dced7b44f07651ee1b058adadcb4a4 (patch)
tree6ea8aff0fb1e55b96b912d0854cb50e4c88f4877
parent2cec7aae44579d9d8ca8c7e728f9eb6e2840d72f (diff)
downloadzsh-e210f8d614dced7b44f07651ee1b058adadcb4a4.tar.gz
zsh-e210f8d614dced7b44f07651ee1b058adadcb4a4.tar.xz
zsh-e210f8d614dced7b44f07651ee1b058adadcb4a4.zip
24862: _XOPEN_SOURCE needed for wcwidth()
-rw-r--r--ChangeLog3
-rw-r--r--Src/system.h7
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index be81c4cbc..c7fa28347 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-04-22  Peter Stephenson  <pws@csr.com>
 
+	* 24862: Src/system.h: #define _XOPEN_SOURCE if needed to
+	get wcwidth().
+
 	* 24861: configure.ac, Src/builtin.c, Src/compat.c, Src/prompt.c,
 	Src/utils.c, Src/zsh.h, Src/zle/complist.c, Src/Zle/zle_misc.c
 	(slightly rewritten), Src/zle/zle_refresh.c, Src/Zle/zle_tricky.c:
diff --git a/Src/system.h b/Src/system.h
index 34b06c583..a10b66fd8 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -53,7 +53,12 @@
 #endif
 
 #if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN)
-#define _XOPEN_SOURCE_EXTENDED 1
+# define _XOPEN_SOURCE_EXTENDED 1
+#else
+# ifdef MULTIBYTE_SUPPORT
+/* Needed for wcwidth() which is part of XSI */
+#  define _XOPEN_SOURCE 1
+# endif
 #endif
 
 /*