problem with struct user in user.h

Prabhakar Somu psomu at pilot.njin.net
Mon Feb 18 11:52:28 AEST 1991


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)

#ifdef _KERNEL
/* comments */
#define u	(*(struct user *)UADDR)
/* comments */
struct user *up;
#endif

The same structure was defined in the 3.2 include file 
/usr/include/sys/user.h similarly except that "_KERNEL"
was "KERNEL" and the actual address was used instead of UADDR.
When I tried to compile this module the C compiler says u 
is undefined:
ccom: Error: ./axioctl.c, line 199: u undefined
      	{ u.u_error = 22	; return(22	); }	
      -----^
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 . 

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 *);

Is that a bug/Feature ? Were the two files not supposed to be 
used in conjuntion with each other ? Or, am I misunderstanding 
something? 

Any help/suggestions will be greatly appreciated.
Thanks,
/somu	somu at mirage.umdnj.edu
			or
	psomu at pilot.njin.net
-- 
  ()     __   _ _ _   _    __
  /\    / ') ' ) ) ) ' )  /
 /  )  /  /   / / /   /  /
/__/_ (__/   / ' (_  (__/



More information about the Comp.sys.sgi mailing list