#include  "KIPdefs.h"	/* KIP/global */
#define NOFILE 15 /* max open files per process - taken from /gsb/include/param.h */
/* NOTE: IF THIS FILE IS CHANGED, extern.c MUST BE RECOMPILED!!!! */

#ifndef	DEFSONLY

#ifdef		EMULATE
char LOW[] "/u/guard/glow" ;
char HIGH[] "/u/guard/ghgh" ;
char KIPOF[] "/u/guard/ghgh/ofdxxxx" ;

#else		EMULATE

char LOW[] "/glow" ;
char HIGH[] "/ghgh" ;
char KIPOF[] "/ghgh/ofdxxxx" ;
int errno ;
#endif		EMULATE

ipc_block Ipc_block ;
p_block null_Pblk, inp, outp ;
proc_stat_block Proc_stat_block ;
msg_struct Msg_struct ;			/* IPC message to send */
int own_ruid ;			/* Own real user ID */
int own_euid -1 ;		/* Own effective user ID */
int own_rgid ;			/* Own real group ID */
int own_egid -1 ;		/* Own effective group ID */

seid child_seid[MAXCHILD] ;		/* Child seid(s) */
seid own_seid 0L ;		/* Own seid */
seid parent_seid 0L ;		/* SEID of parent process */
seid term_seid ;		/* SEID of controlling tty */

int blockNo[2] ;		/* Block number for kernel calls */
ioStatus IoStatus ;		/* I/O status of an operation */

int *KIP_segaddr
{
	0140000,
	0120000,
	0100000,
	0060000,
	0040000,
	0020000,
} ;

struct O_F_data O_F_data[NOFILE+1] ;
struct buf_data buf_data[NOFILE+1] ;
struct tty_data tty_data[MAX_TTYS] ;

char I_O_buff[BLOCKSZ*(MAX_TTYS+1)] ;

#else	DEFSONLY

extern ipc_block Ipc_block ;
extern p_block null_Pblk, inp, outp ;
extern proc_stat_block Proc_stat_block ;
extern msg_struct Msg_struct ;

extern char I_O_buff[] ;
extern char LOW[] ;
extern char HIGH[] ;
extern char KIPOF[] ;

extern errno ;
extern fin ;

extern own_ruid ;			/* Own real user ID */
extern own_euid ;			/* Own effective user ID */
extern own_rgid ;			/* Own real group ID */
extern own_egid ;			/* Own effective group ID */
extern seid child_seid[MAXCHILD] ;
extern seid own_seid ;
extern seid parent_seid ;
extern seid term_seid ;

extern int blockNo[2] ;		/* Block number for kernel calls */
extern ioStatus IoStatus ;		/* I/O status of an operation */
extern int *KIP_segaddr ;
extern struct O_F_data O_F_data[NOFILE+1] ;
extern struct buf_data buf_data[NOFILE+1] ;
extern struct tty_data tty_data[MAX_TTYS] ;
#endif	DEFSONLY
