lkml.org 
[lkml]   [2001]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: mktime in include/linux
Date
> 
> At 1:43 PM +0200 2001-06-22, Erik Mouw wrote:
> >On Thu, Jun 21, 2001 at 10:30:40PM -0400, Rick Hohensee wrote:
> >> Why does Linux have a mktime routine fully coded in linux/time.h that
> >> conflicts directly with the ANSI C standard library routine of the same
> >> name? It breaks a couple things against libc5, including gcc 3.0. OK, you
> >> don't care about libc5. It's still pretty weird. Wierd? Weird.
> >
> >This has been brought up many times on this list: you are not supposed
> >to include kernel headers in userland.
>
> That's not the problem, I think. Most of time.h, including the
> definition of mktime, is #ifdef __KERNEL__, so it shouldn't be
> breaking anything in userland even if you do include it. And you
> might, in order to obtain the interface definition of struct
> timespec. What's weird is: why is __KERNEL__ getting #defined in
> Rick's userland?
>
> There can't, of course, be any blanket prohibition against using
> kernel headers in userland. Think about ioctl.h, for example.

Sounds like a clue. Thanks.

Rick

> --
> /Jonathan Lundell.
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.041 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site