File: select.h

package info (click to toggle)
jove 4.16-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,804 kB
  • ctags: 2,864
  • sloc: ansic: 27,140; makefile: 399
file content (42 lines) | stat: -rw-r--r-- 1,236 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/************************************************************************
 * This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  *
 * provided to you without charge, and with no warranty.  You may give  *
 * away copies of JOVE, including sources, provided that this notice is *
 * included in all the files.                                           *
 ************************************************************************/

#ifdef USE_SELECT_H
# include <sys/select.h>
#endif

#ifndef FD_SET		/* usually set in sys/types.h (AIX: sys/select.h) */

  typedef long fd_set;

# ifndef FD_SETSIZE
#  define FD_SETSIZE      32
# endif

# define FD_SET(fd, fdset)	(*(fdset) |= (1L << (fd)))
# define FD_CLR(fd, fdset)	(*(fdset) &= ~(1L << (fd))
# define FD_ISSET(fd, fdset)	(*(fdset) & (1L << (fd)))
# define FD_ZERO(fdset)		(*(fdset) = 0)

#endif /* FD_SET */

#ifndef FULL_UNISTD

# ifdef USE_PROTOTYPES
struct timeval;	/* forward declaration preventing prototype scoping */
# endif

extern int	UNMACRO(select) proto((int /*width*/,
	fd_set * /*readfds*/, fd_set * /*writefds*/, fd_set * /*exceptfds*/,
	struct timeval * /*timeout*/));

#endif

#ifdef USE_SELECT
extern fd_set	global_fd;
extern int	global_maxfd;
#endif