xref: /onnv-gate/usr/src/lib/libxcurses/h/posix/mkslocal.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 1996-2003 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate /*
30*0Sstevel@tonic-gate  * <mkslocal.h>, POSIX Version - local <mks.h> requirements
31*0Sstevel@tonic-gate  *
32*0Sstevel@tonic-gate  * This generic POSIX version should be used as a template for creation of
33*0Sstevel@tonic-gate  * any new <mkslocal.h> file.
34*0Sstevel@tonic-gate  *
35*0Sstevel@tonic-gate  * Copyright 1985, 1993 by Mortice Kern Systems Inc.  All rights reserved.
36*0Sstevel@tonic-gate  *
37*0Sstevel@tonic-gate  * $Header: /rd/h/posix/rcs/mkslocal.h 1.168 1995/06/21 20:33:29 jeffhe Exp mark $
38*0Sstevel@tonic-gate  */
39*0Sstevel@tonic-gate 
40*0Sstevel@tonic-gate #if 0	/* not required for POSIX systems; here for documentation only */
41*0Sstevel@tonic-gate 
42*0Sstevel@tonic-gate #include <sys/types.h>
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate #ifndef VERSION
45*0Sstevel@tonic-gate #define VERSION "MKS InterOpen I/XCU 4.3 SB"     /* Used for version# */
46*0Sstevel@tonic-gate #endif
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate 
49*0Sstevel@tonic-gate #define name-of-system 1	/* for identifying system (i.e. BSD, SYSV,
50*0Sstevel@tonic-gate 				 * DOS, etc)
51*0Sstevel@tonic-gate 				 */
52*0Sstevel@tonic-gate 
53*0Sstevel@tonic-gate #ifndef __STDC__
54*0Sstevel@tonic-gate /* For non-ANSI C compilers, we need to define
55*0Sstevel@tonic-gate  * the character encoding for some special control characters
56*0Sstevel@tonic-gate  * If these are NOT defined here, then <mks.h> will use
57*0Sstevel@tonic-gate  * the ASCII encodings as the default values.
58*0Sstevel@tonic-gate  *
59*0Sstevel@tonic-gate  * For ANSI C compilers, there are special C character constants supported
60*0Sstevel@tonic-gate  * by the compiler.  <mks.h> will properly handle this.
61*0Sstevel@tonic-gate  *
62*0Sstevel@tonic-gate  */
63*0Sstevel@tonic-gate #define     M_ALERT '\7'            /* ASCII encoding for \a */
64*0Sstevel@tonic-gate #define     M_VTAB  '\13'           /* ASCII encoding for <VT> */
65*0Sstevel@tonic-gate #endif /* __STDC__ */
66*0Sstevel@tonic-gate 
67*0Sstevel@tonic-gate 
68*0Sstevel@tonic-gate /* M_ESCAPE - the system default character encoding for the <ESC> character
69*0Sstevel@tonic-gate  * If this is not defined here, then <mks.h> will
70*0Sstevel@tonic-gate  * default to use the ASCII encodings.
71*0Sstevel@tonic-gate  */
72*0Sstevel@tonic-gate #define     M_ESCAPE '\033'         /* ASCII default code for <ESC> */
73*0Sstevel@tonic-gate 
74*0Sstevel@tonic-gate #define	SETVBUF(fp,bp,f,s) setvbuf(fp,f,bp,s)	/* for some SysV and Xenix
75*0Sstevel@tonic-gate 						 * systems, which have unusual
76*0Sstevel@tonic-gate 						 * calling sequences
77*0Sstevel@tonic-gate 						 */
78*0Sstevel@tonic-gate 
79*0Sstevel@tonic-gate #define	M_DEFAULT_PATH	"/bin:/usr/bin"
80*0Sstevel@tonic-gate 				/* Default PATH. Not used yet.
81*0Sstevel@tonic-gate 				 */
82*0Sstevel@tonic-gate 
83*0Sstevel@tonic-gate 
84*0Sstevel@tonic-gate #define M_CS_PATH	"/bin:/usr/bin"
85*0Sstevel@tonic-gate 				/* This string is a list of directories where
86*0Sstevel@tonic-gate 				 * all the POSIX.2 utilities can be found.
87*0Sstevel@tonic-gate 				 * Returned by constr(_CS_PATH, buf, len).
88*0Sstevel@tonic-gate 				 * The shell uses this search path in
89*0Sstevel@tonic-gate 				 *	command -p util ...
90*0Sstevel@tonic-gate 				 * The list plus "." is used by login
91*0Sstevel@tonic-gate 				 * and sh as the default $PATH.
92*0Sstevel@tonic-gate 				 */
93*0Sstevel@tonic-gate 
94*0Sstevel@tonic-gate #define M_CS_SHELL	"/bin/sh"
95*0Sstevel@tonic-gate 				/* The pathname of the shell utility.
96*0Sstevel@tonic-gate 				 * Returned by confstr(_CS_SHELL, buf, len).
97*0Sstevel@tonic-gate 				 * This string defines the path to the
98*0Sstevel@tonic-gate 				 * the POSIX.2 command language interpreter,
99*0Sstevel@tonic-gate 				 * so we do not have to search M_CS_PATH.
100*0Sstevel@tonic-gate 				 */
101*0Sstevel@tonic-gate 
102*0Sstevel@tonic-gate #define M_CS_BINDIR     "/bin"
103*0Sstevel@tonic-gate #define M_CS_LIBDIR     "/lib"
104*0Sstevel@tonic-gate #define M_CS_TMPDIR     "/tmp"
105*0Sstevel@tonic-gate #define M_CS_ETCDIR     "/etc"
106*0Sstevel@tonic-gate #define M_CS_SPOOLDIR   "/spool"
107*0Sstevel@tonic-gate #define M_CS_NLSDIR     "/lib/nls"
108*0Sstevel@tonic-gate #define M_CS_MANPATH    "/man"
109*0Sstevel@tonic-gate 				/* the M_CS_* strings are used by MKS's version
110*0Sstevel@tonic-gate 				 * of the POSIX.2 confstr() API.
111*0Sstevel@tonic-gate 				 * The M_CS_*DIR strings point to system
112*0Sstevel@tonic-gate 				 * default directories.
113*0Sstevel@tonic-gate 				 * The M_CS_*PATH strings may be a list of
114*0Sstevel@tonic-gate 				 * colon seperated system directories
115*0Sstevel@tonic-gate 				 */
116*0Sstevel@tonic-gate 
117*0Sstevel@tonic-gate 
118*0Sstevel@tonic-gate #define	M_BINDIR(path)	"/bin/" # path
119*0Sstevel@tonic-gate 				/* M_BINDIR - directory where the POSIX.2
120*0Sstevel@tonic-gate 				 * utilities live. (e.g ed, ...)
121*0Sstevel@tonic-gate 				 */
122*0Sstevel@tonic-gate 
123*0Sstevel@tonic-gate #define	M_LIBDIR(path)	M_CS_LIBDIR # path
124*0Sstevel@tonic-gate 				/* Define to convert a pathname relative to the
125*0Sstevel@tonic-gate 				 * library directory to an absolute pathname.
126*0Sstevel@tonic-gate 				 * Traditional systems would use "/usr/lib/"
127*0Sstevel@tonic-gate 				 * <mks.h> should always be overridden.
128*0Sstevel@tonic-gate 				 *
129*0Sstevel@tonic-gate 				 * Used by bc, cron
130*0Sstevel@tonic-gate 				 */
131*0Sstevel@tonic-gate 
132*0Sstevel@tonic-gate #define	M_ETCDIR(path)	M_CS_ETCDIR # path
133*0Sstevel@tonic-gate 				/* Define to convert a pathname relative to the
134*0Sstevel@tonic-gate 				 * etcetera directory to an absolute pathname.
135*0Sstevel@tonic-gate 				 * Traditional systems would use "/etc/"
136*0Sstevel@tonic-gate 				 * <mks.h> should always be overridden.
137*0Sstevel@tonic-gate 				 * Used by file, vi, sh, ccg, lex, awk
138*0Sstevel@tonic-gate 				 */
139*0Sstevel@tonic-gate 
140*0Sstevel@tonic-gate #define	M_SPOOLDIR(path) M_CS_SPOOLDIR # path
141*0Sstevel@tonic-gate 				/* Define to convert a pathname relative to the
142*0Sstevel@tonic-gate 				 * spool directory to an absolute pathname.
143*0Sstevel@tonic-gate 				 * Traditional systems would use "/usr/spool/"
144*0Sstevel@tonic-gate 				 * <mks.h> should always be overridden.
145*0Sstevel@tonic-gate 				 */
146*0Sstevel@tonic-gate 
147*0Sstevel@tonic-gate #define	M_NLSDIR(path)	"M_CS_NLSDIR # path
148*0Sstevel@tonic-gate 				/* Directory name used by the locale program
149*0Sstevel@tonic-gate 				 * to locate specific compiled locales.
150*0Sstevel@tonic-gate 				 * Should always be set, if using the mks
151*0Sstevel@tonic-gate 				 * supplied i18n package.  Possible location
152*0Sstevel@tonic-gate 				 * might be /usr/lib/nls.
153*0Sstevel@tonic-gate 				 */
154*0Sstevel@tonic-gate #define	M_TMPDIR	M_CS_TMPDIR	/* Temporary file storage directory.
155*0Sstevel@tonic-gate 				 * Used for P_tmpdir in case its not defined
156*0Sstevel@tonic-gate 				 * in <stdio.h>
157*0Sstevel@tonic-gate 				 */
158*0Sstevel@tonic-gate 
159*0Sstevel@tonic-gate #define	M_MANPATH	M_CS_MANPATH
160*0Sstevel@tonic-gate 				/* a list of colon seperated pathnames
161*0Sstevel@tonic-gate 				 * which the man utility uses
162*0Sstevel@tonic-gate 				 * as the default search path
163*0Sstevel@tonic-gate 				 * (e.g when MANPATH environment variable
164*0Sstevel@tonic-gate 				 * not initialized.
165*0Sstevel@tonic-gate 				 */
166*0Sstevel@tonic-gate 
167*0Sstevel@tonic-gate 
168*0Sstevel@tonic-gate 
169*0Sstevel@tonic-gate #define M_SYSTEM_HELP "help.cmd"/* help command only: If the help command
170*0Sstevel@tonic-gate 				 * doesn't know about a given request for help
171*0Sstevel@tonic-gate 				 * then pass the help request on to another
172*0Sstevel@tonic-gate 				 * help program.  Note that if the name for
173*0Sstevel@tonic-gate 				 * the other is also help, there must be
174*0Sstevel@tonic-gate 				 * some form of name qualification.  No attempt
175*0Sstevel@tonic-gate 				 * will be made if this is not defined.
176*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined
177*0Sstevel@tonic-gate 				 */
178*0Sstevel@tonic-gate 
179*0Sstevel@tonic-gate #define DEF_NLSPATH     "/lib/nls/locale/%L/%N.cat"
180*0Sstevel@tonic-gate 				/* define the default path that should be used
181*0Sstevel@tonic-gate 				 * by MKS's implementation of catopen() when
182*0Sstevel@tonic-gate 				 * trying to open the message cataloges
183*0Sstevel@tonic-gate 				 * If you are not using MKS's implementation
184*0Sstevel@tonic-gate 				 * of catopen(), then this definition
185*0Sstevel@tonic-gate 				 * is not required.
186*0Sstevel@tonic-gate 				 */
187*0Sstevel@tonic-gate 
188*0Sstevel@tonic-gate #define M_ENDPWENT	1	/* set to 1 if system provides a endpwent()
189*0Sstevel@tonic-gate 				 * routine.
190*0Sstevel@tonic-gate 				 * Normally, systems provide this routine
191*0Sstevel@tonic-gate 				 * only if getpw*() routines allocate
192*0Sstevel@tonic-gate 				 * some resources which a user may want
193*0Sstevel@tonic-gate 				 * to deallocate when finished accessing the
194*0Sstevel@tonic-gate 				 * user getpw*() routines
195*0Sstevel@tonic-gate 				 * This is the case for conventional
196*0Sstevel@tonic-gate 				 * UNIX systems
197*0Sstevel@tonic-gate 				 */
198*0Sstevel@tonic-gate 
199*0Sstevel@tonic-gate #undef M_SHBLTIN_ANYCMD 	/* set to 1 if you want ability to create an
200*0Sstevel@tonic-gate 				 * executable with any name, using shbltin.c.
201*0Sstevel@tonic-gate 				 * [ shbltin.c was created to satisfy
202*0Sstevel@tonic-gate 				 *   POSIX.2-1992 Section 2.3 "regular built-in
203*0Sstevel@tonic-gate 				 *   utilities". ]
204*0Sstevel@tonic-gate 				 * If this is undefined, then the only valid
205*0Sstevel@tonic-gate 				 * command names are those listed in an
206*0Sstevel@tonic-gate 				 * internal table in shbltin.c which are
207*0Sstevel@tonic-gate 				 * are checked at run-time against
208*0Sstevel@tonic-gate 				 * basename(argv[0]).
209*0Sstevel@tonic-gate 				 * If the command name is not listed in the
210*0Sstevel@tonic-gate 				 * table, then program will exit
211*0Sstevel@tonic-gate 				 * with an error message.
212*0Sstevel@tonic-gate 				 *
213*0Sstevel@tonic-gate 				 * Normally, this is undefined, since
214*0Sstevel@tonic-gate 				 * it becomes too easy to get into an infinite
215*0Sstevel@tonic-gate 				 * loop if you name this executable to a
216*0Sstevel@tonic-gate 				 * non-bltin command.
217*0Sstevel@tonic-gate 				 */
218*0Sstevel@tonic-gate 
219*0Sstevel@tonic-gate /* shbltin:
220*0Sstevel@tonic-gate  *   shbltin.c is configurable but its configuration is done
221*0Sstevel@tonic-gate  *   in mkslocal.mk.
222*0Sstevel@tonic-gate  *   See M_SHBLTIN_ULIMIT
223*0Sstevel@tonic-gate  *   See M_SHBLTIN_HASH
224*0Sstevel@tonic-gate  *   See M_SHBLTIN_TYPE
225*0Sstevel@tonic-gate  *   See M_SHBLTIN_XPG4
226*0Sstevel@tonic-gate  */
227*0Sstevel@tonic-gate 
228*0Sstevel@tonic-gate #undef	M_FNMATCH_DUALCASE	/* fnmatch(): If this #define is set, then
229*0Sstevel@tonic-gate 				 * fnmatch will ignore case in file name
230*0Sstevel@tonic-gate 				 * matches *unless* the environment variable
231*0Sstevel@tonic-gate 				 * at runtime has DUALCASE set.
232*0Sstevel@tonic-gate 				 * For a conforming system, this should *not*
233*0Sstevel@tonic-gate 				 * be defined. <mks.h> will default to
234*0Sstevel@tonic-gate 				 * undefined.
235*0Sstevel@tonic-gate 				 */
236*0Sstevel@tonic-gate 
237*0Sstevel@tonic-gate #undef	M_SMALLSTACK		/* Define this to 1 on systems that have
238*0Sstevel@tonic-gate 				 * a fixed size stack compiled into programs,
239*0Sstevel@tonic-gate 				 * and a small (probably 64k) data segment.
240*0Sstevel@tonic-gate 				 */
241*0Sstevel@tonic-gate 
242*0Sstevel@tonic-gate #undef M_NULL			/* define this if you want to change the
243*0Sstevel@tonic-gate 				 * system default defintion of NULL.
244*0Sstevel@tonic-gate 				 * (e.g #define M_NULL  ((void*)0)
245*0Sstevel@tonic-gate 				 */
246*0Sstevel@tonic-gate #define M_MALLOC	1	/* Define M_MALLOC if your system has either
247*0Sstevel@tonic-gate 				 * of the following two problems:
248*0Sstevel@tonic-gate 				 * 1) ANSI does not specify returning a valid
249*0Sstevel@tonic-gate 				 *    errno if malloc() returns NULL.
250*0Sstevel@tonic-gate 				 *    But, MKS code assumes a valid errno
251*0Sstevel@tonic-gate 				 *    as is returned in most UNIX systems.
252*0Sstevel@tonic-gate 				 * 2) ANSI says it is implementation defined
253*0Sstevel@tonic-gate 				 *    whether or not malloc(0) returns a valid
254*0Sstevel@tonic-gate 				 *    pointer.
255*0Sstevel@tonic-gate 				 *    MKS code assumes that a valid pointer
256*0Sstevel@tonic-gate 				 *    is returned.
257*0Sstevel@tonic-gate 				 *
258*0Sstevel@tonic-gate 				 * Defining M_MALLOC requires an m_malloc()
259*0Sstevel@tonic-gate 				 * function, which MKS provides.
260*0Sstevel@tonic-gate 				 * Undefining M_MALLOC causes m_malloc() to be
261*0Sstevel@tonic-gate 				 * renamed to malloc().  (See mks.h)
262*0Sstevel@tonic-gate 				 */
263*0Sstevel@tonic-gate 
264*0Sstevel@tonic-gate #define M_REALLOC	1	/* Defining M_REALLOC will cause
265*0Sstevel@tonic-gate 				 * m_realloc() to be used in place of the
266*0Sstevel@tonic-gate 				 * systems realloc().
267*0Sstevel@tonic-gate 				 * This is necessary:
268*0Sstevel@tonic-gate 				 *  a) if you do not have an ANSI realloc()
269*0Sstevel@tonic-gate 				 *  b) if the system realloc()
270*0Sstevel@tonic-gate 				 *     has the following problem:
271*0Sstevel@tonic-gate 				 *     - ANSI does not specify returning a valid
272*0Sstevel@tonic-gate 				 *       errno if malloc() returns NULL.
273*0Sstevel@tonic-gate 				 *       But, MKS code assumes a valid errno
274*0Sstevel@tonic-gate 				 *       as is returned in most UNIX systems.
275*0Sstevel@tonic-gate 				 *
276*0Sstevel@tonic-gate 				 * Defining M_REALLOC requires an m_realloc()
277*0Sstevel@tonic-gate 				 * function, which MKS provides.
278*0Sstevel@tonic-gate 				 * Undefining M_MALLOC causes m_malloc() to be
279*0Sstevel@tonic-gate 				 * renamed to malloc().  (See mks.h)
280*0Sstevel@tonic-gate 				 */
281*0Sstevel@tonic-gate #ifdef M_REALLOC
282*0Sstevel@tonic-gate #define M_WANT_ANSI_REALLOC  1	/* Use #undef M_WANT_ANSI_REALLOC
283*0Sstevel@tonic-gate 				 * if your system has an ANSI realloc() function
284*0Sstevel@tonic-gate 				 *
285*0Sstevel@tonic-gate 				 * Defining M_WANT_ANSI_REALLOC can only be
286*0Sstevel@tonic-gate 				 * done if M_REALLOC is also defined.
287*0Sstevel@tonic-gate 				 * Use M_WANT_ANSI_REALLOC if your system
288*0Sstevel@tonic-gate 				 * does not support either of the following
289*0Sstevel@tonic-gate 				 * 2 features:
290*0Sstevel@tonic-gate 				 *
291*0Sstevel@tonic-gate 				 * 1) ANSI says that if the ptr passed to
292*0Sstevel@tonic-gate 				 *    realloc is NULL, then it will act like
293*0Sstevel@tonic-gate 				 *    a malloc()
294*0Sstevel@tonic-gate 				 * 2) ANSI says that if the ptr passed is
295*0Sstevel@tonic-gate 				 *    not NULL and the size is 0, then the
296*0Sstevel@tonic-gate 				 *    object that ptr points to is freed.
297*0Sstevel@tonic-gate 				 *
298*0Sstevel@tonic-gate 				 * Defining M_REALLOC requires an m_realloc()
299*0Sstevel@tonic-gate 				 * function, which MKS provides.
300*0Sstevel@tonic-gate 				 * Undefining M_MALLOC causes m_realloc() to be
301*0Sstevel@tonic-gate 				 * renamed to realloc().  (See mks.h)
302*0Sstevel@tonic-gate 				 */
303*0Sstevel@tonic-gate #endif /* M_REALLOC */
304*0Sstevel@tonic-gate 
305*0Sstevel@tonic-gate 
306*0Sstevel@tonic-gate #define	M_MAXMALLOC	64	/* Define the maximum number of kilobytes (K)
307*0Sstevel@tonic-gate 				 * that can be requested from malloc().
308*0Sstevel@tonic-gate 				 * This is intended for segmented systems
309*0Sstevel@tonic-gate 				 * where max allocation by malloc() is smaller
310*0Sstevel@tonic-gate 				 * than the total mallocable memory;
311*0Sstevel@tonic-gate 				 * some programs will assume they can do
312*0Sstevel@tonic-gate 				 * multiple mallocs of this # of K to allocate
313*0Sstevel@tonic-gate 				 * a large data structure.
314*0Sstevel@tonic-gate 				 * By default, this is not defined; malloc can
315*0Sstevel@tonic-gate 				 * allocate up to MAX_INT bytes.
316*0Sstevel@tonic-gate 				 */
317*0Sstevel@tonic-gate 
318*0Sstevel@tonic-gate #define	__LDATA__	1	/* DEPRECATED */
319*0Sstevel@tonic-gate #define	M_LDATA		1	/* For most modern systems this will be set.
320*0Sstevel@tonic-gate 				 * Some systems (e.g DOS) have a large and
321*0Sstevel@tonic-gate 				 * small program model.
322*0Sstevel@tonic-gate 				 * Thus, various programs have two buffer sizes
323*0Sstevel@tonic-gate 				 * built into them -- large and small.  The
324*0Sstevel@tonic-gate 				 * small buffer size is normally sub-optimal,
325*0Sstevel@tonic-gate 				 * but permits the data to fit in the small
326*0Sstevel@tonic-gate 				 * buffer (say 64k)
327*0Sstevel@tonic-gate 				 */
328*0Sstevel@tonic-gate 
329*0Sstevel@tonic-gate #ifndef PATH_MAX
330*0Sstevel@tonic-gate #define	M_PATH_MAX	2048	/* For systems where pathconf(file,_PC_PATH_MAX)
331*0Sstevel@tonic-gate 				 * can return -1 and NOT set errno
332*0Sstevel@tonic-gate 				 * (which means that PATH_MAX for 'file'
333*0Sstevel@tonic-gate 				 *  is unlimited),
334*0Sstevel@tonic-gate 				 * we provide a suitable LARGE value
335*0Sstevel@tonic-gate 				 * that can be returned by m_pathmax().
336*0Sstevel@tonic-gate 				 * This number should be sufficiently large
337*0Sstevel@tonic-gate 				 * to handle most (if not all) reasonable
338*0Sstevel@tonic-gate 				 * pathnames for a particular system.
339*0Sstevel@tonic-gate 				 * m_pathmax() is usually used to determine
340*0Sstevel@tonic-gate 				 * how large a buffer must be allocated to store
341*0Sstevel@tonic-gate 				 * pathnames.
342*0Sstevel@tonic-gate 				 */
343*0Sstevel@tonic-gate #endif /* PATH_MAX */
344*0Sstevel@tonic-gate 
345*0Sstevel@tonic-gate #define	M_EXPTIME	1	/* For systems whose files maintain an
346*0Sstevel@tonic-gate 				 * additional time field, generally expiry time.
347*0Sstevel@tonic-gate 				 * The stat structure must have a member
348*0Sstevel@tonic-gate 				 * st_etime and the utimbuf a member exptime.
349*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined.
350*0Sstevel@tonic-gate 				 */
351*0Sstevel@tonic-gate 
352*0Sstevel@tonic-gate #undef ROOTGID
353*0Sstevel@tonic-gate #undef ROOTUID			/* Some systems may use a different user id
354*0Sstevel@tonic-gate 				 * to indicate the superuser.
355*0Sstevel@tonic-gate 				 * If it is not defined here, then <mks.h>
356*0Sstevel@tonic-gate 				 * will define it to be 0 which is the
357*0Sstevel@tonic-gate 				 * value used in conventional UNIX.
358*0Sstevel@tonic-gate 				 */
359*0Sstevel@tonic-gate 
360*0Sstevel@tonic-gate #define	M_AUDIT		1	/* For systems which maintain file auditing
361*0Sstevel@tonic-gate 				 * information.  M_AUDITW1 and M_AUDITW2 must
362*0Sstevel@tonic-gate 				 * be defined, and return one or two audit
363*0Sstevel@tonic-gate 				 * words from the stat structure.  m_audmode
364*0Sstevel@tonic-gate 				 * must be defined in the local libraries
365*0Sstevel@tonic-gate 				 * to convert from these two words, to ls style
366*0Sstevel@tonic-gate 				 * letter information.  <mks.h> will default to
367*0Sstevel@tonic-gate 				 * undefined.
368*0Sstevel@tonic-gate 				 */
369*0Sstevel@tonic-gate #define	M_AUDITW1(sbp)	?	/* Fetch first audit word from stat pointer,
370*0Sstevel@tonic-gate 				 * if M_AUDIT defined.
371*0Sstevel@tonic-gate 				 */
372*0Sstevel@tonic-gate #define	M_AUDITW2(sbp)	?	/* Fetch second audit word from stat pointer,
373*0Sstevel@tonic-gate 				 * if M_AUDIT defined.  Define as `0' if no
374*0Sstevel@tonic-gate 				 * second audit word.
375*0Sstevel@tonic-gate 				 */
376*0Sstevel@tonic-gate 
377*0Sstevel@tonic-gate #undef M_DEVIO			/* use #define	M_DEVIO	1  on systems that
378*0Sstevel@tonic-gate 				 * requires special interfaces
379*0Sstevel@tonic-gate 				 * to perform I/O on devices.
380*0Sstevel@tonic-gate 				 * (e.g cannot use the standard open,read,write
381*0Sstevel@tonic-gate 				 *      interface)
382*0Sstevel@tonic-gate 				 * See <devio.h> for details on this
383*0Sstevel@tonic-gate 				 * special interface.
384*0Sstevel@tonic-gate 				 * Default is undefined; no special device i/o
385*0Sstevel@tonic-gate 				 * interface is used.
386*0Sstevel@tonic-gate 				 */
387*0Sstevel@tonic-gate 
388*0Sstevel@tonic-gate #undef	M_DEVBIN		/* Use #define M_DEVBIN 1
389*0Sstevel@tonic-gate 				 * on systems that have devices that do not
390*0Sstevel@tonic-gate 				 * allow raw I/O be written directly
391*0Sstevel@tonic-gate 				 * to the device.
392*0Sstevel@tonic-gate 				 * These systems tend to process the data
393*0Sstevel@tonic-gate 				 * before actually writing the data to the
394*0Sstevel@tonic-gate 				 * device.
395*0Sstevel@tonic-gate 				 * (e.g DOS disk devices do some character
396*0Sstevel@tonic-gate 				 *      translations. This routine is intended
397*0Sstevel@tonic-gate 				 *      to disable this behaviour.)
398*0Sstevel@tonic-gate 				 * The definition of m_devbin() and m_devstd()
399*0Sstevel@tonic-gate 				 * is done in <mks.h>.
400*0Sstevel@tonic-gate 				 * If this is defined, then <mks.h> defines
401*0Sstevel@tonic-gate 				 * the prototypes m_devbin() and m_devstd()
402*0Sstevel@tonic-gate 				 * Otherwise it undefines m_devstd()
403*0Sstevel@tonic-gate 				 * and set m_devbin to return a dummy value of 0
404*0Sstevel@tonic-gate 				 *
405*0Sstevel@tonic-gate 				 * MKS has selected some utilities
406*0Sstevel@tonic-gate 				 * to recognize this fact and to handle
407*0Sstevel@tonic-gate 				 * these I/O cases specially.
408*0Sstevel@tonic-gate 				 * Such utilities include cp, mv, and pax
409*0Sstevel@tonic-gate 				 */
410*0Sstevel@tonic-gate 
411*0Sstevel@tonic-gate #define	M_SETENV	1	/* Some systems require special preparation */
412*0Sstevel@tonic-gate char	**m_setenv ANSI((void));/* for use of the environment variables via
413*0Sstevel@tonic-gate 				 * environ; m_setenv call makes sure that
414*0Sstevel@tonic-gate 				 * environ is set up.  <mks.h> will default to
415*0Sstevel@tonic-gate 				 * m_setenv returning environ.  M_SETENV
416*0Sstevel@tonic-gate 				 * must be set to indicate to mks.h that a C
417*0Sstevel@tonic-gate 				 * function has been defined.
418*0Sstevel@tonic-gate 				 */
419*0Sstevel@tonic-gate 
420*0Sstevel@tonic-gate #define	m_setbinary(fp)		/* On systems supporting text and binary files,
421*0Sstevel@tonic-gate 				 * (i.e. "rb" and "wb" to fopen work different
422*0Sstevel@tonic-gate 				 * from "r" and "w"), there is a requirement
423*0Sstevel@tonic-gate 				 * to be able to set stdin/stdout to binary
424*0Sstevel@tonic-gate 				 * mode.  m_setbinary on such systems should
425*0Sstevel@tonic-gate 				 * perform this action.  On other systems, this
426*0Sstevel@tonic-gate 				 * macro should define itself out of existence.
427*0Sstevel@tonic-gate 				 * Normally this macro would be defined in
428*0Sstevel@tonic-gate 				 * <stdio.h>.  <mks.h> defaults to defining
429*0Sstevel@tonic-gate 				 * it out of existence, if not defined.
430*0Sstevel@tonic-gate 				 */
431*0Sstevel@tonic-gate 
432*0Sstevel@tonic-gate #define	M_TFGETC	0	/* Do we have POSIX.1-deficient termios?
433*0Sstevel@tonic-gate 				 * On POSIX.1 or SVID compliant systems,
434*0Sstevel@tonic-gate 				 * define it as 0 and mks.h will
435*0Sstevel@tonic-gate 				 * map m_tfgetc(fp,tp) to fgetc(fp).
436*0Sstevel@tonic-gate 				 * On deficient systems (e.g. BSD),
437*0Sstevel@tonic-gate 				 * define it as 1 and ensure a m_tfgetc()
438*0Sstevel@tonic-gate 				 * routine is provided.
439*0Sstevel@tonic-gate 				 */
440*0Sstevel@tonic-gate 
441*0Sstevel@tonic-gate #define M_STTY_CC       1       /* The stty command control-character setting
442*0Sstevel@tonic-gate 				 * is very system specific.  The default code
443*0Sstevel@tonic-gate 				 * in stty.c works only for the ascii character
444*0Sstevel@tonic-gate 				 * set.  <mks.h> will default to M_STTY_CC
445*0Sstevel@tonic-gate 				 * being undefined, resulting using the default
446*0Sstevel@tonic-gate 				 * code. arg is the string passed to stty; *cp
447*0Sstevel@tonic-gate 				 * should have the resulting value stored in it.
448*0Sstevel@tonic-gate 				 * A 0 return value indicates success; other-
449*0Sstevel@tonic-gate 				 * wise an error message will be printed.
450*0Sstevel@tonic-gate 				 */
451*0Sstevel@tonic-gate 
452*0Sstevel@tonic-gate #define	M_LOGIN_GETTY	1	/* Use #define M_LOGIN_GETTY 1
453*0Sstevel@tonic-gate 				 * on systems that do not provide a
454*0Sstevel@tonic-gate 				 * getty utility.
455*0Sstevel@tonic-gate 				 * This is for use in the login utility to
456*0Sstevel@tonic-gate 				 * display a banner that would conventionally
457*0Sstevel@tonic-gate 				 * be displayed by the UNIX getty utility
458*0Sstevel@tonic-gate 				 * that would have run before login.
459*0Sstevel@tonic-gate 				 * If M_LOGIN_GETTY is not defined here,
460*0Sstevel@tonic-gate 				 * then login will not print this banner info.
461*0Sstevel@tonic-gate 				 */
462*0Sstevel@tonic-gate 
463*0Sstevel@tonic-gate #define M_MANPAGER	"more -A -s"
464*0Sstevel@tonic-gate 				/* default command that is executed
465*0Sstevel@tonic-gate 				 * by the man utility to display a man page
466*0Sstevel@tonic-gate 				 * when the user's PAGER environment
467*0Sstevel@tonic-gate 				 * variable is not set.
468*0Sstevel@tonic-gate 				 */
469*0Sstevel@tonic-gate 
470*0Sstevel@tonic-gate #define M_TTYGROUP	"tty"	/* Name of the group that owns tty's.
471*0Sstevel@tonic-gate 				 * If this isn't defined, then <mks.h>
472*0Sstevel@tonic-gate 				 * will leave it undefined.
473*0Sstevel@tonic-gate 				 * This is related to the MKS default
474*0Sstevel@tonic-gate 				 * access enforcment policy for use
475*0Sstevel@tonic-gate 				 * by m_wallow(), mesg, talk, and write.
476*0Sstevel@tonic-gate 				 * If undefined, it is assumed that no security
477*0Sstevel@tonic-gate 				 * is available on tty's.
478*0Sstevel@tonic-gate 				 */
479*0Sstevel@tonic-gate 
480*0Sstevel@tonic-gate #undef M_CONSOLE		/* This is defined to indicate that a pc
481*0Sstevel@tonic-gate 				 * style console is used instead of a tty.
482*0Sstevel@tonic-gate 				 * This allows for the elimination of
483*0Sstevel@tonic-gate 				 * unnecessary calls to m_wallow() from
484*0Sstevel@tonic-gate 				 * pc compiles.
485*0Sstevel@tonic-gate 				 * Default is undef; m_wallow calls are made.
486*0Sstevel@tonic-gate 				 */
487*0Sstevel@tonic-gate 
488*0Sstevel@tonic-gate #define M_LKSUFFIX	".lock"	/* Suffix for lock file used by mailx and
489*0Sstevel@tonic-gate 				 * tsmail (name of mailbox to be locked
490*0Sstevel@tonic-gate 				 * is the prefix).  ".lock" is typically
491*0Sstevel@tonic-gate 				 * used by UNIX sendmail.  This should be
492*0Sstevel@tonic-gate 				 * set to the same suffix as used by other
493*0Sstevel@tonic-gate 				 * mail agents on the machine.
494*0Sstevel@tonic-gate 				 */
495*0Sstevel@tonic-gate 
496*0Sstevel@tonic-gate #define	M_LS_OPT_D	1	/* ls command: Support -D (list only dirs)
497*0Sstevel@tonic-gate 				 * This option is non-standard on any unix
498*0Sstevel@tonic-gate 				 * system, so is only an option.
499*0Sstevel@tonic-gate 				 * Default is not defined, so ls doesn't support
500*0Sstevel@tonic-gate 				 * this option.
501*0Sstevel@tonic-gate 				 */
502*0Sstevel@tonic-gate 
503*0Sstevel@tonic-gate #define	M_LOGGER_OPTIONS	(log_pid|log_user)
504*0Sstevel@tonic-gate 				/* Set up default options for the logger utility
505*0Sstevel@tonic-gate 				 * The logger utility allows the log lines to
506*0Sstevel@tonic-gate 				 * be prefixed by pid, ppid, a timestamp,
507*0Sstevel@tonic-gate 				 * and/or the login username.
508*0Sstevel@tonic-gate 				 * If an implementation wishes to
509*0Sstevel@tonic-gate 				 * force some of these prefixes then it
510*0Sstevel@tonic-gate 				 * should OR together one or more of the
511*0Sstevel@tonic-gate 				 * appropriate constants:
512*0Sstevel@tonic-gate 				 *   log_pid
513*0Sstevel@tonic-gate 				 *   log_ppid
514*0Sstevel@tonic-gate 				 *   log_timestamp
515*0Sstevel@tonic-gate 				 *   log_user
516*0Sstevel@tonic-gate 				 * If M_LOGGER_OPTIONS is not defined here then
517*0Sstevel@tonic-gate 				 * logger.c uses the default:
518*0Sstevel@tonic-gate 				 *   (log_pid|log_user).
519*0Sstevel@tonic-gate 				 */
520*0Sstevel@tonic-gate 
521*0Sstevel@tonic-gate #define	M_LOGGER_CONSOLE "/dev/console"
522*0Sstevel@tonic-gate 				/* logger command: If you wish to use the
523*0Sstevel@tonic-gate 				 * default, trivial, logging routines, then
524*0Sstevel@tonic-gate 				 * define M_LOGGER_CONSOLE to the name of
525*0Sstevel@tonic-gate 				 * a device or file, to which logger may
526*0Sstevel@tonic-gate 				 * append the log messages.
527*0Sstevel@tonic-gate 				 * If this variable is *not* defined, then
528*0Sstevel@tonic-gate 				 * the local system must have m_logger, and
529*0Sstevel@tonic-gate 				 * m_logger_close defined and retrieve
530*0Sstevel@tonic-gate 				 * either by the make process, or in the
531*0Sstevel@tonic-gate 				 * libraries.  See the documentation for
532*0Sstevel@tonic-gate 				 * the calling sequence of these routines.
533*0Sstevel@tonic-gate 				 */
534*0Sstevel@tonic-gate 
535*0Sstevel@tonic-gate #undef M_COMPRESSION_AVAIL	/*
536*0Sstevel@tonic-gate 				 * Not defining M_COMPRESSION_AVAIL indicates
537*0Sstevel@tonic-gate 				 * that the compression libary code is not
538*0Sstevel@tonic-gate 				 * available.
539*0Sstevel@tonic-gate 				 * Changing the #undef to #define should only
540*0Sstevel@tonic-gate 				 * be done if the code in libc/mks/m_comp.c
541*0Sstevel@tonic-gate 				 * is implemented.
542*0Sstevel@tonic-gate 				 *
543*0Sstevel@tonic-gate 				 * Because UNiSYS holds the patent on the
544*0Sstevel@tonic-gate 				 * adaptive Lempel-Ziv compression algorithm,
545*0Sstevel@tonic-gate 				 * MKS may not provide the compression
546*0Sstevel@tonic-gate 				 * source code (see libc/mks/m_comp.c)
547*0Sstevel@tonic-gate 				 * in which case the -z option in pax/tar/cpio
548*0Sstevel@tonic-gate 				 * must be disabled.
549*0Sstevel@tonic-gate 				 * If the compression algorithm is implemented
550*0Sstevel@tonic-gate 				 * in m_comp.c, then this macro can be defined.
551*0Sstevel@tonic-gate 				 */
552*0Sstevel@tonic-gate 
553*0Sstevel@tonic-gate #define	M_TAR_TAPENAME	"/dev/mt/%c%c"
554*0Sstevel@tonic-gate 				/* Set up default file name that the pax/tar
555*0Sstevel@tonic-gate 				 * utilities will use (e.g when 'f' option
556*0Sstevel@tonic-gate 				 * not specified)
557*0Sstevel@tonic-gate 				 * This file name is usually a tape device name
558*0Sstevel@tonic-gate 				 * Two %c's field specifiers can be included
559*0Sstevel@tonic-gate 				 * in the file name;
560*0Sstevel@tonic-gate 				 * the first is replaced with tapenumber,
561*0Sstevel@tonic-gate 				 * the 2nd with tape density
562*0Sstevel@tonic-gate 				 *    (l, m, or h, for low, medium or high).
563*0Sstevel@tonic-gate 				 * If you either don't have multiple
564*0Sstevel@tonic-gate 				 * tapes, or densities, you can leave off extra
565*0Sstevel@tonic-gate 				 * %c's.
566*0Sstevel@tonic-gate 				 *
567*0Sstevel@tonic-gate 				 * If this is not defined then pax/tar.h
568*0Sstevel@tonic-gate 				 * will use "/dev/mt/%c%c"
569*0Sstevel@tonic-gate 				 */
570*0Sstevel@tonic-gate 
571*0Sstevel@tonic-gate #undef M_GUNZIP			/* When defined, m_dc_open() will test for
572*0Sstevel@tonic-gate 				 * gzip-compressed files, and call the
573*0Sstevel@tonic-gate 				 * appropriate routines to uncompress them,
574*0Sstevel@tonic-gate 				 * in addition the normal operation of testing
575*0Sstevel@tonic-gate 				 * for compress-compressed files.
576*0Sstevel@tonic-gate 				 */
577*0Sstevel@tonic-gate 
578*0Sstevel@tonic-gate #undef M_VI_NO_RECOVER		/* vi command: when defined will not include the
579*0Sstevel@tonic-gate 				 * :preserve and :recover commands.
580*0Sstevel@tonic-gate 				 */
581*0Sstevel@tonic-gate 
582*0Sstevel@tonic-gate #define	M_VI_COPYRIGHT	1	/* vi command: When sold as a separate product,
583*0Sstevel@tonic-gate 				 * vi prints a copyright notice.  This flag
584*0Sstevel@tonic-gate 				 * causes the notice to be printed. Default is
585*0Sstevel@tonic-gate 				 * not defined, which causes vi to NOT print
586*0Sstevel@tonic-gate 				 * the copyright notice.
587*0Sstevel@tonic-gate 				 */
588*0Sstevel@tonic-gate 
589*0Sstevel@tonic-gate #define M_MAKEOS	"OS:=POSIX"	/*for $(OS) in "make" */
590*0Sstevel@tonic-gate 				/* make command: builtin rule which defines the
591*0Sstevel@tonic-gate 				 * $(OS) variable expansion.
592*0Sstevel@tonic-gate 				 * Default is not defined, which is an error.
593*0Sstevel@tonic-gate 				 */
594*0Sstevel@tonic-gate 
595*0Sstevel@tonic-gate #undef M_MAKE_EXIT_DIRECT	/* If this is defined, make will call exit()
596*0Sstevel@tonic-gate 				 * directly when it receives a signal, rather
597*0Sstevel@tonic-gate 				 * than clearing the handler and re-sending
598*0Sstevel@tonic-gate 				 * itself the signal. For 1003.2 conformance,
599*0Sstevel@tonic-gate 				 * this must not be defined.
600*0Sstevel@tonic-gate 				 */
601*0Sstevel@tonic-gate 
602*0Sstevel@tonic-gate #define M_MAKEFILES     ".MAKEFILES:makefile Makefile"
603*0Sstevel@tonic-gate 				/* rule that make uses when trying to locate
604*0Sstevel@tonic-gate 				 * the default makefile to run
605*0Sstevel@tonic-gate 				 */
606*0Sstevel@tonic-gate 
607*0Sstevel@tonic-gate #define M_MAKEDIRSEPSTR "/"	/* Default string of characters that make
608*0Sstevel@tonic-gate 				 * will look at and use when manipulating
609*0Sstevel@tonic-gate 				 * path names.
610*0Sstevel@tonic-gate 				 */
611*0Sstevel@tonic-gate #define M_GETSWITCHAR   '-'	/* Default character used to indicate an
612*0Sstevel@tonic-gate 				 * option to a command. Note - on some
613*0Sstevel@tonic-gate 				 * systems, this may actually be a system-call
614*0Sstevel@tonic-gate 				 * instead of a constant. As a consequence
615*0Sstevel@tonic-gate 				 * this define should not be used as a
616*0Sstevel@tonic-gate 				 * global initializer.
617*0Sstevel@tonic-gate 				 */
618*0Sstevel@tonic-gate #define M_MAKE_BUFFER_SIZE 8192 /* max line length handled by make parser */
619*0Sstevel@tonic-gate #define M_MAKE_STRING_SIZE 8192	/* make macro expansion max string size */
620*0Sstevel@tonic-gate #define M_MAKE_PATSUB_SIZE 1024	/* make pattern/substitution max string size */
621*0Sstevel@tonic-gate 
622*0Sstevel@tonic-gate #define	M_FLDSEP	':'	/* The field separator character used in
623*0Sstevel@tonic-gate 				 * the PATH environment variable (for sh),
624*0Sstevel@tonic-gate 				 * and for the entries in the group database
625*0Sstevel@tonic-gate 				 * (e.g /etc/group) and the user database
626*0Sstevel@tonic-gate 				 * (e.g /etc/passwd) files.
627*0Sstevel@tonic-gate 				 * If this is not defined here, then <mks.h>
628*0Sstevel@tonic-gate 			 	 * will default to ':'.
629*0Sstevel@tonic-gate 				 */
630*0Sstevel@tonic-gate 
631*0Sstevel@tonic-gate #undef M_TEXT_CR		/* Some systems use <cr><lf> pairs rather than
632*0Sstevel@tonic-gate 				 * simple <lf>s to delimit text lines.  On
633*0Sstevel@tonic-gate 				 * these systems, this should be defined.
634*0Sstevel@tonic-gate 				 * Default is undefined.
635*0Sstevel@tonic-gate 				 */
636*0Sstevel@tonic-gate 
637*0Sstevel@tonic-gate #define	M_FPPSLOW 1		/* This should be defined for systems whose
638*0Sstevel@tonic-gate 				 * floating point operations
639*0Sstevel@tonic-gate 				 * are slower than integral operations.
640*0Sstevel@tonic-gate 				 * If this in undefined, the assumption will
641*0Sstevel@tonic-gate 				 * be fast floating point.
642*0Sstevel@tonic-gate 				 */
643*0Sstevel@tonic-gate 
644*0Sstevel@tonic-gate #define __CLK_TCK 100		/* units for times() */
645*0Sstevel@tonic-gate 
646*0Sstevel@tonic-gate #undef	M_NOOWNER		/* for systems which don't have user/group
647*0Sstevel@tonic-gate 				 * owners on files.
648*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined.
649*0Sstevel@tonic-gate 				 * Used by pax
650*0Sstevel@tonic-gate 				 */
651*0Sstevel@tonic-gate 
652*0Sstevel@tonic-gate #define	M_FSDELIM(ch) ((ch)=='/') /* for systems who have special characters to
653*0Sstevel@tonic-gate 				 * delimit file systems, this returns true if
654*0Sstevel@tonic-gate 				 * the given character is a file system
655*0Sstevel@tonic-gate 				 * delimiter; <mks.h> will default to '/'.
656*0Sstevel@tonic-gate 				 * ispathdelim() is a deprecated form.
657*0Sstevel@tonic-gate 				 */
658*0Sstevel@tonic-gate 
659*0Sstevel@tonic-gate #define	M_DRDELIM(ch)	(0)	/* for systems whose names parse with a leading
660*0Sstevel@tonic-gate 				 * drive separated by a drive delimiter char,
661*0Sstevel@tonic-gate 				 * (e.g. ':' on dos systems); posix systems
662*0Sstevel@tonic-gate 				 * simply return false, i.e. no, character
663*0Sstevel@tonic-gate 				 * is not a drive delimiter.
664*0Sstevel@tonic-gate 				 * <mks.h> will default to (0).
665*0Sstevel@tonic-gate 				 */
666*0Sstevel@tonic-gate 
667*0Sstevel@tonic-gate #define	M_DIRSTAT(pathname, dirp, statbuf)	stat((pathname), (statbuf))
668*0Sstevel@tonic-gate 				/* prototype definition:
669*0Sstevel@tonic-gate 				 * int M_DIRSTAT(char*	pathname,
670*0Sstevel@tonic-gate 				 *               DIR*  	dirp,
671*0Sstevel@tonic-gate 				 *               struct stat*	statbuf);
672*0Sstevel@tonic-gate 				 * On POSIX and conventional UNIX systems
673*0Sstevel@tonic-gate 				 * this macro is defined as:
674*0Sstevel@tonic-gate 				 *    stat((pathname), (statbuf))
675*0Sstevel@tonic-gate 				/* On systems where the file information is
676*0Sstevel@tonic-gate 				 * maintained in the directory (not the inode)
677*0Sstevel@tonic-gate 				 * the DIR structure may contain this info,
678*0Sstevel@tonic-gate 				 * in which case the information can be returned
679*0Sstevel@tonic-gate 				 * without doing a stat(). This may be a
680*0Sstevel@tonic-gate 				 * performance enhancement.
681*0Sstevel@tonic-gate 				 * dirp is the DIR * pointer returned by opendir
682*0Sstevel@tonic-gate 				 */
683*0Sstevel@tonic-gate 
684*0Sstevel@tonic-gate #define	M_HIDDEN(dirp, dp)	((dp)->d_name[0] == '.')
685*0Sstevel@tonic-gate 				/* prototype definition:
686*0Sstevel@tonic-gate 				 *  int M_HIDDEN(DIR* dirp, struct* dirent)
687*0Sstevel@tonic-gate 				 *
688*0Sstevel@tonic-gate 				 * Some utilities (e.g ls) recognize certain
689*0Sstevel@tonic-gate 				 * filenames as being "hidden" files.
690*0Sstevel@tonic-gate 				 * In conventional UNIX systems this has been
691*0Sstevel@tonic-gate 				 * the '.' prefix.
692*0Sstevel@tonic-gate 				 * On other systems, with other conventions
693*0Sstevel@tonic-gate 				 * the M_HIDDEN macro should be suitably
694*0Sstevel@tonic-gate 				 * modified
695*0Sstevel@tonic-gate 				 *
696*0Sstevel@tonic-gate 				 * If this is not defined, then
697*0Sstevel@tonic-gate 				 * <mks.h> defaults to traditional unix, a
698*0Sstevel@tonic-gate 				 * leading `.'.
699*0Sstevel@tonic-gate 				 */
700*0Sstevel@tonic-gate 
701*0Sstevel@tonic-gate #undef M_NO_FORK		/* Define for non-POSIX systems that do not
702*0Sstevel@tonic-gate 				 * have a true fork(), and must use some sort
703*0Sstevel@tonic-gate 				 * of spawn call (for example, DOS).
704*0Sstevel@tonic-gate 				 * By default undefined; there is a fork.
705*0Sstevel@tonic-gate 				 */
706*0Sstevel@tonic-gate 
707*0Sstevel@tonic-gate #undef	M_SYNC_FORK		/* fork() is synchronous (DOS). (sh)
708*0Sstevel@tonic-gate 				 * Default is undefined; posix.1 fork provided.
709*0Sstevel@tonic-gate 				 */
710*0Sstevel@tonic-gate 
711*0Sstevel@tonic-gate #undef	M_FEXEC			/* Use fexec[ve] when possible.
712*0Sstevel@tonic-gate 				 * Only define if fexec is faster than fork/exec
713*0Sstevel@tonic-gate 				 * (sh, ...)
714*0Sstevel@tonic-gate 				 * By default undefined; fork is reasonable
715*0Sstevel@tonic-gate 				 * performance.
716*0Sstevel@tonic-gate 				 */
717*0Sstevel@tonic-gate 
718*0Sstevel@tonic-gate #undef	M_EXEC_FILETYPE		/* File name types for executables.
719*0Sstevel@tonic-gate 				 * For example, .exe and .ksh.
720*0Sstevel@tonic-gate 				 * For the shell, you need to define shexecve()
721*0Sstevel@tonic-gate 				 * and testpath() in sh$(ORG).c.
722*0Sstevel@tonic-gate 				 * By default undefined; no file name types.
723*0Sstevel@tonic-gate 				 */
724*0Sstevel@tonic-gate 
725*0Sstevel@tonic-gate #undef	M_NO_IDS		/* POSIX uids and gids.
726*0Sstevel@tonic-gate 				 * (sh: set -p; umask; test -[rwx])
727*0Sstevel@tonic-gate 				 */
728*0Sstevel@tonic-gate 
729*0Sstevel@tonic-gate #undef	M_NO_ST_INO		/* stat's st_ino is meaningless. (pax; test -ef)
730*0Sstevel@tonic-gate 				 */
731*0Sstevel@tonic-gate 
732*0Sstevel@tonic-gate #undef M_SVFS_INO		/* statvfs() provides valid f_ffree and
733*0Sstevel@tonic-gate 				 * f_files fields which describe the number
734*0Sstevel@tonic-gate 				 * of free file slots and the total number
735*0Sstevel@tonic-gate 				 * of file slots in a filesystem.  Used
736*0Sstevel@tonic-gate 				 * by df.
737*0Sstevel@tonic-gate 				 */
738*0Sstevel@tonic-gate 
739*0Sstevel@tonic-gate #undef	M_NO_PIPE		/* no pipe(), use temp files. (sh, popen)
740*0Sstevel@tonic-gate 				 * Default is undefined; posix.1 pipes provided.
741*0Sstevel@tonic-gate 				 */
742*0Sstevel@tonic-gate 
743*0Sstevel@tonic-gate #undef	M_LOCKING_OPEN		/* Open'd files are locked, (DOS, OS2)
744*0Sstevel@tonic-gate 				 * and cannot be unlink'd or rename'd.
745*0Sstevel@tonic-gate 				 */
746*0Sstevel@tonic-gate 
747*0Sstevel@tonic-gate #undef	M_USE_SIGNAL		/* Has no sigaction, use signal (SVR3).
748*0Sstevel@tonic-gate 				 * (sh, ...)
749*0Sstevel@tonic-gate 				 */
750*0Sstevel@tonic-gate 
751*0Sstevel@tonic-gate #undef	M_NO_IO_EINTR		/* Tty I/O does not return EINTR
752*0Sstevel@tonic-gate 				 * when SIGINT signal handler returns.
753*0Sstevel@tonic-gate 				 * (sh, ?)
754*0Sstevel@tonic-gate 				 */
755*0Sstevel@tonic-gate 
756*0Sstevel@tonic-gate #undef	M_TTY_ICANON		/* Tty is always in ICANON mode.
757*0Sstevel@tonic-gate 				 * (sh,ex,mailx)
758*0Sstevel@tonic-gate 				 */
759*0Sstevel@tonic-gate 
760*0Sstevel@tonic-gate #define	M_TTYNAME "/dev/tty"	/* Device to open to access the controlling
761*0Sstevel@tonic-gate 				 * tty; posix.2 does require this to be /dev/tty
762*0Sstevel@tonic-gate 				 * but dos for example calls it /dev/con.
763*0Sstevel@tonic-gate 				 * <mks.h> will default to /dev/tty.
764*0Sstevel@tonic-gate 				 */
765*0Sstevel@tonic-gate 
766*0Sstevel@tonic-gate #define	M_NULLNAME "/dev/null"	/* Device to open for the null device as defined
767*0Sstevel@tonic-gate 				 * by posix.2.  It is required to be named
768*0Sstevel@tonic-gate 				 * /dev/null, but dos for example calls it
769*0Sstevel@tonic-gate 				 * /dev/nul.  <mks.h> will default to /dev/null.
770*0Sstevel@tonic-gate 				 */
771*0Sstevel@tonic-gate 
772*0Sstevel@tonic-gate #define	M_FCLOSE_NOT_POSIX_1 1	/* fclose() does not conform to posix.1 section
773*0Sstevel@tonic-gate 				 * 8.2. An explicit lseek must be done on the
774*0Sstevel@tonic-gate 				 * stream prior to an fclose for the seek
775*0Sstevel@tonic-gate 				 * pointer to be correct. <mks.h> will default
776*0Sstevel@tonic-gate 				 * to undefined.
777*0Sstevel@tonic-gate 				 */
778*0Sstevel@tonic-gate 
779*0Sstevel@tonic-gate #define	M_FFLUSH_NOT_POSIX_1 1	/* fflush() does not conform to posix.1 section
780*0Sstevel@tonic-gate 				 * 8.2.  <mks.h> will default to undefined.
781*0Sstevel@tonic-gate 				 * If undefined, then mks.h will turn m_fflush
782*0Sstevel@tonic-gate 				 * into fflush.  If defined, then mks.h will
783*0Sstevel@tonic-gate 				 * leave m_fflush alone, and a stdio-specific
784*0Sstevel@tonic-gate 				 * routine m_fflush() must be provided which
785*0Sstevel@tonic-gate 				 * actually conforms to the standard.
786*0Sstevel@tonic-gate 				 */
787*0Sstevel@tonic-gate 
788*0Sstevel@tonic-gate 
789*0Sstevel@tonic-gate #define	M_NL_DOM	"mks"	/* String used as default name (domain name)
790*0Sstevel@tonic-gate 				 * to get mks utility messages via the xpg
791*0Sstevel@tonic-gate 				 * catopen/catgets message translation functions
792*0Sstevel@tonic-gate 				 * For example, in XPG:
793*0Sstevel@tonic-gate 				 *     catopen (M_NL_DOM, ...)
794*0Sstevel@tonic-gate 				 */
795*0Sstevel@tonic-gate 
796*0Sstevel@tonic-gate 
797*0Sstevel@tonic-gate #define	M_L_CUSERID	16	/* Length of longest user id returned by
798*0Sstevel@tonic-gate 				 * cuserid() routine.
799*0Sstevel@tonic-gate 				 * Used for L_cuserid in case its not
800*0Sstevel@tonic-gate 				 * defined in <stdio.h>
801*0Sstevel@tonic-gate 				 */
802*0Sstevel@tonic-gate 
803*0Sstevel@tonic-gate #define	M_FSMOUNT	"/etc/mtab"
804*0Sstevel@tonic-gate 				/* This pathname is passed as the 1st argument
805*0Sstevel@tonic-gate 				 * to setmntent() routine.
806*0Sstevel@tonic-gate 				 * On conventional UNIX systems, this
807*0Sstevel@tonic-gate 				 * pathname identifies a file that contains
808*0Sstevel@tonic-gate 				 * a list of all the actively mounted systems.
809*0Sstevel@tonic-gate 				 * The mount utility is normally responsible
810*0Sstevel@tonic-gate 				 * for adding entries to this file
811*0Sstevel@tonic-gate 				 * and umount utility deletes the entries.
812*0Sstevel@tonic-gate 				 */
813*0Sstevel@tonic-gate #define	M_FSALL		"/etc/fstab"
814*0Sstevel@tonic-gate 				/* this pathname identifies a file that
815*0Sstevel@tonic-gate 				 * is similar to M_FSMOUNT, but instead of
816*0Sstevel@tonic-gate 				 * the actively mounted file systems, it
817*0Sstevel@tonic-gate 				 * has a list of ALL possible filesytems
818*0Sstevel@tonic-gate 				 * that could be mounted.
819*0Sstevel@tonic-gate 				 * This file normally used by the mount
820*0Sstevel@tonic-gate 				 * command to find all the file systems
821*0Sstevel@tonic-gate 				 * to mount by default.
822*0Sstevel@tonic-gate 				 */
823*0Sstevel@tonic-gate 
824*0Sstevel@tonic-gate #define	M_NLSCHARMAP	"/usr/lib/nls/charmap/ISO_8859-1"
825*0Sstevel@tonic-gate 				/* Name of default charmap file to use in
826*0Sstevel@tonic-gate 				 * localedef if -f charmap option isn't
827*0Sstevel@tonic-gate 				 * used.
828*0Sstevel@tonic-gate 				 */
829*0Sstevel@tonic-gate 
830*0Sstevel@tonic-gate #define	M_ISEOV(error)	(error == EINVAL)
831*0Sstevel@tonic-gate 				/* This macro is used after an unsuccessful
832*0Sstevel@tonic-gate 				 * read() or m_devread() to determine
833*0Sstevel@tonic-gate 				 * if end-of-volume has been encountered.
834*0Sstevel@tonic-gate 				 * This macro should be invoked using the
835*0Sstevel@tonic-gate 				 * errno returned by the read().
836*0Sstevel@tonic-gate 				 * The macro should evaluate to 1 (true)
837*0Sstevel@tonic-gate 				 * if it can determine the EOV condition
838*0Sstevel@tonic-gate 				 * from this errno.
839*0Sstevel@tonic-gate 				 * Otherwise, should evaluate to 0 (false)
840*0Sstevel@tonic-gate 				 * <mks.h> defaults to 0, i.e. never EOV
841*0Sstevel@tonic-gate 				 */
842*0Sstevel@tonic-gate 
843*0Sstevel@tonic-gate #define	M_COMPRESS_DEFBITS	16
844*0Sstevel@tonic-gate 				/* Default # of bits to compress in compress.
845*0Sstevel@tonic-gate 				 * If not defined, compress defaults to 16.
846*0Sstevel@tonic-gate 				 * Probably only useful on systems with limited
847*0Sstevel@tonic-gate 				 * memory capacity.
848*0Sstevel@tonic-gate 				 */
849*0Sstevel@tonic-gate 
850*0Sstevel@tonic-gate #define M_CURSES_VERSION	"MKS Interopen Curses"
851*0Sstevel@tonic-gate 				/* Curses product version string.  This
852*0Sstevel@tonic-gate 				 * string will be imbedded in the excutable
853*0Sstevel@tonic-gate 				 * for an application.  This string should
854*0Sstevel@tonic-gate 				 * be set to the vendor's product code used
855*0Sstevel@tonic-gate 				 * for Curses.
856*0Sstevel@tonic-gate 				 */
857*0Sstevel@tonic-gate 
858*0Sstevel@tonic-gate #undef	M_CURSES_MEMMAPPED	/* Define this symbol to compile up curses
859*0Sstevel@tonic-gate 				 * for a memory mapped display, such as the PC.
860*0Sstevel@tonic-gate 				 * Rather than allocating memory for the main
861*0Sstevel@tonic-gate 				 * screen window, this is compiled to point
862*0Sstevel@tonic-gate 				 * directly at the mapped memory.  This will
863*0Sstevel@tonic-gate 				 * require some custom code.
864*0Sstevel@tonic-gate 				 */
865*0Sstevel@tonic-gate 
866*0Sstevel@tonic-gate #define M_TERM_NAME		"dumb"
867*0Sstevel@tonic-gate 				/* Default terminal name used if TERM is
868*0Sstevel@tonic-gate 				 * not set in the environment.
869*0Sstevel@tonic-gate 				 */
870*0Sstevel@tonic-gate 
871*0Sstevel@tonic-gate #define M_TERMINFO_DIR		"/usr/lib/terminfo"
872*0Sstevel@tonic-gate 				/* Default location for the terminfo database
873*0Sstevel@tonic-gate 				 * if TERMINFO is not set in the environment.
874*0Sstevel@tonic-gate 				 *
875*0Sstevel@tonic-gate 				 * NOTE: Only define this macro if curses
876*0Sstevel@tonic-gate 				 *	 is available on this system since
877*0Sstevel@tonic-gate 				 *	 this macro is also used to
878*0Sstevel@tonic-gate 				 *       determine if "curses" is available
879*0Sstevel@tonic-gate 				 */
880*0Sstevel@tonic-gate 
881*0Sstevel@tonic-gate #define M_BSD_SPRINTF	1	/* Defined if sprintf on this system has BSD
882*0Sstevel@tonic-gate 				 * semantics ie. if sprintf() returns a pointer
883*0Sstevel@tonic-gate 				 * to the string rather than the number of
884*0Sstevel@tonic-gate 				 * characters printed.
885*0Sstevel@tonic-gate 				 */
886*0Sstevel@tonic-gate 
887*0Sstevel@tonic-gate #define	M_IS_NATIVE_LOCALE(s)	(strcmp(s, "POSIX") == 0 || strcmp(s, "C") == 0)
888*0Sstevel@tonic-gate 				/* Change this definition to define the locale
889*0Sstevel@tonic-gate 				 * that the machine level comparison function
890*0Sstevel@tonic-gate 				 * strcmp conforms to.  On all ascii machines,
891*0Sstevel@tonic-gate 				 * strcmp will order the same as the POSIX
892*0Sstevel@tonic-gate 				 * locale.  <mks.h> defaults to the def'n given
893*0Sstevel@tonic-gate 				 * here.
894*0Sstevel@tonic-gate 				 */
895*0Sstevel@tonic-gate 
896*0Sstevel@tonic-gate #undef	M_NOT_646		/* Define this symbol if the local invariant
897*0Sstevel@tonic-gate 				 * character set does not conform to ISO646.
898*0Sstevel@tonic-gate 				 * Normally, this would only be set for
899*0Sstevel@tonic-gate 				 * EBCDIC systems.
900*0Sstevel@tonic-gate 				 * Several utilities (e.g pax/tar/cpio)
901*0Sstevel@tonic-gate 				 * are explicitly required to use 646,
902*0Sstevel@tonic-gate 				 * so if this flag is defined, then there
903*0Sstevel@tonic-gate 				 * is special code  which will be
904*0Sstevel@tonic-gate 				 * compiled in to do the appropriate
905*0Sstevel@tonic-gate 				 * character set translation.
906*0Sstevel@tonic-gate 				 */
907*0Sstevel@tonic-gate 
908*0Sstevel@tonic-gate #define	M_FILENAME_CODESET	"IS8859"
909*0Sstevel@tonic-gate 				/* If M_NOT_646 is defined, then you must
910*0Sstevel@tonic-gate 				 * define the codeset that filenames are
911*0Sstevel@tonic-gate 				 * stored in.  This must be a string value,
912*0Sstevel@tonic-gate 				 * that can be passed into iconv.
913*0Sstevel@tonic-gate 				 * Theoretically, this could be a call to
914*0Sstevel@tonic-gate 				 * setlocale, to some extention that would
915*0Sstevel@tonic-gate 				 * return the name of the charmap.
916*0Sstevel@tonic-gate 				 */
917*0Sstevel@tonic-gate 
918*0Sstevel@tonic-gate #define	M_STKCHK expression	/* Define this macro on systems that have a
919*0Sstevel@tonic-gate 				 * fixed size stack.
920*0Sstevel@tonic-gate 				 * This macro should define an expression
921*0Sstevel@tonic-gate 				 * that can be used to check if the current
922*0Sstevel@tonic-gate 				 * C function stack is within some distance
923*0Sstevel@tonic-gate 				 * from the end of available stack size.
924*0Sstevel@tonic-gate 				 * Return 0 if it is -- i.e. unsafe to
925*0Sstevel@tonic-gate 				 * recurse further.
926*0Sstevel@tonic-gate 				 * <mks.h> defaults to undefined;
927*0Sstevel@tonic-gate 				 * i.e. no stack bounds checking.
928*0Sstevel@tonic-gate 				 * This is only called from a few programs
929*0Sstevel@tonic-gate 				 * which allow the user to perform recursion.
930*0Sstevel@tonic-gate 				 */
931*0Sstevel@tonic-gate 
932*0Sstevel@tonic-gate #define M_ST_RDEV(sb)	((sb).st_rdev)
933*0Sstevel@tonic-gate #define M_DEVMAJOR(statp)	((uint)major((statp)->st_rdev))
934*0Sstevel@tonic-gate 				/* Prototype: uint M_DEVMAJOR(struct stat *);
935*0Sstevel@tonic-gate 				 *
936*0Sstevel@tonic-gate 				 * Return the major device number given
937*0Sstevel@tonic-gate 				 * a "struct stat *".
938*0Sstevel@tonic-gate 				 * Assumes the stat structure pointer
939*0Sstevel@tonic-gate 				 * represents a special device file.
940*0Sstevel@tonic-gate 				 * MKS recommends all systems define
941*0Sstevel@tonic-gate 				 * some method of extracting this information
942*0Sstevel@tonic-gate 				 * from this structure
943*0Sstevel@tonic-gate 				 * (eg. define a st_rdev or st_major member
944*0Sstevel@tonic-gate 				 *       in the struct stat.)
945*0Sstevel@tonic-gate 				 * This macro must be defined to return some
946*0Sstevel@tonic-gate 				 * unsigned integer value.
947*0Sstevel@tonic-gate 				 */
948*0Sstevel@tonic-gate 
949*0Sstevel@tonic-gate #define M_DEVMINOR(statp)	((uint)minor((statp)->st_rdev))
950*0Sstevel@tonic-gate 				/* Prototype: uint M_DEVMINOR(struct stat *);
951*0Sstevel@tonic-gate 				 *
952*0Sstevel@tonic-gate 				 * Return the minor device number given
953*0Sstevel@tonic-gate 				 * a "struct stat *".
954*0Sstevel@tonic-gate 				 * Same recommendations as M_DEVMAJOR above.
955*0Sstevel@tonic-gate 				 */
956*0Sstevel@tonic-gate 
957*0Sstevel@tonic-gate #define	M_DEVMAKE(mjr, mnr)	(makedev((mjr), (mnr)))
958*0Sstevel@tonic-gate 				/* Build a dev_t from a major and minor #
959*0Sstevel@tonic-gate 				 * M_DEVMAKE(M_DEVMAJOR(sbp), M_DEVMINOR(sbp))
960*0Sstevel@tonic-gate 				 * just returns the dev_t from the stat buf
961*0Sstevel@tonic-gate 				 */
962*0Sstevel@tonic-gate 
963*0Sstevel@tonic-gate #define M_INODIRENT(name, dirbuf)	((ino_t)((dirbuf)->d_ino))
964*0Sstevel@tonic-gate 				/* Prototype:
965*0Sstevel@tonic-gate 				 *  ino_t M_INODIRENT(char *, struct dirent *);
966*0Sstevel@tonic-gate 				 *
967*0Sstevel@tonic-gate 				 * Return the inode belonging to the directory
968*0Sstevel@tonic-gate 				 * entry corresponding to dirbuf.  The name
969*0Sstevel@tonic-gate 				 * parameter is the path name given to a
970*0Sstevel@tonic-gate 				 * previous call to opendir().
971*0Sstevel@tonic-gate 				 */
972*0Sstevel@tonic-gate 
973*0Sstevel@tonic-gate #define	M_ST_BLOCKS(sbp)  ((sbp)->st_blocks)
974*0Sstevel@tonic-gate #define	M_ST_BLKSIZE(sbp) ((sbp)->st_blksize)
975*0Sstevel@tonic-gate 				/* If the implementation supports, in the stat
976*0Sstevel@tonic-gate 				 * structure, the actual disk space allocation
977*0Sstevel@tonic-gate 				 * to a given file, then M_ST_BLOCKS should
978*0Sstevel@tonic-gate 				 * be defined to return that member from the
979*0Sstevel@tonic-gate 				 * passed stat structure pointer.
980*0Sstevel@tonic-gate 				 * M_ST_BLKSIZE should be the number of bytes
981*0Sstevel@tonic-gate 				 * in a M_ST_BLOCKS unit; normally a
982*0Sstevel@tonic-gate 				 * different member of the stat structure.
983*0Sstevel@tonic-gate 				 *
984*0Sstevel@tonic-gate 				 * These macros are not required.
985*0Sstevel@tonic-gate 				 * Programs that use these macros
986*0Sstevel@tonic-gate 				 * will fall back on computing these
987*0Sstevel@tonic-gate 				 * values from the st_size field.
988*0Sstevel@tonic-gate 				 */
989*0Sstevel@tonic-gate 
990*0Sstevel@tonic-gate #define M_MATHERR	0	/* If the math library supports matherr(),
991*0Sstevel@tonic-gate 				 * define with a non-zero value.
992*0Sstevel@tonic-gate 				 * MKS recommends that all ANSI-C libraries
993*0Sstevel@tonic-gate 				 * support this.
994*0Sstevel@tonic-gate 				 * By default, not defined.
995*0Sstevel@tonic-gate 				 */
996*0Sstevel@tonic-gate 
997*0Sstevel@tonic-gate #define M_AWK_SUBSEP	"\034"	/* Default SUBSEP value in awk. This value
998*0Sstevel@tonic-gate 				 * is appropriate for ASCII based character
999*0Sstevel@tonic-gate 				 * sets.
1000*0Sstevel@tonic-gate 				 */
1001*0Sstevel@tonic-gate 
1002*0Sstevel@tonic-gate #define M_FSCLOSE(fp)	fclose(fp)
1003*0Sstevel@tonic-gate 				/* define M_FSCLOSE(fp) to be the function
1004*0Sstevel@tonic-gate 				 * that cleans up the resources allocated
1005*0Sstevel@tonic-gate 				 * by m_fsopen().
1006*0Sstevel@tonic-gate 				 * Since m_fsopen() implementation is system
1007*0Sstevel@tonic-gate 				 * specific, so is M_FSCLOSE().
1008*0Sstevel@tonic-gate 				 */
1009*0Sstevel@tonic-gate 
1010*0Sstevel@tonic-gate #define M_LEX_8BIT	1	/* If this is defined, lex will produce
1011*0Sstevel@tonic-gate 				 * 8-bit tables by default (the normal
1012*0Sstevel@tonic-gate 				 * default is 7-bit tables).
1013*0Sstevel@tonic-gate 				 */
1014*0Sstevel@tonic-gate 
1015*0Sstevel@tonic-gate #define M_NUMSIZE	30	/* M_NUMSIZE should be defined to the length
1016*0Sstevel@tonic-gate 				 * in character positions, of the longest
1017*0Sstevel@tonic-gate 				 * number that can be sprintf()'d into a string
1018*0Sstevel@tonic-gate 				 * (longest of any type of number,
1019*0Sstevel@tonic-gate 				 *   eg. float, long, double ...)
1020*0Sstevel@tonic-gate 				 * For example, if your system prints
1021*0Sstevel@tonic-gate 				 * 30 characters for sprintf(str, "%le", float)
1022*0Sstevel@tonic-gate 				 * then M_NUMSIZE should be set to at least 30.
1023*0Sstevel@tonic-gate 				 *
1024*0Sstevel@tonic-gate 				 * This is used in awk to guess at the size
1025*0Sstevel@tonic-gate 				 * that each element of an sprintf() will be
1026*0Sstevel@tonic-gate 				 * so that it can internally allocate enough
1027*0Sstevel@tonic-gate 				 * storage.
1028*0Sstevel@tonic-gate 				 *
1029*0Sstevel@tonic-gate 				 * If this is not defined, then a default
1030*0Sstevel@tonic-gate 				 * value is used from <mks.h>
1031*0Sstevel@tonic-gate 				 */
1032*0Sstevel@tonic-gate 
1033*0Sstevel@tonic-gate /*
1034*0Sstevel@tonic-gate  * File System (Naming) Attributes.
1035*0Sstevel@tonic-gate  * M_ONE_DOT, M_NO_LEADING_DOT, and M_SHORT_EXT are deprecated, in favour
1036*0Sstevel@tonic-gate  * of the m_fstype() function.  However, until all code has been converted
1037*0Sstevel@tonic-gate  * they must be set appropriately.  The obsolescent versions do not permit
1038*0Sstevel@tonic-gate  * supporting a system with multiple filesystem types: they are all statically
1039*0Sstevel@tonic-gate  * tested via pre-processor directives.  The new version permits mixing for
1040*0Sstevel@tonic-gate  * example of a posix file system, with say a dos floppy file system, such
1041*0Sstevel@tonic-gate  * as is available on many unix systems today.
1042*0Sstevel@tonic-gate  * If your system is posix conformant, do not set any of these variables
1043*0Sstevel@tonic-gate  * or functions; <mks.h> will default to a #define for m_fstype to
1044*0Sstevel@tonic-gate  * a POSIX style naming convention.
1045*0Sstevel@tonic-gate  */
1046*0Sstevel@tonic-gate #undef	M_FSTYPE		/* If m_fstype is defined in mkslocal.h,
1047*0Sstevel@tonic-gate 				 * either as a #define, or a function decl.
1048*0Sstevel@tonic-gate 				 * then define M_FSTYPE, so <mks.h> won't
1049*0Sstevel@tonic-gate 				 * define m_fstype into M_FSTYPE_POSIX.
1050*0Sstevel@tonic-gate 				 */
1051*0Sstevel@tonic-gate 
1052*0Sstevel@tonic-gate #undef	m_fstype(path)		/* Either #define, or function returning a
1053*0Sstevel@tonic-gate 				 * combination of file naming attributes,
1054*0Sstevel@tonic-gate 				 * and the file system type.  On a system
1055*0Sstevel@tonic-gate 				 * with only one file system type, this would
1056*0Sstevel@tonic-gate 				 * be a #define; on a system with multiple a
1057*0Sstevel@tonic-gate 				 * function which would decide based on the
1058*0Sstevel@tonic-gate 				 * path arg given.  Either M_FSTYPE_POSIX or
1059*0Sstevel@tonic-gate 				 * M_FSTYPE_FAT, should be or'ed with any of
1060*0Sstevel@tonic-gate 				 * M_FSATTR_ONE_DOT, M_FSATTR_SHORT_EXT and
1061*0Sstevel@tonic-gate 				 * M_FSATTR_NO_LEADING_DOT.  These three
1062*0Sstevel@tonic-gate 				 * M_FSATTR_ bit flags conform to the three
1063*0Sstevel@tonic-gate 				 * following obsolete defines.
1064*0Sstevel@tonic-gate 				 */
1065*0Sstevel@tonic-gate 
1066*0Sstevel@tonic-gate #undef	M_ONE_DOT		/* Use	#define M_ONE_DOT 1
1067*0Sstevel@tonic-gate 				 * for non-posix files systems which
1068*0Sstevel@tonic-gate 				 * permit only one dot in a filename.
1069*0Sstevel@tonic-gate 				 * Thus, for example, y.tab.c, will become
1070*0Sstevel@tonic-gate 				 * ytab.c, based on this #define.
1071*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined.
1072*0Sstevel@tonic-gate 				 */
1073*0Sstevel@tonic-gate 
1074*0Sstevel@tonic-gate #undef	M_NO_LEADING_DOT	/* Use	#define M_NO_LEADING_DOT 1 for
1075*0Sstevel@tonic-gate 				 * non-posix file systems which do not
1076*0Sstevel@tonic-gate 				 * permit a leading dot in a filename.
1077*0Sstevel@tonic-gate 				 * Thus, for example, .profile will become
1078*0Sstevel@tonic-gate 				 * profile.ksh based on this #define.
1079*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined.
1080*0Sstevel@tonic-gate 				 */
1081*0Sstevel@tonic-gate 
1082*0Sstevel@tonic-gate #undef M_SHORT_EXT		/* Use	#define M_SHORT_EXT 1
1083*0Sstevel@tonic-gate 				 * for non-posix file systems which
1084*0Sstevel@tonic-gate 				 * permit only a limited number of characters
1085*0Sstevel@tonic-gate 				 * after a dot in a filename.
1086*0Sstevel@tonic-gate 				 * Defining M_SHORT_EXT will limit filenames
1087*0Sstevel@tonic-gate 				 * to 3 characters after the dot.
1088*0Sstevel@tonic-gate 				 * For example, y.output will become y.out
1089*0Sstevel@tonic-gate 				 * <mks.h> will default to undefined.
1090*0Sstevel@tonic-gate 				 */
1091*0Sstevel@tonic-gate 
1092*0Sstevel@tonic-gate /*
1093*0Sstevel@tonic-gate  * customizations for ps field specifiers and widths
1094*0Sstevel@tonic-gate  * This will vary from system to system depending on the max size
1095*0Sstevel@tonic-gate  * of the values in the different fields
1096*0Sstevel@tonic-gate  * The following are UNIX (e.g SYSV and BSD) std defaults
1097*0Sstevel@tonic-gate  */
1098*0Sstevel@tonic-gate #define M_PS_FFMT	{ m_textstr(4865, "ruser=UID", "I"),\
1099*0Sstevel@tonic-gate 			 m_textstr(4866, "pid,ppid,pcpu=C", "I"),\
1100*0Sstevel@tonic-gate 			 m_textstr(4861, "stime,tty=TTY", "I"), "atime,args",\
1101*0Sstevel@tonic-gate 			 NULL };
1102*0Sstevel@tonic-gate #define M_PS_JFMT	{ m_textstr(4867, "pid,sid,pgid=PGRP", "I"),\
1103*0Sstevel@tonic-gate 			  m_textstr(4862, "tty=TTY", "I"), "atime,args", NULL };
1104*0Sstevel@tonic-gate #define M_PS_LFMT	{ m_textstr(4868, "flags,state,ruid=UID", "I"),\
1105*0Sstevel@tonic-gate 			 m_textstr(4866, "pid,ppid,pcpu=C", "I"),\
1106*0Sstevel@tonic-gate 			 m_textstr(4869, "pri,nice,addr,vsz=SZ", "I"),\
1107*0Sstevel@tonic-gate 			 m_textstr(4870, "wchan,tty=TTY", "I"),\
1108*0Sstevel@tonic-gate 			 m_textstr(4863, "atime,comm=COMD", "I"), NULL };
1109*0Sstevel@tonic-gate #define M_PS_DEFFMT	{ m_textstr(4864, "pid,tty=TTY", "I"), "atime,comm",\
1110*0Sstevel@tonic-gate 			 NULL };
1111*0Sstevel@tonic-gate #define M_PS_PID_WIDTH  5
1112*0Sstevel@tonic-gate #define M_PS_XPID_WIDTH 8
1113*0Sstevel@tonic-gate #define M_PS_GID_WIDTH  5
1114*0Sstevel@tonic-gate #define M_PS_UID_WIDTH  5
1115*0Sstevel@tonic-gate #define M_PS_TTY_WIDTH  7
1116*0Sstevel@tonic-gate /*
1117*0Sstevel@tonic-gate  * The syntax for specifying and displaying terminal names in ps and who
1118*0Sstevel@tonic-gate  * is required to be the same.
1119*0Sstevel@tonic-gate  * Since who gets the names from the utmp file, the ps utility
1120*0Sstevel@tonic-gate  * (and the m_psread() function) needs to know what format these terminal
1121*0Sstevel@tonic-gate  * names are presented in the utmp file.
1122*0Sstevel@tonic-gate  * It would appear that all systems have devices in the /dev/ file system
1123*0Sstevel@tonic-gate  * and that terminal names are displayed as the name rooted from "/dev".
1124*0Sstevel@tonic-gate  * Since ttyname() returns a full pathname, we can just strip
1125*0Sstevel@tonic-gate  * off the "/dev/" prefix and we will get the correct name.
1126*0Sstevel@tonic-gate  *
1127*0Sstevel@tonic-gate  * The ps utility uses ttyname() to get the name of the controlling terminal.
1128*0Sstevel@tonic-gate  * M_PS_TTY_PREFIX_TOSTRIP is a prefix string that must be removed from
1129*0Sstevel@tonic-gate  * the name that ttyname() returns in order to match the name returned
1130*0Sstevel@tonic-gate  * by m_psread().
1131*0Sstevel@tonic-gate  * If no prefix is to be removed, then a zero length string ("") should be used
1132*0Sstevel@tonic-gate  */
1133*0Sstevel@tonic-gate #define M_PS_TTY_PREFIX_TOSTRIP "/dev/"
1134*0Sstevel@tonic-gate 
1135*0Sstevel@tonic-gate 
1136*0Sstevel@tonic-gate #define M_LOCALE_NLS_DIR        "/usr/lib"
1137*0Sstevel@tonic-gate 			/* Define this if you have a system that
1138*0Sstevel@tonic-gate 			 * implements the MKS rootname() function
1139*0Sstevel@tonic-gate 			 * (e.g not a no-op)
1140*0Sstevel@tonic-gate 			 * and you want to specify the absolute
1141*0Sstevel@tonic-gate 			 * pathname to the NLS directory
1142*0Sstevel@tonic-gate 			 * which is independent of semantics of rootname().
1143*0Sstevel@tonic-gate 			 * Depending on the implementation of rootname(),
1144*0Sstevel@tonic-gate 			 * it may prefix the path with $ROOTDIR environment
1145*0Sstevel@tonic-gate 			 * variable or it may return a path relative to
1146*0Sstevel@tonic-gate 			 * the know location of where the product has
1147*0Sstevel@tonic-gate 			 * been installed (or maybe something else!)
1148*0Sstevel@tonic-gate 			 *
1149*0Sstevel@tonic-gate 			 * If this is not defined, then locale will
1150*0Sstevel@tonic-gate 			 * call confstr(_CS_NLSDIR), which in turn calls
1151*0Sstevel@tonic-gate 			 * rootname(M_NLSDIR), and you get this resultant
1152*0Sstevel@tonic-gate 			 * pathname.
1153*0Sstevel@tonic-gate 			 *
1154*0Sstevel@tonic-gate 			 * Thus, if you want locale to look in the system native
1155*0Sstevel@tonic-gate 			 * nls directory, then define this.
1156*0Sstevel@tonic-gate 			 * Otherwise, it will probably look in a user
1157*0Sstevel@tonic-gate 			 * specified directory, or the product installation
1158*0Sstevel@tonic-gate 			 * directory.
1159*0Sstevel@tonic-gate 			 */
1160*0Sstevel@tonic-gate 
1161*0Sstevel@tonic-gate 
1162*0Sstevel@tonic-gate /* Cron configuration options:
1163*0Sstevel@tonic-gate  * M_CRON_USESFIFO	define this (to 1) if your cron is implemented
1164*0Sstevel@tonic-gate  *			using a FIFO (normally found in /usr/lib/cron/FIFO)
1165*0Sstevel@tonic-gate  *			to accept communication from the at/batch/crontab
1166*0Sstevel@tonic-gate  *			utilities when notifying cron of changes to the
1167*0Sstevel@tonic-gate  *			at/batch queues or the user crontabs.
1168*0Sstevel@tonic-gate  *			If this is not defined, then cron will expect
1169*0Sstevel@tonic-gate  *			a signal (SIGUSR) from at/batch/crontab to indicate
1170*0Sstevel@tonic-gate  *			a change in the at/batch queues or the crontabs
1171*0Sstevel@tonic-gate  *
1172*0Sstevel@tonic-gate  * M_CRONVARS_DEFINED	define this if you define the pathnames below.
1173*0Sstevel@tonic-gate  *		        If you don't define this, then the pathnames that cron
1174*0Sstevel@tonic-gate  *                      uses is defined in src/cron/cronvars.c.
1175*0Sstevel@tonic-gate  *			(e.g it uses the rootname() and the M_SPOOLDIR,
1176*0Sstevel@tonic-gate  *                           M_LIBDIR macros )
1177*0Sstevel@tonic-gate  *
1178*0Sstevel@tonic-gate  *			This can be used to override cronvars.c definitions
1179*0Sstevel@tonic-gate  *			This is useful on systems that you don't want to
1180*0Sstevel@tonic-gate  *			use MKS's cron daemon and thus, you have to define
1181*0Sstevel@tonic-gate  *			the directories/files where the system cron expects
1182*0Sstevel@tonic-gate  *			things.
1183*0Sstevel@tonic-gate  */
1184*0Sstevel@tonic-gate #undef M_CRON_USESFIFO
1185*0Sstevel@tonic-gate 
1186*0Sstevel@tonic-gate #undef M_CRONVARS_DEFINED
1187*0Sstevel@tonic-gate 
1188*0Sstevel@tonic-gate /* the following M_CRON_* macros necessary only
1189*0Sstevel@tonic-gate  * if M_CRONVARS_DEFINED is defined above
1190*0Sstevel@tonic-gate  */
1191*0Sstevel@tonic-gate #undef M_CRON_SPOOLDIR		/* usually /usr/spool/cron */
1192*0Sstevel@tonic-gate #undef M_CRON_LIBDIR		/* usually /usr/lib/cron */
1193*0Sstevel@tonic-gate #undef M_CRON_CRONTABSDIR	/* usually /usr/spool/cron/crontabs */
1194*0Sstevel@tonic-gate #undef M_CRON_ATJOBSDIR		/* usually /usr/spool/cron/atjobs */
1195*0Sstevel@tonic-gate #undef M_CRON_LOGFILE		/* usually /usr/lib/cron/log */
1196*0Sstevel@tonic-gate #undef M_CRON_PIDFILE		/* usually /usr/lib/cron/pid */
1197*0Sstevel@tonic-gate #undef M_CRON_QUEUEDEFSFILE	/* usually /usr/lib/cron/queuedefs */
1198*0Sstevel@tonic-gate #undef M_CRON_FIFOFILE		/* usually /usr/lib/cron/FIFO */
1199*0Sstevel@tonic-gate 				/* FIFOFILE only necessary if M_CRON_USESFIFO
1200*0Sstevel@tonic-gate 				 * is defined
1201*0Sstevel@tonic-gate 				 */
1202*0Sstevel@tonic-gate /*
1203*0Sstevel@tonic-gate  * M_CRON_MAILER:
1204*0Sstevel@tonic-gate  *     This is a string that specifies a utility names
1205*0Sstevel@tonic-gate  *     or a shell filter (e.g pipeline) that gets executed by the
1206*0Sstevel@tonic-gate  *     cron daemon to deliver mail messages.
1207*0Sstevel@tonic-gate  *     If this is NOT defined here, the the default case is used (see <mks.h>)
1208*0Sstevel@tonic-gate  *
1209*0Sstevel@tonic-gate  * Default case:
1210*0Sstevel@tonic-gate  *     #define M_CRON_MAILER   "sed -e s/^~/~~/ | mailx "
1211*0Sstevel@tonic-gate  *
1212*0Sstevel@tonic-gate  * Assumes only POSIX.2 mailx is available.
1213*0Sstevel@tonic-gate  * Must be careful when cron sends output to mailx.
1214*0Sstevel@tonic-gate  * We must ensure that lines with leading '~' are escaped
1215*0Sstevel@tonic-gate  * so mailx doesn't interpret these lines
1216*0Sstevel@tonic-gate  * This string MUST include a trailing space character.
1217*0Sstevel@tonic-gate  */
1218*0Sstevel@tonic-gate #define M_CRON_MAILER   "sed -e s/^~/~~/ | mailx "
1219*0Sstevel@tonic-gate 
1220*0Sstevel@tonic-gate 
1221*0Sstevel@tonic-gate /*
1222*0Sstevel@tonic-gate  * Defining M_SYSTEM_TMPDIR indicates that a system global
1223*0Sstevel@tonic-gate  * temporary directory should be used on this system.
1224*0Sstevel@tonic-gate  * This will override M_TMPDIR, and any calls to rootname(M_TMPDIR)
1225*0Sstevel@tonic-gate  * which is relative to the product installation directory
1226*0Sstevel@tonic-gate  */
1227*0Sstevel@tonic-gate #define M_SYSTEM_TMPDIR  "/tmp"
1228*0Sstevel@tonic-gate 
1229*0Sstevel@tonic-gate /*
1230*0Sstevel@tonic-gate  * ex/vi's recover command (and the program of the same name)
1231*0Sstevel@tonic-gate  * requires a directory in which to store any preserved tmp files.
1232*0Sstevel@tonic-gate  * Normally these are stored in rootname(M_ETCDIR(recover))
1233*0Sstevel@tonic-gate  * which is becomes a directory name relative to ROOTDIR env variable (on DOS)
1234*0Sstevel@tonic-gate  * or relative to the product installation directory.
1235*0Sstevel@tonic-gate  * Defining M_PRESERVEDIR will ensure that this directory is used
1236*0Sstevel@tonic-gate  * and calls to rootname() are bypassed.
1237*0Sstevel@tonic-gate  * (e.g the absolute directory name defined by M_PRESERVEDIR will be used)
1238*0Sstevel@tonic-gate  */
1239*0Sstevel@tonic-gate #define M_PRESERVEDIR    "/var/recover"
1240*0Sstevel@tonic-gate 
1241*0Sstevel@tonic-gate /*
1242*0Sstevel@tonic-gate  * Defining M_SYSTEM_MAILDIR will cause mailx to use this
1243*0Sstevel@tonic-gate  * absolute directory name - e.g bypass the call to rootname() so
1244*0Sstevel@tonic-gate  * it doesn't become relative to product installation directory.
1245*0Sstevel@tonic-gate  */
1246*0Sstevel@tonic-gate #define M_SYSTEM_MAILDIR       "/usr/mail"
1247*0Sstevel@tonic-gate 
1248*0Sstevel@tonic-gate 
1249*0Sstevel@tonic-gate #undef M_ULIMIT_AVAIL	/* define this if your system provides the SystemV
1250*0Sstevel@tonic-gate 			 * ulimit() API and the <ulimit.h> header file
1251*0Sstevel@tonic-gate 			 *
1252*0Sstevel@tonic-gate 			 * This information is used by 'at' utility
1253*0Sstevel@tonic-gate 			 */
1254*0Sstevel@tonic-gate 
1255*0Sstevel@tonic-gate /*
1256*0Sstevel@tonic-gate  * Shell configuration options.
1257*0Sstevel@tonic-gate  * NOTE: If not defined here, then there may be
1258*0Sstevel@tonic-gate  * a default defined in src/sh/sh.h; NOT <mks.h>.
1259*0Sstevel@tonic-gate  *
1260*0Sstevel@tonic-gate  * You must configure built-in utilities in sh/sh.mk.
1261*0Sstevel@tonic-gate  * Currently, test and printf can be built-in.
1262*0Sstevel@tonic-gate  * If you just compile the shell without -D's,
1263*0Sstevel@tonic-gate  * you do not get these built-in utilities.
1264*0Sstevel@tonic-gate  */
1265*0Sstevel@tonic-gate #define	M_SH_ULIMIT	0	/* Shell SVR4 ulimit built-in.
1266*0Sstevel@tonic-gate 				 * Uses getrlimit/setrlimit(2).
1267*0Sstevel@tonic-gate 				 *
1268*0Sstevel@tonic-gate 				 * NOTE: This may be defined in mkslocal.mk
1269*0Sstevel@tonic-gate 				 * along with the build configuration required
1270*0Sstevel@tonic-gate 				 * for shbltin.c.
1271*0Sstevel@tonic-gate 				 */
1272*0Sstevel@tonic-gate /* M_SH_GETCWD removed, no longer used. default for physical cd/pwd */
1273*0Sstevel@tonic-gate #define	M_SH_BGNICE	0	/* Set -o bgnice for interactive shell.
1274*0Sstevel@tonic-gate 				 */
1275*0Sstevel@tonic-gate #define	M_SH_BUILTIN_SEARCH 1	/* Do path search for utility built-ins.
1276*0Sstevel@tonic-gate 				 * See POSIX.2/D12, section 3.9.1.1.
1277*0Sstevel@tonic-gate 				 * Currently they are:
1278*0Sstevel@tonic-gate 				 * [, echo, test, time, printf, pwd.
1279*0Sstevel@tonic-gate 				 */
1280*0Sstevel@tonic-gate #define	M_SH_RSH	0	/* rsh is installed as a link to sh.
1281*0Sstevel@tonic-gate 				 * Vendor option, not required by any standard.
1282*0Sstevel@tonic-gate 				 * Not recommended on UNIX.
1283*0Sstevel@tonic-gate 				 */
1284*0Sstevel@tonic-gate #define	M_SH_USER_FDS	10	/* Number of user file descriptors.
1285*0Sstevel@tonic-gate 				 * The value for [n] in redirection
1286*0Sstevel@tonic-gate 				 * can be between 0 and M_SH_USER_FDS-1.
1287*0Sstevel@tonic-gate 				 * Must be >= 10, should be <= OPEN_MAX/2.
1288*0Sstevel@tonic-gate 				 */
1289*0Sstevel@tonic-gate #define	M_SH_LINE_MAX	LINE_MAX /* Shell input line buffer size.
1290*0Sstevel@tonic-gate 				  */
1291*0Sstevel@tonic-gate #undef	M_JOB_CONTROL_OFF	/* Disable job control,
1292*0Sstevel@tonic-gate 				 * were _POSIX_JOB_CONTROL is defined.
1293*0Sstevel@tonic-gate 				 */
1294*0Sstevel@tonic-gate #undef	M_COPYRIGHT		/* MKS Toolkit.
1295*0Sstevel@tonic-gate 				 * Print MKS copyright on startup (sh).
1296*0Sstevel@tonic-gate 				 */
1297*0Sstevel@tonic-gate #undef	M_SH_CRITERROR		/* MKS Toolkit.
1298*0Sstevel@tonic-gate 				 * set -o criterror (DOS, OS/2).
1299*0Sstevel@tonic-gate 				 */
1300*0Sstevel@tonic-gate 
1301*0Sstevel@tonic-gate #define M_SH_MAX_FUNCTION_EVAL_DEPTH	100
1302*0Sstevel@tonic-gate 				/* The limit on how deep function
1303*0Sstevel@tonic-gate 				 * evaluation can go when shell
1304*0Sstevel@tonic-gate 				 * functions execute shell functions.
1305*0Sstevel@tonic-gate 				 * This stops the shell from crashing
1306*0Sstevel@tonic-gate 				 * if an infinitely recursive function
1307*0Sstevel@tonic-gate 				 * is evaluated.  If the value is 0
1308*0Sstevel@tonic-gate 				 * then functions can't be executed at
1309*0Sstevel@tonic-gate 				 * all, if the value is 1 then
1310*0Sstevel@tonic-gate 				 * functions can't execute other
1311*0Sstevel@tonic-gate 				 * functions, and so on.  If the macro
1312*0Sstevel@tonic-gate 				 * M_STKCHK is defined then there will
1313*0Sstevel@tonic-gate 				 * be no limit and M_STKCHK will be
1314*0Sstevel@tonic-gate 				 * used to prevent a crash.
1315*0Sstevel@tonic-gate 				 */
1316*0Sstevel@tonic-gate 
1317*0Sstevel@tonic-gate #undef M_SPAWN			/* This code is prototype code only.  It
1318*0Sstevel@tonic-gate 				 * has not been tested, and should not be
1319*0Sstevel@tonic-gate 				 * used.
1320*0Sstevel@tonic-gate 				 * This code is not supported, except through
1321*0Sstevel@tonic-gate 				 * special arrangements with MKS.
1322*0Sstevel@tonic-gate 				 */
1323*0Sstevel@tonic-gate 
1324*0Sstevel@tonic-gate 
1325*0Sstevel@tonic-gate #define M_EXPR_POSIX	1
1326*0Sstevel@tonic-gate 				/*
1327*0Sstevel@tonic-gate 				 * POSIX requires that numbers on the
1328*0Sstevel@tonic-gate 				 * expr command line always be considered
1329*0Sstevel@tonic-gate 				 * decimal.  We support octal and hex as
1330*0Sstevel@tonic-gate 				 * as well.  Defining this will turn that
1331*0Sstevel@tonic-gate 				 * extension off by default, but it is still
1332*0Sstevel@tonic-gate 				 * accessible by specifying the new '-W' flag
1333*0Sstevel@tonic-gate 				 */
1334*0Sstevel@tonic-gate 
1335*0Sstevel@tonic-gate #undef M_RE_SUB_ANCHOR		/* Define this if you wish your baisc regular
1336*0Sstevel@tonic-gate 				 * expressions to support anchors
1337*0Sstevel@tonic-gate 				 * (^ and $) inside of subexpressions.
1338*0Sstevel@tonic-gate 				 * See POSIX.2 section 2.8.3.5.
1339*0Sstevel@tonic-gate 				 */
1340*0Sstevel@tonic-gate 
1341*0Sstevel@tonic-gate 
1342*0Sstevel@tonic-gate /*
1343*0Sstevel@tonic-gate  * In order to get full Posix.2 i18n, then you must either:
1344*0Sstevel@tonic-gate  *
1345*0Sstevel@tonic-gate  * i) Use the full mks ansi-c library; mks localedef, mks locale.h file...
1346*0Sstevel@tonic-gate  * ii) Extend your own ansi-c library to contain the mks specified functions
1347*0Sstevel@tonic-gate  * as described in the mks Porting and Tuning Guide.
1348*0Sstevel@tonic-gate  *
1349*0Sstevel@tonic-gate  * Otherwise, it is not possible to conform to posix .2.
1350*0Sstevel@tonic-gate  *
1351*0Sstevel@tonic-gate  * You may still turn on I18N, and get as much internationalization as is
1352*0Sstevel@tonic-gate  * possible using a standard ANSI-C compiler.
1353*0Sstevel@tonic-gate  *
1354*0Sstevel@tonic-gate  * Your options are:
1355*0Sstevel@tonic-gate  * i)   Full posix conformance. You must have i or ii above, and must define
1356*0Sstevel@tonic-gate  *      M_I18N and M_I18N_MKS_{FULL,XPG}.
1357*0Sstevel@tonic-gate  * ii)  I18N at ANSI-C level.  You must define I18N, do not
1358*0Sstevel@tonic-gate  *      define M_I18N_MKS_{FULL,XPG}.
1359*0Sstevel@tonic-gate  * iii) No I18N.  Do not define I18N, do not define M_I18N_MKS_{FULL,XPG}. */
1360*0Sstevel@tonic-gate #define	I18N	1		/* OBSOLESCENT version of I18N
1361*0Sstevel@tonic-gate 				 * This should be removed when all occurances
1362*0Sstevel@tonic-gate 				 * of I18N are removed from the MKS code
1363*0Sstevel@tonic-gate 				 */
1364*0Sstevel@tonic-gate #define	M_I18N	1		/* Do we want internationalized code?  To build
1365*0Sstevel@tonic-gate 			 	 * a system where everything gets deleted at
1366*0Sstevel@tonic-gate 				 * compile time via #define's when possible,
1367*0Sstevel@tonic-gate 				 * this flag should be set.  <mks.h> does not
1368*0Sstevel@tonic-gate 				 * define I18N, but it is normal to set it.
1369*0Sstevel@tonic-gate 				 */
1370*0Sstevel@tonic-gate #define	M_I18N_MKS_FULL	1	/* Defining this, indicates you are using
1371*0Sstevel@tonic-gate 				 * MKS i18n extension routines
1372*0Sstevel@tonic-gate 				 *  (e.g m_collrange(), m_collequiv() ...
1373*0Sstevel@tonic-gate 				 *       localedtconv, localeldconv() ...)
1374*0Sstevel@tonic-gate 				 * Defining this to 2 indicates that you
1375*0Sstevel@tonic-gate 				 * want to use MKS's implementation of these
1376*0Sstevel@tonic-gate 				 * routines and the implementation of MKS's
1377*0Sstevel@tonic-gate 				 * format of the locale data files.
1378*0Sstevel@tonic-gate 				 * Defining this to 1 indicates you don't want
1379*0Sstevel@tonic-gate 				 * MKS's implementation, and you must write
1380*0Sstevel@tonic-gate 				 * your own code for m_collrange(), collequiv()
1381*0Sstevel@tonic-gate 				 * ...
1382*0Sstevel@tonic-gate 				 *   note: there are some routines like
1383*0Sstevel@tonic-gate 				 *         localedtconv which can  obtain the
1384*0Sstevel@tonic-gate 				 *         necessary info from nl_langinfo()
1385*0Sstevel@tonic-gate 				 *         if this is supported
1386*0Sstevel@tonic-gate 				 *         See M_I18N_MKS_XPG below
1387*0Sstevel@tonic-gate 				 */
1388*0Sstevel@tonic-gate #define	M_I18N_MKS_XPG	1	/* This is only useful if M_I18N_MKS_FULL == 1.
1389*0Sstevel@tonic-gate 				 * This flag indicates that nl_langinfo()
1390*0Sstevel@tonic-gate 				 * is available and can be used to
1391*0Sstevel@tonic-gate 				 * retrieve some of the locale information.
1392*0Sstevel@tonic-gate 				 * ( used in localeldconv() and localedtconv()
1393*0Sstevel@tonic-gate 				 *  routines)
1394*0Sstevel@tonic-gate 				 */
1395*0Sstevel@tonic-gate 
1396*0Sstevel@tonic-gate #define	M_I18N_M_	1	/* MKS has defined some additions i18n API's.
1397*0Sstevel@tonic-gate 				 * (e.g m_collequiv, m_collrange ...)
1398*0Sstevel@tonic-gate 				 * This flag indicates that these API's start
1399*0Sstevel@tonic-gate 				 * with "m_".
1400*0Sstevel@tonic-gate 				 * It is the MKS intention that if these
1401*0Sstevel@tonic-gate 				 * extentions get approved/standardized
1402*0Sstevel@tonic-gate 				 * (by POSIX or ANSI or ...)
1403*0Sstevel@tonic-gate 				 * all code will have  the m_ removed.
1404*0Sstevel@tonic-gate 				 * Since it is not yet approved,
1405*0Sstevel@tonic-gate 				 * we are maintaining the mks conventions of
1406*0Sstevel@tonic-gate 				 * prefixing our private libraries with m_.
1407*0Sstevel@tonic-gate 				 * If you have chosen to implement these
1408*0Sstevel@tonic-gate 				 * routines without the m_ do not define
1409*0Sstevel@tonic-gate 				 * M_I18N_M_
1410*0Sstevel@tonic-gate 				 */
1411*0Sstevel@tonic-gate 
1412*0Sstevel@tonic-gate #define M_I18N_MB	1	/* Define if multibyte character support
1413*0Sstevel@tonic-gate 				 * is required.
1414*0Sstevel@tonic-gate 				 */
1415*0Sstevel@tonic-gate 
1416*0Sstevel@tonic-gate #define  M_LOCALEINFO_IN_DIRECTORY  1
1417*0Sstevel@tonic-gate 				/* This macro indicates if the locale
1418*0Sstevel@tonic-gate 				 * information is stored in a directory,
1419*0Sstevel@tonic-gate 				 * or in a file.
1420*0Sstevel@tonic-gate 				 * For instance, many systems use
1421*0Sstevel@tonic-gate 				 *   /usr/lib/locale
1422*0Sstevel@tonic-gate 				 * as a directory to store all their locale
1423*0Sstevel@tonic-gate 				 * information.
1424*0Sstevel@tonic-gate 				 * In this directory is stored the info
1425*0Sstevel@tonic-gate 				 * for each supported locale.
1426*0Sstevel@tonic-gate 				 * (e.g POSIX, C, en_US, fr, ...)
1427*0Sstevel@tonic-gate 				 * It is assumed that there is one entry here
1428*0Sstevel@tonic-gate 				 * for each supported locale.
1429*0Sstevel@tonic-gate 				 * If these entries are sub-directories,
1430*0Sstevel@tonic-gate 				 * then this macro is defined.
1431*0Sstevel@tonic-gate 				 * If these entries are files, then do not
1432*0Sstevel@tonic-gate 				 * define this macro.
1433*0Sstevel@tonic-gate 				 */
1434*0Sstevel@tonic-gate 
1435*0Sstevel@tonic-gate #undef M_I18N_LOCKING_SHIFT	/* Define if any multibyte character sets
1436*0Sstevel@tonic-gate 				 * used are locking-shift character sets.
1437*0Sstevel@tonic-gate 				 */
1438*0Sstevel@tonic-gate 
1439*0Sstevel@tonic-gate 
1440*0Sstevel@tonic-gate #undef M_VARIANTS		/* This can be defined on EBCDIC systems
1441*0Sstevel@tonic-gate 				 * where the POSIX.2 portable characters are not
1442*0Sstevel@tonic-gate 				 * invariant across all the code pages
1443*0Sstevel@tonic-gate 				 * supported.
1444*0Sstevel@tonic-gate 				 * By defineing this, user is allowed
1445*0Sstevel@tonic-gate 				 * to define the encodings
1446*0Sstevel@tonic-gate 				 * for these characters as they switch between
1447*0Sstevel@tonic-gate 				 * the various code pages by setting up
1448*0Sstevel@tonic-gate 				 * the VARIANTS environment variable..
1449*0Sstevel@tonic-gate 				 * so that the various utilities will cope
1450*0Sstevel@tonic-gate 				 * with the different encodings gracefully.
1451*0Sstevel@tonic-gate 				 */
1452*0Sstevel@tonic-gate 				 /* Source code hints:
1453*0Sstevel@tonic-gate 				  * if you define this, you will need
1454*0Sstevel@tonic-gate 				  *    h/variant.h, h/m_invari.h
1455*0Sstevel@tonic-gate 				  *    libc/mks/getsyntx.c,
1456*0Sstevel@tonic-gate 				  *    libc/mks/m_varian.c
1457*0Sstevel@tonic-gate 				  *
1458*0Sstevel@tonic-gate 				  * If this is not defined, then all you need
1459*0Sstevel@tonic-gate 				  * is
1460*0Sstevel@tonic-gate 				  *    h/m_invar.h
1461*0Sstevel@tonic-gate 				  */
1462*0Sstevel@tonic-gate 
1463*0Sstevel@tonic-gate /*
1464*0Sstevel@tonic-gate  * Define the following if you want the corresponding posix define with
1465*0Sstevel@tonic-gate  * a single leading underscore
1466*0Sstevel@tonic-gate  */
1467*0Sstevel@tonic-gate #define	__POSIX_JOB_CONTROL	_POSIX_JOB_CONTROL
1468*0Sstevel@tonic-gate #define	__POSIX_SAVED_IDS	_POSIX_SAVED_IDS
1469*0Sstevel@tonic-gate #define	__POSIX_NO_TRUNC	(-1)
1470*0Sstevel@tonic-gate #define	__POSIX_VDISABLE	0xff
1471*0Sstevel@tonic-gate 
1472*0Sstevel@tonic-gate /*
1473*0Sstevel@tonic-gate  * On some systems where code size and performance are problems, it
1474*0Sstevel@tonic-gate  * may be desirable to use a simplified version of the m_loxclose() routine
1475*0Sstevel@tonic-gate  * in programs that don't require the full functionality. If this is the
1476*0Sstevel@tonic-gate  * case and routine m_loxqclose() has been provided, define the following
1477*0Sstevel@tonic-gate  * macro. (Refer to the Library/eXecutable/Object interface documentation
1478*0Sstevel@tonic-gate  * for more information.
1479*0Sstevel@tonic-gate  */
1480*0Sstevel@tonic-gate #undef M_LOXQCLOSE
1481*0Sstevel@tonic-gate 
1482*0Sstevel@tonic-gate /*
1483*0Sstevel@tonic-gate  * some systems require overrides after <mks.h> is read.
1484*0Sstevel@tonic-gate  * If your system requires this, define M_MKSEXTRA_H here
1485*0Sstevel@tonic-gate  * so that the "#include <mksextra.h>" is exposed in <mks.h>
1486*0Sstevel@tonic-gate  */
1487*0Sstevel@tonic-gate #undef M_MKSEXTRA_H
1488*0Sstevel@tonic-gate 
1489*0Sstevel@tonic-gate /*
1490*0Sstevel@tonic-gate  * mailx configuration
1491*0Sstevel@tonic-gate  */
1492*0Sstevel@tonic-gate 
1493*0Sstevel@tonic-gate /*
1494*0Sstevel@tonic-gate  * Many mail systems support the non-standard "Content-Length" header
1495*0Sstevel@tonic-gate  * which contains the length of the body of the message (not including
1496*0Sstevel@tonic-gate  * the headers) in bytes.  Defining M_MAILX_CONTENT_LENGTH_ENABLE will
1497*0Sstevel@tonic-gate  * turn on code in mailx to generate this header when mail is sent and
1498*0Sstevel@tonic-gate  * honour it when scanning mailboxes.
1499*0Sstevel@tonic-gate  */
1500*0Sstevel@tonic-gate #undef M_MAILX_CONTENT_LENGHT_ENABLE
1501*0Sstevel@tonic-gate 
1502*0Sstevel@tonic-gate #endif /* 0. not required for POSIX systems; here for documentation only */
1503*0Sstevel@tonic-gate 
1504*0Sstevel@tonic-gate 
1505*0Sstevel@tonic-gate #define	halloc(n,s)	malloc((size_t)((n)*(s)))/* alloc big chunk of mem*/
1506*0Sstevel@tonic-gate #define	hfree(ptr)	free(ptr)		/* free big chunk of mem */
1507*0Sstevel@tonic-gate #define m_cp(src, dest, ssb, flags)	(M_CP_NOOP)
1508*0Sstevel@tonic-gate #define	rootname(fn)	fn			/* make relative to root */
1509*0Sstevel@tonic-gate 
1510*0Sstevel@tonic-gate 
1511*0Sstevel@tonic-gate /*
1512*0Sstevel@tonic-gate  * MKS makes use of types that may or may not already be defined in the
1513*0Sstevel@tonic-gate  * system <sys/types.h> file.  If not defined, then they must be defined
1514*0Sstevel@tonic-gate  * here.  (The problem is a lack of #if directive to determine an existing
1515*0Sstevel@tonic-gate  * typedef.
1516*0Sstevel@tonic-gate  */
1517*0Sstevel@tonic-gate typedef unsigned char	uchar;
1518*0Sstevel@tonic-gate typedef	unsigned short	ushort;
1519*0Sstevel@tonic-gate typedef unsigned int	uint;
1520*0Sstevel@tonic-gate typedef unsigned long	ulong;
1521*0Sstevel@tonic-gate 
1522*0Sstevel@tonic-gate /*
1523*0Sstevel@tonic-gate  * Define any Optional Facility Configuration Values here.
1524*0Sstevel@tonic-gate  * See POSIX.2, 2.13.2, Table 2-18
1525*0Sstevel@tonic-gate  * We define them here as M_ entries; this allows unistd.h to test the
1526*0Sstevel@tonic-gate  * M_ variable, and if defined, define the official _POSIX2_ variable.
1527*0Sstevel@tonic-gate  * **Note: It isn't permitted for a real conforming unistd.h to #include <mks.h>
1528*0Sstevel@tonic-gate  * due to name space contamination problems.  A real, conforming implementation
1529*0Sstevel@tonic-gate  * will manually modify their unistd.h to define the _POSIX2 variables
1530*0Sstevel@tonic-gate  * appropriately.
1531*0Sstevel@tonic-gate  */
1532*0Sstevel@tonic-gate #define	M_POSIX2_C_BIND		1
1533*0Sstevel@tonic-gate #define	M_POSIX2_C_DEV		1
1534*0Sstevel@tonic-gate #undef	M_POSIX2_FORT_DEV
1535*0Sstevel@tonic-gate #undef	M_POSIX2_FORT_RUN
1536*0Sstevel@tonic-gate #define	M_POSIX2_LOCALEDEF	1
1537*0Sstevel@tonic-gate #define	M_POSIX2_SW_DEV		1
1538*0Sstevel@tonic-gate 
1539*0Sstevel@tonic-gate /*
1540*0Sstevel@tonic-gate  * New definitions for I/PSU 3.3
1541*0Sstevel@tonic-gate  */
1542*0Sstevel@tonic-gate 
1543*0Sstevel@tonic-gate #undef M_POSIX_PFNCS_ONLY	/* define this to be true if the implementation
1544*0Sstevel@tonic-gate 				 * only supports the portable filename
1545*0Sstevel@tonic-gate 				 * set as defined in POSIX.1
1546*0Sstevel@tonic-gate 				 */
1547*0Sstevel@tonic-gate 
1548*0Sstevel@tonic-gate #undef M_NO_STIME		/* set this define to be true if the system
1549*0Sstevel@tonic-gate 				 * does not support the stime() API.
1550*0Sstevel@tonic-gate 				 */
1551*0Sstevel@tonic-gate 
1552*0Sstevel@tonic-gate #undef M_TTYSTREAM		/* if it isn't possible to open a new console
1553*0Sstevel@tonic-gate 				 * stream through device names, define this
1554*0Sstevel@tonic-gate 				 * macro to be true. The support library must
1555*0Sstevel@tonic-gate 				 * define a routine "m_ttystream()" that can
1556*0Sstevel@tonic-gate 				 * return the required stream.
1557*0Sstevel@tonic-gate 				 */
1558*0Sstevel@tonic-gate 
1559*0Sstevel@tonic-gate #undef M_NOT_ROOT		/* this should be defined to be the name of a
1560*0Sstevel@tonic-gate 				 * library routine that returns true if the
1561*0Sstevel@tonic-gate 				 * process has appropriate privileges
1562*0Sstevel@tonic-gate 				 */
1563*0Sstevel@tonic-gate 
1564*0Sstevel@tonic-gate #undef M_NO_VI_KEYPAD		/* this should be defined when the system
1565*0Sstevel@tonic-gate 				 * can't support keypad and cursor-key
1566*0Sstevel@tonic-gate 				 * functions in vi.
1567*0Sstevel@tonic-gate 				 */
1568*0Sstevel@tonic-gate 
1569*0Sstevel@tonic-gate #undef M_USERID_FMT		/* format string for printing out the user
1570*0Sstevel@tonic-gate 				 * name. It is "%-8.8s" by default.
1571*0Sstevel@tonic-gate 				 */
1572*0Sstevel@tonic-gate 
1573*0Sstevel@tonic-gate #undef M_USE_M_CP		/* indicates that code is to use the m_cp()
1574*0Sstevel@tonic-gate 				 * interface.
1575*0Sstevel@tonic-gate 				 * (Note - this API is not fully supported
1576*0Sstevel@tonic-gate 				 *  in the IPSU.3.X development line.  Full
1577*0Sstevel@tonic-gate 				 *  support will be available in a future
1578*0Sstevel@tonic-gate 				 *  major release.)
1579*0Sstevel@tonic-gate 				 */
1580*0Sstevel@tonic-gate 
1581*0Sstevel@tonic-gate #undef M_GUESS_FILE_TYPE	/* If the system provides alternative
1582*0Sstevel@tonic-gate 				 * mechanisms for determining the type of a
1583*0Sstevel@tonic-gate 				 * file, define this macro to true.  If you are
1584*0Sstevel@tonic-gate 				 * using this feature, you must provide a new
1585*0Sstevel@tonic-gate 				 * function int m_guess_file_type(char *name);
1586*0Sstevel@tonic-gate 				 * Returns true if type of file name is
1587*0Sstevel@tonic-gate 				 * successfully identified.
1588*0Sstevel@tonic-gate 				 * (Note - this API is not fully supported in
1589*0Sstevel@tonic-gate 				 *  the IPSU.3.X development line.  Full
1590*0Sstevel@tonic-gate 				 *  support will be available in a future
1591*0Sstevel@tonic-gate 				 *  major release.)
1592*0Sstevel@tonic-gate 				 */
1593*0Sstevel@tonic-gate 
1594*0Sstevel@tonic-gate #undef M_INCR_NICE		/* default nice incr, if this macro is not
1595*0Sstevel@tonic-gate 				 * defined a builtin default will be used
1596*0Sstevel@tonic-gate 				 * (see the source for nice for more details.)
1597*0Sstevel@tonic-gate 				 */
1598*0Sstevel@tonic-gate 
1599*0Sstevel@tonic-gate #undef M_INCR_RENICE		/* default renice incr, if this macro is
1600*0Sstevel@tonic-gate 				 * not defined a builtin default will be
1601*0Sstevel@tonic-gate 				 * used (see the source for renice for more
1602*0Sstevel@tonic-gate 				 * details.)
1603*0Sstevel@tonic-gate 				 */
1604*0Sstevel@tonic-gate 
1605*0Sstevel@tonic-gate #undef M_PS_COMM_WIDTH		/* width of command field printed by PS */
1606*0Sstevel@tonic-gate 
1607*0Sstevel@tonic-gate #undef M_PS_USER_WIDTH		/* width of user and ruser fields printed by
1608*0Sstevel@tonic-gate 				 * PS
1609*0Sstevel@tonic-gate 				 */
1610*0Sstevel@tonic-gate 
1611*0Sstevel@tonic-gate #undef M_PS_PRI_WIDTH		/* width of PRI field printed by PS */
1612*0Sstevel@tonic-gate 
1613*0Sstevel@tonic-gate #undef M_UT_TIME_STRING		/* true if utmp ut_time struct is a string
1614*0Sstevel@tonic-gate 				 * instead of a number.
1615*0Sstevel@tonic-gate 				 */
1616*0Sstevel@tonic-gate 
1617*0Sstevel@tonic-gate #undef M_SH_ENTRY1
1618*0Sstevel@tonic-gate #undef M_SH_ENTRY2
1619*0Sstevel@tonic-gate #undef M_SH_ENTRY3
1620*0Sstevel@tonic-gate 				/* The above 3 macros are provide in the
1621*0Sstevel@tonic-gate 				 * shell to allow system-specific extensions
1622*0Sstevel@tonic-gate 				 * to be added.
1623*0Sstevel@tonic-gate 				 * (Note - this API is not fully supported in
1624*0Sstevel@tonic-gate 				 * the IPSU.3.X development line.  Full
1625*0Sstevel@tonic-gate 				 * support will be available in a future
1626*0Sstevel@tonic-gate 				 * major release.)
1627*0Sstevel@tonic-gate 				 */
1628*0Sstevel@tonic-gate 
1629*0Sstevel@tonic-gate #undef M_NO_CANONICAL_MODE	/* set this macro to true if the system
1630*0Sstevel@tonic-gate 				 * doesn't support tty buffering in
1631*0Sstevel@tonic-gate 				 * canonical mode.
1632*0Sstevel@tonic-gate 				 */
1633*0Sstevel@tonic-gate 
1634*0Sstevel@tonic-gate #undef M_NO_PASSWD_SCAN		/* true if system doesn't provide a
1635*0Sstevel@tonic-gate 				 * mechanism for scanning a list of all
1636*0Sstevel@tonic-gate 				 * users on the system.
1637*0Sstevel@tonic-gate 				 */
1638*0Sstevel@tonic-gate 
1639*0Sstevel@tonic-gate #define M_GROUP_PASSWD(grp)	""
1640*0Sstevel@tonic-gate 	/* prototype:
1641*0Sstevel@tonic-gate 	 *         char *M_GROUP_PASSWD(struct group *grp)
1642*0Sstevel@tonic-gate 	 * This api returns a pointer to a string
1643*0Sstevel@tonic-gate 	 * that contains the password for group 'grp'.
1644*0Sstevel@tonic-gate 	 * If no password is available, then an empty string should be
1645*0Sstevel@tonic-gate 	 * returned.
1646*0Sstevel@tonic-gate 	 *
1647*0Sstevel@tonic-gate 	 * On historical UNIX systems, group passwords are found in
1648*0Sstevel@tonic-gate 	 * the gr_passwd member in struct group.
1649*0Sstevel@tonic-gate 	 * Thus, this macro should be defined as
1650*0Sstevel@tonic-gate 	 *    #define M_GROUP_PASSWD(grp)	grp->gr_passwd
1651*0Sstevel@tonic-gate 	 *
1652*0Sstevel@tonic-gate 	 * On systems that do not provide group passwords,
1653*0Sstevel@tonic-gate 	 * then macro can be defined as an empty string:
1654*0Sstevel@tonic-gate 	 *    #define M_GROUP_PASSWD(grp)	""
1655*0Sstevel@tonic-gate 	 *
1656*0Sstevel@tonic-gate 	 */
1657*0Sstevel@tonic-gate 
1658*0Sstevel@tonic-gate 
1659*0Sstevel@tonic-gate #undef M_RCS_NORCSLIB 	/* Set this macro to true in order
1660*0Sstevel@tonic-gate 			 * remove rcslib dependency of utilities
1661*0Sstevel@tonic-gate 			 * such as ident.
1662*0Sstevel@tonic-gate 			 */
1663*0Sstevel@tonic-gate 
1664*0Sstevel@tonic-gate #undef M_CHMOD_LINK	/* Set this macro to true if the system is
1665*0Sstevel@tonic-gate 			 * able to perform a chmod() of a link as
1666*0Sstevel@tonic-gate 			 * opposed to following the link.
1667*0Sstevel@tonic-gate 			 */
1668*0Sstevel@tonic-gate /*
1669*0Sstevel@tonic-gate  * Include any system-specific prototypes here
1670*0Sstevel@tonic-gate  */
1671*0Sstevel@tonic-gate 
1672*0Sstevel@tonic-gate /*
1673*0Sstevel@tonic-gate  * Include any #define's to avoid name clashes with namespace polluting
1674*0Sstevel@tonic-gate  * operating system routines
1675*0Sstevel@tonic-gate  *
1676*0Sstevel@tonic-gate  * e.g.: #define openfile MKSopenfile
1677*0Sstevel@tonic-gate  */
1678*0Sstevel@tonic-gate 
1679