* mktime in include/linux
@ 2001-06-22 2:30 Rick Hohensee
2001-06-22 11:43 ` Erik Mouw
2001-06-22 15:16 ` Jonathan Lundell
0 siblings, 2 replies; 4+ messages in thread
From: Rick Hohensee @ 2001-06-22 2:30 UTC (permalink / raw)
To: linux-kernel
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.
Rick Hohensee
www.cLIeNUX.com
:;d -d */
Cintpos/ boot/ device/ incoming/ owner/ temp/
Debian/ command/ floppy/ log/ source/
Linux/ configure/ guest/ lost+found/ subroutine/
NetBSD/ dev/ help/ mounts/ suite/
:; cLIeNUX /dev/tty12 22:00:52 /
:;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mktime in include/linux
2001-06-22 2:30 mktime in include/linux Rick Hohensee
@ 2001-06-22 11:43 ` Erik Mouw
2001-06-22 15:16 ` Jonathan Lundell
1 sibling, 0 replies; 4+ messages in thread
From: Erik Mouw @ 2001-06-22 11:43 UTC (permalink / raw)
To: Rick Hohensee; +Cc: linux-kernel
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.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mktime in include/linux
2001-06-22 2:30 mktime in include/linux Rick Hohensee
2001-06-22 11:43 ` Erik Mouw
@ 2001-06-22 15:16 ` Jonathan Lundell
2001-06-22 16:49 ` Rick Hohensee
1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Lundell @ 2001-06-22 15:16 UTC (permalink / raw)
To: Erik Mouw, Rick Hohensee; +Cc: linux-kernel
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.
--
/Jonathan Lundell.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mktime in include/linux
2001-06-22 15:16 ` Jonathan Lundell
@ 2001-06-22 16:49 ` Rick Hohensee
0 siblings, 0 replies; 4+ messages in thread
From: Rick Hohensee @ 2001-06-22 16:49 UTC (permalink / raw)
To: Jonathan Lundell; +Cc: linux-kernel
>
> 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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-06-22 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-22 2:30 mktime in include/linux Rick Hohensee
2001-06-22 11:43 ` Erik Mouw
2001-06-22 15:16 ` Jonathan Lundell
2001-06-22 16:49 ` Rick Hohensee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).