xref: /titanic_50/usr/src/lib/libc/port/llib-lc (revision 7a5aac98bc37534537d4896efd4efd30627d221e)
17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5ffbafc53Scomay * Common Development and Distribution License (the "License").
6ffbafc53Scomay * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
21ffbafc53Scomay
227c478bd9Sstevel@tonic-gate/*
2323a1cceaSRoger A. Faulkner * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24ec2a3953SYuri Pankov * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
255dbfd19aSTheo Schlossnagle * Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.
260a1278f2SGary Mills * Copyright (c) 2013 Gary Mills
27538aa54dSGarrett D'Amore * Copyright 2014 Garrett D'Amore <garrett@damore.org>
283e5de5d0SEric Sproul * Copyright 2015 Circonus, Inc.  All rights reserved.
29*7a5aac98SJerry Jelinek * Copyright 2015 Joyent, Inc.
307c478bd9Sstevel@tonic-gate */
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gate/* LINTLIBRARY */
337c478bd9Sstevel@tonic-gate/* PROTOLIB1 */
347c478bd9Sstevel@tonic-gate
3523a1cceaSRoger A. Faulkner#define	__EXTENSIONS__
3623a1cceaSRoger A. Faulkner
37f841f6adSraf#include <aio.h>
387c478bd9Sstevel@tonic-gate#include <alloca.h>
39da6c28aaSamw#include <attr.h>
407c478bd9Sstevel@tonic-gate#include <atomic.h>
417c478bd9Sstevel@tonic-gate#include <ctype.h>
4206e1a714Sraf#include <deflt.h>
437c478bd9Sstevel@tonic-gate#include <dirent.h>
447c478bd9Sstevel@tonic-gate#include <dlfcn.h>
457c478bd9Sstevel@tonic-gate#include <door.h>
46d362b749Svk199839#include <err.h>
477c478bd9Sstevel@tonic-gate#include <sys/errno.h>
487c478bd9Sstevel@tonic-gate#include <euc.h>
497c478bd9Sstevel@tonic-gate#include <fcntl.h>
507c478bd9Sstevel@tonic-gate#include <float.h>
517c478bd9Sstevel@tonic-gate#include <fmtmsg.h>
527c478bd9Sstevel@tonic-gate#include <fnmatch.h>
537c478bd9Sstevel@tonic-gate#include <ftw.h>
54ec2a3953SYuri Pankov#include <glob.h>
557c478bd9Sstevel@tonic-gate#include <getwidth.h>
567c478bd9Sstevel@tonic-gate#include <grp.h>
577c478bd9Sstevel@tonic-gate#include <iconv.h>
587c478bd9Sstevel@tonic-gate#include <langinfo.h>
597c478bd9Sstevel@tonic-gate#include <libgen.h>
607c478bd9Sstevel@tonic-gate#include <libw.h>
617c478bd9Sstevel@tonic-gate#include <locale.h>
627c478bd9Sstevel@tonic-gate#include <memory.h>
637c478bd9Sstevel@tonic-gate#include <mon.h>
64f841f6adSraf#include <mqueue.h>
657c478bd9Sstevel@tonic-gate#include <nan.h>
667c478bd9Sstevel@tonic-gate#include <ndbm.h>
677c478bd9Sstevel@tonic-gate#include <limits.h>
687c478bd9Sstevel@tonic-gate#include <nl_types.h>
6923a1cceaSRoger A. Faulkner#include <poll.h>
707c478bd9Sstevel@tonic-gate#include <project.h>
717c478bd9Sstevel@tonic-gate#include <priv.h>
727c478bd9Sstevel@tonic-gate#include <pwd.h>
737c478bd9Sstevel@tonic-gate#include <rctl.h>
747c478bd9Sstevel@tonic-gate#include <regex.h>
757c478bd9Sstevel@tonic-gate#include <rpcsvc/ypclnt.h>
76f841f6adSraf#include <sched.h>
777c478bd9Sstevel@tonic-gate#include <search.h>
78f841f6adSraf#include <semaphore.h>
797c478bd9Sstevel@tonic-gate#include <setjmp.h>
807c478bd9Sstevel@tonic-gate#include <shadow.h>
817c478bd9Sstevel@tonic-gate#include <siginfo.h>
827c478bd9Sstevel@tonic-gate#include <signal.h>
837c478bd9Sstevel@tonic-gate#include <stdarg.h>
847c478bd9Sstevel@tonic-gate#include <ucred.h>
857c478bd9Sstevel@tonic-gate#include <sys/ucred.h>
867c478bd9Sstevel@tonic-gate#include <unistd.h>
877c478bd9Sstevel@tonic-gate#include <ulimit.h>
887c478bd9Sstevel@tonic-gate#include <utime.h>
897c478bd9Sstevel@tonic-gate#include <stddef.h>
907c478bd9Sstevel@tonic-gate#include <stdio.h>
917c478bd9Sstevel@tonic-gate#include <stdlib.h>
927c478bd9Sstevel@tonic-gate#include <string.h>
937c478bd9Sstevel@tonic-gate#include <stropts.h>
947c478bd9Sstevel@tonic-gate#include <synch.h>
957c478bd9Sstevel@tonic-gate#include <sys/acctctl.h>
967c478bd9Sstevel@tonic-gate#include <sys/acl.h>
97f841f6adSraf#include <sys/asynch.h>
987c478bd9Sstevel@tonic-gate#include <sys/byteorder.h>
997c478bd9Sstevel@tonic-gate#include <sys/cladm.h>
1007c478bd9Sstevel@tonic-gate#include <sys/corectl.h>
1017c478bd9Sstevel@tonic-gate#include <sys/dl.h>
1027c478bd9Sstevel@tonic-gate#include <sys/exacct.h>
1037c478bd9Sstevel@tonic-gate#include <sys/fcntl.h>
1047c478bd9Sstevel@tonic-gate#include <sys/file.h>
1057c478bd9Sstevel@tonic-gate#include <sys/fs/namenode.h>
1067c478bd9Sstevel@tonic-gate#include <sys/instance.h>
1077c478bd9Sstevel@tonic-gate#include <sys/ipc.h>
1087c478bd9Sstevel@tonic-gate#include <sys/lwp.h>
1097c478bd9Sstevel@tonic-gate#include <sys/mkdev.h>
1107c478bd9Sstevel@tonic-gate#include <sys/mman.h>
1117c478bd9Sstevel@tonic-gate#include <sys/mnttab.h>
1127c478bd9Sstevel@tonic-gate#include <sys/mount.h>
1137c478bd9Sstevel@tonic-gate#include <sys/msg.h>
1147c478bd9Sstevel@tonic-gate#include <sys/param.h>
1157c478bd9Sstevel@tonic-gate#include <sys/priocntl.h>
1167c478bd9Sstevel@tonic-gate#include <sys/procset.h>
1177c478bd9Sstevel@tonic-gate#include <sys/processor.h>
1187c478bd9Sstevel@tonic-gate#include <sys/pset.h>
1197c478bd9Sstevel@tonic-gate#include <sys/rctl_impl.h>
1207c478bd9Sstevel@tonic-gate#include <sys/sem.h>
1217c478bd9Sstevel@tonic-gate#include <sys/shm.h>
122c5c4113dSnw141292#include <sys/sid.h>
1237c478bd9Sstevel@tonic-gate#include <sys/signal.h>
1247c478bd9Sstevel@tonic-gate#include <sys/stat.h>
1257c478bd9Sstevel@tonic-gate#include <sys/statvfs.h>
1267c478bd9Sstevel@tonic-gate#include <sys/strlog.h>
1277c478bd9Sstevel@tonic-gate#include <sys/stropts.h>
1287c478bd9Sstevel@tonic-gate#include <sys/syscall.h>
1297c478bd9Sstevel@tonic-gate#include <sys/sysconfig.h>
1307c478bd9Sstevel@tonic-gate#include <sys/syslog.h>
1317c478bd9Sstevel@tonic-gate#include <sys/systeminfo.h>
1327c478bd9Sstevel@tonic-gate#include <sys/task.h>
1337c478bd9Sstevel@tonic-gate#include <sys/termio.h>
1347c478bd9Sstevel@tonic-gate#include <sys/termios.h>
135cd37da74Snw141292#include <sys/u8_textprep.h>
1367c478bd9Sstevel@tonic-gate#include <sys/time.h>
1377c478bd9Sstevel@tonic-gate#include <sys/timeb.h>
1387c478bd9Sstevel@tonic-gate#include <sys/times.h>
1397c478bd9Sstevel@tonic-gate#include <sys/types.h>
1403f2f09c1Sdp#include <sys/uadmin.h>
1417c478bd9Sstevel@tonic-gate#include <sys/utsname.h>
1427c478bd9Sstevel@tonic-gate#include <sys/vfstab.h>
1437c478bd9Sstevel@tonic-gate#include <sys/sendfile.h>
1447c478bd9Sstevel@tonic-gate#include <sys/zone.h>
1457c478bd9Sstevel@tonic-gate#include <termio.h>
1467c478bd9Sstevel@tonic-gate#include <time.h>
1477c478bd9Sstevel@tonic-gate#include <tzfile.h>
1487c478bd9Sstevel@tonic-gate#include <ucontext.h>
1497c478bd9Sstevel@tonic-gate#include <utmpx.h>
1507c478bd9Sstevel@tonic-gate#include <values.h>
1517c478bd9Sstevel@tonic-gate#include <wait.h>
1527c478bd9Sstevel@tonic-gate#include <wchar.h>
1537c478bd9Sstevel@tonic-gate#include <wctype.h>
1547c478bd9Sstevel@tonic-gate#include <widec.h>
1557c478bd9Sstevel@tonic-gate#include <wordexp.h>
1567c478bd9Sstevel@tonic-gate#include <thread.h>
1577c478bd9Sstevel@tonic-gate#include <pthread.h>
1587c478bd9Sstevel@tonic-gate#include <schedctl.h>
1597c478bd9Sstevel@tonic-gate#include <zone.h>
1607c478bd9Sstevel@tonic-gate#include <port.h>
1617c478bd9Sstevel@tonic-gate#include <spawn.h>
1627c478bd9Sstevel@tonic-gate#include <inttypes.h>
1637c478bd9Sstevel@tonic-gate#include <getopt.h>
164a5f69788Scraigm#include <stdio_ext.h>
1657c478bd9Sstevel@tonic-gate#if defined(__i386)
1667c478bd9Sstevel@tonic-gate#include <sys/sysi86.h>
1677c478bd9Sstevel@tonic-gate#endif
1687c478bd9Sstevel@tonic-gate#if defined(__amd64)
1697c478bd9Sstevel@tonic-gate#include <stack_unwind.h>
1707c478bd9Sstevel@tonic-gate#endif
171538aa54dSGarrett D'Amore#include <xlocale.h>
1727c478bd9Sstevel@tonic-gate
1737c478bd9Sstevel@tonic-gate/*
1747c478bd9Sstevel@tonic-gate * This really comes from the crt*.s startup modules.
1757c478bd9Sstevel@tonic-gate */
1767c478bd9Sstevel@tonic-gatechar **environ;
1777c478bd9Sstevel@tonic-gate
1787c478bd9Sstevel@tonic-gate/*
17923a1cceaSRoger A. Faulkner * This is a GNU/Linux/BSD compatibility interface,
18023a1cceaSRoger A. Faulkner * not declared in any header file.
18123a1cceaSRoger A. Faulkner */
18223a1cceaSRoger A. Faulknerconst char *__progname;
18323a1cceaSRoger A. Faulkner
18423a1cceaSRoger A. Faulkner/*
1857c478bd9Sstevel@tonic-gate * POSIX versions of standard libc routines; these aren't extracted
1867c478bd9Sstevel@tonic-gate * from the headers above since we cannot #define _POSIX_C_SOURCE.
1877c478bd9Sstevel@tonic-gate */
1887c478bd9Sstevel@tonic-gateint __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
1897c478bd9Sstevel@tonic-gate    struct dirent ** _RESTRICT_KYWD);
1907c478bd9Sstevel@tonic-gateint __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
1917c478bd9Sstevel@tonic-gateint __posix_getgrnam_r(const char *, struct group *, char *, size_t,
1927c478bd9Sstevel@tonic-gate    struct group **);
1937c478bd9Sstevel@tonic-gateint __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
1947c478bd9Sstevel@tonic-gate    struct passwd **);
1957c478bd9Sstevel@tonic-gateint __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
1967c478bd9Sstevel@tonic-gate    struct passwd **);
1977c478bd9Sstevel@tonic-gateint __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
1987c478bd9Sstevel@tonic-gatechar *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
1997c478bd9Sstevel@tonic-gatechar *__posix_ctime_r(const time_t *, char *);
2007c478bd9Sstevel@tonic-gateint __posix_ttyname_r(int, char *, size_t);
2017c478bd9Sstevel@tonic-gateint __posix_getlogin_r(char *, int);
2020a1278f2SGary Millsint __posix_getloginx_r(char *, int);
2037c478bd9Sstevel@tonic-gate
2047c478bd9Sstevel@tonic-gate/*
2057c478bd9Sstevel@tonic-gate * XPG4 versions of standard libc routines; these aren't extracted
2067c478bd9Sstevel@tonic-gate * from the headers above since we cannot #define _XPG4_2.
2077c478bd9Sstevel@tonic-gate */
2087c478bd9Sstevel@tonic-gateint __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
2097c478bd9Sstevel@tonic-gateint __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
2107c478bd9Sstevel@tonic-gate
2117c478bd9Sstevel@tonic-gate/*
2127c478bd9Sstevel@tonic-gate * These aren't extracted from the headers above because:
2137c478bd9Sstevel@tonic-gate * - We cannot #define _STRPTIME_DONTZERO
2147c478bd9Sstevel@tonic-gate * - We cannot #define _XPG5
2157c478bd9Sstevel@tonic-gate */
2167c478bd9Sstevel@tonic-gatechar *__strptime_dontzero(const char *, const char *, struct tm *);
2177c478bd9Sstevel@tonic-gatelong __sysconf_xpg5(int);
2187c478bd9Sstevel@tonic-gatewchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
2197c478bd9Sstevel@tonic-gate	const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
2207c478bd9Sstevel@tonic-gatesize_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
2217c478bd9Sstevel@tonic-gate	const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
2227c478bd9Sstevel@tonic-gatewint_t __fgetwc_xpg5(__FILE *);
2237c478bd9Sstevel@tonic-gatewint_t __getwc_xpg5(__FILE *);
2247c478bd9Sstevel@tonic-gatewint_t __getwchar_xpg5(void);
2257c478bd9Sstevel@tonic-gatewint_t __fputwc_xpg5(wint_t, __FILE *);
2267c478bd9Sstevel@tonic-gatewint_t __putwc_xpg5(wint_t, __FILE *);
2277c478bd9Sstevel@tonic-gatewint_t __putwchar_xpg5(wint_t);
2287c478bd9Sstevel@tonic-gatewchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
2297c478bd9Sstevel@tonic-gateint __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
2307c478bd9Sstevel@tonic-gatewint_t __ungetwc_xpg5(wint_t, __FILE *);
2317c478bd9Sstevel@tonic-gate
2327c478bd9Sstevel@tonic-gate/*
2337c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/gen routines
2347c478bd9Sstevel@tonic-gate */
2357c478bd9Sstevel@tonic-gate
2367c478bd9Sstevel@tonic-gate/* _ctype.c */
2377c478bd9Sstevel@tonic-gate
2387c478bd9Sstevel@tonic-gate/* _loc_data.c */
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate/* _locale.c */
2417c478bd9Sstevel@tonic-gate
2427c478bd9Sstevel@tonic-gate/* _set_tab.c */
2437c478bd9Sstevel@tonic-gateint _set_tab(const char *loc, int cat);
2447c478bd9Sstevel@tonic-gate
2457c478bd9Sstevel@tonic-gate/* _xftw.c */
2467c478bd9Sstevel@tonic-gateint _xftw(int ver, const char *path, int (*fn)(), int depth);
2477c478bd9Sstevel@tonic-gate
2487c478bd9Sstevel@tonic-gate/* a64l.c */
2497c478bd9Sstevel@tonic-gatelong a64l(const char *);
2507c478bd9Sstevel@tonic-gate
2517c478bd9Sstevel@tonic-gate/* abort.c */
2527c478bd9Sstevel@tonic-gatevoid abort(void);
2537c478bd9Sstevel@tonic-gate
2547c478bd9Sstevel@tonic-gate/* abs.c */
2557c478bd9Sstevel@tonic-gateint abs(int arg);
2567c478bd9Sstevel@tonic-gatelong labs(long int arg);
2577c478bd9Sstevel@tonic-gate
2587c478bd9Sstevel@tonic-gate/* assert.c */
2597c478bd9Sstevel@tonic-gatevoid _assert(const char *assertion, const char *filename, int line_num);
260dfac3eb2SDavid Powellvoid __assert_c99(const char *assertion, const char *filename, int line_num,
261dfac3eb2SDavid Powell    const char *funcname);
2627c478bd9Sstevel@tonic-gate
2637c478bd9Sstevel@tonic-gate/* atexit.c */
2647c478bd9Sstevel@tonic-gateint atexit(void(*func)());
2657c478bd9Sstevel@tonic-gatevoid _exithandle(void);
2667c478bd9Sstevel@tonic-gate
2677c478bd9Sstevel@tonic-gate/* atof.c */
2687c478bd9Sstevel@tonic-gatedouble atof(const char *p);
2697c478bd9Sstevel@tonic-gate
2707c478bd9Sstevel@tonic-gate/* atoi.c */
2717c478bd9Sstevel@tonic-gateint atoi(const char *p);
2727c478bd9Sstevel@tonic-gate
2737c478bd9Sstevel@tonic-gate/* atol.c */
2747c478bd9Sstevel@tonic-gatelong atol(const char *p);
2757c478bd9Sstevel@tonic-gate
2767c478bd9Sstevel@tonic-gate/* basename.c */
2777c478bd9Sstevel@tonic-gatechar *basename(char *s);
2787c478bd9Sstevel@tonic-gate
2797c478bd9Sstevel@tonic-gate/* bcmp.c */
2807c478bd9Sstevel@tonic-gateint bcmp(const void *s1, const void *s2, size_t len);
2817c478bd9Sstevel@tonic-gate
2827c478bd9Sstevel@tonic-gate/* bcopy.c */
2837c478bd9Sstevel@tonic-gatevoid bcopy(const void *s1, void *s2, size_t len);
2847c478bd9Sstevel@tonic-gate
2857c478bd9Sstevel@tonic-gate/* bsearch.c */
2867c478bd9Sstevel@tonic-gatevoid *bsearch(const void *ky, const void *bs, size_t nel,
2877c478bd9Sstevel@tonic-gate		size_t width, int (*compar)());
2887c478bd9Sstevel@tonic-gate
2897c478bd9Sstevel@tonic-gate/* bzero.c */
2907c478bd9Sstevel@tonic-gatevoid bzero(void *sp, size_t len);
2917c478bd9Sstevel@tonic-gate
2927c478bd9Sstevel@tonic-gate/* calloc.c */
2937c478bd9Sstevel@tonic-gatevoid *calloc(size_t num, size_t size);
2947c478bd9Sstevel@tonic-gate
2957c478bd9Sstevel@tonic-gate/* catclose.c */
2967c478bd9Sstevel@tonic-gateint catclose(nl_catd catd);
2977c478bd9Sstevel@tonic-gate
2987c478bd9Sstevel@tonic-gate/* catgets.c */
2997c478bd9Sstevel@tonic-gatechar *catgets(nl_catd catd, int set_num, int msg_num, const char *s);
3007c478bd9Sstevel@tonic-gate
3017c478bd9Sstevel@tonic-gate/* catopen.c */
3027c478bd9Sstevel@tonic-gatenl_catd catopen(const char *name, int mode);
3037c478bd9Sstevel@tonic-gate
3047c478bd9Sstevel@tonic-gate/* cfgetispeed.c */
3057c478bd9Sstevel@tonic-gatespeed_t cfgetispeed(const struct termios *termios_p);
3067c478bd9Sstevel@tonic-gate
3077c478bd9Sstevel@tonic-gate/* cfgetospeed.c */
3087c478bd9Sstevel@tonic-gatespeed_t cfgetospeed(const struct termios *termios_p);
3097c478bd9Sstevel@tonic-gate
3107c478bd9Sstevel@tonic-gate/* cfree.c */
3117c478bd9Sstevel@tonic-gatevoid cfree(void *p, size_t num, size_t size);
3127c478bd9Sstevel@tonic-gate
3137c478bd9Sstevel@tonic-gate/* cfsetispeed.c */
3147c478bd9Sstevel@tonic-gateint cfsetispeed(struct termios *termios_p, speed_t speed);
3157c478bd9Sstevel@tonic-gate
3167c478bd9Sstevel@tonic-gate/* cfsetospeed.c */
3177c478bd9Sstevel@tonic-gateint cfsetospeed(struct termios *termios_p, speed_t speed);
3187c478bd9Sstevel@tonic-gate
3197c478bd9Sstevel@tonic-gate/* cftime.c */
3207c478bd9Sstevel@tonic-gateint cftime(char *buf, char *format, const time_t *t);
3217c478bd9Sstevel@tonic-gateint ascftime(char *buf, const char *format, const struct tm *tm);
3227c478bd9Sstevel@tonic-gate
3237c478bd9Sstevel@tonic-gate/* clock.c */
3247c478bd9Sstevel@tonic-gateclock_t clock(void);
3257c478bd9Sstevel@tonic-gate
3267c478bd9Sstevel@tonic-gate/* closedir.c */
3277c478bd9Sstevel@tonic-gateint closedir(DIR *dirp);
3287c478bd9Sstevel@tonic-gate
3297c478bd9Sstevel@tonic-gate/* confstr.c */
3307c478bd9Sstevel@tonic-gatesize_t confstr(int name, char *buf, size_t length);
3317c478bd9Sstevel@tonic-gate
3327c478bd9Sstevel@tonic-gate/* crypt.c */
3337c478bd9Sstevel@tonic-gatevoid setkey(const char *key);
3347c478bd9Sstevel@tonic-gatevoid encrypt(char *block, int fake);
3357c478bd9Sstevel@tonic-gatechar *crypt(const char *key, const char *salt);
3367c478bd9Sstevel@tonic-gate
3377c478bd9Sstevel@tonic-gate/* csetlen.c */
3387c478bd9Sstevel@tonic-gateint csetlen(int cset);
3397c478bd9Sstevel@tonic-gateint csetcol(int cset);
3407c478bd9Sstevel@tonic-gate
3417c478bd9Sstevel@tonic-gate/* ctime.c */
3427c478bd9Sstevel@tonic-gatechar *ctime(const time_t *t);
3437c478bd9Sstevel@tonic-gatechar *ctime_r(const time_t *, char *buf, int);
3447c478bd9Sstevel@tonic-gatechar *asctime(const struct tm *t);
3457c478bd9Sstevel@tonic-gatechar *asctime_r(const struct tm *, char *, int);
3467c478bd9Sstevel@tonic-gate
3477c478bd9Sstevel@tonic-gate/* ctypefcns.c */
3487c478bd9Sstevel@tonic-gateint isalpha(int c);
3497c478bd9Sstevel@tonic-gateint isupper(int c);
3507c478bd9Sstevel@tonic-gateint islower(int c);
3517c478bd9Sstevel@tonic-gateint isdigit(int c);
3527c478bd9Sstevel@tonic-gateint isxdigit(int c);
3537c478bd9Sstevel@tonic-gateint isalnum(int c);
3547c478bd9Sstevel@tonic-gateint isspace(int c);
3557c478bd9Sstevel@tonic-gateint ispunct(int c);
3567c478bd9Sstevel@tonic-gateint isprint(int c);
3577c478bd9Sstevel@tonic-gateint isgraph(int c);
3587c478bd9Sstevel@tonic-gateint iscntrl(int c);
3597c478bd9Sstevel@tonic-gateint isascii(int c);
3607c478bd9Sstevel@tonic-gateint _toupper(int c);
3617c478bd9Sstevel@tonic-gateint _tolower(int c);
3627c478bd9Sstevel@tonic-gateint toascii(int c);
3637c478bd9Sstevel@tonic-gate
36444991a1cSVladimir Kotal/* daemon.c */
36544991a1cSVladimir Kotalint daemon(int nochdir, int noclose);
36644991a1cSVladimir Kotal
3677c478bd9Sstevel@tonic-gate/* directio.c */
3687c478bd9Sstevel@tonic-gateint directio(int filedes, int advice);
3697c478bd9Sstevel@tonic-gate
3707c478bd9Sstevel@tonic-gate/* dirname.c */
3717c478bd9Sstevel@tonic-gatechar *dirname(char *s);
3727c478bd9Sstevel@tonic-gate
3737c478bd9Sstevel@tonic-gate/* div.c */
3747c478bd9Sstevel@tonic-gatediv_t div(int numer, int denom);
3757c478bd9Sstevel@tonic-gateldiv_t ldiv(long int numer, long int denom);
3767c478bd9Sstevel@tonic-gate
3777c478bd9Sstevel@tonic-gate/* drand48.c */
3787c478bd9Sstevel@tonic-gatedouble drand48(void);
3797c478bd9Sstevel@tonic-gatedouble erand48(unsigned short *xsubi);
3807c478bd9Sstevel@tonic-gatelong krand48(unsigned short *xsubi, unsigned int m);
3817c478bd9Sstevel@tonic-gatelong lrand48(void);
3827c478bd9Sstevel@tonic-gatelong mrand48(void);
3837c478bd9Sstevel@tonic-gatevoid srand48(long seedval);
3847c478bd9Sstevel@tonic-gateunsigned short *seed48(unsigned short seed16v[3]);
3857c478bd9Sstevel@tonic-gatevoid lcong48(unsigned short param[7]);
3867c478bd9Sstevel@tonic-gatelong nrand48(unsigned short *xsubi);
3877c478bd9Sstevel@tonic-gatelong jrand48(unsigned short *xsubi);
3887c478bd9Sstevel@tonic-gate
3895dbfd19aSTheo Schlossnagle/* dup.c */
3905dbfd19aSTheo Schlossnagleint dup(int fildes);
3917c478bd9Sstevel@tonic-gateint dup2(int fildes, int fildes2);
3925dbfd19aSTheo Schlossnagleint dup3(int fildes, int fildes2, int flags);
3937c478bd9Sstevel@tonic-gate
3947c478bd9Sstevel@tonic-gate/* ecvt.c */
3957c478bd9Sstevel@tonic-gatechar *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
3967c478bd9Sstevel@tonic-gate	int *_RESTRICT_KYWDsign);
3977c478bd9Sstevel@tonic-gatechar *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
3987c478bd9Sstevel@tonic-gate	int *_RESTRICT_KYWD sign);
3997c478bd9Sstevel@tonic-gate
400d362b749Svk199839/* err.c */
401d362b749Svk199839void _errfp(FILE *, int, const char *, ...);
402d362b749Svk199839void _verrfp(FILE *, int, const char *, va_list);
403d362b749Svk199839void _errxfp(FILE *, int, const char *, ...);
404d362b749Svk199839void _verrxfp(FILE *, int, const char *, va_list);
405d362b749Svk199839void _warnfp(FILE *, const char *, ...);
406d362b749Svk199839void _vwarnfp(FILE *, const char *, va_list);
407d362b749Svk199839void _warnxfp(FILE *, const char *, ...);
408d362b749Svk199839void _vwarnxfp(FILE *, const char *, va_list);
409d362b749Svk199839
4107c478bd9Sstevel@tonic-gate/* errlst.c */
4117c478bd9Sstevel@tonic-gate
4127c478bd9Sstevel@tonic-gate/* euclen.c */
4137c478bd9Sstevel@tonic-gateint euccol(const unsigned char *s);
4147c478bd9Sstevel@tonic-gateint euclen(const unsigned char *s);
4157c478bd9Sstevel@tonic-gateint eucscol(const unsigned char *s);
4167c478bd9Sstevel@tonic-gate
4177c478bd9Sstevel@tonic-gate/* execvp.c */
4187c478bd9Sstevel@tonic-gate/* VARARGS1 */
4197c478bd9Sstevel@tonic-gateint execlp(const char *, const char *, ...);
4207c478bd9Sstevel@tonic-gateint execvp(const char *name, char *const *argv);
4217c478bd9Sstevel@tonic-gate
4227c478bd9Sstevel@tonic-gate/* fattach.c */
4237c478bd9Sstevel@tonic-gateint fattach(int fildes, const char *path);
4247c478bd9Sstevel@tonic-gate
4257c478bd9Sstevel@tonic-gate/* fdetach.c */
4267c478bd9Sstevel@tonic-gateint fdetach(const char *path);
4277c478bd9Sstevel@tonic-gate
4287c478bd9Sstevel@tonic-gate/* ffs.c */
4297c478bd9Sstevel@tonic-gateint ffs(int field);
4307c478bd9Sstevel@tonic-gate
431*7a5aac98SJerry Jelinek/* flock.c */
432*7a5aac98SJerry Jelinekint flock(int filedes, int operation);
433*7a5aac98SJerry Jelinek
4347c478bd9Sstevel@tonic-gate/* fmtmsg.c */
4357c478bd9Sstevel@tonic-gateint addseverity(int value, const char *string);
4367c478bd9Sstevel@tonic-gateint fmtmsg(long class, const char *label, int severity, const char *text,
4377c478bd9Sstevel@tonic-gate		const char *action, const char *tag);
4387c478bd9Sstevel@tonic-gate
4397c478bd9Sstevel@tonic-gate/* ftime.c */
4407c478bd9Sstevel@tonic-gateint ftime(struct timeb *tp);
4417c478bd9Sstevel@tonic-gate
4427c478bd9Sstevel@tonic-gate/* ftok.c */
4437c478bd9Sstevel@tonic-gatekey_t ftok(const char *path, int id);
4447c478bd9Sstevel@tonic-gate
4457c478bd9Sstevel@tonic-gate/* gcvt.c */
4467c478bd9Sstevel@tonic-gatechar *gcvt(double number, int ndigit, char *buf);
4477c478bd9Sstevel@tonic-gate
4487c478bd9Sstevel@tonic-gate/* getcwd.c */
4497c478bd9Sstevel@tonic-gatechar *getcwd(char *str, size_t size);
4507c478bd9Sstevel@tonic-gate
4517c478bd9Sstevel@tonic-gate/* getdate.c */
4527c478bd9Sstevel@tonic-gatestruct tm *getdate(const char *expression);
4537c478bd9Sstevel@tonic-gate#ifdef getdate_err
4547c478bd9Sstevel@tonic-gate#undef getdate_err
4557c478bd9Sstevel@tonic-gate#endif
4567c478bd9Sstevel@tonic-gateint getdate_err;
4577c478bd9Sstevel@tonic-gate
4587c478bd9Sstevel@tonic-gate/* getdate_data.c */
4597c478bd9Sstevel@tonic-gate
4607c478bd9Sstevel@tonic-gate/* getdate_gd.c */
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate/* getdtblsize.c */
4637c478bd9Sstevel@tonic-gateint getdtablesize(void);
4647c478bd9Sstevel@tonic-gate
4657c478bd9Sstevel@tonic-gate/* getenv.c */
4667c478bd9Sstevel@tonic-gatechar *getenv(const char *name);
4677c478bd9Sstevel@tonic-gate
4687c478bd9Sstevel@tonic-gate/* getexecname.c */
4697c478bd9Sstevel@tonic-gateconst char *getexecname(void);
4707c478bd9Sstevel@tonic-gate
4717c478bd9Sstevel@tonic-gate/* getgrnam.c */
4727c478bd9Sstevel@tonic-gatestruct group *getgrnam(const char *name);
4737c478bd9Sstevel@tonic-gatestruct group *getgrgid(gid_t gid);
4747c478bd9Sstevel@tonic-gatestruct group *fgetgrent_r(FILE *, struct group *, char *, int);
4757c478bd9Sstevel@tonic-gatestruct group *getgrent_r(struct group *, char *, int);
4767c478bd9Sstevel@tonic-gatestruct group *getgrgid_r(gid_t, struct group *, char *, int);
4777c478bd9Sstevel@tonic-gatestruct group *getgrnam_r(const char *, struct group *, char *, int);
4787c478bd9Sstevel@tonic-gate
4797c478bd9Sstevel@tonic-gate/* gethostid.c */
4807c478bd9Sstevel@tonic-gatelong gethostid(void);
4817c478bd9Sstevel@tonic-gate
4827c478bd9Sstevel@tonic-gate/* gethz.c */
4837c478bd9Sstevel@tonic-gateint gethz(void);
4847c478bd9Sstevel@tonic-gate
4857c478bd9Sstevel@tonic-gate/* getisax.c */
4867c478bd9Sstevel@tonic-gateuint_t getisax(uint32_t *, uint_t);
4877c478bd9Sstevel@tonic-gate
4887c478bd9Sstevel@tonic-gate/* getlogin.c */
4890a1278f2SGary Millschar *getloginx(void);
4900a1278f2SGary Millschar *getloginx_r(char *, int);
4910a1278f2SGary Mills#ifdef	getlogin
4920a1278f2SGary Mills#undef	getlogin
4930a1278f2SGary Mills#endif	/* getlogin */
4947c478bd9Sstevel@tonic-gatechar *getlogin(void);
4950a1278f2SGary Mills#ifdef	getlogin_r
4960a1278f2SGary Mills#undef	getlogin_r
4970a1278f2SGary Mills#endif	/* getlogin_r */
4987c478bd9Sstevel@tonic-gatechar *getlogin_r(char *, int);
4997c478bd9Sstevel@tonic-gate
5007c478bd9Sstevel@tonic-gate/* getmntent.c */
5017c478bd9Sstevel@tonic-gateint getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
5027c478bd9Sstevel@tonic-gateint getmntent(FILE *fd, struct mnttab *mp);
5037c478bd9Sstevel@tonic-gate
5047c478bd9Sstevel@tonic-gate/* getnetgrent.c */
5057c478bd9Sstevel@tonic-gateint setnetgrent(const char *grp);
5067c478bd9Sstevel@tonic-gateint endnetgrent(void);
5077c478bd9Sstevel@tonic-gateint getnetgrent(char **machinep, char **namep, char **domainp);
5087c478bd9Sstevel@tonic-gate
5097c478bd9Sstevel@tonic-gate/* getopt.c */
5107c478bd9Sstevel@tonic-gateint getopt(int argc, char *const *argv, const char *opts);
5117c478bd9Sstevel@tonic-gate
5127c478bd9Sstevel@tonic-gate/* getopt_long.c */
5137c478bd9Sstevel@tonic-gateint getopt_clip(int argc, char *const *argv, const char *optstring,
5147c478bd9Sstevel@tonic-gate		const struct option *long_options, int *long_index);
5157c478bd9Sstevel@tonic-gateint getopt_long(int argc, char *const *argv, const char *optstring,
5167c478bd9Sstevel@tonic-gate		const struct option *long_options, int *long_index);
5177c478bd9Sstevel@tonic-gateint getopt_long_only(int argc, char *const *argv, const char *optstring,
5187c478bd9Sstevel@tonic-gate		const struct option *long_options, int *long_index);
5197c478bd9Sstevel@tonic-gate
5207c478bd9Sstevel@tonic-gate/* getpagesize.c */
5217c478bd9Sstevel@tonic-gateint getpagesize(void);
5227c478bd9Sstevel@tonic-gate
5237c478bd9Sstevel@tonic-gate/* getpw.c */
5247c478bd9Sstevel@tonic-gateint getpw(uid_t uid, char *buf);
5257c478bd9Sstevel@tonic-gate
5267c478bd9Sstevel@tonic-gate/* getpwnam.c */
5277c478bd9Sstevel@tonic-gatestruct passwd *getpwnam(const char *name);
5287c478bd9Sstevel@tonic-gatestruct passwd *getpwuid(uid_t uid);
5297c478bd9Sstevel@tonic-gatestruct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
5307c478bd9Sstevel@tonic-gatestruct passwd *getpwent_r(struct passwd *, char *, int);
5317c478bd9Sstevel@tonic-gatestruct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
5327c478bd9Sstevel@tonic-gatestruct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
5337c478bd9Sstevel@tonic-gate
5347c478bd9Sstevel@tonic-gate/* getrusage.c */
5357c478bd9Sstevel@tonic-gateint getrusage(int who, struct rusage *rusage);
5367c478bd9Sstevel@tonic-gate
5377c478bd9Sstevel@tonic-gate/* gettimeofday.c */
5387c478bd9Sstevel@tonic-gateint gettimeofday(struct timeval *_RESTRICT_KYWD tp, void *_RESTRICT_KYWD);
5397c478bd9Sstevel@tonic-gate
5407c478bd9Sstevel@tonic-gate/* getspent.c */
5417c478bd9Sstevel@tonic-gatevoid setspent(void);
5427c478bd9Sstevel@tonic-gatevoid endspent(void);
5437c478bd9Sstevel@tonic-gatestruct spwd *getspent(void);
5447c478bd9Sstevel@tonic-gatestruct spwd *getspent_r(struct spwd *, char *, int);
5457c478bd9Sstevel@tonic-gatestruct spwd *fgetspent(FILE *f);
5467c478bd9Sstevel@tonic-gatestruct spwd *fgetspent_r(FILE *, struct spwd *, char *, int);
5477c478bd9Sstevel@tonic-gatestruct spwd *getspnam(const char *name);
5487c478bd9Sstevel@tonic-gatestruct spwd *getspnam_r(const char *, struct spwd *, char *, int);
5497c478bd9Sstevel@tonic-gateint putspent(const struct spwd *p, FILE *f);
5507c478bd9Sstevel@tonic-gate
5517c478bd9Sstevel@tonic-gate/* getspent_r.c */
5527c478bd9Sstevel@tonic-gateint str2spwd(const char *, int, void *, char *, int);
5537c478bd9Sstevel@tonic-gate
5547c478bd9Sstevel@tonic-gate/* getsubopt.c */
5557c478bd9Sstevel@tonic-gateint getsubopt(char **optionsp, char *const *tokens, char **valuep);
5567c478bd9Sstevel@tonic-gate
5577c478bd9Sstevel@tonic-gate/* gettxt.c */
5587c478bd9Sstevel@tonic-gatechar *gettxt(const char *msg_id, const char *dflt_str);
5597c478bd9Sstevel@tonic-gate
5607c478bd9Sstevel@tonic-gate/* getusershell.c */
5617c478bd9Sstevel@tonic-gatechar *getusershell(void);
5627c478bd9Sstevel@tonic-gatevoid endusershell(void);
5637c478bd9Sstevel@tonic-gatevoid setusershell(void);
5647c478bd9Sstevel@tonic-gate
5657c478bd9Sstevel@tonic-gate/* getut.c */
5667c478bd9Sstevel@tonic-gatestruct utmp *getutent(void);
5677c478bd9Sstevel@tonic-gatestruct utmp *getutid(const struct utmp *entry);
5687c478bd9Sstevel@tonic-gatestruct utmp *getutline(const struct utmp *entry);
5697c478bd9Sstevel@tonic-gatestruct utmp *pututline(const struct utmp *entry);
5707c478bd9Sstevel@tonic-gatevoid setutent(void);
5717c478bd9Sstevel@tonic-gatevoid endutent(void);
5727c478bd9Sstevel@tonic-gateint utmpname(const char *newfile);
5737c478bd9Sstevel@tonic-gatevoid updwtmp(const char *file, struct utmp *ut);
5747c478bd9Sstevel@tonic-gatevoid getutmp(const struct utmpx *utx, struct utmp *ut);
5757c478bd9Sstevel@tonic-gatevoid getutmpx(const struct utmp *ut, struct utmpx *utx);
5767c478bd9Sstevel@tonic-gatestruct utmp *makeut(struct utmp *utmp);
5777c478bd9Sstevel@tonic-gate
5787c478bd9Sstevel@tonic-gate/* getutx.c */
5797c478bd9Sstevel@tonic-gatestruct utmpx *getutxent(void);
5807c478bd9Sstevel@tonic-gatestruct utmpx *getutxid(const struct utmpx *entry);
5817c478bd9Sstevel@tonic-gatestruct utmpx *getutxline(const struct utmpx *entry);
5827c478bd9Sstevel@tonic-gatestruct utmpx *pututxline(const struct utmpx *entry);
5837c478bd9Sstevel@tonic-gatevoid setutxent(void);
5847c478bd9Sstevel@tonic-gatevoid endutxent(void);
5857c478bd9Sstevel@tonic-gateint utmpxname(const char *newfile);
5867c478bd9Sstevel@tonic-gatevoid updwtmpx(const char *filex, struct utmpx *utx);
5877c478bd9Sstevel@tonic-gatestruct utmpx *makeutx(const struct utmpx *utmp);
5887c478bd9Sstevel@tonic-gatestruct utmpx *modutx(const struct utmpx *utp);
5897c478bd9Sstevel@tonic-gate
5907c478bd9Sstevel@tonic-gate/* getvfsent.c */
5917c478bd9Sstevel@tonic-gateint getvfsspec(FILE *fd, struct vfstab *vp, char *special);
5927c478bd9Sstevel@tonic-gateint getvfsfile(FILE *fd, struct vfstab *vp, char *mountp);
5937c478bd9Sstevel@tonic-gateint getvfsany(FILE *fd, struct vfstab *vgetp, struct vfstab *vrefp);
5947c478bd9Sstevel@tonic-gateint getvfsent(FILE *fd, struct vfstab *vp);
5957c478bd9Sstevel@tonic-gate
5967c478bd9Sstevel@tonic-gate/* getwd.c */
5977c478bd9Sstevel@tonic-gatechar *getwd(char *pathname);
5987c478bd9Sstevel@tonic-gate
5997c478bd9Sstevel@tonic-gate/* getwidth.c */
6007c478bd9Sstevel@tonic-gatevoid getwidth(eucwidth_t *eucstruct);
6017c478bd9Sstevel@tonic-gate
6027c478bd9Sstevel@tonic-gate/* hsearch.c */
6037c478bd9Sstevel@tonic-gateint hcreate(size_t size);
6047c478bd9Sstevel@tonic-gatevoid hdestroy(void);
6057c478bd9Sstevel@tonic-gateENTRY *hsearch(ENTRY item, ACTION action);
6067c478bd9Sstevel@tonic-gate
6077c478bd9Sstevel@tonic-gate/* iconv.c  */
6087c478bd9Sstevel@tonic-gatesize_t iconv(iconv_t cd, const char **_RESTRICT_KYWD inbuf,
6097c478bd9Sstevel@tonic-gate    size_t *_RESTRICT_KYWD inbytesleft, char **_RESTRICT_KYWD outbuf,
6107c478bd9Sstevel@tonic-gate    size_t *_RESTRICT_KYWD outbytesleft);
6117c478bd9Sstevel@tonic-gateint iconv_close(iconv_t cd);
6127c478bd9Sstevel@tonic-gateiconv_t iconv_open(const char *tocode, const char *fromcode);
6137c478bd9Sstevel@tonic-gate
6147c478bd9Sstevel@tonic-gate/* imaxabs.c */
6157c478bd9Sstevel@tonic-gateintmax_t imaxabs(intmax_t j);
6167c478bd9Sstevel@tonic-gate
6177c478bd9Sstevel@tonic-gate/* imaxdiv.c */
6187c478bd9Sstevel@tonic-gateimaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
6197c478bd9Sstevel@tonic-gate
6207c478bd9Sstevel@tonic-gate/* index.c */
6217c478bd9Sstevel@tonic-gatechar *index(const char *sp, int c);
6227c478bd9Sstevel@tonic-gate
6237c478bd9Sstevel@tonic-gate/* initgroups.c */
6247c478bd9Sstevel@tonic-gateint initgroups(const char *uname, gid_t agroup);
6257c478bd9Sstevel@tonic-gate
6267c478bd9Sstevel@tonic-gate/* innetgr.c */
6277c478bd9Sstevel@tonic-gateint innetgr(const char *group, const char *machine, const char *name,
6287c478bd9Sstevel@tonic-gate    const char *domain);
6297c478bd9Sstevel@tonic-gate
6307c478bd9Sstevel@tonic-gate/* insque.c */
6317c478bd9Sstevel@tonic-gatevoid insque(void *elem, void *pred);
6327c478bd9Sstevel@tonic-gatevoid remque(void *elem);
6337c478bd9Sstevel@tonic-gate
6347c478bd9Sstevel@tonic-gate/* isaexec.c */
6357c478bd9Sstevel@tonic-gateint isaexec(const char *, char *const *, char *const *);
6367c478bd9Sstevel@tonic-gate
6377c478bd9Sstevel@tonic-gate/* isastream.c */
6387c478bd9Sstevel@tonic-gateint isastream(int fd);
6397c478bd9Sstevel@tonic-gate
6407c478bd9Sstevel@tonic-gate/* isatty.c */
6417c478bd9Sstevel@tonic-gateint isatty(int f);
6427c478bd9Sstevel@tonic-gate
6437c478bd9Sstevel@tonic-gate/* killpg.c */
6447c478bd9Sstevel@tonic-gateint killpg(pid_t pgrp, int sig);
6457c478bd9Sstevel@tonic-gate
6467c478bd9Sstevel@tonic-gate/* l64a.c */
6477c478bd9Sstevel@tonic-gatechar *l64a(long lg);
6487c478bd9Sstevel@tonic-gate
6497c478bd9Sstevel@tonic-gate/* lckpwdf.c */
6507c478bd9Sstevel@tonic-gateint lckpwdf(void);
6517c478bd9Sstevel@tonic-gateint ulckpwdf(void);
6527c478bd9Sstevel@tonic-gate
6537c478bd9Sstevel@tonic-gate/* lfind.c */
6547c478bd9Sstevel@tonic-gatevoid * lfind(const void *ky, const void *bs, size_t *nelp,
6557c478bd9Sstevel@tonic-gate		size_t width, int (*compar)());
6567c478bd9Sstevel@tonic-gate
6577c478bd9Sstevel@tonic-gate/* localeconv.c */
6587c478bd9Sstevel@tonic-gatestruct lconv *localeconv(void);
6597c478bd9Sstevel@tonic-gate
6607c478bd9Sstevel@tonic-gate/* lsearch.c */
6617c478bd9Sstevel@tonic-gatevoid * lsearch(const void *ky, void *bs, size_t *nelp,
6627c478bd9Sstevel@tonic-gate		size_t width, int (*compar)());
6637c478bd9Sstevel@tonic-gate
6647c478bd9Sstevel@tonic-gate/* madvise.c */
6657c478bd9Sstevel@tonic-gateint madvise(caddr_t addr, size_t len, int advice);
6667c478bd9Sstevel@tonic-gate
6677c478bd9Sstevel@tonic-gate/* malloc.c */
6687c478bd9Sstevel@tonic-gatevoid *malloc(size_t size);
6697c478bd9Sstevel@tonic-gatevoid *realloc(void *old, size_t size);
6707c478bd9Sstevel@tonic-gatevoid free(void *old);
6717c478bd9Sstevel@tonic-gate
6727c478bd9Sstevel@tonic-gate/* mbstowcs.c */
6737c478bd9Sstevel@tonic-gatesize_t mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s,
6747c478bd9Sstevel@tonic-gate	size_t n);
6757c478bd9Sstevel@tonic-gate
6767c478bd9Sstevel@tonic-gate/* mbtowc.c */
6777c478bd9Sstevel@tonic-gateint mbtowc(wchar_t *_RESTRICT_KYWD wchar, const char *_RESTRICT_KYWD s,
6787c478bd9Sstevel@tonic-gate	size_t n);
6797c478bd9Sstevel@tonic-gateint mblen(const char *s, size_t n);
6807c478bd9Sstevel@tonic-gate
6817c478bd9Sstevel@tonic-gate/* memalign.c */
6827c478bd9Sstevel@tonic-gatevoid *memalign(size_t align, size_t nbytes);
6837c478bd9Sstevel@tonic-gate
6847c478bd9Sstevel@tonic-gate/* memccpy.c */
6857c478bd9Sstevel@tonic-gatevoid *memccpy(void *_RESTRICT_KYWDs, const void *_RESTRICT_KYWD s0, int c,
6867c478bd9Sstevel@tonic-gate	size_t n);
6877c478bd9Sstevel@tonic-gate
6887c478bd9Sstevel@tonic-gate/* memchr.c */
6897c478bd9Sstevel@tonic-gatevoid *memchr(const void *sptr, int c1, size_t n);
6907c478bd9Sstevel@tonic-gate
6917c478bd9Sstevel@tonic-gate/* memcmp.c */
6927c478bd9Sstevel@tonic-gateint memcmp(const void *s1, const void *s2, size_t n);
6937c478bd9Sstevel@tonic-gate
6947c478bd9Sstevel@tonic-gate/* memcpy.c */
6957c478bd9Sstevel@tonic-gatevoid *memcpy(void *_RESTRICT_KYWD s, const void *_RESTRICT_KYWD s0, size_t n);
6967c478bd9Sstevel@tonic-gate
6977c478bd9Sstevel@tonic-gate/* memmove.c */
6987c478bd9Sstevel@tonic-gatevoid *memmove(void *s, const void *s0, size_t n);
6997c478bd9Sstevel@tonic-gate
7007c478bd9Sstevel@tonic-gate/* memset.c */
7017c478bd9Sstevel@tonic-gatevoid *memset(void *sp1, int c, size_t n);
7027c478bd9Sstevel@tonic-gate
7037c478bd9Sstevel@tonic-gate/* mkdev.c */
7047c478bd9Sstevel@tonic-gatedev_t __makedev(const int version, const major_t majdev,
7057c478bd9Sstevel@tonic-gate		const minor_t mindev);
7067c478bd9Sstevel@tonic-gatemajor_t __major(const int version, const dev_t devnum);
7077c478bd9Sstevel@tonic-gateminor_t __minor(const int version, const dev_t devnum);
7087c478bd9Sstevel@tonic-gate
7097c478bd9Sstevel@tonic-gate/* mkfifo.c */
7107c478bd9Sstevel@tonic-gateint mkfifo(const char *path, mode_t mode);
7117c478bd9Sstevel@tonic-gate
7127c478bd9Sstevel@tonic-gate/* mktemp.c */
7137c478bd9Sstevel@tonic-gatechar *mktemp(char *as);
7147c478bd9Sstevel@tonic-gate
7157c478bd9Sstevel@tonic-gate/* mlock.c */
7167c478bd9Sstevel@tonic-gateint mlock(caddr_t addr, size_t len);
7177c478bd9Sstevel@tonic-gate
7187c478bd9Sstevel@tonic-gate/* mlockall.c */
7197c478bd9Sstevel@tonic-gateint mlockall(int flags);
7207c478bd9Sstevel@tonic-gate
7217c478bd9Sstevel@tonic-gate/* mon.c */
7227c478bd9Sstevel@tonic-gatevoid monitor(int (*alowpc)(), int (*ahighpc)(), WORD *buffer,
7237c478bd9Sstevel@tonic-gate		size_t bufsize, size_t nfunc);
7247c478bd9Sstevel@tonic-gate
7257c478bd9Sstevel@tonic-gate/* msync.c */
7267c478bd9Sstevel@tonic-gateint msync(caddr_t addr, size_t len, int flags);
7277c478bd9Sstevel@tonic-gate
7287c478bd9Sstevel@tonic-gate/* munlock.c */
7297c478bd9Sstevel@tonic-gateint munlock(caddr_t addr, size_t len);
7307c478bd9Sstevel@tonic-gate
7317c478bd9Sstevel@tonic-gate/* munlockall.c */
7327c478bd9Sstevel@tonic-gateint munlockall(void);
7337c478bd9Sstevel@tonic-gate
7347c478bd9Sstevel@tonic-gate/* ndbm.c */
7357c478bd9Sstevel@tonic-gatevoid dbm_setdefwrite(DBM *db);
7367c478bd9Sstevel@tonic-gateint dbm_flush(DBM *db);
7377c478bd9Sstevel@tonic-gateint dbm_flushpag(DBM *db);
7387c478bd9Sstevel@tonic-gateDBM *dbm_open(const char *file, int flags, mode_t mode);
7397c478bd9Sstevel@tonic-gatevoid dbm_close(DBM *db);
7407c478bd9Sstevel@tonic-gateint dbm_close_status(DBM *db);
7417c478bd9Sstevel@tonic-gatedatum dbm_fetch(DBM *db, datum key);
7427c478bd9Sstevel@tonic-gateint dbm_delete(DBM *db, datum key);
7437c478bd9Sstevel@tonic-gateint dbm_store(DBM *db, datum key, datum dat, int replace);
7447c478bd9Sstevel@tonic-gatedatum dbm_firstkey(DBM *db);
7457c478bd9Sstevel@tonic-gatedatum dbm_nextkey(DBM *db);
7467c478bd9Sstevel@tonic-gatedatum dbm_do_nextkey(DBM *db, datum inkey);
7477c478bd9Sstevel@tonic-gate
7487c478bd9Sstevel@tonic-gate/* new_list.c */
7497c478bd9Sstevel@tonic-gate
7507c478bd9Sstevel@tonic-gate/* nftw.c */
7517c478bd9Sstevel@tonic-gateint nftw(const char *path, int (*fn)(), int depth, int flags);
7527c478bd9Sstevel@tonic-gate
7537c478bd9Sstevel@tonic-gate/* nl_langinfo.c */
7547c478bd9Sstevel@tonic-gatechar *nl_langinfo(nl_item item);
7557c478bd9Sstevel@tonic-gate
7567c478bd9Sstevel@tonic-gate/* opendir.c */
7577c478bd9Sstevel@tonic-gateDIR *opendir(const char *filename);
7587c478bd9Sstevel@tonic-gate
7597c478bd9Sstevel@tonic-gate/* opt_data.c */
7607c478bd9Sstevel@tonic-gate
7617c478bd9Sstevel@tonic-gate/* perror.c */
7627c478bd9Sstevel@tonic-gatevoid perror(const char *s);
7637c478bd9Sstevel@tonic-gate
7645dbfd19aSTheo Schlossnagle/* pipe.c */
7655dbfd19aSTheo Schlossnagleint pipe(int *fds);
7665dbfd19aSTheo Schlossnagle
7677c478bd9Sstevel@tonic-gate/* psiginfo.c */
7683e5de5d0SEric Sproulvoid psiginfo(const siginfo_t *sip, const char *s);
7697c478bd9Sstevel@tonic-gate
7707c478bd9Sstevel@tonic-gate/* psignal.c */
7717c478bd9Sstevel@tonic-gatevoid psignal(int sig, const char *s);
7727c478bd9Sstevel@tonic-gate
7737c478bd9Sstevel@tonic-gate/* pt.c */
7747c478bd9Sstevel@tonic-gatechar *ptsname(int fd);
7757c478bd9Sstevel@tonic-gateint unlockpt(int fd);
7767c478bd9Sstevel@tonic-gateint grantpt(int fd);
7777c478bd9Sstevel@tonic-gate
7787c478bd9Sstevel@tonic-gate/* putenv.c */
7797c478bd9Sstevel@tonic-gateint putenv(char *change);
7807c478bd9Sstevel@tonic-gateint setenv(const char *envname, const char *envval, int overwrite);
7817c478bd9Sstevel@tonic-gateint unsetenv(const char *name);
7827c478bd9Sstevel@tonic-gate
7837c478bd9Sstevel@tonic-gate/* putpwent.c */
7847c478bd9Sstevel@tonic-gateint putpwent(const struct passwd *p, FILE *f);
7857c478bd9Sstevel@tonic-gate
7867c478bd9Sstevel@tonic-gate/* qsort.c */
7877c478bd9Sstevel@tonic-gatevoid qsort(void *base, size_t n, size_t size, int (*compar)());
7887c478bd9Sstevel@tonic-gate
7897c478bd9Sstevel@tonic-gate/* raise.c */
7907c478bd9Sstevel@tonic-gateint raise(int sig);
7917c478bd9Sstevel@tonic-gate
7927c478bd9Sstevel@tonic-gate/* rand.c */
7937c478bd9Sstevel@tonic-gatevoid srand(unsigned x);
7947c478bd9Sstevel@tonic-gateint rand(void);
7957c478bd9Sstevel@tonic-gateint rand_r(unsigned int *);
7967c478bd9Sstevel@tonic-gate
7977c478bd9Sstevel@tonic-gate/* random.c */
7987c478bd9Sstevel@tonic-gatevoid srandom(unsigned x);
7997c478bd9Sstevel@tonic-gatechar *initstate(unsigned seed, char *arg_state, size_t n);
8007c478bd9Sstevel@tonic-gatechar *setstate(const char *arg_state);
8017c478bd9Sstevel@tonic-gatelong random(void);
8027c478bd9Sstevel@tonic-gate
8037c478bd9Sstevel@tonic-gate/* rctlops.c */
8047c478bd9Sstevel@tonic-gateint rctl_walk(int (*callback)(const char *, void *), void *walk_data);
8057c478bd9Sstevel@tonic-gatehrtime_t rctlblk_get_firing_time(rctlblk_t *rblk);
8067c478bd9Sstevel@tonic-gateuint_t rctlblk_get_global_action(rctlblk_t *rblk);
8077c478bd9Sstevel@tonic-gateuint_t rctlblk_get_global_flags(rctlblk_t *rblk);
8087c478bd9Sstevel@tonic-gateuint_t rctlblk_get_local_action(rctlblk_t *rblk, int *signalp);
8097c478bd9Sstevel@tonic-gateuint_t rctlblk_get_local_flags(rctlblk_t *rblk);
8107c478bd9Sstevel@tonic-gateid_t rctlblk_get_recipient_pid(rctlblk_t *rblk);
8117c478bd9Sstevel@tonic-gaterctl_priv_t rctlblk_get_privilege(rctlblk_t *rblk);
8127c478bd9Sstevel@tonic-gaterctl_qty_t rctlblk_get_value(rctlblk_t *rblk);
8137c478bd9Sstevel@tonic-gatevoid rctlblk_set_local_action(rctlblk_t *rblk, uint_t action, int signal);
8147c478bd9Sstevel@tonic-gatevoid rctlblk_set_local_flags(rctlblk_t *rblk, uint_t flags);
8157c478bd9Sstevel@tonic-gatevoid rctlblk_set_privilege(rctlblk_t *rblk, rctl_priv_t priv);
8167c478bd9Sstevel@tonic-gatevoid rctlblk_set_value(rctlblk_t *rblk, rctl_qty_t val);
8177c478bd9Sstevel@tonic-gatesize_t rctlblk_size(void);
8187c478bd9Sstevel@tonic-gate
8197c478bd9Sstevel@tonic-gate/* readdir.c */
8207c478bd9Sstevel@tonic-gatestruct dirent *readdir(DIR *dirp);
8217c478bd9Sstevel@tonic-gate
8227c478bd9Sstevel@tonic-gate/* realpath.c */
8237c478bd9Sstevel@tonic-gatechar *realpath(const char *_RESTRICT_KYWD raw, char *_RESTRICT_KYWD canon);
8247c478bd9Sstevel@tonic-gate
8257c478bd9Sstevel@tonic-gate/* regexpr.c */
8267c478bd9Sstevel@tonic-gatechar *re_comp(const char *sp);
8277c478bd9Sstevel@tonic-gateint re_exec(const char *p1);
8287c478bd9Sstevel@tonic-gate
8297c478bd9Sstevel@tonic-gate/* rindex.c */
8307c478bd9Sstevel@tonic-gatechar *rindex(const char *sp, int c);
8317c478bd9Sstevel@tonic-gate
8327c478bd9Sstevel@tonic-gate/* rename.c */
8337c478bd9Sstevel@tonic-gateint remove(const char *filename);
8347c478bd9Sstevel@tonic-gateint rename(const char *old, const char *new);
8357c478bd9Sstevel@tonic-gate
8367c478bd9Sstevel@tonic-gate/* rewinddir.c */
8377257d1b4Sraf#undef rewinddir
8387257d1b4Srafvoid rewinddir(DIR *dirp);
8397c478bd9Sstevel@tonic-gate
8407c478bd9Sstevel@tonic-gate/* scandir.c */
8417c478bd9Sstevel@tonic-gateint alphasort(const struct dirent **, const struct dirent **);
8427c478bd9Sstevel@tonic-gateint scandir(const char *dirname, struct dirent *(*namelist[]),
8437c478bd9Sstevel@tonic-gate	int (*select)(const struct dirent *),
8447c478bd9Sstevel@tonic-gate	int (*dcomp)(const struct dirent **, const struct dirent **));
8457c478bd9Sstevel@tonic-gate
8467c478bd9Sstevel@tonic-gate/* scrwidth.c */
8477c478bd9Sstevel@tonic-gateint scrwidth(wchar_t c);
8487c478bd9Sstevel@tonic-gate
8497c478bd9Sstevel@tonic-gate/* seekdir.c */
8507c478bd9Sstevel@tonic-gatevoid seekdir(DIR *dirp, long loc);
8517c478bd9Sstevel@tonic-gate
8527c478bd9Sstevel@tonic-gate/* select.c */
8537c478bd9Sstevel@tonic-gateint pselect(int nfds,
8547c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD readfds,
8557c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD writefds,
8567c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD errorfds,
8577c478bd9Sstevel@tonic-gate	const struct timespec *_RESTRICT_KYWD timeout,
8587c478bd9Sstevel@tonic-gate	const sigset_t *_RESTRICT_KYWD sigmask);
8597c478bd9Sstevel@tonic-gateint select(int nfds,
8607c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD readfds,
8617c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD writefds,
8627c478bd9Sstevel@tonic-gate	fd_set *_RESTRICT_KYWD errorfds,
8637c478bd9Sstevel@tonic-gate	struct timeval *_RESTRICT_KYWD timeout);
8647c478bd9Sstevel@tonic-gate
8657c478bd9Sstevel@tonic-gate/* setlocale.c */
8667c478bd9Sstevel@tonic-gatechar *setlocale(int cat, const char *loc);
8677c478bd9Sstevel@tonic-gate
8687c478bd9Sstevel@tonic-gate/* setpriority.c */
8697c478bd9Sstevel@tonic-gateint getpriority(int which, id_t who);
8707c478bd9Sstevel@tonic-gateint setpriority(int which, id_t who, int prio);
8717c478bd9Sstevel@tonic-gate
8727c478bd9Sstevel@tonic-gate/* settimeofday.c */
8737c478bd9Sstevel@tonic-gateint settimeofday(struct timeval *tp, void *);
8747c478bd9Sstevel@tonic-gate
8757c478bd9Sstevel@tonic-gate/* sigflag.c */
8767c478bd9Sstevel@tonic-gateint sigflag(int sig, int flag, int on);
8777c478bd9Sstevel@tonic-gate
8787c478bd9Sstevel@tonic-gate/* siglist.c */
8797c478bd9Sstevel@tonic-gate
8807c478bd9Sstevel@tonic-gate/* sigsend.c */
8817c478bd9Sstevel@tonic-gateint sigsend(idtype_t idtype, id_t id, int sig);
8827c478bd9Sstevel@tonic-gate
8837c478bd9Sstevel@tonic-gate/* sigsetops.c */
8847c478bd9Sstevel@tonic-gateint sigfillset(sigset_t *set);
8857c478bd9Sstevel@tonic-gateint sigemptyset(sigset_t *set);
8867c478bd9Sstevel@tonic-gateint sigaddset(sigset_t *set, int sig);
8877c478bd9Sstevel@tonic-gateint sigdelset(sigset_t *set, int sig);
8887c478bd9Sstevel@tonic-gateint sigismember(const sigset_t *set, int sig);
8897c478bd9Sstevel@tonic-gate
8907c478bd9Sstevel@tonic-gate/* scalls.c */
8917c478bd9Sstevel@tonic-gateunsigned sleep(unsigned sleep_tm);
8927c478bd9Sstevel@tonic-gate
8937c478bd9Sstevel@tonic-gate/* ssignal.c */
8947c478bd9Sstevel@tonic-gateint (*ssignal(int sig, int (*fn)())) ();
8957c478bd9Sstevel@tonic-gateint gsignal(int sig);
8967c478bd9Sstevel@tonic-gate
8977c478bd9Sstevel@tonic-gate/* str2id.c */
8987c478bd9Sstevel@tonic-gate
8997c478bd9Sstevel@tonic-gate/* str2sig.c */
9007c478bd9Sstevel@tonic-gateint str2sig(const char *s, int *sigp);
9017c478bd9Sstevel@tonic-gateint sig2str(int i, char *s);
9027c478bd9Sstevel@tonic-gate
9037c478bd9Sstevel@tonic-gate/* strcat.c */
9047c478bd9Sstevel@tonic-gatechar *strcat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
9057c478bd9Sstevel@tonic-gate
9067c478bd9Sstevel@tonic-gate/* strchr.c */
9077c478bd9Sstevel@tonic-gatechar *strchr(const char *sp, int c);
9087c478bd9Sstevel@tonic-gate
9097c478bd9Sstevel@tonic-gate/* strcmp.c */
9107c478bd9Sstevel@tonic-gateint strcmp(const char *s1, const char *s2);
9117c478bd9Sstevel@tonic-gate
9127c478bd9Sstevel@tonic-gate/* strcpy.c */
9137c478bd9Sstevel@tonic-gatechar *strcpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
9147c478bd9Sstevel@tonic-gate
9157c478bd9Sstevel@tonic-gate/* strcspn.c */
9167c478bd9Sstevel@tonic-gatesize_t strcspn(const char *string, const char *charset);
9177c478bd9Sstevel@tonic-gate
9187c478bd9Sstevel@tonic-gate/* strdup.c */
9197c478bd9Sstevel@tonic-gatechar *strdup(const char *s1);
9207c478bd9Sstevel@tonic-gate
9217c478bd9Sstevel@tonic-gate/* strerror.c */
9227c478bd9Sstevel@tonic-gatechar *strerror(int errnum);
9237c478bd9Sstevel@tonic-gateint strerror_r(int errnum, char *strerrbuf, size_t buflen);
9247c478bd9Sstevel@tonic-gate
9257c478bd9Sstevel@tonic-gate/* strftime.c */
9267c478bd9Sstevel@tonic-gatesize_t strftime(char *_RESTRICT_KYWD s, size_t maxsize,
9277c478bd9Sstevel@tonic-gate		const char *_RESTRICT_KYWD format,
9287c478bd9Sstevel@tonic-gate		const struct tm *_RESTRICT_KYWD tm);
9297c478bd9Sstevel@tonic-gate
9307c478bd9Sstevel@tonic-gate/* strlen.c */
9317c478bd9Sstevel@tonic-gatesize_t strlen(const char *s);
9327c478bd9Sstevel@tonic-gate
9337c478bd9Sstevel@tonic-gate/* strncat.c */
9347c478bd9Sstevel@tonic-gatechar *strncat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
9357c478bd9Sstevel@tonic-gate
9367c478bd9Sstevel@tonic-gate/* strncmp.c */
9377c478bd9Sstevel@tonic-gateint strncmp(const char *s1, const char *s2, size_t n);
9387c478bd9Sstevel@tonic-gate
9397c478bd9Sstevel@tonic-gate/* strncpy.c */
9407c478bd9Sstevel@tonic-gatechar *strncpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
9417c478bd9Sstevel@tonic-gate
9427c478bd9Sstevel@tonic-gate/* strpbrk.c */
9437c478bd9Sstevel@tonic-gatechar *strpbrk(const char *string, const char *brkset);
9447c478bd9Sstevel@tonic-gate
9457c478bd9Sstevel@tonic-gate/* strrchr.c */
9467c478bd9Sstevel@tonic-gatechar *strrchr(const char *sp, int c);
9477c478bd9Sstevel@tonic-gate
948b811a51aSVladimir Kotal/* strsep.c */
949b811a51aSVladimir Kotalchar *strsep(char **stringp, const char *delim);
950b811a51aSVladimir Kotal
9517c478bd9Sstevel@tonic-gate/* strspn.c */
9527c478bd9Sstevel@tonic-gatesize_t strspn(const char *string, const char *charset);
9537c478bd9Sstevel@tonic-gate
9547c478bd9Sstevel@tonic-gate/* strstr.c */
9557c478bd9Sstevel@tonic-gatechar *strstr(const char *as1, const char *as2);
9567c478bd9Sstevel@tonic-gate
9577c478bd9Sstevel@tonic-gate/* strtod.c */
9587c478bd9Sstevel@tonic-gatedouble strtod(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9597c478bd9Sstevel@tonic-gatefloat strtof(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9607c478bd9Sstevel@tonic-gatelong double strtold(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
9617c478bd9Sstevel@tonic-gate
9627c478bd9Sstevel@tonic-gate/* strtoimax.c */
9637c478bd9Sstevel@tonic-gateintmax_t strtoimax(const char *_RESTRICT_KYWD nptr,
9647c478bd9Sstevel@tonic-gate	char **_RESTRICT_KYWD endptr, int base);
9657c478bd9Sstevel@tonic-gate
9667c478bd9Sstevel@tonic-gate/* strtok.c */
9677c478bd9Sstevel@tonic-gatechar *strtok(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD sepset);
9687c478bd9Sstevel@tonic-gatechar *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
9697c478bd9Sstevel@tonic-gate	char **_RESTRICT_KYWD);
9707c478bd9Sstevel@tonic-gate
9717c478bd9Sstevel@tonic-gate/* strtol.c */
9727c478bd9Sstevel@tonic-gatelong strtol(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr,
9737c478bd9Sstevel@tonic-gate	int base);
9747c478bd9Sstevel@tonic-gate
9757c478bd9Sstevel@tonic-gate/* strtoul.c */
9767c478bd9Sstevel@tonic-gateunsigned long strtoul(const char *_RESTRICT_KYWD str,
9777c478bd9Sstevel@tonic-gate	char **_RESTRICT_KYWD nptr, int base);
9787c478bd9Sstevel@tonic-gate
9797c478bd9Sstevel@tonic-gate/* strtoumax.c */
9807c478bd9Sstevel@tonic-gateuintmax_t strtoumax(const char *_RESTRICT_KYWD nptr,
9817c478bd9Sstevel@tonic-gate		    char **_RESTRICT_KYWD endptr, int base);
9827c478bd9Sstevel@tonic-gate
9837c478bd9Sstevel@tonic-gate/* strxfrm.c */
9847c478bd9Sstevel@tonic-gatesize_t strxfrm(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2,
9857c478bd9Sstevel@tonic-gate	size_t n);
9867c478bd9Sstevel@tonic-gateint strcoll(const char *s1, const char *s2);
9877c478bd9Sstevel@tonic-gate
9887c478bd9Sstevel@tonic-gate/* swab.c */
9897c478bd9Sstevel@tonic-gatevoid swab(const char *_RESTRICT_KYWD from, char *_RESTRICT_KYWD to, ssize_t n);
9907c478bd9Sstevel@tonic-gate
9917c478bd9Sstevel@tonic-gate/* swapctl.c */
9927c478bd9Sstevel@tonic-gateint swapctl(int cmd, void *arg);
9937c478bd9Sstevel@tonic-gate
9947c478bd9Sstevel@tonic-gate/* sysconf.c */
9957c478bd9Sstevel@tonic-gatelong sysconf(int name);
9967c478bd9Sstevel@tonic-gate
9977c478bd9Sstevel@tonic-gate/* syslog.c */
9987c478bd9Sstevel@tonic-gate/* VARARGS2 */
9997c478bd9Sstevel@tonic-gatevoid syslog(int pri, const char *fmt, ...);
10007c478bd9Sstevel@tonic-gatevoid vsyslog(int pri, const char *fmt, va_list ap);
10017c478bd9Sstevel@tonic-gatevoid openlog(const char *ident, int logstat, int logfac);
10027c478bd9Sstevel@tonic-gatevoid closelog(void);
10037c478bd9Sstevel@tonic-gateint setlogmask(int pmask);
10047c478bd9Sstevel@tonic-gate
10057c478bd9Sstevel@tonic-gate/* tcdrain.c */
10067c478bd9Sstevel@tonic-gateint tcdrain(int fildes);
10077c478bd9Sstevel@tonic-gate
10087c478bd9Sstevel@tonic-gate/* tcflow.c */
10097c478bd9Sstevel@tonic-gateint tcflow(int fildes, int action);
10107c478bd9Sstevel@tonic-gate
10117c478bd9Sstevel@tonic-gate/* tcflush.c */
10127c478bd9Sstevel@tonic-gateint tcflush(int fildes, int queue_selector);
10137c478bd9Sstevel@tonic-gate
10147c478bd9Sstevel@tonic-gate/* tcgetattr.c */
10157c478bd9Sstevel@tonic-gateint tcgetattr(int fildes, struct termios *termios_p);
10167c478bd9Sstevel@tonic-gate
10177c478bd9Sstevel@tonic-gate/* tcgetpgrp.c */
10187c478bd9Sstevel@tonic-gatepid_t tcgetpgrp(int fd);
10197c478bd9Sstevel@tonic-gate
10207c478bd9Sstevel@tonic-gate/* tcgetsid.c */
10217c478bd9Sstevel@tonic-gatepid_t tcgetsid(int fd);
10227c478bd9Sstevel@tonic-gate
10237c478bd9Sstevel@tonic-gate/* tcsendbreak.c */
10247c478bd9Sstevel@tonic-gateint tcsendbreak(int fildes, int duration);
10257c478bd9Sstevel@tonic-gate
10267c478bd9Sstevel@tonic-gate/* tcsetattr.c */
10277c478bd9Sstevel@tonic-gateint tcsetattr(int fildes, int optional_actions,
10287c478bd9Sstevel@tonic-gate	const struct termios *termios_p);
10297c478bd9Sstevel@tonic-gate
10307c478bd9Sstevel@tonic-gate/* tcsetpgrp.c */
10317c478bd9Sstevel@tonic-gateint tcsetpgrp(int fd, pid_t pgrp);
10327c478bd9Sstevel@tonic-gate
10337c478bd9Sstevel@tonic-gate/* tell.c */
10347c478bd9Sstevel@tonic-gatelong tell(int f);
10357c478bd9Sstevel@tonic-gate
10367c478bd9Sstevel@tonic-gate/* telldir.c */
10377c478bd9Sstevel@tonic-gatelong telldir(DIR *dirp);
10387c478bd9Sstevel@tonic-gate
10397c478bd9Sstevel@tonic-gate/* tfind.c */
10407c478bd9Sstevel@tonic-gatevoid *tfind(const void *ky, void *const *rtp, int (*compar)());
10417c478bd9Sstevel@tonic-gate
10427c478bd9Sstevel@tonic-gate/* time_comm.c */
10437c478bd9Sstevel@tonic-gatestruct tm *localtime(const time_t *timep);
10447c478bd9Sstevel@tonic-gatestruct tm *localtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
10457c478bd9Sstevel@tonic-gatestruct tm *gmtime(const time_t *clock);
10467c478bd9Sstevel@tonic-gatestruct tm *gmtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
10477c478bd9Sstevel@tonic-gatedouble difftime(time_t time1, time_t time0);
10487c478bd9Sstevel@tonic-gatetime_t mktime(struct tm *timeptr);
10497c478bd9Sstevel@tonic-gatevoid _ltzset(time_t tim);
10507c478bd9Sstevel@tonic-gatevoid tzset(void);
10517c478bd9Sstevel@tonic-gate
10527c478bd9Sstevel@tonic-gate/* time_data.c */
10537c478bd9Sstevel@tonic-gate
10547c478bd9Sstevel@tonic-gate/* time_gdata.c */
10557c478bd9Sstevel@tonic-gate
10567c478bd9Sstevel@tonic-gate/* tolower.c */
10577c478bd9Sstevel@tonic-gateint tolower(int c);
10587c478bd9Sstevel@tonic-gate
10597c478bd9Sstevel@tonic-gate/* toupper.c */
10607c478bd9Sstevel@tonic-gateint toupper(int c);
10617c478bd9Sstevel@tonic-gate
10627c478bd9Sstevel@tonic-gate/* truncate.c */
10637c478bd9Sstevel@tonic-gateint ftruncate(int fildes, off_t len);
10647c478bd9Sstevel@tonic-gateint truncate(const char *path, off_t len);
10657c478bd9Sstevel@tonic-gate
10667c478bd9Sstevel@tonic-gate/* tsearch.c */
10677c478bd9Sstevel@tonic-gatevoid *tsearch(const void *ky, void **rtp, int (*compar)());
10687c478bd9Sstevel@tonic-gatevoid *tdelete(const void *ky, void **rtp, int (*compar)());
10697c478bd9Sstevel@tonic-gatevoid twalk(const void *rt, void (*action)());
10707c478bd9Sstevel@tonic-gate
10717c478bd9Sstevel@tonic-gate/* ttyname.c */
10727c478bd9Sstevel@tonic-gatechar *ttyname(int f);
10737c478bd9Sstevel@tonic-gatechar *_ttyname_dev(dev_t rdev, char *buffer, size_t buflen);
10747c478bd9Sstevel@tonic-gatechar *ttyname_r(int, char *, int);
10757c478bd9Sstevel@tonic-gate
10767c478bd9Sstevel@tonic-gate/* ttyslot.c */
10777c478bd9Sstevel@tonic-gateint ttyslot(void);
10787c478bd9Sstevel@tonic-gate
10797c478bd9Sstevel@tonic-gate/* ualarm.c */
10807c478bd9Sstevel@tonic-gateunsigned ualarm(unsigned usecs, unsigned reload);
10817c478bd9Sstevel@tonic-gate
10827c478bd9Sstevel@tonic-gate/* ulimit.c */
10837c478bd9Sstevel@tonic-gate/* VARARGS1 */
10847c478bd9Sstevel@tonic-gatelong ulimit(int cmd, ...);
10857c478bd9Sstevel@tonic-gate
10867c478bd9Sstevel@tonic-gate/* scalls.c */
10877c478bd9Sstevel@tonic-gateint usleep(unsigned n);
10887c478bd9Sstevel@tonic-gate
10897c478bd9Sstevel@tonic-gate/* valloc.c */
10907c478bd9Sstevel@tonic-gatevoid *valloc(size_t size);
10917c478bd9Sstevel@tonic-gate
10927c478bd9Sstevel@tonic-gate/* waitpid.c */
1093a574db85Srafpid_t wait(int *stat_loc);
10947c478bd9Sstevel@tonic-gatepid_t waitpid(pid_t pid, int *stat_loc, int options);
1095a574db85Srafpid_t wait3(int *status, int options, struct rusage *rp);
1096a574db85Srafpid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
10977c478bd9Sstevel@tonic-gate
10987c478bd9Sstevel@tonic-gate/* wcstombs.c */
10997c478bd9Sstevel@tonic-gatesize_t wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs,
11007c478bd9Sstevel@tonic-gate	size_t n);
11017c478bd9Sstevel@tonic-gate
11027c478bd9Sstevel@tonic-gate/* wctomb.c */
11037c478bd9Sstevel@tonic-gateint wctomb(char *s, wchar_t wchar);
11047c478bd9Sstevel@tonic-gate
11057c478bd9Sstevel@tonic-gate/* wdata.c */
11067c478bd9Sstevel@tonic-gate
11077c478bd9Sstevel@tonic-gate/* wisprint.c */
11087c478bd9Sstevel@tonic-gateint wisprint(wchar_t c);
11097c478bd9Sstevel@tonic-gate
11107c478bd9Sstevel@tonic-gate/* xgetwidth.c */
11117c478bd9Sstevel@tonic-gatevoid _xgetwidth(void);
11127c478bd9Sstevel@tonic-gate
11137c478bd9Sstevel@tonic-gate/*
11147c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/intl routines
11157c478bd9Sstevel@tonic-gate */
11167c478bd9Sstevel@tonic-gate
11177c478bd9Sstevel@tonic-gate/* gettext.c */
11187c478bd9Sstevel@tonic-gatechar *bindtextdomain(const char *domain, const char *binding);
11197c478bd9Sstevel@tonic-gatechar *dcgettext(const char *domain, const char *msg_id, const int category);
11207c478bd9Sstevel@tonic-gatechar *dgettext(const char *domain, const char *msg_id);
11217c478bd9Sstevel@tonic-gatechar *gettext(const char *msg_id);
11227c478bd9Sstevel@tonic-gatechar *textdomain(const char *domain);
11237c478bd9Sstevel@tonic-gate
11247c478bd9Sstevel@tonic-gate/*
11257c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/print routines
11267c478bd9Sstevel@tonic-gate */
11277c478bd9Sstevel@tonic-gate
11287c478bd9Sstevel@tonic-gate/* fprintf.c */
11297c478bd9Sstevel@tonic-gate/* VARARGS2 */
11307c478bd9Sstevel@tonic-gateint fprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, ...);
11317c478bd9Sstevel@tonic-gate
11327c478bd9Sstevel@tonic-gate/* printf.c */
11337c478bd9Sstevel@tonic-gate/* VARARGS1 */
11347c478bd9Sstevel@tonic-gateint printf(const char *_RESTRICT_KYWD format, ...);
11357c478bd9Sstevel@tonic-gate
11367c478bd9Sstevel@tonic-gate/* snprintf.c */
11377c478bd9Sstevel@tonic-gate/* VARARGS2 */
11387c478bd9Sstevel@tonic-gateint snprintf(char *_RESTRICT_KYWD string, size_t n,
11397c478bd9Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, ...);
11407c478bd9Sstevel@tonic-gate
11417c478bd9Sstevel@tonic-gate/* sprintf.c */
11427c478bd9Sstevel@tonic-gate/* VARARGS2 */
11437c478bd9Sstevel@tonic-gateint sprintf(char *_RESTRICT_KYWD string,
11447c478bd9Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, ...);
11457c478bd9Sstevel@tonic-gate
11467c478bd9Sstevel@tonic-gate/* vfprintf.c */
11477c478bd9Sstevel@tonic-gate/* VARARGS2 */
11487c478bd9Sstevel@tonic-gateint vfprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format,
11497c478bd9Sstevel@tonic-gate		va_list);
11507c478bd9Sstevel@tonic-gate
11517c478bd9Sstevel@tonic-gate/* vprintf.c */
11527c478bd9Sstevel@tonic-gate/* VARARGS1 */
11537c478bd9Sstevel@tonic-gateint vprintf(const char *_RESTRICT_KYWD format, va_list);
11547c478bd9Sstevel@tonic-gate
11557c478bd9Sstevel@tonic-gate/* vsnprintf.c */
11567c478bd9Sstevel@tonic-gate/* VARARGS2 */
11577c478bd9Sstevel@tonic-gateint vsnprintf(char *_RESTRICT_KYWD string, size_t n,
11587c478bd9Sstevel@tonic-gate		const char *_RESTRICT_KYWD format, va_list);
11597c478bd9Sstevel@tonic-gate
11607c478bd9Sstevel@tonic-gate/* vsprintf.c */
11617c478bd9Sstevel@tonic-gate/* VARARGS2 */
11627c478bd9Sstevel@tonic-gateint vsprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format,
11637c478bd9Sstevel@tonic-gate	va_list);
11647c478bd9Sstevel@tonic-gate
11657c478bd9Sstevel@tonic-gate/*
11667c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/regex routines
11677c478bd9Sstevel@tonic-gate */
11687c478bd9Sstevel@tonic-gate
1169ec2a3953SYuri Pankov/* glob.c */
1170ec2a3953SYuri Pankovextern int glob(const char *restrict pattern, int flags,
1171ec2a3953SYuri Pankov    int(*errfunc)(const char *epath, int eerrno), glob_t *restrict pglob);
1172ec2a3953SYuri Pankovextern void globfree(glob_t *pglob);
1173ec2a3953SYuri Pankov
11747c478bd9Sstevel@tonic-gate/* regex.c */
11757c478bd9Sstevel@tonic-gatechar *regex(const char *regexp, const char *stringp, ...);
11767c478bd9Sstevel@tonic-gate#ifdef __loc1
11777c478bd9Sstevel@tonic-gate#undef __loc1
11787c478bd9Sstevel@tonic-gate#endif
11797c478bd9Sstevel@tonic-gatechar *__loc1;
11807c478bd9Sstevel@tonic-gate
11817c478bd9Sstevel@tonic-gate/* regcmp.c */
11827c478bd9Sstevel@tonic-gatechar *regcmp(const char *regexp, ...);
11837c478bd9Sstevel@tonic-gate#ifdef __i_size
11847c478bd9Sstevel@tonic-gate#undef __i_size
11857c478bd9Sstevel@tonic-gate#endif
11867c478bd9Sstevel@tonic-gateint __i_size;
11877c478bd9Sstevel@tonic-gate
11887c478bd9Sstevel@tonic-gate/*
11897c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/stdio routines
11907c478bd9Sstevel@tonic-gate */
11917c478bd9Sstevel@tonic-gate
11927c478bd9Sstevel@tonic-gate/* _filbuf.c */
11937c478bd9Sstevel@tonic-gateint _filbuf(FILE *iop);
11947c478bd9Sstevel@tonic-gate
11957c478bd9Sstevel@tonic-gate/* _flsbuf.c */
11967c478bd9Sstevel@tonic-gateint _flsbuf(int ch, FILE *iop);
11977c478bd9Sstevel@tonic-gate
11987c478bd9Sstevel@tonic-gate/* _wrtchk.c */
11997c478bd9Sstevel@tonic-gateint _wrtchk(FILE *iop);
12007c478bd9Sstevel@tonic-gate
12017c478bd9Sstevel@tonic-gate/* clearerr.c */
12027c478bd9Sstevel@tonic-gatevoid clearerr(FILE *iop);
12037c478bd9Sstevel@tonic-gate
12047c478bd9Sstevel@tonic-gate/* ctermid.c */
12057c478bd9Sstevel@tonic-gatechar *ctermid(char *s);
12067c478bd9Sstevel@tonic-gatechar *ctermid_r(char *s);
12077c478bd9Sstevel@tonic-gate
12087c478bd9Sstevel@tonic-gate/* cuserid.c */
12097c478bd9Sstevel@tonic-gatechar *cuserid(char *s);
12107c478bd9Sstevel@tonic-gate
12117c478bd9Sstevel@tonic-gate/* data.c */
12127c478bd9Sstevel@tonic-gate
12137c478bd9Sstevel@tonic-gate/* doscan.c */
12147c478bd9Sstevel@tonic-gateint _doscan(FILE *iop, const char *fmt, va_list va_alist);
12157c478bd9Sstevel@tonic-gate
12167c478bd9Sstevel@tonic-gate/* fdopen.c */
12177c478bd9Sstevel@tonic-gateFILE *fdopen(int fd, const char *type);
12187c478bd9Sstevel@tonic-gate
12197c478bd9Sstevel@tonic-gate/* feof.c */
12207c478bd9Sstevel@tonic-gateint feof(FILE *iop);
12217c478bd9Sstevel@tonic-gate
12227c478bd9Sstevel@tonic-gate/* ferror.c */
12237c478bd9Sstevel@tonic-gateint ferror(FILE *iop);
12247c478bd9Sstevel@tonic-gate
12257c478bd9Sstevel@tonic-gate/* fgetc.c */
12267c478bd9Sstevel@tonic-gateint fgetc(FILE *iop);
12277c478bd9Sstevel@tonic-gate
12287c478bd9Sstevel@tonic-gate/* fgets.c */
12297c478bd9Sstevel@tonic-gatechar *fgets(char *_RESTRICT_KYWD buf, int size, FILE *_RESTRICT_KYWD iop);
12307c478bd9Sstevel@tonic-gate
12317c478bd9Sstevel@tonic-gate/* fileno.c */
12327c478bd9Sstevel@tonic-gateint _fileno(FILE *iop);
12337c478bd9Sstevel@tonic-gate
12347c478bd9Sstevel@tonic-gate/* flush.c */
12357c478bd9Sstevel@tonic-gatevoid _cleanup(void);
12367c478bd9Sstevel@tonic-gateFILE *_findiop(void);
12377c478bd9Sstevel@tonic-gatetypedef unsigned char Uchar;
12387c478bd9Sstevel@tonic-gatevoid _setbufend(FILE *iop, Uchar *end);
12397c478bd9Sstevel@tonic-gateUchar *_realbufend(FILE *iop);
12407c478bd9Sstevel@tonic-gatevoid _bufsync(FILE *iop, Uchar *bufend);
12417c478bd9Sstevel@tonic-gateint _xflsbuf(FILE *iop);
12427c478bd9Sstevel@tonic-gateint fflush(FILE *iop);
12437c478bd9Sstevel@tonic-gateint fclose(FILE *iop);
12447c478bd9Sstevel@tonic-gate
12457c478bd9Sstevel@tonic-gate/* fopen.c */
12467c478bd9Sstevel@tonic-gateFILE *fopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type);
12477c478bd9Sstevel@tonic-gateFILE *freopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type,
12487c478bd9Sstevel@tonic-gate		FILE *_RESTRICT_KYWD iop);
12497c478bd9Sstevel@tonic-gate
12507c478bd9Sstevel@tonic-gate/* fpos.c */
12517c478bd9Sstevel@tonic-gateint fgetpos(FILE *_RESTRICT_KYWD stream, fpos_t *_RESTRICT_KYWD pos);
12527c478bd9Sstevel@tonic-gateint fsetpos(FILE *stream, const fpos_t *pos);
12537c478bd9Sstevel@tonic-gate
12547c478bd9Sstevel@tonic-gate/* fputc.c */
12557c478bd9Sstevel@tonic-gateint fputc(int ch, FILE *iop);
12567c478bd9Sstevel@tonic-gate
12577c478bd9Sstevel@tonic-gate/* fputs.c */
12587c478bd9Sstevel@tonic-gateint fputs(const char *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
12597c478bd9Sstevel@tonic-gate
12607c478bd9Sstevel@tonic-gate/* fread.c */
12617c478bd9Sstevel@tonic-gatesize_t fread(void *_RESTRICT_KYWD ptr, size_t size, size_t count,
12627c478bd9Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
12637c478bd9Sstevel@tonic-gate
12647c478bd9Sstevel@tonic-gate/* fseek.c */
12657c478bd9Sstevel@tonic-gateint fseek(FILE *iop, long offset, int ptrname);
12667c478bd9Sstevel@tonic-gate
12677c478bd9Sstevel@tonic-gate/* ftell.c */
12687c478bd9Sstevel@tonic-gatelong ftell(FILE *iop);
12697c478bd9Sstevel@tonic-gate
12707c478bd9Sstevel@tonic-gate/* fwrite.c */
12717c478bd9Sstevel@tonic-gatesize_t fwrite(const void *_RESTRICT_KYWD ptr1, size_t size, size_t count,
12727c478bd9Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
12737c478bd9Sstevel@tonic-gate
12747c478bd9Sstevel@tonic-gate/* getc.c */
12757c478bd9Sstevel@tonic-gateint getc(FILE *iop);
12767c478bd9Sstevel@tonic-gate
12777c478bd9Sstevel@tonic-gate/* getchar.c */
12787c478bd9Sstevel@tonic-gateint getchar(void);
12797c478bd9Sstevel@tonic-gate
12807c478bd9Sstevel@tonic-gate/* getpass.c */
12817c478bd9Sstevel@tonic-gatechar *getpass(const char *prompt);
12827c478bd9Sstevel@tonic-gate
12837c478bd9Sstevel@tonic-gate/* getpass.c */
12847c478bd9Sstevel@tonic-gatechar *getpassphrase(const char *prompt);
12857c478bd9Sstevel@tonic-gate
12867c478bd9Sstevel@tonic-gate/* gets.c */
12877c478bd9Sstevel@tonic-gatechar *gets(char *buf);
12887c478bd9Sstevel@tonic-gate
12897c478bd9Sstevel@tonic-gate/* getw.c */
12907c478bd9Sstevel@tonic-gateint getw(FILE *stream);
12917c478bd9Sstevel@tonic-gate
12927c478bd9Sstevel@tonic-gate/* popen.c */
12937c478bd9Sstevel@tonic-gateFILE *popen(const char *cmd, const char *mode);
12947c478bd9Sstevel@tonic-gateint pclose(FILE *ptr);
12957c478bd9Sstevel@tonic-gate
12967c478bd9Sstevel@tonic-gate/* putc.c */
12977c478bd9Sstevel@tonic-gateint putc(int ch, FILE *iop);
12987c478bd9Sstevel@tonic-gate
12997c478bd9Sstevel@tonic-gate/* putchar.c */
13007c478bd9Sstevel@tonic-gateint putchar(int ch);
13017c478bd9Sstevel@tonic-gate
13027c478bd9Sstevel@tonic-gate/* puts.c */
13037c478bd9Sstevel@tonic-gateint puts(const char *ptr);
13047c478bd9Sstevel@tonic-gate
13057c478bd9Sstevel@tonic-gate/* putw.c */
13067c478bd9Sstevel@tonic-gateint putw(int w, FILE *stream);
13077c478bd9Sstevel@tonic-gate
13087c478bd9Sstevel@tonic-gate/* rewind.c */
13097c478bd9Sstevel@tonic-gatevoid rewind(FILE *iop);
13107c478bd9Sstevel@tonic-gate
13117c478bd9Sstevel@tonic-gate/* scanf.c */
13127c478bd9Sstevel@tonic-gate/* VARARGS1 */
13137c478bd9Sstevel@tonic-gateint scanf(const char *_RESTRICT_KYWD fmt, ...);
13147c478bd9Sstevel@tonic-gate
13157c478bd9Sstevel@tonic-gate/* VARARGS2 */
13167c478bd9Sstevel@tonic-gateint fscanf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD fmt, ...);
13177c478bd9Sstevel@tonic-gate
13187c478bd9Sstevel@tonic-gate/* VARARGS2 */
13197c478bd9Sstevel@tonic-gateint sscanf(const char *_RESTRICT_KYWD str, const char *_RESTRICT_KYWD fmt, ...);
13207c478bd9Sstevel@tonic-gate
13217c478bd9Sstevel@tonic-gate/* setbuf.c */
13227c478bd9Sstevel@tonic-gatevoid setbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf);
13237c478bd9Sstevel@tonic-gate
13247c478bd9Sstevel@tonic-gate/* setvbuf.c */
13257c478bd9Sstevel@tonic-gateint setvbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf, int type,
13267c478bd9Sstevel@tonic-gate		size_t size);
13277c478bd9Sstevel@tonic-gate
13287c478bd9Sstevel@tonic-gate/* system.c */
13297c478bd9Sstevel@tonic-gateint system(const char *s);
13307c478bd9Sstevel@tonic-gate
13317c478bd9Sstevel@tonic-gate/* tempnam.c */
13327c478bd9Sstevel@tonic-gatechar *tempnam(const char *dir, const char *pfx);
13337c478bd9Sstevel@tonic-gate
13347c478bd9Sstevel@tonic-gate/* tmpfile.c */
13357c478bd9Sstevel@tonic-gateFILE *tmpfile(void);
13367c478bd9Sstevel@tonic-gate
13377c478bd9Sstevel@tonic-gate/* tmpnam.c */
13387c478bd9Sstevel@tonic-gatechar *tmpnam(char *s);
13397c478bd9Sstevel@tonic-gatechar *tmpnam_r(char *);
13407c478bd9Sstevel@tonic-gate
13417c478bd9Sstevel@tonic-gate/* ungetc.c */
13427c478bd9Sstevel@tonic-gateint ungetc(int c, FILE *iop);
13437c478bd9Sstevel@tonic-gate
13447c478bd9Sstevel@tonic-gate/*
13457c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/sys routines
13467c478bd9Sstevel@tonic-gate */
13477c478bd9Sstevel@tonic-gate
13487c478bd9Sstevel@tonic-gate/* exacctsys.c */
13497c478bd9Sstevel@tonic-gatesize_t getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize);
13507c478bd9Sstevel@tonic-gateint putacct(idtype_t idtype, id_t id, void *buf, size_t bufsize, int flags);
13517c478bd9Sstevel@tonic-gateint wracct(idtype_t idtype, id_t id, int flags);
13527c478bd9Sstevel@tonic-gate
13537c478bd9Sstevel@tonic-gate/* execl.c */
13547c478bd9Sstevel@tonic-gate/* VARARGS1 */
13557c478bd9Sstevel@tonic-gateint execl(const char *name, const char *, ...);
13567c478bd9Sstevel@tonic-gate
13577c478bd9Sstevel@tonic-gate/* execle.c */
13587c478bd9Sstevel@tonic-gateint execle(const char *, const char *file, ...);
13597c478bd9Sstevel@tonic-gate
13607c478bd9Sstevel@tonic-gate/* execv.c */
13617c478bd9Sstevel@tonic-gateint execv(const char *file, char *const *argv);
13627c478bd9Sstevel@tonic-gate
13637c478bd9Sstevel@tonic-gate/* lockf.c */
13647c478bd9Sstevel@tonic-gateint lockf(int fildes, int function, off_t size);
13657c478bd9Sstevel@tonic-gate
13667c478bd9Sstevel@tonic-gate/* meminfosys.c */
13677c478bd9Sstevel@tonic-gateint meminfo(const uint64_t *inaddr, int addr_count, const uint_t *info_req,
13687c478bd9Sstevel@tonic-gate	int info_count, uint64_t *outdata, uint_t *validity);
13697c478bd9Sstevel@tonic-gate
13707c478bd9Sstevel@tonic-gate/* msgsys.c */
13717c478bd9Sstevel@tonic-gateint msgget(key_t key, int msgflg);
13727c478bd9Sstevel@tonic-gateint msgctl(int msqid, int cmd, struct msqid_ds *buf);
13737c478bd9Sstevel@tonic-gatessize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
13747c478bd9Sstevel@tonic-gateint msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
13757c478bd9Sstevel@tonic-gate
13767c478bd9Sstevel@tonic-gate/* nfssys.c */
13777c478bd9Sstevel@tonic-gate/*
13787c478bd9Sstevel@tonic-gateint exportfs(char *dir, struct export *ep);
13797c478bd9Sstevel@tonic-gateint nfs_getfh(char *path, fhandle_t *fhp);
13807c478bd9Sstevel@tonic-gateint nfssvc(int fd);
13817c478bd9Sstevel@tonic-gate*/
13827c478bd9Sstevel@tonic-gate
13837c478bd9Sstevel@tonic-gate/* psetsys.c */
13847c478bd9Sstevel@tonic-gateint pset_create(psetid_t *npset);
13857c478bd9Sstevel@tonic-gateint pset_destroy(psetid_t pset);
13867c478bd9Sstevel@tonic-gateint pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset);
13877c478bd9Sstevel@tonic-gateint pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset);
13887c478bd9Sstevel@tonic-gateint pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist);
13897c478bd9Sstevel@tonic-gateint pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset);
1390fb9b0aa8SSurya Prakkiint pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset);
1391fb9b0aa8SSurya Prakki
13927c478bd9Sstevel@tonic-gate
13937c478bd9Sstevel@tonic-gate/* rctlsys.c */
13947c478bd9Sstevel@tonic-gateint getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
13957c478bd9Sstevel@tonic-gate    int flags);
13967c478bd9Sstevel@tonic-gateint setrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
13977c478bd9Sstevel@tonic-gate    int flags);
13987c478bd9Sstevel@tonic-gate/* (private functions) */
1399532877c4Srd117015int setprojrctl(const char *name, rctlblk_t *new_rblk, size_t size, int flags);
14007c478bd9Sstevel@tonic-gateint rctlctl(const char *, rctlblk_t *, int);
14017c478bd9Sstevel@tonic-gatesize_t rctllist(char *, size_t);
14027c478bd9Sstevel@tonic-gate
14037c478bd9Sstevel@tonic-gate
14047c478bd9Sstevel@tonic-gate/* semsys.c */
14057c478bd9Sstevel@tonic-gateint semctl(int semid, int semnum, int cmd, ...);
14067c478bd9Sstevel@tonic-gateint semget(key_t key, int nsems, int semflg);
14077c478bd9Sstevel@tonic-gateint semop(int semid, struct sembuf *sops, size_t nsops);
14087c478bd9Sstevel@tonic-gate
14097c478bd9Sstevel@tonic-gate/* shmsys.c */
14107c478bd9Sstevel@tonic-gatevoid *shmat(int shmid, const void *shmaddr, int shmflg);
14117c478bd9Sstevel@tonic-gateint shmctl(int shmid, int cmd, struct shmid_ds *buf);
14127c478bd9Sstevel@tonic-gate#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)
14137c478bd9Sstevel@tonic-gateint shmdt(const void *);
14147c478bd9Sstevel@tonic-gate#else
14157c478bd9Sstevel@tonic-gateint shmdt(char *);
14167c478bd9Sstevel@tonic-gate#endif /* defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) */
14177c478bd9Sstevel@tonic-gateint shmget(key_t key, size_t size, int shmflg);
14187c478bd9Sstevel@tonic-gate
14197c478bd9Sstevel@tonic-gate/* tasksys.c */
14207c478bd9Sstevel@tonic-gatetaskid_t settaskid(projid_t project, uint_t flags);
14217c478bd9Sstevel@tonic-gatetaskid_t gettaskid(void);
14227c478bd9Sstevel@tonic-gateprojid_t getprojid(void);
14237c478bd9Sstevel@tonic-gate
14247c478bd9Sstevel@tonic-gate/*
14257c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/widec routines
14267c478bd9Sstevel@tonic-gate */
14277c478bd9Sstevel@tonic-gate
14287c478bd9Sstevel@tonic-gate/* fgetws.c */
14297c478bd9Sstevel@tonic-gatewchar_t *fgetws(wchar_t *_RESTRICT_KYWD ptr, int  size,
14307c478bd9Sstevel@tonic-gate	FILE *_RESTRICT_KYWD iop);
14317c478bd9Sstevel@tonic-gate
14327c478bd9Sstevel@tonic-gate/* fputwc.c */
14337c478bd9Sstevel@tonic-gatewint_t fputwc(wint_t wc, FILE *iop);
14347c478bd9Sstevel@tonic-gatewint_t putwc(wint_t wc, FILE *iop);
14357c478bd9Sstevel@tonic-gate
14367c478bd9Sstevel@tonic-gate/* fputws.c */
14377c478bd9Sstevel@tonic-gateint fputws(const wchar_t *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
14387c478bd9Sstevel@tonic-gate
14397c478bd9Sstevel@tonic-gate/* getwchar.c */
14407c478bd9Sstevel@tonic-gatewint_t getwchar(void);
14417c478bd9Sstevel@tonic-gate
14427c478bd9Sstevel@tonic-gate/* getwidth.c */
14437c478bd9Sstevel@tonic-gatevoid getwidth(eucwidth_t *eucstruct);
14447c478bd9Sstevel@tonic-gate
14457c478bd9Sstevel@tonic-gate/* getws.c */
14467c478bd9Sstevel@tonic-gatewchar_t *getws(wchar_t *ptr);
14477c478bd9Sstevel@tonic-gate
14487c478bd9Sstevel@tonic-gate/* iswctype.c */
14497c478bd9Sstevel@tonic-gateint iswctype(wint_t wc, wctype_t charclass);
14507c478bd9Sstevel@tonic-gateint iswalpha(wint_t c);
14517c478bd9Sstevel@tonic-gateint iswupper(wint_t c);
14527c478bd9Sstevel@tonic-gateint iswlower(wint_t c);
14537c478bd9Sstevel@tonic-gateint iswdigit(wint_t c);
14547c478bd9Sstevel@tonic-gateint iswxdigit(wint_t c);
14557c478bd9Sstevel@tonic-gateint iswalnum(wint_t c);
14567c478bd9Sstevel@tonic-gateint iswspace(wint_t c);
14577c478bd9Sstevel@tonic-gateint iswpunct(wint_t c);
14587c478bd9Sstevel@tonic-gateint iswprint(wint_t c);
14597c478bd9Sstevel@tonic-gateint iswgraph(wint_t c);
14607c478bd9Sstevel@tonic-gateint iswcntrl(wint_t c);
14617c478bd9Sstevel@tonic-gateint isphonogram(wint_t c);
14627c478bd9Sstevel@tonic-gateint isideogram(wint_t c);
14637c478bd9Sstevel@tonic-gateint isenglish(wint_t c);
14647c478bd9Sstevel@tonic-gateint isnumber(wint_t c);
14657c478bd9Sstevel@tonic-gateint isspecial(wint_t c);
14667c478bd9Sstevel@tonic-gate
14677c478bd9Sstevel@tonic-gate/* libwcollate.c */
14687c478bd9Sstevel@tonic-gate
14697c478bd9Sstevel@tonic-gate/* putwchar.c */
14707c478bd9Sstevel@tonic-gatewint_t putwchar(wint_t c);
14717c478bd9Sstevel@tonic-gate
14727c478bd9Sstevel@tonic-gate/* putws.c */
14737c478bd9Sstevel@tonic-gateint putws(const wchar_t *ptr);
14747c478bd9Sstevel@tonic-gate
14757c478bd9Sstevel@tonic-gate/* scrwidth.c */
14767c478bd9Sstevel@tonic-gate
14777c478bd9Sstevel@tonic-gate/* strtows.c */
14787c478bd9Sstevel@tonic-gatewchar_t *strtows(wchar_t *s1, char *s2);
14797c478bd9Sstevel@tonic-gatechar *wstostr(char *s1, wchar_t *s2);
14807c478bd9Sstevel@tonic-gate
14817c478bd9Sstevel@tonic-gate/* trwctype.c */
14827c478bd9Sstevel@tonic-gatewint_t towupper(wint_t c);
14837c478bd9Sstevel@tonic-gatewint_t towlower(wint_t c);
14847c478bd9Sstevel@tonic-gate
14857c478bd9Sstevel@tonic-gate/* ungetwc.c */
14867c478bd9Sstevel@tonic-gatewint_t ungetwc(wint_t wc, FILE *iop);
14877c478bd9Sstevel@tonic-gate
14887c478bd9Sstevel@tonic-gate/* wcollate.c */
14897c478bd9Sstevel@tonic-gatesize_t wcsxfrm(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
14907c478bd9Sstevel@tonic-gate	size_t n);
14917c478bd9Sstevel@tonic-gateint wcscoll(const wchar_t *s1, const wchar_t *s2);
14927c478bd9Sstevel@tonic-gate
14937c478bd9Sstevel@tonic-gate/* wcsftime.c */
14947c478bd9Sstevel@tonic-gate#if !defined(__amd64) 		/* XX64 - fix me */
14957c478bd9Sstevel@tonic-gatesize_t wcsftime(wchar_t *wcs, size_t maxsize,
14967c478bd9Sstevel@tonic-gate	const char *format, const struct tm *timeptr);
14977c478bd9Sstevel@tonic-gate#endif	/* __amd64 */
14987c478bd9Sstevel@tonic-gate
14997c478bd9Sstevel@tonic-gate/* wcstring.c */
15007c478bd9Sstevel@tonic-gatewint_t fgetwc(FILE *iop);
15017c478bd9Sstevel@tonic-gatewint_t getwc(FILE *iop);
15027c478bd9Sstevel@tonic-gateint wcwidth(wchar_t wc);
15037c478bd9Sstevel@tonic-gateint wcswidth(const wchar_t *pwcs, size_t n);
15047c478bd9Sstevel@tonic-gate
15057c478bd9Sstevel@tonic-gate/* wcswcs.c */
15067c478bd9Sstevel@tonic-gatewchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2);
15077c478bd9Sstevel@tonic-gate
15087c478bd9Sstevel@tonic-gate/* wcsxfrm.c - empty file! */
15097c478bd9Sstevel@tonic-gate
15107c478bd9Sstevel@tonic-gate/* wcsxfrm.xpg4.c */
15117c478bd9Sstevel@tonic-gate
15127c478bd9Sstevel@tonic-gate/* wisprint.c */
15137c478bd9Sstevel@tonic-gateint wisprint(wchar_t c);
15147c478bd9Sstevel@tonic-gate
15157c478bd9Sstevel@tonic-gate/* wscasecmp.c */
15167c478bd9Sstevel@tonic-gateint wscasecmp(const wchar_t *s1, const wchar_t *s2);
15177c478bd9Sstevel@tonic-gate
15187c478bd9Sstevel@tonic-gate/* wscat.c */
15197c478bd9Sstevel@tonic-gatewchar_t *wcscat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
15207c478bd9Sstevel@tonic-gatewchar_t *wscat(wchar_t *s1, const wchar_t *s2);
15217c478bd9Sstevel@tonic-gate
15227c478bd9Sstevel@tonic-gate/* wschr.c */
15237c478bd9Sstevel@tonic-gatewchar_t *wcschr(const wchar_t *sp, wchar_t c);
15247c478bd9Sstevel@tonic-gatewchar_t *wschr(const wchar_t *sp, wchar_t c);
15257c478bd9Sstevel@tonic-gate
15267c478bd9Sstevel@tonic-gate/* wscmp.c */
15277c478bd9Sstevel@tonic-gateint wcscmp(const wchar_t *s1, const wchar_t *s2);
15287c478bd9Sstevel@tonic-gateint wscmp(const wchar_t *s1, const wchar_t *s2);
15297c478bd9Sstevel@tonic-gate
15307c478bd9Sstevel@tonic-gate/* wscol.c */
15317c478bd9Sstevel@tonic-gateint wscol(const wchar_t *s1);
15327c478bd9Sstevel@tonic-gate
15337c478bd9Sstevel@tonic-gate/* wscpy.c */
15347c478bd9Sstevel@tonic-gatewchar_t *wcscpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
15357c478bd9Sstevel@tonic-gatewchar_t *wscpy(wchar_t *s1, const wchar_t *s2);
15367c478bd9Sstevel@tonic-gate
15377c478bd9Sstevel@tonic-gate/* wscspn.c */
15387c478bd9Sstevel@tonic-gatesize_t wcscspn(const wchar_t *string, const wchar_t *charset);
15397c478bd9Sstevel@tonic-gatesize_t wscspn(const wchar_t *string, const wchar_t *charset);
15407c478bd9Sstevel@tonic-gate
15417c478bd9Sstevel@tonic-gate/* wsdup.c */
15427c478bd9Sstevel@tonic-gatewchar_t *wsdup(const wchar_t *s1);
15437c478bd9Sstevel@tonic-gate
15447c478bd9Sstevel@tonic-gate/* wslen.c */
15457c478bd9Sstevel@tonic-gatesize_t wcslen(const wchar_t *s);
15467c478bd9Sstevel@tonic-gatesize_t wslen(const wchar_t *s);
15477c478bd9Sstevel@tonic-gate
15487c478bd9Sstevel@tonic-gate/* wsncasecmp.c */
15497c478bd9Sstevel@tonic-gateint wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15507c478bd9Sstevel@tonic-gate
15517c478bd9Sstevel@tonic-gate/* wsncat.c */
15527c478bd9Sstevel@tonic-gatewchar_t *wcsncat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
15537c478bd9Sstevel@tonic-gate	size_t n);
15547c478bd9Sstevel@tonic-gatewchar_t *wsncat(wchar_t *s1, const wchar_t *s2, size_t n);
15557c478bd9Sstevel@tonic-gate
15567c478bd9Sstevel@tonic-gate/* wsncmp.c */
15577c478bd9Sstevel@tonic-gateint wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15587c478bd9Sstevel@tonic-gateint wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
15597c478bd9Sstevel@tonic-gate
15607c478bd9Sstevel@tonic-gate/* wsncpy.c */
15617c478bd9Sstevel@tonic-gatewchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
15627c478bd9Sstevel@tonic-gate	size_t n);
15637c478bd9Sstevel@tonic-gatewchar_t *wsncpy(wchar_t *s1, const wchar_t *s2, size_t n);
15647c478bd9Sstevel@tonic-gate
15657c478bd9Sstevel@tonic-gate/* wspbrk.c */
15667c478bd9Sstevel@tonic-gatewchar_t *wcspbrk(const wchar_t *string, const wchar_t *brkset);
15677c478bd9Sstevel@tonic-gatewchar_t *wspbrk(const wchar_t *string, const wchar_t *brkset);
15687c478bd9Sstevel@tonic-gate
15697c478bd9Sstevel@tonic-gate/* wsprintf.c */
15707c478bd9Sstevel@tonic-gateint wsprintf(wchar_t *wstring, const char *format, ...);
15717c478bd9Sstevel@tonic-gate
15727c478bd9Sstevel@tonic-gate/* wsrchr.c */
15737c478bd9Sstevel@tonic-gatewchar_t *wcsrchr(const wchar_t *sp, wchar_t c);
15747c478bd9Sstevel@tonic-gatewchar_t *wsrchr(const wchar_t *sp, wchar_t c);
15757c478bd9Sstevel@tonic-gate
15767c478bd9Sstevel@tonic-gate/* wsscanf.c */
15777c478bd9Sstevel@tonic-gateint wsscanf(wchar_t *s, const char *format, ...);
15787c478bd9Sstevel@tonic-gate
15797c478bd9Sstevel@tonic-gate/* wssize.c */
15807c478bd9Sstevel@tonic-gate
15817c478bd9Sstevel@tonic-gate/* wsspn.c */
15827c478bd9Sstevel@tonic-gatesize_t wcsspn(const wchar_t *string, const wchar_t *charset);
15837c478bd9Sstevel@tonic-gatesize_t wsspn(const wchar_t *string, const wchar_t *charset);
15847c478bd9Sstevel@tonic-gate
15857c478bd9Sstevel@tonic-gate/* wstod.c */
15867c478bd9Sstevel@tonic-gatedouble wcstod(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
15877c478bd9Sstevel@tonic-gatefloat wcstof(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
15887c478bd9Sstevel@tonic-gatelong double wcstold(const wchar_t *_RESTRICT_KYWD cp,
15897c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr);
15907c478bd9Sstevel@tonic-gatedouble wstod(const wchar_t *cp, wchar_t **ptr);
15917c478bd9Sstevel@tonic-gate
15927c478bd9Sstevel@tonic-gate/* wstok.c */
15937c478bd9Sstevel@tonic-gate#if !defined(__amd64) 		/* XX64 - fix me */
15947c478bd9Sstevel@tonic-gatewchar_t *wcstok(wchar_t *string, const wchar_t *sepset);
15957c478bd9Sstevel@tonic-gatewchar_t *wstok(wchar_t *string, const wchar_t *sepset);
15967c478bd9Sstevel@tonic-gate#endif	/* __amd64 */
15977c478bd9Sstevel@tonic-gate
15987c478bd9Sstevel@tonic-gate/* wcstol.c */
15997c478bd9Sstevel@tonic-gatelong wcstol(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr,
16007c478bd9Sstevel@tonic-gate	int base);
16017c478bd9Sstevel@tonic-gatelong long wcstoll(const wchar_t *_RESTRICT_KYWD str,
16027c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
16037c478bd9Sstevel@tonic-gate
16047c478bd9Sstevel@tonic-gate/* wcstoul.c */
16057c478bd9Sstevel@tonic-gateunsigned long wcstoul(const wchar_t *_RESTRICT_KYWD str,
16067c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
16077c478bd9Sstevel@tonic-gateunsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD str,
16087c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD ptr, int base);
16097c478bd9Sstevel@tonic-gate
16107c478bd9Sstevel@tonic-gate/* wcstoimax.c */
16117c478bd9Sstevel@tonic-gateintmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD nptr,
16127c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD endptr, int base);
16137c478bd9Sstevel@tonic-gateuintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD nptr,
16147c478bd9Sstevel@tonic-gate	wchar_t **_RESTRICT_KYWD endptr, int base);
16157c478bd9Sstevel@tonic-gate
16167c478bd9Sstevel@tonic-gate/* wstol.c */
16177c478bd9Sstevel@tonic-gatelong wstol(const wchar_t *str, wchar_t **ptr, int base);
16187c478bd9Sstevel@tonic-gate
16197c478bd9Sstevel@tonic-gate/* wstoll.c */
16207c478bd9Sstevel@tonic-gatelong long wstoll(const wchar_t *str, wchar_t **ptr, int base);
16217c478bd9Sstevel@tonic-gatelong long watoll(const wchar_t *p);
16227c478bd9Sstevel@tonic-gate
16237c478bd9Sstevel@tonic-gate/* wsxfrm.c */
16247c478bd9Sstevel@tonic-gatesize_t wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n);
16257c478bd9Sstevel@tonic-gateint wscoll(const wchar_t *s1, const wchar_t *s2);
16267c478bd9Sstevel@tonic-gate
16277c478bd9Sstevel@tonic-gate/*
16287c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/port/gen/event_port.c
16297c478bd9Sstevel@tonic-gate */
16307c478bd9Sstevel@tonic-gateint port_dispatch(int port, int flags, int source, int events, uintptr_t object,
16317c478bd9Sstevel@tonic-gate    void *user);
16327c478bd9Sstevel@tonic-gate
16337c478bd9Sstevel@tonic-gate/*
16347c478bd9Sstevel@tonic-gate * /usr/src/lib/libc/$MACH/gen routines
16357c478bd9Sstevel@tonic-gate */
16367c478bd9Sstevel@tonic-gate
16377c478bd9Sstevel@tonic-gate/* alloca.s */
16387c478bd9Sstevel@tonic-gate
16397c478bd9Sstevel@tonic-gatevoid *__builtin_alloca(size_t);
16407c478bd9Sstevel@tonic-gate
16417c478bd9Sstevel@tonic-gate/*
16427c478bd9Sstevel@tonic-gate * modctl(int arg, ...) and utssys(...) are not available from a header
16437c478bd9Sstevel@tonic-gate * file, but our utilities which make use of it should be able to be
16447c478bd9Sstevel@tonic-gate * lint clean.
16457c478bd9Sstevel@tonic-gate */
16467c478bd9Sstevel@tonic-gateint modctl(int arg, ...);
16477c478bd9Sstevel@tonic-gateint utssys(void *buf, int arg, int type, void *outbp);
16487c478bd9Sstevel@tonic-gate
16497c478bd9Sstevel@tonic-gate
16507c478bd9Sstevel@tonic-gatetypedef float single;
16517c478bd9Sstevel@tonic-gatetypedef unsigned extended[3];
16527c478bd9Sstevel@tonic-gatetypedef long double quadruple;
16537c478bd9Sstevel@tonic-gatetypedef unsigned fp_exception_field_type;
16547c478bd9Sstevel@tonic-gate
16557c478bd9Sstevel@tonic-gatetypedef char decimal_string[512];
16567c478bd9Sstevel@tonic-gate
16577c478bd9Sstevel@tonic-gateenum fp_class_type {
16587c478bd9Sstevel@tonic-gate	fp_zero	 = 0,
16597c478bd9Sstevel@tonic-gate	fp_subnormal    = 1,
16607c478bd9Sstevel@tonic-gate	fp_normal	= 2,
16617c478bd9Sstevel@tonic-gate	fp_infinity	= 3,
16627c478bd9Sstevel@tonic-gate	fp_quiet	= 4,
16637c478bd9Sstevel@tonic-gate	fp_signaling    = 5
16647c478bd9Sstevel@tonic-gate};
16657c478bd9Sstevel@tonic-gate
16667c478bd9Sstevel@tonic-gateenum fp_direction_type {
16677c478bd9Sstevel@tonic-gate	fp_nearest	= 0,
16687c478bd9Sstevel@tonic-gate	fp_tozero	= 1,
16697c478bd9Sstevel@tonic-gate	fp_positive	= 2,
16707c478bd9Sstevel@tonic-gate	fp_negative	= 3
16717c478bd9Sstevel@tonic-gate};
16727c478bd9Sstevel@tonic-gate
16737c478bd9Sstevel@tonic-gatetypedef struct {
16747c478bd9Sstevel@tonic-gate	enum fp_class_type fpclass;
16757c478bd9Sstevel@tonic-gate	int sign;
16767c478bd9Sstevel@tonic-gate	int exponent;
16777c478bd9Sstevel@tonic-gate	decimal_string ds;
16787c478bd9Sstevel@tonic-gate	int more;
16797c478bd9Sstevel@tonic-gate	int ndigits;
16807c478bd9Sstevel@tonic-gate} decimal_record;
16817c478bd9Sstevel@tonic-gate
16827c478bd9Sstevel@tonic-gateenum decimal_form {
16837c478bd9Sstevel@tonic-gate	fixed_form,
16847c478bd9Sstevel@tonic-gate	floating_form
16857c478bd9Sstevel@tonic-gate};
16867c478bd9Sstevel@tonic-gate
16877c478bd9Sstevel@tonic-gatetypedef struct {
16887c478bd9Sstevel@tonic-gate	enum fp_direction_type rd;
16897c478bd9Sstevel@tonic-gate	enum decimal_form df;
16907c478bd9Sstevel@tonic-gate	int ndigits;
16917c478bd9Sstevel@tonic-gate} decimal_mode;
16927c478bd9Sstevel@tonic-gate
16937c478bd9Sstevel@tonic-gateenum decimal_string_form {
16947c478bd9Sstevel@tonic-gate	invalid_form,
16957c478bd9Sstevel@tonic-gate	whitespace_form,
16967c478bd9Sstevel@tonic-gate	fixed_int_form,
16977c478bd9Sstevel@tonic-gate	fixed_intdot_form,
16987c478bd9Sstevel@tonic-gate	fixed_dotfrac_form,
16997c478bd9Sstevel@tonic-gate	fixed_intdotfrac_form,
17007c478bd9Sstevel@tonic-gate	floating_int_form,
17017c478bd9Sstevel@tonic-gate	floating_intdot_form,
17027c478bd9Sstevel@tonic-gate	floating_dotfrac_form,
17037c478bd9Sstevel@tonic-gate	floating_intdotfrac_form,
17047c478bd9Sstevel@tonic-gate	inf_form,
17057c478bd9Sstevel@tonic-gate	infinity_form,
17067c478bd9Sstevel@tonic-gate	nan_form,
17077c478bd9Sstevel@tonic-gate	nanstring_form
17087c478bd9Sstevel@tonic-gate};
17097c478bd9Sstevel@tonic-gate
17107c478bd9Sstevel@tonic-gatetypedef int sigfpe_code_type;
17117c478bd9Sstevel@tonic-gate
17127c478bd9Sstevel@tonic-gatetypedef void (*sigfpe_handler_type)();
17137c478bd9Sstevel@tonic-gate
17147c478bd9Sstevel@tonic-gateextern sigfpe_handler_type sigfpe(sigfpe_code_type, sigfpe_handler_type);
17157c478bd9Sstevel@tonic-gate
17167c478bd9Sstevel@tonic-gateextern void single_to_decimal(single *, decimal_mode *, decimal_record *,
17177c478bd9Sstevel@tonic-gate				fp_exception_field_type *);
17187c478bd9Sstevel@tonic-gate
17197c478bd9Sstevel@tonic-gateextern void double_to_decimal(double *, decimal_mode *, decimal_record *,
17207c478bd9Sstevel@tonic-gate				fp_exception_field_type *);
17217c478bd9Sstevel@tonic-gateextern void extended_to_decimal(extended *, decimal_mode *,
17227c478bd9Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17237c478bd9Sstevel@tonic-gateextern void quadruple_to_decimal(quadruple *, decimal_mode *,
17247c478bd9Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17257c478bd9Sstevel@tonic-gateextern void decimal_to_single(single *, decimal_mode *, decimal_record *,
17267c478bd9Sstevel@tonic-gate				fp_exception_field_type *);
17277c478bd9Sstevel@tonic-gateextern void decimal_to_double(double *, decimal_mode *, decimal_record *,
17287c478bd9Sstevel@tonic-gate				fp_exception_field_type *);
17297c478bd9Sstevel@tonic-gateextern void decimal_to_extended(extended *, decimal_mode *,
17307c478bd9Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17317c478bd9Sstevel@tonic-gateextern void decimal_to_quadruple(quadruple *, decimal_mode *,
17327c478bd9Sstevel@tonic-gate				decimal_record *, fp_exception_field_type *);
17337c478bd9Sstevel@tonic-gateextern void string_to_decimal(char **, int, int, decimal_record *,
17347c478bd9Sstevel@tonic-gate				enum decimal_string_form *, char **);
17357c478bd9Sstevel@tonic-gateextern void func_to_decimal(char **, int, int, decimal_record *,
17367c478bd9Sstevel@tonic-gate				enum decimal_string_form *, char **,
17377c478bd9Sstevel@tonic-gate				int (*)(void), int *, int (*)(int));
17387c478bd9Sstevel@tonic-gateextern void file_to_decimal(char **, int, int, decimal_record *,
17397c478bd9Sstevel@tonic-gate				enum decimal_string_form *, char **,
17407c478bd9Sstevel@tonic-gate				FILE *, int *);
17417c478bd9Sstevel@tonic-gateextern char *seconvert(single *, int, int *, int *, char *);
17427c478bd9Sstevel@tonic-gateextern char *sfconvert(single *, int, int *, int *, char *);
17437c478bd9Sstevel@tonic-gateextern char *sgconvert(single *, int, int, char *);
17447c478bd9Sstevel@tonic-gateextern char *econvert(double, int, int *, int *, char *);
17457c478bd9Sstevel@tonic-gateextern char *fconvert(double, int, int *, int *, char *);
17467c478bd9Sstevel@tonic-gateextern char *gconvert(double, int, int, char *);
17477c478bd9Sstevel@tonic-gateextern char *qeconvert(quadruple *, int, int *, int *, char *);
17487c478bd9Sstevel@tonic-gateextern char *qfconvert(quadruple *, int, int *, int *, char *);
17497c478bd9Sstevel@tonic-gateextern char *qgconvert(quadruple *, int, int, char *);
17507c478bd9Sstevel@tonic-gate
17517c478bd9Sstevel@tonic-gateextern void __assert(const char *, const char *, int);
17527c478bd9Sstevel@tonic-gate
17537c478bd9Sstevel@tonic-gateextern int setjmp(jmp_buf);
17547c478bd9Sstevel@tonic-gateextern void longjmp(jmp_buf, int);
17557c478bd9Sstevel@tonic-gateextern int sigsetjmp(sigjmp_buf, int);
17567c478bd9Sstevel@tonic-gateextern void siglongjmp(sigjmp_buf, int);
17577c478bd9Sstevel@tonic-gate
17587c478bd9Sstevel@tonic-gateint uname(struct utsname *);
17597c478bd9Sstevel@tonic-gateint _uname(struct utsname *);
17607c478bd9Sstevel@tonic-gate
17617c478bd9Sstevel@tonic-gateint errno;
17627c478bd9Sstevel@tonic-gateint *___errno()
17637c478bd9Sstevel@tonic-gate{ return (&errno); }
17647c478bd9Sstevel@tonic-gate
17657c478bd9Sstevel@tonic-gateextern int getloadavg(double [], int);
17667c478bd9Sstevel@tonic-gate
17677c478bd9Sstevel@tonic-gateextern long pcsample(uintptr_t [], long);
17687c478bd9Sstevel@tonic-gate
17697c478bd9Sstevel@tonic-gateint fstat(int, struct stat *);
17707c478bd9Sstevel@tonic-gateint stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
17717c478bd9Sstevel@tonic-gateint lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
17727c478bd9Sstevel@tonic-gateint mknod(const char *, mode_t, dev_t);
17737c478bd9Sstevel@tonic-gate
17747c478bd9Sstevel@tonic-gateextern int __init_daemon_priv(int, uid_t uid, gid_t gid, ...);
17757c478bd9Sstevel@tonic-gateextern void __fini_daemon_priv(const char *, ...);
17767c478bd9Sstevel@tonic-gateextern int __init_suid_priv(int, ...);
17777c478bd9Sstevel@tonic-gateextern int __priv_bracket(priv_op_t);
17787c478bd9Sstevel@tonic-gateextern void __priv_relinquish(void);
17797c478bd9Sstevel@tonic-gateextern const char * __priv_getsetbynum(const void *, int);
17807c478bd9Sstevel@tonic-gateextern char * __priv_set_to_str(void *, const priv_set_t *, char, int);
17817c478bd9Sstevel@tonic-gate
17827c478bd9Sstevel@tonic-gate/* private interface to get the groups list for a certain user */
17837c478bd9Sstevel@tonic-gateint _getgroupsbymember(const char *, gid_t[], int, int);
17847c478bd9Sstevel@tonic-gate
17857c478bd9Sstevel@tonic-gate/* private interface for use only by java */
17867c478bd9Sstevel@tonic-gatevolatile sc_shared_t *volatile *_thr_schedctl(void);
1787ffbafc53Scomay
1788ffbafc53Scomay/* private interface to unmount all autofs mounts */
1789ffbafc53Scomayint _autofssys(enum autofssys_op, void *);
179045916cd2Sjpk
179145916cd2Sjpk/* label.c */
179245916cd2Sjpkextern int is_system_labeled(void);
179348011479Ssn199410
1794cd37da74Snw141292extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *,
1795cd37da74Snw141292	int);
1796cd37da74Snw141292extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int);
1797cd37da74Snw141292extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *,
1798cd37da74Snw141292	int);
1799cd37da74Snw141292extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int);
1800cd37da74Snw141292extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int);
1801cd37da74Snw141292extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int);
1802cd37da74Snw141292extern int u8_validate(char *, size_t, char **, int, int *);
1803cd37da74Snw141292extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
1804cd37da74Snw141292extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
1805cd37da74Snw141292	int *);
1806f7d80b2bSGarrett D'Amore
1807f7d80b2bSGarrett D'Amore/* private locale interfaces */
1808f7d80b2bSGarrett D'Amorewint_t __nextwctype(wint_t, wctype_t);
1809f7d80b2bSGarrett D'Amoreint __iswrune(wint_t);
1810