home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / libbsd / select.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-04  |  425 b   |  24 lines

  1. /*   
  2.  * select.c
  3.  *   
  4.  * Fix for programs which use a broken version of select()
  5.  *   
  6.  */  
  7.      
  8. #include <sys/time.h>
  9.      
  10. int select(int width, fd_set *readfds,
  11.     fd_set *writefds, fd_set *exceptfds,
  12.     struct timeval *timeout)
  13. {    
  14.   struct timeval local_timeout;
  15.      
  16.   if ( timeout )
  17.   {
  18.     local_timeout = *timeout;
  19.     timeout = &local_timeout;
  20.   }
  21.  
  22.   return __select(width,readfds,writefds,exceptfds,timeout);
  23. }
  24.