mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
21954: work around /dev/fd problem on FreeBSD
This commit is contained in:
parent
53a862dec5
commit
4dae429ba3
1 changed files with 6 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue