Type of FD_ISSET happens to be bool in C++

Stephan Bergmann sbergman@redhat.com
Wed Nov 19 11:14:00 GMT 2014

While SUS mandates FD_ISSET to have return type int (in C, which is all 
SUS is concerned with), the definition

> #define __FD_ISSET(d, set) \
>   ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)

in bits/select.h causes it to have type bool instead in C++.  Is that by 
design or by accident?

More information about the Libc-help mailing list