home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / select.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  1KB  |  43 lines

  1. /************************************************************************
  2.  * This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  *
  3.  * provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is *
  5.  * included in all the files.                                           *
  6.  ************************************************************************/
  7.  
  8. #ifdef USE_SELECT_H
  9. # include <sys/select.h>
  10. #endif
  11.  
  12. #ifndef FD_SET        /* usually set in sys/types.h (AIX: sys/select.h) */
  13.  
  14.   typedef long fd_set;
  15.  
  16. # ifndef FD_SETSIZE
  17. #  define FD_SETSIZE      32
  18. # endif
  19.  
  20. # define FD_SET(fd, fdset)    (*(fdset) |= (1L << (fd)))
  21. # define FD_CLR(fd, fdset)    (*(fdset) &= ~(1L << (fd))
  22. # define FD_ISSET(fd, fdset)    (*(fdset) & (1L << (fd)))
  23. # define FD_ZERO(fdset)        (*(fdset) = 0)
  24.  
  25. #endif /* FD_SET */
  26.  
  27. #ifndef FULL_UNISTD
  28.  
  29. # ifdef USE_PROTOTYPES
  30. struct timeval;    /* forward declaration preventing prototype scoping */
  31. # endif
  32.  
  33. extern int    UNMACRO(select) proto((int /*width*/,
  34.     fd_set * /*readfds*/, fd_set * /*writefds*/, fd_set * /*exceptfds*/,
  35.     struct timeval * /*timeout*/));
  36.  
  37. #endif
  38.  
  39. #ifdef USE_SELECT
  40. extern fd_set    global_fd;
  41. extern int    global_maxfd;
  42. #endif
  43.