From 4dae429ba3bb5d4f02fe2ce39b950f8355d529d2 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 30 Oct 2005 16:57:05 +0000 Subject: 21954: work around /dev/fd problem on FreeBSD --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 84a9d5b99..b0f7c6cef 100644 --- a/configure.ac +++ b/configure.ac @@ -1599,11 +1599,16 @@ AC_DEFINE_UNQUOTED(DEFAULT_PATH, "$zsh_cv_cs_path", dnl ---------------------------- dnl CHECK FOR /dev/fd FILESYSTEM dnl ---------------------------- +dnl FreeBSD 5 only supports /dev/fd/0 to /dev/fd/2 without mounting +dnl a special file system. As zsh needs arbitrary /dev/fd (typically +dnl >10) for its own use, we need to make sure higher fd's are available. +dnl Since we're using the shell, we're restricted to 0 to 9 but 3 should +dnl be good enough. AH_TEMPLATE([PATH_DEV_FD], [Define to the path of the /dev/fd filesystem.]) AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd, [for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do - test x`echo ok|cat $zsh_cv_sys_path_dev_fd/0 2>/dev/null` = xok && break + test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break done]) if test $zsh_cv_sys_path_dev_fd != no; then AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd") -- cgit 1.4.1