select() is fine.
The fd_set types and FD_* macros are NOT. If these had been pointers
with memory allocated out-of-sight to the user, then no problem (they
could have been sized dynamically at runtime.) I think a clean
source-compatible select() could actually be written in C++, but not
in C.
-hpa
-- PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74 See http://www.zytor.com/~hpa/ for web page and full PGP public key I am Bahá'í -- ask me about it or see http://www.bahai.org/ "To love another person is to see the face of God." -- Les Misérables