Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#ifndef OSDEP_H
#define OSDEP_H
/******************************************************************
*
* $XConsortium: osdep.h /main/4 1996/01/15 11:43:44 rswiston $
*
* Bitmask routines to support the usage of select() in dtexec.
* Revised for Spec1170 conformance.
*
*/
#ifdef _POSIX_SOURCE
# include <limits.h>
#else
# define _POSIX_SOURCE
# include <limits.h>
# undef _POSIX_SOURCE
#endif
#include <sys/time.h>
#include <sys/types.h>
#ifndef __hpux
# include <sys/select.h>
# define FD_SET_CAST(x) (x)
#else
# define FD_SET_CAST(x) ((int *)(x))
#endif
#ifndef OPEN_MAX
# define OPEN_MAX 128
#endif
#if OPEN_MAX <= 128
# define MAXSOCKS (OPEN_MAX)
#else
# define MAXSOCKS 128
#endif
#define BITSET(buf, i) FD_SET(i, &(buf))
#define BITCLEAR(buf, i) FD_CLR(i, &(buf))
#define GETBIT(buf, i) FD_ISSET(i, &(buf))
#define COPYBITS(src, dst) (dst) = (src)
#define CLEARBITS(buf) FD_ZERO(&buf)
#endif /* OSDEP_H */