Print this page
remove support for non-ANSI compilation


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*


  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 /*
  31  * University Copyright- Copyright (c) 1982, 1986, 1988
  32  * The Regents of the University of California
  33  * All Rights Reserved
  34  *
  35  * University Acknowledgment- Portions of this document are derived from
  36  * software developed by the University of California, Berkeley, and its
  37  * contributors.
  38  */
  39 
  40 #ifndef _SYS_SELECT_H
  41 #define _SYS_SELECT_H
  42 


 135 #endif
 136         long    fds_bits[__howmany(FD_SETSIZE, FD_NFDBITS)];
 137 } fd_set;
 138 
 139 #define FD_SET(__n, __p)        ((__p)->fds_bits[(__n)/FD_NFDBITS] |= \
 140                                     (1ul << ((__n) % FD_NFDBITS)))
 141 
 142 #define FD_CLR(__n, __p)        ((__p)->fds_bits[(__n)/FD_NFDBITS] &= \
 143                                     ~(1ul << ((__n) % FD_NFDBITS)))
 144 
 145 #define FD_ISSET(__n, __p)      (((__p)->fds_bits[(__n)/FD_NFDBITS] & \
 146                                     (1ul << ((__n) % FD_NFDBITS))) != 0l)
 147 
 148 #ifdef _KERNEL
 149 #define FD_ZERO(p)      bzero((p), sizeof (*(p)))
 150 #else
 151 #define FD_ZERO(__p)    (void) memset((__p), 0, sizeof (*(__p)))
 152 #endif /* _KERNEL */
 153 
 154 #ifndef _KERNEL
 155 #ifdef  __STDC__
 156 extern int select(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD,
 157         fd_set *_RESTRICT_KYWD, struct timeval *_RESTRICT_KYWD);
 158 
 159 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 160 extern int pselect(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD,
 161         fd_set *_RESTRICT_KYWD, const struct timespec *_RESTRICT_KYWD,
 162         const sigset_t *_RESTRICT_KYWD);
 163 #endif
 164 
 165 #else
 166 extern int select();
 167 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 168 extern int pselect();
 169 #endif
 170 #endif  /* __STDC__ */
 171 #endif  /* _KERNEL */
 172 
 173 #ifdef  __cplusplus
 174 }
 175 #endif
 176 
 177 #endif  /* _SYS_SELECT_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  *
  25  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  30 /*        All Rights Reserved   */
  31 
  32 /*
  33  * University Copyright- Copyright (c) 1982, 1986, 1988
  34  * The Regents of the University of California
  35  * All Rights Reserved
  36  *
  37  * University Acknowledgment- Portions of this document are derived from
  38  * software developed by the University of California, Berkeley, and its
  39  * contributors.
  40  */
  41 
  42 #ifndef _SYS_SELECT_H
  43 #define _SYS_SELECT_H
  44 


 137 #endif
 138         long    fds_bits[__howmany(FD_SETSIZE, FD_NFDBITS)];
 139 } fd_set;
 140 
 141 #define FD_SET(__n, __p)        ((__p)->fds_bits[(__n)/FD_NFDBITS] |= \
 142                                     (1ul << ((__n) % FD_NFDBITS)))
 143 
 144 #define FD_CLR(__n, __p)        ((__p)->fds_bits[(__n)/FD_NFDBITS] &= \
 145                                     ~(1ul << ((__n) % FD_NFDBITS)))
 146 
 147 #define FD_ISSET(__n, __p)      (((__p)->fds_bits[(__n)/FD_NFDBITS] & \
 148                                     (1ul << ((__n) % FD_NFDBITS))) != 0l)
 149 
 150 #ifdef _KERNEL
 151 #define FD_ZERO(p)      bzero((p), sizeof (*(p)))
 152 #else
 153 #define FD_ZERO(__p)    (void) memset((__p), 0, sizeof (*(__p)))
 154 #endif /* _KERNEL */
 155 
 156 #ifndef _KERNEL

 157 extern int select(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD,
 158         fd_set *_RESTRICT_KYWD, struct timeval *_RESTRICT_KYWD);
 159 
 160 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 161 extern int pselect(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD,
 162         fd_set *_RESTRICT_KYWD, const struct timespec *_RESTRICT_KYWD,
 163         const sigset_t *_RESTRICT_KYWD);
 164 #endif
 165 






 166 #endif  /* _KERNEL */
 167 
 168 #ifdef  __cplusplus
 169 }
 170 #endif
 171 
 172 #endif  /* _SYS_SELECT_H */