use /dev/fd on Cygwin for process substitution

5.9
Jun-ichi Takimoto 4 years ago
parent 742ab1283b
commit 5d593cfd54

@ -1,3 +1,8 @@
2020-01-10 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 45264: configure.ac: use /dev/fd on Cygwin for process
substitution
2020-01-09 Daniel Shahaf <danielsh@apache.org>
* unposted: Completion/Debian/Command/_sbuild,

@ -2059,17 +2059,9 @@ 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,
[if test "$host_os" = cygwin; then
dnl In current (2008/12/01) versions of Cygwin these are present but don't
dnl seem to work smoothly for process substitution; no great surprise
dnl since getting processes to work at all on Cygwin is a big challenge.
dnl We'll rely on FIFOs, since they do what we need.
zsh_cv_sys_path_dev_fd=no
else
[for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break
done]
fi])
done])
if test x$zsh_cv_sys_path_dev_fd != xno; then
AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd")
fi
@ -2260,14 +2252,9 @@ dnl -----------
dnl named FIFOs
dnl -----------
dnl
dnl Named FIFOs work well enough on recent versions of Cygwin
dnl to provide what we want. Simply enable them.
AC_CACHE_CHECK(if named FIFOs work,
zsh_cv_sys_fifo,
[if test "$host_os" = cygwin; then
zsh_cv_sys_fifo=yes
else
AC_RUN_IFELSE([AC_LANG_SOURCE([[
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <fcntl.h>
#include <signal.h>
main()
@ -2295,7 +2282,7 @@ main()
exit(ret);
}
]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes])
fi])
])
AH_TEMPLATE([HAVE_FIFOS],
[Define to 1 if system has working FIFOs.])
if test x$zsh_cv_sys_fifo = xyes; then

Loading…
Cancel
Save