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 * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#pragma ident	"%Z%%M%	%I%	%E% SMI"
28
29/*
30 * stdlib.h
31 */
32
33#ifndef	__stdlib_h
34#define	__stdlib_h
35
36#include <sys/stdtypes.h>	/* to get size_t */
37
38extern unsigned int _mb_cur_max;
39#define MB_CUR_MAX    _mb_cur_max
40
41#define	mblen(s, n)	mbtowc((wchar_t *)0, s, n)
42
43/* declaration of various libc functions */
44extern int	abort(/* void */);
45extern int	abs(/* int j */);
46extern double	atof(/* const char *nptr */);
47extern int	atoi(/* const char *nptr */);
48extern long int	atol(/* const char *nptr */);
49extern char *	bsearch(/* const void *key, const void *base, size_t nmemb,
50		    size_t size, int (*compar)(const void *, const void *) */);
51extern char *	calloc(/* size_t nmemb, size_t size */);
52extern int	exit(/* int status */);
53extern int	free(/* void *ptr */);
54extern char *	getenv(/* const char *name */);
55extern char *	malloc(/* size_t size */);
56extern int	qsort(/* void *base, size_t nmemb, size_t size,
57		    int (*compar)(const void *, const void *) */);
58extern int	rand(/* void */);
59extern char *	realloc(/* void *ptr, size_t size */);
60extern int	srand(/* unsigned int seed */);
61
62extern int    mbtowc(/* wchar_t *pwc, const char *s, size_t n */);
63extern int    wctomb(/* char *s, wchar_t wchar */);
64extern size_t mbstowcs(/* wchar_t *pwcs, const char *s, size_t n */);
65extern size_t wcstombs(/* char *s, const wchar_t *pwcs, size_t n */);
66
67#endif
68