xref: /onnv-gate/usr/src/lib/libc/port/llib-lc (revision 13093:48f2dbca79a2)
10Sstevel@tonic-gate/*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
51645Scomay * Common Development and Distribution License (the "License").
61645Scomay * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
211645Scomay
220Sstevel@tonic-gate/*
23*13093SRoger.Faulkner@Oracle.COM * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
240Sstevel@tonic-gate */
250Sstevel@tonic-gate
260Sstevel@tonic-gate/* LINTLIBRARY */
270Sstevel@tonic-gate/* PROTOLIB1 */
280Sstevel@tonic-gate
29*13093SRoger.Faulkner@Oracle.COM#define	__EXTENSIONS__
30*13093SRoger.Faulkner@Oracle.COM
312248Sraf#include <aio.h>
320Sstevel@tonic-gate#include <alloca.h>
335331Samw#include <attr.h>
340Sstevel@tonic-gate#include <atomic.h>
350Sstevel@tonic-gate#include <ctype.h>
362923Sraf#include <deflt.h>
370Sstevel@tonic-gate#include <dirent.h>
380Sstevel@tonic-gate#include <dlfcn.h>
390Sstevel@tonic-gate#include <door.h>
404891Svk199839#include <err.h>
410Sstevel@tonic-gate#include <sys/errno.h>
420Sstevel@tonic-gate#include <euc.h>
430Sstevel@tonic-gate#include <fcntl.h>
440Sstevel@tonic-gate#include <float.h>
450Sstevel@tonic-gate#include <fmtmsg.h>
460Sstevel@tonic-gate#include <fnmatch.h>
470Sstevel@tonic-gate#include <ftw.h>
480Sstevel@tonic-gate#include <getwidth.h>
490Sstevel@tonic-gate#include <grp.h>
500Sstevel@tonic-gate#include <iconv.h>
510Sstevel@tonic-gate#include <langinfo.h>
520Sstevel@tonic-gate#include <libgen.h>
530Sstevel@tonic-gate#include <libw.h>
540Sstevel@tonic-gate#include <locale.h>
550Sstevel@tonic-gate#include <memory.h>
560Sstevel@tonic-gate#include <mon.h>
572248Sraf#include <mqueue.h>
580Sstevel@tonic-gate#include <nan.h>
590Sstevel@tonic-gate#include <ndbm.h>
600Sstevel@tonic-gate#include <limits.h>
610Sstevel@tonic-gate#include <nl_types.h>
62*13093SRoger.Faulkner@Oracle.COM#include <poll.h>
630Sstevel@tonic-gate#include <project.h>
640Sstevel@tonic-gate#include <priv.h>
650Sstevel@tonic-gate#include <pwd.h>
660Sstevel@tonic-gate#include <rctl.h>
670Sstevel@tonic-gate#include <regex.h>
680Sstevel@tonic-gate#include <rpcsvc/ypclnt.h>
692248Sraf#include <sched.h>
700Sstevel@tonic-gate#include <search.h>
712248Sraf#include <semaphore.h>
720Sstevel@tonic-gate#include <setjmp.h>
730Sstevel@tonic-gate#include <shadow.h>
740Sstevel@tonic-gate#include <siginfo.h>
750Sstevel@tonic-gate#include <signal.h>
760Sstevel@tonic-gate#include <stdarg.h>
770Sstevel@tonic-gate#include <ucred.h>
780Sstevel@tonic-gate#include <sys/ucred.h>
790Sstevel@tonic-gate#include <unistd.h>
800Sstevel@tonic-gate#include <ulimit.h>
810Sstevel@tonic-gate#include <utime.h>
820Sstevel@tonic-gate#include <stddef.h>
830Sstevel@tonic-gate#include <stdio.h>
840Sstevel@tonic-gate#include <stdlib.h>
850Sstevel@tonic-gate#include <string.h>
860Sstevel@tonic-gate#include <stropts.h>
870Sstevel@tonic-gate#include <synch.h>
880Sstevel@tonic-gate#include <sys/acctctl.h>
890Sstevel@tonic-gate#include <sys/acl.h>
902248Sraf#include <sys/asynch.h>
910Sstevel@tonic-gate#include <sys/byteorder.h>
920Sstevel@tonic-gate#include <sys/cladm.h>
930Sstevel@tonic-gate#include <sys/corectl.h>
940Sstevel@tonic-gate#include <sys/dl.h>
950Sstevel@tonic-gate#include <sys/exacct.h>
960Sstevel@tonic-gate#include <sys/fcntl.h>
970Sstevel@tonic-gate#include <sys/file.h>
980Sstevel@tonic-gate#include <sys/fs/namenode.h>
990Sstevel@tonic-gate#include <sys/instance.h>
1000Sstevel@tonic-gate#include <sys/ipc.h>
1010Sstevel@tonic-gate#include <sys/lwp.h>
1020Sstevel@tonic-gate#include <sys/mkdev.h>
1030Sstevel@tonic-gate#include <sys/mman.h>
1040Sstevel@tonic-gate#include <sys/mnttab.h>
1050Sstevel@tonic-gate#include <sys/mount.h>
1060Sstevel@tonic-gate#include <sys/msg.h>
1070Sstevel@tonic-gate#include <sys/param.h>
1080Sstevel@tonic-gate#include <sys/priocntl.h>
1090Sstevel@tonic-gate#include <sys/procset.h>
1100Sstevel@tonic-gate#include <sys/processor.h>
1110Sstevel@tonic-gate#include <sys/pset.h>
1120Sstevel@tonic-gate#include <sys/rctl_impl.h>
1130Sstevel@tonic-gate#include <sys/sem.h>
1140Sstevel@tonic-gate#include <sys/shm.h>
1154520Snw141292#include <sys/sid.h>
1160Sstevel@tonic-gate#include <sys/signal.h>
1170Sstevel@tonic-gate#include <sys/stat.h>
1180Sstevel@tonic-gate#include <sys/statvfs.h>
1190Sstevel@tonic-gate#include <sys/strlog.h>
1200Sstevel@tonic-gate#include <sys/stropts.h>
1210Sstevel@tonic-gate#include <sys/syscall.h>
1220Sstevel@tonic-gate#include <sys/sysconfig.h>
1230Sstevel@tonic-gate#include <sys/syslog.h>
1240Sstevel@tonic-gate#include <sys/systeminfo.h>
1250Sstevel@tonic-gate#include <sys/task.h>
1260Sstevel@tonic-gate#include <sys/termio.h>
1270Sstevel@tonic-gate#include <sys/termios.h>
1285696Snw141292#include <sys/u8_textprep.h>
1290Sstevel@tonic-gate#include <sys/time.h>
1300Sstevel@tonic-gate#include <sys/timeb.h>
1310Sstevel@tonic-gate#include <sys/times.h>
1320Sstevel@tonic-gate#include <sys/types.h>
1332267Sdp#include <sys/uadmin.h>
1340Sstevel@tonic-gate#include <sys/utsname.h>
1350Sstevel@tonic-gate#include <sys/vfstab.h>
1360Sstevel@tonic-gate#include <sys/sendfile.h>
1370Sstevel@tonic-gate#include <sys/zone.h>
1380Sstevel@tonic-gate#include <termio.h>
1390Sstevel@tonic-gate#include <time.h>
1400Sstevel@tonic-gate#include <tzfile.h>
1410Sstevel@tonic-gate#include <ucontext.h>
1420Sstevel@tonic-gate#include <utmpx.h>
1430Sstevel@tonic-gate#include <values.h>
1440Sstevel@tonic-gate#include <wait.h>
1450Sstevel@tonic-gate#include <wchar.h>
1460Sstevel@tonic-gate#include <wctype.h>
1470Sstevel@tonic-gate#include <widec.h>
1480Sstevel@tonic-gate#include <wordexp.h>
1490Sstevel@tonic-gate#include <thread.h>
1500Sstevel@tonic-gate#include <pthread.h>
1510Sstevel@tonic-gate#include <schedctl.h>
1520Sstevel@tonic-gate#include <zone.h>
1530Sstevel@tonic-gate#include <port.h>
1540Sstevel@tonic-gate#include <spawn.h>
1550Sstevel@tonic-gate#include <inttypes.h>
1560Sstevel@tonic-gate#include <getopt.h>
1571846Scraigm#include <stdio_ext.h>
1580Sstevel@tonic-gate#if defined(__i386)
1590Sstevel@tonic-gate#include <sys/sysi86.h>
1600Sstevel@tonic-gate#endif
1610Sstevel@tonic-gate#if defined(__amd64)
1620Sstevel@tonic-gate#include <stack_unwind.h>
1630Sstevel@tonic-gate#endif
1640Sstevel@tonic-gate
1650Sstevel@tonic-gate/*
1660Sstevel@tonic-gate * This really comes from the crt*.s startup modules.
1670Sstevel@tonic-gate */
1680Sstevel@tonic-gatechar **environ;
1690Sstevel@tonic-gate
1700Sstevel@tonic-gate/*
171*13093SRoger.Faulkner@Oracle.COM * This is a GNU/Linux/BSD compatibility interface,
172*13093SRoger.Faulkner@Oracle.COM * not declared in any header file.
173*13093SRoger.Faulkner@Oracle.COM */
174*13093SRoger.Faulkner@Oracle.COMconst char *__progname;
175*13093SRoger.Faulkner@Oracle.COM
176*13093SRoger.Faulkner@Oracle.COM/*
1770Sstevel@tonic-gate * POSIX versions of standard libc routines; these aren't extracted
1780Sstevel@tonic-gate * from the headers above since we cannot #define _POSIX_C_SOURCE.
1790Sstevel@tonic-gate */
1800Sstevel@tonic-gateint __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
1810Sstevel@tonic-gate    struct dirent ** _RESTRICT_KYWD);
1820Sstevel@tonic-gateint __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
1830Sstevel@tonic-gateint __posix_getgrnam_r(const char *, struct group *, char *, size_t,
1840Sstevel@tonic-gate    struct group **);
1850Sstevel@tonic-gateint __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
1860Sstevel@tonic-gate    struct passwd **);
1870Sstevel@tonic-gateint __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
1880Sstevel@tonic-gate    struct passwd **);
1890Sstevel@tonic-gateint __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
1900Sstevel@tonic-gatechar *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
1910Sstevel@tonic-gatechar *__posix_ctime_r(const time_t *, char *);
1920Sstevel@tonic-gateint __posix_ttyname_r(int, char *, size_t);
1930Sstevel@tonic-gateint __posix_getlogin_r(char *, int);
1940Sstevel@tonic-gate
1950Sstevel@tonic-gate/*
1960Sstevel@tonic-gate * XPG4 versions of standard libc routines; these aren't extracted
1970Sstevel@tonic-gate * from the headers above since we cannot #define _XPG4_2.
1980Sstevel@tonic-gate */
1990Sstevel@tonic-gateint __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
2000Sstevel@tonic-gateint __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
2010Sstevel@tonic-gate
2020Sstevel@tonic-gate/*
2030Sstevel@tonic-gate * These aren't extracted from the headers above because:
2040Sstevel@tonic-gate * - We cannot #define _STRPTIME_DONTZERO
2050Sstevel@tonic-gate * - We cannot #define _XPG5
2060Sstevel@tonic-gate */
2070Sstevel@tonic-gatechar *__strptime_dontzero(const char *, const char *, struct tm *);
2080Sstevel@tonic-gatelong __sysconf_xpg5(int);
2090Sstevel@tonic-gatewchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
2100Sstevel@tonic-gate	const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
2110Sstevel@tonic-gatesize_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
2120Sstevel@tonic-gate	const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
2130Sstevel@tonic-gatewint_t __fgetwc_xpg5(__FILE *);
2140Sstevel@tonic-gatewint_t __getwc_xpg5(__FILE *);
2150Sstevel@tonic-gatewint_t __getwchar_xpg5(void);
2160Sstevel@tonic-gatewint_t __fputwc_xpg5(wint_t, __FILE *);
2170Sstevel@tonic-gatewint_t __putwc_xpg5(wint_t, __FILE *);
2180Sstevel@tonic-gatewint_t __putwchar_xpg5(wint_t);
2190Sstevel@tonic-gatewchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
2200Sstevel@tonic-gateint __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
2210Sstevel@tonic-gatewint_t __ungetwc_xpg5(wint_t, __FILE *);
2220Sstevel@tonic-gate
2230Sstevel@tonic-gate/*
2240Sstevel@tonic-gate * /usr/src/lib/libc/port/gen routines
2250Sstevel@tonic-gate */
2260Sstevel@tonic-gate
2270Sstevel@tonic-gate/* _ctype.c */
2280Sstevel@tonic-gate
2290Sstevel@tonic-gate/* _loc_data.c */
2300Sstevel@tonic-gate
2310Sstevel@tonic-gate/* _locale.c */
2320Sstevel@tonic-gate
2330Sstevel@tonic-gate/* _set_tab.c */
2340Sstevel@tonic-gateint _set_tab(const char *loc, int cat);
2350Sstevel@tonic-gate
2360Sstevel@tonic-gate/* _xftw.c */
2370Sstevel@tonic-gateint _xftw(int ver, const char *path, int (*fn)(), int depth);
2380Sstevel@tonic-gate
2390Sstevel@tonic-gate/* a64l.c */
2400Sstevel@tonic-gatelong a64l(const char *);
2410Sstevel@tonic-gate
2420Sstevel@tonic-gate/* abort.c */
2430Sstevel@tonic-gatevoid abort(void);
2440Sstevel@tonic-gate
2450Sstevel@tonic-gate/* abs.c */
2460Sstevel@tonic-gateint abs(int arg);
2470Sstevel@tonic-gatelong labs(long int arg);
2480Sstevel@tonic-gate
2490Sstevel@tonic-gate/* assert.c */
2500Sstevel@tonic-gatevoid _assert(const char *assertion, const char *filename, int line_num);
2517734SDavid.Powell@sun.comvoid __assert_c99(const char *assertion, const char *filename, int line_num,
2527734SDavid.Powell@sun.com    const char *funcname);
2530Sstevel@tonic-gate
2540Sstevel@tonic-gate/* atexit.c */
2550Sstevel@tonic-gateint atexit(void(*func)());
2560Sstevel@tonic-gatevoid _exithandle(void);
2570Sstevel@tonic-gate
2580Sstevel@tonic-gate/* atof.c */
2590Sstevel@tonic-gatedouble atof(const char *p);
2600Sstevel@tonic-gate
2610Sstevel@tonic-gate/* atoi.c */
2620Sstevel@tonic-gateint atoi(const char *p);
2630Sstevel@tonic-gate
2640Sstevel@tonic-gate/* atol.c */
2650Sstevel@tonic-gatelong atol(const char *p);
2660Sstevel@tonic-gate
2670Sstevel@tonic-gate/* basename.c */
2680Sstevel@tonic-gatechar *basename(char *s);
2690Sstevel@tonic-gate
2700Sstevel@tonic-gate/* bcmp.c */
2710Sstevel@tonic-gateint bcmp(const void *s1, const void *s2, size_t len);
2720Sstevel@tonic-gate
2730Sstevel@tonic-gate/* bcopy.c */
2740Sstevel@tonic-gatevoid bcopy(const void *s1, void *s2, size_t len);
2750Sstevel@tonic-gate
2760Sstevel@tonic-gate/* bsearch.c */
2770Sstevel@tonic-gatevoid *bsearch(const void *ky, const void *bs, size_t nel,
2780Sstevel@tonic-gate		size_t width, int (*compar)());
2790Sstevel@tonic-gate
2800Sstevel@tonic-gate/* bzero.c */
2810Sstevel@tonic-gatevoid bzero(void *sp, size_t len);
2820Sstevel@tonic-gate
2830Sstevel@tonic-gate/* calloc.c */
2840Sstevel@tonic-gatevoid *calloc(size_t num, size_t size);
2850Sstevel@tonic-gate
2860Sstevel@tonic-gate/* catclose.c */
2870Sstevel@tonic-gateint catclose(nl_catd catd);
2880Sstevel@tonic-gate
2890Sstevel@tonic-gate/* catgets.c */
2900Sstevel@tonic-gatechar *catgets(nl_catd catd, int set_num, int msg_num, const char *s);
2910Sstevel@tonic-gate
2920Sstevel@tonic-gate/* catopen.c */
2930Sstevel@tonic-gatenl_catd catopen(const char *name, int mode);
2940Sstevel@tonic-gate
2950Sstevel@tonic-gate/* cfgetispeed.c */
2960Sstevel@tonic-gatespeed_t cfgetispeed(const struct termios *termios_p);
2970Sstevel@tonic-gate
2980Sstevel@tonic-gate/* cfgetospeed.c */
2990Sstevel@tonic-gatespeed_t cfgetospeed(const struct termios *termios_p);
3000Sstevel@tonic-gate
3010Sstevel@tonic-gate/* cfree.c */
3020Sstevel@tonic-gatevoid cfree(void *p, size_t num, size_t size);
3030Sstevel@tonic-gate
3040Sstevel@tonic-gate/* cfsetispeed.c */
3050Sstevel@tonic-gateint cfsetispeed(struct termios *termios_p, speed_t speed);
3060Sstevel@tonic-gate
3070Sstevel@tonic-gate/* cfsetospeed.c */
3080Sstevel@tonic-gateint cfsetospeed(struct termios *termios_p, speed_t speed);
3090Sstevel@tonic-gate
3100Sstevel@tonic-gate/* cftime.c */
3110Sstevel@tonic-gateint cftime(char *buf, char *format, const time_t *t);
3120Sstevel@tonic-gateint ascftime(char *buf, const char *format, const struct tm *tm);
3130Sstevel@tonic-gate
3140Sstevel@tonic-gate/* clock.c */
3150Sstevel@tonic-gateclock_t clock(void);
3160Sstevel@tonic-gate
3170Sstevel@tonic-gate/* closedir.c */
3180Sstevel@tonic-gateint closedir(DIR *dirp);
3190Sstevel@tonic-gate
3200Sstevel@tonic-gate/* confstr.c */
3210Sstevel@tonic-gatesize_t confstr(int name, char *buf, size_t length);
3220Sstevel@tonic-gate
3230Sstevel@tonic-gate/* crypt.c */
3240Sstevel@tonic-gatevoid setkey(const char *key);
3250Sstevel@tonic-gatevoid encrypt(char *block, int fake);
3260Sstevel@tonic-gatechar *crypt(const char *key, const char *salt);
3270Sstevel@tonic-gate
3280Sstevel@tonic-gate/* csetlen.c */
3290Sstevel@tonic-gateint csetlen(int cset);
3300Sstevel@tonic-gateint csetcol(int cset);
3310Sstevel@tonic-gate
3320Sstevel@tonic-gate/* ctime.c */
3330Sstevel@tonic-gatechar *ctime(const time_t *t);
3340Sstevel@tonic-gatechar *ctime_r(const time_t *, char *buf, int);
3350Sstevel@tonic-gatechar *asctime(const struct tm *t);
3360Sstevel@tonic-gatechar *asctime_r(const struct tm *, char *, int);
3370Sstevel@tonic-gate
3380Sstevel@tonic-gate/* ctypefcns.c */
3390Sstevel@tonic-gateint isalpha(int c);
3400Sstevel@tonic-gateint isupper(int c);
3410Sstevel@tonic-gateint islower(int c);
3420Sstevel@tonic-gateint isdigit(int c);
3430Sstevel@tonic-gateint isxdigit(int c);
3440Sstevel@tonic-gateint isalnum(int c);
3450Sstevel@tonic-gateint isspace(int c);
3460Sstevel@tonic-gateint ispunct(int c);
3470Sstevel@tonic-gateint isprint(int c);
3480Sstevel@tonic-gateint isgraph(int c);
3490Sstevel@tonic-gateint iscntrl(int c);
3500Sstevel@tonic-gateint isascii(int c);
3510Sstevel@tonic-gateint _toupper(int c);
3520Sstevel@tonic-gateint _tolower(int c);
3530Sstevel@tonic-gateint toascii(int c);
3540Sstevel@tonic-gate
35510547SVladimir.Kotal@Sun.COM/* daemon.c */
35610547SVladimir.Kotal@Sun.COMint daemon(int nochdir, int noclose);
35710547SVladimir.Kotal@Sun.COM
3580Sstevel@tonic-gate/* directio.c */
3590Sstevel@tonic-gateint directio(int filedes, int advice);
3600Sstevel@tonic-gate
3610Sstevel@tonic-gate/* dirname.c */
3620Sstevel@tonic-gatechar *dirname(char *s);
3630Sstevel@tonic-gate
3640Sstevel@tonic-gate/* div.c */
3650Sstevel@tonic-gatediv_t div(int numer, int denom);
3660Sstevel@tonic-gateldiv_t ldiv(long int numer, long int denom);
3670Sstevel@tonic-gate
3680Sstevel@tonic-gate/* drand48.c */
3690Sstevel@tonic-gatedouble drand48(void);
3700Sstevel@tonic-gatedouble erand48(unsigned short *xsubi);
3710Sstevel@tonic-gatelong krand48(unsigned short *xsubi, unsigned int m);
3720Sstevel@tonic-gatelong lrand48(void);
3730Sstevel@tonic-gatelong mrand48(void);
3740Sstevel@tonic-gatevoid srand48(long seedval);
3750Sstevel@tonic-gateunsigned short *seed48(unsigned short seed16v[3]);
3760Sstevel@tonic-gatevoid lcong48(unsigned short param[7]);
3770Sstevel@tonic-gatelong nrand48(unsigned short *xsubi);
3780Sstevel@tonic-gatelong jrand48(unsigned short *xsubi);
3790Sstevel@tonic-gate
3800Sstevel@tonic-gate/* dup2.c */
3810Sstevel@tonic-gateint dup2(int fildes, int fildes2);
3820Sstevel@tonic-gate
3830Sstevel@tonic-gate/* ecvt.c */
3840Sstevel@tonic-gatechar *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
3850Sstevel@tonic-gate	int *_RESTRICT_KYWDsign);
3860Sstevel@tonic-gatechar *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
3870Sstevel@tonic-gate	int *_RESTRICT_KYWD sign);
3880Sstevel@tonic-gate
3894891Svk199839/* err.c */
3904891Svk199839void _errfp(FILE *, int, const char *, ...);
3914891Svk199839void _verrfp(FILE *, int, const char *, va_list);
3924891Svk199839void _errxfp(FILE *, int, const char *, ...);
3934891Svk199839void _verrxfp(FILE *, int, const char *, va_list);
3944891Svk199839void _warnfp(FILE *, const char *, ...);
3954891Svk199839void _vwarnfp(FILE *, const char *, va_list);
3964891Svk199839void _warnxfp(FILE *, const char *, ...);
3974891Svk199839void _vwarnxfp(FILE *, const char *, va_list);
3984891Svk199839
3990Sstevel@tonic-gate/* errlst.c */
4000Sstevel@tonic-gate
4010Sstevel@tonic-gate/* euclen.c */
4020Sstevel@tonic-gateint euccol(const unsigned char *s);
4030Sstevel@tonic-gateint euclen(const unsigned char *s);
4040Sstevel@tonic-gateint eucscol(const unsigned char *s);
4050Sstevel@tonic-gate
4060Sstevel@tonic-gate/* execvp.c */
4070Sstevel@tonic-gate/* VARARGS1 */
4080Sstevel@tonic-gateint execlp(const char *, const char *, ...);
4090Sstevel@tonic-gateint execvp(const char *name, char *const *argv);
4100Sstevel@tonic-gate
4110Sstevel@tonic-gate/* fattach.c */
4120Sstevel@tonic-gateint fattach(int fildes, const char *path);
4130Sstevel@tonic-gate
4140Sstevel@tonic-gate/* fdetach.c */
4150Sstevel@tonic-gateint fdetach(const char *path);
4160Sstevel@tonic-gate
4170Sstevel@tonic-gate/* ffs.c */
4180Sstevel@tonic-gateint ffs(int field);
4190Sstevel@tonic-gate
4200Sstevel@tonic-gate/* fmtmsg.c */
4210Sstevel@tonic-gateint addseverity(int value, const char *string);
4220Sstevel@tonic-gateint fmtmsg(long class, const char *label, int severity, const char *text,
4230Sstevel@tonic-gate		const char *action, const char *tag);
4240Sstevel@tonic-gate
4250Sstevel@tonic-gate/* ftime.c */
4260Sstevel@tonic-gateint ftime(struct timeb *tp);
4270Sstevel@tonic-gate
4280Sstevel@tonic-gate/* ftok.c */
4290Sstevel@tonic-gatekey_t ftok(const char *path, int id);
4300Sstevel@tonic-gate
4310Sstevel@tonic-gate/* gcvt.c */
4320Sstevel@tonic-gatechar *gcvt(double number, int ndigit, char *buf);
4330Sstevel@tonic-gate
4340Sstevel@tonic-gate/* getcwd.c */
4350Sstevel@tonic-gatechar *getcwd(char *str, size_t size);
4360Sstevel@tonic-gate
4370Sstevel@tonic-gate/* getdate.c */
4380Sstevel@tonic-gatestruct tm *getdate(const char *expression);
4390Sstevel@tonic-gate#ifdef getdate_err
4400Sstevel@tonic-gate#undef getdate_err
4410Sstevel@tonic-gate#endif
4420Sstevel@tonic-gateint getdate_err;
4430Sstevel@tonic-gate
4440Sstevel@tonic-gate/* getdate_data.c */
4450Sstevel@tonic-gate
4460Sstevel@tonic-gate/* getdate_gd.c */
4470Sstevel@tonic-gate
4480Sstevel@tonic-gate/* getdtblsize.c */
4490Sstevel@tonic-gateint getdtablesize(void);
4500Sstevel@tonic-gate
4510Sstevel@tonic-gate/* getenv.c */
4520Sstevel@tonic-gatechar *getenv(const char *name);
4530Sstevel@tonic-gate
4540Sstevel@tonic-gate/* getexecname.c */
4550Sstevel@tonic-gateconst char *getexecname(void);
4560Sstevel@tonic-gate
4570Sstevel@tonic-gate/* getgrnam.c */
4580Sstevel@tonic-gatestruct group *getgrnam(const char *name);
4590Sstevel@tonic-gatestruct group *getgrgid(gid_t gid);
4600Sstevel@tonic-gatestruct group *fgetgrent_r(FILE *, struct group *, char *, int);
4610Sstevel@tonic-gatestruct group *getgrent_r(struct group *, char *, int);
4620Sstevel@tonic-gatestruct group *getgrgid_r(gid_t, struct group *, char *, int);
4630Sstevel@tonic-gatestruct group *getgrnam_r(const char *, struct group *, char *, int);
4640Sstevel@tonic-gate
4650Sstevel@tonic-gate/* gethostid.c */
4660Sstevel@tonic-gatelong gethostid(void);
4670Sstevel@tonic-gate
4680Sstevel@tonic-gate/* gethz.c */
4690Sstevel@tonic-gateint gethz(void);
4700Sstevel@tonic-gate
4710Sstevel@tonic-gate/* getisax.c */
4720Sstevel@tonic-gateuint_t getisax(uint32_t *, uint_t);
4730Sstevel@tonic-gate
4740Sstevel@tonic-gate/* getlogin.c */
4750Sstevel@tonic-gatechar *getlogin(void);
4760Sstevel@tonic-gatechar *getlogin_r(char *, int);
4770Sstevel@tonic-gate
4780Sstevel@tonic-gate/* getmntent.c */
4790Sstevel@tonic-gateint getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
4800Sstevel@tonic-gateint getmntent(FILE *fd, struct mnttab *mp);
4810Sstevel@tonic-gate
4820Sstevel@tonic-gate/* getnetgrent.c */
4830Sstevel@tonic-gateint setnetgrent(const char *grp);
4840Sstevel@tonic-gateint endnetgrent(void);
4850Sstevel@tonic-gateint getnetgrent(char **machinep, char **namep, char **domainp);
4860Sstevel@tonic-gate
4870Sstevel@tonic-gate/* getopt.c */
4880Sstevel@tonic-gateint getopt(int argc, char *const *argv, const char *opts);
4890Sstevel@tonic-gate
4900Sstevel@tonic-gate/* getopt_long.c */
4910Sstevel@tonic-gateint getopt_clip(int argc, char *const *argv, const char *optstring,
4920Sstevel@tonic-gate		const struct option *long_options, int *long_index);
4930Sstevel@tonic-gateint getopt_long(int argc, char *const *argv, const char *optstring,
4940Sstevel@tonic-gate		const struct option *long_options, int *long_index);
4950Sstevel@tonic-gateint getopt_long_only(int argc, char *const *argv, const char *optstring,
4960Sstevel@tonic-gate		const struct option *long_options, int *long_index);
4970Sstevel@tonic-gate
4980Sstevel@tonic-gate/* getpagesize.c */
4990Sstevel@tonic-gateint getpagesize(void);
5000Sstevel@tonic-gate
5010Sstevel@tonic-gate/* getpw.c */
5020Sstevel@tonic-gateint getpw(uid_t uid, char *buf);
5030Sstevel@tonic-gate
5040Sstevel@tonic-gate/* getpwnam.c */
5050Sstevel@tonic-gatestruct passwd *getpwnam(const char *name);
5060Sstevel@tonic-gatestruct passwd *getpwuid(uid_t uid);
5070Sstevel@tonic-gatestruct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
5080Sstevel@tonic-gatestruct passwd *getpwent_r(struct passwd *, char *, int);
5090Sstevel@tonic-gatestruct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
5100Sstevel@tonic-gatestruct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
5110Sstevel@tonic-gate
5120Sstevel@tonic-gate/* getrusage.c */
5130Sstevel@tonic-gateint getrusage(int who, struct rusage *rusage);
5140Sstevel@tonic-gate
5150Sstevel@tonic-gate/* gettimeofday.c */
5160Sstevel@tonic-gateint gettimeofday(struct timeval *_RESTRICT_KYWD tp, void *_RESTRICT_KYWD);
5170Sstevel@tonic-gate
5180Sstevel@tonic-gate/* getspent.c */
5190Sstevel@tonic-gatevoid setspent(void);
5200Sstevel@tonic-gatevoid endspent(void);
5210Sstevel@tonic-gatestruct spwd *getspent(void);
5220Sstevel@tonic-gatestruct spwd *getspent_r(struct spwd *, char *, int);
5230Sstevel@tonic-gatestruct spwd *fgetspent(FILE *f);
5240Sstevel@tonic-gatestruct spwd *fgetspent_r(FILE *, struct spwd *, char *, int);
5250Sstevel@tonic-gatestruct spwd *getspnam(const char *name);
5260Sstevel@tonic-gatestruct spwd *getspnam_r(const char *, struct spwd *, char *, int);
5270Sstevel@tonic-gateint putspent(const struct spwd *p, FILE *f);
5280Sstevel@tonic-gate
5290Sstevel@tonic-gate/* getspent_r.c */
5300Sstevel@tonic-gateint str2spwd(const char *, int, void *, char *, int);
5310Sstevel@tonic-gate
5320Sstevel@tonic-gate/* getsubopt.c */
5330Sstevel@tonic-gateint getsubopt(char **optionsp, char *const *tokens, char **valuep);
5340Sstevel@tonic-gate
5350Sstevel@tonic-gate/* gettxt.c */
5360Sstevel@tonic-gatechar *gettxt(const char *msg_id, const char *dflt_str);
5370Sstevel@tonic-gate
5380Sstevel@tonic-gate/* getusershell.c */
5390Sstevel@tonic-gatechar *getusershell(void);
5400Sstevel@tonic-gatevoid endusershell(void);
5410Sstevel@tonic-gatevoid setusershell(void);
5420Sstevel@tonic-gate
5430Sstevel@tonic-gate/* getut.c */
5440Sstevel@tonic-gatestruct utmp *getutent(void);
5450Sstevel@tonic-gatestruct utmp *getutid(const struct utmp *entry);
5460Sstevel@tonic-gatestruct utmp *getutline(const struct utmp *entry);
5470Sstevel@tonic-gatestruct utmp *pututline(const struct utmp *entry);
5480Sstevel@tonic-gatevoid setutent(void);
5490Sstevel@tonic-gatevoid endutent(void);
5500Sstevel@tonic-gateint utmpname(const char *newfile);
5510Sstevel@tonic-gatevoid updwtmp(const char *file, struct utmp *ut);
5520Sstevel@tonic-gatevoid getutmp(const struct utmpx *utx, struct utmp *ut);
5530Sstevel@tonic-gatevoid getutmpx(const struct utmp *ut, struct utmpx *utx);
5540Sstevel@tonic-gatestruct utmp *makeut(struct utmp *utmp);
5550Sstevel@tonic-gate
5560Sstevel@tonic-gate/* getutx.c */
5570Sstevel@tonic-gatestruct utmpx *getutxent(void);
5580Sstevel@tonic-gatestruct utmpx *getutxid(const struct utmpx *entry);
5590Sstevel@tonic-gatestruct utmpx *getutxline(const struct utmpx *entry);
5600Sstevel@tonic-gatestruct utmpx *pututxline(const struct utmpx *entry);
5610Sstevel@tonic-gatevoid setutxent(void);
5620Sstevel@tonic-gatevoid endutxent(void);
5630Sstevel@tonic-gateint utmpxname(const char *newfile);
5640Sstevel@tonic-gatevoid updwtmpx(const char *filex, struct utmpx *utx);
5650Sstevel@tonic-gatestruct utmpx *makeutx(const struct utmpx *utmp);
5660Sstevel@tonic-gatestruct utmpx *modutx(const struct utmpx *utp);
5670Sstevel@tonic-gate
5680Sstevel@tonic-gate/* getvfsent.c */
5690Sstevel@tonic-gateint getvfsspec(FILE *fd, struct vfstab *vp, char *special);
5700Sstevel@tonic-gateint getvfsfile(FILE *fd, struct vfstab *vp, char *mountp);
5710Sstevel@tonic-gateint getvfsany(FILE *fd, struct vfstab *vgetp, struct vfstab *vrefp);
5720Sstevel@tonic-gateint getvfsent(FILE *fd, struct vfstab *vp);
5730Sstevel@tonic-gate
5740Sstevel@tonic-gate/* getwd.c */
5750Sstevel@tonic-gatechar *getwd(char *pathname);
5760Sstevel@tonic-gate
5770Sstevel@tonic-gate/* getwidth.c */
5780Sstevel@tonic-gatevoid getwidth(eucwidth_t *eucstruct);
5790Sstevel@tonic-gate
5800Sstevel@tonic-gate/* hsearch.c */
5810Sstevel@tonic-gateint hcreate(size_t size);
5820Sstevel@tonic-gatevoid hdestroy(void);
5830Sstevel@tonic-gateENTRY *hsearch(ENTRY item, ACTION action);
5840Sstevel@tonic-gate
5850Sstevel@tonic-gate/* iconv.c  */
5860Sstevel@tonic-gatesize_t iconv(iconv_t cd, const char **_RESTRICT_KYWD inbuf,
5870Sstevel@tonic-gate    size_t *_RESTRICT_KYWD inbytesleft, char **_RESTRICT_KYWD outbuf,
5880Sstevel@tonic-gate    size_t *_RESTRICT_KYWD outbytesleft);
5890Sstevel@tonic-gateint iconv_close(iconv_t cd);
5900Sstevel@tonic-gateiconv_t iconv_open(const char *tocode, const char *fromcode);
5910Sstevel@tonic-gate
5920Sstevel@tonic-gate/* imaxabs.c */
5930Sstevel@tonic-gateintmax_t imaxabs(intmax_t j);
5940Sstevel@tonic-gate
5950Sstevel@tonic-gate/* imaxdiv.c */
5960Sstevel@tonic-gateimaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
5970Sstevel@tonic-gate
5980Sstevel@tonic-gate/* index.c */
5990Sstevel@tonic-gatechar *index(const char *sp, int c);
6000Sstevel@tonic-gate
6010Sstevel@tonic-gate/* initgroups.c */
6020Sstevel@tonic-gateint initgroups(const char *uname, gid_t agroup);
6030Sstevel@tonic-gate
6040Sstevel@tonic-gate/* innetgr.c */
6050Sstevel@tonic-gateint innetgr(const char *group, const char *machine, const char *name,
6060Sstevel@tonic-gate    const char *domain);
6070Sstevel@tonic-gate
6080Sstevel@tonic-gate/* insque.c */
6090Sstevel@tonic-gatevoid insque(void *elem, void *pred);
6100Sstevel@tonic-gatevoid remque(void *elem);
6110Sstevel@tonic-gate
6120Sstevel@tonic-gate/* isaexec.c */
6130Sstevel@tonic-gateint isaexec(const char *, char *const *, char *const *);
6140Sstevel@tonic-gate
6150Sstevel@tonic-gate/* isastream.c */
6160Sstevel@tonic-gateint isastream(int fd);
6170Sstevel@tonic-gate
6180Sstevel@tonic-gate/* isatty.c */
6190Sstevel@tonic-gateint isatty(int f);
6200Sstevel@tonic-gate
6210Sstevel@tonic-gate/* killpg.c */
6220Sstevel@tonic-gateint killpg(pid_t pgrp, int sig);
6230Sstevel@tonic-gate
6240Sstevel@tonic-gate/* l64a.c */
6250Sstevel@tonic-gatechar *l64a(long lg);
6260Sstevel@tonic-gate
6270Sstevel@tonic-gate/* lckpwdf.c */
6280Sstevel@tonic-gateint lckpwdf(void);
6290Sstevel@tonic-gateint ulckpwdf(void);
6300Sstevel@tonic-gate
6310Sstevel@tonic-gate/* lfind.c */
6320Sstevel@tonic-gatevoid * lfind(const void *ky, const void *bs, size_t *nelp,
6330Sstevel@tonic-gate		size_t width, int (*compar)());
6340Sstevel@tonic-gate
6350Sstevel@tonic-gate/* localeconv.c */
6360Sstevel@tonic-gatestruct lconv *localeconv(void);
6370Sstevel@tonic-gate
6380Sstevel@tonic-gate/* lsearch.c */
6390Sstevel@tonic-gatevoid * lsearch(const void *ky, void *bs, size_t *nelp,
6400Sstevel@tonic-gate		size_t width, int (*compar)());
6410Sstevel@tonic-gate
6420Sstevel@tonic-gate/* madvise.c */
6430Sstevel@tonic-gateint madvise(caddr_t addr, size_t len, int advice);
6440Sstevel@tonic-gate
6450Sstevel@tonic-gate/* malloc.c */
6460Sstevel@tonic-gatevoid *malloc(size_t size);
6470Sstevel@tonic-gatevoid *realloc(void *old, size_t size);
6480Sstevel@tonic-gatevoid free(void *old);
6490Sstevel@tonic-gate
6500Sstevel@tonic-gate/* mbstowcs.c */
6510Sstevel@tonic-gatesize_t mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s,
6520Sstevel@tonic-gate	size_t n);
6530Sstevel@tonic-gate
6540Sstevel@tonic-gate/* mbtowc.c */
6550Sstevel@tonic-gateint mbtowc(wchar_t *_RESTRICT_KYWD wchar, const char *_RESTRICT_KYWD s,
6560Sstevel@tonic-gate	size_t n);
6570Sstevel@tonic-gateint mblen(const char *s, size_t n);
6580Sstevel@tonic-gate
6590Sstevel@tonic-gate/* memalign.c */
6600Sstevel@tonic-gatevoid *memalign(size_t align, size_t nbytes);
6610Sstevel@tonic-gate
6620Sstevel@tonic-gate/* memccpy.c */
6630Sstevel@tonic-gatevoid *memccpy(void *_RESTRICT_KYWDs, const void *_RESTRICT_KYWD s0, int c,
6640Sstevel@tonic-gate	size_t n);
6650Sstevel@tonic-gate
6660Sstevel@tonic-gate/* memchr.c */
6670Sstevel@tonic-gatevoid *memchr(const void *sptr, int c1, size_t n);
6680Sstevel@tonic-gate
6690Sstevel@tonic-gate/* memcmp.c */
6700Sstevel@tonic-gateint memcmp(const void *s1, const void *s2, size_t n);
6710Sstevel@tonic-gate
6720Sstevel@tonic-gate/* memcpy.c */
6730Sstevel@tonic-gatevoid *memcpy(void *_RESTRICT_KYWD s, const void *_RESTRICT_KYWD s0, size_t n);
6740Sstevel@tonic-gate
6750Sstevel@tonic-gate/* memmove.c */
6760Sstevel@tonic-gatevoid *memmove(void *s, const void *s0, size_t n);
6770Sstevel@tonic-gate
6780Sstevel@tonic-gate/* memset.c */
6790Sstevel@tonic-gatevoid *memset(void *sp1, int c, size_t n);
6800Sstevel@tonic-gate
6810Sstevel@tonic-gate/* mkdev.c */
6820Sstevel@tonic-gatedev_t __makedev(const int version, const major_t majdev,
6830Sstevel@tonic-gate		const minor_t mindev);
6840Sstevel@tonic-gatemajor_t __major(const int version, const dev_t devnum);
6850Sstevel@tonic-gateminor_t __minor(const int version, const dev_t devnum);
6860Sstevel@tonic-gate
6870Sstevel@tonic-gate/* mkfifo.c */
6880Sstevel@tonic-gateint mkfifo(const char *path, mode_t mode);
6890Sstevel@tonic-gate
6900Sstevel@tonic-gate/* mktemp.c */
6910Sstevel@tonic-gatechar *mktemp(char *as);
6920Sstevel@tonic-gate
6930Sstevel@tonic-gate/* mlock.c */
6940Sstevel@tonic-gateint mlock(caddr_t addr, size_t len);
6950Sstevel@tonic-gate
6960Sstevel@tonic-gate/* mlockall.c */
6970Sstevel@tonic-gateint mlockall(int flags);
6980Sstevel@tonic-gate
6990Sstevel@tonic-gate/* mon.c */
7000Sstevel@tonic-gatevoid monitor(int (*alowpc)(), int (*ahighpc)(), WORD *buffer,
7010Sstevel@tonic-gate		size_t bufsize, size_t nfunc);
7020Sstevel@tonic-gate
7030Sstevel@tonic-gate/* msync.c */
7040Sstevel@tonic-gateint msync(caddr_t addr, size_t len, int flags);
7050Sstevel@tonic-gate
7060Sstevel@tonic-gate/* munlock.c */
7070Sstevel@tonic-gateint munlock(caddr_t addr, size_t len);
7080Sstevel@tonic-gate
7090Sstevel@tonic-gate/* munlockall.c */
7100Sstevel@tonic-gateint munlockall(void);
7110Sstevel@tonic-gate
7120Sstevel@tonic-gate/* ndbm.c */
7130Sstevel@tonic-gatevoid dbm_setdefwrite(DBM *db);
7140Sstevel@tonic-gateint dbm_flush(DBM *db);
7150Sstevel@tonic-gateint dbm_flushpag(DBM *db);
7160Sstevel@tonic-gateDBM *dbm_open(const char *file, int flags, mode_t mode);
7170Sstevel@tonic-gatevoid dbm_close(DBM *db);
7180Sstevel@tonic-gateint dbm_close_status(DBM *db);
7190Sstevel@tonic-gatedatum dbm_fetch(DBM *db, datum key);
7200Sstevel@tonic-gateint dbm_delete(DBM *db, datum key);
7210Sstevel@tonic-gateint dbm_store(DBM *db, datum key, datum dat, int replace);
7220Sstevel@tonic-gatedatum dbm_firstkey(DBM *db);
7230Sstevel@tonic-gatedatum dbm_nextkey(DBM *db);
7240Sstevel@tonic-gatedatum dbm_do_nextkey(DBM *db, datum inkey);
7250Sstevel@tonic-gate
7260Sstevel@tonic-gate/* new_list.c */
7270Sstevel@tonic-gate
7280Sstevel@tonic-gate/* nftw.c */
7290Sstevel@tonic-gateint nftw(const char *path, int (*fn)(), int depth, int flags);
7300Sstevel@tonic-gate
7310Sstevel@tonic-gate/* nl_langinfo.c */
7320Sstevel@tonic-gatechar *nl_langinfo(nl_item item);
7330Sstevel@tonic-gate
7340Sstevel@tonic-gate/* opendir.c */
7350Sstevel@tonic-gateDIR *opendir(const char *filename);
7360Sstevel@tonic-gate
7370Sstevel@tonic-gate/* opt_data.c */
7380Sstevel@tonic-gate
7390Sstevel@tonic-gate/* perror.c */
7400Sstevel@tonic-gatevoid perror(const char *s);
7410Sstevel@tonic-gate
7420Sstevel@tonic-gate/* psiginfo.c */
7430Sstevel@tonic-gatevoid psiginfo(siginfo_t *sip, char *s);
7440Sstevel@tonic-gate
7450Sstevel@tonic-gate/* psignal.c */
7460Sstevel@tonic-gatevoid psignal(int sig, const char *s);
7470Sstevel@tonic-gate
7480Sstevel@tonic-gate/* pt.c */
7490Sstevel@tonic-gatechar *ptsname(int fd);
7500Sstevel@tonic-gateint unlockpt(int fd);
7510Sstevel@tonic-gateint grantpt(int fd);
7520Sstevel@tonic-gate
7530Sstevel@tonic-gate/* putenv.c */
7540Sstevel@tonic-gateint putenv(char *change);
7550Sstevel@tonic-gateint setenv(const char *envname, const char *envval, int overwrite);
7560Sstevel@tonic-gateint unsetenv(const char *name);
7570Sstevel@tonic-gate
7580Sstevel@tonic-gate/* putpwent.c */
7590Sstevel@tonic-gateint putpwent(const struct passwd *p, FILE *f);
7600Sstevel@tonic-gate
7610Sstevel@tonic-gate/* qsort.c */
7620Sstevel@tonic-gatevoid qsort(void *base, size_t n, size_t size, int (*compar)());
7630Sstevel@tonic-gate
7640Sstevel@tonic-gate/* raise.c */
7650Sstevel@tonic-gateint raise(int sig);
7660Sstevel@tonic-gate
7670Sstevel@tonic-gate/* rand.c */
7680Sstevel@tonic-gatevoid srand(unsigned x);
7690Sstevel@tonic-gateint rand(void);
7700Sstevel@tonic-gateint rand_r(unsigned int *);
7710Sstevel@tonic-gate
7720Sstevel@tonic-gate/* random.c */
7730Sstevel@tonic-gatevoid srandom(unsigned x);
7740Sstevel@tonic-gatechar *initstate(unsigned seed, char *arg_state, size_t n);
7750Sstevel@tonic-gatechar *setstate(const char *arg_state);
7760Sstevel@tonic-gatelong random(void);
7770Sstevel@tonic-gate
7780Sstevel@tonic-gate/* rctlops.c */
7790Sstevel@tonic-gateint rctl_walk(int (*callback)(const char *, void *), void *walk_data);
7800Sstevel@tonic-gatehrtime_t rctlblk_get_firing_time(rctlblk_t *rblk);
7810Sstevel@tonic-gateuint_t rctlblk_get_global_action(rctlblk_t *rblk);
7820Sstevel@tonic-gateuint_t rctlblk_get_global_flags(rctlblk_t *rblk);
7830Sstevel@tonic-gateuint_t rctlblk_get_local_action(rctlblk_t *rblk, int *signalp);
7840Sstevel@tonic-gateuint_t rctlblk_get_local_flags(rctlblk_t *rblk);
7850Sstevel@tonic-gateid_t rctlblk_get_recipient_pid(rctlblk_t *rblk);
7860Sstevel@tonic-gaterctl_priv_t rctlblk_get_privilege(rctlblk_t *rblk);
7870Sstevel@tonic-gaterctl_qty_t rctlblk_get_value(rctlblk_t *rblk);
7880Sstevel@tonic-gatevoid rctlblk_set_local_action(rctlblk_t *rblk, uint_t action, int signal);
7890Sstevel@tonic-gatevoid rctlblk_set_local_flags(rctlblk_t *rblk, uint_t flags);
7900Sstevel@tonic-gatevoid rctlblk_set_privilege(rctlblk_t *rblk, rctl_priv_t priv);
7910Sstevel@tonic-gatevoid rctlblk_set_value(rctlblk_t *rblk, rctl_qty_t val);
7920Sstevel@tonic-gatesize_t rctlblk_size(void);
7930Sstevel@tonic-gate
7940Sstevel@tonic-gate/* readdir.c */
7950Sstevel@tonic-gatestruct dirent *readdir(DIR *dirp);
7960Sstevel@tonic-gate
7970Sstevel@tonic-gate/* realpath.c */
7980Sstevel@tonic-gatechar *realpath(const char *_RESTRICT_KYWD raw, char *_RESTRICT_KYWD canon);
7990Sstevel@tonic-gate
8000Sstevel@tonic-gate/* regexpr.c */
8010Sstevel@tonic-gatechar *re_comp(const char *sp);
8020Sstevel@tonic-gateint re_exec(const char *p1);
8030Sstevel@tonic-gate
8040Sstevel@tonic-gate/* rindex.c */
8050Sstevel@tonic-gatechar *rindex(const char *sp, int c);
8060Sstevel@tonic-gate
8070Sstevel@tonic-gate/* rename.c */
8080Sstevel@tonic-gateint remove(const char *filename);
8090Sstevel@tonic-gateint rename(const char *old, const char *new);
8100Sstevel@tonic-gate
8110Sstevel@tonic-gate/* rewinddir.c */
8126812Sraf#undef rewinddir
8136812Srafvoid rewinddir(DIR *dirp);
8140Sstevel@tonic-gate
8150Sstevel@tonic-gate/* scandir.c */
8160Sstevel@tonic-gateint alphasort(const struct dirent **, const struct dirent **);
8170Sstevel@tonic-gateint scandir(const char *dirname, struct dirent *(*namelist[]),
8180Sstevel@tonic-gate	int (*select)(const struct dirent *),
8190Sstevel@tonic-gate	int (*dcomp)(const struct dirent **, const struct dirent **));
8200Sstevel@tonic-gate
8210Sstevel@tonic-gate/* scrwidth.c */
8220Sstevel@tonic-gateint scrwidth(wchar_t c);
8230Sstevel@tonic-gate
8240Sstevel@tonic-gate/* seekdir.c */
8250Sstevel@tonic-gatevoid seekdir(DIR *dirp, long loc);
8260Sstevel@tonic-gate
8270Sstevel@tonic-gate/* select.c */
8280Sstevel@tonic-gateint pselect(int nfds,
8290Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD readfds,
8300Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD writefds,
8310Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD errorfds,
8320Sstevel@tonic-gate	const struct timespec *_RESTRICT_KYWD timeout,
8330Sstevel@tonic-gate	const sigset_t *_RESTRICT_KYWD sigmask);
8340Sstevel@tonic-gateint select(int nfds,
8350Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD readfds,
8360Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD writefds,
8370Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD errorfds,
8380Sstevel@tonic-gate	struct timeval *_RESTRICT_KYWD timeout);
8390Sstevel@tonic-gate
8400Sstevel@tonic-gate/* setlocale.c */
8410Sstevel@tonic-gatechar *setlocale(int cat, const char *loc);
8420Sstevel@tonic-gate
8430Sstevel@tonic-gate/* setpriority.c */
8440Sstevel@tonic-gateint getpriority(int which, id_t who);
8450Sstevel@tonic-gateint setpriority(int which, id_t who, int prio);
8460Sstevel@tonic-gate
8470Sstevel@tonic-gate/* settimeofday.c */
8480Sstevel@tonic-gateint settimeofday(struct timeval *tp, void *);
8490Sstevel@tonic-gate
8500Sstevel@tonic-gate/* sigflag.c */
8510Sstevel@tonic-gateint sigflag(int sig, int flag, int on);
8520Sstevel@tonic-gate
8530Sstevel@tonic-gate/* siglist.c */
8540Sstevel@tonic-gate
8550Sstevel@tonic-gate/* sigsend.c */
8560Sstevel@tonic-gateint sigsend(idtype_t idtype, id_t id, int sig);
8570Sstevel@tonic-gate
8580Sstevel@tonic-gate/* sigsetops.c */
8590Sstevel@tonic-gateint sigfillset(sigset_t *set);
8600Sstevel@tonic-gateint sigemptyset(sigset_t *set);
8610Sstevel@tonic-gateint sigaddset(sigset_t *set, int sig);
8620Sstevel@tonic-gateint sigdelset(sigset_t *set, int sig);
8630Sstevel@tonic-gateint sigismember(const sigset_t *set, int sig);
8640Sstevel@tonic-gate
8650Sstevel@tonic-gate/* scalls.c */
8660Sstevel@tonic-gateunsigned sleep(unsigned sleep_tm);
8670Sstevel@tonic-gate
8680Sstevel@tonic-gate/* ssignal.c */
8690Sstevel@tonic-gateint (*ssignal(int sig, int (*fn)())) ();
8700Sstevel@tonic-gateint gsignal(int sig);
8710Sstevel@tonic-gate
8720Sstevel@tonic-gate/* str2id.c */
8730Sstevel@tonic-gate
8740Sstevel@tonic-gate/* str2sig.c */
8750Sstevel@tonic-gateint str2sig(const char *s, int *sigp);
8760Sstevel@tonic-gateint sig2str(int i, char *s);
8770Sstevel@tonic-gate
8780Sstevel@tonic-gate/* strcat.c */
8790Sstevel@tonic-gatechar *strcat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
8800Sstevel@tonic-gate
8810Sstevel@tonic-gate/* strchr.c */
8820Sstevel@tonic-gatechar *strchr(const char *sp, int c);
8830Sstevel@tonic-gate
8840Sstevel@tonic-gate/* strcmp.c */
8850Sstevel@tonic-gateint strcmp(const char *s1, const char *s2);
8860Sstevel@tonic-gate
8870Sstevel@tonic-gate/* strcpy.c */
8880Sstevel@tonic-gatechar *strcpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
8890Sstevel@tonic-gate
8900Sstevel@tonic-gate/* strcspn.c */
8910Sstevel@tonic-gatesize_t strcspn(const char *string, const char *charset);
8920Sstevel@tonic-gate
8930Sstevel@tonic-gate/* strdup.c */
8940Sstevel@tonic-gatechar *strdup(const char *s1);
8950Sstevel@tonic-gate
8960Sstevel@tonic-gate/* strerror.c */
8970Sstevel@tonic-gatechar *strerror(int errnum);
8980Sstevel@tonic-gateint strerror_r(int errnum, char *strerrbuf, size_t buflen);
8990Sstevel@tonic-gate
9000Sstevel@tonic-gate/* strftime.c */
9010Sstevel@tonic-gatesize_t strftime(char *_RESTRICT_KYWD s, size_t maxsize,
9020Sstevel@tonic-gate		const char *_RESTRICT_KYWD format,
9030Sstevel@tonic-gate		const struct tm *_RESTRICT_KYWD tm);
9040Sstevel@tonic-gate
9050Sstevel@tonic-gate/* strlen.c */
9060Sstevel@tonic-gatesize_t strlen(const char *s);
9070Sstevel@tonic-gate
9080Sstevel@tonic-gate/* strncat.c */
9090Sstevel@tonic-gatechar *strncat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
9100Sstevel@tonic-gate
9110Sstevel@tonic-gate/* strncmp.c */
9120Sstevel@tonic-gateint strncmp(const char *s1, const char *s2, size_t n);
9130Sstevel@tonic-gate
9140Sstevel@tonic-gate/* strncpy.c */
9150Sstevel@tonic-gatechar *strncpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
9160Sstevel@tonic-gate
9170Sstevel@tonic-gate/* strpbrk.c */
9180Sstevel@tonic-gatechar *strpbrk(const char *string, const char *brkset);
9190Sstevel@tonic-gate
9200Sstevel@tonic-gate/* strrchr.c */
9210Sstevel@tonic-gatechar *strrchr(const char *sp, int c);
9220Sstevel@tonic-gate
9237478SVladimir.Kotal@Sun.COM/* strsep.c */
9247478SVladimir.Kotal@Sun.COMchar *strsep(char **stringp, const char *delim);
9257478SVladimir.Kotal@Sun.COM
9260Sstevel@tonic-gate/* strspn.c */
9270Sstevel@tonic-gatesize_t strspn(const char *string, const char *charset);
9280Sstevel@tonic-gate
9290Sstevel@tonic-gate/* strstr.c */
9300Sstevel@tonic-gatechar *strstr(const char *as1, const char *as2);
9310Sstevel@tonic-gate
9320Sstevel@tonic-gate/* strtod.c */
9330Sstevel@tonic-gatedouble strtod(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9340Sstevel@tonic-gatefloat strtof(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9350Sstevel@tonic-gatelong double strtold(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9360Sstevel@tonic-gate
9370Sstevel@tonic-gate/* strtoimax.c */
9380Sstevel@tonic-gateintmax_t strtoimax(const char *_RESTRICT_KYWD nptr,
9390Sstevel@tonic-gate	char **_RESTRICT_KYWD endptr, int base);
9400Sstevel@tonic-gate
9410Sstevel@tonic-gate/* strtok.c */
9420Sstevel@tonic-gatechar *strtok(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD sepset);
9430Sstevel@tonic-gatechar *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
9440Sstevel@tonic-gate	char **_RESTRICT_KYWD);
9450Sstevel@tonic-gate
9460Sstevel@tonic-gate/* strtol.c */
9470Sstevel@tonic-gatelong strtol(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr,
9480Sstevel@tonic-gate	int base);
9490Sstevel@tonic-gate
9500Sstevel@tonic-gate/* strtoul.c */
9510Sstevel@tonic-gateunsigned long strtoul(const char *_RESTRICT_KYWD str,
9520Sstevel@tonic-gate	char **_RESTRICT_KYWD nptr, int base);
9530Sstevel@tonic-gate
9540Sstevel@tonic-gate/* strtoumax.c */
9550Sstevel@tonic-gateuintmax_t strtoumax(const char *_RESTRICT_KYWD nptr,
9560Sstevel@tonic-gate		    char **_RESTRICT_KYWD endptr, int base);
9570Sstevel@tonic-gate
9580Sstevel@tonic-gate/* strxfrm.c */
9590Sstevel@tonic-gatesize_t strxfrm(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2,
9600Sstevel@tonic-gate	size_t n);
9610Sstevel@tonic-gateint strcoll(const char *s1, const char *s2);
9620Sstevel@tonic-gate
9630Sstevel@tonic-gate/* swab.c */
9640Sstevel@tonic-gatevoid swab(const char *_RESTRICT_KYWD from, char *_RESTRICT_KYWD to, ssize_t n);
9650Sstevel@tonic-gate
9660Sstevel@tonic-gate/* swapctl.c */
9670Sstevel@tonic-gateint swapctl(int cmd, void *arg);
9680Sstevel@tonic-gate
9690Sstevel@tonic-gate/* sysconf.c */
9700Sstevel@tonic-gatelong sysconf(int name);
9710Sstevel@tonic-gate
9720Sstevel@tonic-gate/* syslog.c */
9730Sstevel@tonic-gate/* VARARGS2 */
9740Sstevel@tonic-gatevoid syslog(int pri, const char *fmt, ...);
9750Sstevel@tonic-gatevoid vsyslog(int pri, const char *fmt, va_list ap);
9760Sstevel@tonic-gatevoid openlog(const char *ident, int logstat, int logfac);
9770Sstevel@tonic-gatevoid closelog(void);
9780Sstevel@tonic-gateint setlogmask(int pmask);
9790Sstevel@tonic-gate
9800Sstevel@tonic-gate/* tcdrain.c */
9810Sstevel@tonic-gateint tcdrain(int fildes);
9820Sstevel@tonic-gate
9830Sstevel@tonic-gate/* tcflow.c */
9840Sstevel@tonic-gateint tcflow(int fildes, int action);
9850Sstevel@tonic-gate
9860Sstevel@tonic-gate/* tcflush.c */
9870Sstevel@tonic-gateint tcflush(int fildes, int queue_selector);
9880Sstevel@tonic-gate
9890Sstevel@tonic-gate/* tcgetattr.c */
9900Sstevel@tonic-gateint tcgetattr(int fildes, struct termios *termios_p);
9910Sstevel@tonic-gate
9920Sstevel@tonic-gate/* tcgetpgrp.c */
9930Sstevel@tonic-gatepid_t tcgetpgrp(int fd);
9940Sstevel@tonic-gate
9950Sstevel@tonic-gate/* tcgetsid.c */
9960Sstevel@tonic-gatepid_t tcgetsid(int fd);
9970Sstevel@tonic-gate
9980Sstevel@tonic-gate/* tcsendbreak.c */
9990Sstevel@tonic-gateint tcsendbreak(int fildes, int duration);
10000Sstevel@tonic-gate
10010Sstevel@tonic-gate/* tcsetattr.c */
10020Sstevel@tonic-gateint tcsetattr(int fildes, int optional_actions,
10030Sstevel@tonic-gate	const struct termios *termios_p);
10040Sstevel@tonic-gate
10050Sstevel@tonic-gate/* tcsetpgrp.c */
10060Sstevel@tonic-gateint tcsetpgrp(int fd, pid_t pgrp);
10070Sstevel@tonic-gate
10080Sstevel@tonic-gate/* tell.c */
10090Sstevel@tonic-gatelong tell(int f);
10100Sstevel@tonic-gate
10110Sstevel@tonic-gate/* telldir.c */
10120Sstevel@tonic-gatelong telldir(DIR *dirp);
10130Sstevel@tonic-gate
10140Sstevel@tonic-gate/* tfind.c */
10150Sstevel@tonic-gatevoid *tfind(const void *ky, void *const *rtp, int (*compar)());
10160Sstevel@tonic-gate
10170Sstevel@tonic-gate/* time_comm.c */
10180Sstevel@tonic-gatestruct tm *localtime(const time_t *timep);
10190Sstevel@tonic-gatestruct tm *localtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
10200Sstevel@tonic-gatestruct tm *gmtime(const time_t *clock);
10210Sstevel@tonic-gatestruct tm *gmtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
10220Sstevel@tonic-gatedouble difftime(time_t time1, time_t time0);
10230Sstevel@tonic-gatetime_t mktime(struct tm *timeptr);
10240Sstevel@tonic-gatevoid _ltzset(time_t tim);
10250Sstevel@tonic-gatevoid tzset(void);
10260Sstevel@tonic-gate
10270Sstevel@tonic-gate/* time_data.c */
10280Sstevel@tonic-gate
10290Sstevel@tonic-gate/* time_gdata.c */
10300Sstevel@tonic-gate
10310Sstevel@tonic-gate/* tolower.c */
10320Sstevel@tonic-gateint tolower(int c);
10330Sstevel@tonic-gate
10340Sstevel@tonic-gate/* toupper.c */
10350Sstevel@tonic-gateint toupper(int c);
10360Sstevel@tonic-gate
10370Sstevel@tonic-gate/* truncate.c */
10380Sstevel@tonic-gateint ftruncate(int fildes, off_t len);
10390Sstevel@tonic-gateint truncate(const char *path, off_t len);
10400Sstevel@tonic-gate
10410Sstevel@tonic-gate/* tsearch.c */
10420Sstevel@tonic-gatevoid *tsearch(const void *ky, void **rtp, int (*compar)());
10430Sstevel@tonic-gatevoid *tdelete(const void *ky, void **rtp, int (*compar)());
10440Sstevel@tonic-gatevoid twalk(const void *rt, void (*action)());
10450Sstevel@tonic-gate
10460Sstevel@tonic-gate/* ttyname.c */
10470Sstevel@tonic-gatechar *ttyname(int f);
10480Sstevel@tonic-gatechar *_ttyname_dev(dev_t rdev, char *buffer, size_t buflen);
10490Sstevel@tonic-gatechar *ttyname_r(int, char *, int);
10500Sstevel@tonic-gate
10510Sstevel@tonic-gate/* ttyslot.c */
10520Sstevel@tonic-gateint ttyslot(void);
10530Sstevel@tonic-gate
10540Sstevel@tonic-gate/* ualarm.c */
10550Sstevel@tonic-gateunsigned ualarm(unsigned usecs, unsigned reload);
10560Sstevel@tonic-gate
10570Sstevel@tonic-gate/* ulimit.c */
10580Sstevel@tonic-gate/* VARARGS1 */
10590Sstevel@tonic-gatelong ulimit(int cmd, ...);
10600Sstevel@tonic-gate
10610Sstevel@tonic-gate/* scalls.c */
10620Sstevel@tonic-gateint usleep(unsigned n);
10630Sstevel@tonic-gate
10640Sstevel@tonic-gate/* valloc.c */
10650Sstevel@tonic-gatevoid *valloc(size_t size);
10660Sstevel@tonic-gate
10675891Sraf/* waitpid.c */
10685891Srafpid_t wait(int *stat_loc);
10695891Srafpid_t waitpid(pid_t pid, int *stat_loc, int options);
10700Sstevel@tonic-gatepid_t wait3(int *status, int options, struct rusage *rp);
10710Sstevel@tonic-gatepid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
10720Sstevel@tonic-gate
10730Sstevel@tonic-gate/* wcstombs.c */
10740Sstevel@tonic-gatesize_t wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs,
10750Sstevel@tonic-gate	size_t n);
10760Sstevel@tonic-gate
10770Sstevel@tonic-gate/* wctomb.c */
10780Sstevel@tonic-gateint wctomb(char *s, wchar_t wchar);
10790Sstevel@tonic-gate
10800Sstevel@tonic-gate/* wdata.c */
10810Sstevel@tonic-gate
10820Sstevel@tonic-gate/* wisprint.c */
10830Sstevel@tonic-gateint wisprint(wchar_t c);
10840Sstevel@tonic-gate
10850Sstevel@tonic-gate/* xgetwidth.c */
10860Sstevel@tonic-gatevoid _xgetwidth(void);
10870Sstevel@tonic-gate
10880Sstevel@tonic-gate/*
10890Sstevel@tonic-gate * /usr/src/lib/libc/port/intl routines
10900Sstevel@tonic-gate */
10910Sstevel@tonic-gate
10920Sstevel@tonic-gate/* gettext.c */
10930Sstevel@tonic-gatechar *bindtextdomain(const char *domain, const char *binding);
10940Sstevel@tonic-gatechar *dcgettext(const char *domain, const char *msg_id, const int category);
10950Sstevel@tonic-gatechar *dgettext(const char *domain, const char *msg_id);
10960Sstevel@tonic-gatechar *gettext(const char *msg_id);
10970Sstevel@tonic-gatechar *textdomain(const char *domain);
10980Sstevel@tonic-gate
10990Sstevel@tonic-gate/*
11000Sstevel@tonic-gate * /usr/src/lib/libc/port/print routines
11010Sstevel@tonic-gate */
11020Sstevel@tonic-gate
11030Sstevel@tonic-gate/* fprintf.c */
11040Sstevel@tonic-gate/* VARARGS2 */
11050Sstevel@tonic-gateint fprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, ...);
11060Sstevel@tonic-gate
11070Sstevel@tonic-gate/* printf.c */
11080Sstevel@tonic-gate/* VARARGS1 */
11090Sstevel@tonic-gateint printf(const char *_RESTRICT_KYWD format, ...);
11100Sstevel@tonic-gate
11110Sstevel@tonic-gate/* snprintf.c */
11120Sstevel@tonic-gate/* VARARGS2 */
11130Sstevel@tonic-gateint snprintf(char *_RESTRICT_KYWD string, size_t n,
11140Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, ...);
11150Sstevel@tonic-gate
11160Sstevel@tonic-gate/* sprintf.c */
11170Sstevel@tonic-gate/* VARARGS2 */
11180Sstevel@tonic-gateint sprintf(char *_RESTRICT_KYWD string,
11190Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, ...);
11200Sstevel@tonic-gate
11210Sstevel@tonic-gate/* vfprintf.c */
11220Sstevel@tonic-gate/* VARARGS2 */
11230Sstevel@tonic-gateint vfprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format,
11240Sstevel@tonic-gate		va_list);
11250Sstevel@tonic-gate
11260Sstevel@tonic-gate/* vprintf.c */
11270Sstevel@tonic-gate/* VARARGS1 */
11280Sstevel@tonic-gateint vprintf(const char *_RESTRICT_KYWD format, va_list);
11290Sstevel@tonic-gate
11300Sstevel@tonic-gate/* vsnprintf.c */
11310Sstevel@tonic-gate/* VARARGS2 */
11320Sstevel@tonic-gateint vsnprintf(char *_RESTRICT_KYWD string, size_t n,
11330Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, va_list);
11340Sstevel@tonic-gate
11350Sstevel@tonic-gate/* vsprintf.c */
11360Sstevel@tonic-gate/* VARARGS2 */
11370Sstevel@tonic-gateint vsprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format,
11380Sstevel@tonic-gate	va_list);
11390Sstevel@tonic-gate
11400Sstevel@tonic-gate/*
11410Sstevel@tonic-gate * /usr/src/lib/libc/port/regex routines
11420Sstevel@tonic-gate */
11430Sstevel@tonic-gate
11440Sstevel@tonic-gate/* regex.c */
11450Sstevel@tonic-gatechar *regex(const char *regexp, const char *stringp, ...);
11460Sstevel@tonic-gate#ifdef __loc1
11470Sstevel@tonic-gate#undef __loc1
11480Sstevel@tonic-gate#endif
11490Sstevel@tonic-gatechar *__loc1;
11500Sstevel@tonic-gate
11510Sstevel@tonic-gate/* regcmp.c */
11520Sstevel@tonic-gatechar *regcmp(const char *regexp, ...);
11530Sstevel@tonic-gate#ifdef __i_size
11540Sstevel@tonic-gate#undef __i_size
11550Sstevel@tonic-gate#endif
11560Sstevel@tonic-gateint __i_size;
11570Sstevel@tonic-gate
11580Sstevel@tonic-gate/*
11590Sstevel@tonic-gate * /usr/src/lib/libc/port/stdio routines
11600Sstevel@tonic-gate */
11610Sstevel@tonic-gate
11620Sstevel@tonic-gate/* _filbuf.c */
11630Sstevel@tonic-gateint _filbuf(FILE *iop);
11640Sstevel@tonic-gate
11650Sstevel@tonic-gate/* _flsbuf.c */
11660Sstevel@tonic-gateint _flsbuf(int ch, FILE *iop);
11670Sstevel@tonic-gate
11680Sstevel@tonic-gate/* _wrtchk.c */
11690Sstevel@tonic-gateint _wrtchk(FILE *iop);
11700Sstevel@tonic-gate
11710Sstevel@tonic-gate/* clearerr.c */
11720Sstevel@tonic-gatevoid clearerr(FILE *iop);
11730Sstevel@tonic-gate
11740Sstevel@tonic-gate/* ctermid.c */
11750Sstevel@tonic-gatechar *ctermid(char *s);
11760Sstevel@tonic-gatechar *ctermid_r(char *s);
11770Sstevel@tonic-gate
11780Sstevel@tonic-gate/* cuserid.c */
11790Sstevel@tonic-gatechar *cuserid(char *s);
11800Sstevel@tonic-gate
11810Sstevel@tonic-gate/* data.c */
11820Sstevel@tonic-gate
11830Sstevel@tonic-gate/* doscan.c */
11840Sstevel@tonic-gateint _doscan(FILE *iop, const char *fmt, va_list va_alist);
11850Sstevel@tonic-gate
11860Sstevel@tonic-gate/* fdopen.c */
11870Sstevel@tonic-gateFILE *fdopen(int fd, const char *type);
11880Sstevel@tonic-gate
11890Sstevel@tonic-gate/* feof.c */
11900Sstevel@tonic-gateint feof(FILE *iop);
11910Sstevel@tonic-gate
11920Sstevel@tonic-gate/* ferror.c */
11930Sstevel@tonic-gateint ferror(FILE *iop);
11940Sstevel@tonic-gate
11950Sstevel@tonic-gate/* fgetc.c */
11960Sstevel@tonic-gateint fgetc(FILE *iop);
11970Sstevel@tonic-gate
11980Sstevel@tonic-gate/* fgets.c */
11990Sstevel@tonic-gatechar *fgets(char *_RESTRICT_KYWD buf, int size, FILE *_RESTRICT_KYWD iop);
12000Sstevel@tonic-gate
12010Sstevel@tonic-gate/* fileno.c */
12020Sstevel@tonic-gateint _fileno(FILE *iop);
12030Sstevel@tonic-gate
12040Sstevel@tonic-gate/* flush.c */
12050Sstevel@tonic-gatevoid _cleanup(void);
12060Sstevel@tonic-gateFILE *_findiop(void);
12070Sstevel@tonic-gatetypedef unsigned char Uchar;
12080Sstevel@tonic-gatevoid _setbufend(FILE *iop, Uchar *end);
12090Sstevel@tonic-gateUchar *_realbufend(FILE *iop);
12100Sstevel@tonic-gatevoid _bufsync(FILE *iop, Uchar *bufend);
12110Sstevel@tonic-gateint _xflsbuf(FILE *iop);
12120Sstevel@tonic-gateint fflush(FILE *iop);
12130Sstevel@tonic-gateint fclose(FILE *iop);
12140Sstevel@tonic-gate
12150Sstevel@tonic-gate/* fopen.c */
12160Sstevel@tonic-gateFILE *fopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type);
12170Sstevel@tonic-gateFILE *freopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type,
12180Sstevel@tonic-gate		FILE *_RESTRICT_KYWD iop);
12190Sstevel@tonic-gate
12200Sstevel@tonic-gate/* fpos.c */
12210Sstevel@tonic-gateint fgetpos(FILE *_RESTRICT_KYWD stream, fpos_t *_RESTRICT_KYWD pos);
12220Sstevel@tonic-gateint fsetpos(FILE *stream, const fpos_t *pos);
12230Sstevel@tonic-gate
12240Sstevel@tonic-gate/* fputc.c */
12250Sstevel@tonic-gateint fputc(int ch, FILE *iop);
12260Sstevel@tonic-gate
12270Sstevel@tonic-gate/* fputs.c */
12280Sstevel@tonic-gateint fputs(const char *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
12290Sstevel@tonic-gate
12300Sstevel@tonic-gate/* fread.c */
12310Sstevel@tonic-gatesize_t fread(void *_RESTRICT_KYWD ptr, size_t size, size_t count,
12320Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
12330Sstevel@tonic-gate
12340Sstevel@tonic-gate/* fseek.c */
12350Sstevel@tonic-gateint fseek(FILE *iop, long offset, int ptrname);
12360Sstevel@tonic-gate
12370Sstevel@tonic-gate/* ftell.c */
12380Sstevel@tonic-gatelong ftell(FILE *iop);
12390Sstevel@tonic-gate
12400Sstevel@tonic-gate/* fwrite.c */
12410Sstevel@tonic-gatesize_t fwrite(const void *_RESTRICT_KYWD ptr1, size_t size, size_t count,
12420Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
12430Sstevel@tonic-gate
12440Sstevel@tonic-gate/* getc.c */
12450Sstevel@tonic-gateint getc(FILE *iop);
12460Sstevel@tonic-gate
12470Sstevel@tonic-gate/* getchar.c */
12480Sstevel@tonic-gateint getchar(void);
12490Sstevel@tonic-gate
12500Sstevel@tonic-gate/* getpass.c */
12510Sstevel@tonic-gatechar *getpass(const char *prompt);
12520Sstevel@tonic-gate
12530Sstevel@tonic-gate/* getpass.c */
12540Sstevel@tonic-gatechar *getpassphrase(const char *prompt);
12550Sstevel@tonic-gate
12560Sstevel@tonic-gate/* gets.c */
12570Sstevel@tonic-gatechar *gets(char *buf);
12580Sstevel@tonic-gate
12590Sstevel@tonic-gate/* getw.c */
12600Sstevel@tonic-gateint getw(FILE *stream);
12610Sstevel@tonic-gate
12620Sstevel@tonic-gate/* popen.c */
12630Sstevel@tonic-gateFILE *popen(const char *cmd, const char *mode);
12640Sstevel@tonic-gateint pclose(FILE *ptr);
12650Sstevel@tonic-gate
12660Sstevel@tonic-gate/* putc.c */
12670Sstevel@tonic-gateint putc(int ch, FILE *iop);
12680Sstevel@tonic-gate
12690Sstevel@tonic-gate/* putchar.c */
12700Sstevel@tonic-gateint putchar(int ch);
12710Sstevel@tonic-gate
12720Sstevel@tonic-gate/* puts.c */
12730Sstevel@tonic-gateint puts(const char *ptr);
12740Sstevel@tonic-gate
12750Sstevel@tonic-gate/* putw.c */
12760Sstevel@tonic-gateint putw(int w, FILE *stream);
12770Sstevel@tonic-gate
12780Sstevel@tonic-gate/* rewind.c */
12790Sstevel@tonic-gatevoid rewind(FILE *iop);
12800Sstevel@tonic-gate
12810Sstevel@tonic-gate/* scanf.c */
12820Sstevel@tonic-gate/* VARARGS1 */
12830Sstevel@tonic-gateint scanf(const char *_RESTRICT_KYWD fmt, ...);
12840Sstevel@tonic-gate
12850Sstevel@tonic-gate/* VARARGS2 */
12860Sstevel@tonic-gateint fscanf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD fmt, ...);
12870Sstevel@tonic-gate
12880Sstevel@tonic-gate/* VARARGS2 */
12890Sstevel@tonic-gateint sscanf(const char *_RESTRICT_KYWD str, const char *_RESTRICT_KYWD fmt, ...);
12900Sstevel@tonic-gate
12910Sstevel@tonic-gate/* setbuf.c */
12920Sstevel@tonic-gatevoid setbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf);
12930Sstevel@tonic-gate
12940Sstevel@tonic-gate/* setvbuf.c */
12950Sstevel@tonic-gateint setvbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf, int type,
12960Sstevel@tonic-gate		size_t size);
12970Sstevel@tonic-gate
12980Sstevel@tonic-gate/* system.c */
12990Sstevel@tonic-gateint system(const char *s);
13000Sstevel@tonic-gate
13010Sstevel@tonic-gate/* tempnam.c */
13020Sstevel@tonic-gatechar *tempnam(const char *dir, const char *pfx);
13030Sstevel@tonic-gate
13040Sstevel@tonic-gate/* tmpfile.c */
13050Sstevel@tonic-gateFILE *tmpfile(void);
13060Sstevel@tonic-gate
13070Sstevel@tonic-gate/* tmpnam.c */
13080Sstevel@tonic-gatechar *tmpnam(char *s);
13090Sstevel@tonic-gatechar *tmpnam_r(char *);
13100Sstevel@tonic-gate
13110Sstevel@tonic-gate/* ungetc.c */
13120Sstevel@tonic-gateint ungetc(int c, FILE *iop);
13130Sstevel@tonic-gate
13140Sstevel@tonic-gate/*
13150Sstevel@tonic-gate * /usr/src/lib/libc/port/sys routines
13160Sstevel@tonic-gate */
13170Sstevel@tonic-gate
13180Sstevel@tonic-gate/* exacctsys.c */
13190Sstevel@tonic-gatesize_t getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize);
13200Sstevel@tonic-gateint putacct(idtype_t idtype, id_t id, void *buf, size_t bufsize, int flags);
13210Sstevel@tonic-gateint wracct(idtype_t idtype, id_t id, int flags);
13220Sstevel@tonic-gate
13230Sstevel@tonic-gate/* execl.c */
13240Sstevel@tonic-gate/* VARARGS1 */
13250Sstevel@tonic-gateint execl(const char *name, const char *, ...);
13260Sstevel@tonic-gate
13270Sstevel@tonic-gate/* execle.c */
13280Sstevel@tonic-gateint execle(const char *, const char *file, ...);
13290Sstevel@tonic-gate
13300Sstevel@tonic-gate/* execv.c */
13310Sstevel@tonic-gateint execv(const char *file, char *const *argv);
13320Sstevel@tonic-gate
13330Sstevel@tonic-gate/* lockf.c */
13340Sstevel@tonic-gateint lockf(int fildes, int function, off_t size);
13350Sstevel@tonic-gate
13360Sstevel@tonic-gate/* meminfosys.c */
13370Sstevel@tonic-gateint meminfo(const uint64_t *inaddr, int addr_count, const uint_t *info_req,
13380Sstevel@tonic-gate	int info_count, uint64_t *outdata, uint_t *validity);
13390Sstevel@tonic-gate
13400Sstevel@tonic-gate/* msgsys.c */
13410Sstevel@tonic-gateint msgget(key_t key, int msgflg);
13420Sstevel@tonic-gateint msgctl(int msqid, int cmd, struct msqid_ds *buf);
13430Sstevel@tonic-gatessize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
13440Sstevel@tonic-gateint msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
13450Sstevel@tonic-gate
13460Sstevel@tonic-gate/* nfssys.c */
13470Sstevel@tonic-gate/*
13480Sstevel@tonic-gateint exportfs(char *dir, struct export *ep);
13490Sstevel@tonic-gateint nfs_getfh(char *path, fhandle_t *fhp);
13500Sstevel@tonic-gateint nfssvc(int fd);
13510Sstevel@tonic-gate*/
13520Sstevel@tonic-gate
13530Sstevel@tonic-gate/* psetsys.c */
13540Sstevel@tonic-gateint pset_create(psetid_t *npset);
13550Sstevel@tonic-gateint pset_destroy(psetid_t pset);
13560Sstevel@tonic-gateint pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset);
13570Sstevel@tonic-gateint pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset);
13580Sstevel@tonic-gateint pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist);
13590Sstevel@tonic-gateint pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset);
136010089SSurya.Prakki@Sun.COMint pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset);
136110089SSurya.Prakki@Sun.COM
13620Sstevel@tonic-gate
13630Sstevel@tonic-gate/* rctlsys.c */
13640Sstevel@tonic-gateint getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
13650Sstevel@tonic-gate    int flags);
13660Sstevel@tonic-gateint setrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
13670Sstevel@tonic-gate    int flags);
13680Sstevel@tonic-gate/* (private functions) */
13693684Srd117015int setprojrctl(const char *name, rctlblk_t *new_rblk, size_t size, int flags);
13700Sstevel@tonic-gateint rctlctl(const char *, rctlblk_t *, int);
13710Sstevel@tonic-gatesize_t rctllist(char *, size_t);
13720Sstevel@tonic-gate
13730Sstevel@tonic-gate
13740Sstevel@tonic-gate/* semsys.c */
13750Sstevel@tonic-gateint semctl(int semid, int semnum, int cmd, ...);
13760Sstevel@tonic-gateint semget(key_t key, int nsems, int semflg);
13770Sstevel@tonic-gateint semop(int semid, struct sembuf *sops, size_t nsops);
13780Sstevel@tonic-gate
13790Sstevel@tonic-gate/* shmsys.c */
13800Sstevel@tonic-gatevoid *shmat(int shmid, const void *shmaddr, int shmflg);
13810Sstevel@tonic-gateint shmctl(int shmid, int cmd, struct shmid_ds *buf);
13820Sstevel@tonic-gate#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)
13830Sstevel@tonic-gateint shmdt(const void *);
13840Sstevel@tonic-gate#else
13850Sstevel@tonic-gateint shmdt(char *);
13860Sstevel@tonic-gate#endif /* defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) */
13870Sstevel@tonic-gateint shmget(key_t key, size_t size, int shmflg);
13880Sstevel@tonic-gate
13890Sstevel@tonic-gate/* tasksys.c */
13900Sstevel@tonic-gatetaskid_t settaskid(projid_t project, uint_t flags);
13910Sstevel@tonic-gatetaskid_t gettaskid(void);
13920Sstevel@tonic-gateprojid_t getprojid(void);
13930Sstevel@tonic-gate
13940Sstevel@tonic-gate/*
13950Sstevel@tonic-gate * /usr/src/lib/libc/port/widec routines
13960Sstevel@tonic-gate */
13970Sstevel@tonic-gate
13980Sstevel@tonic-gate/* fgetws.c */
13990Sstevel@tonic-gatewchar_t *fgetws(wchar_t *_RESTRICT_KYWD ptr, int  size,
14000Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
14010Sstevel@tonic-gate
14020Sstevel@tonic-gate/* fputwc.c */
14030Sstevel@tonic-gatewint_t fputwc(wint_t wc, FILE *iop);
14040Sstevel@tonic-gatewint_t putwc(wint_t wc, FILE *iop);
14050Sstevel@tonic-gate
14060Sstevel@tonic-gate/* fputws.c */
14070Sstevel@tonic-gateint fputws(const wchar_t *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
14080Sstevel@tonic-gate
14090Sstevel@tonic-gate/* getwchar.c */
14100Sstevel@tonic-gatewint_t getwchar(void);
14110Sstevel@tonic-gate
14120Sstevel@tonic-gate/* getwidth.c */
14130Sstevel@tonic-gatevoid getwidth(eucwidth_t *eucstruct);
14140Sstevel@tonic-gate
14150Sstevel@tonic-gate/* getws.c */
14160Sstevel@tonic-gatewchar_t *getws(wchar_t *ptr);
14170Sstevel@tonic-gate
14180Sstevel@tonic-gate/* iswctype.c */
14190Sstevel@tonic-gateint iswctype(wint_t wc, wctype_t charclass);
14200Sstevel@tonic-gateint iswalpha(wint_t c);
14210Sstevel@tonic-gateint iswupper(wint_t c);
14220Sstevel@tonic-gateint iswlower(wint_t c);
14230Sstevel@tonic-gateint iswdigit(wint_t c);
14240Sstevel@tonic-gateint iswxdigit(wint_t c);
14250Sstevel@tonic-gateint iswalnum(wint_t c);
14260Sstevel@tonic-gateint iswspace(wint_t c);
14270Sstevel@tonic-gateint iswpunct(wint_t c);
14280Sstevel@tonic-gateint iswprint(wint_t c);
14290Sstevel@tonic-gateint iswgraph(wint_t c);
14300Sstevel@tonic-gateint iswcntrl(wint_t c);
14310Sstevel@tonic-gateint isphonogram(wint_t c);
14320Sstevel@tonic-gateint isideogram(wint_t c);
14330Sstevel@tonic-gateint isenglish(wint_t c);
14340Sstevel@tonic-gateint isnumber(wint_t c);
14350Sstevel@tonic-gateint isspecial(wint_t c);
14360Sstevel@tonic-gate
14370Sstevel@tonic-gate/* libwcollate.c */
14380Sstevel@tonic-gate
14390Sstevel@tonic-gate/* putwchar.c */
14400Sstevel@tonic-gatewint_t putwchar(wint_t c);
14410Sstevel@tonic-gate
14420Sstevel@tonic-gate/* putws.c */
14430Sstevel@tonic-gateint putws(const wchar_t *ptr);
14440Sstevel@tonic-gate
14450Sstevel@tonic-gate/* scrwidth.c */
14460Sstevel@tonic-gate
14470Sstevel@tonic-gate/* strtows.c */
14480Sstevel@tonic-gatewchar_t *strtows(wchar_t *s1, char *s2);
14490Sstevel@tonic-gatechar *wstostr(char *s1, wchar_t *s2);
14500Sstevel@tonic-gate
14510Sstevel@tonic-gate/* trwctype.c */
14520Sstevel@tonic-gatewint_t towupper(wint_t c);
14530Sstevel@tonic-gatewint_t towlower(wint_t c);
14540Sstevel@tonic-gate
14550Sstevel@tonic-gate/* ungetwc.c */
14560Sstevel@tonic-gatewint_t ungetwc(wint_t wc, FILE *iop);
14570Sstevel@tonic-gate
14580Sstevel@tonic-gate/* wcollate.c */
14590Sstevel@tonic-gatesize_t wcsxfrm(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
14600Sstevel@tonic-gate	size_t n);
14610Sstevel@tonic-gateint wcscoll(const wchar_t *s1, const wchar_t *s2);
14620Sstevel@tonic-gate
14630Sstevel@tonic-gate/* wcsftime.c */
14640Sstevel@tonic-gate#if !defined(__amd64) 		/* XX64 - fix me */
14650Sstevel@tonic-gatesize_t wcsftime(wchar_t *wcs, size_t maxsize,
14660Sstevel@tonic-gate	const char *format, const struct tm *timeptr);
14670Sstevel@tonic-gate#endif	/* __amd64 */
14680Sstevel@tonic-gate
14690Sstevel@tonic-gate/* wcstring.c */
14700Sstevel@tonic-gatewint_t fgetwc(FILE *iop);
14710Sstevel@tonic-gatewint_t getwc(FILE *iop);
14720Sstevel@tonic-gateint wcwidth(wchar_t wc);
14730Sstevel@tonic-gateint wcswidth(const wchar_t *pwcs, size_t n);
14740Sstevel@tonic-gate
14750Sstevel@tonic-gate/* wcswcs.c */
14760Sstevel@tonic-gatewchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2);
14770Sstevel@tonic-gate
14780Sstevel@tonic-gate/* wcsxfrm.c - empty file! */
14790Sstevel@tonic-gate
14800Sstevel@tonic-gate/* wcsxfrm.xpg4.c */
14810Sstevel@tonic-gate
14820Sstevel@tonic-gate/* wisprint.c */
14830Sstevel@tonic-gateint wisprint(wchar_t c);
14840Sstevel@tonic-gate
14850Sstevel@tonic-gate/* wscasecmp.c */
14860Sstevel@tonic-gateint wscasecmp(const wchar_t *s1, const wchar_t *s2);
14870Sstevel@tonic-gate
14880Sstevel@tonic-gate/* wscat.c */
14890Sstevel@tonic-gatewchar_t *wcscat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
14900Sstevel@tonic-gatewchar_t *wscat(wchar_t *s1, const wchar_t *s2);
14910Sstevel@tonic-gate
14920Sstevel@tonic-gate/* wschr.c */
14930Sstevel@tonic-gatewchar_t *wcschr(const wchar_t *sp, wchar_t c);
14940Sstevel@tonic-gatewchar_t *wschr(const wchar_t *sp, wchar_t c);
14950Sstevel@tonic-gate
14960Sstevel@tonic-gate/* wscmp.c */
14970Sstevel@tonic-gateint wcscmp(const wchar_t *s1, const wchar_t *s2);
14980Sstevel@tonic-gateint wscmp(const wchar_t *s1, const wchar_t *s2);
14990Sstevel@tonic-gate
15000Sstevel@tonic-gate/* wscol.c */
15010Sstevel@tonic-gateint wscol(const wchar_t *s1);
15020Sstevel@tonic-gate
15030Sstevel@tonic-gate/* wscpy.c */
15040Sstevel@tonic-gatewchar_t *wcscpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
15050Sstevel@tonic-gatewchar_t *wscpy(wchar_t *s1, const wchar_t *s2);
15060Sstevel@tonic-gate
15070Sstevel@tonic-gate/* wscspn.c */
15080Sstevel@tonic-gatesize_t wcscspn(const wchar_t *string, const wchar_t *charset);
15090Sstevel@tonic-gatesize_t wscspn(const wchar_t *string, const wchar_t *charset);
15100Sstevel@tonic-gate
15110Sstevel@tonic-gate/* wsdup.c */
15120Sstevel@tonic-gatewchar_t *wsdup(const wchar_t *s1);
15130Sstevel@tonic-gate
15140Sstevel@tonic-gate/* wslen.c */
15150Sstevel@tonic-gatesize_t wcslen(const wchar_t *s);
15160Sstevel@tonic-gatesize_t wslen(const wchar_t *s);
15170Sstevel@tonic-gate
15180Sstevel@tonic-gate/* wsncasecmp.c */
15190Sstevel@tonic-gateint wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15200Sstevel@tonic-gate
15210Sstevel@tonic-gate/* wsncat.c */
15220Sstevel@tonic-gatewchar_t *wcsncat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
15230Sstevel@tonic-gate	size_t n);
15240Sstevel@tonic-gatewchar_t *wsncat(wchar_t *s1, const wchar_t *s2, size_t n);
15250Sstevel@tonic-gate
15260Sstevel@tonic-gate/* wsncmp.c */
15270Sstevel@tonic-gateint wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15280Sstevel@tonic-gateint wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15290Sstevel@tonic-gate
15300Sstevel@tonic-gate/* wsncpy.c */
15310Sstevel@tonic-gatewchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
15320Sstevel@tonic-gate	size_t n);
15330Sstevel@tonic-gatewchar_t *wsncpy(wchar_t *s1, const wchar_t *s2, size_t n);
15340Sstevel@tonic-gate
15350Sstevel@tonic-gate/* wspbrk.c */
15360Sstevel@tonic-gatewchar_t *wcspbrk(const wchar_t *string, const wchar_t *brkset);
15370Sstevel@tonic-gatewchar_t *wspbrk(const wchar_t *string, const wchar_t *brkset);
15380Sstevel@tonic-gate
15390Sstevel@tonic-gate/* wsprintf.c */
15400Sstevel@tonic-gateint wsprintf(wchar_t *wstring, const char *format, ...);
15410Sstevel@tonic-gate
15420Sstevel@tonic-gate/* wsrchr.c */
15430Sstevel@tonic-gatewchar_t *wcsrchr(const wchar_t *sp, wchar_t c);
15440Sstevel@tonic-gatewchar_t *wsrchr(const wchar_t *sp, wchar_t c);
15450Sstevel@tonic-gate
15460Sstevel@tonic-gate/* wsscanf.c */
15470Sstevel@tonic-gateint wsscanf(wchar_t *s, const char *format, ...);
15480Sstevel@tonic-gate
15490Sstevel@tonic-gate/* wssize.c */
15500Sstevel@tonic-gate
15510Sstevel@tonic-gate/* wsspn.c */
15520Sstevel@tonic-gatesize_t wcsspn(const wchar_t *string, const wchar_t *charset);
15530Sstevel@tonic-gatesize_t wsspn(const wchar_t *string, const wchar_t *charset);
15540Sstevel@tonic-gate
15550Sstevel@tonic-gate/* wstod.c */
15560Sstevel@tonic-gatedouble wcstod(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
15570Sstevel@tonic-gatefloat wcstof(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
15580Sstevel@tonic-gatelong double wcstold(const wchar_t *_RESTRICT_KYWD cp,
15590Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr);
15600Sstevel@tonic-gatedouble wstod(const wchar_t *cp, wchar_t **ptr);
15610Sstevel@tonic-gate
15620Sstevel@tonic-gate/* wstok.c */
15630Sstevel@tonic-gate#if !defined(__amd64) 		/* XX64 - fix me */
15640Sstevel@tonic-gatewchar_t *wcstok(wchar_t *string, const wchar_t *sepset);
15650Sstevel@tonic-gatewchar_t *wstok(wchar_t *string, const wchar_t *sepset);
15660Sstevel@tonic-gate#endif	/* __amd64 */
15670Sstevel@tonic-gate
15680Sstevel@tonic-gate/* wcstol.c */
15690Sstevel@tonic-gatelong wcstol(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr,
15700Sstevel@tonic-gate	int base);
15710Sstevel@tonic-gatelong long wcstoll(const wchar_t *_RESTRICT_KYWD str,
15720Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
15730Sstevel@tonic-gate
15740Sstevel@tonic-gate/* wcstoul.c */
15750Sstevel@tonic-gateunsigned long wcstoul(const wchar_t *_RESTRICT_KYWD str,
15760Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
15770Sstevel@tonic-gateunsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD str,
15780Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
15790Sstevel@tonic-gate
15800Sstevel@tonic-gate/* wcstoimax.c */
15810Sstevel@tonic-gateintmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD nptr,
15820Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD endptr, int base);
15830Sstevel@tonic-gateuintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD nptr,
15840Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD endptr, int base);
15850Sstevel@tonic-gate
15860Sstevel@tonic-gate/* wstol.c */
15870Sstevel@tonic-gatelong wstol(const wchar_t *str, wchar_t **ptr, int base);
15880Sstevel@tonic-gate
15890Sstevel@tonic-gate/* wstoll.c */
15900Sstevel@tonic-gatelong long wstoll(const wchar_t *str, wchar_t **ptr, int base);
15910Sstevel@tonic-gatelong long watoll(const wchar_t *p);
15920Sstevel@tonic-gate
15930Sstevel@tonic-gate/* wsxfrm.c */
15940Sstevel@tonic-gatesize_t wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n);
15950Sstevel@tonic-gateint wscoll(const wchar_t *s1, const wchar_t *s2);
15960Sstevel@tonic-gate
15970Sstevel@tonic-gate/*
15980Sstevel@tonic-gate * /usr/src/lib/libc/port/gen/event_port.c
15990Sstevel@tonic-gate */
16000Sstevel@tonic-gateint port_dispatch(int port, int flags, int source, int events, uintptr_t object,
16010Sstevel@tonic-gate    void *user);
16020Sstevel@tonic-gate
16030Sstevel@tonic-gate/*
16040Sstevel@tonic-gate * /usr/src/lib/libc/$MACH/gen routines
16050Sstevel@tonic-gate */
16060Sstevel@tonic-gate
16070Sstevel@tonic-gate/* alloca.s */
16080Sstevel@tonic-gate
16090Sstevel@tonic-gatevoid *__builtin_alloca(size_t);
16100Sstevel@tonic-gate
16110Sstevel@tonic-gate/*
16120Sstevel@tonic-gate * modctl(int arg, ...) and utssys(...) are not available from a header
16130Sstevel@tonic-gate * file, but our utilities which make use of it should be able to be
16140Sstevel@tonic-gate * lint clean.
16150Sstevel@tonic-gate */
16160Sstevel@tonic-gateint modctl(int arg, ...);
16170Sstevel@tonic-gateint utssys(void *buf, int arg, int type, void *outbp);
16180Sstevel@tonic-gate
16190Sstevel@tonic-gate
16200Sstevel@tonic-gatetypedef float single;
16210Sstevel@tonic-gatetypedef unsigned extended[3];
16220Sstevel@tonic-gatetypedef long double quadruple;
16230Sstevel@tonic-gatetypedef unsigned fp_exception_field_type;
16240Sstevel@tonic-gate
16250Sstevel@tonic-gatetypedef char decimal_string[512];
16260Sstevel@tonic-gate
16270Sstevel@tonic-gateenum fp_class_type {
16280Sstevel@tonic-gate	fp_zero	 = 0,
16290Sstevel@tonic-gate	fp_subnormal    = 1,
16300Sstevel@tonic-gate	fp_normal	= 2,
16310Sstevel@tonic-gate	fp_infinity	= 3,
16320Sstevel@tonic-gate	fp_quiet	= 4,
16330Sstevel@tonic-gate	fp_signaling    = 5
16340Sstevel@tonic-gate};
16350Sstevel@tonic-gate
16360Sstevel@tonic-gateenum fp_direction_type {
16370Sstevel@tonic-gate	fp_nearest	= 0,
16380Sstevel@tonic-gate	fp_tozero	= 1,
16390Sstevel@tonic-gate	fp_positive	= 2,
16400Sstevel@tonic-gate	fp_negative	= 3
16410Sstevel@tonic-gate};
16420Sstevel@tonic-gate
16430Sstevel@tonic-gatetypedef struct {
16440Sstevel@tonic-gate	enum fp_class_type fpclass;
16450Sstevel@tonic-gate	int sign;
16460Sstevel@tonic-gate	int exponent;
16470Sstevel@tonic-gate	decimal_string ds;
16480Sstevel@tonic-gate	int more;
16490Sstevel@tonic-gate	int ndigits;
16500Sstevel@tonic-gate} decimal_record;
16510Sstevel@tonic-gate
16520Sstevel@tonic-gateenum decimal_form {
16530Sstevel@tonic-gate	fixed_form,
16540Sstevel@tonic-gate	floating_form
16550Sstevel@tonic-gate};
16560Sstevel@tonic-gate
16570Sstevel@tonic-gatetypedef struct {
16580Sstevel@tonic-gate	enum fp_direction_type rd;
16590Sstevel@tonic-gate	enum decimal_form df;
16600Sstevel@tonic-gate	int ndigits;
16610Sstevel@tonic-gate} decimal_mode;
16620Sstevel@tonic-gate
16630Sstevel@tonic-gateenum decimal_string_form {
16640Sstevel@tonic-gate	invalid_form,
16650Sstevel@tonic-gate	whitespace_form,
16660Sstevel@tonic-gate	fixed_int_form,
16670Sstevel@tonic-gate	fixed_intdot_form,
16680Sstevel@tonic-gate	fixed_dotfrac_form,
16690Sstevel@tonic-gate	fixed_intdotfrac_form,
16700Sstevel@tonic-gate	floating_int_form,
16710Sstevel@tonic-gate	floating_intdot_form,
16720Sstevel@tonic-gate	floating_dotfrac_form,
16730Sstevel@tonic-gate	floating_intdotfrac_form,
16740Sstevel@tonic-gate	inf_form,
16750Sstevel@tonic-gate	infinity_form,
16760Sstevel@tonic-gate	nan_form,
16770Sstevel@tonic-gate	nanstring_form
16780Sstevel@tonic-gate};
16790Sstevel@tonic-gate
16800Sstevel@tonic-gatetypedef int sigfpe_code_type;
16810Sstevel@tonic-gate
16820Sstevel@tonic-gatetypedef void (*sigfpe_handler_type)();
16830Sstevel@tonic-gate
16840Sstevel@tonic-gateextern sigfpe_handler_type sigfpe(sigfpe_code_type, sigfpe_handler_type);
16850Sstevel@tonic-gate
16860Sstevel@tonic-gateextern void single_to_decimal(single *, decimal_mode *, decimal_record *,
16870Sstevel@tonic-gate				fp_exception_field_type *);
16880Sstevel@tonic-gate
16890Sstevel@tonic-gateextern void double_to_decimal(double *, decimal_mode *, decimal_record *,
16900Sstevel@tonic-gate				fp_exception_field_type *);
16910Sstevel@tonic-gateextern void extended_to_decimal(extended *, decimal_mode *,
16920Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
16930Sstevel@tonic-gateextern void quadruple_to_decimal(quadruple *, decimal_mode *,
16940Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
16950Sstevel@tonic-gateextern void decimal_to_single(single *, decimal_mode *, decimal_record *,
16960Sstevel@tonic-gate				fp_exception_field_type *);
16970Sstevel@tonic-gateextern void decimal_to_double(double *, decimal_mode *, decimal_record *,
16980Sstevel@tonic-gate				fp_exception_field_type *);
16990Sstevel@tonic-gateextern void decimal_to_extended(extended *, decimal_mode *,
17000Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17010Sstevel@tonic-gateextern void decimal_to_quadruple(quadruple *, decimal_mode *,
17020Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17030Sstevel@tonic-gateextern void string_to_decimal(char **, int, int, decimal_record *,
17040Sstevel@tonic-gate				enum decimal_string_form *, char **);
17050Sstevel@tonic-gateextern void func_to_decimal(char **, int, int, decimal_record *,
17060Sstevel@tonic-gate				enum decimal_string_form *, char **,
17070Sstevel@tonic-gate				int (*)(void), int *, int (*)(int));
17080Sstevel@tonic-gateextern void file_to_decimal(char **, int, int, decimal_record *,
17090Sstevel@tonic-gate				enum decimal_string_form *, char **,
17100Sstevel@tonic-gate				FILE *, int *);
17110Sstevel@tonic-gateextern char *seconvert(single *, int, int *, int *, char *);
17120Sstevel@tonic-gateextern char *sfconvert(single *, int, int *, int *, char *);
17130Sstevel@tonic-gateextern char *sgconvert(single *, int, int, char *);
17140Sstevel@tonic-gateextern char *econvert(double, int, int *, int *, char *);
17150Sstevel@tonic-gateextern char *fconvert(double, int, int *, int *, char *);
17160Sstevel@tonic-gateextern char *gconvert(double, int, int, char *);
17170Sstevel@tonic-gateextern char *qeconvert(quadruple *, int, int *, int *, char *);
17180Sstevel@tonic-gateextern char *qfconvert(quadruple *, int, int *, int *, char *);
17190Sstevel@tonic-gateextern char *qgconvert(quadruple *, int, int, char *);
17200Sstevel@tonic-gate
17210Sstevel@tonic-gateextern void __assert(const char *, const char *, int);
17220Sstevel@tonic-gate
17230Sstevel@tonic-gateextern int setjmp(jmp_buf);
17240Sstevel@tonic-gateextern void longjmp(jmp_buf, int);
17250Sstevel@tonic-gateextern int sigsetjmp(sigjmp_buf, int);
17260Sstevel@tonic-gateextern void siglongjmp(sigjmp_buf, int);
17270Sstevel@tonic-gate
17280Sstevel@tonic-gateint uname(struct utsname *);
17290Sstevel@tonic-gateint _uname(struct utsname *);
17300Sstevel@tonic-gate
17310Sstevel@tonic-gateint errno;
17320Sstevel@tonic-gateint *___errno()
17330Sstevel@tonic-gate{ return (&errno); }
17340Sstevel@tonic-gate
17350Sstevel@tonic-gateextern int getloadavg(double [], int);
17360Sstevel@tonic-gate
17370Sstevel@tonic-gateextern long pcsample(uintptr_t [], long);
17380Sstevel@tonic-gate
17390Sstevel@tonic-gateint fstat(int, struct stat *);
17400Sstevel@tonic-gateint stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
17410Sstevel@tonic-gateint lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
17420Sstevel@tonic-gateint mknod(const char *, mode_t, dev_t);
17430Sstevel@tonic-gate
17440Sstevel@tonic-gateextern int __init_daemon_priv(int, uid_t uid, gid_t gid, ...);
17450Sstevel@tonic-gateextern void __fini_daemon_priv(const char *, ...);
17460Sstevel@tonic-gateextern int __init_suid_priv(int, ...);
17470Sstevel@tonic-gateextern int __priv_bracket(priv_op_t);
17480Sstevel@tonic-gateextern void __priv_relinquish(void);
17490Sstevel@tonic-gateextern const char * __priv_getsetbynum(const void *, int);
17500Sstevel@tonic-gateextern char * __priv_set_to_str(void *, const priv_set_t *, char, int);
17510Sstevel@tonic-gate
17520Sstevel@tonic-gate/* private interface to get the groups list for a certain user */
17530Sstevel@tonic-gateint _getgroupsbymember(const char *, gid_t[], int, int);
17540Sstevel@tonic-gate
17550Sstevel@tonic-gate/* private interface for use only by java */
17560Sstevel@tonic-gatevolatile sc_shared_t *volatile *_thr_schedctl(void);
17571645Scomay
17581645Scomay/* private interface to unmount all autofs mounts */
17591645Scomayint _autofssys(enum autofssys_op, void *);
17601676Sjpk
17611676Sjpk/* label.c */
17621676Sjpkextern int is_system_labeled(void);
17633855Ssn199410
17645696Snw141292extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *,
17655696Snw141292	int);
17665696Snw141292extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int);
17675696Snw141292extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *,
17685696Snw141292	int);
17695696Snw141292extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int);
17705696Snw141292extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int);
17715696Snw141292extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int);
17725696Snw141292extern int u8_validate(char *, size_t, char **, int, int *);
17735696Snw141292extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
17745696Snw141292extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
17755696Snw141292	int *);
1776