xref: /illumos-gate/usr/src/cmd/sendmail/include/sm/fdset.h (revision 598f4ceed9327d2d6c2325dd67cae3aa06f7fea6)
1 /*
2  * Copyright (c) 2001, 2002 Sendmail, Inc. and its suppliers.
3  *      All rights reserved.
4  *
5  * By using this file, you agree to the terms and conditions set
6  * forth in the LICENSE file which can be found at the top level of
7  * the sendmail distribution.
8  *
9  *	$Id: fdset.h,v 1.3.10.2 2002/12/10 04:02:25 ca Exp $
10  */
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 #ifndef	SM_FDSET_H
15 # define SM_FDSET_H
16 
17 /*
18 **  Note: SM_FD_OK_SELECT(fd) requires that ValidSocket(fd) has been checked
19 **	before.
20 */
21 
22 #  define SM_FD_SET(fd, pfdset)		FD_SET(fd, pfdset)
23 #  define SM_FD_ISSET(fd, pfdset)	FD_ISSET(fd, pfdset)
24 #  define SM_FD_SETSIZE			FD_SETSIZE
25 #  define SM_FD_OK_SELECT(fd)		(FD_SETSIZE <= 0 || (fd) < FD_SETSIZE)
26 
27 #endif /* SM_FDSET_H */
28