17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 237c478bd9Sstevel@tonic-gate * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate /* 287c478bd9Sstevel@tonic-gate * <mkslocal.h>, POSIX Version - local <mks.h> requirements 297c478bd9Sstevel@tonic-gate * 307c478bd9Sstevel@tonic-gate * This generic POSIX version should be used as a template for creation of 317c478bd9Sstevel@tonic-gate * any new <mkslocal.h> file. 327c478bd9Sstevel@tonic-gate * 337c478bd9Sstevel@tonic-gate * Copyright 1985, 1993 by Mortice Kern Systems Inc. All rights reserved. 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * $Header: /rd/h/posix/rcs/mkslocal.h 1.168 1995/06/21 20:33:29 jeffhe Exp mark $ 367c478bd9Sstevel@tonic-gate */ 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #if 0 /* not required for POSIX systems; here for documentation only */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #include <sys/types.h> 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate #ifndef VERSION 437c478bd9Sstevel@tonic-gate #define VERSION "MKS InterOpen I/XCU 4.3 SB" /* Used for version# */ 447c478bd9Sstevel@tonic-gate #endif 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate #define name-of-system 1 /* for identifying system (i.e. BSD, SYSV, 487c478bd9Sstevel@tonic-gate * DOS, etc) 497c478bd9Sstevel@tonic-gate */ 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate #ifndef __STDC__ 527c478bd9Sstevel@tonic-gate /* For non-ANSI C compilers, we need to define 537c478bd9Sstevel@tonic-gate * the character encoding for some special control characters 547c478bd9Sstevel@tonic-gate * If these are NOT defined here, then <mks.h> will use 557c478bd9Sstevel@tonic-gate * the ASCII encodings as the default values. 567c478bd9Sstevel@tonic-gate * 577c478bd9Sstevel@tonic-gate * For ANSI C compilers, there are special C character constants supported 587c478bd9Sstevel@tonic-gate * by the compiler. <mks.h> will properly handle this. 597c478bd9Sstevel@tonic-gate * 607c478bd9Sstevel@tonic-gate */ 617c478bd9Sstevel@tonic-gate #define M_ALERT '\7' /* ASCII encoding for \a */ 627c478bd9Sstevel@tonic-gate #define M_VTAB '\13' /* ASCII encoding for <VT> */ 637c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate /* M_ESCAPE - the system default character encoding for the <ESC> character 677c478bd9Sstevel@tonic-gate * If this is not defined here, then <mks.h> will 687c478bd9Sstevel@tonic-gate * default to use the ASCII encodings. 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate #define M_ESCAPE '\033' /* ASCII default code for <ESC> */ 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate #define SETVBUF(fp,bp,f,s) setvbuf(fp,f,bp,s) /* for some SysV and Xenix 737c478bd9Sstevel@tonic-gate * systems, which have unusual 747c478bd9Sstevel@tonic-gate * calling sequences 757c478bd9Sstevel@tonic-gate */ 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate #define M_DEFAULT_PATH "/bin:/usr/bin" 787c478bd9Sstevel@tonic-gate /* Default PATH. Not used yet. 797c478bd9Sstevel@tonic-gate */ 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate #define M_CS_PATH "/bin:/usr/bin" 837c478bd9Sstevel@tonic-gate /* This string is a list of directories where 847c478bd9Sstevel@tonic-gate * all the POSIX.2 utilities can be found. 857c478bd9Sstevel@tonic-gate * Returned by constr(_CS_PATH, buf, len). 867c478bd9Sstevel@tonic-gate * The shell uses this search path in 877c478bd9Sstevel@tonic-gate * command -p util ... 887c478bd9Sstevel@tonic-gate * The list plus "." is used by login 897c478bd9Sstevel@tonic-gate * and sh as the default $PATH. 907c478bd9Sstevel@tonic-gate */ 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate #define M_CS_SHELL "/bin/sh" 937c478bd9Sstevel@tonic-gate /* The pathname of the shell utility. 947c478bd9Sstevel@tonic-gate * Returned by confstr(_CS_SHELL, buf, len). 957c478bd9Sstevel@tonic-gate * This string defines the path to the 967c478bd9Sstevel@tonic-gate * the POSIX.2 command language interpreter, 977c478bd9Sstevel@tonic-gate * so we do not have to search M_CS_PATH. 987c478bd9Sstevel@tonic-gate */ 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate #define M_CS_BINDIR "/bin" 1017c478bd9Sstevel@tonic-gate #define M_CS_LIBDIR "/lib" 1027c478bd9Sstevel@tonic-gate #define M_CS_TMPDIR "/tmp" 1037c478bd9Sstevel@tonic-gate #define M_CS_ETCDIR "/etc" 1047c478bd9Sstevel@tonic-gate #define M_CS_SPOOLDIR "/spool" 1057c478bd9Sstevel@tonic-gate #define M_CS_NLSDIR "/lib/nls" 1067c478bd9Sstevel@tonic-gate #define M_CS_MANPATH "/man" 1077c478bd9Sstevel@tonic-gate /* the M_CS_* strings are used by MKS's version 1087c478bd9Sstevel@tonic-gate * of the POSIX.2 confstr() API. 1097c478bd9Sstevel@tonic-gate * The M_CS_*DIR strings point to system 1107c478bd9Sstevel@tonic-gate * default directories. 1117c478bd9Sstevel@tonic-gate * The M_CS_*PATH strings may be a list of 1127c478bd9Sstevel@tonic-gate * colon seperated system directories 1137c478bd9Sstevel@tonic-gate */ 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate #define M_BINDIR(path) "/bin/" # path 1177c478bd9Sstevel@tonic-gate /* M_BINDIR - directory where the POSIX.2 1187c478bd9Sstevel@tonic-gate * utilities live. (e.g ed, ...) 1197c478bd9Sstevel@tonic-gate */ 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate #define M_LIBDIR(path) M_CS_LIBDIR # path 1227c478bd9Sstevel@tonic-gate /* Define to convert a pathname relative to the 1237c478bd9Sstevel@tonic-gate * library directory to an absolute pathname. 1247c478bd9Sstevel@tonic-gate * Traditional systems would use "/usr/lib/" 1257c478bd9Sstevel@tonic-gate * <mks.h> should always be overridden. 1267c478bd9Sstevel@tonic-gate * 1277c478bd9Sstevel@tonic-gate * Used by bc, cron 1287c478bd9Sstevel@tonic-gate */ 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate #define M_ETCDIR(path) M_CS_ETCDIR # path 1317c478bd9Sstevel@tonic-gate /* Define to convert a pathname relative to the 1327c478bd9Sstevel@tonic-gate * etcetera directory to an absolute pathname. 1337c478bd9Sstevel@tonic-gate * Traditional systems would use "/etc/" 1347c478bd9Sstevel@tonic-gate * <mks.h> should always be overridden. 1357c478bd9Sstevel@tonic-gate * Used by file, vi, sh, ccg, lex, awk 1367c478bd9Sstevel@tonic-gate */ 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate #define M_SPOOLDIR(path) M_CS_SPOOLDIR # path 1397c478bd9Sstevel@tonic-gate /* Define to convert a pathname relative to the 1407c478bd9Sstevel@tonic-gate * spool directory to an absolute pathname. 1417c478bd9Sstevel@tonic-gate * Traditional systems would use "/usr/spool/" 1427c478bd9Sstevel@tonic-gate * <mks.h> should always be overridden. 1437c478bd9Sstevel@tonic-gate */ 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate #define M_NLSDIR(path) "M_CS_NLSDIR # path 1467c478bd9Sstevel@tonic-gate /* Directory name used by the locale program 1477c478bd9Sstevel@tonic-gate * to locate specific compiled locales. 1487c478bd9Sstevel@tonic-gate * Should always be set, if using the mks 1497c478bd9Sstevel@tonic-gate * supplied i18n package. Possible location 1507c478bd9Sstevel@tonic-gate * might be /usr/lib/nls. 1517c478bd9Sstevel@tonic-gate */ 1527c478bd9Sstevel@tonic-gate #define M_TMPDIR M_CS_TMPDIR /* Temporary file storage directory. 1537c478bd9Sstevel@tonic-gate * Used for P_tmpdir in case its not defined 1547c478bd9Sstevel@tonic-gate * in <stdio.h> 1557c478bd9Sstevel@tonic-gate */ 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate #define M_MANPATH M_CS_MANPATH 1587c478bd9Sstevel@tonic-gate /* a list of colon seperated pathnames 1597c478bd9Sstevel@tonic-gate * which the man utility uses 1607c478bd9Sstevel@tonic-gate * as the default search path 1617c478bd9Sstevel@tonic-gate * (e.g when MANPATH environment variable 1627c478bd9Sstevel@tonic-gate * not initialized. 1637c478bd9Sstevel@tonic-gate */ 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate #define M_SYSTEM_HELP "help.cmd"/* help command only: If the help command 1687c478bd9Sstevel@tonic-gate * doesn't know about a given request for help 1697c478bd9Sstevel@tonic-gate * then pass the help request on to another 1707c478bd9Sstevel@tonic-gate * help program. Note that if the name for 1717c478bd9Sstevel@tonic-gate * the other is also help, there must be 1727c478bd9Sstevel@tonic-gate * some form of name qualification. No attempt 1737c478bd9Sstevel@tonic-gate * will be made if this is not defined. 1747c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined 1757c478bd9Sstevel@tonic-gate */ 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate #define DEF_NLSPATH "/lib/nls/locale/%L/%N.cat" 1787c478bd9Sstevel@tonic-gate /* define the default path that should be used 1797c478bd9Sstevel@tonic-gate * by MKS's implementation of catopen() when 1807c478bd9Sstevel@tonic-gate * trying to open the message cataloges 1817c478bd9Sstevel@tonic-gate * If you are not using MKS's implementation 1827c478bd9Sstevel@tonic-gate * of catopen(), then this definition 1837c478bd9Sstevel@tonic-gate * is not required. 1847c478bd9Sstevel@tonic-gate */ 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gate #define M_ENDPWENT 1 /* set to 1 if system provides a endpwent() 1877c478bd9Sstevel@tonic-gate * routine. 1887c478bd9Sstevel@tonic-gate * Normally, systems provide this routine 1897c478bd9Sstevel@tonic-gate * only if getpw*() routines allocate 1907c478bd9Sstevel@tonic-gate * some resources which a user may want 1917c478bd9Sstevel@tonic-gate * to deallocate when finished accessing the 1927c478bd9Sstevel@tonic-gate * user getpw*() routines 1937c478bd9Sstevel@tonic-gate * This is the case for conventional 1947c478bd9Sstevel@tonic-gate * UNIX systems 1957c478bd9Sstevel@tonic-gate */ 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate #undef M_SHBLTIN_ANYCMD /* set to 1 if you want ability to create an 1987c478bd9Sstevel@tonic-gate * executable with any name, using shbltin.c. 1997c478bd9Sstevel@tonic-gate * [ shbltin.c was created to satisfy 2007c478bd9Sstevel@tonic-gate * POSIX.2-1992 Section 2.3 "regular built-in 2017c478bd9Sstevel@tonic-gate * utilities". ] 2027c478bd9Sstevel@tonic-gate * If this is undefined, then the only valid 2037c478bd9Sstevel@tonic-gate * command names are those listed in an 2047c478bd9Sstevel@tonic-gate * internal table in shbltin.c which are 2057c478bd9Sstevel@tonic-gate * are checked at run-time against 2067c478bd9Sstevel@tonic-gate * basename(argv[0]). 2077c478bd9Sstevel@tonic-gate * If the command name is not listed in the 2087c478bd9Sstevel@tonic-gate * table, then program will exit 2097c478bd9Sstevel@tonic-gate * with an error message. 2107c478bd9Sstevel@tonic-gate * 2117c478bd9Sstevel@tonic-gate * Normally, this is undefined, since 2127c478bd9Sstevel@tonic-gate * it becomes too easy to get into an infinite 2137c478bd9Sstevel@tonic-gate * loop if you name this executable to a 2147c478bd9Sstevel@tonic-gate * non-bltin command. 2157c478bd9Sstevel@tonic-gate */ 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate /* shbltin: 2187c478bd9Sstevel@tonic-gate * shbltin.c is configurable but its configuration is done 2197c478bd9Sstevel@tonic-gate * in mkslocal.mk. 2207c478bd9Sstevel@tonic-gate * See M_SHBLTIN_ULIMIT 2217c478bd9Sstevel@tonic-gate * See M_SHBLTIN_HASH 2227c478bd9Sstevel@tonic-gate * See M_SHBLTIN_TYPE 2237c478bd9Sstevel@tonic-gate * See M_SHBLTIN_XPG4 2247c478bd9Sstevel@tonic-gate */ 2257c478bd9Sstevel@tonic-gate 2267c478bd9Sstevel@tonic-gate #undef M_FNMATCH_DUALCASE /* fnmatch(): If this #define is set, then 2277c478bd9Sstevel@tonic-gate * fnmatch will ignore case in file name 2287c478bd9Sstevel@tonic-gate * matches *unless* the environment variable 2297c478bd9Sstevel@tonic-gate * at runtime has DUALCASE set. 2307c478bd9Sstevel@tonic-gate * For a conforming system, this should *not* 2317c478bd9Sstevel@tonic-gate * be defined. <mks.h> will default to 2327c478bd9Sstevel@tonic-gate * undefined. 2337c478bd9Sstevel@tonic-gate */ 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate #undef M_SMALLSTACK /* Define this to 1 on systems that have 2367c478bd9Sstevel@tonic-gate * a fixed size stack compiled into programs, 2377c478bd9Sstevel@tonic-gate * and a small (probably 64k) data segment. 2387c478bd9Sstevel@tonic-gate */ 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate #undef M_NULL /* define this if you want to change the 2417c478bd9Sstevel@tonic-gate * system default defintion of NULL. 2427c478bd9Sstevel@tonic-gate * (e.g #define M_NULL ((void*)0) 2437c478bd9Sstevel@tonic-gate */ 2447c478bd9Sstevel@tonic-gate #define M_MALLOC 1 /* Define M_MALLOC if your system has either 2457c478bd9Sstevel@tonic-gate * of the following two problems: 2467c478bd9Sstevel@tonic-gate * 1) ANSI does not specify returning a valid 2477c478bd9Sstevel@tonic-gate * errno if malloc() returns NULL. 2487c478bd9Sstevel@tonic-gate * But, MKS code assumes a valid errno 2497c478bd9Sstevel@tonic-gate * as is returned in most UNIX systems. 2507c478bd9Sstevel@tonic-gate * 2) ANSI says it is implementation defined 2517c478bd9Sstevel@tonic-gate * whether or not malloc(0) returns a valid 2527c478bd9Sstevel@tonic-gate * pointer. 2537c478bd9Sstevel@tonic-gate * MKS code assumes that a valid pointer 2547c478bd9Sstevel@tonic-gate * is returned. 2557c478bd9Sstevel@tonic-gate * 2567c478bd9Sstevel@tonic-gate * Defining M_MALLOC requires an m_malloc() 2577c478bd9Sstevel@tonic-gate * function, which MKS provides. 2587c478bd9Sstevel@tonic-gate * Undefining M_MALLOC causes m_malloc() to be 2597c478bd9Sstevel@tonic-gate * renamed to malloc(). (See mks.h) 2607c478bd9Sstevel@tonic-gate */ 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gate #define M_REALLOC 1 /* Defining M_REALLOC will cause 2637c478bd9Sstevel@tonic-gate * m_realloc() to be used in place of the 2647c478bd9Sstevel@tonic-gate * systems realloc(). 2657c478bd9Sstevel@tonic-gate * This is necessary: 2667c478bd9Sstevel@tonic-gate * a) if you do not have an ANSI realloc() 2677c478bd9Sstevel@tonic-gate * b) if the system realloc() 2687c478bd9Sstevel@tonic-gate * has the following problem: 2697c478bd9Sstevel@tonic-gate * - ANSI does not specify returning a valid 2707c478bd9Sstevel@tonic-gate * errno if malloc() returns NULL. 2717c478bd9Sstevel@tonic-gate * But, MKS code assumes a valid errno 2727c478bd9Sstevel@tonic-gate * as is returned in most UNIX systems. 2737c478bd9Sstevel@tonic-gate * 2747c478bd9Sstevel@tonic-gate * Defining M_REALLOC requires an m_realloc() 2757c478bd9Sstevel@tonic-gate * function, which MKS provides. 2767c478bd9Sstevel@tonic-gate * Undefining M_MALLOC causes m_malloc() to be 2777c478bd9Sstevel@tonic-gate * renamed to malloc(). (See mks.h) 2787c478bd9Sstevel@tonic-gate */ 2797c478bd9Sstevel@tonic-gate #ifdef M_REALLOC 2807c478bd9Sstevel@tonic-gate #define M_WANT_ANSI_REALLOC 1 /* Use #undef M_WANT_ANSI_REALLOC 2817c478bd9Sstevel@tonic-gate * if your system has an ANSI realloc() function 2827c478bd9Sstevel@tonic-gate * 2837c478bd9Sstevel@tonic-gate * Defining M_WANT_ANSI_REALLOC can only be 2847c478bd9Sstevel@tonic-gate * done if M_REALLOC is also defined. 2857c478bd9Sstevel@tonic-gate * Use M_WANT_ANSI_REALLOC if your system 2867c478bd9Sstevel@tonic-gate * does not support either of the following 2877c478bd9Sstevel@tonic-gate * 2 features: 2887c478bd9Sstevel@tonic-gate * 2897c478bd9Sstevel@tonic-gate * 1) ANSI says that if the ptr passed to 2907c478bd9Sstevel@tonic-gate * realloc is NULL, then it will act like 2917c478bd9Sstevel@tonic-gate * a malloc() 2927c478bd9Sstevel@tonic-gate * 2) ANSI says that if the ptr passed is 2937c478bd9Sstevel@tonic-gate * not NULL and the size is 0, then the 2947c478bd9Sstevel@tonic-gate * object that ptr points to is freed. 2957c478bd9Sstevel@tonic-gate * 2967c478bd9Sstevel@tonic-gate * Defining M_REALLOC requires an m_realloc() 2977c478bd9Sstevel@tonic-gate * function, which MKS provides. 2987c478bd9Sstevel@tonic-gate * Undefining M_MALLOC causes m_realloc() to be 2997c478bd9Sstevel@tonic-gate * renamed to realloc(). (See mks.h) 3007c478bd9Sstevel@tonic-gate */ 3017c478bd9Sstevel@tonic-gate #endif /* M_REALLOC */ 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate 3047c478bd9Sstevel@tonic-gate #define M_MAXMALLOC 64 /* Define the maximum number of kilobytes (K) 3057c478bd9Sstevel@tonic-gate * that can be requested from malloc(). 3067c478bd9Sstevel@tonic-gate * This is intended for segmented systems 3077c478bd9Sstevel@tonic-gate * where max allocation by malloc() is smaller 3087c478bd9Sstevel@tonic-gate * than the total mallocable memory; 3097c478bd9Sstevel@tonic-gate * some programs will assume they can do 3107c478bd9Sstevel@tonic-gate * multiple mallocs of this # of K to allocate 3117c478bd9Sstevel@tonic-gate * a large data structure. 3127c478bd9Sstevel@tonic-gate * By default, this is not defined; malloc can 3137c478bd9Sstevel@tonic-gate * allocate up to MAX_INT bytes. 3147c478bd9Sstevel@tonic-gate */ 3157c478bd9Sstevel@tonic-gate 3167c478bd9Sstevel@tonic-gate #define __LDATA__ 1 /* DEPRECATED */ 3177c478bd9Sstevel@tonic-gate #define M_LDATA 1 /* For most modern systems this will be set. 3187c478bd9Sstevel@tonic-gate * Some systems (e.g DOS) have a large and 3197c478bd9Sstevel@tonic-gate * small program model. 3207c478bd9Sstevel@tonic-gate * Thus, various programs have two buffer sizes 3217c478bd9Sstevel@tonic-gate * built into them -- large and small. The 3227c478bd9Sstevel@tonic-gate * small buffer size is normally sub-optimal, 3237c478bd9Sstevel@tonic-gate * but permits the data to fit in the small 3247c478bd9Sstevel@tonic-gate * buffer (say 64k) 3257c478bd9Sstevel@tonic-gate */ 3267c478bd9Sstevel@tonic-gate 3277c478bd9Sstevel@tonic-gate #ifndef PATH_MAX 3287c478bd9Sstevel@tonic-gate #define M_PATH_MAX 2048 /* For systems where pathconf(file,_PC_PATH_MAX) 3297c478bd9Sstevel@tonic-gate * can return -1 and NOT set errno 3307c478bd9Sstevel@tonic-gate * (which means that PATH_MAX for 'file' 3317c478bd9Sstevel@tonic-gate * is unlimited), 3327c478bd9Sstevel@tonic-gate * we provide a suitable LARGE value 3337c478bd9Sstevel@tonic-gate * that can be returned by m_pathmax(). 3347c478bd9Sstevel@tonic-gate * This number should be sufficiently large 3357c478bd9Sstevel@tonic-gate * to handle most (if not all) reasonable 3367c478bd9Sstevel@tonic-gate * pathnames for a particular system. 3377c478bd9Sstevel@tonic-gate * m_pathmax() is usually used to determine 3387c478bd9Sstevel@tonic-gate * how large a buffer must be allocated to store 3397c478bd9Sstevel@tonic-gate * pathnames. 3407c478bd9Sstevel@tonic-gate */ 3417c478bd9Sstevel@tonic-gate #endif /* PATH_MAX */ 3427c478bd9Sstevel@tonic-gate 3437c478bd9Sstevel@tonic-gate #define M_EXPTIME 1 /* For systems whose files maintain an 3447c478bd9Sstevel@tonic-gate * additional time field, generally expiry time. 3457c478bd9Sstevel@tonic-gate * The stat structure must have a member 3467c478bd9Sstevel@tonic-gate * st_etime and the utimbuf a member exptime. 3477c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined. 3487c478bd9Sstevel@tonic-gate */ 3497c478bd9Sstevel@tonic-gate 3507c478bd9Sstevel@tonic-gate #undef ROOTGID 3517c478bd9Sstevel@tonic-gate #undef ROOTUID /* Some systems may use a different user id 3527c478bd9Sstevel@tonic-gate * to indicate the superuser. 3537c478bd9Sstevel@tonic-gate * If it is not defined here, then <mks.h> 3547c478bd9Sstevel@tonic-gate * will define it to be 0 which is the 3557c478bd9Sstevel@tonic-gate * value used in conventional UNIX. 3567c478bd9Sstevel@tonic-gate */ 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate #define M_AUDIT 1 /* For systems which maintain file auditing 3597c478bd9Sstevel@tonic-gate * information. M_AUDITW1 and M_AUDITW2 must 3607c478bd9Sstevel@tonic-gate * be defined, and return one or two audit 3617c478bd9Sstevel@tonic-gate * words from the stat structure. m_audmode 3627c478bd9Sstevel@tonic-gate * must be defined in the local libraries 3637c478bd9Sstevel@tonic-gate * to convert from these two words, to ls style 3647c478bd9Sstevel@tonic-gate * letter information. <mks.h> will default to 3657c478bd9Sstevel@tonic-gate * undefined. 3667c478bd9Sstevel@tonic-gate */ 3677c478bd9Sstevel@tonic-gate #define M_AUDITW1(sbp) ? /* Fetch first audit word from stat pointer, 3687c478bd9Sstevel@tonic-gate * if M_AUDIT defined. 3697c478bd9Sstevel@tonic-gate */ 3707c478bd9Sstevel@tonic-gate #define M_AUDITW2(sbp) ? /* Fetch second audit word from stat pointer, 3717c478bd9Sstevel@tonic-gate * if M_AUDIT defined. Define as `0' if no 3727c478bd9Sstevel@tonic-gate * second audit word. 3737c478bd9Sstevel@tonic-gate */ 3747c478bd9Sstevel@tonic-gate 3757c478bd9Sstevel@tonic-gate #undef M_DEVIO /* use #define M_DEVIO 1 on systems that 3767c478bd9Sstevel@tonic-gate * requires special interfaces 3777c478bd9Sstevel@tonic-gate * to perform I/O on devices. 3787c478bd9Sstevel@tonic-gate * (e.g cannot use the standard open,read,write 3797c478bd9Sstevel@tonic-gate * interface) 3807c478bd9Sstevel@tonic-gate * See <devio.h> for details on this 3817c478bd9Sstevel@tonic-gate * special interface. 3827c478bd9Sstevel@tonic-gate * Default is undefined; no special device i/o 3837c478bd9Sstevel@tonic-gate * interface is used. 3847c478bd9Sstevel@tonic-gate */ 3857c478bd9Sstevel@tonic-gate 3867c478bd9Sstevel@tonic-gate #undef M_DEVBIN /* Use #define M_DEVBIN 1 3877c478bd9Sstevel@tonic-gate * on systems that have devices that do not 3887c478bd9Sstevel@tonic-gate * allow raw I/O be written directly 3897c478bd9Sstevel@tonic-gate * to the device. 3907c478bd9Sstevel@tonic-gate * These systems tend to process the data 3917c478bd9Sstevel@tonic-gate * before actually writing the data to the 3927c478bd9Sstevel@tonic-gate * device. 3937c478bd9Sstevel@tonic-gate * (e.g DOS disk devices do some character 3947c478bd9Sstevel@tonic-gate * translations. This routine is intended 3957c478bd9Sstevel@tonic-gate * to disable this behaviour.) 3967c478bd9Sstevel@tonic-gate * The definition of m_devbin() and m_devstd() 3977c478bd9Sstevel@tonic-gate * is done in <mks.h>. 3987c478bd9Sstevel@tonic-gate * If this is defined, then <mks.h> defines 3997c478bd9Sstevel@tonic-gate * the prototypes m_devbin() and m_devstd() 4007c478bd9Sstevel@tonic-gate * Otherwise it undefines m_devstd() 4017c478bd9Sstevel@tonic-gate * and set m_devbin to return a dummy value of 0 4027c478bd9Sstevel@tonic-gate * 4037c478bd9Sstevel@tonic-gate * MKS has selected some utilities 4047c478bd9Sstevel@tonic-gate * to recognize this fact and to handle 4057c478bd9Sstevel@tonic-gate * these I/O cases specially. 4067c478bd9Sstevel@tonic-gate * Such utilities include cp, mv, and pax 4077c478bd9Sstevel@tonic-gate */ 4087c478bd9Sstevel@tonic-gate 4097c478bd9Sstevel@tonic-gate #define M_SETENV 1 /* Some systems require special preparation */ 4107c478bd9Sstevel@tonic-gate char **m_setenv ANSI((void));/* for use of the environment variables via 4117c478bd9Sstevel@tonic-gate * environ; m_setenv call makes sure that 4127c478bd9Sstevel@tonic-gate * environ is set up. <mks.h> will default to 4137c478bd9Sstevel@tonic-gate * m_setenv returning environ. M_SETENV 4147c478bd9Sstevel@tonic-gate * must be set to indicate to mks.h that a C 4157c478bd9Sstevel@tonic-gate * function has been defined. 4167c478bd9Sstevel@tonic-gate */ 4177c478bd9Sstevel@tonic-gate 4187c478bd9Sstevel@tonic-gate #define m_setbinary(fp) /* On systems supporting text and binary files, 4197c478bd9Sstevel@tonic-gate * (i.e. "rb" and "wb" to fopen work different 4207c478bd9Sstevel@tonic-gate * from "r" and "w"), there is a requirement 4217c478bd9Sstevel@tonic-gate * to be able to set stdin/stdout to binary 4227c478bd9Sstevel@tonic-gate * mode. m_setbinary on such systems should 4237c478bd9Sstevel@tonic-gate * perform this action. On other systems, this 4247c478bd9Sstevel@tonic-gate * macro should define itself out of existence. 4257c478bd9Sstevel@tonic-gate * Normally this macro would be defined in 4267c478bd9Sstevel@tonic-gate * <stdio.h>. <mks.h> defaults to defining 4277c478bd9Sstevel@tonic-gate * it out of existence, if not defined. 4287c478bd9Sstevel@tonic-gate */ 4297c478bd9Sstevel@tonic-gate 4307c478bd9Sstevel@tonic-gate #define M_TFGETC 0 /* Do we have POSIX.1-deficient termios? 4317c478bd9Sstevel@tonic-gate * On POSIX.1 or SVID compliant systems, 4327c478bd9Sstevel@tonic-gate * define it as 0 and mks.h will 4337c478bd9Sstevel@tonic-gate * map m_tfgetc(fp,tp) to fgetc(fp). 4347c478bd9Sstevel@tonic-gate * On deficient systems (e.g. BSD), 4357c478bd9Sstevel@tonic-gate * define it as 1 and ensure a m_tfgetc() 4367c478bd9Sstevel@tonic-gate * routine is provided. 4377c478bd9Sstevel@tonic-gate */ 4387c478bd9Sstevel@tonic-gate 4397c478bd9Sstevel@tonic-gate #define M_STTY_CC 1 /* The stty command control-character setting 4407c478bd9Sstevel@tonic-gate * is very system specific. The default code 4417c478bd9Sstevel@tonic-gate * in stty.c works only for the ascii character 4427c478bd9Sstevel@tonic-gate * set. <mks.h> will default to M_STTY_CC 4437c478bd9Sstevel@tonic-gate * being undefined, resulting using the default 4447c478bd9Sstevel@tonic-gate * code. arg is the string passed to stty; *cp 4457c478bd9Sstevel@tonic-gate * should have the resulting value stored in it. 4467c478bd9Sstevel@tonic-gate * A 0 return value indicates success; other- 4477c478bd9Sstevel@tonic-gate * wise an error message will be printed. 4487c478bd9Sstevel@tonic-gate */ 4497c478bd9Sstevel@tonic-gate 4507c478bd9Sstevel@tonic-gate #define M_LOGIN_GETTY 1 /* Use #define M_LOGIN_GETTY 1 4517c478bd9Sstevel@tonic-gate * on systems that do not provide a 4527c478bd9Sstevel@tonic-gate * getty utility. 4537c478bd9Sstevel@tonic-gate * This is for use in the login utility to 4547c478bd9Sstevel@tonic-gate * display a banner that would conventionally 4557c478bd9Sstevel@tonic-gate * be displayed by the UNIX getty utility 4567c478bd9Sstevel@tonic-gate * that would have run before login. 4577c478bd9Sstevel@tonic-gate * If M_LOGIN_GETTY is not defined here, 4587c478bd9Sstevel@tonic-gate * then login will not print this banner info. 4597c478bd9Sstevel@tonic-gate */ 4607c478bd9Sstevel@tonic-gate 4617c478bd9Sstevel@tonic-gate #define M_MANPAGER "more -A -s" 4627c478bd9Sstevel@tonic-gate /* default command that is executed 4637c478bd9Sstevel@tonic-gate * by the man utility to display a man page 4647c478bd9Sstevel@tonic-gate * when the user's PAGER environment 4657c478bd9Sstevel@tonic-gate * variable is not set. 4667c478bd9Sstevel@tonic-gate */ 4677c478bd9Sstevel@tonic-gate 4687c478bd9Sstevel@tonic-gate #define M_TTYGROUP "tty" /* Name of the group that owns tty's. 4697c478bd9Sstevel@tonic-gate * If this isn't defined, then <mks.h> 4707c478bd9Sstevel@tonic-gate * will leave it undefined. 4717c478bd9Sstevel@tonic-gate * This is related to the MKS default 4727c478bd9Sstevel@tonic-gate * access enforcment policy for use 4737c478bd9Sstevel@tonic-gate * by m_wallow(), mesg, talk, and write. 4747c478bd9Sstevel@tonic-gate * If undefined, it is assumed that no security 4757c478bd9Sstevel@tonic-gate * is available on tty's. 4767c478bd9Sstevel@tonic-gate */ 4777c478bd9Sstevel@tonic-gate 4787c478bd9Sstevel@tonic-gate #undef M_CONSOLE /* This is defined to indicate that a pc 4797c478bd9Sstevel@tonic-gate * style console is used instead of a tty. 4807c478bd9Sstevel@tonic-gate * This allows for the elimination of 4817c478bd9Sstevel@tonic-gate * unnecessary calls to m_wallow() from 4827c478bd9Sstevel@tonic-gate * pc compiles. 4837c478bd9Sstevel@tonic-gate * Default is undef; m_wallow calls are made. 4847c478bd9Sstevel@tonic-gate */ 4857c478bd9Sstevel@tonic-gate 4867c478bd9Sstevel@tonic-gate #define M_LKSUFFIX ".lock" /* Suffix for lock file used by mailx and 4877c478bd9Sstevel@tonic-gate * tsmail (name of mailbox to be locked 4887c478bd9Sstevel@tonic-gate * is the prefix). ".lock" is typically 4897c478bd9Sstevel@tonic-gate * used by UNIX sendmail. This should be 4907c478bd9Sstevel@tonic-gate * set to the same suffix as used by other 4917c478bd9Sstevel@tonic-gate * mail agents on the machine. 4927c478bd9Sstevel@tonic-gate */ 4937c478bd9Sstevel@tonic-gate 4947c478bd9Sstevel@tonic-gate #define M_LS_OPT_D 1 /* ls command: Support -D (list only dirs) 4957c478bd9Sstevel@tonic-gate * This option is non-standard on any unix 4967c478bd9Sstevel@tonic-gate * system, so is only an option. 4977c478bd9Sstevel@tonic-gate * Default is not defined, so ls doesn't support 4987c478bd9Sstevel@tonic-gate * this option. 4997c478bd9Sstevel@tonic-gate */ 5007c478bd9Sstevel@tonic-gate 5017c478bd9Sstevel@tonic-gate #define M_LOGGER_OPTIONS (log_pid|log_user) 5027c478bd9Sstevel@tonic-gate /* Set up default options for the logger utility 5037c478bd9Sstevel@tonic-gate * The logger utility allows the log lines to 5047c478bd9Sstevel@tonic-gate * be prefixed by pid, ppid, a timestamp, 5057c478bd9Sstevel@tonic-gate * and/or the login username. 5067c478bd9Sstevel@tonic-gate * If an implementation wishes to 5077c478bd9Sstevel@tonic-gate * force some of these prefixes then it 5087c478bd9Sstevel@tonic-gate * should OR together one or more of the 5097c478bd9Sstevel@tonic-gate * appropriate constants: 5107c478bd9Sstevel@tonic-gate * log_pid 5117c478bd9Sstevel@tonic-gate * log_ppid 5127c478bd9Sstevel@tonic-gate * log_timestamp 5137c478bd9Sstevel@tonic-gate * log_user 5147c478bd9Sstevel@tonic-gate * If M_LOGGER_OPTIONS is not defined here then 5157c478bd9Sstevel@tonic-gate * logger.c uses the default: 5167c478bd9Sstevel@tonic-gate * (log_pid|log_user). 5177c478bd9Sstevel@tonic-gate */ 5187c478bd9Sstevel@tonic-gate 5197c478bd9Sstevel@tonic-gate #define M_LOGGER_CONSOLE "/dev/console" 5207c478bd9Sstevel@tonic-gate /* logger command: If you wish to use the 5217c478bd9Sstevel@tonic-gate * default, trivial, logging routines, then 5227c478bd9Sstevel@tonic-gate * define M_LOGGER_CONSOLE to the name of 5237c478bd9Sstevel@tonic-gate * a device or file, to which logger may 5247c478bd9Sstevel@tonic-gate * append the log messages. 5257c478bd9Sstevel@tonic-gate * If this variable is *not* defined, then 5267c478bd9Sstevel@tonic-gate * the local system must have m_logger, and 5277c478bd9Sstevel@tonic-gate * m_logger_close defined and retrieve 5287c478bd9Sstevel@tonic-gate * either by the make process, or in the 5297c478bd9Sstevel@tonic-gate * libraries. See the documentation for 5307c478bd9Sstevel@tonic-gate * the calling sequence of these routines. 5317c478bd9Sstevel@tonic-gate */ 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate #undef M_COMPRESSION_AVAIL /* 5347c478bd9Sstevel@tonic-gate * Not defining M_COMPRESSION_AVAIL indicates 5357c478bd9Sstevel@tonic-gate * that the compression libary code is not 5367c478bd9Sstevel@tonic-gate * available. 5377c478bd9Sstevel@tonic-gate * Changing the #undef to #define should only 5387c478bd9Sstevel@tonic-gate * be done if the code in libc/mks/m_comp.c 5397c478bd9Sstevel@tonic-gate * is implemented. 5407c478bd9Sstevel@tonic-gate * 5417c478bd9Sstevel@tonic-gate * Because UNiSYS holds the patent on the 5427c478bd9Sstevel@tonic-gate * adaptive Lempel-Ziv compression algorithm, 5437c478bd9Sstevel@tonic-gate * MKS may not provide the compression 5447c478bd9Sstevel@tonic-gate * source code (see libc/mks/m_comp.c) 5457c478bd9Sstevel@tonic-gate * in which case the -z option in pax/tar/cpio 5467c478bd9Sstevel@tonic-gate * must be disabled. 5477c478bd9Sstevel@tonic-gate * If the compression algorithm is implemented 5487c478bd9Sstevel@tonic-gate * in m_comp.c, then this macro can be defined. 5497c478bd9Sstevel@tonic-gate */ 5507c478bd9Sstevel@tonic-gate 5517c478bd9Sstevel@tonic-gate #define M_TAR_TAPENAME "/dev/mt/%c%c" 5527c478bd9Sstevel@tonic-gate /* Set up default file name that the pax/tar 5537c478bd9Sstevel@tonic-gate * utilities will use (e.g when 'f' option 5547c478bd9Sstevel@tonic-gate * not specified) 5557c478bd9Sstevel@tonic-gate * This file name is usually a tape device name 5567c478bd9Sstevel@tonic-gate * Two %c's field specifiers can be included 5577c478bd9Sstevel@tonic-gate * in the file name; 5587c478bd9Sstevel@tonic-gate * the first is replaced with tapenumber, 5597c478bd9Sstevel@tonic-gate * the 2nd with tape density 5607c478bd9Sstevel@tonic-gate * (l, m, or h, for low, medium or high). 5617c478bd9Sstevel@tonic-gate * If you either don't have multiple 5627c478bd9Sstevel@tonic-gate * tapes, or densities, you can leave off extra 5637c478bd9Sstevel@tonic-gate * %c's. 5647c478bd9Sstevel@tonic-gate * 5657c478bd9Sstevel@tonic-gate * If this is not defined then pax/tar.h 5667c478bd9Sstevel@tonic-gate * will use "/dev/mt/%c%c" 5677c478bd9Sstevel@tonic-gate */ 5687c478bd9Sstevel@tonic-gate 5697c478bd9Sstevel@tonic-gate #undef M_GUNZIP /* When defined, m_dc_open() will test for 5707c478bd9Sstevel@tonic-gate * gzip-compressed files, and call the 5717c478bd9Sstevel@tonic-gate * appropriate routines to uncompress them, 5727c478bd9Sstevel@tonic-gate * in addition the normal operation of testing 5737c478bd9Sstevel@tonic-gate * for compress-compressed files. 5747c478bd9Sstevel@tonic-gate */ 5757c478bd9Sstevel@tonic-gate 5767c478bd9Sstevel@tonic-gate #undef M_VI_NO_RECOVER /* vi command: when defined will not include the 5777c478bd9Sstevel@tonic-gate * :preserve and :recover commands. 5787c478bd9Sstevel@tonic-gate */ 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gate #define M_VI_COPYRIGHT 1 /* vi command: When sold as a separate product, 5817c478bd9Sstevel@tonic-gate * vi prints a copyright notice. This flag 5827c478bd9Sstevel@tonic-gate * causes the notice to be printed. Default is 5837c478bd9Sstevel@tonic-gate * not defined, which causes vi to NOT print 5847c478bd9Sstevel@tonic-gate * the copyright notice. 5857c478bd9Sstevel@tonic-gate */ 5867c478bd9Sstevel@tonic-gate 5877c478bd9Sstevel@tonic-gate #define M_MAKEOS "OS:=POSIX" /*for $(OS) in "make" */ 5887c478bd9Sstevel@tonic-gate /* make command: builtin rule which defines the 5897c478bd9Sstevel@tonic-gate * $(OS) variable expansion. 5907c478bd9Sstevel@tonic-gate * Default is not defined, which is an error. 5917c478bd9Sstevel@tonic-gate */ 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gate #undef M_MAKE_EXIT_DIRECT /* If this is defined, make will call exit() 5947c478bd9Sstevel@tonic-gate * directly when it receives a signal, rather 5957c478bd9Sstevel@tonic-gate * than clearing the handler and re-sending 5967c478bd9Sstevel@tonic-gate * itself the signal. For 1003.2 conformance, 5977c478bd9Sstevel@tonic-gate * this must not be defined. 5987c478bd9Sstevel@tonic-gate */ 5997c478bd9Sstevel@tonic-gate 6007c478bd9Sstevel@tonic-gate #define M_MAKEFILES ".MAKEFILES:makefile Makefile" 6017c478bd9Sstevel@tonic-gate /* rule that make uses when trying to locate 6027c478bd9Sstevel@tonic-gate * the default makefile to run 6037c478bd9Sstevel@tonic-gate */ 6047c478bd9Sstevel@tonic-gate 6057c478bd9Sstevel@tonic-gate #define M_MAKEDIRSEPSTR "/" /* Default string of characters that make 6067c478bd9Sstevel@tonic-gate * will look at and use when manipulating 6077c478bd9Sstevel@tonic-gate * path names. 6087c478bd9Sstevel@tonic-gate */ 6097c478bd9Sstevel@tonic-gate #define M_GETSWITCHAR '-' /* Default character used to indicate an 6107c478bd9Sstevel@tonic-gate * option to a command. Note - on some 6117c478bd9Sstevel@tonic-gate * systems, this may actually be a system-call 6127c478bd9Sstevel@tonic-gate * instead of a constant. As a consequence 6137c478bd9Sstevel@tonic-gate * this define should not be used as a 6147c478bd9Sstevel@tonic-gate * global initializer. 6157c478bd9Sstevel@tonic-gate */ 6167c478bd9Sstevel@tonic-gate #define M_MAKE_BUFFER_SIZE 8192 /* max line length handled by make parser */ 6177c478bd9Sstevel@tonic-gate #define M_MAKE_STRING_SIZE 8192 /* make macro expansion max string size */ 6187c478bd9Sstevel@tonic-gate #define M_MAKE_PATSUB_SIZE 1024 /* make pattern/substitution max string size */ 6197c478bd9Sstevel@tonic-gate 6207c478bd9Sstevel@tonic-gate #define M_FLDSEP ':' /* The field separator character used in 6217c478bd9Sstevel@tonic-gate * the PATH environment variable (for sh), 6227c478bd9Sstevel@tonic-gate * and for the entries in the group database 6237c478bd9Sstevel@tonic-gate * (e.g /etc/group) and the user database 6247c478bd9Sstevel@tonic-gate * (e.g /etc/passwd) files. 6257c478bd9Sstevel@tonic-gate * If this is not defined here, then <mks.h> 6267c478bd9Sstevel@tonic-gate * will default to ':'. 6277c478bd9Sstevel@tonic-gate */ 6287c478bd9Sstevel@tonic-gate 6297c478bd9Sstevel@tonic-gate #undef M_TEXT_CR /* Some systems use <cr><lf> pairs rather than 6307c478bd9Sstevel@tonic-gate * simple <lf>s to delimit text lines. On 6317c478bd9Sstevel@tonic-gate * these systems, this should be defined. 6327c478bd9Sstevel@tonic-gate * Default is undefined. 6337c478bd9Sstevel@tonic-gate */ 6347c478bd9Sstevel@tonic-gate 6357c478bd9Sstevel@tonic-gate #define M_FPPSLOW 1 /* This should be defined for systems whose 6367c478bd9Sstevel@tonic-gate * floating point operations 6377c478bd9Sstevel@tonic-gate * are slower than integral operations. 6387c478bd9Sstevel@tonic-gate * If this in undefined, the assumption will 6397c478bd9Sstevel@tonic-gate * be fast floating point. 6407c478bd9Sstevel@tonic-gate */ 6417c478bd9Sstevel@tonic-gate 6427c478bd9Sstevel@tonic-gate #define __CLK_TCK 100 /* units for times() */ 6437c478bd9Sstevel@tonic-gate 6447c478bd9Sstevel@tonic-gate #undef M_NOOWNER /* for systems which don't have user/group 6457c478bd9Sstevel@tonic-gate * owners on files. 6467c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined. 6477c478bd9Sstevel@tonic-gate * Used by pax 6487c478bd9Sstevel@tonic-gate */ 6497c478bd9Sstevel@tonic-gate 6507c478bd9Sstevel@tonic-gate #define M_FSDELIM(ch) ((ch)=='/') /* for systems who have special characters to 6517c478bd9Sstevel@tonic-gate * delimit file systems, this returns true if 6527c478bd9Sstevel@tonic-gate * the given character is a file system 6537c478bd9Sstevel@tonic-gate * delimiter; <mks.h> will default to '/'. 6547c478bd9Sstevel@tonic-gate * ispathdelim() is a deprecated form. 6557c478bd9Sstevel@tonic-gate */ 6567c478bd9Sstevel@tonic-gate 6577c478bd9Sstevel@tonic-gate #define M_DRDELIM(ch) (0) /* for systems whose names parse with a leading 6587c478bd9Sstevel@tonic-gate * drive separated by a drive delimiter char, 6597c478bd9Sstevel@tonic-gate * (e.g. ':' on dos systems); posix systems 6607c478bd9Sstevel@tonic-gate * simply return false, i.e. no, character 6617c478bd9Sstevel@tonic-gate * is not a drive delimiter. 6627c478bd9Sstevel@tonic-gate * <mks.h> will default to (0). 6637c478bd9Sstevel@tonic-gate */ 6647c478bd9Sstevel@tonic-gate 6657c478bd9Sstevel@tonic-gate #define M_DIRSTAT(pathname, dirp, statbuf) stat((pathname), (statbuf)) 6667c478bd9Sstevel@tonic-gate /* prototype definition: 6677c478bd9Sstevel@tonic-gate * int M_DIRSTAT(char* pathname, 6687c478bd9Sstevel@tonic-gate * DIR* dirp, 6697c478bd9Sstevel@tonic-gate * struct stat* statbuf); 6707c478bd9Sstevel@tonic-gate * On POSIX and conventional UNIX systems 6717c478bd9Sstevel@tonic-gate * this macro is defined as: 6727c478bd9Sstevel@tonic-gate * stat((pathname), (statbuf)) 6737c478bd9Sstevel@tonic-gate /* On systems where the file information is 6747c478bd9Sstevel@tonic-gate * maintained in the directory (not the inode) 6757c478bd9Sstevel@tonic-gate * the DIR structure may contain this info, 6767c478bd9Sstevel@tonic-gate * in which case the information can be returned 6777c478bd9Sstevel@tonic-gate * without doing a stat(). This may be a 6787c478bd9Sstevel@tonic-gate * performance enhancement. 6797c478bd9Sstevel@tonic-gate * dirp is the DIR * pointer returned by opendir 6807c478bd9Sstevel@tonic-gate */ 6817c478bd9Sstevel@tonic-gate 6827c478bd9Sstevel@tonic-gate #define M_HIDDEN(dirp, dp) ((dp)->d_name[0] == '.') 6837c478bd9Sstevel@tonic-gate /* prototype definition: 6847c478bd9Sstevel@tonic-gate * int M_HIDDEN(DIR* dirp, struct* dirent) 6857c478bd9Sstevel@tonic-gate * 6867c478bd9Sstevel@tonic-gate * Some utilities (e.g ls) recognize certain 6877c478bd9Sstevel@tonic-gate * filenames as being "hidden" files. 6887c478bd9Sstevel@tonic-gate * In conventional UNIX systems this has been 6897c478bd9Sstevel@tonic-gate * the '.' prefix. 6907c478bd9Sstevel@tonic-gate * On other systems, with other conventions 6917c478bd9Sstevel@tonic-gate * the M_HIDDEN macro should be suitably 6927c478bd9Sstevel@tonic-gate * modified 6937c478bd9Sstevel@tonic-gate * 6947c478bd9Sstevel@tonic-gate * If this is not defined, then 6957c478bd9Sstevel@tonic-gate * <mks.h> defaults to traditional unix, a 6967c478bd9Sstevel@tonic-gate * leading `.'. 6977c478bd9Sstevel@tonic-gate */ 6987c478bd9Sstevel@tonic-gate 6997c478bd9Sstevel@tonic-gate #undef M_NO_FORK /* Define for non-POSIX systems that do not 7007c478bd9Sstevel@tonic-gate * have a true fork(), and must use some sort 7017c478bd9Sstevel@tonic-gate * of spawn call (for example, DOS). 7027c478bd9Sstevel@tonic-gate * By default undefined; there is a fork. 7037c478bd9Sstevel@tonic-gate */ 7047c478bd9Sstevel@tonic-gate 7057c478bd9Sstevel@tonic-gate #undef M_SYNC_FORK /* fork() is synchronous (DOS). (sh) 7067c478bd9Sstevel@tonic-gate * Default is undefined; posix.1 fork provided. 7077c478bd9Sstevel@tonic-gate */ 7087c478bd9Sstevel@tonic-gate 7097c478bd9Sstevel@tonic-gate #undef M_FEXEC /* Use fexec[ve] when possible. 7107c478bd9Sstevel@tonic-gate * Only define if fexec is faster than fork/exec 7117c478bd9Sstevel@tonic-gate * (sh, ...) 7127c478bd9Sstevel@tonic-gate * By default undefined; fork is reasonable 7137c478bd9Sstevel@tonic-gate * performance. 7147c478bd9Sstevel@tonic-gate */ 7157c478bd9Sstevel@tonic-gate 7167c478bd9Sstevel@tonic-gate #undef M_EXEC_FILETYPE /* File name types for executables. 7177c478bd9Sstevel@tonic-gate * For example, .exe and .ksh. 7187c478bd9Sstevel@tonic-gate * For the shell, you need to define shexecve() 7197c478bd9Sstevel@tonic-gate * and testpath() in sh$(ORG).c. 7207c478bd9Sstevel@tonic-gate * By default undefined; no file name types. 7217c478bd9Sstevel@tonic-gate */ 7227c478bd9Sstevel@tonic-gate 7237c478bd9Sstevel@tonic-gate #undef M_NO_IDS /* POSIX uids and gids. 7247c478bd9Sstevel@tonic-gate * (sh: set -p; umask; test -[rwx]) 7257c478bd9Sstevel@tonic-gate */ 7267c478bd9Sstevel@tonic-gate 7277c478bd9Sstevel@tonic-gate #undef M_NO_ST_INO /* stat's st_ino is meaningless. (pax; test -ef) 7287c478bd9Sstevel@tonic-gate */ 7297c478bd9Sstevel@tonic-gate 7307c478bd9Sstevel@tonic-gate #undef M_SVFS_INO /* statvfs() provides valid f_ffree and 7317c478bd9Sstevel@tonic-gate * f_files fields which describe the number 7327c478bd9Sstevel@tonic-gate * of free file slots and the total number 7337c478bd9Sstevel@tonic-gate * of file slots in a filesystem. Used 7347c478bd9Sstevel@tonic-gate * by df. 7357c478bd9Sstevel@tonic-gate */ 7367c478bd9Sstevel@tonic-gate 7377c478bd9Sstevel@tonic-gate #undef M_NO_PIPE /* no pipe(), use temp files. (sh, popen) 7387c478bd9Sstevel@tonic-gate * Default is undefined; posix.1 pipes provided. 7397c478bd9Sstevel@tonic-gate */ 7407c478bd9Sstevel@tonic-gate 7417c478bd9Sstevel@tonic-gate #undef M_LOCKING_OPEN /* Open'd files are locked, (DOS, OS2) 7427c478bd9Sstevel@tonic-gate * and cannot be unlink'd or rename'd. 7437c478bd9Sstevel@tonic-gate */ 7447c478bd9Sstevel@tonic-gate 7457c478bd9Sstevel@tonic-gate #undef M_USE_SIGNAL /* Has no sigaction, use signal (SVR3). 7467c478bd9Sstevel@tonic-gate * (sh, ...) 7477c478bd9Sstevel@tonic-gate */ 7487c478bd9Sstevel@tonic-gate 7497c478bd9Sstevel@tonic-gate #undef M_NO_IO_EINTR /* Tty I/O does not return EINTR 7507c478bd9Sstevel@tonic-gate * when SIGINT signal handler returns. 7517c478bd9Sstevel@tonic-gate * (sh, ?) 7527c478bd9Sstevel@tonic-gate */ 7537c478bd9Sstevel@tonic-gate 7547c478bd9Sstevel@tonic-gate #undef M_TTY_ICANON /* Tty is always in ICANON mode. 7557c478bd9Sstevel@tonic-gate * (sh,ex,mailx) 7567c478bd9Sstevel@tonic-gate */ 7577c478bd9Sstevel@tonic-gate 7587c478bd9Sstevel@tonic-gate #define M_TTYNAME "/dev/tty" /* Device to open to access the controlling 7597c478bd9Sstevel@tonic-gate * tty; posix.2 does require this to be /dev/tty 7607c478bd9Sstevel@tonic-gate * but dos for example calls it /dev/con. 7617c478bd9Sstevel@tonic-gate * <mks.h> will default to /dev/tty. 7627c478bd9Sstevel@tonic-gate */ 7637c478bd9Sstevel@tonic-gate 7647c478bd9Sstevel@tonic-gate #define M_NULLNAME "/dev/null" /* Device to open for the null device as defined 7657c478bd9Sstevel@tonic-gate * by posix.2. It is required to be named 7667c478bd9Sstevel@tonic-gate * /dev/null, but dos for example calls it 7677c478bd9Sstevel@tonic-gate * /dev/nul. <mks.h> will default to /dev/null. 7687c478bd9Sstevel@tonic-gate */ 7697c478bd9Sstevel@tonic-gate 7707c478bd9Sstevel@tonic-gate #define M_FCLOSE_NOT_POSIX_1 1 /* fclose() does not conform to posix.1 section 7717c478bd9Sstevel@tonic-gate * 8.2. An explicit lseek must be done on the 7727c478bd9Sstevel@tonic-gate * stream prior to an fclose for the seek 7737c478bd9Sstevel@tonic-gate * pointer to be correct. <mks.h> will default 7747c478bd9Sstevel@tonic-gate * to undefined. 7757c478bd9Sstevel@tonic-gate */ 7767c478bd9Sstevel@tonic-gate 7777c478bd9Sstevel@tonic-gate #define M_FFLUSH_NOT_POSIX_1 1 /* fflush() does not conform to posix.1 section 7787c478bd9Sstevel@tonic-gate * 8.2. <mks.h> will default to undefined. 7797c478bd9Sstevel@tonic-gate * If undefined, then mks.h will turn m_fflush 7807c478bd9Sstevel@tonic-gate * into fflush. If defined, then mks.h will 7817c478bd9Sstevel@tonic-gate * leave m_fflush alone, and a stdio-specific 7827c478bd9Sstevel@tonic-gate * routine m_fflush() must be provided which 7837c478bd9Sstevel@tonic-gate * actually conforms to the standard. 7847c478bd9Sstevel@tonic-gate */ 7857c478bd9Sstevel@tonic-gate 7867c478bd9Sstevel@tonic-gate 7877c478bd9Sstevel@tonic-gate #define M_NL_DOM "mks" /* String used as default name (domain name) 7887c478bd9Sstevel@tonic-gate * to get mks utility messages via the xpg 7897c478bd9Sstevel@tonic-gate * catopen/catgets message translation functions 7907c478bd9Sstevel@tonic-gate * For example, in XPG: 7917c478bd9Sstevel@tonic-gate * catopen (M_NL_DOM, ...) 7927c478bd9Sstevel@tonic-gate */ 7937c478bd9Sstevel@tonic-gate 7947c478bd9Sstevel@tonic-gate 7957c478bd9Sstevel@tonic-gate #define M_L_CUSERID 16 /* Length of longest user id returned by 7967c478bd9Sstevel@tonic-gate * cuserid() routine. 7977c478bd9Sstevel@tonic-gate * Used for L_cuserid in case its not 7987c478bd9Sstevel@tonic-gate * defined in <stdio.h> 7997c478bd9Sstevel@tonic-gate */ 8007c478bd9Sstevel@tonic-gate 8017c478bd9Sstevel@tonic-gate #define M_FSMOUNT "/etc/mtab" 8027c478bd9Sstevel@tonic-gate /* This pathname is passed as the 1st argument 8037c478bd9Sstevel@tonic-gate * to setmntent() routine. 8047c478bd9Sstevel@tonic-gate * On conventional UNIX systems, this 8057c478bd9Sstevel@tonic-gate * pathname identifies a file that contains 8067c478bd9Sstevel@tonic-gate * a list of all the actively mounted systems. 8077c478bd9Sstevel@tonic-gate * The mount utility is normally responsible 8087c478bd9Sstevel@tonic-gate * for adding entries to this file 8097c478bd9Sstevel@tonic-gate * and umount utility deletes the entries. 8107c478bd9Sstevel@tonic-gate */ 8117c478bd9Sstevel@tonic-gate #define M_FSALL "/etc/fstab" 8127c478bd9Sstevel@tonic-gate /* this pathname identifies a file that 8137c478bd9Sstevel@tonic-gate * is similar to M_FSMOUNT, but instead of 8147c478bd9Sstevel@tonic-gate * the actively mounted file systems, it 815*d0b12b66SToomas Soome * has a list of ALL possible filesystems 8167c478bd9Sstevel@tonic-gate * that could be mounted. 8177c478bd9Sstevel@tonic-gate * This file normally used by the mount 8187c478bd9Sstevel@tonic-gate * command to find all the file systems 8197c478bd9Sstevel@tonic-gate * to mount by default. 8207c478bd9Sstevel@tonic-gate */ 8217c478bd9Sstevel@tonic-gate 8227c478bd9Sstevel@tonic-gate #define M_NLSCHARMAP "/usr/lib/nls/charmap/ISO_8859-1" 8237c478bd9Sstevel@tonic-gate /* Name of default charmap file to use in 8247c478bd9Sstevel@tonic-gate * localedef if -f charmap option isn't 8257c478bd9Sstevel@tonic-gate * used. 8267c478bd9Sstevel@tonic-gate */ 8277c478bd9Sstevel@tonic-gate 8287c478bd9Sstevel@tonic-gate #define M_ISEOV(error) (error == EINVAL) 8297c478bd9Sstevel@tonic-gate /* This macro is used after an unsuccessful 8307c478bd9Sstevel@tonic-gate * read() or m_devread() to determine 8317c478bd9Sstevel@tonic-gate * if end-of-volume has been encountered. 8327c478bd9Sstevel@tonic-gate * This macro should be invoked using the 8337c478bd9Sstevel@tonic-gate * errno returned by the read(). 8347c478bd9Sstevel@tonic-gate * The macro should evaluate to 1 (true) 8357c478bd9Sstevel@tonic-gate * if it can determine the EOV condition 8367c478bd9Sstevel@tonic-gate * from this errno. 8377c478bd9Sstevel@tonic-gate * Otherwise, should evaluate to 0 (false) 8387c478bd9Sstevel@tonic-gate * <mks.h> defaults to 0, i.e. never EOV 8397c478bd9Sstevel@tonic-gate */ 8407c478bd9Sstevel@tonic-gate 8417c478bd9Sstevel@tonic-gate #define M_COMPRESS_DEFBITS 16 8427c478bd9Sstevel@tonic-gate /* Default # of bits to compress in compress. 8437c478bd9Sstevel@tonic-gate * If not defined, compress defaults to 16. 8447c478bd9Sstevel@tonic-gate * Probably only useful on systems with limited 8457c478bd9Sstevel@tonic-gate * memory capacity. 8467c478bd9Sstevel@tonic-gate */ 8477c478bd9Sstevel@tonic-gate 8487c478bd9Sstevel@tonic-gate #define M_CURSES_VERSION "MKS Interopen Curses" 8497c478bd9Sstevel@tonic-gate /* Curses product version string. This 8507c478bd9Sstevel@tonic-gate * string will be imbedded in the excutable 8517c478bd9Sstevel@tonic-gate * for an application. This string should 8527c478bd9Sstevel@tonic-gate * be set to the vendor's product code used 8537c478bd9Sstevel@tonic-gate * for Curses. 8547c478bd9Sstevel@tonic-gate */ 8557c478bd9Sstevel@tonic-gate 8567c478bd9Sstevel@tonic-gate #undef M_CURSES_MEMMAPPED /* Define this symbol to compile up curses 8577c478bd9Sstevel@tonic-gate * for a memory mapped display, such as the PC. 8587c478bd9Sstevel@tonic-gate * Rather than allocating memory for the main 8597c478bd9Sstevel@tonic-gate * screen window, this is compiled to point 8607c478bd9Sstevel@tonic-gate * directly at the mapped memory. This will 8617c478bd9Sstevel@tonic-gate * require some custom code. 8627c478bd9Sstevel@tonic-gate */ 8637c478bd9Sstevel@tonic-gate 8647c478bd9Sstevel@tonic-gate #define M_TERM_NAME "dumb" 8657c478bd9Sstevel@tonic-gate /* Default terminal name used if TERM is 8667c478bd9Sstevel@tonic-gate * not set in the environment. 8677c478bd9Sstevel@tonic-gate */ 8687c478bd9Sstevel@tonic-gate 8697c478bd9Sstevel@tonic-gate #define M_TERMINFO_DIR "/usr/lib/terminfo" 8707c478bd9Sstevel@tonic-gate /* Default location for the terminfo database 8717c478bd9Sstevel@tonic-gate * if TERMINFO is not set in the environment. 8727c478bd9Sstevel@tonic-gate * 8737c478bd9Sstevel@tonic-gate * NOTE: Only define this macro if curses 8747c478bd9Sstevel@tonic-gate * is available on this system since 8757c478bd9Sstevel@tonic-gate * this macro is also used to 8767c478bd9Sstevel@tonic-gate * determine if "curses" is available 8777c478bd9Sstevel@tonic-gate */ 8787c478bd9Sstevel@tonic-gate 8797c478bd9Sstevel@tonic-gate #define M_BSD_SPRINTF 1 /* Defined if sprintf on this system has BSD 8807c478bd9Sstevel@tonic-gate * semantics ie. if sprintf() returns a pointer 8817c478bd9Sstevel@tonic-gate * to the string rather than the number of 8827c478bd9Sstevel@tonic-gate * characters printed. 8837c478bd9Sstevel@tonic-gate */ 8847c478bd9Sstevel@tonic-gate 8857c478bd9Sstevel@tonic-gate #define M_IS_NATIVE_LOCALE(s) (strcmp(s, "POSIX") == 0 || strcmp(s, "C") == 0) 8867c478bd9Sstevel@tonic-gate /* Change this definition to define the locale 8877c478bd9Sstevel@tonic-gate * that the machine level comparison function 8887c478bd9Sstevel@tonic-gate * strcmp conforms to. On all ascii machines, 8897c478bd9Sstevel@tonic-gate * strcmp will order the same as the POSIX 8907c478bd9Sstevel@tonic-gate * locale. <mks.h> defaults to the def'n given 8917c478bd9Sstevel@tonic-gate * here. 8927c478bd9Sstevel@tonic-gate */ 8937c478bd9Sstevel@tonic-gate 8947c478bd9Sstevel@tonic-gate #undef M_NOT_646 /* Define this symbol if the local invariant 8957c478bd9Sstevel@tonic-gate * character set does not conform to ISO646. 8967c478bd9Sstevel@tonic-gate * Normally, this would only be set for 8977c478bd9Sstevel@tonic-gate * EBCDIC systems. 8987c478bd9Sstevel@tonic-gate * Several utilities (e.g pax/tar/cpio) 8997c478bd9Sstevel@tonic-gate * are explicitly required to use 646, 9007c478bd9Sstevel@tonic-gate * so if this flag is defined, then there 9017c478bd9Sstevel@tonic-gate * is special code which will be 9027c478bd9Sstevel@tonic-gate * compiled in to do the appropriate 9037c478bd9Sstevel@tonic-gate * character set translation. 9047c478bd9Sstevel@tonic-gate */ 9057c478bd9Sstevel@tonic-gate 9067c478bd9Sstevel@tonic-gate #define M_FILENAME_CODESET "IS8859" 9077c478bd9Sstevel@tonic-gate /* If M_NOT_646 is defined, then you must 9087c478bd9Sstevel@tonic-gate * define the codeset that filenames are 9097c478bd9Sstevel@tonic-gate * stored in. This must be a string value, 9107c478bd9Sstevel@tonic-gate * that can be passed into iconv. 9117c478bd9Sstevel@tonic-gate * Theoretically, this could be a call to 9127c478bd9Sstevel@tonic-gate * setlocale, to some extention that would 9137c478bd9Sstevel@tonic-gate * return the name of the charmap. 9147c478bd9Sstevel@tonic-gate */ 9157c478bd9Sstevel@tonic-gate 9167c478bd9Sstevel@tonic-gate #define M_STKCHK expression /* Define this macro on systems that have a 9177c478bd9Sstevel@tonic-gate * fixed size stack. 9187c478bd9Sstevel@tonic-gate * This macro should define an expression 9197c478bd9Sstevel@tonic-gate * that can be used to check if the current 9207c478bd9Sstevel@tonic-gate * C function stack is within some distance 9217c478bd9Sstevel@tonic-gate * from the end of available stack size. 9227c478bd9Sstevel@tonic-gate * Return 0 if it is -- i.e. unsafe to 9237c478bd9Sstevel@tonic-gate * recurse further. 9247c478bd9Sstevel@tonic-gate * <mks.h> defaults to undefined; 9257c478bd9Sstevel@tonic-gate * i.e. no stack bounds checking. 9267c478bd9Sstevel@tonic-gate * This is only called from a few programs 9277c478bd9Sstevel@tonic-gate * which allow the user to perform recursion. 9287c478bd9Sstevel@tonic-gate */ 9297c478bd9Sstevel@tonic-gate 9307c478bd9Sstevel@tonic-gate #define M_ST_RDEV(sb) ((sb).st_rdev) 9317c478bd9Sstevel@tonic-gate #define M_DEVMAJOR(statp) ((uint)major((statp)->st_rdev)) 9327c478bd9Sstevel@tonic-gate /* Prototype: uint M_DEVMAJOR(struct stat *); 9337c478bd9Sstevel@tonic-gate * 9347c478bd9Sstevel@tonic-gate * Return the major device number given 9357c478bd9Sstevel@tonic-gate * a "struct stat *". 9367c478bd9Sstevel@tonic-gate * Assumes the stat structure pointer 9377c478bd9Sstevel@tonic-gate * represents a special device file. 9387c478bd9Sstevel@tonic-gate * MKS recommends all systems define 9397c478bd9Sstevel@tonic-gate * some method of extracting this information 9407c478bd9Sstevel@tonic-gate * from this structure 9417c478bd9Sstevel@tonic-gate * (eg. define a st_rdev or st_major member 9427c478bd9Sstevel@tonic-gate * in the struct stat.) 9437c478bd9Sstevel@tonic-gate * This macro must be defined to return some 9447c478bd9Sstevel@tonic-gate * unsigned integer value. 9457c478bd9Sstevel@tonic-gate */ 9467c478bd9Sstevel@tonic-gate 9477c478bd9Sstevel@tonic-gate #define M_DEVMINOR(statp) ((uint)minor((statp)->st_rdev)) 9487c478bd9Sstevel@tonic-gate /* Prototype: uint M_DEVMINOR(struct stat *); 9497c478bd9Sstevel@tonic-gate * 9507c478bd9Sstevel@tonic-gate * Return the minor device number given 9517c478bd9Sstevel@tonic-gate * a "struct stat *". 9527c478bd9Sstevel@tonic-gate * Same recommendations as M_DEVMAJOR above. 9537c478bd9Sstevel@tonic-gate */ 9547c478bd9Sstevel@tonic-gate 9557c478bd9Sstevel@tonic-gate #define M_DEVMAKE(mjr, mnr) (makedev((mjr), (mnr))) 9567c478bd9Sstevel@tonic-gate /* Build a dev_t from a major and minor # 9577c478bd9Sstevel@tonic-gate * M_DEVMAKE(M_DEVMAJOR(sbp), M_DEVMINOR(sbp)) 9587c478bd9Sstevel@tonic-gate * just returns the dev_t from the stat buf 9597c478bd9Sstevel@tonic-gate */ 9607c478bd9Sstevel@tonic-gate 9617c478bd9Sstevel@tonic-gate #define M_INODIRENT(name, dirbuf) ((ino_t)((dirbuf)->d_ino)) 9627c478bd9Sstevel@tonic-gate /* Prototype: 9637c478bd9Sstevel@tonic-gate * ino_t M_INODIRENT(char *, struct dirent *); 9647c478bd9Sstevel@tonic-gate * 9657c478bd9Sstevel@tonic-gate * Return the inode belonging to the directory 9667c478bd9Sstevel@tonic-gate * entry corresponding to dirbuf. The name 9677c478bd9Sstevel@tonic-gate * parameter is the path name given to a 9687c478bd9Sstevel@tonic-gate * previous call to opendir(). 9697c478bd9Sstevel@tonic-gate */ 9707c478bd9Sstevel@tonic-gate 9717c478bd9Sstevel@tonic-gate #define M_ST_BLOCKS(sbp) ((sbp)->st_blocks) 9727c478bd9Sstevel@tonic-gate #define M_ST_BLKSIZE(sbp) ((sbp)->st_blksize) 9737c478bd9Sstevel@tonic-gate /* If the implementation supports, in the stat 9747c478bd9Sstevel@tonic-gate * structure, the actual disk space allocation 9757c478bd9Sstevel@tonic-gate * to a given file, then M_ST_BLOCKS should 9767c478bd9Sstevel@tonic-gate * be defined to return that member from the 9777c478bd9Sstevel@tonic-gate * passed stat structure pointer. 9787c478bd9Sstevel@tonic-gate * M_ST_BLKSIZE should be the number of bytes 9797c478bd9Sstevel@tonic-gate * in a M_ST_BLOCKS unit; normally a 9807c478bd9Sstevel@tonic-gate * different member of the stat structure. 9817c478bd9Sstevel@tonic-gate * 9827c478bd9Sstevel@tonic-gate * These macros are not required. 9837c478bd9Sstevel@tonic-gate * Programs that use these macros 9847c478bd9Sstevel@tonic-gate * will fall back on computing these 9857c478bd9Sstevel@tonic-gate * values from the st_size field. 9867c478bd9Sstevel@tonic-gate */ 9877c478bd9Sstevel@tonic-gate 9887c478bd9Sstevel@tonic-gate #define M_MATHERR 0 /* If the math library supports matherr(), 9897c478bd9Sstevel@tonic-gate * define with a non-zero value. 9907c478bd9Sstevel@tonic-gate * MKS recommends that all ANSI-C libraries 9917c478bd9Sstevel@tonic-gate * support this. 9927c478bd9Sstevel@tonic-gate * By default, not defined. 9937c478bd9Sstevel@tonic-gate */ 9947c478bd9Sstevel@tonic-gate 9957c478bd9Sstevel@tonic-gate #define M_AWK_SUBSEP "\034" /* Default SUBSEP value in awk. This value 9967c478bd9Sstevel@tonic-gate * is appropriate for ASCII based character 9977c478bd9Sstevel@tonic-gate * sets. 9987c478bd9Sstevel@tonic-gate */ 9997c478bd9Sstevel@tonic-gate 10007c478bd9Sstevel@tonic-gate #define M_FSCLOSE(fp) fclose(fp) 10017c478bd9Sstevel@tonic-gate /* define M_FSCLOSE(fp) to be the function 10027c478bd9Sstevel@tonic-gate * that cleans up the resources allocated 10037c478bd9Sstevel@tonic-gate * by m_fsopen(). 10047c478bd9Sstevel@tonic-gate * Since m_fsopen() implementation is system 10057c478bd9Sstevel@tonic-gate * specific, so is M_FSCLOSE(). 10067c478bd9Sstevel@tonic-gate */ 10077c478bd9Sstevel@tonic-gate 10087c478bd9Sstevel@tonic-gate #define M_LEX_8BIT 1 /* If this is defined, lex will produce 10097c478bd9Sstevel@tonic-gate * 8-bit tables by default (the normal 10107c478bd9Sstevel@tonic-gate * default is 7-bit tables). 10117c478bd9Sstevel@tonic-gate */ 10127c478bd9Sstevel@tonic-gate 10137c478bd9Sstevel@tonic-gate #define M_NUMSIZE 30 /* M_NUMSIZE should be defined to the length 10147c478bd9Sstevel@tonic-gate * in character positions, of the longest 10157c478bd9Sstevel@tonic-gate * number that can be sprintf()'d into a string 10167c478bd9Sstevel@tonic-gate * (longest of any type of number, 10177c478bd9Sstevel@tonic-gate * eg. float, long, double ...) 10187c478bd9Sstevel@tonic-gate * For example, if your system prints 10197c478bd9Sstevel@tonic-gate * 30 characters for sprintf(str, "%le", float) 10207c478bd9Sstevel@tonic-gate * then M_NUMSIZE should be set to at least 30. 10217c478bd9Sstevel@tonic-gate * 10227c478bd9Sstevel@tonic-gate * This is used in awk to guess at the size 10237c478bd9Sstevel@tonic-gate * that each element of an sprintf() will be 10247c478bd9Sstevel@tonic-gate * so that it can internally allocate enough 10257c478bd9Sstevel@tonic-gate * storage. 10267c478bd9Sstevel@tonic-gate * 10277c478bd9Sstevel@tonic-gate * If this is not defined, then a default 10287c478bd9Sstevel@tonic-gate * value is used from <mks.h> 10297c478bd9Sstevel@tonic-gate */ 10307c478bd9Sstevel@tonic-gate 10317c478bd9Sstevel@tonic-gate /* 10327c478bd9Sstevel@tonic-gate * File System (Naming) Attributes. 10337c478bd9Sstevel@tonic-gate * M_ONE_DOT, M_NO_LEADING_DOT, and M_SHORT_EXT are deprecated, in favour 10347c478bd9Sstevel@tonic-gate * of the m_fstype() function. However, until all code has been converted 10357c478bd9Sstevel@tonic-gate * they must be set appropriately. The obsolescent versions do not permit 10367c478bd9Sstevel@tonic-gate * supporting a system with multiple filesystem types: they are all statically 10377c478bd9Sstevel@tonic-gate * tested via pre-processor directives. The new version permits mixing for 10387c478bd9Sstevel@tonic-gate * example of a posix file system, with say a dos floppy file system, such 10397c478bd9Sstevel@tonic-gate * as is available on many unix systems today. 10407c478bd9Sstevel@tonic-gate * If your system is posix conformant, do not set any of these variables 10417c478bd9Sstevel@tonic-gate * or functions; <mks.h> will default to a #define for m_fstype to 10427c478bd9Sstevel@tonic-gate * a POSIX style naming convention. 10437c478bd9Sstevel@tonic-gate */ 10447c478bd9Sstevel@tonic-gate #undef M_FSTYPE /* If m_fstype is defined in mkslocal.h, 10457c478bd9Sstevel@tonic-gate * either as a #define, or a function decl. 10467c478bd9Sstevel@tonic-gate * then define M_FSTYPE, so <mks.h> won't 10477c478bd9Sstevel@tonic-gate * define m_fstype into M_FSTYPE_POSIX. 10487c478bd9Sstevel@tonic-gate */ 10497c478bd9Sstevel@tonic-gate 10507c478bd9Sstevel@tonic-gate #undef m_fstype(path) /* Either #define, or function returning a 10517c478bd9Sstevel@tonic-gate * combination of file naming attributes, 10527c478bd9Sstevel@tonic-gate * and the file system type. On a system 10537c478bd9Sstevel@tonic-gate * with only one file system type, this would 10547c478bd9Sstevel@tonic-gate * be a #define; on a system with multiple a 10557c478bd9Sstevel@tonic-gate * function which would decide based on the 10567c478bd9Sstevel@tonic-gate * path arg given. Either M_FSTYPE_POSIX or 10577c478bd9Sstevel@tonic-gate * M_FSTYPE_FAT, should be or'ed with any of 10587c478bd9Sstevel@tonic-gate * M_FSATTR_ONE_DOT, M_FSATTR_SHORT_EXT and 10597c478bd9Sstevel@tonic-gate * M_FSATTR_NO_LEADING_DOT. These three 10607c478bd9Sstevel@tonic-gate * M_FSATTR_ bit flags conform to the three 10617c478bd9Sstevel@tonic-gate * following obsolete defines. 10627c478bd9Sstevel@tonic-gate */ 10637c478bd9Sstevel@tonic-gate 10647c478bd9Sstevel@tonic-gate #undef M_ONE_DOT /* Use #define M_ONE_DOT 1 10657c478bd9Sstevel@tonic-gate * for non-posix files systems which 10667c478bd9Sstevel@tonic-gate * permit only one dot in a filename. 10677c478bd9Sstevel@tonic-gate * Thus, for example, y.tab.c, will become 10687c478bd9Sstevel@tonic-gate * ytab.c, based on this #define. 10697c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined. 10707c478bd9Sstevel@tonic-gate */ 10717c478bd9Sstevel@tonic-gate 10727c478bd9Sstevel@tonic-gate #undef M_NO_LEADING_DOT /* Use #define M_NO_LEADING_DOT 1 for 10737c478bd9Sstevel@tonic-gate * non-posix file systems which do not 10747c478bd9Sstevel@tonic-gate * permit a leading dot in a filename. 10757c478bd9Sstevel@tonic-gate * Thus, for example, .profile will become 10767c478bd9Sstevel@tonic-gate * profile.ksh based on this #define. 10777c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined. 10787c478bd9Sstevel@tonic-gate */ 10797c478bd9Sstevel@tonic-gate 10807c478bd9Sstevel@tonic-gate #undef M_SHORT_EXT /* Use #define M_SHORT_EXT 1 10817c478bd9Sstevel@tonic-gate * for non-posix file systems which 10827c478bd9Sstevel@tonic-gate * permit only a limited number of characters 10837c478bd9Sstevel@tonic-gate * after a dot in a filename. 10847c478bd9Sstevel@tonic-gate * Defining M_SHORT_EXT will limit filenames 10857c478bd9Sstevel@tonic-gate * to 3 characters after the dot. 10867c478bd9Sstevel@tonic-gate * For example, y.output will become y.out 10877c478bd9Sstevel@tonic-gate * <mks.h> will default to undefined. 10887c478bd9Sstevel@tonic-gate */ 10897c478bd9Sstevel@tonic-gate 10907c478bd9Sstevel@tonic-gate /* 10917c478bd9Sstevel@tonic-gate * customizations for ps field specifiers and widths 10927c478bd9Sstevel@tonic-gate * This will vary from system to system depending on the max size 10937c478bd9Sstevel@tonic-gate * of the values in the different fields 10947c478bd9Sstevel@tonic-gate * The following are UNIX (e.g SYSV and BSD) std defaults 10957c478bd9Sstevel@tonic-gate */ 10967c478bd9Sstevel@tonic-gate #define M_PS_FFMT { m_textstr(4865, "ruser=UID", "I"),\ 10977c478bd9Sstevel@tonic-gate m_textstr(4866, "pid,ppid,pcpu=C", "I"),\ 10987c478bd9Sstevel@tonic-gate m_textstr(4861, "stime,tty=TTY", "I"), "atime,args",\ 10997c478bd9Sstevel@tonic-gate NULL }; 11007c478bd9Sstevel@tonic-gate #define M_PS_JFMT { m_textstr(4867, "pid,sid,pgid=PGRP", "I"),\ 11017c478bd9Sstevel@tonic-gate m_textstr(4862, "tty=TTY", "I"), "atime,args", NULL }; 11027c478bd9Sstevel@tonic-gate #define M_PS_LFMT { m_textstr(4868, "flags,state,ruid=UID", "I"),\ 11037c478bd9Sstevel@tonic-gate m_textstr(4866, "pid,ppid,pcpu=C", "I"),\ 11047c478bd9Sstevel@tonic-gate m_textstr(4869, "pri,nice,addr,vsz=SZ", "I"),\ 11057c478bd9Sstevel@tonic-gate m_textstr(4870, "wchan,tty=TTY", "I"),\ 11067c478bd9Sstevel@tonic-gate m_textstr(4863, "atime,comm=COMD", "I"), NULL }; 11077c478bd9Sstevel@tonic-gate #define M_PS_DEFFMT { m_textstr(4864, "pid,tty=TTY", "I"), "atime,comm",\ 11087c478bd9Sstevel@tonic-gate NULL }; 11097c478bd9Sstevel@tonic-gate #define M_PS_PID_WIDTH 5 11107c478bd9Sstevel@tonic-gate #define M_PS_XPID_WIDTH 8 11117c478bd9Sstevel@tonic-gate #define M_PS_GID_WIDTH 5 11127c478bd9Sstevel@tonic-gate #define M_PS_UID_WIDTH 5 11137c478bd9Sstevel@tonic-gate #define M_PS_TTY_WIDTH 7 11147c478bd9Sstevel@tonic-gate /* 11157c478bd9Sstevel@tonic-gate * The syntax for specifying and displaying terminal names in ps and who 11167c478bd9Sstevel@tonic-gate * is required to be the same. 11177c478bd9Sstevel@tonic-gate * Since who gets the names from the utmp file, the ps utility 11187c478bd9Sstevel@tonic-gate * (and the m_psread() function) needs to know what format these terminal 11197c478bd9Sstevel@tonic-gate * names are presented in the utmp file. 11207c478bd9Sstevel@tonic-gate * It would appear that all systems have devices in the /dev/ file system 11217c478bd9Sstevel@tonic-gate * and that terminal names are displayed as the name rooted from "/dev". 11227c478bd9Sstevel@tonic-gate * Since ttyname() returns a full pathname, we can just strip 11237c478bd9Sstevel@tonic-gate * off the "/dev/" prefix and we will get the correct name. 11247c478bd9Sstevel@tonic-gate * 11257c478bd9Sstevel@tonic-gate * The ps utility uses ttyname() to get the name of the controlling terminal. 11267c478bd9Sstevel@tonic-gate * M_PS_TTY_PREFIX_TOSTRIP is a prefix string that must be removed from 11277c478bd9Sstevel@tonic-gate * the name that ttyname() returns in order to match the name returned 11287c478bd9Sstevel@tonic-gate * by m_psread(). 11297c478bd9Sstevel@tonic-gate * If no prefix is to be removed, then a zero length string ("") should be used 11307c478bd9Sstevel@tonic-gate */ 11317c478bd9Sstevel@tonic-gate #define M_PS_TTY_PREFIX_TOSTRIP "/dev/" 11327c478bd9Sstevel@tonic-gate 11337c478bd9Sstevel@tonic-gate 11347c478bd9Sstevel@tonic-gate #define M_LOCALE_NLS_DIR "/usr/lib" 11357c478bd9Sstevel@tonic-gate /* Define this if you have a system that 11367c478bd9Sstevel@tonic-gate * implements the MKS rootname() function 11377c478bd9Sstevel@tonic-gate * (e.g not a no-op) 11387c478bd9Sstevel@tonic-gate * and you want to specify the absolute 11397c478bd9Sstevel@tonic-gate * pathname to the NLS directory 11407c478bd9Sstevel@tonic-gate * which is independent of semantics of rootname(). 11417c478bd9Sstevel@tonic-gate * Depending on the implementation of rootname(), 11427c478bd9Sstevel@tonic-gate * it may prefix the path with $ROOTDIR environment 11437c478bd9Sstevel@tonic-gate * variable or it may return a path relative to 11447c478bd9Sstevel@tonic-gate * the know location of where the product has 11457c478bd9Sstevel@tonic-gate * been installed (or maybe something else!) 11467c478bd9Sstevel@tonic-gate * 11477c478bd9Sstevel@tonic-gate * If this is not defined, then locale will 11487c478bd9Sstevel@tonic-gate * call confstr(_CS_NLSDIR), which in turn calls 11497c478bd9Sstevel@tonic-gate * rootname(M_NLSDIR), and you get this resultant 11507c478bd9Sstevel@tonic-gate * pathname. 11517c478bd9Sstevel@tonic-gate * 11527c478bd9Sstevel@tonic-gate * Thus, if you want locale to look in the system native 11537c478bd9Sstevel@tonic-gate * nls directory, then define this. 11547c478bd9Sstevel@tonic-gate * Otherwise, it will probably look in a user 11557c478bd9Sstevel@tonic-gate * specified directory, or the product installation 11567c478bd9Sstevel@tonic-gate * directory. 11577c478bd9Sstevel@tonic-gate */ 11587c478bd9Sstevel@tonic-gate 11597c478bd9Sstevel@tonic-gate 11607c478bd9Sstevel@tonic-gate /* Cron configuration options: 11617c478bd9Sstevel@tonic-gate * M_CRON_USESFIFO define this (to 1) if your cron is implemented 11627c478bd9Sstevel@tonic-gate * using a FIFO (normally found in /usr/lib/cron/FIFO) 11637c478bd9Sstevel@tonic-gate * to accept communication from the at/batch/crontab 11647c478bd9Sstevel@tonic-gate * utilities when notifying cron of changes to the 11657c478bd9Sstevel@tonic-gate * at/batch queues or the user crontabs. 11667c478bd9Sstevel@tonic-gate * If this is not defined, then cron will expect 11677c478bd9Sstevel@tonic-gate * a signal (SIGUSR) from at/batch/crontab to indicate 11687c478bd9Sstevel@tonic-gate * a change in the at/batch queues or the crontabs 11697c478bd9Sstevel@tonic-gate * 11707c478bd9Sstevel@tonic-gate * M_CRONVARS_DEFINED define this if you define the pathnames below. 11717c478bd9Sstevel@tonic-gate * If you don't define this, then the pathnames that cron 11727c478bd9Sstevel@tonic-gate * uses is defined in src/cron/cronvars.c. 11737c478bd9Sstevel@tonic-gate * (e.g it uses the rootname() and the M_SPOOLDIR, 11747c478bd9Sstevel@tonic-gate * M_LIBDIR macros ) 11757c478bd9Sstevel@tonic-gate * 11767c478bd9Sstevel@tonic-gate * This can be used to override cronvars.c definitions 11777c478bd9Sstevel@tonic-gate * This is useful on systems that you don't want to 11787c478bd9Sstevel@tonic-gate * use MKS's cron daemon and thus, you have to define 11797c478bd9Sstevel@tonic-gate * the directories/files where the system cron expects 11807c478bd9Sstevel@tonic-gate * things. 11817c478bd9Sstevel@tonic-gate */ 11827c478bd9Sstevel@tonic-gate #undef M_CRON_USESFIFO 11837c478bd9Sstevel@tonic-gate 11847c478bd9Sstevel@tonic-gate #undef M_CRONVARS_DEFINED 11857c478bd9Sstevel@tonic-gate 11867c478bd9Sstevel@tonic-gate /* the following M_CRON_* macros necessary only 11877c478bd9Sstevel@tonic-gate * if M_CRONVARS_DEFINED is defined above 11887c478bd9Sstevel@tonic-gate */ 11897c478bd9Sstevel@tonic-gate #undef M_CRON_SPOOLDIR /* usually /usr/spool/cron */ 11907c478bd9Sstevel@tonic-gate #undef M_CRON_LIBDIR /* usually /usr/lib/cron */ 11917c478bd9Sstevel@tonic-gate #undef M_CRON_CRONTABSDIR /* usually /usr/spool/cron/crontabs */ 11927c478bd9Sstevel@tonic-gate #undef M_CRON_ATJOBSDIR /* usually /usr/spool/cron/atjobs */ 11937c478bd9Sstevel@tonic-gate #undef M_CRON_LOGFILE /* usually /usr/lib/cron/log */ 11947c478bd9Sstevel@tonic-gate #undef M_CRON_PIDFILE /* usually /usr/lib/cron/pid */ 11957c478bd9Sstevel@tonic-gate #undef M_CRON_QUEUEDEFSFILE /* usually /usr/lib/cron/queuedefs */ 11967c478bd9Sstevel@tonic-gate #undef M_CRON_FIFOFILE /* usually /usr/lib/cron/FIFO */ 11977c478bd9Sstevel@tonic-gate /* FIFOFILE only necessary if M_CRON_USESFIFO 11987c478bd9Sstevel@tonic-gate * is defined 11997c478bd9Sstevel@tonic-gate */ 12007c478bd9Sstevel@tonic-gate /* 12017c478bd9Sstevel@tonic-gate * M_CRON_MAILER: 12027c478bd9Sstevel@tonic-gate * This is a string that specifies a utility names 12037c478bd9Sstevel@tonic-gate * or a shell filter (e.g pipeline) that gets executed by the 12047c478bd9Sstevel@tonic-gate * cron daemon to deliver mail messages. 12057c478bd9Sstevel@tonic-gate * If this is NOT defined here, the the default case is used (see <mks.h>) 12067c478bd9Sstevel@tonic-gate * 12077c478bd9Sstevel@tonic-gate * Default case: 12087c478bd9Sstevel@tonic-gate * #define M_CRON_MAILER "sed -e s/^~/~~/ | mailx " 12097c478bd9Sstevel@tonic-gate * 12107c478bd9Sstevel@tonic-gate * Assumes only POSIX.2 mailx is available. 12117c478bd9Sstevel@tonic-gate * Must be careful when cron sends output to mailx. 12127c478bd9Sstevel@tonic-gate * We must ensure that lines with leading '~' are escaped 12137c478bd9Sstevel@tonic-gate * so mailx doesn't interpret these lines 12147c478bd9Sstevel@tonic-gate * This string MUST include a trailing space character. 12157c478bd9Sstevel@tonic-gate */ 12167c478bd9Sstevel@tonic-gate #define M_CRON_MAILER "sed -e s/^~/~~/ | mailx " 12177c478bd9Sstevel@tonic-gate 12187c478bd9Sstevel@tonic-gate 12197c478bd9Sstevel@tonic-gate /* 12207c478bd9Sstevel@tonic-gate * Defining M_SYSTEM_TMPDIR indicates that a system global 12217c478bd9Sstevel@tonic-gate * temporary directory should be used on this system. 12227c478bd9Sstevel@tonic-gate * This will override M_TMPDIR, and any calls to rootname(M_TMPDIR) 12237c478bd9Sstevel@tonic-gate * which is relative to the product installation directory 12247c478bd9Sstevel@tonic-gate */ 12257c478bd9Sstevel@tonic-gate #define M_SYSTEM_TMPDIR "/tmp" 12267c478bd9Sstevel@tonic-gate 12277c478bd9Sstevel@tonic-gate /* 12287c478bd9Sstevel@tonic-gate * ex/vi's recover command (and the program of the same name) 12297c478bd9Sstevel@tonic-gate * requires a directory in which to store any preserved tmp files. 12307c478bd9Sstevel@tonic-gate * Normally these are stored in rootname(M_ETCDIR(recover)) 12317c478bd9Sstevel@tonic-gate * which is becomes a directory name relative to ROOTDIR env variable (on DOS) 12327c478bd9Sstevel@tonic-gate * or relative to the product installation directory. 12337c478bd9Sstevel@tonic-gate * Defining M_PRESERVEDIR will ensure that this directory is used 12347c478bd9Sstevel@tonic-gate * and calls to rootname() are bypassed. 12357c478bd9Sstevel@tonic-gate * (e.g the absolute directory name defined by M_PRESERVEDIR will be used) 12367c478bd9Sstevel@tonic-gate */ 12377c478bd9Sstevel@tonic-gate #define M_PRESERVEDIR "/var/recover" 12387c478bd9Sstevel@tonic-gate 12397c478bd9Sstevel@tonic-gate /* 12407c478bd9Sstevel@tonic-gate * Defining M_SYSTEM_MAILDIR will cause mailx to use this 12417c478bd9Sstevel@tonic-gate * absolute directory name - e.g bypass the call to rootname() so 12427c478bd9Sstevel@tonic-gate * it doesn't become relative to product installation directory. 12437c478bd9Sstevel@tonic-gate */ 12447c478bd9Sstevel@tonic-gate #define M_SYSTEM_MAILDIR "/usr/mail" 12457c478bd9Sstevel@tonic-gate 12467c478bd9Sstevel@tonic-gate 12477c478bd9Sstevel@tonic-gate #undef M_ULIMIT_AVAIL /* define this if your system provides the SystemV 12487c478bd9Sstevel@tonic-gate * ulimit() API and the <ulimit.h> header file 12497c478bd9Sstevel@tonic-gate * 12507c478bd9Sstevel@tonic-gate * This information is used by 'at' utility 12517c478bd9Sstevel@tonic-gate */ 12527c478bd9Sstevel@tonic-gate 12537c478bd9Sstevel@tonic-gate /* 12547c478bd9Sstevel@tonic-gate * Shell configuration options. 12557c478bd9Sstevel@tonic-gate * NOTE: If not defined here, then there may be 12567c478bd9Sstevel@tonic-gate * a default defined in src/sh/sh.h; NOT <mks.h>. 12577c478bd9Sstevel@tonic-gate * 12587c478bd9Sstevel@tonic-gate * You must configure built-in utilities in sh/sh.mk. 12597c478bd9Sstevel@tonic-gate * Currently, test and printf can be built-in. 12607c478bd9Sstevel@tonic-gate * If you just compile the shell without -D's, 12617c478bd9Sstevel@tonic-gate * you do not get these built-in utilities. 12627c478bd9Sstevel@tonic-gate */ 12637c478bd9Sstevel@tonic-gate #define M_SH_ULIMIT 0 /* Shell SVR4 ulimit built-in. 12647c478bd9Sstevel@tonic-gate * Uses getrlimit/setrlimit(2). 12657c478bd9Sstevel@tonic-gate * 12667c478bd9Sstevel@tonic-gate * NOTE: This may be defined in mkslocal.mk 12677c478bd9Sstevel@tonic-gate * along with the build configuration required 12687c478bd9Sstevel@tonic-gate * for shbltin.c. 12697c478bd9Sstevel@tonic-gate */ 12707c478bd9Sstevel@tonic-gate /* M_SH_GETCWD removed, no longer used. default for physical cd/pwd */ 12717c478bd9Sstevel@tonic-gate #define M_SH_BGNICE 0 /* Set -o bgnice for interactive shell. 12727c478bd9Sstevel@tonic-gate */ 12737c478bd9Sstevel@tonic-gate #define M_SH_BUILTIN_SEARCH 1 /* Do path search for utility built-ins. 12747c478bd9Sstevel@tonic-gate * See POSIX.2/D12, section 3.9.1.1. 12757c478bd9Sstevel@tonic-gate * Currently they are: 12767c478bd9Sstevel@tonic-gate * [, echo, test, time, printf, pwd. 12777c478bd9Sstevel@tonic-gate */ 12787c478bd9Sstevel@tonic-gate #define M_SH_RSH 0 /* rsh is installed as a link to sh. 12797c478bd9Sstevel@tonic-gate * Vendor option, not required by any standard. 12807c478bd9Sstevel@tonic-gate * Not recommended on UNIX. 12817c478bd9Sstevel@tonic-gate */ 12827c478bd9Sstevel@tonic-gate #define M_SH_USER_FDS 10 /* Number of user file descriptors. 12837c478bd9Sstevel@tonic-gate * The value for [n] in redirection 12847c478bd9Sstevel@tonic-gate * can be between 0 and M_SH_USER_FDS-1. 12857c478bd9Sstevel@tonic-gate * Must be >= 10, should be <= OPEN_MAX/2. 12867c478bd9Sstevel@tonic-gate */ 12877c478bd9Sstevel@tonic-gate #define M_SH_LINE_MAX LINE_MAX /* Shell input line buffer size. 12887c478bd9Sstevel@tonic-gate */ 12897c478bd9Sstevel@tonic-gate #undef M_JOB_CONTROL_OFF /* Disable job control, 12907c478bd9Sstevel@tonic-gate * were _POSIX_JOB_CONTROL is defined. 12917c478bd9Sstevel@tonic-gate */ 12927c478bd9Sstevel@tonic-gate #undef M_COPYRIGHT /* MKS Toolkit. 12937c478bd9Sstevel@tonic-gate * Print MKS copyright on startup (sh). 12947c478bd9Sstevel@tonic-gate */ 12957c478bd9Sstevel@tonic-gate #undef M_SH_CRITERROR /* MKS Toolkit. 12967c478bd9Sstevel@tonic-gate * set -o criterror (DOS, OS/2). 12977c478bd9Sstevel@tonic-gate */ 12987c478bd9Sstevel@tonic-gate 12997c478bd9Sstevel@tonic-gate #define M_SH_MAX_FUNCTION_EVAL_DEPTH 100 13007c478bd9Sstevel@tonic-gate /* The limit on how deep function 13017c478bd9Sstevel@tonic-gate * evaluation can go when shell 13027c478bd9Sstevel@tonic-gate * functions execute shell functions. 13037c478bd9Sstevel@tonic-gate * This stops the shell from crashing 13047c478bd9Sstevel@tonic-gate * if an infinitely recursive function 13057c478bd9Sstevel@tonic-gate * is evaluated. If the value is 0 13067c478bd9Sstevel@tonic-gate * then functions can't be executed at 13077c478bd9Sstevel@tonic-gate * all, if the value is 1 then 13087c478bd9Sstevel@tonic-gate * functions can't execute other 13097c478bd9Sstevel@tonic-gate * functions, and so on. If the macro 13107c478bd9Sstevel@tonic-gate * M_STKCHK is defined then there will 13117c478bd9Sstevel@tonic-gate * be no limit and M_STKCHK will be 13127c478bd9Sstevel@tonic-gate * used to prevent a crash. 13137c478bd9Sstevel@tonic-gate */ 13147c478bd9Sstevel@tonic-gate 13157c478bd9Sstevel@tonic-gate #undef M_SPAWN /* This code is prototype code only. It 13167c478bd9Sstevel@tonic-gate * has not been tested, and should not be 13177c478bd9Sstevel@tonic-gate * used. 13187c478bd9Sstevel@tonic-gate * This code is not supported, except through 13197c478bd9Sstevel@tonic-gate * special arrangements with MKS. 13207c478bd9Sstevel@tonic-gate */ 13217c478bd9Sstevel@tonic-gate 13227c478bd9Sstevel@tonic-gate 13237c478bd9Sstevel@tonic-gate #define M_EXPR_POSIX 1 13247c478bd9Sstevel@tonic-gate /* 13257c478bd9Sstevel@tonic-gate * POSIX requires that numbers on the 13267c478bd9Sstevel@tonic-gate * expr command line always be considered 13277c478bd9Sstevel@tonic-gate * decimal. We support octal and hex as 13287c478bd9Sstevel@tonic-gate * as well. Defining this will turn that 13297c478bd9Sstevel@tonic-gate * extension off by default, but it is still 13307c478bd9Sstevel@tonic-gate * accessible by specifying the new '-W' flag 13317c478bd9Sstevel@tonic-gate */ 13327c478bd9Sstevel@tonic-gate 13337c478bd9Sstevel@tonic-gate #undef M_RE_SUB_ANCHOR /* Define this if you wish your baisc regular 13347c478bd9Sstevel@tonic-gate * expressions to support anchors 13357c478bd9Sstevel@tonic-gate * (^ and $) inside of subexpressions. 13367c478bd9Sstevel@tonic-gate * See POSIX.2 section 2.8.3.5. 13377c478bd9Sstevel@tonic-gate */ 13387c478bd9Sstevel@tonic-gate 13397c478bd9Sstevel@tonic-gate 13407c478bd9Sstevel@tonic-gate /* 13417c478bd9Sstevel@tonic-gate * In order to get full Posix.2 i18n, then you must either: 13427c478bd9Sstevel@tonic-gate * 13437c478bd9Sstevel@tonic-gate * i) Use the full mks ansi-c library; mks localedef, mks locale.h file... 13447c478bd9Sstevel@tonic-gate * ii) Extend your own ansi-c library to contain the mks specified functions 13457c478bd9Sstevel@tonic-gate * as described in the mks Porting and Tuning Guide. 13467c478bd9Sstevel@tonic-gate * 13477c478bd9Sstevel@tonic-gate * Otherwise, it is not possible to conform to posix .2. 13487c478bd9Sstevel@tonic-gate * 13497c478bd9Sstevel@tonic-gate * You may still turn on I18N, and get as much internationalization as is 13507c478bd9Sstevel@tonic-gate * possible using a standard ANSI-C compiler. 13517c478bd9Sstevel@tonic-gate * 13527c478bd9Sstevel@tonic-gate * Your options are: 13537c478bd9Sstevel@tonic-gate * i) Full posix conformance. You must have i or ii above, and must define 13547c478bd9Sstevel@tonic-gate * M_I18N and M_I18N_MKS_{FULL,XPG}. 13557c478bd9Sstevel@tonic-gate * ii) I18N at ANSI-C level. You must define I18N, do not 13567c478bd9Sstevel@tonic-gate * define M_I18N_MKS_{FULL,XPG}. 13577c478bd9Sstevel@tonic-gate * iii) No I18N. Do not define I18N, do not define M_I18N_MKS_{FULL,XPG}. */ 13587c478bd9Sstevel@tonic-gate #define I18N 1 /* OBSOLESCENT version of I18N 13597c478bd9Sstevel@tonic-gate * This should be removed when all occurances 13607c478bd9Sstevel@tonic-gate * of I18N are removed from the MKS code 13617c478bd9Sstevel@tonic-gate */ 13627c478bd9Sstevel@tonic-gate #define M_I18N 1 /* Do we want internationalized code? To build 13637c478bd9Sstevel@tonic-gate * a system where everything gets deleted at 13647c478bd9Sstevel@tonic-gate * compile time via #define's when possible, 13657c478bd9Sstevel@tonic-gate * this flag should be set. <mks.h> does not 13667c478bd9Sstevel@tonic-gate * define I18N, but it is normal to set it. 13677c478bd9Sstevel@tonic-gate */ 13687c478bd9Sstevel@tonic-gate #define M_I18N_MKS_FULL 1 /* Defining this, indicates you are using 13697c478bd9Sstevel@tonic-gate * MKS i18n extension routines 13707c478bd9Sstevel@tonic-gate * (e.g m_collrange(), m_collequiv() ... 13717c478bd9Sstevel@tonic-gate * localedtconv, localeldconv() ...) 13727c478bd9Sstevel@tonic-gate * Defining this to 2 indicates that you 13737c478bd9Sstevel@tonic-gate * want to use MKS's implementation of these 13747c478bd9Sstevel@tonic-gate * routines and the implementation of MKS's 13757c478bd9Sstevel@tonic-gate * format of the locale data files. 13767c478bd9Sstevel@tonic-gate * Defining this to 1 indicates you don't want 13777c478bd9Sstevel@tonic-gate * MKS's implementation, and you must write 13787c478bd9Sstevel@tonic-gate * your own code for m_collrange(), collequiv() 13797c478bd9Sstevel@tonic-gate * ... 13807c478bd9Sstevel@tonic-gate * note: there are some routines like 13817c478bd9Sstevel@tonic-gate * localedtconv which can obtain the 13827c478bd9Sstevel@tonic-gate * necessary info from nl_langinfo() 13837c478bd9Sstevel@tonic-gate * if this is supported 13847c478bd9Sstevel@tonic-gate * See M_I18N_MKS_XPG below 13857c478bd9Sstevel@tonic-gate */ 13867c478bd9Sstevel@tonic-gate #define M_I18N_MKS_XPG 1 /* This is only useful if M_I18N_MKS_FULL == 1. 13877c478bd9Sstevel@tonic-gate * This flag indicates that nl_langinfo() 13887c478bd9Sstevel@tonic-gate * is available and can be used to 13897c478bd9Sstevel@tonic-gate * retrieve some of the locale information. 13907c478bd9Sstevel@tonic-gate * ( used in localeldconv() and localedtconv() 13917c478bd9Sstevel@tonic-gate * routines) 13927c478bd9Sstevel@tonic-gate */ 13937c478bd9Sstevel@tonic-gate 13947c478bd9Sstevel@tonic-gate #define M_I18N_M_ 1 /* MKS has defined some additions i18n API's. 13957c478bd9Sstevel@tonic-gate * (e.g m_collequiv, m_collrange ...) 13967c478bd9Sstevel@tonic-gate * This flag indicates that these API's start 13977c478bd9Sstevel@tonic-gate * with "m_". 13987c478bd9Sstevel@tonic-gate * It is the MKS intention that if these 13997c478bd9Sstevel@tonic-gate * extentions get approved/standardized 14007c478bd9Sstevel@tonic-gate * (by POSIX or ANSI or ...) 14017c478bd9Sstevel@tonic-gate * all code will have the m_ removed. 14027c478bd9Sstevel@tonic-gate * Since it is not yet approved, 14037c478bd9Sstevel@tonic-gate * we are maintaining the mks conventions of 14047c478bd9Sstevel@tonic-gate * prefixing our private libraries with m_. 14057c478bd9Sstevel@tonic-gate * If you have chosen to implement these 14067c478bd9Sstevel@tonic-gate * routines without the m_ do not define 14077c478bd9Sstevel@tonic-gate * M_I18N_M_ 14087c478bd9Sstevel@tonic-gate */ 14097c478bd9Sstevel@tonic-gate 14107c478bd9Sstevel@tonic-gate #define M_I18N_MB 1 /* Define if multibyte character support 14117c478bd9Sstevel@tonic-gate * is required. 14127c478bd9Sstevel@tonic-gate */ 14137c478bd9Sstevel@tonic-gate 14147c478bd9Sstevel@tonic-gate #define M_LOCALEINFO_IN_DIRECTORY 1 14157c478bd9Sstevel@tonic-gate /* This macro indicates if the locale 14167c478bd9Sstevel@tonic-gate * information is stored in a directory, 14177c478bd9Sstevel@tonic-gate * or in a file. 14187c478bd9Sstevel@tonic-gate * For instance, many systems use 14197c478bd9Sstevel@tonic-gate * /usr/lib/locale 14207c478bd9Sstevel@tonic-gate * as a directory to store all their locale 14217c478bd9Sstevel@tonic-gate * information. 14227c478bd9Sstevel@tonic-gate * In this directory is stored the info 14237c478bd9Sstevel@tonic-gate * for each supported locale. 14247c478bd9Sstevel@tonic-gate * (e.g POSIX, C, en_US, fr, ...) 14257c478bd9Sstevel@tonic-gate * It is assumed that there is one entry here 14267c478bd9Sstevel@tonic-gate * for each supported locale. 14277c478bd9Sstevel@tonic-gate * If these entries are sub-directories, 14287c478bd9Sstevel@tonic-gate * then this macro is defined. 14297c478bd9Sstevel@tonic-gate * If these entries are files, then do not 14307c478bd9Sstevel@tonic-gate * define this macro. 14317c478bd9Sstevel@tonic-gate */ 14327c478bd9Sstevel@tonic-gate 14337c478bd9Sstevel@tonic-gate #undef M_I18N_LOCKING_SHIFT /* Define if any multibyte character sets 14347c478bd9Sstevel@tonic-gate * used are locking-shift character sets. 14357c478bd9Sstevel@tonic-gate */ 14367c478bd9Sstevel@tonic-gate 14377c478bd9Sstevel@tonic-gate 14387c478bd9Sstevel@tonic-gate #undef M_VARIANTS /* This can be defined on EBCDIC systems 14397c478bd9Sstevel@tonic-gate * where the POSIX.2 portable characters are not 14407c478bd9Sstevel@tonic-gate * invariant across all the code pages 14417c478bd9Sstevel@tonic-gate * supported. 14427c478bd9Sstevel@tonic-gate * By defineing this, user is allowed 14437c478bd9Sstevel@tonic-gate * to define the encodings 14447c478bd9Sstevel@tonic-gate * for these characters as they switch between 14457c478bd9Sstevel@tonic-gate * the various code pages by setting up 14467c478bd9Sstevel@tonic-gate * the VARIANTS environment variable.. 14477c478bd9Sstevel@tonic-gate * so that the various utilities will cope 14487c478bd9Sstevel@tonic-gate * with the different encodings gracefully. 14497c478bd9Sstevel@tonic-gate */ 14507c478bd9Sstevel@tonic-gate /* Source code hints: 14517c478bd9Sstevel@tonic-gate * if you define this, you will need 14527c478bd9Sstevel@tonic-gate * h/variant.h, h/m_invari.h 14537c478bd9Sstevel@tonic-gate * libc/mks/getsyntx.c, 14547c478bd9Sstevel@tonic-gate * libc/mks/m_varian.c 14557c478bd9Sstevel@tonic-gate * 14567c478bd9Sstevel@tonic-gate * If this is not defined, then all you need 14577c478bd9Sstevel@tonic-gate * is 14587c478bd9Sstevel@tonic-gate * h/m_invar.h 14597c478bd9Sstevel@tonic-gate */ 14607c478bd9Sstevel@tonic-gate 14617c478bd9Sstevel@tonic-gate /* 14627c478bd9Sstevel@tonic-gate * Define the following if you want the corresponding posix define with 14637c478bd9Sstevel@tonic-gate * a single leading underscore 14647c478bd9Sstevel@tonic-gate */ 14657c478bd9Sstevel@tonic-gate #define __POSIX_JOB_CONTROL _POSIX_JOB_CONTROL 14667c478bd9Sstevel@tonic-gate #define __POSIX_SAVED_IDS _POSIX_SAVED_IDS 14677c478bd9Sstevel@tonic-gate #define __POSIX_NO_TRUNC (-1) 14687c478bd9Sstevel@tonic-gate #define __POSIX_VDISABLE 0xff 14697c478bd9Sstevel@tonic-gate 14707c478bd9Sstevel@tonic-gate /* 14717c478bd9Sstevel@tonic-gate * On some systems where code size and performance are problems, it 14727c478bd9Sstevel@tonic-gate * may be desirable to use a simplified version of the m_loxclose() routine 14737c478bd9Sstevel@tonic-gate * in programs that don't require the full functionality. If this is the 14747c478bd9Sstevel@tonic-gate * case and routine m_loxqclose() has been provided, define the following 14757c478bd9Sstevel@tonic-gate * macro. (Refer to the Library/eXecutable/Object interface documentation 14767c478bd9Sstevel@tonic-gate * for more information. 14777c478bd9Sstevel@tonic-gate */ 14787c478bd9Sstevel@tonic-gate #undef M_LOXQCLOSE 14797c478bd9Sstevel@tonic-gate 14807c478bd9Sstevel@tonic-gate /* 14817c478bd9Sstevel@tonic-gate * some systems require overrides after <mks.h> is read. 14827c478bd9Sstevel@tonic-gate * If your system requires this, define M_MKSEXTRA_H here 14837c478bd9Sstevel@tonic-gate * so that the "#include <mksextra.h>" is exposed in <mks.h> 14847c478bd9Sstevel@tonic-gate */ 14857c478bd9Sstevel@tonic-gate #undef M_MKSEXTRA_H 14867c478bd9Sstevel@tonic-gate 14877c478bd9Sstevel@tonic-gate /* 14887c478bd9Sstevel@tonic-gate * mailx configuration 14897c478bd9Sstevel@tonic-gate */ 14907c478bd9Sstevel@tonic-gate 14917c478bd9Sstevel@tonic-gate /* 14927c478bd9Sstevel@tonic-gate * Many mail systems support the non-standard "Content-Length" header 14937c478bd9Sstevel@tonic-gate * which contains the length of the body of the message (not including 14947c478bd9Sstevel@tonic-gate * the headers) in bytes. Defining M_MAILX_CONTENT_LENGTH_ENABLE will 14957c478bd9Sstevel@tonic-gate * turn on code in mailx to generate this header when mail is sent and 14967c478bd9Sstevel@tonic-gate * honour it when scanning mailboxes. 14977c478bd9Sstevel@tonic-gate */ 14987c478bd9Sstevel@tonic-gate #undef M_MAILX_CONTENT_LENGHT_ENABLE 14997c478bd9Sstevel@tonic-gate 15007c478bd9Sstevel@tonic-gate #endif /* 0. not required for POSIX systems; here for documentation only */ 15017c478bd9Sstevel@tonic-gate 15027c478bd9Sstevel@tonic-gate 15037c478bd9Sstevel@tonic-gate #define halloc(n,s) malloc((size_t)((n)*(s)))/* alloc big chunk of mem*/ 15047c478bd9Sstevel@tonic-gate #define hfree(ptr) free(ptr) /* free big chunk of mem */ 15057c478bd9Sstevel@tonic-gate #define m_cp(src, dest, ssb, flags) (M_CP_NOOP) 15067c478bd9Sstevel@tonic-gate #define rootname(fn) fn /* make relative to root */ 15077c478bd9Sstevel@tonic-gate 15087c478bd9Sstevel@tonic-gate 15097c478bd9Sstevel@tonic-gate /* 15107c478bd9Sstevel@tonic-gate * MKS makes use of types that may or may not already be defined in the 15117c478bd9Sstevel@tonic-gate * system <sys/types.h> file. If not defined, then they must be defined 15127c478bd9Sstevel@tonic-gate * here. (The problem is a lack of #if directive to determine an existing 15137c478bd9Sstevel@tonic-gate * typedef. 15147c478bd9Sstevel@tonic-gate */ 15157c478bd9Sstevel@tonic-gate typedef unsigned char uchar; 15167c478bd9Sstevel@tonic-gate typedef unsigned short ushort; 15177c478bd9Sstevel@tonic-gate typedef unsigned int uint; 15187c478bd9Sstevel@tonic-gate typedef unsigned long ulong; 15197c478bd9Sstevel@tonic-gate 15207c478bd9Sstevel@tonic-gate /* 15217c478bd9Sstevel@tonic-gate * Define any Optional Facility Configuration Values here. 15227c478bd9Sstevel@tonic-gate * See POSIX.2, 2.13.2, Table 2-18 15237c478bd9Sstevel@tonic-gate * We define them here as M_ entries; this allows unistd.h to test the 15247c478bd9Sstevel@tonic-gate * M_ variable, and if defined, define the official _POSIX2_ variable. 15257c478bd9Sstevel@tonic-gate * **Note: It isn't permitted for a real conforming unistd.h to #include <mks.h> 15267c478bd9Sstevel@tonic-gate * due to name space contamination problems. A real, conforming implementation 15277c478bd9Sstevel@tonic-gate * will manually modify their unistd.h to define the _POSIX2 variables 15287c478bd9Sstevel@tonic-gate * appropriately. 15297c478bd9Sstevel@tonic-gate */ 15307c478bd9Sstevel@tonic-gate #define M_POSIX2_C_BIND 1 15317c478bd9Sstevel@tonic-gate #define M_POSIX2_C_DEV 1 15327c478bd9Sstevel@tonic-gate #undef M_POSIX2_FORT_DEV 15337c478bd9Sstevel@tonic-gate #undef M_POSIX2_FORT_RUN 15347c478bd9Sstevel@tonic-gate #define M_POSIX2_LOCALEDEF 1 15357c478bd9Sstevel@tonic-gate #define M_POSIX2_SW_DEV 1 15367c478bd9Sstevel@tonic-gate 15377c478bd9Sstevel@tonic-gate /* 15387c478bd9Sstevel@tonic-gate * New definitions for I/PSU 3.3 15397c478bd9Sstevel@tonic-gate */ 15407c478bd9Sstevel@tonic-gate 15417c478bd9Sstevel@tonic-gate #undef M_POSIX_PFNCS_ONLY /* define this to be true if the implementation 15427c478bd9Sstevel@tonic-gate * only supports the portable filename 15437c478bd9Sstevel@tonic-gate * set as defined in POSIX.1 15447c478bd9Sstevel@tonic-gate */ 15457c478bd9Sstevel@tonic-gate 15467c478bd9Sstevel@tonic-gate #undef M_NO_STIME /* set this define to be true if the system 15477c478bd9Sstevel@tonic-gate * does not support the stime() API. 15487c478bd9Sstevel@tonic-gate */ 15497c478bd9Sstevel@tonic-gate 15507c478bd9Sstevel@tonic-gate #undef M_TTYSTREAM /* if it isn't possible to open a new console 15517c478bd9Sstevel@tonic-gate * stream through device names, define this 15527c478bd9Sstevel@tonic-gate * macro to be true. The support library must 15537c478bd9Sstevel@tonic-gate * define a routine "m_ttystream()" that can 15547c478bd9Sstevel@tonic-gate * return the required stream. 15557c478bd9Sstevel@tonic-gate */ 15567c478bd9Sstevel@tonic-gate 15577c478bd9Sstevel@tonic-gate #undef M_NOT_ROOT /* this should be defined to be the name of a 15587c478bd9Sstevel@tonic-gate * library routine that returns true if the 15597c478bd9Sstevel@tonic-gate * process has appropriate privileges 15607c478bd9Sstevel@tonic-gate */ 15617c478bd9Sstevel@tonic-gate 15627c478bd9Sstevel@tonic-gate #undef M_NO_VI_KEYPAD /* this should be defined when the system 15637c478bd9Sstevel@tonic-gate * can't support keypad and cursor-key 15647c478bd9Sstevel@tonic-gate * functions in vi. 15657c478bd9Sstevel@tonic-gate */ 15667c478bd9Sstevel@tonic-gate 15677c478bd9Sstevel@tonic-gate #undef M_USERID_FMT /* format string for printing out the user 15687c478bd9Sstevel@tonic-gate * name. It is "%-8.8s" by default. 15697c478bd9Sstevel@tonic-gate */ 15707c478bd9Sstevel@tonic-gate 15717c478bd9Sstevel@tonic-gate #undef M_USE_M_CP /* indicates that code is to use the m_cp() 15727c478bd9Sstevel@tonic-gate * interface. 15737c478bd9Sstevel@tonic-gate * (Note - this API is not fully supported 15747c478bd9Sstevel@tonic-gate * in the IPSU.3.X development line. Full 15757c478bd9Sstevel@tonic-gate * support will be available in a future 15767c478bd9Sstevel@tonic-gate * major release.) 15777c478bd9Sstevel@tonic-gate */ 15787c478bd9Sstevel@tonic-gate 15797c478bd9Sstevel@tonic-gate #undef M_GUESS_FILE_TYPE /* If the system provides alternative 15807c478bd9Sstevel@tonic-gate * mechanisms for determining the type of a 15817c478bd9Sstevel@tonic-gate * file, define this macro to true. If you are 15827c478bd9Sstevel@tonic-gate * using this feature, you must provide a new 15837c478bd9Sstevel@tonic-gate * function int m_guess_file_type(char *name); 15847c478bd9Sstevel@tonic-gate * Returns true if type of file name is 15857c478bd9Sstevel@tonic-gate * successfully identified. 15867c478bd9Sstevel@tonic-gate * (Note - this API is not fully supported in 15877c478bd9Sstevel@tonic-gate * the IPSU.3.X development line. Full 15887c478bd9Sstevel@tonic-gate * support will be available in a future 15897c478bd9Sstevel@tonic-gate * major release.) 15907c478bd9Sstevel@tonic-gate */ 15917c478bd9Sstevel@tonic-gate 15927c478bd9Sstevel@tonic-gate #undef M_INCR_NICE /* default nice incr, if this macro is not 15937c478bd9Sstevel@tonic-gate * defined a builtin default will be used 15947c478bd9Sstevel@tonic-gate * (see the source for nice for more details.) 15957c478bd9Sstevel@tonic-gate */ 15967c478bd9Sstevel@tonic-gate 15977c478bd9Sstevel@tonic-gate #undef M_INCR_RENICE /* default renice incr, if this macro is 15987c478bd9Sstevel@tonic-gate * not defined a builtin default will be 15997c478bd9Sstevel@tonic-gate * used (see the source for renice for more 16007c478bd9Sstevel@tonic-gate * details.) 16017c478bd9Sstevel@tonic-gate */ 16027c478bd9Sstevel@tonic-gate 16037c478bd9Sstevel@tonic-gate #undef M_PS_COMM_WIDTH /* width of command field printed by PS */ 16047c478bd9Sstevel@tonic-gate 16057c478bd9Sstevel@tonic-gate #undef M_PS_USER_WIDTH /* width of user and ruser fields printed by 16067c478bd9Sstevel@tonic-gate * PS 16077c478bd9Sstevel@tonic-gate */ 16087c478bd9Sstevel@tonic-gate 16097c478bd9Sstevel@tonic-gate #undef M_PS_PRI_WIDTH /* width of PRI field printed by PS */ 16107c478bd9Sstevel@tonic-gate 16117c478bd9Sstevel@tonic-gate #undef M_UT_TIME_STRING /* true if utmp ut_time struct is a string 16127c478bd9Sstevel@tonic-gate * instead of a number. 16137c478bd9Sstevel@tonic-gate */ 16147c478bd9Sstevel@tonic-gate 16157c478bd9Sstevel@tonic-gate #undef M_SH_ENTRY1 16167c478bd9Sstevel@tonic-gate #undef M_SH_ENTRY2 16177c478bd9Sstevel@tonic-gate #undef M_SH_ENTRY3 16187c478bd9Sstevel@tonic-gate /* The above 3 macros are provide in the 16197c478bd9Sstevel@tonic-gate * shell to allow system-specific extensions 16207c478bd9Sstevel@tonic-gate * to be added. 16217c478bd9Sstevel@tonic-gate * (Note - this API is not fully supported in 16227c478bd9Sstevel@tonic-gate * the IPSU.3.X development line. Full 16237c478bd9Sstevel@tonic-gate * support will be available in a future 16247c478bd9Sstevel@tonic-gate * major release.) 16257c478bd9Sstevel@tonic-gate */ 16267c478bd9Sstevel@tonic-gate 16277c478bd9Sstevel@tonic-gate #undef M_NO_CANONICAL_MODE /* set this macro to true if the system 16287c478bd9Sstevel@tonic-gate * doesn't support tty buffering in 16297c478bd9Sstevel@tonic-gate * canonical mode. 16307c478bd9Sstevel@tonic-gate */ 16317c478bd9Sstevel@tonic-gate 16327c478bd9Sstevel@tonic-gate #undef M_NO_PASSWD_SCAN /* true if system doesn't provide a 16337c478bd9Sstevel@tonic-gate * mechanism for scanning a list of all 16347c478bd9Sstevel@tonic-gate * users on the system. 16357c478bd9Sstevel@tonic-gate */ 16367c478bd9Sstevel@tonic-gate 16377c478bd9Sstevel@tonic-gate #define M_GROUP_PASSWD(grp) "" 16387c478bd9Sstevel@tonic-gate /* prototype: 16397c478bd9Sstevel@tonic-gate * char *M_GROUP_PASSWD(struct group *grp) 16407c478bd9Sstevel@tonic-gate * This api returns a pointer to a string 16417c478bd9Sstevel@tonic-gate * that contains the password for group 'grp'. 16427c478bd9Sstevel@tonic-gate * If no password is available, then an empty string should be 16437c478bd9Sstevel@tonic-gate * returned. 16447c478bd9Sstevel@tonic-gate * 16457c478bd9Sstevel@tonic-gate * On historical UNIX systems, group passwords are found in 16467c478bd9Sstevel@tonic-gate * the gr_passwd member in struct group. 16477c478bd9Sstevel@tonic-gate * Thus, this macro should be defined as 16487c478bd9Sstevel@tonic-gate * #define M_GROUP_PASSWD(grp) grp->gr_passwd 16497c478bd9Sstevel@tonic-gate * 16507c478bd9Sstevel@tonic-gate * On systems that do not provide group passwords, 16517c478bd9Sstevel@tonic-gate * then macro can be defined as an empty string: 16527c478bd9Sstevel@tonic-gate * #define M_GROUP_PASSWD(grp) "" 16537c478bd9Sstevel@tonic-gate * 16547c478bd9Sstevel@tonic-gate */ 16557c478bd9Sstevel@tonic-gate 16567c478bd9Sstevel@tonic-gate 16577c478bd9Sstevel@tonic-gate #undef M_RCS_NORCSLIB /* Set this macro to true in order 16587c478bd9Sstevel@tonic-gate * remove rcslib dependency of utilities 16597c478bd9Sstevel@tonic-gate * such as ident. 16607c478bd9Sstevel@tonic-gate */ 16617c478bd9Sstevel@tonic-gate 16627c478bd9Sstevel@tonic-gate #undef M_CHMOD_LINK /* Set this macro to true if the system is 16637c478bd9Sstevel@tonic-gate * able to perform a chmod() of a link as 16647c478bd9Sstevel@tonic-gate * opposed to following the link. 16657c478bd9Sstevel@tonic-gate */ 16667c478bd9Sstevel@tonic-gate /* 16677c478bd9Sstevel@tonic-gate * Include any system-specific prototypes here 16687c478bd9Sstevel@tonic-gate */ 16697c478bd9Sstevel@tonic-gate 16707c478bd9Sstevel@tonic-gate /* 16717c478bd9Sstevel@tonic-gate * Include any #define's to avoid name clashes with namespace polluting 16727c478bd9Sstevel@tonic-gate * operating system routines 16737c478bd9Sstevel@tonic-gate * 16747c478bd9Sstevel@tonic-gate * e.g.: #define openfile MKSopenfile 16757c478bd9Sstevel@tonic-gate */ 16767c478bd9Sstevel@tonic-gate 1677