Print this page
3772 consider raising default descriptor soft limit


  65  * now allows the visibility of signal.h in this header, however
  66  * an order of inclusion problem occurs as a result of inclusion
  67  * of <sys/select.h> in <signal.h> under certain conditions.
  68  * Rather than include <sys/signal.h> here, we've duplicated
  69  * the sigset_t type instead. This type is required for the XPG6
  70  * introduced pselect() function also declared in this header.
  71  */
  72 #ifndef _SIGSET_T
  73 #define _SIGSET_T
  74 typedef struct {                /* signal set type */
  75         unsigned int    __sigbits[4];
  76 } sigset_t;
  77 #endif  /* _SIGSET_T */
  78 
  79 #endif /* #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
  80 
  81 /*
  82  * Select uses bit masks of file descriptors in longs.
  83  * These macros manipulate such bit fields.
  84  * FD_SETSIZE may be defined by the user, but the default here
  85  * should be >= NOFILE (param.h).
  86  */
  87 #ifndef FD_SETSIZE
  88 #ifdef _LP64
  89 #define FD_SETSIZE      65536
  90 #else
  91 #define FD_SETSIZE      1024
  92 #endif  /* _LP64 */
  93 #elif FD_SETSIZE > 1024 && !defined(_LP64)
  94 #ifdef __PRAGMA_REDEFINE_EXTNAME
  95 #pragma redefine_extname        select  select_large_fdset
  96 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
  97 #pragma redefine_extname        pselect pselect_large_fdset
  98 #endif
  99 #else   /* __PRAGMA_REDEFINE_EXTNAME */
 100 #define select  select_large_fdset
 101 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 102 #define pselect pselect_large_fdset
 103 #endif
 104 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 105 #endif  /* FD_SETSIZE */
 106 
 107 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 108 typedef long    fd_mask;
 109 #endif
 110 typedef long    fds_mask;
 111 
 112 /*
 113  *  The value of _NBBY needs to be consistant with the value
 114  *  of NBBY in <sys/param.h>.
 115  */
 116 #define _NBBY 8
 117 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 118 #ifndef NBBY            /* number of bits per byte */
 119 #define NBBY _NBBY
 120 #endif
 121 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 122 
 123 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 124 #define NFDBITS         (sizeof (fd_mask) * NBBY)       /* bits per mask */




  65  * now allows the visibility of signal.h in this header, however
  66  * an order of inclusion problem occurs as a result of inclusion
  67  * of <sys/select.h> in <signal.h> under certain conditions.
  68  * Rather than include <sys/signal.h> here, we've duplicated
  69  * the sigset_t type instead. This type is required for the XPG6
  70  * introduced pselect() function also declared in this header.
  71  */
  72 #ifndef _SIGSET_T
  73 #define _SIGSET_T
  74 typedef struct {                /* signal set type */
  75         unsigned int    __sigbits[4];
  76 } sigset_t;
  77 #endif  /* _SIGSET_T */
  78 
  79 #endif /* #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
  80 
  81 /*
  82  * Select uses bit masks of file descriptors in longs.
  83  * These macros manipulate such bit fields.
  84  * FD_SETSIZE may be defined by the user, but the default here
  85  * should be >= RLIM_FD_MAX.
  86  */
  87 #ifndef FD_SETSIZE

  88 #define FD_SETSIZE      65536















  89 #endif  /* FD_SETSIZE */
  90 
  91 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  92 typedef long    fd_mask;
  93 #endif
  94 typedef long    fds_mask;
  95 
  96 /*
  97  *  The value of _NBBY needs to be consistant with the value
  98  *  of NBBY in <sys/param.h>.
  99  */
 100 #define _NBBY 8
 101 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 102 #ifndef NBBY            /* number of bits per byte */
 103 #define NBBY _NBBY
 104 #endif
 105 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 106 
 107 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 108 #define NFDBITS         (sizeof (fd_mask) * NBBY)       /* bits per mask */