]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Some systems (HP-UX) don't yet have <sys/select.h>, putting select() in
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 14 Sep 2005 10:53:39 +0000 (10:53 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Wed, 14 Sep 2005 10:53:39 +0000 (10:53 +0000)
<sys/time.h>.  Cope with this.  Where <sys/select.h> _is_ available, though,
use it (since it's where POSIX puts select()).  Problem reported by Mike
Protts.

[originally from svn r6310]

unix/configure.ac
unix/uxplink.c
unix/uxsftp.c

index 699e6ef8aea627b36e597882029ca9c1eb37a1c5..40e6d5697eed66b01e568565c9adba7391bf2410 100644 (file)
@@ -14,7 +14,7 @@ if test "X$GCC" = Xyes; then
     CFLAGS="$CFLAGS -Wall -Werror"
 fi
 
-AC_CHECK_HEADERS([utmpx.h],,,[
+AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
 #include <sys/types.h>
 #include <utmp.h>])
 
@@ -45,4 +45,7 @@ AH_BOTTOM([
 #ifndef HAVE_PTSNAME
 # define BSD_PTYS
 #endif
+#ifndef HAVE_SYS_SELECT_H
+# define HAVE_NO_SYS_SELECT_H
+#endif
 ])
index 755f1b2bcfbbeb77d4a324928f0176700d25c206..13dea4417141a688b11db2a280b60c912eb7e719 100644 (file)
 #include <termios.h>
 #include <pwd.h>
 #include <sys/ioctl.h>
+#include <sys/time.h>
+#ifndef HAVE_NO_SYS_SELECT_H
 #include <sys/select.h>
+#endif
 
 #define PUTTY_DO_GLOBALS              /* actually _define_ globals */
 #include "putty.h"
index 60289eb20f6b6324a398509343e6d8cca53e71bb..3691cacc7f194735657fd82527a33c15b59ac47e 100644 (file)
@@ -13,6 +13,9 @@
 #include <errno.h>
 #include <assert.h>
 #include <glob.h>
+#ifndef HAVE_NO_SYS_SELECT_H
+#include <sys/select.h>
+#endif
 
 #include "putty.h"
 #include "psftp.h"