Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Matthew Dempsky (matthewdempsky.org)
Date: Tue Dec 03 2013 - 15:03:04 CST
On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther <guenthergmail.com> wrote:
> <string.h> needs to stay until FD_ZERO() and FD_COPY() are changed to
> not use memset()/memcpy().
Would something like this work?
#define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f))
static const fd_set __fd_zero_set;
#define FD_ZERO(p) FD_COPY(&__fd_zero_set, p)
Downside is we lose const warnings. We could get those back if we
change FD_COPY into an inline function instead of a macro, or do some
GNU block-expression trickery.
Or we can just declare memset/memcpy in sys/select.h too?