about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-04 18:43:01 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-04 18:43:01 +0000
commitbb8ec071e303f0c89549a676ec0bdbaaea707567 (patch)
treeb52b2956eefa9f5ec9e6059cbc0926fd77a12268 /Src
parent1424e923b1676b04249d1a853f4360b8956fe9e9 (diff)
downloadzsh-bb8ec071e303f0c89549a676ec0bdbaaea707567.tar.gz
zsh-bb8ec071e303f0c89549a676ec0bdbaaea707567.tar.xz
zsh-bb8ec071e303f0c89549a676ec0bdbaaea707567.zip
24904 + 24916: be more careful definined _XOPEN_SOURCE_EXTENDED on BSD systems
Diffstat (limited to 'Src')
-rw-r--r--Src/system.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/Src/system.h b/Src/system.h
index 2f542981b..8449b1bd6 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -52,19 +52,20 @@
 # undef HAVE_SYS_UTSNAME_H
 #endif
 
-#if defined(ZSH_CURSES_SOURCE) && defined(ZSH_CURSES_NEEDS_XOPEN)
-# define _XOPEN_SOURCE_EXTENDED 1
-#else
-# ifdef MULTIBYTE_SUPPORT
+#ifndef ZSH_NO_XOPEN
+# ifdef ZSH_CURSES_SOURCE
+#  define _XOPEN_SOURCE_EXTENDED 1
+# else
+#  ifdef MULTIBYTE_SUPPORT
 /*
  * Needed for wcwidth() which is part of XSI.
  * Various other uses of the interface mean we can't get away with just
  * _XOPEN_SOURCE.
  */
-/*#  define _XOPEN_SOURCE 1*/
-#  define _XOPEN_SOURCE_EXTENDED 1
-# endif
-#endif
+#   define _XOPEN_SOURCE_EXTENDED 1
+#  endif /* MULTIBYTE_SUPPORT */
+# endif /* ZSH_CURSES_SOURCE */
+#endif /* ZSH_NO_XOPEN */
 
 /*
  * Solaris by default zeroes all elements of the tm structure in