1
0
Fork 0
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:
Peter Stephenson 2005-10-30 16:57:05 +00:00
parent 53a862dec5
commit 4dae429ba3

View file

@ -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")