This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patches to improve Hurd parts: include/sys/socket.h


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.  Please see the
following specification of the names that POSIX currently allows
<sys/socket.h> to define:

http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html#tag_02_02_02

http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html

> 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'.  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.

Hope this helps.  --Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]