/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. * Copyright (c) 2013 Gary Mills * Copyright 2014 Garrett D'Amore * Copyright 2015 Circonus, Inc. All rights reserved. * Copyright 2015 Joyent, Inc. */ /* LINTLIBRARY */ /* PROTOLIB1 */ #define __EXTENSIONS__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(__i386) #include #endif #if defined(__amd64) #include #endif #include /* * This really comes from the crt*.s startup modules. */ char **environ; /* * This is a GNU/Linux/BSD compatibility interface, * not declared in any header file. */ const char *__progname; /* * POSIX versions of standard libc routines; these aren't extracted * from the headers above since we cannot #define _POSIX_C_SOURCE. */ int __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD, struct dirent ** _RESTRICT_KYWD); int __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int __posix_getgrnam_r(const char *, struct group *, char *, size_t, struct group **); int __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); int __posix_getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); int __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD); char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD); char *__posix_ctime_r(const time_t *, char *); int __posix_ttyname_r(int, char *, size_t); int __posix_getlogin_r(char *, int); int __posix_getloginx_r(char *, int); /* * XPG4 versions of standard libc routines; these aren't extracted * from the headers above since we cannot #define _XPG4_2. */ int __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int); int __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int); /* * These aren't extracted from the headers above because: * - We cannot #define _STRPTIME_DONTZERO * - We cannot #define _XPG5 */ char *__strptime_dontzero(const char *, const char *, struct tm *); long __sysconf_xpg5(int); wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD); size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t, const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); wint_t __fgetwc_xpg5(__FILE *); wint_t __getwc_xpg5(__FILE *); wint_t __getwchar_xpg5(void); wint_t __fputwc_xpg5(wint_t, __FILE *); wint_t __putwc_xpg5(wint_t, __FILE *); wint_t __putwchar_xpg5(wint_t); wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); wint_t __ungetwc_xpg5(wint_t, __FILE *); /* * /usr/src/lib/libc/port/gen routines */ /* _ctype.c */ /* _loc_data.c */ /* _locale.c */ /* _set_tab.c */ int _set_tab(const char *loc, int cat); /* _xftw.c */ int _xftw(int ver, const char *path, int (*fn)(), int depth); /* a64l.c */ long a64l(const char *); /* abort.c */ void abort(void); /* abs.c */ int abs(int arg); long labs(long int arg); /* assert.c */ void _assert(const char *assertion, const char *filename, int line_num); void __assert_c99(const char *assertion, const char *filename, int line_num, const char *funcname); /* atexit.c */ int atexit(void(*func)()); void _exithandle(void); /* atof.c */ double atof(const char *p); /* atoi.c */ int atoi(const char *p); /* atol.c */ long atol(const char *p); /* basename.c */ char *basename(char *s); /* bcmp.c */ int bcmp(const void *s1, const void *s2, size_t len); /* bcopy.c */ void bcopy(const void *s1, void *s2, size_t len); /* bsearch.c */ void *bsearch(const void *ky, const void *bs, size_t nel, size_t width, int (*compar)()); /* bzero.c */ void bzero(void *sp, size_t len); /* calloc.c */ void *calloc(size_t num, size_t size); /* catclose.c */ int catclose(nl_catd catd); /* catgets.c */ char *catgets(nl_catd catd, int set_num, int msg_num, const char *s); /* catopen.c */ nl_catd catopen(const char *name, int mode); /* cfgetispeed.c */ speed_t cfgetispeed(const struct termios *termios_p); /* cfgetospeed.c */ speed_t cfgetospeed(const struct termios *termios_p); /* cfree.c */ void cfree(void *p, size_t num, size_t size); /* cfsetispeed.c */ int cfsetispeed(struct termios *termios_p, speed_t speed); /* cfsetospeed.c */ int cfsetospeed(struct termios *termios_p, speed_t speed); /* cftime.c */ int cftime(char *buf, char *format, const time_t *t); int ascftime(char *buf, const char *format, const struct tm *tm); /* clock.c */ clock_t clock(void); /* closedir.c */ int closedir(DIR *dirp); /* confstr.c */ size_t confstr(int name, char *buf, size_t length); /* crypt.c */ void setkey(const char *key); void encrypt(char *block, int fake); char *crypt(const char *key, const char *salt); /* csetlen.c */ int csetlen(int cset); int csetcol(int cset); /* ctime.c */ char *ctime(const time_t *t); char *ctime_r(const time_t *, char *buf, int); char *asctime(const struct tm *t); char *asctime_r(const struct tm *, char *, int); /* ctypefcns.c */ int isalpha(int c); int isupper(int c); int islower(int c); int isdigit(int c); int isxdigit(int c); int isalnum(int c); int isspace(int c); int ispunct(int c); int isprint(int c); int isgraph(int c); int iscntrl(int c); int isascii(int c); int _toupper(int c); int _tolower(int c); int toascii(int c); /* daemon.c */ int daemon(int nochdir, int noclose); /* directio.c */ int directio(int filedes, int advice); /* dirname.c */ char *dirname(char *s); /* div.c */ div_t div(int numer, int denom); ldiv_t ldiv(long int numer, long int denom); /* drand48.c */ double drand48(void); double erand48(unsigned short *xsubi); long krand48(unsigned short *xsubi, unsigned int m); long lrand48(void); long mrand48(void); void srand48(long seedval); unsigned short *seed48(unsigned short seed16v[3]); void lcong48(unsigned short param[7]); long nrand48(unsigned short *xsubi); long jrand48(unsigned short *xsubi); /* dup.c */ int dup(int fildes); int dup2(int fildes, int fildes2); int dup3(int fildes, int fildes2, int flags); /* ecvt.c */ char *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt, int *_RESTRICT_KYWDsign); char *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt, int *_RESTRICT_KYWD sign); /* err.c */ void _errfp(FILE *, int, const char *, ...); void _verrfp(FILE *, int, const char *, va_list); void _errxfp(FILE *, int, const char *, ...); void _verrxfp(FILE *, int, const char *, va_list); void _warnfp(FILE *, const char *, ...); void _vwarnfp(FILE *, const char *, va_list); void _warnxfp(FILE *, const char *, ...); void _vwarnxfp(FILE *, const char *, va_list); /* errlst.c */ /* euclen.c */ int euccol(const unsigned char *s); int euclen(const unsigned char *s); int eucscol(const unsigned char *s); /* execvp.c */ /* VARARGS1 */ int execlp(const char *, const char *, ...); int execvp(const char *name, char *const *argv); /* fattach.c */ int fattach(int fildes, const char *path); /* fdetach.c */ int fdetach(const char *path); /* ffs.c */ int ffs(int field); /* flock.c */ int flock(int filedes, int operation); /* fmtmsg.c */ int addseverity(int value, const char *string); int fmtmsg(long class, const char *label, int severity, const char *text, const char *action, const char *tag); /* ftime.c */ int ftime(struct timeb *tp); /* ftok.c */ key_t ftok(const char *path, int id); /* gcvt.c */ char *gcvt(double number, int ndigit, char *buf); /* getcwd.c */ char *getcwd(char *str, size_t size); /* getdate.c */ struct tm *getdate(const char *expression); #ifdef getdate_err #undef getdate_err #endif int getdate_err; /* getdate_data.c */ /* getdate_gd.c */ /* getdtblsize.c */ int getdtablesize(void); /* getenv.c */ char *getenv(const char *name); /* getexecname.c */ const char *getexecname(void); /* getgrnam.c */ struct group *getgrnam(const char *name); struct group *getgrgid(gid_t gid); struct group *fgetgrent_r(FILE *, struct group *, char *, int); struct group *getgrent_r(struct group *, char *, int); struct group *getgrgid_r(gid_t, struct group *, char *, int); struct group *getgrnam_r(const char *, struct group *, char *, int); /* gethostid.c */ long gethostid(void); /* gethz.c */ int gethz(void); /* getisax.c */ uint_t getisax(uint32_t *, uint_t); /* getlogin.c */ char *getloginx(void); char *getloginx_r(char *, int); #ifdef getlogin #undef getlogin #endif /* getlogin */ char *getlogin(void); #ifdef getlogin_r #undef getlogin_r #endif /* getlogin_r */ char *getlogin_r(char *, int); /* getmntent.c */ int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp); int getmntent(FILE *fd, struct mnttab *mp); /* getnetgrent.c */ int setnetgrent(const char *grp); int endnetgrent(void); int getnetgrent(char **machinep, char **namep, char **domainp); /* getopt.c */ int getopt(int argc, char *const *argv, const char *opts); /* getopt_long.c */ int getopt_clip(int argc, char *const *argv, const char *optstring, const struct option *long_options, int *long_index); int getopt_long(int argc, char *const *argv, const char *optstring, const struct option *long_options, int *long_index); int getopt_long_only(int argc, char *const *argv, const char *optstring, const struct option *long_options, int *long_index); /* getpagesize.c */ int getpagesize(void); /* getpw.c */ int getpw(uid_t uid, char *buf); /* getpwnam.c */ struct passwd *getpwnam(const char *name); struct passwd *getpwuid(uid_t uid); struct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int); struct passwd *getpwent_r(struct passwd *, char *, int); struct passwd *getpwnam_r(const char *, struct passwd *, char *, int); struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int); /* getrusage.c */ int getrusage(int who, struct rusage *rusage); /* gettimeofday.c */ int gettimeofday(struct timeval *_RESTRICT_KYWD tp, void *_RESTRICT_KYWD); /* getspent.c */ void setspent(void); void endspent(void); struct spwd *getspent(void); struct spwd *getspent_r(struct spwd *, char *, int); struct spwd *fgetspent(FILE *f); struct spwd *fgetspent_r(FILE *, struct spwd *, char *, int); struct spwd *getspnam(const char *name); struct spwd *getspnam_r(const char *, struct spwd *, char *, int); int putspent(const struct spwd *p, FILE *f); /* getspent_r.c */ int str2spwd(const char *, int, void *, char *, int); /* getsubopt.c */ int getsubopt(char **optionsp, char *const *tokens, char **valuep); /* gettxt.c */ char *gettxt(const char *msg_id, const char *dflt_str); /* getusershell.c */ char *getusershell(void); void endusershell(void); void setusershell(void); /* getut.c */ struct utmp *getutent(void); struct utmp *getutid(const struct utmp *entry); struct utmp *getutline(const struct utmp *entry); struct utmp *pututline(const struct utmp *entry); void setutent(void); void endutent(void); int utmpname(const char *newfile); void updwtmp(const char *file, struct utmp *ut); void getutmp(const struct utmpx *utx, struct utmp *ut); void getutmpx(const struct utmp *ut, struct utmpx *utx); struct utmp *makeut(struct utmp *utmp); /* getutx.c */ struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *entry); struct utmpx *getutxline(const struct utmpx *entry); struct utmpx *pututxline(const struct utmpx *entry); void setutxent(void); void endutxent(void); int utmpxname(const char *newfile); void updwtmpx(const char *filex, struct utmpx *utx); struct utmpx *makeutx(const struct utmpx *utmp); struct utmpx *modutx(const struct utmpx *utp); /* getvfsent.c */ int getvfsspec(FILE *fd, struct vfstab *vp, char *special); int getvfsfile(FILE *fd, struct vfstab *vp, char *mountp); int getvfsany(FILE *fd, struct vfstab *vgetp, struct vfstab *vrefp); int getvfsent(FILE *fd, struct vfstab *vp); /* getwd.c */ char *getwd(char *pathname); /* getwidth.c */ void getwidth(eucwidth_t *eucstruct); /* hsearch.c */ int hcreate(size_t size); void hdestroy(void); ENTRY *hsearch(ENTRY item, ACTION action); /* iconv.c */ size_t iconv(iconv_t cd, const char **_RESTRICT_KYWD inbuf, size_t *_RESTRICT_KYWD inbytesleft, char **_RESTRICT_KYWD outbuf, size_t *_RESTRICT_KYWD outbytesleft); int iconv_close(iconv_t cd); iconv_t iconv_open(const char *tocode, const char *fromcode); /* imaxabs.c */ intmax_t imaxabs(intmax_t j); /* imaxdiv.c */ imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); /* index.c */ char *index(const char *sp, int c); /* initgroups.c */ int initgroups(const char *uname, gid_t agroup); /* innetgr.c */ int innetgr(const char *group, const char *machine, const char *name, const char *domain); /* insque.c */ void insque(void *elem, void *pred); void remque(void *elem); /* isaexec.c */ int isaexec(const char *, char *const *, char *const *); /* isastream.c */ int isastream(int fd); /* isatty.c */ int isatty(int f); /* killpg.c */ int killpg(pid_t pgrp, int sig); /* l64a.c */ char *l64a(long lg); /* lckpwdf.c */ int lckpwdf(void); int ulckpwdf(void); /* lfind.c */ void * lfind(const void *ky, const void *bs, size_t *nelp, size_t width, int (*compar)()); /* localeconv.c */ struct lconv *localeconv(void); /* lsearch.c */ void * lsearch(const void *ky, void *bs, size_t *nelp, size_t width, int (*compar)()); /* madvise.c */ int madvise(caddr_t addr, size_t len, int advice); /* malloc.c */ void *malloc(size_t size); void *realloc(void *old, size_t size); void free(void *old); /* mbstowcs.c */ size_t mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s, size_t n); /* mbtowc.c */ int mbtowc(wchar_t *_RESTRICT_KYWD wchar, const char *_RESTRICT_KYWD s, size_t n); int mblen(const char *s, size_t n); /* memalign.c */ void *memalign(size_t align, size_t nbytes); /* memccpy.c */ void *memccpy(void *_RESTRICT_KYWDs, const void *_RESTRICT_KYWD s0, int c, size_t n); /* memchr.c */ void *memchr(const void *sptr, int c1, size_t n); /* memcmp.c */ int memcmp(const void *s1, const void *s2, size_t n); /* memcpy.c */ void *memcpy(void *_RESTRICT_KYWD s, const void *_RESTRICT_KYWD s0, size_t n); /* memmove.c */ void *memmove(void *s, const void *s0, size_t n); /* memset.c */ void *memset(void *sp1, int c, size_t n); /* mkdev.c */ dev_t __makedev(const int version, const major_t majdev, const minor_t mindev); major_t __major(const int version, const dev_t devnum); minor_t __minor(const int version, const dev_t devnum); /* mkfifo.c */ int mkfifo(const char *path, mode_t mode); /* mktemp.c */ char *mktemp(char *as); /* mlock.c */ int mlock(caddr_t addr, size_t len); /* mlockall.c */ int mlockall(int flags); /* mon.c */ void monitor(int (*alowpc)(), int (*ahighpc)(), WORD *buffer, size_t bufsize, size_t nfunc); /* msync.c */ int msync(caddr_t addr, size_t len, int flags); /* munlock.c */ int munlock(caddr_t addr, size_t len); /* munlockall.c */ int munlockall(void); /* ndbm.c */ void dbm_setdefwrite(DBM *db); int dbm_flush(DBM *db); int dbm_flushpag(DBM *db); DBM *dbm_open(const char *file, int flags, mode_t mode); void dbm_close(DBM *db); int dbm_close_status(DBM *db); datum dbm_fetch(DBM *db, datum key); int dbm_delete(DBM *db, datum key); int dbm_store(DBM *db, datum key, datum dat, int replace); datum dbm_firstkey(DBM *db); datum dbm_nextkey(DBM *db); datum dbm_do_nextkey(DBM *db, datum inkey); /* new_list.c */ /* nftw.c */ int nftw(const char *path, int (*fn)(), int depth, int flags); /* nl_langinfo.c */ char *nl_langinfo(nl_item item); /* opendir.c */ DIR *opendir(const char *filename); /* opt_data.c */ /* perror.c */ void perror(const char *s); /* pipe.c */ int pipe(int *fds); /* psiginfo.c */ void psiginfo(const siginfo_t *sip, const char *s); /* psignal.c */ void psignal(int sig, const char *s); /* pt.c */ char *ptsname(int fd); int unlockpt(int fd); int grantpt(int fd); /* putenv.c */ int putenv(char *change); int setenv(const char *envname, const char *envval, int overwrite); int unsetenv(const char *name); /* putpwent.c */ int putpwent(const struct passwd *p, FILE *f); /* qsort.c */ void qsort(void *base, size_t n, size_t size, int (*compar)()); /* raise.c */ int raise(int sig); /* rand.c */ void srand(unsigned x); int rand(void); int rand_r(unsigned int *); /* random.c */ void srandom(unsigned x); char *initstate(unsigned seed, char *arg_state, size_t n); char *setstate(const char *arg_state); long random(void); /* rctlops.c */ int rctl_walk(int (*callback)(const char *, void *), void *walk_data); hrtime_t rctlblk_get_firing_time(rctlblk_t *rblk); uint_t rctlblk_get_global_action(rctlblk_t *rblk); uint_t rctlblk_get_global_flags(rctlblk_t *rblk); uint_t rctlblk_get_local_action(rctlblk_t *rblk, int *signalp); uint_t rctlblk_get_local_flags(rctlblk_t *rblk); id_t rctlblk_get_recipient_pid(rctlblk_t *rblk); rctl_priv_t rctlblk_get_privilege(rctlblk_t *rblk); rctl_qty_t rctlblk_get_value(rctlblk_t *rblk); void rctlblk_set_local_action(rctlblk_t *rblk, uint_t action, int signal); void rctlblk_set_local_flags(rctlblk_t *rblk, uint_t flags); void rctlblk_set_privilege(rctlblk_t *rblk, rctl_priv_t priv); void rctlblk_set_value(rctlblk_t *rblk, rctl_qty_t val); size_t rctlblk_size(void); /* readdir.c */ struct dirent *readdir(DIR *dirp); /* realpath.c */ char *realpath(const char *_RESTRICT_KYWD raw, char *_RESTRICT_KYWD canon); /* regexpr.c */ char *re_comp(const char *sp); int re_exec(const char *p1); /* rindex.c */ char *rindex(const char *sp, int c); /* rename.c */ int remove(const char *filename); int rename(const char *old, const char *new); /* rewinddir.c */ #undef rewinddir void rewinddir(DIR *dirp); /* scandir.c */ int alphasort(const struct dirent **, const struct dirent **); int scandir(const char *dirname, struct dirent *(*namelist[]), int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)); /* scrwidth.c */ int scrwidth(wchar_t c); /* seekdir.c */ void seekdir(DIR *dirp, long loc); /* select.c */ int pselect(int nfds, fd_set *_RESTRICT_KYWD readfds, fd_set *_RESTRICT_KYWD writefds, fd_set *_RESTRICT_KYWD errorfds, const struct timespec *_RESTRICT_KYWD timeout, const sigset_t *_RESTRICT_KYWD sigmask); int select(int nfds, fd_set *_RESTRICT_KYWD readfds, fd_set *_RESTRICT_KYWD writefds, fd_set *_RESTRICT_KYWD errorfds, struct timeval *_RESTRICT_KYWD timeout); /* setlocale.c */ char *setlocale(int cat, const char *loc); /* setpriority.c */ int getpriority(int which, id_t who); int setpriority(int which, id_t who, int prio); /* settimeofday.c */ int settimeofday(struct timeval *tp, void *); /* sigflag.c */ int sigflag(int sig, int flag, int on); /* siglist.c */ /* sigsend.c */ int sigsend(idtype_t idtype, id_t id, int sig); /* sigsetops.c */ int sigfillset(sigset_t *set); int sigemptyset(sigset_t *set); int sigaddset(sigset_t *set, int sig); int sigdelset(sigset_t *set, int sig); int sigismember(const sigset_t *set, int sig); /* scalls.c */ unsigned sleep(unsigned sleep_tm); /* ssignal.c */ int (*ssignal(int sig, int (*fn)())) (); int gsignal(int sig); /* str2id.c */ /* str2sig.c */ int str2sig(const char *s, int *sigp); int sig2str(int i, char *s); /* strcat.c */ char *strcat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2); /* strchr.c */ char *strchr(const char *sp, int c); /* strcmp.c */ int strcmp(const char *s1, const char *s2); /* strcpy.c */ char *strcpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2); /* strcspn.c */ size_t strcspn(const char *string, const char *charset); /* strdup.c */ char *strdup(const char *s1); /* strerror.c */ char *strerror(int errnum); int strerror_r(int errnum, char *strerrbuf, size_t buflen); /* strftime.c */ size_t strftime(char *_RESTRICT_KYWD s, size_t maxsize, const char *_RESTRICT_KYWD format, const struct tm *_RESTRICT_KYWD tm); /* strlen.c */ size_t strlen(const char *s); /* strncat.c */ char *strncat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n); /* strncmp.c */ int strncmp(const char *s1, const char *s2, size_t n); /* strncpy.c */ char *strncpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n); /* strpbrk.c */ char *strpbrk(const char *string, const char *brkset); /* strrchr.c */ char *strrchr(const char *sp, int c); /* strsep.c */ char *strsep(char **stringp, const char *delim); /* strspn.c */ size_t strspn(const char *string, const char *charset); /* strstr.c */ char *strstr(const char *as1, const char *as2); /* strtod.c */ double strtod(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr); float strtof(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr); long double strtold(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr); /* strtoimax.c */ intmax_t strtoimax(const char *_RESTRICT_KYWD nptr, char **_RESTRICT_KYWD endptr, int base); /* strtok.c */ char *strtok(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD sepset); char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD); /* strtol.c */ long strtol(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr, int base); /* strtoul.c */ unsigned long strtoul(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr, int base); /* strtoumax.c */ uintmax_t strtoumax(const char *_RESTRICT_KYWD nptr, char **_RESTRICT_KYWD endptr, int base); /* strxfrm.c */ size_t strxfrm(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n); int strcoll(const char *s1, const char *s2); /* swab.c */ void swab(const char *_RESTRICT_KYWD from, char *_RESTRICT_KYWD to, ssize_t n); /* swapctl.c */ int swapctl(int cmd, void *arg); /* sysconf.c */ long sysconf(int name); /* syslog.c */ /* VARARGS2 */ void syslog(int pri, const char *fmt, ...); void vsyslog(int pri, const char *fmt, va_list ap); void openlog(const char *ident, int logstat, int logfac); void closelog(void); int setlogmask(int pmask); /* tcdrain.c */ int tcdrain(int fildes); /* tcflow.c */ int tcflow(int fildes, int action); /* tcflush.c */ int tcflush(int fildes, int queue_selector); /* tcgetattr.c */ int tcgetattr(int fildes, struct termios *termios_p); /* tcgetpgrp.c */ pid_t tcgetpgrp(int fd); /* tcgetsid.c */ pid_t tcgetsid(int fd); /* tcsendbreak.c */ int tcsendbreak(int fildes, int duration); /* tcsetattr.c */ int tcsetattr(int fildes, int optional_actions, const struct termios *termios_p); /* tcsetpgrp.c */ int tcsetpgrp(int fd, pid_t pgrp); /* tell.c */ long tell(int f); /* telldir.c */ long telldir(DIR *dirp); /* tfind.c */ void *tfind(const void *ky, void *const *rtp, int (*compar)()); /* time_comm.c */ struct tm *localtime(const time_t *timep); struct tm *localtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD); struct tm *gmtime(const time_t *clock); struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD); double difftime(time_t time1, time_t time0); time_t mktime(struct tm *timeptr); void _ltzset(time_t tim); void tzset(void); /* time_data.c */ /* time_gdata.c */ /* tolower.c */ int tolower(int c); /* toupper.c */ int toupper(int c); /* truncate.c */ int ftruncate(int fildes, off_t len); int truncate(const char *path, off_t len); /* tsearch.c */ void *tsearch(const void *ky, void **rtp, int (*compar)()); void *tdelete(const void *ky, void **rtp, int (*compar)()); void twalk(const void *rt, void (*action)()); /* ttyname.c */ char *ttyname(int f); char *_ttyname_dev(dev_t rdev, char *buffer, size_t buflen); char *ttyname_r(int, char *, int); /* ttyslot.c */ int ttyslot(void); /* ualarm.c */ unsigned ualarm(unsigned usecs, unsigned reload); /* ulimit.c */ /* VARARGS1 */ long ulimit(int cmd, ...); /* scalls.c */ int usleep(unsigned n); /* valloc.c */ void *valloc(size_t size); /* waitpid.c */ pid_t wait(int *stat_loc); pid_t waitpid(pid_t pid, int *stat_loc, int options); pid_t wait3(int *status, int options, struct rusage *rp); pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage); /* wcstombs.c */ size_t wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs, size_t n); /* wctomb.c */ int wctomb(char *s, wchar_t wchar); /* wdata.c */ /* wisprint.c */ int wisprint(wchar_t c); /* xgetwidth.c */ void _xgetwidth(void); /* * /usr/src/lib/libc/port/intl routines */ /* gettext.c */ char *bindtextdomain(const char *domain, const char *binding); char *dcgettext(const char *domain, const char *msg_id, const int category); char *dgettext(const char *domain, const char *msg_id); char *gettext(const char *msg_id); char *textdomain(const char *domain); /* * /usr/src/lib/libc/port/print routines */ /* fprintf.c */ /* VARARGS2 */ int fprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, ...); /* printf.c */ /* VARARGS1 */ int printf(const char *_RESTRICT_KYWD format, ...); /* snprintf.c */ /* VARARGS2 */ int snprintf(char *_RESTRICT_KYWD string, size_t n, const char *_RESTRICT_KYWD format, ...); /* sprintf.c */ /* VARARGS2 */ int sprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format, ...); /* vfprintf.c */ /* VARARGS2 */ int vfprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, va_list); /* vprintf.c */ /* VARARGS1 */ int vprintf(const char *_RESTRICT_KYWD format, va_list); /* vsnprintf.c */ /* VARARGS2 */ int vsnprintf(char *_RESTRICT_KYWD string, size_t n, const char *_RESTRICT_KYWD format, va_list); /* vsprintf.c */ /* VARARGS2 */ int vsprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format, va_list); /* * /usr/src/lib/libc/port/regex routines */ /* glob.c */ extern int glob(const char *restrict pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *restrict pglob); extern void globfree(glob_t *pglob); /* regex.c */ char *regex(const char *regexp, const char *stringp, ...); #ifdef __loc1 #undef __loc1 #endif char *__loc1; /* regcmp.c */ char *regcmp(const char *regexp, ...); #ifdef __i_size #undef __i_size #endif int __i_size; /* * /usr/src/lib/libc/port/stdio routines */ /* _filbuf.c */ int _filbuf(FILE *iop); /* _flsbuf.c */ int _flsbuf(int ch, FILE *iop); /* _wrtchk.c */ int _wrtchk(FILE *iop); /* clearerr.c */ void clearerr(FILE *iop); /* ctermid.c */ char *ctermid(char *s); char *ctermid_r(char *s); /* cuserid.c */ char *cuserid(char *s); /* data.c */ /* doscan.c */ int _doscan(FILE *iop, const char *fmt, va_list va_alist); /* fdopen.c */ FILE *fdopen(int fd, const char *type); /* feof.c */ int feof(FILE *iop); /* ferror.c */ int ferror(FILE *iop); /* fgetc.c */ int fgetc(FILE *iop); /* fgets.c */ char *fgets(char *_RESTRICT_KYWD buf, int size, FILE *_RESTRICT_KYWD iop); /* fileno.c */ int _fileno(FILE *iop); /* flush.c */ void _cleanup(void); FILE *_findiop(void); typedef unsigned char Uchar; void _setbufend(FILE *iop, Uchar *end); Uchar *_realbufend(FILE *iop); void _bufsync(FILE *iop, Uchar *bufend); int _xflsbuf(FILE *iop); int fflush(FILE *iop); int fclose(FILE *iop); /* fopen.c */ FILE *fopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type); FILE *freopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type, FILE *_RESTRICT_KYWD iop); /* fpos.c */ int fgetpos(FILE *_RESTRICT_KYWD stream, fpos_t *_RESTRICT_KYWD pos); int fsetpos(FILE *stream, const fpos_t *pos); /* fputc.c */ int fputc(int ch, FILE *iop); /* fputs.c */ int fputs(const char *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop); /* fread.c */ size_t fread(void *_RESTRICT_KYWD ptr, size_t size, size_t count, FILE *_RESTRICT_KYWD iop); /* fseek.c */ int fseek(FILE *iop, long offset, int ptrname); /* ftell.c */ long ftell(FILE *iop); /* fwrite.c */ size_t fwrite(const void *_RESTRICT_KYWD ptr1, size_t size, size_t count, FILE *_RESTRICT_KYWD iop); /* getc.c */ int getc(FILE *iop); /* getchar.c */ int getchar(void); /* getpass.c */ char *getpass(const char *prompt); /* getpass.c */ char *getpassphrase(const char *prompt); /* gets.c */ char *gets(char *buf); /* getw.c */ int getw(FILE *stream); /* popen.c */ FILE *popen(const char *cmd, const char *mode); int pclose(FILE *ptr); /* putc.c */ int putc(int ch, FILE *iop); /* putchar.c */ int putchar(int ch); /* puts.c */ int puts(const char *ptr); /* putw.c */ int putw(int w, FILE *stream); /* rewind.c */ void rewind(FILE *iop); /* scanf.c */ /* VARARGS1 */ int scanf(const char *_RESTRICT_KYWD fmt, ...); /* VARARGS2 */ int fscanf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD fmt, ...); /* VARARGS2 */ int sscanf(const char *_RESTRICT_KYWD str, const char *_RESTRICT_KYWD fmt, ...); /* setbuf.c */ void setbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf); /* setvbuf.c */ int setvbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf, int type, size_t size); /* system.c */ int system(const char *s); /* tempnam.c */ char *tempnam(const char *dir, const char *pfx); /* tmpfile.c */ FILE *tmpfile(void); /* tmpnam.c */ char *tmpnam(char *s); char *tmpnam_r(char *); /* ungetc.c */ int ungetc(int c, FILE *iop); /* * /usr/src/lib/libc/port/sys routines */ /* exacctsys.c */ size_t getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize); int putacct(idtype_t idtype, id_t id, void *buf, size_t bufsize, int flags); int wracct(idtype_t idtype, id_t id, int flags); /* execl.c */ /* VARARGS1 */ int execl(const char *name, const char *, ...); /* execle.c */ int execle(const char *, const char *file, ...); /* execv.c */ int execv(const char *file, char *const *argv); /* lockf.c */ int lockf(int fildes, int function, off_t size); /* meminfosys.c */ int meminfo(const uint64_t *inaddr, int addr_count, const uint_t *info_req, int info_count, uint64_t *outdata, uint_t *validity); /* msgsys.c */ int msgget(key_t key, int msgflg); int msgctl(int msqid, int cmd, struct msqid_ds *buf); ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); /* nfssys.c */ /* int exportfs(char *dir, struct export *ep); int nfs_getfh(char *path, fhandle_t *fhp); int nfssvc(int fd); */ /* psetsys.c */ int pset_create(psetid_t *npset); int pset_destroy(psetid_t pset); int pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset); int pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset); int pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist); int pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset); int pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset); /* rctlsys.c */ int getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk, int flags); int setrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk, int flags); /* (private functions) */ int setprojrctl(const char *name, rctlblk_t *new_rblk, size_t size, int flags); int rctlctl(const char *, rctlblk_t *, int); size_t rctllist(char *, size_t); /* semsys.c */ int semctl(int semid, int semnum, int cmd, ...); int semget(key_t key, int nsems, int semflg); int semop(int semid, struct sembuf *sops, size_t nsops); /* shmsys.c */ void *shmat(int shmid, const void *shmaddr, int shmflg); int shmctl(int shmid, int cmd, struct shmid_ds *buf); #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) int shmdt(const void *); #else int shmdt(char *); #endif /* defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) */ int shmget(key_t key, size_t size, int shmflg); /* tasksys.c */ taskid_t settaskid(projid_t project, uint_t flags); taskid_t gettaskid(void); projid_t getprojid(void); /* * /usr/src/lib/libc/port/widec routines */ /* fgetws.c */ wchar_t *fgetws(wchar_t *_RESTRICT_KYWD ptr, int size, FILE *_RESTRICT_KYWD iop); /* fputwc.c */ wint_t fputwc(wint_t wc, FILE *iop); wint_t putwc(wint_t wc, FILE *iop); /* fputws.c */ int fputws(const wchar_t *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop); /* getwchar.c */ wint_t getwchar(void); /* getwidth.c */ void getwidth(eucwidth_t *eucstruct); /* getws.c */ wchar_t *getws(wchar_t *ptr); /* iswctype.c */ int iswctype(wint_t wc, wctype_t charclass); int iswalpha(wint_t c); int iswupper(wint_t c); int iswlower(wint_t c); int iswdigit(wint_t c); int iswxdigit(wint_t c); int iswalnum(wint_t c); int iswspace(wint_t c); int iswpunct(wint_t c); int iswprint(wint_t c); int iswgraph(wint_t c); int iswcntrl(wint_t c); int isphonogram(wint_t c); int isideogram(wint_t c); int isenglish(wint_t c); int isnumber(wint_t c); int isspecial(wint_t c); /* libwcollate.c */ /* putwchar.c */ wint_t putwchar(wint_t c); /* putws.c */ int putws(const wchar_t *ptr); /* scrwidth.c */ /* strtows.c */ wchar_t *strtows(wchar_t *s1, char *s2); char *wstostr(char *s1, wchar_t *s2); /* trwctype.c */ wint_t towupper(wint_t c); wint_t towlower(wint_t c); /* ungetwc.c */ wint_t ungetwc(wint_t wc, FILE *iop); /* wcollate.c */ size_t wcsxfrm(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2, size_t n); int wcscoll(const wchar_t *s1, const wchar_t *s2); /* wcsftime.c */ #if !defined(__amd64) /* XX64 - fix me */ size_t wcsftime(wchar_t *wcs, size_t maxsize, const char *format, const struct tm *timeptr); #endif /* __amd64 */ /* wcstring.c */ wint_t fgetwc(FILE *iop); wint_t getwc(FILE *iop); int wcwidth(wchar_t wc); int wcswidth(const wchar_t *pwcs, size_t n); /* wcswcs.c */ wchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2); /* wcsxfrm.c - empty file! */ /* wcsxfrm.xpg4.c */ /* wisprint.c */ int wisprint(wchar_t c); /* wscasecmp.c */ int wscasecmp(const wchar_t *s1, const wchar_t *s2); /* wscat.c */ wchar_t *wcscat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2); wchar_t *wscat(wchar_t *s1, const wchar_t *s2); /* wschr.c */ wchar_t *wcschr(const wchar_t *sp, wchar_t c); wchar_t *wschr(const wchar_t *sp, wchar_t c); /* wscmp.c */ int wcscmp(const wchar_t *s1, const wchar_t *s2); int wscmp(const wchar_t *s1, const wchar_t *s2); /* wscol.c */ int wscol(const wchar_t *s1); /* wscpy.c */ wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2); wchar_t *wscpy(wchar_t *s1, const wchar_t *s2); /* wscspn.c */ size_t wcscspn(const wchar_t *string, const wchar_t *charset); size_t wscspn(const wchar_t *string, const wchar_t *charset); /* wsdup.c */ wchar_t *wsdup(const wchar_t *s1); /* wslen.c */ size_t wcslen(const wchar_t *s); size_t wslen(const wchar_t *s); /* wsncasecmp.c */ int wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n); /* wsncat.c */ wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2, size_t n); wchar_t *wsncat(wchar_t *s1, const wchar_t *s2, size_t n); /* wsncmp.c */ int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); int wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); /* wsncpy.c */ wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2, size_t n); wchar_t *wsncpy(wchar_t *s1, const wchar_t *s2, size_t n); /* wspbrk.c */ wchar_t *wcspbrk(const wchar_t *string, const wchar_t *brkset); wchar_t *wspbrk(const wchar_t *string, const wchar_t *brkset); /* wsprintf.c */ int wsprintf(wchar_t *wstring, const char *format, ...); /* wsrchr.c */ wchar_t *wcsrchr(const wchar_t *sp, wchar_t c); wchar_t *wsrchr(const wchar_t *sp, wchar_t c); /* wsscanf.c */ int wsscanf(wchar_t *s, const char *format, ...); /* wssize.c */ /* wsspn.c */ size_t wcsspn(const wchar_t *string, const wchar_t *charset); size_t wsspn(const wchar_t *string, const wchar_t *charset); /* wstod.c */ double wcstod(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr); float wcstof(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr); long double wcstold(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr); double wstod(const wchar_t *cp, wchar_t **ptr); /* wstok.c */ #if !defined(__amd64) /* XX64 - fix me */ wchar_t *wcstok(wchar_t *string, const wchar_t *sepset); wchar_t *wstok(wchar_t *string, const wchar_t *sepset); #endif /* __amd64 */ /* wcstol.c */ long wcstol(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base); long long wcstoll(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base); /* wcstoul.c */ unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base); unsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base); /* wcstoimax.c */ intmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD nptr, wchar_t **_RESTRICT_KYWD endptr, int base); uintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD nptr, wchar_t **_RESTRICT_KYWD endptr, int base); /* wstol.c */ long wstol(const wchar_t *str, wchar_t **ptr, int base); /* wstoll.c */ long long wstoll(const wchar_t *str, wchar_t **ptr, int base); long long watoll(const wchar_t *p); /* wsxfrm.c */ size_t wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n); int wscoll(const wchar_t *s1, const wchar_t *s2); /* * /usr/src/lib/libc/port/gen/event_port.c */ int port_dispatch(int port, int flags, int source, int events, uintptr_t object, void *user); /* * /usr/src/lib/libc/$MACH/gen routines */ /* alloca.s */ void *__builtin_alloca(size_t); /* * modctl(int arg, ...) and utssys(...) are not available from a header * file, but our utilities which make use of it should be able to be * lint clean. */ int modctl(int arg, ...); int utssys(void *buf, int arg, int type, void *outbp); typedef float single; typedef unsigned extended[3]; typedef long double quadruple; typedef unsigned fp_exception_field_type; typedef char decimal_string[512]; enum fp_class_type { fp_zero = 0, fp_subnormal = 1, fp_normal = 2, fp_infinity = 3, fp_quiet = 4, fp_signaling = 5 }; enum fp_direction_type { fp_nearest = 0, fp_tozero = 1, fp_positive = 2, fp_negative = 3 }; typedef struct { enum fp_class_type fpclass; int sign; int exponent; decimal_string ds; int more; int ndigits; } decimal_record; enum decimal_form { fixed_form, floating_form }; typedef struct { enum fp_direction_type rd; enum decimal_form df; int ndigits; } decimal_mode; enum decimal_string_form { invalid_form, whitespace_form, fixed_int_form, fixed_intdot_form, fixed_dotfrac_form, fixed_intdotfrac_form, floating_int_form, floating_intdot_form, floating_dotfrac_form, floating_intdotfrac_form, inf_form, infinity_form, nan_form, nanstring_form }; typedef int sigfpe_code_type; typedef void (*sigfpe_handler_type)(); extern sigfpe_handler_type sigfpe(sigfpe_code_type, sigfpe_handler_type); extern void single_to_decimal(single *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void double_to_decimal(double *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void extended_to_decimal(extended *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void quadruple_to_decimal(quadruple *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void decimal_to_single(single *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void decimal_to_double(double *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void decimal_to_extended(extended *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void decimal_to_quadruple(quadruple *, decimal_mode *, decimal_record *, fp_exception_field_type *); extern void string_to_decimal(char **, int, int, decimal_record *, enum decimal_string_form *, char **); extern void func_to_decimal(char **, int, int, decimal_record *, enum decimal_string_form *, char **, int (*)(void), int *, int (*)(int)); extern void file_to_decimal(char **, int, int, decimal_record *, enum decimal_string_form *, char **, FILE *, int *); extern char *seconvert(single *, int, int *, int *, char *); extern char *sfconvert(single *, int, int *, int *, char *); extern char *sgconvert(single *, int, int, char *); extern char *econvert(double, int, int *, int *, char *); extern char *fconvert(double, int, int *, int *, char *); extern char *gconvert(double, int, int, char *); extern char *qeconvert(quadruple *, int, int *, int *, char *); extern char *qfconvert(quadruple *, int, int *, int *, char *); extern char *qgconvert(quadruple *, int, int, char *); extern void __assert(const char *, const char *, int); extern int setjmp(jmp_buf); extern void longjmp(jmp_buf, int); extern int sigsetjmp(sigjmp_buf, int); extern void siglongjmp(sigjmp_buf, int); int uname(struct utsname *); int _uname(struct utsname *); int errno; int *___errno() { return (&errno); } extern int getloadavg(double [], int); extern long pcsample(uintptr_t [], long); int fstat(int, struct stat *); int stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD); int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD); int mknod(const char *, mode_t, dev_t); extern int __init_daemon_priv(int, uid_t uid, gid_t gid, ...); extern void __fini_daemon_priv(const char *, ...); extern int __init_suid_priv(int, ...); extern int __priv_bracket(priv_op_t); extern void __priv_relinquish(void); extern const char * __priv_getsetbynum(const void *, int); extern char * __priv_set_to_str(void *, const priv_set_t *, char, int); /* private interface to get the groups list for a certain user */ int _getgroupsbymember(const char *, gid_t[], int, int); /* private interface for use only by java */ volatile sc_shared_t *volatile *_thr_schedctl(void); /* private interface to unmount all autofs mounts */ int _autofssys(enum autofssys_op, void *); /* label.c */ extern int is_system_labeled(void); extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *, int); extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int); extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *, int); extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int); extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int); extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int); extern int u8_validate(char *, size_t, char **, int, int *); extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, int *); /* private locale interfaces */ wint_t __nextwctype(wint_t, wctype_t); int __iswrune(wint_t);