Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.0.8 available (preliminary announcement)



Baptiste Daroussin wrote:
> On FreeBSD I have 5 tests failing (actually for a couple of release of
> zsh) all related to zpty.
> 
> This time I found time to analyse the code.
> 
> It appears that freebsd has posix_openpt, but the code using that only
> used if USE_DEV_PTMX is defined (which is not on FreeBSD)

USE_DEV_PTMX should get defined on FreeBSD. That define is just wrapping
up several tests. The branch guarded by USE_DEV_PTMX also requires other
functions like grantpt() so tests for those should continue to be
honoured even when we have posix_openpt().

With earlier versions of zsh and recent FreeBSD, it was necessary to use
"kldload pty" for zpty to work. That brings /dev/ptmx into existance. It
seems the configure tests are effectively still requiring that. I think
the approach in the following patch should work but I now need to find a
FreeBSD machine with the pty module unloaded to test it.

Is the -o option to test safe to use in configure? It seems existing
tests use || and && but the precedence of those wouldn't be right.

Oliver

diff --git a/configure.ac b/configure.ac
index 6a99aec..d7db8ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2526,7 +2526,7 @@ dnl these is by defining _GNU_SOURCE.
 dnl -------
 AH_TEMPLATE([USE_DEV_PTMX],
 [Define to 1 if all the kit for using /dev/ptmx for ptys is available.])
-if test x$ac_cv_have_dev_ptmx = xyes && \
+if test x$ac_cv_have_dev_ptmx = xyes -o x$ac_cv_func_posix_openpt = xyes && \
    test x$ac_cv_func_grantpt = xyes && \
    test x$ac_cv_func_unlockpt = xyes && \
    test x$ac_cv_func_ptsname = xyes; then



Messages sorted by: Reverse Date, Date, Thread, Author