xref: /titanic_51/usr/src/lib/libbc/inc/include/stdlib.h (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 
38 extern 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 */
44 extern int	abort(/* void */);
45 extern int	abs(/* int j */);
46 extern double	atof(/* const char *nptr */);
47 extern int	atoi(/* const char *nptr */);
48 extern long int	atol(/* const char *nptr */);
49 extern char *	bsearch(/* const void *key, const void *base, size_t nmemb,
50 		    size_t size, int (*compar)(const void *, const void *) */);
51 extern char *	calloc(/* size_t nmemb, size_t size */);
52 extern int	exit(/* int status */);
53 extern int	free(/* void *ptr */);
54 extern char *	getenv(/* const char *name */);
55 extern char *	malloc(/* size_t size */);
56 extern int	qsort(/* void *base, size_t nmemb, size_t size,
57 		    int (*compar)(const void *, const void *) */);
58 extern int	rand(/* void */);
59 extern char *	realloc(/* void *ptr, size_t size */);
60 extern int	srand(/* unsigned int seed */);
61 
62 extern int    mbtowc(/* wchar_t *pwc, const char *s, size_t n */);
63 extern int    wctomb(/* char *s, wchar_t wchar */);
64 extern size_t mbstowcs(/* wchar_t *pwcs, const char *s, size_t n */);
65 extern size_t wcstombs(/* char *s, const wchar_t *pwcs, size_t n */);
66 
67 #endif
68