* configure.ac (TAR_COND_GRANTPT): Define conditional depending
on whether grantpt is available.
* gnulib.modules: Remove grantpt. It relies upon a helper binary
pt_chown which it installs and which is useless in the testsuite.
* tests/Makefile.am [TAR_COND_GRANTPT]: Build ttyemu
* tests/iotty.at: Skip test if ttyemu is not build.
* tests/ttyemu.c (noecho): Fix error message
(main): Use TIOCSCTTY if it is defined.
TAR_HEADERS_ATTR_XATTR_H
-AC_CHECK_FUNCS_ONCE([fchmod fchown fsync lstat mkfifo readlink symlink])
+AC_CHECK_FUNCS_ONCE([fchmod fchown fsync lstat mkfifo readlink symlink grantpt])
+AM_CONDITIONAL([TAR_COND_GRANTPT], [test $ac_cv_func_grantpt = yes])
AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
gettext
gettime
gitlog-to-changelog
-grantpt
hash
human
inttostr
## genfile ##
## ------------ ##
-check_PROGRAMS = genfile ttyemu
+check_PROGRAMS = genfile
+
+if TAR_COND_GRANTPT
+check_PROGRAMS += ttyemu
+endif
genfile_SOURCES = genfile.c argcv.c argcv.h
AT_KEYWORDS([options iotty])
AT_TAR_CHECK([
+test -x $abs_builddir/ttyemu || AT_SKIP_TEST
TAPE=-
export TAPE
ttyemu -t5 -i/dev/null tar -x
to.c_cc[VEOF] = C_EOT;
if (tcsetattr (fd, TCSAFLUSH | TCSASOFT, &to))
{
- perror ("tcgetattr");
+ perror ("tcsetattr");
exit (EX_ERR);
}
}
close (i);
setsid ();
+#ifdef TIOCSCTTY
ioctl (0, TIOCSCTTY, 1);
-
+#endif
execvp (argv[0], argv);
perror (argv[0]);
_exit (EX_EXEC);