Patches to improve Hurd parts: include/sys/socket.h
Thomas Schwinge
tschwinge@gnu.org
Thu Dec 18 14:53:00 GMT 2008
Hello!
On Wed, Dec 17, 2008 at 03:42:10PM -0800, Paul Eggert wrote:
> Thomas Schwinge <tschwinge@gnu.org> writes:
> > Some questions remain. Note that all this is not Hurd-specific.
> >
> > Are we allowed to include <fcntl.h> from include/sys/socket.h?
>
> No, as that would infringe on the user's name space.
What Roland already said. Thanks nevertheless!
> > Where to put the COMPILE_TIME_ASSERT definition? For sure into some
> > other file, but into which one?
>
> I suggest using the macro name that glibc already uses in time/mktime.c:
> 'verify'.
Aha! I was browsing through the glibc sources, but couldn't easily find
a place where such a compile-time check was done already.
> If you'd like to share this, you can add a file called
> <verify.h> and call the macro 'verify'. Gnulib has a file verify.h that
> does this and is widely tested with many compilers. For more, please
> see:
>
> http://www.gnu.org/software/gnulib/
>
> http://www.gnu.org/software/gnulib/MODULES.html#module=verify
>
> The header and macro needn't be visible to gnulib's users, of course.
> Though I would advocate adding verify.h (or something like it) to glibc,
> as part of a separate change, at some point: it's quite useful to have a
> compile-time verification macro.
I'll be sure to have a look at this, thanks! Would the maintainers be
fine with adding this file
<http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h>
to a generic place in the glibc sources or shall I #define the macro
internally where I use it? As stated above, this already used in generic
code, so this could be unified then.
Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20081218/13351edd/attachment.sig>
More information about the Libc-alpha
mailing list