]> granicus.if.org Git - sudo/commitdiff
added FD_SET and FD_ZERO for 4.2BSD
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 31 Mar 1995 22:27:35 +0000 (22:27 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 31 Mar 1995 22:27:35 +0000 (22:27 +0000)
compat.h

index 554700550166e308de72400dcadd06148ce9348e..1f755d7e5ba18ca666d5bb82b4f885f8cfc7fd3e 100644 (file)
--- a/compat.h
+++ b/compat.h
 #  define MAXHOSTNAMELEN       64
 #endif
 
+/*
+ * 4.2BSD lacks FD_* macros (we only use FD_SET and FD_ZERO)
+ */
+#ifndef FD_SETSIZE
+#define FD_SET(fd, fds)                ((fds) -> fds_bits[0] |= (1 << (fd)))
+#define FD_ZERO(fds)           ((fds) -> fds_bits[0] = 0)
+#endif /* !FD_SETSIZE */
+
 /*
  * Posix versions for those without...
  */