summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/system.h17
-rw-r--r--configure.ac18
3 files changed, 22 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 67fa5b267..1e69df02a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2008-05-04 Peter Stephenson <p.w.stephenson@ntlworld.com>
+ * Phil Pennock: 24904 + 24916: configure.ac, Src/system.h: don't
+ define _XOPEN_SOURCE_EXTENDED on freebsd, either, not even
+ if the standard says we need it for wcwidth().
+
* 24915: Src/Zle/zle_hist.c, Src/Zle/zle_misc.c,
Src/Zle/zle_move.c: Src/Zle/zle_vi.c: some more fix-ups for
combining characters.
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
diff --git a/configure.ac b/configure.ac
index 38c027f82..9c307aa2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -682,20 +682,20 @@ fi],
termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;;
esac])dnl
-AH_TEMPLATE([ZSH_CURSES_NEEDS_XOPEN],
-[Define if the curses libraries need _XOPEN_SOURCE_EXTENDED defined])
-AC_CACHE_CHECK(if the curses library needs _XOPEN_SOURCE_EXTENDED,
-zsh_cv_curses_needs_xopen,
+AH_TEMPLATE([ZSH_NO_XOPEN],
+[Define if _XOPEN_SOURCE_EXTENDED should not be defined to avoid clashes])
+AC_CACHE_CHECK(if _XOPEN_SOURCE_EXTENDED should not be defined,
+zsh_cv_no_xopen,
[case "$host_os" in
- *openbsd*)
- zsh_cv_curses_needs_xopen=no
+ *openbsd*|*freebsd*)
+ zsh_cv_no_xopen=yes
;;
*)
- zsh_cv_curses_needs_xopen=yes
+ zsh_cv_no_xopen=no
;;
esac])
-if test x$zsh_cv_curses_needs_xopen = xyes; then
- AC_DEFINE(ZSH_CURSES_NEEDS_XOPEN)
+if test x$zsh_cv_no_xopen = xyes; then
+ AC_DEFINE(ZSH_NO_XOPEN)
fi
dnl Check for tigetflag (terminfo) before tgetent (termcap).