diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | config/openaxiom-c-macros.h.in | 9 | ||||
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | configure.ac.pamphlet | 11 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/openpty.c | 12 |
7 files changed, 64 insertions, 4 deletions
@@ -1,5 +1,11 @@ 2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * configure.ac.pamphlet: Check for <sys/ioctl.h>, <termios.h>, and + <libutil.h>. + * config/openaxiom-c-macros.h.in: Regenerate. + +2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * configure.ac.pamphlet: Check path for `vi'. 2009-02-07 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in index 22ac4c54..d96918ce 100644 --- a/config/openaxiom-c-macros.h.in +++ b/config/openaxiom-c-macros.h.in @@ -54,6 +54,9 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the <libutil.h> header file. */ +#undef HAVE_LIBUTIL_H + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -75,6 +78,9 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H @@ -87,6 +93,9 @@ /* Define to 1 if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H + /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H @@ -23845,7 +23845,10 @@ fi ## Does this system have openpty or shall we emulate? -for ac_header in pty.h util.h + + + +for ac_header in sys/ioctl.h pty.h util.h libutil.h termios.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -24030,6 +24033,15 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_UTIL_H # include <util.h> #endif + #if HAVE_SYS_IOCTL_H + # include <sys/ioctl.h> + #endif + #if HAVE_TERMIOS_H + # include <termios.h> + #endif + #if HAVE_LIBTUIL_H + # include <libutil.h> + #endif int diff --git a/configure.ac b/configure.ac index 5e28b888..dfcb440f 100644 --- a/configure.ac +++ b/configure.ac @@ -459,7 +459,7 @@ AC_CHECK_DECLS([fork], [#include <unistd.h>]) ## Does this system have openpty or shall we emulate? -AC_CHECK_HEADERS([pty.h util.h]) +AC_CHECK_HEADERS([sys/ioctl.h pty.h util.h libutil.h termios.h]) AC_CHECK_DECLS([openpty],[],[], [#if HAVE_PTY_H # include <pty.h> @@ -467,6 +467,15 @@ AC_CHECK_DECLS([openpty],[],[], #if HAVE_UTIL_H # include <util.h> #endif + #if HAVE_SYS_IOCTL_H + # include <sys/ioctl.h> + #endif + #if HAVE_TERMIOS_H + # include <termios.h> + #endif + #if HAVE_LIBTUIL_H + # include <libutil.h> + #endif ]) if test x"$ac_cv_have_decl_openpty" = xyes; then \ AC_SEARCH_LIBS([openpty],[util]) diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet index a222a6f2..594500df 100644 --- a/configure.ac.pamphlet +++ b/configure.ac.pamphlet @@ -329,7 +329,7 @@ AC_CHECK_DECLS([fork], [#include <unistd.h>]) ## Does this system have openpty or shall we emulate? -AC_CHECK_HEADERS([pty.h util.h]) +AC_CHECK_HEADERS([sys/ioctl.h pty.h util.h libutil.h termios.h]) AC_CHECK_DECLS([openpty],[],[], [#if HAVE_PTY_H # include <pty.h> @@ -337,6 +337,15 @@ AC_CHECK_DECLS([openpty],[],[], #if HAVE_UTIL_H # include <util.h> #endif + #if HAVE_SYS_IOCTL_H + # include <sys/ioctl.h> + #endif + #if HAVE_TERMIOS_H + # include <termios.h> + #endif + #if HAVE_LIBTUIL_H + # include <libutil.h> + #endif ]) if test x"$ac_cv_have_decl_openpty" = xyes; then \ AC_SEARCH_LIBS([openpty],[util]) diff --git a/src/ChangeLog b/src/ChangeLog index 79db4323..59a7ea4c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lib/openpty.c: #include <sys/ioctl.h>, <termios.h>, and + <libutil.h> where available. + +2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/i-spec2.boot (upDollar): Fix thinko. * interp/compat.boot (editFile): Tidy. * interp/br-op2.boot (modemap2Sig): Don't update $badStack.xo diff --git a/src/lib/openpty.c b/src/lib/openpty.c index eee46d04..5cf36c34 100644 --- a/src/lib/openpty.c +++ b/src/lib/openpty.c @@ -38,12 +38,22 @@ #include <fcntl.h> #include <string.h> +#ifdef HAVE_SYS_IOCTL_H +# include <sys/ioctl.h> +#endif #ifdef HAVE_PTY_H # include <pty.h> #endif #ifdef HAVE_UTIL_H # include <util.h> #endif +#ifdef HAVE_TERMIOS_H +# include <termios.h> +#endif +#ifdef HAVE_LIBUTIL_H +# include <libutil.h> +#endif + #include "openpty.H1" @@ -136,7 +146,7 @@ extern char* ptsname(int); return(fdm); #endif -# error "don't know open to open a pty" +# error "don't know how to open a pty" #endif } |