problem with struct user in user.h

Dave Olson olson at anchor.esd.sgi.com
Tue Feb 19 05:50:47 AEST 1991


In <Feb.17.19.52.27.1991.19030 at pilot.njin.net> psomu at 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 <time.h> if _KERNEL is not defined.
--

	Dave Olson

Life would be so much easier if we could just look at the source code.



More information about the Comp.sys.sgi mailing list