1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Some systems (HP-UX) don't yet have <sys/select.h>, putting select() in

<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]
This commit is contained in:
Ben Harris 2005-09-14 10:53:39 +00:00
parent f2d8fd97d0
commit 3bfb6ad651
3 changed files with 10 additions and 1 deletions

View 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
])

View File

@ -13,7 +13,10 @@
#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"

View 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"