From 79f5a19fba15519dfa7fe82f4dd1f0e91652cded Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 11 Feb 2009 02:02:04 +0000 Subject: * lib/openpty.c: #include , , and where available. --- ChangeLog | 6 ++++++ config/openaxiom-c-macros.h.in | 9 +++++++++ configure | 14 +++++++++++++- configure.ac | 11 ++++++++++- configure.ac.pamphlet | 11 ++++++++++- src/ChangeLog | 5 +++++ src/lib/openpty.c | 12 +++++++++++- 7 files changed, 64 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81cf6189..0d98d550 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-09 Gabriel Dos Reis + + * configure.ac.pamphlet: Check for , , and + . + * config/openaxiom-c-macros.h.in: Regenerate. + 2009-02-09 Gabriel Dos Reis * configure.ac.pamphlet: Check path for `vi'. 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 header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBUTIL_H + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -75,6 +78,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H @@ -87,6 +93,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/configure b/configure index a2bf51ba..74571507 100755 --- a/configure +++ b/configure @@ -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 #endif + #if HAVE_SYS_IOCTL_H + # include + #endif + #if HAVE_TERMIOS_H + # include + #endif + #if HAVE_LIBTUIL_H + # include + #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 ]) ## 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 @@ -467,6 +467,15 @@ AC_CHECK_DECLS([openpty],[],[], #if HAVE_UTIL_H # include #endif + #if HAVE_SYS_IOCTL_H + # include + #endif + #if HAVE_TERMIOS_H + # include + #endif + #if HAVE_LIBTUIL_H + # include + #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 ]) ## 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 @@ -337,6 +337,15 @@ AC_CHECK_DECLS([openpty],[],[], #if HAVE_UTIL_H # include #endif + #if HAVE_SYS_IOCTL_H + # include + #endif + #if HAVE_TERMIOS_H + # include + #endif + #if HAVE_LIBTUIL_H + # include + #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,3 +1,8 @@ +2009-02-09 Gabriel Dos Reis + + * lib/openpty.c: #include , , and + where available. + 2009-02-09 Gabriel Dos Reis * interp/i-spec2.boot (upDollar): Fix thinko. 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 #include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif #ifdef HAVE_PTY_H # include #endif #ifdef HAVE_UTIL_H # include #endif +#ifdef HAVE_TERMIOS_H +# include +#endif +#ifdef HAVE_LIBUTIL_H +# include +#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 } -- cgit v1.2.3