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