Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!ncar!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!anchor!olson From: olson@anchor.esd.sgi.com (Dave Olson) Newsgroups: comp.sys.sgi Subject: Re: problem with struct user in user.h Keywords: user_t,user,_KERNEL,time,time_t Message-ID: <1991Feb18.185047.15538@odin.corp.sgi.com> Date: 18 Feb 91 18:50:47 GMT References: Sender: news@odin.corp.sgi.com (Net News) Distribution: usa Organization: Silicon Graphics, Inc. Mountain View, CA Lines: 38 In psomu@pilot.njin.net (Prabhakar Somu) writes: | Hi, | | I am trying to recompile a device driver on Irix 3.3.1 (4D70GT) | which used to compile and work just fine on Irix 3.2. I have the | following problems: | | i) One of the modules in the driver uses the user structure | "u" defined in /usr/include/sys/user.h as : (beginning line 205) | Can I can explicitly define u in my source ? Do I have to explicitly | #define _KERNEL ? I didn't have to do either in Irix 3.2 . Do not redefine u if you expect your driver to keep working, as it may change in future releases... You should be defining _KERNEL, instead of KERNEL. 3.2 had KERNEL in some places, INKERNEL in others. To reduce name space pollution, it was changed to _KERNEL. Given the __ rules for ANSI C, we probably should have made it __KERNEL, and may in some future release. This might have made it into the release notes, I'm not sure. | ii) There also seems to be a name clash in the following two files | on Irix 3.3.1 | | In the file "/usr/include/sys/systm.h" line 34 reads: | extern time_t time; | and in the file "/usr/include/time.h" line 63 reads: | extern time_t time(time_t *); No problem here either, once you get your defines right. systm.h should be used in the kernel only. include/sys/time.h only includes if _KERNEL is not defined. -- Dave Olson Life would be so much easier if we could just look at the source code.