1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* 28*7c478bd9Sstevel@tonic-gate * This is where all the interfaces that are internal to libc 29*7c478bd9Sstevel@tonic-gate * which do not have a better home live 30*7c478bd9Sstevel@tonic-gate */ 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #ifndef _LIBC_H 33*7c478bd9Sstevel@tonic-gate #define _LIBC_H 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate #include <thread.h> 38*7c478bd9Sstevel@tonic-gate #include <stdio.h> 39*7c478bd9Sstevel@tonic-gate #include <sys/dirent.h> 40*7c478bd9Sstevel@tonic-gate #include <ucontext.h> 41*7c478bd9Sstevel@tonic-gate #include <nsswitch.h> 42*7c478bd9Sstevel@tonic-gate #include <stddef.h> 43*7c478bd9Sstevel@tonic-gate #include <poll.h> 44*7c478bd9Sstevel@tonic-gate #include <sys/dl.h> 45*7c478bd9Sstevel@tonic-gate #include <sys/door.h> 46*7c478bd9Sstevel@tonic-gate #include <sys/ieeefp.h> 47*7c478bd9Sstevel@tonic-gate #include <sys/mount.h> 48*7c478bd9Sstevel@tonic-gate #include <floatingpoint.h> 49*7c478bd9Sstevel@tonic-gate #include <nl_types.h> 50*7c478bd9Sstevel@tonic-gate #include <regex.h> 51*7c478bd9Sstevel@tonic-gate #include <stdarg.h> 52*7c478bd9Sstevel@tonic-gate #include <wchar.h> 53*7c478bd9Sstevel@tonic-gate #include <wctype.h> 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 56*7c478bd9Sstevel@tonic-gate extern "C" { 57*7c478bd9Sstevel@tonic-gate #endif 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate extern void __set_panicstr(const char *); 60*7c478bd9Sstevel@tonic-gate extern void _rewind_unlocked(FILE *); 61*7c478bd9Sstevel@tonic-gate extern int _rename(const char *, const char *); 62*7c478bd9Sstevel@tonic-gate extern long _sysconfig(int); 63*7c478bd9Sstevel@tonic-gate extern int kill(pid_t pid, int sig); 64*7c478bd9Sstevel@tonic-gate 65*7c478bd9Sstevel@tonic-gate extern int primary_link_map; 66*7c478bd9Sstevel@tonic-gate extern int thr_main(void); 67*7c478bd9Sstevel@tonic-gate extern int thr_kill(thread_t tid, int sig); 68*7c478bd9Sstevel@tonic-gate extern thread_t thr_self(void); 69*7c478bd9Sstevel@tonic-gate extern int mutex_lock(mutex_t *mp); 70*7c478bd9Sstevel@tonic-gate extern int mutex_unlock(mutex_t *mp); 71*7c478bd9Sstevel@tonic-gate extern int fork_lock_enter(const char *); 72*7c478bd9Sstevel@tonic-gate extern void fork_lock_exit(void); 73*7c478bd9Sstevel@tonic-gate extern void *lmalloc(size_t); 74*7c478bd9Sstevel@tonic-gate extern void lfree(void *, size_t); 75*7c478bd9Sstevel@tonic-gate extern void *libc_malloc(size_t); 76*7c478bd9Sstevel@tonic-gate extern void *libc_realloc(void *, size_t); 77*7c478bd9Sstevel@tonic-gate extern void libc_free(void *); 78*7c478bd9Sstevel@tonic-gate extern char *libc_strdup(const char *); 79*7c478bd9Sstevel@tonic-gate extern int _sigwait(sigset_t *); 80*7c478bd9Sstevel@tonic-gate extern int _thr_getspecific(thread_key_t key, void **valuep); 81*7c478bd9Sstevel@tonic-gate extern int _thr_setspecific(unsigned int key, void *value); 82*7c478bd9Sstevel@tonic-gate extern int _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)); 83*7c478bd9Sstevel@tonic-gate extern void *_pthread_getspecific(thread_key_t); 84*7c478bd9Sstevel@tonic-gate extern int _pollsys(struct pollfd *, nfds_t, const timespec_t *, 85*7c478bd9Sstevel@tonic-gate const sigset_t *); 86*7c478bd9Sstevel@tonic-gate extern void _private_testcancel(void); 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) 89*7c478bd9Sstevel@tonic-gate /* 90*7c478bd9Sstevel@tonic-gate * getdents64 transitional interface is intentionally internal to libc 91*7c478bd9Sstevel@tonic-gate */ 92*7c478bd9Sstevel@tonic-gate extern int getdents64(int, struct dirent64 *, size_t); 93*7c478bd9Sstevel@tonic-gate #endif 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gate extern int _scrwidth(wchar_t); 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate extern int64_t __div64(int64_t, int64_t); 98*7c478bd9Sstevel@tonic-gate extern int64_t __rem64(int64_t, int64_t); 99*7c478bd9Sstevel@tonic-gate extern uint64_t __udiv64(uint64_t, uint64_t); 100*7c478bd9Sstevel@tonic-gate extern uint64_t __urem64(uint64_t, uint64_t); 101*7c478bd9Sstevel@tonic-gate extern uint64_t _umul32x32to64(uint32_t, uint32_t); 102*7c478bd9Sstevel@tonic-gate extern int64_t __mul64(int64_t, int64_t); 103*7c478bd9Sstevel@tonic-gate extern uint64_t __umul64(uint64_t, uint64_t); 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate /* 107*7c478bd9Sstevel@tonic-gate * Rounding direction functions 108*7c478bd9Sstevel@tonic-gate */ 109*7c478bd9Sstevel@tonic-gate #if defined(__i386) || defined(__amd64) 110*7c478bd9Sstevel@tonic-gate extern enum fp_direction_type __xgetRD(void); 111*7c478bd9Sstevel@tonic-gate #elif defined(__sparc) 112*7c478bd9Sstevel@tonic-gate extern enum fp_direction_type _QgetRD(void); 113*7c478bd9Sstevel@tonic-gate #else 114*7c478bd9Sstevel@tonic-gate #error Unknown architecture! 115*7c478bd9Sstevel@tonic-gate #endif 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate /* 119*7c478bd9Sstevel@tonic-gate * defined in hex_bin.c 120*7c478bd9Sstevel@tonic-gate */ 121*7c478bd9Sstevel@tonic-gate extern void __hex_to_single(decimal_record *, enum fp_direction_type, 122*7c478bd9Sstevel@tonic-gate single *, fp_exception_field_type *); 123*7c478bd9Sstevel@tonic-gate extern void __hex_to_double(decimal_record *, enum fp_direction_type, 124*7c478bd9Sstevel@tonic-gate double *, fp_exception_field_type *); 125*7c478bd9Sstevel@tonic-gate #if defined(__sparc) 126*7c478bd9Sstevel@tonic-gate extern void __hex_to_quadruple(decimal_record *, enum fp_direction_type, 127*7c478bd9Sstevel@tonic-gate quadruple *, fp_exception_field_type *); 128*7c478bd9Sstevel@tonic-gate #elif defined(__i386) || defined(__amd64) 129*7c478bd9Sstevel@tonic-gate extern void __hex_to_extended(decimal_record *, enum fp_direction_type, 130*7c478bd9Sstevel@tonic-gate extended *, fp_exception_field_type *); 131*7c478bd9Sstevel@tonic-gate #else 132*7c478bd9Sstevel@tonic-gate #error Unknown architecture 133*7c478bd9Sstevel@tonic-gate #endif 134*7c478bd9Sstevel@tonic-gate 135*7c478bd9Sstevel@tonic-gate /* 136*7c478bd9Sstevel@tonic-gate * defined in ctime.c 137*7c478bd9Sstevel@tonic-gate */ 138*7c478bd9Sstevel@tonic-gate extern char *__posix_asctime_r(const struct tm *, char *); 139*7c478bd9Sstevel@tonic-gate 140*7c478bd9Sstevel@tonic-gate /* 141*7c478bd9Sstevel@tonic-gate * Internal routine from fsync.c 142*7c478bd9Sstevel@tonic-gate */ 143*7c478bd9Sstevel@tonic-gate extern int __fdsync(int, int); /* 2nd arg may be wrong in 64bit mode */ 144*7c478bd9Sstevel@tonic-gate 145*7c478bd9Sstevel@tonic-gate /* 146*7c478bd9Sstevel@tonic-gate * Internal routine from _xregs_clrptr.c 147*7c478bd9Sstevel@tonic-gate */ 148*7c478bd9Sstevel@tonic-gate extern void _xregs_clrptr(ucontext_t *); 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate /* 151*7c478bd9Sstevel@tonic-gate * Internal routine from nfssys.c 152*7c478bd9Sstevel@tonic-gate */ 153*7c478bd9Sstevel@tonic-gate extern int _nfssys(int, void *); /* int in 64bit mode ???, void * ??? */ 154*7c478bd9Sstevel@tonic-gate 155*7c478bd9Sstevel@tonic-gate /* 156*7c478bd9Sstevel@tonic-gate * Internal routine from psetsys.c 157*7c478bd9Sstevel@tonic-gate */ 158*7c478bd9Sstevel@tonic-gate extern int _pset(int, ...); /* int in 64bit mode ??? */ 159*7c478bd9Sstevel@tonic-gate 160*7c478bd9Sstevel@tonic-gate /* 161*7c478bd9Sstevel@tonic-gate * defined in sigpending.s 162*7c478bd9Sstevel@tonic-gate */ 163*7c478bd9Sstevel@tonic-gate extern int __sigfillset(sigset_t *); 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate /* 166*7c478bd9Sstevel@tonic-gate * defined in sparc/fp/_Q_set_except.c and i386/fp/exception.c 167*7c478bd9Sstevel@tonic-gate */ 168*7c478bd9Sstevel@tonic-gate extern int _Q_set_exception(unsigned int); 169*7c478bd9Sstevel@tonic-gate 170*7c478bd9Sstevel@tonic-gate /* 171*7c478bd9Sstevel@tonic-gate * defined in nsparse.c 172*7c478bd9Sstevel@tonic-gate */ 173*7c478bd9Sstevel@tonic-gate extern struct __nsw_switchconfig *_nsw_getoneconfig(const char *name, 174*7c478bd9Sstevel@tonic-gate char *linep, enum __nsw_parse_err *); 175*7c478bd9Sstevel@tonic-gate extern struct __nsw_switchconfig_v1 *_nsw_getoneconfig_v1(const char *name, 176*7c478bd9Sstevel@tonic-gate char *linep, enum __nsw_parse_err *); 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate /* 179*7c478bd9Sstevel@tonic-gate * Internal routine from getusershell.c 180*7c478bd9Sstevel@tonic-gate */ 181*7c478bd9Sstevel@tonic-gate extern char *getusershell(void); 182*7c478bd9Sstevel@tonic-gate 183*7c478bd9Sstevel@tonic-gate /* 184*7c478bd9Sstevel@tonic-gate * defined in _sigaction.s 185*7c478bd9Sstevel@tonic-gate */ 186*7c478bd9Sstevel@tonic-gate extern int __sigaction(int, const struct sigaction *, struct sigaction *); 187*7c478bd9Sstevel@tonic-gate 188*7c478bd9Sstevel@tonic-gate /* 189*7c478bd9Sstevel@tonic-gate * defined in _getsp.s 190*7c478bd9Sstevel@tonic-gate */ 191*7c478bd9Sstevel@tonic-gate extern greg_t _getsp(void); 192*7c478bd9Sstevel@tonic-gate 193*7c478bd9Sstevel@tonic-gate /* 194*7c478bd9Sstevel@tonic-gate * defined in _so_setsockopt.s 195*7c478bd9Sstevel@tonic-gate */ 196*7c478bd9Sstevel@tonic-gate extern int _so_setsockopt(int, int, int, const char *, int); 197*7c478bd9Sstevel@tonic-gate 198*7c478bd9Sstevel@tonic-gate /* 199*7c478bd9Sstevel@tonic-gate * defined in _so_getsockopt.s 200*7c478bd9Sstevel@tonic-gate */ 201*7c478bd9Sstevel@tonic-gate extern int _so_getsockopt(int, int, int, char *, int *); 202*7c478bd9Sstevel@tonic-gate 203*7c478bd9Sstevel@tonic-gate /* 204*7c478bd9Sstevel@tonic-gate * defined in lsign.s 205*7c478bd9Sstevel@tonic-gate */ 206*7c478bd9Sstevel@tonic-gate extern int lsign(dl_t); 207*7c478bd9Sstevel@tonic-gate 208*7c478bd9Sstevel@tonic-gate /* 209*7c478bd9Sstevel@tonic-gate * defined in ucontext.s 210*7c478bd9Sstevel@tonic-gate * __getcontext() is exported by libc 211*7c478bd9Sstevel@tonic-gate * __getcontext_syscall() is private to libc 212*7c478bd9Sstevel@tonic-gate * otherwise they are the same function 213*7c478bd9Sstevel@tonic-gate */ 214*7c478bd9Sstevel@tonic-gate extern int __getcontext(ucontext_t *); 215*7c478bd9Sstevel@tonic-gate extern int __getcontext_syscall(ucontext_t *); 216*7c478bd9Sstevel@tonic-gate 217*7c478bd9Sstevel@tonic-gate /* 218*7c478bd9Sstevel@tonic-gate * defined in door.s 219*7c478bd9Sstevel@tonic-gate */ 220*7c478bd9Sstevel@tonic-gate extern int __door_info(int, door_info_t *); 221*7c478bd9Sstevel@tonic-gate extern int __door_call(int, door_arg_t *); 222*7c478bd9Sstevel@tonic-gate 223*7c478bd9Sstevel@tonic-gate /* 224*7c478bd9Sstevel@tonic-gate * defined in _portfs.s 225*7c478bd9Sstevel@tonic-gate */ 226*7c478bd9Sstevel@tonic-gate extern int64_t _portfs(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, 227*7c478bd9Sstevel@tonic-gate uintptr_t); 228*7c478bd9Sstevel@tonic-gate 229*7c478bd9Sstevel@tonic-gate /* 230*7c478bd9Sstevel@tonic-gate * defined in xpg4.c 231*7c478bd9Sstevel@tonic-gate */ 232*7c478bd9Sstevel@tonic-gate extern int __xpg4; 233*7c478bd9Sstevel@tonic-gate 234*7c478bd9Sstevel@tonic-gate /* 235*7c478bd9Sstevel@tonic-gate * i18n prototypes - strong symbols (weak symbols are in libintl.h) 236*7c478bd9Sstevel@tonic-gate */ 237*7c478bd9Sstevel@tonic-gate extern char *_textdomain(const char *); 238*7c478bd9Sstevel@tonic-gate extern char *_bindtextdomain(const char *, const char *); 239*7c478bd9Sstevel@tonic-gate extern char *_dcgettext(const char *, const char *, const int); 240*7c478bd9Sstevel@tonic-gate extern char *_dgettext(const char *, const char *); 241*7c478bd9Sstevel@tonic-gate extern char *_gettext(const char *); 242*7c478bd9Sstevel@tonic-gate extern int _fnmatch(const char *, const char *, int); 243*7c478bd9Sstevel@tonic-gate 244*7c478bd9Sstevel@tonic-gate 245*7c478bd9Sstevel@tonic-gate /* 246*7c478bd9Sstevel@tonic-gate * defined in port/stdio/doscan.c 247*7c478bd9Sstevel@tonic-gate */ 248*7c478bd9Sstevel@tonic-gate extern int _doscan(FILE *, const char *, va_list); 249*7c478bd9Sstevel@tonic-gate extern int __doscan_u(FILE *, const char *, va_list, int); 250*7c478bd9Sstevel@tonic-gate extern int __wdoscan_u(FILE *, const wchar_t *, va_list, int); 251*7c478bd9Sstevel@tonic-gate 252*7c478bd9Sstevel@tonic-gate #ifndef _LP64 253*7c478bd9Sstevel@tonic-gate /* Flag for _ndoprnt() and _doscan_u() */ 254*7c478bd9Sstevel@tonic-gate #define _F_INTMAX32 0x1 /* if set read 4 bytes for u/intmax %j */ 255*7c478bd9Sstevel@tonic-gate extern int _fprintf_c89(FILE *, const char *, ...); 256*7c478bd9Sstevel@tonic-gate extern int _printf_c89(const char *, ...); 257*7c478bd9Sstevel@tonic-gate extern int _snprintf_c89(char *, size_t, const char *, ...); 258*7c478bd9Sstevel@tonic-gate extern int _sprintf_c89(char *, const char *, ...); 259*7c478bd9Sstevel@tonic-gate extern int _wprintf_c89(const wchar_t *, ...); 260*7c478bd9Sstevel@tonic-gate extern int _fwprintf_c89(FILE *, const wchar_t *, ...); 261*7c478bd9Sstevel@tonic-gate extern int _swprintf_c89(wchar_t *, size_t, const wchar_t *, ...); 262*7c478bd9Sstevel@tonic-gate extern int _vfprintf_c89(FILE *, const char *, va_list); 263*7c478bd9Sstevel@tonic-gate extern int _vprintf_c89(const char *, va_list); 264*7c478bd9Sstevel@tonic-gate extern int _vsnprintf_c89(char *, size_t, const char *, va_list); 265*7c478bd9Sstevel@tonic-gate extern int _vsprintf_c89(char *, const char *, va_list); 266*7c478bd9Sstevel@tonic-gate extern int _vwprintf_c89(const wchar_t *, va_list); 267*7c478bd9Sstevel@tonic-gate extern int _vfwprintf_c89(FILE *, const wchar_t *, va_list); 268*7c478bd9Sstevel@tonic-gate extern int _vswprintf_c89(wchar_t *, size_t, const wchar_t *, va_list); 269*7c478bd9Sstevel@tonic-gate extern int _scanf_c89(const char *, ...); 270*7c478bd9Sstevel@tonic-gate extern int _fscanf_c89(FILE *, const char *, ...); 271*7c478bd9Sstevel@tonic-gate extern int _sscanf_c89(const char *, const char *, ...); 272*7c478bd9Sstevel@tonic-gate extern int _vscanf_c89(const char *, va_list); 273*7c478bd9Sstevel@tonic-gate extern int _vfscanf_c89(FILE *, const char *, va_list); 274*7c478bd9Sstevel@tonic-gate extern int _vsscanf_c89(const char *, const char *, va_list); 275*7c478bd9Sstevel@tonic-gate extern int _vwscanf_c89(const wchar_t *, va_list); 276*7c478bd9Sstevel@tonic-gate extern int _vfwscanf_c89(FILE *, const wchar_t *, va_list); 277*7c478bd9Sstevel@tonic-gate extern int _vswscanf_c89(const wchar_t *, const wchar_t *, va_list); 278*7c478bd9Sstevel@tonic-gate extern int _wscanf_c89(const wchar_t *, ...); 279*7c478bd9Sstevel@tonic-gate extern int _fwscanf_c89(FILE *, const wchar_t *, ...); 280*7c478bd9Sstevel@tonic-gate extern int _swscanf_c89(const wchar_t *, const wchar_t *, ...); 281*7c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 282*7c478bd9Sstevel@tonic-gate 283*7c478bd9Sstevel@tonic-gate /* 284*7c478bd9Sstevel@tonic-gate * defined in port/stdio/popen.c 285*7c478bd9Sstevel@tonic-gate */ 286*7c478bd9Sstevel@tonic-gate extern int _insert(pid_t pid, int fd); 287*7c478bd9Sstevel@tonic-gate extern pid_t _delete(int fd); 288*7c478bd9Sstevel@tonic-gate 289*7c478bd9Sstevel@tonic-gate /* 290*7c478bd9Sstevel@tonic-gate * defined in port/print/doprnt.c 291*7c478bd9Sstevel@tonic-gate */ 292*7c478bd9Sstevel@tonic-gate extern ssize_t _wdoprnt(const wchar_t *, va_list, FILE *); 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate /* 295*7c478bd9Sstevel@tonic-gate * defined in fgetwc.c 296*7c478bd9Sstevel@tonic-gate */ 297*7c478bd9Sstevel@tonic-gate extern wint_t _fgetwc_unlocked(FILE *); 298*7c478bd9Sstevel@tonic-gate extern wint_t __getwc_xpg5(FILE *); 299*7c478bd9Sstevel@tonic-gate extern wint_t __fgetwc_xpg5(FILE *); 300*7c478bd9Sstevel@tonic-gate extern wint_t _getwc(FILE *); 301*7c478bd9Sstevel@tonic-gate 302*7c478bd9Sstevel@tonic-gate /* 303*7c478bd9Sstevel@tonic-gate * defined in fputwc.c 304*7c478bd9Sstevel@tonic-gate */ 305*7c478bd9Sstevel@tonic-gate extern wint_t __putwc_xpg5(wint_t, FILE *); 306*7c478bd9Sstevel@tonic-gate extern wint_t _putwc(wint_t, FILE *); 307*7c478bd9Sstevel@tonic-gate 308*7c478bd9Sstevel@tonic-gate /* 309*7c478bd9Sstevel@tonic-gate * defined in ungetwc.c 310*7c478bd9Sstevel@tonic-gate */ 311*7c478bd9Sstevel@tonic-gate extern wint_t __ungetwc_xpg5(wint_t, FILE *); 312*7c478bd9Sstevel@tonic-gate 313*7c478bd9Sstevel@tonic-gate /* 314*7c478bd9Sstevel@tonic-gate * defined in wscmp.c 315*7c478bd9Sstevel@tonic-gate */ 316*7c478bd9Sstevel@tonic-gate extern int _wcscmp(const wchar_t *, const wchar_t *); 317*7c478bd9Sstevel@tonic-gate 318*7c478bd9Sstevel@tonic-gate /* 319*7c478bd9Sstevel@tonic-gate * defined in wslen.c 320*7c478bd9Sstevel@tonic-gate */ 321*7c478bd9Sstevel@tonic-gate extern size_t _wcslen(const wchar_t *); 322*7c478bd9Sstevel@tonic-gate 323*7c478bd9Sstevel@tonic-gate /* 324*7c478bd9Sstevel@tonic-gate * defined in wscpy.c 325*7c478bd9Sstevel@tonic-gate */ 326*7c478bd9Sstevel@tonic-gate extern wchar_t *_wcscpy(wchar_t *, const wchar_t *); 327*7c478bd9Sstevel@tonic-gate 328*7c478bd9Sstevel@tonic-gate #ifdef __sparc 329*7c478bd9Sstevel@tonic-gate extern ulong_t caller(void); 330*7c478bd9Sstevel@tonic-gate extern ulong_t getfp(void); 331*7c478bd9Sstevel@tonic-gate #endif 332*7c478bd9Sstevel@tonic-gate 333*7c478bd9Sstevel@tonic-gate /* 334*7c478bd9Sstevel@tonic-gate * misc synonyms 335*7c478bd9Sstevel@tonic-gate */ 336*7c478bd9Sstevel@tonic-gate extern int _wctomb(char *, wchar_t); 337*7c478bd9Sstevel@tonic-gate extern wint_t _towlower(wint_t); 338*7c478bd9Sstevel@tonic-gate extern int _doscan(FILE *, const char *, va_list); 339*7c478bd9Sstevel@tonic-gate extern int _wcscoll(const wchar_t *, const wchar_t *); 340*7c478bd9Sstevel@tonic-gate extern size_t _wcsxfrm(wchar_t *, const wchar_t *, size_t); 341*7c478bd9Sstevel@tonic-gate extern wint_t _fputwc(wint_t, FILE *); 342*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 343*7c478bd9Sstevel@tonic-gate } 344*7c478bd9Sstevel@tonic-gate #endif 345*7c478bd9Sstevel@tonic-gate 346*7c478bd9Sstevel@tonic-gate #endif /* _LIBC_H */ 347