🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52326

typedef for stack_t not included, why?

#52326
From: Don Steiny
Date: Thu, 03 Dec 1992 17:34
1031 lines
24718 bytes
I have been having a few problems with gcc (bit of bad luck on my part, 
by some strange coincidence it will not compile any non-trivial program
I try :-().

The first problem is that it does not seem to find the definition for 
stack_t in signal.h.   According to the #if I need to have 

#if !defined (__STRICT_ANSI__) && !defined(_POSIX_SOURCE)

before the code in the gcc-include/signal.h is included.   But why would
_POSIX_SOURCE be undefined?   Here is the program:
-----------------------------------------
This program:

#define	_KERNEL
#include <sys/param.h>
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/immu.h>
#include <sys/region.h>
#include <sys/errno.h>
#include <sys/tty.h>
#include <sys/sysmacros.h>
#include <sys/user.h>
#include <fcntl.h>

main(){}

-------------------------------------------
gcc t.c yeilds:

In file included from t.c:11:
/usr/include/sys/user.h:267: parse error before `stack_t'
/usr/include/sys/user.h:267: warning: no semicolon at end of struct or union
/usr/include/sys/user.h:273: `MAXSIG' undeclared, outside of functions
/usr/include/sys/user.h:274: `MAXSIG' undeclared, outside of functions
/usr/include/sys/user.h:361: parse error before `}'
/usr/include/sys/user.h:361: warning: data definition has no type or storage class
/usr/include/sys/user.h:370: field `segu_u' has incomplete type

------------------------------------------------------

I have run the fixinclude script for SVR4.

Here is the area around 267 in user.h

	clock_t	u_uservirt;		/* User virtual time */
	clock_t	u_procvirt;		/* Process virtual time */

	int	*u_ar0;			/* address of user's saved R0 */

	int	u_sigflag;		/* per-process signal flags */
	struct ucontext *u_oldcontext;	/* previous user context */
267->	stack_t u_sigaltstack;		/* sp & on-stack state variable */
	k_sigset_t u_signodefer;	/* signals defered when caught */
	k_sigset_t u_sigonstack;	/* signals taken on alternate stack */
	k_sigset_t u_sigresethand;	/* signals reset when caught */
	k_sigset_t u_sigrestart;	/* signals that restart system calls */


Here is the output of gcc -E (with blank lines deleted) -- as you can see,
the typedef for stack_t is not there.

# 1 "t.c"
# 1 "/usr/include/sys/param.h" 1 3
#ident	"@(#)head.sys:sys/param.h	11.28.4.1"
# 1 "/usr/include/sys/types.h" 1 3
#ident	"@(#)head.sys:sys/types.h	11.33.3.1"
typedef	unsigned char	uchar_t;
typedef	unsigned short	ushort_t;
typedef	unsigned int	uint_t;
typedef	unsigned long	ulong_t;
typedef char *		addr_t;  
typedef	char *		caddr_t;	 
typedef	long		daddr_t;	 
typedef	long		off_t;		 
typedef	short		cnt_t;		 
typedef struct _label { int val[6]; } label_t;
typedef	ulong_t paddr_t;	 
typedef	uchar_t use_t;		 
typedef	short		sysid_t;
typedef	short		index_t;
typedef	short		lock_t;		 
typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
typedef char *      faddr_t;     
typedef ulong_t k_sigset_t;	 
typedef ulong_t k_fltset_t;	 
typedef long		id_t;		 
					 
					 
					 
					 
typedef ulong_t	major_t;	 
typedef ulong_t	minor_t;	 
typedef	ushort_t o_mode_t;		 
typedef short	o_dev_t;		 
typedef	ushort_t o_uid_t;		 
typedef	o_uid_t	o_gid_t;		 
typedef	short	o_nlink_t;		 
typedef short	o_pid_t;		 
typedef ushort_t o_ino_t;		 
typedef	int		key_t;		 
typedef	ulong_t	mode_t;			 
typedef	long	uid_t;			 
typedef	uid_t	gid_t;			 
typedef	ulong_t nlink_t;		 
typedef ulong_t	dev_t;		 
typedef ulong_t	ino_t;		 
typedef long	pid_t;			 
typedef	uint_t	size_t;		 
typedef ushort_t      sel_t;       
typedef	long		time_t;		 
typedef	long		clock_t;  
typedef	struct { int r[1]; } *	physadr;
typedef	unsigned char	unchar;
typedef	unsigned short	ushort;
typedef	unsigned int	uint;
typedef	unsigned long	ulong;
# 139 "/usr/include/sys/types.h" 3
typedef	long	hostid_t;
typedef unsigned char	u_char;
typedef unsigned short	u_short;
typedef unsigned int	u_int;
typedef unsigned long	u_long;
typedef struct _quad { long val[2]; } quad;	 
# 1 "/usr/include/sys/select.h" 1 3
#ident	"@(#)head.sys:sys/select.h	1.2.3.1"
typedef	long	fd_mask;
typedef	struct fd_set {
	fd_mask	fds_bits[(((1024 )+(( (sizeof(fd_mask) * 8 )	)-1))/( (sizeof(fd_mask) * 8 )	)) ];
} fd_set;
# 183 "/usr/include/sys/types.h" 2 3
	 
# 213 "/usr/include/sys/types.h" 3
# 15 "/usr/include/sys/param.h" 2 3
# 1 "/usr/include/sys/fs/s5param.h" 1 3
#ident	"@(#)head.sys:sys/fs/s5param.h	11.6.7.1"
# 16 "/usr/include/sys/param.h" 2 3
				 
				 
				 
# 3 "t.c" 2
# 1 "/usr/include/sys/dir.h" 1 3
#ident	"@(#)head.sys:sys/dir.h	11.3.3.1"
# 1 "/usr/include/sys/fs/s5dir.h" 1 3
#ident	"@(#)head.sys:sys/fs/s5dir.h	11.4.7.1"
struct	direct
{
	o_ino_t	d_ino;		 
	char	d_name[14		];
};
# 16 "/usr/include/sys/dir.h" 2 3
# 5 "t.c" 2
# 1 "/usr/include/sys/immu.h" 1 3
#ident	"@(#)head.sys:sys/immu.h	11.18.4.1"
typedef union pte {     
	struct {
		uint pg_v	:  1,	 
		     pg_rw	:  1,	 
		     pg_us	:  1,	 
		     		:  2,	 
		     pg_ref	:  1,	 
		     pg_mod	:  1,	 
				:  2,	 
		     pg_tag	:  3,	 
		     pg_pfn	: 20;	 
	} pgm;
	uint	pg_pte;		 
} pte_t;
typedef struct ptbl {
	int page[	1024	];
} ptbl_t;
					 
# 178 "/usr/include/sys/immu.h" 3
extern int	syssegs[];	 
				 
				 
				 
extern pte_t	*kptbl;		 
				 
extern pte_t	*usertable;	 
				 
extern int	maxmem;		 
				 
extern int	freemem;	 
extern int	availrmem;	 
				 
extern int	availsmem;	 
				 
extern paddr_t	svirtophys( );
# 6 "t.c" 2
# 1 "/usr/include/sys/region.h" 1 3
#ident	"@(#)head.sys:sys/region.h	11.1.4.1"
# 7 "t.c" 2
# 1 "/usr/include/sys/errno.h" 1 3
#ident	"@(#)head.sys:sys/errno.h	11.18.4.1"
	 
	 
# 8 "t.c" 2
# 1 "/usr/include/sys/tty.h" 1 3
#ident	"@(#)head.sys:sys/tty.h	11.4.5.2"
struct clist {
	int	c_cc;		 
	struct cblock *c_cf;	 
	struct cblock *c_cl;	 
};
struct ccblock {
	caddr_t	c_ptr;		 
	ushort	c_count;	 
	ushort	c_size;		 
};
struct tty {
	struct	clist t_rawq;	 
	struct	clist t_canq;	 
	struct	clist t_outq;	 
	struct	ccblock	t_tbuf;	 
	struct	ccblock t_rbuf;	 
	int	(* t_proc)();	 
	ushort	t_iflag;	 
	ushort	t_oflag;	 
	ushort	t_cflag;	 
	ushort	t_lflag;	 
	short	t_state;	 
	o_pid_t	t_pgrp;		 
	char	t_line;		 
	char	t_delct;	 
	char	t_term;		 	
	char	t_tmflag;	 
	char	t_col;		 
	char	t_row;		 
	char	t_vrow;		 
	char	t_lrow;		 
	char	t_hqcnt;	 	
	char	t_dstat;	 
	unsigned char	t_cc[8 +2];	 
	char	t_mstate;	 
	unsigned char	t_mchar; 
	char	t_merr;		 
	char	t_xstate;	 
	 
	struct xmap	*t_xmp;	 
	 
	unsigned char	t_schar; 
	char	t_yyy[3];	 
};
struct cblock {
	struct cblock *c_next;
	unsigned char	c_first;
	unsigned char	c_last;
	unsigned char	c_data[64 ];
};
extern struct cblock	*cfree;
extern struct cblock	*getcb();
extern struct cblock	*getcf();
extern struct clist	ttnulq;
extern int		cfreecnt;
struct chead {
	struct cblock *c_next;
	int	c_size;
	int	c_flag;
};
extern struct chead cfreelist;
struct inter {
	int	cnt;
};
extern int ttlowat[], tthiwat[];
				 
				 
				 
				 
				 
# 9 "t.c" 2
# 1 "/usr/include/sys/sysmacros.h" 1 3
#ident	"@(#)head.sys:sys/sysmacros.h	11.14.3.1"
# 117 "/usr/include/sys/sysmacros.h" 3
			
# 10 "t.c" 2
# 1 "/usr/include/sys/user.h" 1 3
#ident	"@(#)head.sys:sys/user.h	11.45.5.2"
# 1 "/usr/include/sys/proc.h" 1 3
#ident	"@(#)head.sys:sys/proc.h	11.68.4.1"
typedef struct	proc {
	char	p_stat;			 
	char	p_cpu;			 
	u_char	p_curflt;		 
	u_char	p_swlocks;		 
	u_int	p_flag;			 
	o_uid_t	p_uid;			 
	 
	o_pid_t	p_oppid;		 
	o_pid_t	p_opgrp;		 
	o_pid_t	p_opid;			 
	struct	cred	*p_cred;	 
	struct sess	*p_sessp;	 
	int	p_pri;			 
	
	union {				 
		caddr_t p_cad;		 
		int	p_int;
	} p_unw;
	struct	proc	*p_link;	 
	struct	proc	*p_parent;	 
	struct	proc	*p_child;	 
	struct	proc	*p_sibling;	 
	int	p_clktim;		 
	caddr_t	p_brkbase;		 
	u_int	p_brksize;		 
	caddr_t	p_stkbase;		 
	u_int	p_stksize;		 
	u_int	p_swrss;		 
	clock_t	p_utime;		 
	clock_t	p_stime;		 
					 
	ushort	p_usize;		 
	ushort	p_user_license;		 
	caddr_t	p_ldt;			 
	 
	struct	vm86	*p_vm86p;	 
	struct as *p_as;		 
	int 	p_wdata;		 
	char	p_wcode;		 
	char	p_pollflag;		 
	u_char	p_cursig;		 
	pid_t	p_epid;			 
	sysid_t p_sysid;		 
	struct	proc  *p_rlink;		 
	int	p_srwchan;		 
	struct	vnode *p_trace;		 
	k_sigset_t p_sig;		 
	k_sigset_t p_sigmask;		 
	k_sigset_t p_hold;		 
	k_sigset_t p_ignore;		 
	k_sigset_t p_siginfo;		 
	struct	v86dat *p_v86;		 
	ushort	p_raiocnt;		 
	char	p_filler1[70];		 
	u_short	p_whystop;
	u_short	p_whatstop;
	pte_t	*p_ubptbl;		 
	char	p_filler2[68];		 
	k_fltset_t	p_fltmask;	 
	struct	evpd	*p_evpdp;	 
	struct timer  *p_italarm[2];	 
	struct proc *p_pglink;		 
	clock_t	p_cutime;		 
	clock_t	p_cstime;		 
 	short	p_aiocount;		 
 	short	p_aiowcnt;		 
 	id_t	p_cid;			 
 	void 	*p_clproc;		 
 	struct classfuncs *p_clfuncs;	 
	struct sigqueue *p_sigqueue;	 
	struct sigqueue *p_curinfo;	 
	caddr_t *p_segacct;		 
	struct seguser *p_segu;		 
	struct	vnode *p_exec;		 
    pid_t   p_ppid;          
    struct pid *p_pidp;      
    struct pid *p_pgidp;         
    struct sd *p_sdp;        
    struct proc *p_next;         
    struct proc *p_nextofkin;    
    struct proc *p_orphan;
    struct proc *p_nextorph;
} proc_t;
extern proc_t *practive;
extern proc_t *proc_sched;       
extern proc_t *proc_init;        
extern proc_t *proc_pageout;         
extern proc_t *proc_bdflush;         
struct pid {
    unsigned int pid_prinactive :1;
    unsigned int pid_pgorphaned :1;
    unsigned int pid_ref :6;
    unsigned int pid_prslot :24;
    pid_t pid_id;
    struct proc *pid_pglink;
    struct pid *pid_link;
};
extern struct pid pid0;
# 258 "/usr/include/sys/proc.h" 3
# 16 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/signal.h" 1 3
#ident	"@(#)head.sys:sys/signal.h	11.44.3.1"
# 87 "/usr/include/sys/signal.h" 3
# 124 "/usr/include/sys/signal.h" 3
# 171 "/usr/include/sys/signal.h" 3
# 17 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/siginfo.h" 1 3
#ident	"@(#)head.sys:sys/siginfo.h	1.20.3.1"
typedef struct siginfo {
	int	si_signo;			 
	int 	si_code;			 
	int	si_errno;			 
	union {
		int	_pad[	((128  / sizeof(int)) - 3) ];		 
		struct {			 
			pid_t	_pid;		 
			union {
				struct {
					uid_t	_uid;
				} _kill;
				struct {
					clock_t _utime;
					int	_status;
					clock_t _stime;
				} _cld;
			} _pdata;
		} _proc;			
		struct {	 
			caddr_t	_addr;		 
		} _fault;
		struct {			 
		 
			int	_fd;		 
			long	_band;
		} _file;
	} _data;
} siginfo_t;
typedef struct k_siginfo {
	int	si_signo;			 
	int 	si_code;			 
	int	si_errno;			 
	union {
		struct {			 
			pid_t	_pid;		 
			union {
				struct {
					uid_t	_uid;
				} _kill;
				struct {
					clock_t _utime;
					int	_status;
					clock_t _stime;
				} _cld;
			} _pdata;
		} _proc;			
		struct {	 
			caddr_t	_addr;		 
		} _fault;
		struct {			 
		 
			int	_fd;		 
			long	_band;
		} _file;
	} _data;
} k_siginfo_t;
typedef struct sigqueue {
	struct sigqueue		*sq_next;
	struct k_siginfo	sq_info;
} sigqueue_t;
# 225 "/usr/include/sys/siginfo.h" 3
# 18 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/tss.h" 1 3
#ident	"@(#)head.sys:sys/tss.h	1.1.2.1"
typedef struct flags {
	uint	fl_cf	:  1,		 
			:  1,		 
		fl_pf	:  1,		 
			:  1,		 
		fl_af	:  1,		 
			:  1,		 
		fl_zf	:  1,		 
		fl_sf	:  1,		 
		fl_tf	:  1,		 
		fl_if	:  1,		 
		fl_df	:  1,		 
		fl_of	:  1,		 
		fl_iopl :  2,		 
		fl_nt	:  1,		 
			:  1,		 
		fl_rf	:  1,		 
		fl_vm	:  1,		 
		fl_res	: 14;		 
} flags_t;
struct tss386 {
	unsigned long t_link;
	unsigned long t_esp0;
	unsigned long t_ss0;
	unsigned long t_esp1;
	unsigned long t_ss1;
	unsigned long t_esp2;
	unsigned long t_ss2;
	paddr_t	      t_cr3;
	unsigned long t_eip;
	unsigned long t_eflags;
	unsigned long t_eax;
	unsigned long t_ecx;
	unsigned long t_edx;
	unsigned long t_ebx;
	unsigned long t_esp;
	unsigned long t_ebp;
	unsigned long t_esi;
	unsigned long t_edi;
	unsigned long t_es;
	unsigned long t_cs;
	unsigned long t_ss;
	unsigned long t_ds;
	unsigned long t_fs;
	unsigned long t_gs;
	unsigned long t_ldt;
	unsigned long t_bitmapbase;
};
# 19 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/seg.h" 1 3
#ident	"@(#)head.sys:sys/seg.h	11.1.8.1"
struct seg_desc {
	unsigned long s_base;	 
	unsigned long s_limacc;	 
};
struct dscr {
	unsigned int	a_lim0015:16,
		 	a_base0015:16,
		  	a_base1623:8,
			a_acc0007:8,
			a_lim1619:4,
			a_acc0811:4,
			a_base2431:8;
};
				 
struct gate_desc {
	unsigned long  g_off;		 
	unsigned short g_sel;		 
	unsigned char  g_wcount;	 
	unsigned char  g_type;		 
};
struct gdscr {
	unsigned int	gd_off0015:16,
		 	gd_selector:16,
			gd_unused:8,
			gd_acc0007:8,
			gd_off1631:16;
};
# 20 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/resource.h" 1 3
#ident	"@(#)head.sys:sys/resource.h	1.12.3.1"
typedef unsigned long rlim_t;
struct rlimit {
	rlim_t	rlim_cur;		 
	rlim_t	rlim_max;		 
};
# 60 "/usr/include/sys/resource.h" 3
# 21 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/exec.h" 1 3
#ident	"@(#)head.sys:sys/exec.h	1.15.4.1"
# 1 "/usr/include/sys/vnode.h" 1 3
#ident  "@(#)head.sys:sys/vnode.h	1.40.4.2"
# 1 "/usr/include/sys/time.h" 1 3
#ident	"@(#)head.sys:sys/time.h	1.16.3.1"
struct timeval {
	long	tv_sec;		 
	long	tv_usec;	 
};
struct timezone {
	int	tz_minuteswest;	 
	int	tz_dsttime;	 
};
struct	itimerval {
	struct	timeval it_interval;	 
	struct	timeval it_value;	 
};
typedef struct 	timestruc {
	time_t 		tv_sec;		 
	long		tv_nsec;	 
} timestruc_t;
# 95 "/usr/include/sys/time.h" 3
int adjtime(struct timeval *, struct timeval *);
int adjtime(struct timeval *, struct timeval *);
int getitimer(int, struct itimerval *);
int setitimer(int, struct itimerval *, struct itimerval *);
# 1 "/usr/include/time.h" 1 3
#ident	"@(#)head:time.h	1.18"
struct	tm {	 
	int	tm_sec;
	int	tm_min;
	int	tm_hour;
	int	tm_mday;
	int	tm_mon;
	int	tm_year;
	int	tm_wday;
	int	tm_yday;
	int	tm_isdst;
};
extern clock_t clock(void);			
extern double difftime(time_t, time_t);		
extern time_t mktime(struct tm *);		
extern time_t time(time_t *);			
extern char *asctime(const struct tm *);		
extern char *ctime (const time_t *);		
extern struct tm *gmtime(const time_t *);		
extern struct tm *localtime(const time_t *);	
extern size_t strftime(char *, size_t, const char *, const struct tm *);
# 75 "/usr/include/time.h" 3
# 104 "/usr/include/time.h" 3
# 104 "/usr/include/sys/time.h" 2 3
# 55 "/usr/include/sys/vnode.h" 2 3
typedef enum vtype {
	VNON	= 0,
	VREG	= 1,
	VDIR	= 2,
	VBLK	= 3,
	VCHR	= 4,
	VLNK	= 5,
	VFIFO	= 6,
	VXNAM	= 7,
	VBAD	= 8
} vtype_t;
typedef struct vnode {
	u_short		v_flag;			 
	u_short		v_count;		 
	struct vfs	*v_vfsmountedhere;	 
	struct vnodeops	*v_op;			 
	struct vfs	*v_vfsp;		 
	struct stdata	*v_stream;		 
	struct page	*v_pages;		 
	enum vtype	v_type;			 
	dev_t		v_rdev;			 
	caddr_t		v_data;			 
	struct filock	*v_filocks;		 
	uint		v_pgcnt;		 
	long		v_filler[4];		 
} vnode_t;
typedef struct vnodeops {
	int	(*vop_open)();
	int	(*vop_close)();
	int	(*vop_read)();
	int	(*vop_write)();
	int	(*vop_ioctl)();
	int	(*vop_setfl)();
	int	(*vop_getattr)();
	int	(*vop_setattr)();
	int	(*vop_access)();
	int	(*vop_lookup)();
	int	(*vop_create)();
	int	(*vop_remove)();
	int	(*vop_link)();
	int	(*vop_rename)();
	int	(*vop_mkdir)();
	int	(*vop_rmdir)();
	int	(*vop_readdir)();
	int	(*vop_symlink)();
	int	(*vop_readlink)();
	int	(*vop_fsync)();
	void	(*vop_inactive)();
	int	(*vop_fid)();
	void	(*vop_rwlock)();
	void	(*vop_rwunlock)();
	int	(*vop_seek)();
	int	(*vop_cmp)();
	int	(*vop_frlock)();
	int	(*vop_space)();
	int	(*vop_realvp)();
	int	(*vop_getpage)();
	int	(*vop_putpage)();
	int	(*vop_map)();
	int	(*vop_addmap)();
	int	(*vop_delmap)();
	int	(*vop_poll)();
	int	(*vop_dump)();
	int	(*vop_pathconf)();
	int	(*vop_allocstore)();
	int	(*vop_filler[30])();
	void	(*vop_pagesgone)();
} vnodeops_t;
typedef struct vattr {
	long		va_mask;	 
	vtype_t		va_type;	 
	mode_t		va_mode;	 
	uid_t		va_uid;		 
	gid_t		va_gid;		 
	dev_t		va_fsid;	 
	ino_t		va_nodeid;	 
	nlink_t		va_nlink;	 
	u_long		va_size0;	 
	u_long		va_size;	 
	timestruc_t	va_atime;	 
	timestruc_t	va_mtime;	 
	timestruc_t	va_ctime;	 
	dev_t		va_rdev;	 
	u_long		va_blksize;	 
	u_long		va_nblocks;	 
	u_long		va_vcode;	 
	long		va_filler[8];	 
} vattr_t;
	
extern int vn_open();
extern int vn_create();
extern int vn_rdwr();
extern int vn_close();
extern void vn_rele();
extern int vn_link();
extern int vn_rename();
extern int vn_remove();
extern vnode_t *specvp();
extern vnode_t *makespecvp();
extern int fifo_rdchk();
extern int spec_rdchk();
# 336 "/usr/include/sys/vnode.h" 3
enum rm		{ RMFILE, RMDIRECTORY };	 
enum symfollow	{ NO_FOLLOW, FOLLOW };		 
enum vcexcl	{ NONEXCL, EXCL };		 
enum create	{ CRCREAT, CRMKNOD, CRMKDIR, CRCORE };  
typedef enum rm		rm_t;
typedef enum symfollow	symfollow_t;
typedef enum vcexcl	vcexcl_t;
typedef enum create	create_t;
# 16 "/usr/include/sys/exec.h" 2 3
# 1 "/usr/include/sys/cred.h" 1 3
#ident	"@(#)head.sys:sys/cred.h	1.8.3.1"
typedef struct cred {
	ushort	cr_ref;			 
	ushort	cr_ngroups;		 
	uid_t	cr_uid;			 
	gid_t	cr_gid;			 
	uid_t	cr_ruid;		 
	gid_t	cr_rgid;		 
	uid_t	cr_suid;		 
	gid_t	cr_sgid;		 
	gid_t	cr_groups[1];		 
} cred_t;
# 66 "/usr/include/sys/cred.h" 3
# 17 "/usr/include/sys/exec.h" 2 3
struct uarg {
	caddr_t estkstart;
	int estksize;
	u_int estkhflag;
	int stringsize;
	int argsize;
	int envsize;
	int argc;
	int envc;
	int prefixc;	 
	int prefixsize;
	caddr_t *prefixp;
	int auxsize;
	addr_t stacklow;
	caddr_t stackend;
	char **argp;
	char **envp;
	char *fname;
	int traceinval;
	caddr_t auxaddr;
	caddr_t argaddr;
	int flags;
};
typedef struct execenv {
	caddr_t ex_brkbase;
	short   ex_magic;
	vnode_t *ex_vp;
} execenv_t; 
struct execsw {
	short *exec_magic;
	int   (*exec_func)();
	int   (*exec_core)();
};
extern int nexectype;		 
extern struct execsw execsw[];
typedef struct exhdmap {
	struct exhdmap	*nextmap;
	off_t		curbase;
	off_t		curoff;
	int		cureoff;
	caddr_t		bndrycasep;
	long		bndrycasesz;
	struct fbuf	*fbufp;
	int		keepcnt;
} exhdmap_t;
typedef struct exhda {
	vnode_t	*vp;
	u_long	vnsize;
	exhdmap_t	*maplist;
	int state;
	int nomap;
} exhda_t;
extern int exhd_getmap(exhda_t *, off_t, int, int, char *);
extern void exhd_release(exhda_t *);
extern int remove_proc(struct uarg *);
extern int execmap(vnode_t *, caddr_t, size_t, size_t, off_t, int);
extern void setexecenv(struct execenv *);
extern int setregs(struct uarg *);
extern int core_seg(proc_t *, vnode_t *, off_t, caddr_t, size_t, rlim_t, cred_t
*);
extern int gexec(vnode_t **, struct uarg *, int, long *);
extern caddr_t execstk_addr(int, u_int *);
extern int execpermissions(struct vnode *, struct vattr *, exhda_t *, struct uarg *);
extern int arglistsz(char **, int *, int *, int);
extern int copyarglist(int, char **, int, char **, char *, int);
# 126 "/usr/include/sys/exec.h" 3
				 
# 22 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/vm/faultcatch.h" 1 3
#ident	"@(#)kern-vm:faultcatch.h	1.1"
typedef struct fault_catch {
	u_int	fc_flags;
	int	fc_errno;
	void	(*fc_func)();
	label_t	fc_jmp;
} fault_catch_t;
# 97 "/usr/include/vm/faultcatch.h" 3
# 23 "/usr/include/sys/user.h" 2 3
struct ufchunk {
	struct file *uf_ofile[24 ];
	char uf_pofile[24 ];
	struct ufchunk *uf_next;
};
typedef struct {		 
	long	word[16];
} k_sysset_t;
typedef	struct	user {
	char	u_stack[	3712 ]; 
	char	u_stack_filler_1[2];
	 
	char    u_fpvalid;               
	char    u_weitek;                
	union {
		struct  fpstate          
		{
			int     state[27]; 
			int     status;    
		} u_fpstate;
		struct	fp_emul
		{
			char	fp_emul[246];   
			char	fp_epad[2];
		} fp_emul;
	} u_fps;
	long	u_weitek_reg[33];	 
					 
					 
					 
					 
	 
	struct tss386 *u_tss;	 
	ushort	u_sztss;	 
	char	u_sigfault;	 
	char	u_usigfailed;	 
	ulong	u_sub;		 
     	char	u_filler1[12];
	 
	caddr_t	u_raioaddr;
	uint	u_raiosize;
	caddr_t	u_escbug;	 
	 
	struct seg_desc	u_tss_desc;
	struct seg_desc	u_ldt_desc;
	char	u_filler2[4];
	 
	char	u_nshmseg;
	 
	ushort		rfs_pad0;
	ushort 		rfs_pad1;
	int 		u_syscall;	 
	struct sndd	*u_srchan;	 
	long		rfs_pad2;
	ulong		u_userstack;
	long	u_bsize;		 
	struct execsw	*u_execsw;	 
	int	u_ageinterval;		 
	char 	u_psargs[	80	  ];	 	
	char	*u_tracepc;		 
	int	u_arg[8	  ];	 
	label_t	u_qsav;			 
	 
	char	u_segflg;		 
	char	u_error;		 
	 
	o_uid_t	u_uid;		 
	o_gid_t	u_gid;		 
	o_uid_t	u_ruid;		 
	o_gid_t	u_rgid;		 
	proc_t *u_procp;		 
	int	*u_ap;			 
	 
	union {
		struct	{
			int	r_v1;
			int	r_v2;
		} r_reg;
		off_t	r_off;
		time_t	r_time;
	} u_r;
	caddr_t	u_base;			 
	unsigned u_count;		 
	off_t	u_offset;		 
	short	u_fmode;		 
	ushort	u_pbsize;		 
	ushort	u_pboff;		 
	short	u_errcnt;		 
	daddr_t	u_rablock;		 
	int	u_sysabort;		 
	k_sysset_t u_entrymask;		 
	k_sysset_t u_exitmask;		 
	struct vnode *u_cdir;		 
	struct vnode *u_rdir;		 
	struct rlimit u_rlimit[7		];      
	uint	u_tsize;		 
	uint	u_dsize;		 
	uint	u_ssize;		 
	k_siginfo_t u_siginfo;		 
	int	u_systrap;		  
	int	u_execid;
	long	u_execsz;
		 
	o_pid_t  *u_ttyp;		 
	o_dev_t  u_ttyd;		 
	 
	char	u_sigevpend;
	 
	clock_t	u_uservirt;		 
	clock_t	u_procvirt;		 
	int	*u_ar0;			 
	int	u_sigflag;		 
	struct ucontext *u_oldcontext;	 
	stack_t u_sigaltstack;		 
	k_sigset_t u_signodefer;	 
	k_sigset_t u_sigonstack;	 
	k_sigset_t u_sigresethand;	 
	k_sigset_t u_sigrestart;	 
	k_sigset_t u_sigoldmask;	 
	k_sigset_t u_sigmask[MAXSIG];	 
	void	(*u_signal[MAXSIG])();	 
	void	(*u_sigreturn)();	 
	struct prof {			 
		u_short	*pr_base;	 
		unsigned pr_size;	 
		unsigned pr_off;	 
		unsigned pr_scale;	 
	} u_prof;
	 
	ulong	u_renv;			 
					 
					 
					 
					 
	 
	 
	struct exdata {
		struct    vnode  *vp;
		size_t    ux_tsize;	 
		size_t    ux_dsize;	 
		size_t    ux_bsize;	 
		size_t    ux_lsize;  	 
		long      ux_nshlibs; 	 
		short     ux_mag;   	 
		off_t     ux_toffset;	 
		off_t     ux_doffset;	 
		off_t     ux_loffset;	 
		caddr_t   ux_txtorg;	 
		caddr_t   ux_datorg;	 
		caddr_t	  ux_entloc;	 
		ulong	  ux_renv;	 
	} u_exdata;
	char	u_comm[14 ];
	time_t	u_start;
	clock_t	u_ticks;
	long	u_mem;
	long	u_ior;
	long	u_iow;
	long	u_iosw;
	long	u_ioch;
	char	u_acflag;
	mode_t	u_cmask;		 
	k_sigset_t	u_oldsig;	 
	 
	fault_catch_t	u_fault_catch;
	char	u_filler3[88];		 
	ulong	u_renv2;		 
	int     u_fpintgate[2];          
	 
	int    *u_callgatep;             
	int     u_callgate[2];           
	int     u_ldtmodified;           
	ushort	u_ldtlimit;		 
	 
	 
	char    u_debugpend;             
	 
	char    u_debugon;               
	int     u_debugreg[8];
	short	u_lock;			 
	int u_nofiles;			 
	struct ufchunk u_flist;		 
} user_t;
extern struct user u;
struct seguser {
	union {
		char segu_stack[	3712  ];
		struct user segu_u;
	} segusr;
};
					 
					 
					 
				 
				 
				 
				 
				 
				 
# 468 "/usr/include/sys/user.h" 3
# 11 "t.c" 2
# 1 "/usr/include/sys/ppio.h" 1 3
struct	ppio {
	unsigned short	*pp_data;
};
# 12 "t.c" 2
# 1 "/usr/include/fcntl.h" 1 3
#ident	"@(#)head:fcntl.h	1.6.1.7"
# 1 "/usr/include/sys/fcntl.h" 1 3
#ident	"@(#)head.sys:sys/fcntl.h	11.40.4.1"
# 136 "/usr/include/sys/fcntl.h" 3
# 150 "/usr/include/sys/fcntl.h" 3
typedef struct flock {
	short	l_type;
	short	l_whence;
	off_t	l_start;
	off_t	l_len;		 
	long	l_sysid;
        pid_t	l_pid;
	long	pad[4];		 
} flock_t;
# 13 "/usr/include/fcntl.h" 2 3
extern int fcntl(int, int, ...);
extern int open(const char *, int, ...);
extern int creat(const char *, mode_t);
# 13 "t.c" 2
-- 
Don Steiny
Don Steiny Software
Santa Cruz, CA 95060
(408) 425-0382
Technical Details
Message-ID: <181@steiny.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!infoserv!steiny!

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,66f324bc1e7e9b33,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-12-03 10:48:36 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!infoserv!steiny!
From: steiny@steiny.com (Don Steiny)
Newsgroups: gnu.gcc.help
Subject: typedef for stack_t not included, why?
Message-ID: <181@steiny.com>
Date: 3 Dec 92 17:34:04 GMT
Distribution: gnu
Organization: Don Steiny Software
Lines: 1031