X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fselect.c;h=5677fdd478f0e1fdb7f2dbf94351d6ccec1c2985;hb=d0ed135f8b494a0adf869a311c7bdc1d9d03f050;hp=de4e3b4311aaaca442048199de7ae09c75c39116;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=pspp diff --git a/lib/select.c b/lib/select.c index de4e3b4311..5677fdd478 100644 --- a/lib/select.c +++ b/lib/select.c @@ -1,7 +1,7 @@ /* Emulation for select(2) Contributed by Paolo Bonzini. - Copyright 2008-2009 Free Software Foundation, Inc. + Copyright 2008-2010 Free Software Foundation, Inc. This file is part of gnulib. @@ -80,7 +80,7 @@ typedef DWORD (WINAPI *PNtQueryInformationFile) #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL -IsSocketHandle(HANDLE h) +IsSocketHandle (HANDLE h) { WSANETWORKEVENTS ev; @@ -246,7 +246,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, wait_timeout = INFINITE; else { - wait_timeout = timeout->tv_sec + timeout->tv_usec / 1000; + wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; /* select is also used as a portable usleep. */ if (!rfds && !wfds && !xfds)