2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * <mkslocal.h>, Solaris2 Version - local <mks.h> requirements
2N/A *
2N/A * Copyright 1995-1996 (c) Sun Microsystems Inc.
2N/A * All rights reserved.
2N/A *
2N/A */
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A
2N/A#define _ALL_SOURCE
2N/A
2N/A#include <sys/types.h>
2N/A
2N/A#include <stdlib.h>
2N/A#include <limits.h>
2N/A#include <wchar.h>
2N/A#include <widec.h>
2N/A#include <wctype.h>
2N/A
2N/Atypedef unsigned char uchar;
2N/A
2N/A#define SYSV 1 /* System V compatible */
2N/A
2N/A#ifndef VERSION
2N/A/* Used for in sh, vi ... */
2N/A#define VERSION "MKS InterOpen IXCU 4.3 MB - SUN/SOLARIS2"
2N/A#endif
2N/A
2N/A/*
2N/A * Assume that rootname() is called to prepend the proper path prefix
2N/A */
2N/A#define M_CS_PATH "/usr/xpg4/bin" /* posix.2 utilities */
2N/A#define M_CS_SHELL "/usr/xpg4/bin/sh" /* posix.2 sh */
2N/A
2N/A#define M_CS_BINDIR "/usr/bin"
2N/A#define M_CS_ETCDIR "/etc"
2N/A#define M_CS_LIBDIR "/usr/lib"
2N/A#define M_CS_SPOOLDIR "/var/spool"
2N/A#define M_CS_MANPATH "/usr/man"
2N/A#define M_CS_TMPDIR "/tmp"
2N/A#define M_CS_NLSDIR "/usr/lib/locale"
2N/A
2N/A#define M_BINDIR(path) M_CS_BINDIR"/" #path
2N/A#define M_ETCDIR(path) M_CS_ETCDIR"/" #path
2N/A#define M_LIBDIR(path) M_CS_LIBDIR"/" #path
2N/A#define M_SPOOLDIR(path) M_CS_SPOOLDIR"/" #path
2N/A#define M_NLSDIR(path) M_CS_NLSDIR"/" #path
2N/A
2N/A/*
2N/A * M_MANPATH - list of pathnames to be used by man utility
2N/A * M_TMPDIR - pathname of temporary
2N/A */
2N/A#define M_MANPATH M_CS_MANPATH"/"
2N/A#define M_TMPDIR M_CS_TMPDIR"/"
2N/A#define M_SYSTEM_TMPDIR "/tmp"
2N/A
2N/A#define M_NL_DOM "mks"
2N/A#define DEF_NLSPATH "/usr/lib/locale/%L/LC_MESSAGES"
2N/A
2N/A#define M_RCS_NORCSLIB 1 /* don't use rcslib or its includes */
2N/A
2N/A#define M_MALLOC 1
2N/A#define M_REALLOC 1
2N/A#ifdef M_REALLOC
2N/A#define M_WANT_ANSI_REALLOC 1
2N/A#endif
2N/A
2N/A#define __LDATA__ 1 /* Deprecated */
2N/A#define M_LDATA 1
2N/A
2N/A#define halloc(n, s) malloc((size_t)((n)*(s)))
2N/A#define hfree(ptr) free(ptr)
2N/A#define M_FSDELIM(c) ((c) == '/')
2N/A
2N/A/* On POSIX and UNIX there is nothing special to do */
2N/A#define m_cp(src, dest, ssb, flags) (M_CP_NOOP)
2N/A
2N/A#define __POSIX_JOB_CONTROL /* POSIX.1 job control */
2N/A#define __POSIX_WAIT_NOHANG /* waitpid WNOHANG available */
2N/A#define __POSIX_SAVED_IDS _POSIX_SAVED_IDS
2N/A#define __POSIX_NO_TRUNC -1 /* automatic truncation */
2N/A#define __POSIX_VDISABLE 0x00 /* Disable function in termios.h */
2N/A
2N/A/*
2N/A * added for optional facility configuration values
2N/A */
2N/A#define M_POSIX2_C_BIND 1
2N/A#define M_POSIX2_C_DEV 1
2N/A#define M_POSIX2_FORT_DEV 1
2N/A#undef M_POSIX2_FORT_RUN
2N/A#define M_POSIX2_LOCALEDEF 1
2N/A#define M_POSIX2_SW_DEV 1
2N/A#define M_POSIX2_UPE 1
2N/A#define M_POSIX2_CHAR_TERM 1
2N/A
2N/A#undef M_FCLOSE_NOT_POSIX_1 /* Not POSIX.1 section 8.2 */
2N/A#undef M_FFLUSH_NOT_POSIX_1 /* Not POSIX.1 section 8.2 */
2N/A
2N/A#define M_BSD_SPRINTF 0 /* sprintf on this system has BSD */
2N/A /* semantics, does not return length */
2N/A#define M_ENDPWENT 1 /* set to 1 if system provides a */
2N/A /* getpwent() routine */
2N/A#define M_MATHERR 1 /* math library supports matherr() */
2N/A
2N/A#define M_LOGGER_CONSOLE "/dev/console"
2N/A
2N/A#define M_SVFS_INO 1
2N/A
2N/A/*
2N/A * Set I18N flags
2N/A */
2N/A#define M_I18N 1 /* turn on internationalizaion */
2N/A#define I18N 1 /* OBSOLESCENT version of M_I18N */
2N/A
2N/A#define M_I18N_M_ 1 /* Uses m_ on MKS i18n extension routines */
2N/A#define M_I18N_MKS_XPG 1 /* Use NL info from XPG4 */
2N/A#define M_I18N_MKS_FULL 0 /* Full mks extensions */
2N/A#define M_I18N_MB 1 /* Enable multibyte compilation */
2N/A#undef M_I18N_LOCKING_SHIFT /* No locking-shift character sets. */
2N/A#undef M_VARIANTS /* Invariant characters are */
2N/A
2N/A/*
2N/A * Interopen Curses for Solaris2
2N/A */
2N/A#undef M_CURSES_MEMMAPPED
2N/A#define M_TERM_NAME "vt100"
2N/A#define M_TERMINFO_DIR "/usr/share/lib/terminfo"
2N/A#define M_CURSES_VERSION "MKS I/XCU 4.3 Curses"
2N/A
2N/A#define M_ULIMIT_AVAIL 1 /* <ulimit.h> file available */
2N/A#define M_EXPR_POSIX 1 /* decimal only on the expr command line */
2N/A
2N/A#define M_PATH_MAX PATH_MAX
2N/A
2N/A/*
2N/A * Solaris 2 does not use stateful encoding, so we will just convert these
2N/A * to their stateless equivalent.
2N/A */
2N/A#ifndef _MBSTATE_T
2N/A#define _MBSTATE_T
2N/Atypedef int mbstate_t;
2N/A#endif /* ! _MBSTATE_T */
2N/A
2N/A#define mbrlen(c, n, ps) mblen(c, n)
2N/A#define wcrtomb(c, w, s) wctomb(c, w)
2N/A#define mbrtowc(p, w, n, s) mbtowc(p, w, n)
2N/A
2N/A#define wcsrtombs(w, c, n, s) wcstombs(w, c, n)
2N/A#define mbsrtowcs(c, w, n, s) mbstowcs(c, w, n)