[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _XOPEN_SOURCE and select(2)



Marco S Hyman writes:
 >  > in unistd.h select(2) is only defined if _XOPEN_SOURCE isn't, yet
 >  > select(2) is POSIX, so you'd expect it to always be available.
 > 
 > POSIX says that select is in <sys/select.h>, not <unistd.h>
 > The POSIX version of <unistd.h> does NOT include select(2).
 > 
 > // marc
 > 

Hmm. Ok. Except a quick grep of /usr/include shows that select(2) is
ONLY defined in <unistd.h>, and not <sys/select.h>. I looked in the CVSweb
and it appears to be the same.

$ egrep -rn -E -e "int\W*select\W*\(" *
sys/sysctl.h:162:#define KERN_NSELCOLL          43      /* int: select(2) collisions */
unistd.h:186:int         select(int, fd_set *, fd_set *, fd_set *, struct timeval *);

--
Zachary Hamm
zsh_(_at_)_squeamish_(_dot_)_org