13.5. Interface Definitions for libc

Table of Contents
_IO_feof -- alias for feof
_IO_getc -- alias for getc
_IO_putc -- alias for putc
_IO_puts -- alias for puts
__assert_fail -- abort the program after false assertion
__chk_fail -- terminate a function in case of buffer overflow
__confstr_chk -- get configuration dependent string variables, with buffer overflow checking
__ctype_b_loc -- accessor function for __ctype_b array for ctype functions
__ctype_get_mb_cur_max -- maximum length of a multibyte character in the current locale
__ctype_tolower_loc -- accessor function for __ctype_b_tolower array for ctype tolower() function
__ctype_toupper_loc -- accessor function for __ctype_b_toupper() array for ctype toupper() function
__cxa_atexit -- register a function to be called by exit or when a shared library is unloaded
__cxa_finalize -- call destructors of global (or local static) C++ objects and exit functions registered with atexit
__daylight -- external daylight savings time flag
__environ -- alias for environ - user environment
__errno_location -- address of errno variable
__fgets_chk -- string input, with buffer overflow checking
__fgets_unlocked_chk -- non-locking string input, with buffer overflow checking
__fgetws_chk -- read a wide-character string from a FILE stream, with buffer overflow checking
__fgetws_unlocked_chk -- read a wide-character string from a FILE stream in a non-locking manner, with stack checking
__fpending -- returns in bytes the amount of output pending on a stream
__fprintf_chk -- convert formatted output, with stack checking
__fwprintf_chk -- convert formatted wide-character output, with stack checking
__fxstatat -- get file status relative to directory file descriptor
__fxstatat64 -- get file status relative to directory file descriptor
__getcwd_chk -- get current working directory, with buffer overflow checking
__getgroups_chk -- get list of supplementary group IDs, with buffer overflow checking
__gethostname_chk -- get host name, with buffer overflow checking
__getlogin_r_chk -- get user name, with buffer overflow checking (reentrant)
__getpagesize -- alias for getpagesize - get current page size
__getpgid -- get the process group id
__h_errno_location -- address of h_errno variable
__isinf -- test for infinity
__isinff -- test for infinity
__isinfl -- test for infinity
__isnan -- test for infinity
__isnanf -- test for infinity
__isnanl -- test for infinity
__libc_current_sigrtmax -- return number of available real-time signal with lowest priority
__libc_current_sigrtmin -- return number of available real-time signal with highest priority
__libc_start_main -- initialization routine
__mbsnrtowcs_chk -- convert a multibyte string to a wide-character string, with buffer overflow checking
__mbsrtowcs_chk -- convert a multibyte string to a wide-character string, with buffer overflow checking
__mbstowcs_chk -- convert a multibyte string to a wide-character string, with buffer overflow checking
__memcpy_chk -- copy memory area, with buffer overflow checking
__memmove_chk -- copy memory area, with buffer overflow checking
__mempcpy -- copy given number of bytes of source to destination
__mempcpy_chk -- copy memory area, with buffer overflow checking
__memset_chk -- fill memory with a constant byte, using buffer overflow checking
__pread64_chk -- read from a file descriptor at a given offset, with buffer overflow checking
__pread_chk -- read from a file descriptor at a given offset, with buffer overflow checking
__printf_chk -- format and print data, with stack checking
__rawmemchr -- scan memory
__read_chk -- read from a file descriptor, with buffer overflow checking
__readlink_chk -- display value of a symbolic link, with buffer overflow checking
__realpath_chk -- return the canonicalized absolute pathname, with buffer overflow checking
__recv_chk -- receive a message from a socket, with buffer overflow checking
__recvfrom_chk -- receive a message from a socket, with buffer overflow checking
__register_atfork -- alias for register_atfork
__sigsetjmp -- save stack context for non-local goto
__snprintf_chk -- convert formatted output, with buffer overflow checking
__sprintf_chk -- convert formatted output, with stack checking
__stack_chk_fail -- terminate a function in case of stack overflow
__stpcpy -- alias for stpcpy
__stpcpy_chk -- copy a string returning a pointer to its end, with buffer overflow checking
__stpncpy_chk -- copy a fixed-size string, returning a pointer to its end, with buffer overflow checking
__strcat_chk -- concatenate two strings, with buffer overflow checking
__strcpy_chk -- copy a string, with buffer overflow checking
__strdup -- alias for strdup
__strncat_chk -- concatenate two strings, with buffer overflow checking
__strncpy_chk -- copy a string, with buffer overflow checking
__strtod_internal -- underlying function for strtod
__strtof_internal -- underlying function for strtof
__strtok_r -- alias for strtok_r
__strtol_internal -- alias for strtol
__strtold_internal -- underlying function for strtold
__strtoll_internal -- underlying function for strtoll
__strtoul_internal -- underlying function for strtoul
__strtoull_internal -- underlying function for strtoull
__swprintf_chk -- convert formatted wide-character output, with stack checking
__sysconf -- get configuration information at runtime
__syslog_chk -- send messages to the system logger, with stack checking
__sysv_signal -- signal handling
__timezone -- external variable containing timezone
__ttyname_r_chk -- return name of a terminal, with buffer overflow checking (reentrant)
__tzname -- external variable containing the timezone names
__vfprintf_chk -- convert formatted output, with stack checking
__vfwprintf_chk -- convert formatted wide-character output, with stack checking
__vprintf_chk -- convert formatted output, with stack checking
__vsnprintf_chk -- convert formatted output, with stack checking
__vsprintf_chk -- convert formatted output, with stack checking
__vswprintf_chk -- convert formatted wide-character output, with stack checking
__vsyslog_chk -- send messages to the system logger, with stack checking
__vwprintf_chk -- convert formatted wide-character output, with stack checking
__wcpcpy_chk -- copy a wide-character string, returning a pointer to its end, with buffer overflow checking
__wcpncpy_chk -- copy a fixed-size string of wide characters, returning a pointer to its end, with buffer overflow checking
__wcrtomb_chk -- convert a wide character to a multibyte sequence, with buffer overflow checking
__wcscat_chk -- concatenate two wide-character strings, with buffer overflow checking
__wcscpy_chk -- copy a wide-character string, with buffer overflow checking
__wcsncat_chk -- concatenate two wide-character strings, with buffer overflow checking
__wcsncpy_chk -- copy a fixed-size string of wide characters, with buffer overflow checking
__wcsnrtombs_chk -- convert a wide-character string to a multibyte string, with buffer overflow checking
__wcsrtombs_chk -- convert a wide-character string to a multibyte string, with buffer overflow checking
__wcstod_internal -- underlying function for wcstod
__wcstof_internal -- underlying function for wcstof
__wcstol_internal -- underlying function for wcstol
__wcstold_internal -- underlying function for wcstold
__wcstombs_chk -- convert a wide-character string to a multibyte string, with buffer overflow checking
__wcstoul_internal -- underlying function for wcstoul
__wctomb_chk -- convert a wide character to a multibyte sequence, with buffer overflow checking
__wmemcpy_chk -- copy an array of wide-characters, with buffer overflow checking
__wmemmove_chk -- copy an array of wide-characters, with buffer overflow checking
__wmempcpy_chk -- copy memory area, with buffer overflow checking
__wmemset_chk -- fill an array of wide-characters with a constant wide character, with buffer overflow checking
__wprintf_chk -- convert formatted wide-character output, with stack checking
__xmknod -- make a special file
__xmknodat -- make a special file relative to a directory file descriptor
__xpg_basename -- return the last component of a file name
__xpg_sigpause -- remove a signal from the signal mask and suspend the thread
__xpg_strerror_r -- return string describing error number
__xstat -- get File Status
__xstat64 -- get File Status
_environ -- alias for environ - user environment
_nl_msg_cat_cntr -- new catalog load counter
_sys_errlist -- array containing the "C" locale strings used by strerror()
_sys_siglist -- array containing the names of the signal names
acct -- switch process accounting on or off
adjtime -- correct the time to allow synchronization of the system clock
alphasort64 -- Comparison function for directory scanning (Large File Support)
asprintf -- write formatted output to a dynamically allocated string
basename -- return the last component of a file name
bind_textdomain_codeset -- specify encoding for message retrieval
bindresvport -- bind socket to privileged IP port
bindtextdomain -- specify the location of a message catalog
cfmakeraw -- get and set terminal attributes
cfsetspeed -- set terminal input and output data rate
clearerr_unlocked -- non-thread-safe clearerr
daemon -- run in the background
dcgettext -- perform domain and category specific lookup in message catalog
dcngettext -- perform domain and category specific lookup in message catalog with plural
dgettext -- perform lookup in message catalog for the current LC_MESSAGES locale
dngettext -- perform lookup in message catalog for the current locale
drand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
duplocale -- provide new handle for selection of locale
endutent -- access utmp file entries
epoll_create -- open an epoll file descriptor
epoll_ctl -- control an epoll file descriptor
epoll_wait -- wait for I/O events on an epoll file descriptor
erand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
err -- display formatted error messages
error -- print error message
errx -- display formatted error message and exit
fcntl -- file control
feof_unlocked -- non-thread-safe feof
ferror_unlocked -- non-thread-safe ferror
fflush_unlocked -- non thread safe fflush
fgetc_unlocked -- non-thread-safe fgetc
fgets_unlocked -- non-thread-safe fgets
fgetwc_unlocked -- non thread safe fgetwc
fgetws_unlocked -- non-thread-safe fgetws
fileno_unlocked -- non-thread-safe fileno
flock -- apply or remove an advisory lock on an open file
fputc_unlocked -- non-thread-safe fputc
fputs_unlocked -- non-thread-safe fputs
fputwc_unlocked -- non-thread-safe fputwc
fputws_unlocked -- non-thread-safe fputws
fread_unlocked -- non-thread-safe fread
freelocale -- free a locale object
fscanf -- convert formatted input
fstatfs -- (deprecated)
fstatfs64 -- (deprecated)
fwrite_unlocked -- non-thread-safe fwrite
fwscanf -- convert formatted input
getdomainname -- get NIS domain name (DEPRECATED).
getdtablesize -- get file descriptor table size (DEPRECATED)
getgrent_r -- reentrantly get entry in group file
getgrouplist -- get groups a user belongs to
gethostbyaddr_r -- find network host database entry matching host name (DEPRECATED)
gethostbyname2 -- find network host database entry matching host name (DEPRECATED)
gethostbyname2_r -- find network host database entry matching host name (DEPRECATED)
gethostbyname_r -- find network host database entry matching host name (DEPRECATED)
getloadavg -- get system load averages
getopt -- parse command line options
getopt_long -- parse command line options
getopt_long_only -- parse command line options
getpagesize -- get memory page size (DEPRECATED)
getprotobyname_r -- retrieve information from the network protocol database by protocol name, reentrantly
getprotobynumber_r -- retrieve information from the network protocol database by protocol number, reentrantly
getprotoent_r -- read the next entry of the protocol database, reentrantly
getpwent_r -- reentrantly get entry in passwd file
getservbyname_r -- retrieve information from the network services database by service name, reentrantly
getservbyport_r -- retrieve information from the network services database by service port, reentrantly
getservent_r -- read the next entry of the network services database, reentrantly
getsockopt -- get socket options
gettext -- search message catalogs for a string
getutent -- access user accounting database entries
getutent_r -- access user accounting database entries
getwc_unlocked -- non-thread-safe getwc
getwchar_unlocked -- non-thread-safe getwchar
glob64 -- find pathnames matching a pattern (Large File Support)
globfree64 -- free memory from glob64() (Large File Support)
hcreate_r -- allocate space for a hash search table, reentrantly
hdestroy_r -- dispose of a hash search table, reentrantly
hsearch_r -- search a hash table, reentrantly
inet_aton -- Internet address manipulation routine
initgroups -- initialize the supplementary group access list
initstate_r -- reentrantly initialize a state array for random number generator functions
inotify_add_watch -- add a watch to a watch list
inotify_init -- instantiate inotify
inotify_rm_watch -- remove a watch from an inotify watch list
ioctl -- control device
sockio -- socket ioctl commands
ttyio -- tty ioctl commands
jrand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
kill -- send a signal
lcong48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
link -- create a link to a file
lrand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
mbsnrtowcs -- convert a multibyte string to a wide character string
memmem -- locate bytes
memrchr -- scan memory for a character
mkstemp64 -- create a unique temporary file (Large File Support)
mrand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
mremap -- remap a virtual memory address
newlocale -- allocate a locale object
ngettext -- search message catalogs for plural string
nrand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
openat64 -- open a file relative to a directory file descriptor (Large File Support)
pmap_getport -- find the port number assigned to a service registered with a portmapper.
pmap_set -- establishes mapping to machine's RPC Bind service.
pmap_unset --  destroys RPC Binding
posix_fadvise64 -- File advisory information (Large File Support)
posix_fallocate64 -- file space control (Large File Support)
psignal -- print signal message
putwc_unlocked -- non-thread-safe putwc
putwchar_unlocked -- non-thread-safe putwchar
random_r -- reentrantly generate pseudorandom numbers in a uniform distribution
readdir64_r -- read a directory (Large File Support)
regexec -- regular expression matching
scandir64 -- scan a directory (Large File Support)
scanf -- convert formatted input
sched_getaffinity -- retrieve the affinity mask of a process
sched_setaffinity -- set the CPU affinity mask for a process
sched_setscheduler -- set scheduling policy and parameters
seed48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
sendfile -- transfer data between two file descriptors
sendfile64 -- transfer data between two file descriptors (Large File Support)
setbuffer -- stream buffering operation
setgroups -- set list of supplementary group IDs
sethostname -- set host name
setsockopt -- set socket options
setstate_r -- reentrantly change the state array used by random number generator functions
setutent -- access user accounting database entries
sigandset -- build a new signal set by combining the two input sets using logical AND
sigisemptyset -- check for empty signal set
sigorset -- build a new signal set by combining the two input sets using logical OR
sigpause -- remove a signal from the signal mask and suspend the thread (deprecated)
sigreturn -- return from signal handler and cleanup stack frame
srand48_r -- reentrantly generate pseudorandom numbers in a uniform distribution
srandom_r -- reentrantly set the seed for a new sequence of pseudorandom numbers
sscanf -- convert formatted input
statfs -- (deprecated)
statfs64 -- (deprecated)
stime -- set time
stpcpy -- copy a string returning a pointer to its end
stpncpy -- copy a fixed-size string, returning a pointer to its end
strcasestr -- locate a substring ignoring case
strerror_r -- return string describing error number
strndup -- return a malloc'd copy of at most the specified number of bytes of a string
strnlen -- determine the length of a fixed-size string
strptime -- parse a time string
strsep -- extract token from string
strsignal -- return string describing signal
strtoq -- convert string value to a long or quad_t integer
strtouq -- convert a string to an unsigned long long
svc_register -- register Remote Procedure Call interface
svc_run -- waits for RPC requests to arrive and calls service procedure
svc_sendreply -- called by RPC service's dispatch routine
svctcp_create -- create a TCP/IP-based RPC service transport
svcudp_create --  create a UDP-based RPC service transport
swscanf -- convert formatted input
sysconf -- Get configuration information at runtime
system -- execute a shell command
textdomain -- set the current default message domain
unlink -- remove a directory entry
uselocale -- set locale for thread
utmpname -- set user accounting database
vasprintf -- write formatted output to a dynamically allocated string
vdprintf -- write formatted output to a file descriptor
verrx -- display formatted error message and exit
vfscanf -- convert formatted input
vfwscanf -- convert formatted input
vscanf -- convert formatted input
vsscanf -- convert formatted input
vswscanf -- convert formatted input
vsyslog -- log to system log
vwscanf -- convert formatted input
wait4 -- wait for process termination, BSD style
warn -- formatted error messages
warnx -- formatted error messages
wcpcpy -- copy a wide character string, returning a pointer to its end
wcpncpy -- copy a fixed-size string of wide characters, returning a pointer to its end
wcscasecmp -- compare two wide-character strings, ignoring case
wcsdup -- duplicate a wide-character string
wcsncasecmp -- compare two fixed-size wide-character strings, ignoring case
wcsnlen -- determine the length of a fixed-size wide-character string
wcsnrtombs -- convert a wide character string to a multi-byte string
wcstoq -- convert wide string to long long int representation
wcstouq -- convert wide string to unsigned long long int representation
wscanf -- convert formatted input
xdr_u_int -- library routines for external data representation
xdrstdio_create -- library routines for external data representation

The interfaces defined on the following pages are included in libc and are defined by this specification. Unless otherwise noted, these interfaces shall be included in the source standard.

Other interfaces listed in Section 13.3 shall behave as described in the referenced base document.