1 /*
2  * Copyright (c) 1992-1998 Michael A. Cooper.
3  * This software may be freely used and distributed provided it is not
4  * sold for profit or used in part or in whole for commercial gain
5  * without prior written agreement, and the author is credited
6  * appropriately.
7  */
8 
9 /*
10  * $Id: os-svr4.h,v 6.17 1998/11/10 04:00:05 mcooper Exp $
11  * @(#)os-svr4.h
12  */
13 
14 /*
15  * System V Release 4 (SVR4)
16  */
17 
18 /*
19  * Define the following name for use in #ifdef's.
20  * The value should be all upper-case with no periods (.).
21  */
22 #if	!defined(SVR4)
23 #define SVR4
24 #endif
25 
26 /*
27  * Set process args to messages that show up when running ps(1)
28  *
29  * Under some OS's, the SETARGS code will cause ": is not an identifier"
30  * errors for "special" commands.
31  */
32 #define SETARGS
33 
34 /*
35  * Define the type of directory routines your system has.
36  */
37 #define DIR_TYPE	DIR_DIRENT
38 
39 /*
40  * Determine what routines we have to get filesystem info.
41  */
42 #define FSI_TYPE	FSI_GETMNTENT2
43 
44 /*
45  * Type of non-blocking I/O.
46  */
47 #define NBIO_TYPE	NBIO_FCNTL
48 
49 /*
50  * Type of wait() function to use.
51  */
52 #define WAIT_TYPE	WAIT_WAITPID
53 
54 /*
55  * Type of argument passed to wait() (above).
56  */
57 #define WAIT_ARG_TYPE	int
58 
59 /*
60  * Select the type of executable file format.
61  */
62 #define EXE_TYPE	EXE_ELF
63 
64 /*
65  * Select the type of statfs() system call (if any).
66  */
67 #define STATFS_TYPE	STATFS_BSD
68 
69 /*
70  * Type of arg functions we have.
71  */
72 #define ARG_TYPE	ARG_STDARG
73 
74 /*
75  * Type of signal handling functions.
76  */
77 #if	!defined(POSIX_SIGNALS)
78 #define POSIX_SIGNALS
79 #endif
80 
81 #include <signal.h>
82 #define signal(s,a) sigset(s,(void(*)())a)
83 
84 /*
85  * System V compatibility
86  */
87 #include <string.h>
88 
89 #define bcopy(a,b,c) 	memcpy(b,a,c)
90 #define bzero(a,b) 	memset(a,0,b)
91 #define setlinebuf(a)	setvbuf(a, NULL, _IOLBF, BUFSIZ)
92 
93 /*
94  * UID argument type for chown()
95  */
96 typedef uid_t CHOWN_UID_T;
97 
98 /*
99  * GID argument type for chown()
100  */
101 typedef gid_t CHOWN_GID_T;
102 
103 /*
104  * Our types
105  */
106 typedef uid_t UID_T;	/* Must be signed */
107 typedef gid_t GID_T;	/* Must be signed */
108 
109 /*
110  * Generic pointer, used by memcpy, malloc, etc.  Usually char or void.
111  */
112 typedef void POINTER;
113 
114 /*
115  * Type of set file time function available
116  */
117 #define SETFTIME_TYPE	SETFTIME_UTIME
118 
119 /*
120  * Things we have
121  */
122 #define HAVE_FCHOWN			/* Have fchown() */
123 #define HAVE_FCHMOD			/* Have fchmod() */
124 #define HAVE_SELECT			/* Have select() */
125 #define HAVE_SAVED_IDS			/* Have POSIX style saved [ug]id's */
126 
127 /*
128  * Things we need
129  */
130 #define NEED_UTIME_H			/* Need <utime.h> */
131 
132 /*
133  * Path to the remote shell command
134  */
135 #define _PATH_REMSH	"/usr/bin/rsh"
136 
137 /*
138  * Path to sendmail on generic SVR4 systems.
139  * This is probably wrong on many SVR4 systems.
140  */
141 #ifndef _PATH_SENDMAIL
142 #define _PATH_SENDMAIL	"/usr/ucblib/sendmail"
143 #endif
144 
145 /*
146  * Miscellaneous
147  */
148 #define MNTENT_H	<sys/mntent.h>	/* Name of mntent.h include file */
149 #define MNTTAB_H	<sys/mnttab.h>	/* Name of mnttab.h include file */
150