1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * <mkslocal.h>, Solaris2 Version - local <mks.h> requirements 24 * 25 * Copyright 1995-1996 (c) Sun Microsystems Inc. 26 * All rights reserved. 27 * 28 */ 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 33 #define _ALL_SOURCE 34 35 #include <sys/types.h> 36 37 #include <stdlib.h> 38 #include <limits.h> 39 #include <wchar.h> 40 #include <widec.h> 41 #include <wctype.h> 42 43 typedef unsigned char uchar; 44 45 #define SYSV 1 /* System V compatible */ 46 47 #ifndef VERSION 48 /* Used for in sh, vi ... */ 49 #define VERSION "MKS InterOpen IXCU 4.3 MB - SUN/SOLARIS2" 50 #endif 51 52 /* 53 * Assume that rootname() is called to prepend the proper path prefix 54 */ 55 #define M_CS_PATH "/usr/xpg4/bin" /* posix.2 utilities */ 56 #define M_CS_SHELL "/usr/xpg4/bin/sh" /* posix.2 sh */ 57 58 #define M_CS_BINDIR "/usr/bin" 59 #define M_CS_ETCDIR "/etc" 60 #define M_CS_LIBDIR "/usr/lib" 61 #define M_CS_SPOOLDIR "/var/spool" 62 #define M_CS_MANPATH "/usr/man" 63 #define M_CS_TMPDIR "/tmp" 64 #define M_CS_NLSDIR "/usr/lib/locale" 65 66 #define M_BINDIR(path) M_CS_BINDIR"/" #path 67 #define M_ETCDIR(path) M_CS_ETCDIR"/" #path 68 #define M_LIBDIR(path) M_CS_LIBDIR"/" #path 69 #define M_SPOOLDIR(path) M_CS_SPOOLDIR"/" #path 70 #define M_NLSDIR(path) M_CS_NLSDIR"/" #path 71 72 /* 73 * M_MANPATH - list of pathnames to be used by man utility 74 * M_TMPDIR - pathname of temporary 75 */ 76 #define M_MANPATH M_CS_MANPATH"/" 77 #define M_TMPDIR M_CS_TMPDIR"/" 78 #define M_SYSTEM_TMPDIR "/tmp" 79 80 #define M_NL_DOM "mks" 81 #define DEF_NLSPATH "/usr/lib/locale/%L/LC_MESSAGES" 82 83 #define M_RCS_NORCSLIB 1 /* don't use rcslib or its includes */ 84 85 #define M_MALLOC 1 86 #define M_REALLOC 1 87 #ifdef M_REALLOC 88 #define M_WANT_ANSI_REALLOC 1 89 #endif 90 91 #define __LDATA__ 1 /* Deprecated */ 92 #define M_LDATA 1 93 94 #define halloc(n, s) malloc((size_t)((n)*(s))) 95 #define hfree(ptr) free(ptr) 96 #define M_FSDELIM(c) ((c) == '/') 97 98 /* On POSIX and UNIX there is nothing special to do */ 99 #define m_cp(src, dest, ssb, flags) (M_CP_NOOP) 100 101 #define __POSIX_JOB_CONTROL /* POSIX.1 job control */ 102 #define __POSIX_WAIT_NOHANG /* waitpid WNOHANG available */ 103 #define __POSIX_SAVED_IDS _POSIX_SAVED_IDS 104 #define __POSIX_NO_TRUNC -1 /* automatic truncation */ 105 #define __POSIX_VDISABLE 0x00 /* Disable function in termios.h */ 106 107 /* 108 * added for optional facility configuration values 109 */ 110 #define M_POSIX2_C_BIND 1 111 #define M_POSIX2_C_DEV 1 112 #define M_POSIX2_FORT_DEV 1 113 #undef M_POSIX2_FORT_RUN 114 #define M_POSIX2_LOCALEDEF 1 115 #define M_POSIX2_SW_DEV 1 116 #define M_POSIX2_UPE 1 117 #define M_POSIX2_CHAR_TERM 1 118 119 #undef M_FCLOSE_NOT_POSIX_1 /* Not POSIX.1 section 8.2 */ 120 #undef M_FFLUSH_NOT_POSIX_1 /* Not POSIX.1 section 8.2 */ 121 122 #define M_BSD_SPRINTF 0 /* sprintf on this system has BSD */ 123 /* semantics, does not return length */ 124 #define M_ENDPWENT 1 /* set to 1 if system provides a */ 125 /* getpwent() routine */ 126 #define M_MATHERR 1 /* math library supports matherr() */ 127 128 #define M_LOGGER_CONSOLE "/dev/console" 129 130 #define M_SVFS_INO 1 131 132 /* 133 * Set I18N flags 134 */ 135 #define M_I18N 1 /* turn on internationalizaion */ 136 #define I18N 1 /* OBSOLESCENT version of M_I18N */ 137 138 #define M_I18N_M_ 1 /* Uses m_ on MKS i18n extension routines */ 139 #define M_I18N_MKS_XPG 1 /* Use NL info from XPG4 */ 140 #define M_I18N_MKS_FULL 0 /* Full mks extensions */ 141 #define M_I18N_MB 1 /* Enable multibyte compilation */ 142 #undef M_I18N_LOCKING_SHIFT /* No locking-shift character sets. */ 143 #undef M_VARIANTS /* Invariant characters are */ 144 145 /* 146 * Interopen Curses for Solaris2 147 */ 148 #undef M_CURSES_MEMMAPPED 149 #define M_TERM_NAME "vt100" 150 #define M_TERMINFO_DIR "/usr/share/lib/terminfo" 151 #define M_CURSES_VERSION "MKS I/XCU 4.3 Curses" 152 153 #define M_ULIMIT_AVAIL 1 /* <ulimit.h> file available */ 154 #define M_EXPR_POSIX 1 /* decimal only on the expr command line */ 155 156 #define M_PATH_MAX PATH_MAX 157 158 /* 159 * Solaris 2 does not use stateful encoding, so we will just convert these 160 * to their stateless equivalent. 161 */ 162 #ifndef _MBSTATE_T 163 #define _MBSTATE_T 164 typedef int mbstate_t; 165 #endif /* ! _MBSTATE_T */ 166 167 #define mbrlen(c, n, ps) mblen(c, n) 168 #define wcrtomb(c, w, s) wctomb(c, w) 169 #define mbrtowc(p, w, n, s) mbtowc(p, w, n) 170 171 #define wcsrtombs(w, c, n, s) wcstombs(w, c, n) 172 #define mbsrtowcs(c, w, n, s) mbstowcs(c, w, n) 173