libc.h revision b6233ca500dcfb36bc38a5dbd2c7e3584f2c2485
/*
* 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
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This is where all the interfaces that are internal to libc
* which do not have a better home live
*/
#ifndef _LIBC_H
#define _LIBC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <thread.h>
#include <stdio.h>
#include <dirent.h>
#include <ucontext.h>
#include <nsswitch.h>
#include <stddef.h>
#include <poll.h>
#include <floatingpoint.h>
#include <nl_types.h>
#include <regex.h>
#include <stdarg.h>
#include <wchar.h>
#include <wctype.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void __set_panicstr(const char *);
extern void _rewind_unlocked(FILE *);
extern int _rename(const char *, const char *);
extern long _sysconfig(int);
extern int primary_link_map;
extern int thr_main(void);
extern void atfork_lock_enter(void);
extern void atfork_lock_exit(void);
extern void *libc_malloc(size_t);
extern void *libc_realloc(void *, size_t);
extern void libc_free(void *);
extern char *libc_strdup(const char *);
extern void *_pthread_getspecific(thread_key_t);
const sigset_t *);
extern void _private_testcancel(void);
/*
* The private_DIR structure is the same as the DIR structure,
* with the addition of a mutex lock for libc's internal use.
*/
typedef struct {
} private_DIR;
#if !defined(_LP64)
/*
* getdents64 transitional interface is intentionally internal to libc
*/
#endif
/*
* Rounding direction functions
*/
extern enum fp_direction_type __xgetRD(void);
extern enum fp_direction_type _QgetRD(void);
#else
#endif
/*
* defined in hex_bin.c
*/
single *, fp_exception_field_type *);
double *, fp_exception_field_type *);
#if defined(__sparc)
quadruple *, fp_exception_field_type *);
extended *, fp_exception_field_type *);
#else
#endif
/*
* defined in ctime.c
*/
extern char *__posix_asctime_r(const struct tm *, char *);
/*
* Internal routine from fsync.c
*/
extern int __fdsync(int, int); /* 2nd arg may be wrong in 64bit mode */
/*
* Internal routine from _xregs_clrptr.c
*/
extern void _xregs_clrptr(ucontext_t *);
/*
* Internal routine from nfssys.c
*/
extern int _nfssys(int, void *); /* int in 64bit mode ???, void * ??? */
/*
* Internal routine from psetsys.c
*/
extern int _pset(int, ...); /* int in 64bit mode ??? */
/*
* defined in sigpending.s
*/
extern int __sigfillset(sigset_t *);
/*
* defined in sparc/fp/_Q_set_except.c and i386/fp/exception.c
*/
extern int _Q_set_exception(unsigned int);
/*
* defined in nsparse.c
*/
char *linep, enum __nsw_parse_err *);
char *linep, enum __nsw_parse_err *);
/*
* Internal routine from getusershell.c
*/
extern char *getusershell(void);
/*
* defined in _sigaction.s
*/
/*
* defined in _getsp.s
*/
/*
* defined in _so_setsockopt.s
*/
extern int _so_setsockopt(int, int, int, const char *, int);
/*
* defined in _so_getsockopt.s
*/
extern int _so_getsockopt(int, int, int, char *, int *);
/*
* defined in lsign.s
*/
/*
* defined in ucontext.s
* __getcontext() is exported by libc
* __getcontext_syscall() is private to libc
* otherwise they are the same function
*/
extern int __getcontext(ucontext_t *);
extern int __getcontext_syscall(ucontext_t *);
/*
* defined in door.s
*/
extern int __door_info(int, door_info_t *);
extern int __door_call(int, door_arg_t *);
/*
* defined in _portfs.s
*/
/*
* defined in xpg4.c
*/
extern int __xpg4;
/*
* i18n prototypes - strong symbols (weak symbols are in libintl.h)
*/
extern char *_textdomain(const char *);
extern char *_bindtextdomain(const char *, const char *);
extern char *_dcgettext(const char *, const char *, const int);
extern char *_dgettext(const char *, const char *);
extern char *_gettext(const char *);
extern int _fnmatch(const char *, const char *, int);
/*
*/
#ifndef _LP64
/* Flag for _ndoprnt() and _doscan_u() */
extern int _fprintf_c89(FILE *, const char *, ...);
extern int _printf_c89(const char *, ...);
extern int _snprintf_c89(char *, size_t, const char *, ...);
extern int _sprintf_c89(char *, const char *, ...);
extern int _wprintf_c89(const wchar_t *, ...);
extern int _vprintf_c89(const char *, va_list);
extern int _vsprintf_c89(char *, const char *, va_list);
extern int _scanf_c89(const char *, ...);
extern int _fscanf_c89(FILE *, const char *, ...);
extern int _sscanf_c89(const char *, const char *, ...);
extern int _vscanf_c89(const char *, va_list);
extern int _vsscanf_c89(const char *, const char *, va_list);
extern int _wscanf_c89(const wchar_t *, ...);
#endif /* _LP64 */
/*
*/
/*
*/
/*
* defined in fgetwc.c
*/
/*
* defined in fputwc.c
*/
/*
* defined in ungetwc.c
*/
/*
* defined in wscmp.c
*/
/*
* defined in wslen.c
*/
/*
* defined in wscpy.c
*/
/*
* misc synonyms
*/
#ifdef __cplusplus
}
#endif
#endif /* _LIBC_H */