Matthew Dempsky:
> I think you're missing a "{" after the do. :)
Hmm, yes. This survives a make build:
Index: sys/sys/select.h
===
RCS file: /cvs/src/sys/sys/select.h,v
retrieving revision 1.13
diff -u -p -r1.13 select.h
--- sys/sy
> I wasn't sure if people might be calling FD_COPY()/FD_ZERO() with
> void* or char* typed arguments (or other custom sized types). If we
> can assume they'll only pass fd_set* arguments, then they could be
> done away with.
Hmm, that's a good question. The base appears clean, but it rarely
make
On Tue, Dec 3, 2013 at 1:39 PM, Philip Guenther wrote:
> What problem does the casts solve?
I wasn't sure if people might be calling FD_COPY()/FD_ZERO() with
void* or char* typed arguments (or other custom sized types). If we
can assume they'll only pass fd_set* arguments, then they could be
don
On Tue, Dec 3, 2013 at 1:55 PM, Christian Weisgerber wrote:
> +#if __BSD_VISIBLE
> +#defineFD_COPY(f, t) (void)(*(t) = *(f))
> +#endif
> +#defineFD_ZERO(p) do \
> + fd_set *_p = (p); \
> + __size_t _n = _
Combining the various suggestions, I now have this:
Index: sys/sys/select.h
===
RCS file: /cvs/src/sys/sys/select.h,v
retrieving revision 1.13
diff -u -p -r1.13 select.h
--- sys/sys/select.h29 Oct 2013 02:44:52 - 1.13
+++
> On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther wrote:
> > needs to stay until FD_ZERO() and FD_COPY() are changed to
> > not use memset()/memcpy().
>
> Good point.
>
> Would something like this work?
>
> #define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f))
Regarding your FD_ZER
On Tue, Dec 3, 2013 at 1:03 PM, Matthew Dempsky wrote:
> On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther wrote:
>> needs to stay until FD_ZERO() and FD_COPY() are changed to
>> not use memset()/memcpy().
>
> Good point.
>
> Would something like this work?
>
> #define FD_COPY(f, t) (*(fd_set *
On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther wrote:
> needs to stay until FD_ZERO() and FD_COPY() are changed to
> not use memset()/memcpy().
Good point.
Would something like this work?
#define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f))
static const fd_set __fd_zero_set;
#defi
Philip Guenther:
> needs to stay until FD_ZERO() and FD_COPY() are changed to
> not use memset()/memcpy().
We could grab this from FreeBSD:
#if __BSD_VISIBLE
#define FD_COPY(f, t) (void)(*(t) = *(f))
#endif
#define FD_ZERO(p) do { \
fd_set *_p;
On Tue, Dec 3, 2013 at 12:08 PM, Christian Weisgerber
wrote:
> POSIX says select() and everything it needs should come from
> . Eight years ago our headers have been fixed to
> provide this. Time to acknowledge this in the man page, too.
>
> ok?
...
> -.Fd #include
needs to stay until FD_ZERO
On Tue, Dec 3, 2013 at 12:08 PM, Christian Weisgerber
wrote:
> ok?
ok matthew
> +.Fd #include
Worth using .In instead while you're at it?
POSIX says select() and everything it needs should come from
. Eight years ago our headers have been fixed to
provide this. Time to acknowledge this in the man page, too.
ok?
Index: select.2
===
RCS file: /cvs/src/lib/libc/sys/sele
12 matches
Mail list logo