2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
26 /******************************************************************
28 * $XConsortium: osdep.h /main/4 1996/01/15 11:43:44 rswiston $
30 * Bitmask routines to support the usage of select() in dtexec.
31 * Revised for Spec1170 conformance.
39 # define _POSIX_SOURCE
45 #include <sys/types.h>
47 # include <sys/select.h>
48 # define FD_SET_CAST(x) (x)
50 # define FD_SET_CAST(x) ((int *)(x))
58 # define MAXSOCKS (OPEN_MAX)
63 #define BITSET(buf, i) FD_SET(i, &(buf))
64 #define BITCLEAR(buf, i) FD_CLR(i, &(buf))
65 #define GETBIT(buf, i) FD_ISSET(i, &(buf))
66 #define COPYBITS(src, dst) (dst) = (src)
67 #define CLEARBITS(buf) FD_ZERO(&buf)