www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24417] New: core.sys.posix.sys.select: fds_bits named

https://issues.dlang.org/show_bug.cgi?id=24417

          Issue ID: 24417
           Summary: core.sys.posix.sys.select: fds_bits named __fds_bits
                    on FreeBSD
           Product: D
           Version: D2
          Hardware: All
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: issues.dlang jmdavisProg.com

It looks like on FreeBSD (and on the BSDs in general) fds_bits is declared
using a #define - e.g.

---
typedef struct fd_set {
        __fd_mask       __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)];
} fd_set;
#if __BSD_VISIBLE
#define fds_bits        __fds_bits
#endif
--- 

rather than having the standard name used directly - probably due in part to
the quirks of C with typedef-ing structs and unions. But the standard name is
fds_bits, not __fds_bits, so either the field needs to be renamed to fds_bits,
or it needs to be aliased, otherwise the binding for fds_bits doesn't actually
exist.

--
Feb 27