Handle util.h if it exists instead of pty.h

This commit is contained in:
Quentin Smith
2012-02-26 01:35:54 -05:00
committed by Keith Winstein
parent a1671bcf3b
commit 19d284bfa4
4 changed files with 25 additions and 4 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ AC_SEARCH_LIBS([compress], [z], , [AC_MSG_ERROR([Unable to find zlib.])])
AX_BOOST_BASE(, , [AC_MSG_ERROR([Unable to find boost libraries.])])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h wchar.h wctype.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h pty.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h util.h wchar.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
+8 -1
View File
@@ -16,7 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <pty.h>
#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -32,6 +33,12 @@
#include <iostream>
#include <typeinfo>
#if HAVE_PTY_H
#include <pty.h>
#elif HAVE_UTIL_H
#include <util.h>
#endif
#include "parser.h"
#include "swrite.h"
+8 -1
View File
@@ -16,7 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <pty.h>
#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -39,6 +40,12 @@
#include <pwd.h>
#include <sys/time.h>
#if HAVE_PTY_H
#include <pty.h>
#elif HAVE_UTIL_H
#include <util.h>
#endif
#include "parser.h"
#include "completeterminal.h"
#include "swrite.h"
+8 -1
View File
@@ -16,12 +16,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <locale.h>
#include <string.h>
#include <langinfo.h>
#include <unistd.h>
#include <stdio.h>
#include <pty.h>
#include <stdlib.h>
#include <poll.h>
#include <sys/ioctl.h>
@@ -31,6 +32,12 @@
#include <sys/signalfd.h>
#include <time.h>
#if HAVE_PTY_H
#include <pty.h>
#elif HAVE_UTIL_H
#include <util.h>
#endif
#include "stmclient.h"
#include "swrite.h"
#include "completeterminal.h"