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 5494a4c51Sraf * Common Development and Distribution License (the "License"). 6494a4c51Sraf * 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 */ 210ec57554Sraf 227c478bd9Sstevel@tonic-gate /* 23a574db85Sraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate /* 287c478bd9Sstevel@tonic-gate * This is where all the interfaces that are internal to libc 297c478bd9Sstevel@tonic-gate * which do not have a better home live 307c478bd9Sstevel@tonic-gate */ 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifndef _LIBC_H 337c478bd9Sstevel@tonic-gate #define _LIBC_H 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate #include <thread.h> 387c478bd9Sstevel@tonic-gate #include <stdio.h> 39494a4c51Sraf #include <dirent.h> 407c478bd9Sstevel@tonic-gate #include <ucontext.h> 417c478bd9Sstevel@tonic-gate #include <nsswitch.h> 427c478bd9Sstevel@tonic-gate #include <stddef.h> 437c478bd9Sstevel@tonic-gate #include <poll.h> 447c478bd9Sstevel@tonic-gate #include <sys/dl.h> 457c478bd9Sstevel@tonic-gate #include <sys/door.h> 467c478bd9Sstevel@tonic-gate #include <sys/ieeefp.h> 477c478bd9Sstevel@tonic-gate #include <sys/mount.h> 487c478bd9Sstevel@tonic-gate #include <floatingpoint.h> 497c478bd9Sstevel@tonic-gate #include <nl_types.h> 507c478bd9Sstevel@tonic-gate #include <regex.h> 517c478bd9Sstevel@tonic-gate #include <stdarg.h> 527c478bd9Sstevel@tonic-gate #include <wchar.h> 537c478bd9Sstevel@tonic-gate #include <wctype.h> 54*d8ac9b2dSmarks #include <libnvpair.h> 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate #ifdef __cplusplus 577c478bd9Sstevel@tonic-gate extern "C" { 587c478bd9Sstevel@tonic-gate #endif 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate extern void __set_panicstr(const char *); 617c478bd9Sstevel@tonic-gate extern void _rewind_unlocked(FILE *); 627c478bd9Sstevel@tonic-gate extern int _rename(const char *, const char *); 637c478bd9Sstevel@tonic-gate extern long _sysconfig(int); 647c478bd9Sstevel@tonic-gate extern int kill(pid_t pid, int sig); 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate extern int primary_link_map; 677c478bd9Sstevel@tonic-gate extern int thr_main(void); 687c478bd9Sstevel@tonic-gate extern int thr_kill(thread_t tid, int sig); 697c478bd9Sstevel@tonic-gate extern thread_t thr_self(void); 707c478bd9Sstevel@tonic-gate extern int mutex_lock(mutex_t *mp); 717c478bd9Sstevel@tonic-gate extern int mutex_unlock(mutex_t *mp); 7298c1a6b4Sraf extern void callout_lock_enter(void); 7398c1a6b4Sraf extern void callout_lock_exit(void); 747c478bd9Sstevel@tonic-gate extern void *lmalloc(size_t); 757c478bd9Sstevel@tonic-gate extern void lfree(void *, size_t); 76*d8ac9b2dSmarks extern void libc_nvlist_free(nvlist_t *); 77*d8ac9b2dSmarks extern int libc_nvlist_lookup_uint64(nvlist_t *, const char *, uint64_t *); 787c478bd9Sstevel@tonic-gate extern void *libc_malloc(size_t); 797c478bd9Sstevel@tonic-gate extern void *libc_realloc(void *, size_t); 807c478bd9Sstevel@tonic-gate extern void libc_free(void *); 817c478bd9Sstevel@tonic-gate extern char *libc_strdup(const char *); 827c478bd9Sstevel@tonic-gate extern int _sigwait(sigset_t *); 837c478bd9Sstevel@tonic-gate extern int _thr_getspecific(thread_key_t key, void **valuep); 847c478bd9Sstevel@tonic-gate extern int _thr_setspecific(unsigned int key, void *value); 857c478bd9Sstevel@tonic-gate extern int _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)); 86cb620785Sraf extern int _thr_keycreate_once(thread_key_t *pkey, void (*destructor)(void *)); 877c478bd9Sstevel@tonic-gate extern void *_pthread_getspecific(thread_key_t); 887c478bd9Sstevel@tonic-gate extern int _pollsys(struct pollfd *, nfds_t, const timespec_t *, 897c478bd9Sstevel@tonic-gate const sigset_t *); 907c478bd9Sstevel@tonic-gate extern void _private_testcancel(void); 917c478bd9Sstevel@tonic-gate 92494a4c51Sraf /* 93494a4c51Sraf * The private_DIR structure is the same as the DIR structure, 94494a4c51Sraf * with the addition of a mutex lock for libc's internal use. 95494a4c51Sraf */ 96494a4c51Sraf typedef struct { 97494a4c51Sraf DIR dd_dir; 98494a4c51Sraf mutex_t dd_lock; 99494a4c51Sraf } private_DIR; 100494a4c51Sraf 1017c478bd9Sstevel@tonic-gate #if !defined(_LP64) 1027c478bd9Sstevel@tonic-gate /* 1037c478bd9Sstevel@tonic-gate * getdents64 transitional interface is intentionally internal to libc 1047c478bd9Sstevel@tonic-gate */ 1057c478bd9Sstevel@tonic-gate extern int getdents64(int, struct dirent64 *, size_t); 1067c478bd9Sstevel@tonic-gate #endif 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate extern int _scrwidth(wchar_t); 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate extern int64_t __div64(int64_t, int64_t); 1117c478bd9Sstevel@tonic-gate extern int64_t __rem64(int64_t, int64_t); 1127c478bd9Sstevel@tonic-gate extern uint64_t __udiv64(uint64_t, uint64_t); 1137c478bd9Sstevel@tonic-gate extern uint64_t __urem64(uint64_t, uint64_t); 1147c478bd9Sstevel@tonic-gate extern int64_t __mul64(int64_t, int64_t); 1157c478bd9Sstevel@tonic-gate extern uint64_t __umul64(uint64_t, uint64_t); 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /* 1197c478bd9Sstevel@tonic-gate * Rounding direction functions 1207c478bd9Sstevel@tonic-gate */ 1217c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64) 1227c478bd9Sstevel@tonic-gate extern enum fp_direction_type __xgetRD(void); 1237c478bd9Sstevel@tonic-gate #elif defined(__sparc) 1247c478bd9Sstevel@tonic-gate extern enum fp_direction_type _QgetRD(void); 1257c478bd9Sstevel@tonic-gate #else 1267c478bd9Sstevel@tonic-gate #error Unknown architecture! 1277c478bd9Sstevel@tonic-gate #endif 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate /* 1317c478bd9Sstevel@tonic-gate * defined in hex_bin.c 1327c478bd9Sstevel@tonic-gate */ 1337c478bd9Sstevel@tonic-gate extern void __hex_to_single(decimal_record *, enum fp_direction_type, 1347c478bd9Sstevel@tonic-gate single *, fp_exception_field_type *); 1357c478bd9Sstevel@tonic-gate extern void __hex_to_double(decimal_record *, enum fp_direction_type, 1367c478bd9Sstevel@tonic-gate double *, fp_exception_field_type *); 1377c478bd9Sstevel@tonic-gate #if defined(__sparc) 1387c478bd9Sstevel@tonic-gate extern void __hex_to_quadruple(decimal_record *, enum fp_direction_type, 1397c478bd9Sstevel@tonic-gate quadruple *, fp_exception_field_type *); 1407c478bd9Sstevel@tonic-gate #elif defined(__i386) || defined(__amd64) 1417c478bd9Sstevel@tonic-gate extern void __hex_to_extended(decimal_record *, enum fp_direction_type, 1427c478bd9Sstevel@tonic-gate extended *, fp_exception_field_type *); 1437c478bd9Sstevel@tonic-gate #else 1447c478bd9Sstevel@tonic-gate #error Unknown architecture 1457c478bd9Sstevel@tonic-gate #endif 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate /* 1487c478bd9Sstevel@tonic-gate * defined in ctime.c 1497c478bd9Sstevel@tonic-gate */ 1507c478bd9Sstevel@tonic-gate extern char *__posix_asctime_r(const struct tm *, char *); 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate /* 1537c478bd9Sstevel@tonic-gate * Internal routine from fsync.c 1547c478bd9Sstevel@tonic-gate */ 1557c478bd9Sstevel@tonic-gate extern int __fdsync(int, int); /* 2nd arg may be wrong in 64bit mode */ 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate /* 1587c478bd9Sstevel@tonic-gate * Internal routine from _xregs_clrptr.c 1597c478bd9Sstevel@tonic-gate */ 1607c478bd9Sstevel@tonic-gate extern void _xregs_clrptr(ucontext_t *); 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate /* 1637c478bd9Sstevel@tonic-gate * Internal routine from nfssys.c 1647c478bd9Sstevel@tonic-gate */ 1657c478bd9Sstevel@tonic-gate extern int _nfssys(int, void *); /* int in 64bit mode ???, void * ??? */ 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate /* 1687c478bd9Sstevel@tonic-gate * Internal routine from psetsys.c 1697c478bd9Sstevel@tonic-gate */ 1707c478bd9Sstevel@tonic-gate extern int _pset(int, ...); /* int in 64bit mode ??? */ 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate /* 1737c478bd9Sstevel@tonic-gate * defined in sigpending.s 1747c478bd9Sstevel@tonic-gate */ 1757c478bd9Sstevel@tonic-gate extern int __sigfillset(sigset_t *); 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate /* 1787c478bd9Sstevel@tonic-gate * defined in sparc/fp/_Q_set_except.c and i386/fp/exception.c 1797c478bd9Sstevel@tonic-gate */ 1807c478bd9Sstevel@tonic-gate extern int _Q_set_exception(unsigned int); 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate /* 1837c478bd9Sstevel@tonic-gate * defined in nsparse.c 1847c478bd9Sstevel@tonic-gate */ 1857c478bd9Sstevel@tonic-gate extern struct __nsw_switchconfig *_nsw_getoneconfig(const char *name, 1867c478bd9Sstevel@tonic-gate char *linep, enum __nsw_parse_err *); 1877c478bd9Sstevel@tonic-gate extern struct __nsw_switchconfig_v1 *_nsw_getoneconfig_v1(const char *name, 1887c478bd9Sstevel@tonic-gate char *linep, enum __nsw_parse_err *); 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate /* 1917c478bd9Sstevel@tonic-gate * Internal routine from getusershell.c 1927c478bd9Sstevel@tonic-gate */ 1937c478bd9Sstevel@tonic-gate extern char *getusershell(void); 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gate /* 1967c478bd9Sstevel@tonic-gate * defined in _sigaction.s 1977c478bd9Sstevel@tonic-gate */ 1987c478bd9Sstevel@tonic-gate extern int __sigaction(int, const struct sigaction *, struct sigaction *); 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate /* 2017c478bd9Sstevel@tonic-gate * defined in _getsp.s 2027c478bd9Sstevel@tonic-gate */ 2037c478bd9Sstevel@tonic-gate extern greg_t _getsp(void); 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate /* 2067c478bd9Sstevel@tonic-gate * defined in _so_setsockopt.s 2077c478bd9Sstevel@tonic-gate */ 2087c478bd9Sstevel@tonic-gate extern int _so_setsockopt(int, int, int, const char *, int); 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gate /* 2117c478bd9Sstevel@tonic-gate * defined in _so_getsockopt.s 2127c478bd9Sstevel@tonic-gate */ 2137c478bd9Sstevel@tonic-gate extern int _so_getsockopt(int, int, int, char *, int *); 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate /* 2167c478bd9Sstevel@tonic-gate * defined in lsign.s 2177c478bd9Sstevel@tonic-gate */ 2187c478bd9Sstevel@tonic-gate extern int lsign(dl_t); 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate /* 2217c478bd9Sstevel@tonic-gate * defined in ucontext.s 2227c478bd9Sstevel@tonic-gate * __getcontext() is exported by libc 2237c478bd9Sstevel@tonic-gate * __getcontext_syscall() is private to libc 2247c478bd9Sstevel@tonic-gate * otherwise they are the same function 2257c478bd9Sstevel@tonic-gate */ 2267c478bd9Sstevel@tonic-gate extern int __getcontext(ucontext_t *); 2277c478bd9Sstevel@tonic-gate extern int __getcontext_syscall(ucontext_t *); 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate /* 2307c478bd9Sstevel@tonic-gate * defined in door.s 2317c478bd9Sstevel@tonic-gate */ 2327c478bd9Sstevel@tonic-gate extern int __door_info(int, door_info_t *); 2337c478bd9Sstevel@tonic-gate extern int __door_call(int, door_arg_t *); 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate /* 2367c478bd9Sstevel@tonic-gate * defined in _portfs.s 2377c478bd9Sstevel@tonic-gate */ 2387c478bd9Sstevel@tonic-gate extern int64_t _portfs(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, 2397c478bd9Sstevel@tonic-gate uintptr_t); 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gate /* 2427c478bd9Sstevel@tonic-gate * defined in xpg4.c 2437c478bd9Sstevel@tonic-gate */ 244a574db85Sraf extern int __xpg4; /* global */ 245a574db85Sraf extern int libc__xpg4; /* copy of __xpg4, private to libc */ 246a574db85Sraf 247a574db85Sraf /* 248a574db85Sraf * defined in xpg6.c 249a574db85Sraf */ 250a574db85Sraf extern uint_t __xpg6; /* global */ 251a574db85Sraf extern uint_t libc__xpg6; /* copy of __xpg6, private to libc */ 2527c478bd9Sstevel@tonic-gate 2537c478bd9Sstevel@tonic-gate /* 2547c478bd9Sstevel@tonic-gate * i18n prototypes - strong symbols (weak symbols are in libintl.h) 2557c478bd9Sstevel@tonic-gate */ 2567c478bd9Sstevel@tonic-gate extern char *_textdomain(const char *); 2577c478bd9Sstevel@tonic-gate extern char *_bindtextdomain(const char *, const char *); 2587c478bd9Sstevel@tonic-gate extern char *_dcgettext(const char *, const char *, const int); 2597c478bd9Sstevel@tonic-gate extern char *_dgettext(const char *, const char *); 2607c478bd9Sstevel@tonic-gate extern char *_gettext(const char *); 2617c478bd9Sstevel@tonic-gate extern int _fnmatch(const char *, const char *, int); 2627c478bd9Sstevel@tonic-gate 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate /* 2657c478bd9Sstevel@tonic-gate * defined in port/stdio/doscan.c 2667c478bd9Sstevel@tonic-gate */ 2677c478bd9Sstevel@tonic-gate extern int _doscan(FILE *, const char *, va_list); 2687c478bd9Sstevel@tonic-gate extern int __doscan_u(FILE *, const char *, va_list, int); 2697c478bd9Sstevel@tonic-gate extern int __wdoscan_u(FILE *, const wchar_t *, va_list, int); 2707c478bd9Sstevel@tonic-gate 2717c478bd9Sstevel@tonic-gate #ifndef _LP64 2727c478bd9Sstevel@tonic-gate /* Flag for _ndoprnt() and _doscan_u() */ 2737c478bd9Sstevel@tonic-gate #define _F_INTMAX32 0x1 /* if set read 4 bytes for u/intmax %j */ 2747c478bd9Sstevel@tonic-gate extern int _fprintf_c89(FILE *, const char *, ...); 2757c478bd9Sstevel@tonic-gate extern int _printf_c89(const char *, ...); 2767c478bd9Sstevel@tonic-gate extern int _snprintf_c89(char *, size_t, const char *, ...); 2777c478bd9Sstevel@tonic-gate extern int _sprintf_c89(char *, const char *, ...); 2787c478bd9Sstevel@tonic-gate extern int _wprintf_c89(const wchar_t *, ...); 2797c478bd9Sstevel@tonic-gate extern int _fwprintf_c89(FILE *, const wchar_t *, ...); 2807c478bd9Sstevel@tonic-gate extern int _swprintf_c89(wchar_t *, size_t, const wchar_t *, ...); 2817c478bd9Sstevel@tonic-gate extern int _vfprintf_c89(FILE *, const char *, va_list); 2827c478bd9Sstevel@tonic-gate extern int _vprintf_c89(const char *, va_list); 2837c478bd9Sstevel@tonic-gate extern int _vsnprintf_c89(char *, size_t, const char *, va_list); 2847c478bd9Sstevel@tonic-gate extern int _vsprintf_c89(char *, const char *, va_list); 2857c478bd9Sstevel@tonic-gate extern int _vwprintf_c89(const wchar_t *, va_list); 2867c478bd9Sstevel@tonic-gate extern int _vfwprintf_c89(FILE *, const wchar_t *, va_list); 2877c478bd9Sstevel@tonic-gate extern int _vswprintf_c89(wchar_t *, size_t, const wchar_t *, va_list); 2887c478bd9Sstevel@tonic-gate extern int _scanf_c89(const char *, ...); 2897c478bd9Sstevel@tonic-gate extern int _fscanf_c89(FILE *, const char *, ...); 2907c478bd9Sstevel@tonic-gate extern int _sscanf_c89(const char *, const char *, ...); 2917c478bd9Sstevel@tonic-gate extern int _vscanf_c89(const char *, va_list); 2927c478bd9Sstevel@tonic-gate extern int _vfscanf_c89(FILE *, const char *, va_list); 2937c478bd9Sstevel@tonic-gate extern int _vsscanf_c89(const char *, const char *, va_list); 2947c478bd9Sstevel@tonic-gate extern int _vwscanf_c89(const wchar_t *, va_list); 2957c478bd9Sstevel@tonic-gate extern int _vfwscanf_c89(FILE *, const wchar_t *, va_list); 2967c478bd9Sstevel@tonic-gate extern int _vswscanf_c89(const wchar_t *, const wchar_t *, va_list); 2977c478bd9Sstevel@tonic-gate extern int _wscanf_c89(const wchar_t *, ...); 2987c478bd9Sstevel@tonic-gate extern int _fwscanf_c89(FILE *, const wchar_t *, ...); 2997c478bd9Sstevel@tonic-gate extern int _swscanf_c89(const wchar_t *, const wchar_t *, ...); 3007c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 3017c478bd9Sstevel@tonic-gate 3027c478bd9Sstevel@tonic-gate /* 3037c478bd9Sstevel@tonic-gate * defined in port/stdio/popen.c 3047c478bd9Sstevel@tonic-gate */ 3057c478bd9Sstevel@tonic-gate extern int _insert(pid_t pid, int fd); 3067c478bd9Sstevel@tonic-gate extern pid_t _delete(int fd); 3077c478bd9Sstevel@tonic-gate 3087c478bd9Sstevel@tonic-gate /* 3097c478bd9Sstevel@tonic-gate * defined in port/print/doprnt.c 3107c478bd9Sstevel@tonic-gate */ 3117c478bd9Sstevel@tonic-gate extern ssize_t _wdoprnt(const wchar_t *, va_list, FILE *); 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate /* 3147c478bd9Sstevel@tonic-gate * defined in fgetwc.c 3157c478bd9Sstevel@tonic-gate */ 3167c478bd9Sstevel@tonic-gate extern wint_t _fgetwc_unlocked(FILE *); 3177c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(FILE *); 3187c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(FILE *); 3197c478bd9Sstevel@tonic-gate extern wint_t _getwc(FILE *); 3207c478bd9Sstevel@tonic-gate 3217c478bd9Sstevel@tonic-gate /* 3227c478bd9Sstevel@tonic-gate * defined in fputwc.c 3237c478bd9Sstevel@tonic-gate */ 3247c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, FILE *); 3257c478bd9Sstevel@tonic-gate extern wint_t _putwc(wint_t, FILE *); 3267c478bd9Sstevel@tonic-gate 3277c478bd9Sstevel@tonic-gate /* 3287c478bd9Sstevel@tonic-gate * defined in ungetwc.c 3297c478bd9Sstevel@tonic-gate */ 3307c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, FILE *); 3317c478bd9Sstevel@tonic-gate 3327c478bd9Sstevel@tonic-gate /* 3337c478bd9Sstevel@tonic-gate * defined in wscmp.c 3347c478bd9Sstevel@tonic-gate */ 3357c478bd9Sstevel@tonic-gate extern int _wcscmp(const wchar_t *, const wchar_t *); 3367c478bd9Sstevel@tonic-gate 3377c478bd9Sstevel@tonic-gate /* 3387c478bd9Sstevel@tonic-gate * defined in wslen.c 3397c478bd9Sstevel@tonic-gate */ 3407c478bd9Sstevel@tonic-gate extern size_t _wcslen(const wchar_t *); 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gate /* 3437c478bd9Sstevel@tonic-gate * defined in wscpy.c 3447c478bd9Sstevel@tonic-gate */ 3457c478bd9Sstevel@tonic-gate extern wchar_t *_wcscpy(wchar_t *, const wchar_t *); 3467c478bd9Sstevel@tonic-gate 3477c478bd9Sstevel@tonic-gate /* 3487c478bd9Sstevel@tonic-gate * misc synonyms 3497c478bd9Sstevel@tonic-gate */ 3507c478bd9Sstevel@tonic-gate extern int _wctomb(char *, wchar_t); 3517c478bd9Sstevel@tonic-gate extern wint_t _towlower(wint_t); 3527c478bd9Sstevel@tonic-gate extern int _doscan(FILE *, const char *, va_list); 3537c478bd9Sstevel@tonic-gate extern int _wcscoll(const wchar_t *, const wchar_t *); 3547c478bd9Sstevel@tonic-gate extern size_t _wcsxfrm(wchar_t *, const wchar_t *, size_t); 3557c478bd9Sstevel@tonic-gate extern wint_t _fputwc(wint_t, FILE *); 3567c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3577c478bd9Sstevel@tonic-gate } 3587c478bd9Sstevel@tonic-gate #endif 3597c478bd9Sstevel@tonic-gate 3607c478bd9Sstevel@tonic-gate #endif /* _LIBC_H */ 361