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