RFC: time_t declaration

Robert Millan rmh@debian.org
Wed, 1 Dec 2004 02:54:15 +0100


Hi!

We have a problem with the time_t declaration:  It is declared with a different
type in FreeBSD than in GNU.  Therefore the kernel is in disparity with libc.

If I understood correctly, in his patchset for kfreebsd 4.6 headers Bruno
Haible renamed time_t to __kernel_time_t (and analogously for structures that
contain time_t), presumably to avoid conflict with the time_t declaration in
libc.  So userland programs need to use __kernel_time_t and friends when the
data is to be analised by the kernel (after a syscall) and time_t when the
stuff is for libc.

Bruno, could you confirm (if you remember) that this is the situation?

I'm considering switching to a model in which userland is adapted to use the
same value as the kernel.  This would save us work in maintaining the patchset
for kfreebsd5-headers (which, btw, contains breakage because of this), but i'm
not sure if Glibc could get into trouble by changing the userland time_t
definition in <bits/types.h>.

Any suggestions?

-- 
 .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
: :' :
`. `'    http://www.debian.org/ports/kfreebsd-gnu
  `-