Linux C Functions List - 0.01 (based on Glibc Doc and Posix Doc)
Expand All + Collapse All -
Main Menu + Introduction Getting Started Standards and Portability ISO C POSIX (The Portable Operating System Interface) Berkeley Unix SVID (The System V Interface Description) XPG (The X/Open Portability Guide) Using the Library Header Files Macro Definitions of Functions Reserved Names Feature Test Macros Roadmap to the Manual + Error Reporting Checking for Errors Error Codes Error Messages err
error
error_at_line
errx
perror*
strerror*
strerror_r
verr
verrx
vwarn
vwarnx
warn
warnx
+ Virtual Memory Allocation And Paging Process Memory Concepts Allocating Storage For Program Data Memory Allocation in C Programs Dynamic Memory Allocation Unconstrained Allocation Basic Memory Allocation malloc*
Examples of malloc Freeing Memory Allocated with malloc cfree
free*
Changing the Size of a Block realloc*
Allocating Cleared Space calloc*
Efficiency Considerations for malloc Allocating Aligned Memory Blocks memalign
posix_memalign*
valloc
Malloc Tunable Parameters mallopt
Heap Consistency Checking mcheck
mprobe
Memory Allocation Hooks Statistics for Memory Allocation with malloc mallinfo
Summary of malloc-Related Functions Allocation Debugging How to install the tracing functionality mtrace
muntrace
Example program excerpts Some more or less clever ideas Interpreting the traces Obstacks Creating Obstacks Preparing for Using Obstacks obstack_chunk_alloc
obstack_chunk_free
obstack_init
Allocation in an Obstack obstack_alloc
obstack_copy
obstack_copy0
Freeing Objects in an Obstack obstack_free
Obstack Functions and Macros Growing Objects obstack_1grow
obstack_blank
obstack_finish
obstack_grow
obstack_grow0
obstack_int_grow
obstack_ptr_grow
Extra Fast Growing Objects obstack_1grow_fast
obstack_blank_fast
obstack_int_grow_fast
obstack_ptr_grow_fast
obstack_room
Status of an Obstack obstack_base
obstack_next_free
obstack_object_size
Alignment of Data in Obstacks obstack_alignment_mask
Obstack Chunks obstack_chunk_size
Summary of Obstack Functions Automatic Storage with Variable Size alloca
alloca Example Advantages of alloca Disadvantages of alloca GNU C Variable-Size Arrays Resizing the Data Segment
brk
sbrk
Locking Pages Why Lock Pages Locked Memory Details Functions To Lock And Unlock Pages mlock*
mlockall*
munlock*
munlockall*
Posix Functions posix_madvise*
posix_mem_offset*
mprotect*
Syscall sys_brk
sys_mprotect
sys_mlock
sys_munlock
sys_mlockall
sys_munlockall
sys_madvise
sys_swapon
sys_swapoff
sys_modify_ldt
sys_mincore
sys_readahead
sys_fadvise64
sys_fadvise64_64
sys_remap_file_pages
sys_mbind
sys_get_mempolicy
sys_set_mempolicy
+ Character Handling Classification of Characters isalnum*
isalpha*
isascii*
isblank*
iscntrl*
isdigit*
isgraph*
islower*
isprint*
ispunct*
isspace*
isupper*
isxdigit*
Case Conversion _tolower*
_toupper*
toascii*
tolower*
toupper*
Character class determination for wide characters iswalnum*
iswalpha*
iswblank*
iswcntrl*
iswctype*
iswdigit*
iswgraph*
iswlower*
iswprint*
iswpunct*
iswspace*
iswupper*
iswxdigit*
wctype*
Notes on using the wide character classes Mapping of wide characters. towctrans*
towlower*
towupper*
wctrans*
+ String and Array Utilities Representation of Strings String and Array Conventions String Length strlen*
strnlen
wcslen*
wcsnlen
Copying and Concatenation bcopy*
bzero*
memccpy*
memcpy*
memmove*
mempcpy
memset*
stpcpy
stpncpy
strcat*
strcpy*
strdup*
strdupa
strncat*
strncpy*
strndup
strndupa
wcpcpy
wcpncpy
wcscat*
wcscpy*
wcsdup
wcsncat*
wcsncpy*
wmemcpy*
wmemmove*
wmempcpy
wmemset*
String/Array Comparison bcmp*
memcmp*
strcasecmp*
strcmp*
strncasecmp*
strncmp*
strverscmp
wcscasecmp
wcscmp*
wcsncasecmp
wcsncmp*
wmemcmp*
Collation Functions strcoll*
strxfrm*
wcscoll*
wcsxfrm*
Search Functions index*
memchr*
memmem
memrchr
rawmemchr
rindex*
strcasestr
strchr*
strchrnul
strcspn*
strpbrk*
strrchr*
strspn*
strstr*
wcschr*
wcschrnul
wcscspn*
wcspbrk*
wcsrchr*
wcsspn*
wcsstr*
wcswcs*
wmemchr*
Compatibility String Search Functions Finding Tokens in a String basename*
dirname*
strsep
strtok*
strtok_r
wcstok*
strfry strfry
Trivial Encryption memfrob
Encode Binary Data a64l*
l64a*
Argz and Envz Vectors Argz Functions argz_add
argz_add_sep
argz_append
argz_count
argz_create
argz_create_sep
argz_delete
argz_extract
argz_insert
argz_next
argz_replace
argz_stringify
Envz Functions envz_add
envz_entry
envz_get
envz_merge
envz_strip
Posix Functions swab*
wcswidth*
wcwidth*
+ Character Set Handling Introduction to Extended Characters Overview about Character Handling Functions Restartable Multibyte Conversion Functions Selecting the conversion and its properties Representing the state of the conversion mbsinit*
Converting Single Characters btowc*
mbrlen*
mbrtowc*
wcrtomb*
wctob*
Converting Multibyte and Wide Character Strings mbsnrtowcs
mbsrtowcs*
wcsnrtombs
wcsrtombs*
A Complete Multibyte Conversion Example Non-reentrant Conversion Function Non-reentrant Conversion of Single Characters mblen*
mbtowc*
wctomb*
Non-reentrant Conversion of Strings mbstowcs*
wcstombs*
States in Non-reentrant Functions Generic Charset Conversion Generic Character Set Conversion Interface iconv*
iconv_close*
iconv_open*
A complete iconv example Some Details about other iconv Implementations The iconv Implementation in the GNU C library Format of gconv-modules files Finding the conversion path in iconv iconv module data structures iconv module interfaces + Locales and Internationalization What Effects a Locale Has Choosing a Locale Categories of Activities that Locales Affect How Programs Set the Locale setlocale*
Standard Locales Accessing Locale Information localeconv: It is portable but ... localeconv*
Generic Numeric Formatting Parameters Printing the Currency Symbol Printing the Sign of a Monetary Amount Pinpoint Access to Locale Data nl_langinfo*
A dedicated function to format numbers strfmon*
Yes-or-No Questions rpmatch
+ Message Translation X/Open Message Catalog Handling The catgets function family catclose*
catgets*
catopen*
Format of the message catalog files Generate Message Catalogs files How to use the catgets interface Not using symbolic names Using symbolic names How does to this allow to develop The Uniforum approach to Message Translation The gettext family of functions What has to be done to translate a message? dcgettext
dgettext
gettext
How to determine which catalog to be used bindtextdomain
textdomain
Additional functions for more complicated situations dcngettext
dngettext
ngettext
How to specify the output character set gettext uses bind_textdomain_codeset
How to use gettext in GUI programs User influence on gettext Programs to handle message catalogs for gettext + Searching and Sorting Defining the Comparison Function Array Search Function bsearch*
lfind*
lsearch*
Array Sort Function qsort*
Searching and Sorting Example The hsearch function. hcreate*
hcreate_r
hdestroy
hdestroy_r
hsearch
hsearch_r
The tsearch function. tdelete*
tdestroy
tfind*
tsearch*
twalk*
Posix Functions insque*
remque*
+ Pattern Matching Wildcard Matching fnmatch*
Globbing Calling glob glob*
glob64
Flags for Globbing More Flags for Globbing globfree
globfree64
Regular Expression Matching POSIX Regular Expression Compilation regcomp*
Flags for POSIX Regular Expressions Matching a Compiled POSIX Regular Expression regexec
Match Results with Subexpressions Complications in Subexpression Matching POSIX Regexp Matching Cleanup regerror
regfree
Shell-Style Word Expansion The Stages of Word Expansion Calling wordexp wordexp*
wordfree
Flags for Word Expansion wordexp Example Details of Tilde Expansion Details of Variable Substitution + Input/Output Overview Input/Output Concepts Streams and File Descriptors File Position File Names Directories File Name Resolution File Name Errors Portability of File Names + Input/Output on Streams Streams Standard Streams Opening Streams __freadable
__freading
__fwritable
__fwriting
fopen*
fopen64
freopen*
freopen64
Closing Streams fclose*
fcloseall
Streams and Threads __fsetlocking
flockfile*
ftrylockfile*
funlockfile*
Streams in Internationalized Applications fwide*
Simple Output by Characters or Lines fputc*
fputc_unlocked
fputs*
fputs_unlocked
fputwc*
fputwc_unlocked
fputws*
fputws_unlocked
putc*
putc_unlocked*
putchar*
putchar_unlocked*
puts*
putw
putwc*
putwc_unlocked
putwchar*
putwchar_unlocked
Character Input fgetc*
fgetc_unlocked
fgetwc*
fgetwc_unlocked
getc*
getc_unlocked*
getchar*
getchar_unlocked*
getw
getwc*
getwc_unlocked
getwchar*
getwchar_unlocked
Line-Oriented Input fgets*
fgets_unlocked
fgetws*
fgetws_unlocked
getdelim
getline
gets*
Unreading What Unreading Means Using ungetc To Do Unreading ungetc*
ungetwc*
Block Input/Output fread*
fread_unlocked
fwrite*
fwrite_unlocked
Formatted Output Formatted Output Basics Output Conversion Syntax Table of Output Conversions Integer Conversions Floating-Point Conversions Other Output Conversions Formatted Output Functions fprintf*
fwprintf*
printf*
snprintf*
sprintf*
swprintf*
wprintf*
Dynamically Allocating Formatted Output asprintf
obstack_printf
Variable Arguments Output Functions obstack_vprintf
vasprintf
vfprintf*
vfwprintf*
vprintf*
vsnprintf*
vsprintf
vswprintf*
vwprintf*
Parsing a Template String parse_printf_format
Example of Parsing a Template String Customizing printf Registering New Conversions register_printf_function
Conversion Specifier Options Defining the Output Handler printf Extension Example Predefined printf Handlers printf_size
printf_size_info
Formatted Input Formatted Input Basics Input Conversion Syntax Table of Input Conversions Numeric Input Conversions String Input Conversions Dynamically Allocating String Conversions Other Input Conversions Formatted Input Functions fscanf*
fwscanf*
scanf*
sscanf*
swscanf*
wscanf*
Variable Arguments Input Functions vfscanf*
vfwscanf*
vscanf*
vsscanf*
vswscanf*
vwscanf*
End-Of-File and Errors feof*
feof_unlocked
ferror*
ferror_unlocked
Recovering from errors clearerr*
clearerr_unlocked
Text and Binary Streams File Positioning fseek*
fseeko
fseeko64
ftell*
ftello
ftello64
rewind*
Portable File-Position Functions fgetpos*
fgetpos64
fsetpos*
fsetpos64
Stream Buffering Buffering Concepts Flushing Buffers __fpurge
_flushlbf
fflush*
fflush_unlocked
Controlling Which Kind of Buffering __fbufsize
__flbf
__fpending
setbuf*
setbuffer
setlinebuf
setvbuf*
Other Kinds of Streams String Streams fmemopen
open_memstream
Obstack Streams open_obstack_stream
Programming Your Own Custom Streams Custom Streams and Cookies fopencookie
Custom Stream Hook Functions Formatted Messages Printing Formatted Messages fmtmsg*
Adding Severity Classes addseverity
How to use fmtmsg and addseverity + Low-Level Input/Output Opening and Closing Files close*
creat*
creat64
open*
open64
Input and Output Primitives pread*
pread64
pwrite*
pwrite64
read*
write*
Setting the File Position of a Descriptor lseek*
lseek64
Descriptors and Streams fdopen*
fileno*
fileno_unlocked
Dangers of Mixing Streams and Descriptors Linked Channels Independent Channels Cleaning Streams fclean
Fast Scatter-Gather I/O readv*
writev*
Memory-mapped I/O madvise
mmap*
mmap64
mremap
msync*
munmap*
Waiting for Input or Output FD_CLR*
FD_ISSET
FD_SET
FD_ZERO
select*
Synchronizing I/O operations fdatasync*
fsync*
sync*
Perform I/O Operations in Parallel Asynchronous Read and Write Operations aio_read*
aio_read64
aio_write*
aio_write64
lio_listio*
lio_listio64
Getting the Status of AIO Operations aio_error*
aio_error64
aio_return*
aio_return64
Getting into a Consistent State aio_fsync*
aio_fsync64
aio_suspend*
aio_suspend64
Cancellation of AIO Operations aio_cancel*
aio_cancel64
How to optimize the AIO implementation aio_init
Control Operations on Files fcntl*
dup2
File Descriptor Flags File Status Flags File Access Modes Open-time Flags I/O Operating Modes Getting and Setting File Status Flags File Locks Interrupt-Driven Input Generic I/O Control operations ioctl*
Posix Functions getmsg*
getpmsg*
putmsg*
isastream*
fattach*
fdetach*
posix_fadvise*
posix_fallocate*
lockf*
poll*
pselect*
posix_typed_mem_get_info*
posix_typed_mem_open*
Syscall sys_read
sys_write
sys_open
sys_close
sys_creat
sys_sync
sys_dup
sys_ioctl
sys_fcntl
sys_dup2
old_mmap
sys_munmap
sys_fsync
old_select
sys_select
sys_msync
sys_readv
sys_writev
sys_fdatasync
sys_mremap
sys_poll
sys_pread64
sys_pwrite64
sys_mmap2
sys_fcntl64
sys_llseek
+ File System Interface Working Directory chdir*
fchdir*
get_current_dir_name
getcwd*
getwd*
Accessing Directories Format of a Directory Entry DTTOIF
IFTODT
Opening a Directory Stream dirfd
opendir*
Reading and Closing a Directory Stream closedir*
readdir*
readdir64
readdir64_r
readdir_r
Simple Program to List a Directory Random Access in a Directory Stream rewinddir*
seekdir*
telldir*
Scanning the Content of a Directory alphasort
alphasort64
scandir
scandir64
versionsort
versionsort64
Simple Program to List a Directory, Mark II Working with Directory Trees ftw*
ftw64
nftw*
nftw64
Hard Links link*
Symbolic Links canonicalize_file_name
readlink*
realpath*
symlink*
Deleting Files remove*
rmdir*
unlink*
Renaming Files rename*
Creating Directories mkdir*
File Attributes The meaning of the File Attributes Reading the Attributes of a File fstat*
fstat64
lstat*
lstat64
stat*
stat64
Testing the Type of a File S_ISBLK
S_ISCHR
S_ISDIR
S_ISFIFO
S_ISLNK
S_ISREG
S_ISSOCK
S_TYPEISMQ
S_TYPEISSEM
S_TYPEISSHM
File Owner chown*
fchown*
The Mode Bits for Access Permission How Your Access to a File is Decided Assigning File Permissions chmod*
fchmod*
getumask
umask*
Testing Permission to Access a File access*
File Times futimes
lutimes
utime*
utimes*
File Size ftruncate*
ftruncate64
truncate*
truncate64
Making Special Files mknod*
Temporary Files mkdtemp
mkstemp*
mktemp*
tempnam*
tmpfile*
tmpfile64
tmpnam*
tmpnam_r
Posix Functions fstatvfs*
statvfs*
lchown*
Syscall sys_link
sys_unlink
sys_chdir
sys_mknod
sys_chmod
sys_lchown16
sys_stat
sys_lseek
sys_mount
sys_oldumount
sys_fstat
sys_rename
sys_mkdir
sys_rmdir
sys_utime
sys_umount
sys_umask
sys_symlink
sys_lstat
sys_readlink
old_readdir
sys_truncate
sys_ftruncate
sys_fchmod
sys_fchown16
sys_fchdir
sys_chown16
sys_getcwd
sys_truncate64
sys_ftruncate64
sys_stat64
sys_lstat64
sys_fstat64
sys_lchown
sys_fchown
sys_chown
sys_utimes
sys_access
sys_ustat
sys_chroot
sys_uselib
sys_statfs
sys_fstatfs
sys_newstat
sys_newlstat
sys_newfstat
sys_ioperm
sys_iopl
sys_vhangup
sys_quotactl
sys_bdflush
sys_sysfs
sys_getdents
sys_getdents64
sys_flock
sys_nfsservctl
sys_sendfile
sys_sendfile64
sys_pivot_root
sys_setxattr
sys_lsetxattr
sys_fsetxattr
sys_getxattr
sys_lgetxattr
sys_fgetxattr
sys_listxattr
sys_llistxattr
sys_flistxattr
sys_removexattr
sys_lremovexattr
sys_fremovexattr
sys_io_setup
sys_io_destroy
sys_io_getevents
sys_io_submit
sys_io_cancel
sys_lookup_dcookie
sys_epoll_create
sys_epoll_ctl
sys_epoll_wait
sys_statfs64
sys_fstatfs64
+ Pipes and FIFOs Creating a Pipe pipe*
Pipe to a Subprocess pclose*
popen*
FIFO Special Files mkfifo*
Atomicity of Pipe I/O Syscall sys_pipe
+ Sockets Socket Concepts Communication Styles Socket Addresses Address Formats Setting the Address of a Socket bind*
Reading the Address of a Socket getsockname*
Interface Naming if_freenameindex*
if_indextoname*
if_nameindex*
if_nametoindex*
The Local Namespace Local Namespace Concepts Details of Local Namespace SUN_LEN
Example of Local-Namespace Sockets The Internet Namespace Internet Socket Address Formats Host Addresses Internet Host Addresses Host Address Data Type Host Address Functions inet_addr*
inet_aton
inet_lnaof
inet_makeaddr
inet_netof
inet_network
inet_ntoa
inet_ntop*
inet_pton
Host Names endhostent*
gethostbyaddr*
gethostbyaddr_r
gethostbyname
gethostbyname2
gethostbyname2_r
gethostbyname_r
gethostent*
sethostent*
Internet Ports The Services Database endservent*
getservbyname*
getservbyport
getservent
setservent*
Byte Order Conversion htonl*
htons
ntohl*
ntohs
Protocols Database endprotoent*
getprotobyname*
getprotobynumber
getprotoent
setprotoent*
Internet Socket Example Other Namespaces Opening and Closing Sockets Creating a Socket socket*
Closing a Socket shutdown*
Socket Pairs socketpair*
Using Sockets with Connections Making a Connection connect*
Listening for Connections listen*
Accepting Connections accept*
Who is Connected to Me? getpeername*
Transferring Data Sending Data send*
Receiving Data recv*
Socket Data Options Byte Stream Socket Example Byte Stream Connection Server Example Out-of-Band Data Datagram Socket Operations Sending Datagrams sendto*
Receiving Datagrams recvfrom*
Datagram Socket Example Example of Reading Datagrams The inetd Daemon inetd Servers Configuring inetd Socket Options Socket Option Functions getsockopt*
setsockopt*
Socket-Level Options Networks Database endnetent*
getnetbyaddr*
getnetbyname
getnetent
setnetent*
Posix Functions sockatmark*
sendmsg*
recvmsg*
freeaddrinfo*
getaddrinfo*
getnameinfo*
gai_strerror*
h_errno*
Syscall sys_socketcall
+ InterProcess Communication Posix IPC Message Queue mq_close*
mq_getattr*
mq_notify*
mq_open*
mq_receive*
mq_send*
mq_setattr*
mq_timedreceive*
mq_timedsend*
mq_unlink*
Semaphore sem_close*
sem_open*
sem_timedwait*
sem_unlink*
Shared Memory shm_open*
shm_unlink*
Sys V IPC ftok*
Message Queue msgctl*
msgget*
msgrcv*
msgsnd*
Semaphore semctl*
semget*
semop*
Shared Memory shmat*
shmctl*
shmdt*
shmget*
Syscall sys_ipc
sys_mq_open
sys_mq_unlink
sys_mq_timedsend
sys_mq_timedreceive
sys_mq_notify
sys_mq_getsetattr
sys_futex
+ Low-Level Terminal Interface Identifying Terminals isatty*
ttyname*
ttyname_r
I/O Queues Two Styles of Input: Canonical or Not Terminal Modes Terminal Mode Data Types Terminal Mode Functions tcgetattr*
tcsetattr*
Setting Terminal Modes Properly Input Modes Output Modes Control Modes Local Modes Line Speed cfgetispeed*
cfgetospeed*
cfsetispeed*
cfsetospeed*
cfsetspeed
Special Characters Characters for Input Editing Characters that Cause Signals Special Characters for Flow Control Other Special Characters Noncanonical Input cfmakeraw
BSD Terminal Modes gtty
stty
Line Control Functions tcdrain*
tcflow*
tcflush*
tcsendbreak*
Noncanonical Mode Example Pseudo-Terminals Allocating Pseudo-Terminals getpt
grantpt*
ptsname*
ptsname_r
unlockpt*
Opening a Pseudo-Terminal Pair forkpty
openpty
Posix Functions posix_openpt*
+ Syslog Overview of Syslog Submitting Syslog Messages openlog openlog*
syslog, vsyslog syslog*
vsyslog
closelog closelog*
setlogmask setlogmask*
Syslog Example Syscall sys_syslog
+ Mathematics Predefined Mathematical Constants Trigonometric Functions ccos*
ccosf
ccosl*
cos*
cosf
cosl*
csin*
csinf
csinl*
ctan*
ctanf
ctanl*
sin*
sincos
sincosf
sincosl
sinf
sinl*
tan*
tanf
tanl*
Inverse Trigonometric Functions acos*
acosf
acosl*
asin*
asinf
asinl*
atan*
atan2*
atan2f
atan2l
atanf*
atanl*
cacos*
cacosf
cacosl*
casin*
casinf
casinl*
catan*
catanf
catanl*
Exponentiation and Logarithms cbrt*
cbrtf
cbrtl
cexp*
cexpf
cexpl
clog*
clog10
clog10f
clog10l
clogf
clogl
cpow*
cpowf
cpowl
csqrt*
csqrtf
csqrtl
exp*
exp10
exp10f
exp10l
exp2*
exp2f
exp2l
expf
expl
expm1*
expm1f
expm1l
hypot*
hypotf
hypotl
ilogb*
ilogbf
ilogbl
log*
log10*
log10f
log10l
log1p*
log1pf
log1pl
log2*
log2f
log2l
logb*
logbf
logbl
logf*
logl
pow*
pow10
pow10f
pow10l
powf
powl
sqrt*
sqrtf
sqrtl
Hyperbolic Functions acosh*
acoshf
acoshl
asinh*
asinhf
asinhl
atanh*
atanhf
atanhl
cacosh*
cacoshf
cacoshl
casinh*
casinhf
casinhl
catanh*
catanhf
catanhl
ccosh*
ccoshf
ccoshl
cosh*
coshf
coshl
csinh*
csinhf
csinhl
ctanh*
ctanhf
ctanhl
sinh*
sinhf
sinhl
tanh*
tanhf
tanhl
Special Functions erf*
erfc*
erfcf
erfcl
erff*
erfl
gamma
gammaf
gammal
j0*
j0f
j0l
j1
j1f
j1l
jn
jnf
jnl
lgamma*
lgamma_r
lgammaf
lgammaf_r
lgammal
lgammal_r
tgamma*
tgammaf
tgammal
y0*
y0f
y0l
y1
y1f
y1l
yn
ynf
ynl
Known Maximum Errors in Math Functions Pseudo-Random Numbers ISO C Random Number Functions rand*
rand_r
srand*
BSD Random Number Functions initstate*
initstate_r
random*
random_r
setstate*
setstate_r
srandom*
srandom_r
SVID Random Number Function drand48*
drand48_r
erand48*
erand48_r
jrand48*
jrand48_r
lcong48*
lcong48_r
lrand48*
lrand48_r
mrand48*
mrand48_r
nrand48*
nrand48_r
seed48*
seed48_r
srand48*
srand48_r
Is Fast Code or Small Code preferred? Posix Functions remquo*
+ Arithmetic Functions Integers Integer Division div*
imaxdiv*
ldiv*
lldiv*
Floating Point Numbers Floating-Point Number Classification Functions finite
finitef
finitel
fpclassify*
isfinite*
isinf*
isinff
isinfl
isnan*
isnanf
isnanl
isnormal*
Errors in Floating-Point Calculations FP Exceptions matherr
Infinity and NaN Examining the FPU status word feclearexcept*
fegetexceptflag*
feraiseexcept*
fesetexceptflag*
fetestexcept*
Error Reporting by Mathematical Functions Rounding Modes fegetround*
fesetround*
Floating-Point Control Functions fedisableexcept
feenableexcept
fegetenv*
fegetexcept
feholdexcept*
fesetenv*
feupdateenv*
Arithmetic Functions Absolute Value abs*
cabs*
cabsf
cabsl
fabs*
fabsf
fabsl
imaxabs*
labs*
llabs*
Normalization Functions frexp*
frexpf
frexpl
ldexp*
ldexpf
ldexpl
scalb*
scalbf
scalbl
scalbln*
scalblnf
scalblnl
scalbn
scalbnf
scalbnl
significand
significandf
significandl
Rounding Functions ceil*
ceilf
ceill
floor*
floorf
floorl
llrint*
llrintf
llrintl
llround*
llroundf
llroundl
lrint*
lrintf
lrintl
lround*
lroundf
lroundl
modf*
modff
modfl
nearbyint*
nearbyintf
nearbyintl
rint*
rintf
rintl
round*
roundf
roundl
trunc*
truncf*
truncl
Remainder Functions drem
dremf
dreml
fmod*
fmodf
fmodl
remainder*
remainderf
remainderl
Setting and modifying single bits of FP values copysign*
copysignf
copysignl
nan*
nanf
nanl
nextafter*
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
signbit*
Floating-Point Comparison Functions isgreater*
isgreaterequal*
isless*
islessequal*
islessgreater*
isunordered*
Miscellaneous FP arithmetic functions fdim*
fdimf
fdiml
fma*
fmaf
fmal
fmax*
fmaxf
fmaxl
fmin*
fminf
fminl
Complex Numbers Projections, Conjugates, and Decomposing of Complex Numbers carg*
cargf
cargl
cimag*
cimagf
cimagl
conj*
conjf
conjl
cproj*
cprojf
cprojl
creal*
crealf
creall
Parsing of Numbers Parsing of Integers atoi*
atol*
atoll
strtoimax*
strtol*
strtoll*
strtoq
strtoul*
strtoull
strtoumax*
strtouq
wcstoimax*
wcstol*
wcstoll*
wcstoq
wcstoul*
wcstoull
wcstoumax*
wcstouq
Parsing of Floats atof*
strtod*
strtof
strtold*
wcstod*
wcstof
wcstold*
Old-fashioned System V number-to-string functions ecvt*
ecvt_r
fcvt*
fcvt_r
gcvt*
qecvt
qecvt_r
qfcvt
qfcvt_r
qgcvt
Posix Functions ffs*
+ Date and Time Time Basics Elapsed Time difftime*
Processor And CPU Time CPU Time Inquiry clock*
Processor Time Inquiry times*
Calendar Time Simple Calendar Time stime
time*
High-Resolution Calendar adjtime
adjtimex
gettimeofday*
settimeofday
Broken-down Time gmtime*
gmtime_r
localtime*
localtime_r
mktime*
timegm
timelocal
High Accuracy Clock ntp_adjtime
ntp_gettime
Formatting Calendar Time asctime*
asctime_r
ctime*
ctime_r
strftime*
wcsftime*
Convert textual time and date information back Interpret string according to given format strptime*
A More User-friendly Way to Parse Times and Dates getdate*
getdate_r
Specifying the Time Zone with TZ Functions and Variables for Time Zones tzset*
Time Functions Example Setting an Alarm alarm*
getitimer*
setitimer*
Sleeping nanosleep*
sleep*
Posix Functions usleep*
clock_getcpuclockid*
clock_getres*
clock_nanosleep*
clock_settime*
daylight*
ftime*
timezone*
Syscall sys_gettimeofday
sys_settimeofday
sys_setitimer
sys_getitimer
sys_adjtimex
sys_nanosleep
sys_clock_settime
sys_clock_gettime
sys_clock_getres
sys_clock_nanosleep
sys_time
sys_stime
sys_alarm
sys_times
+ Resource Usage And Limitation Resource Usage getrusage*
vtimes
Limiting Resource Usage getrlimit*
getrlimit64
setrlimit*
setrlimit64
ulimit*
vlimit
Process CPU Priority And Scheduling Absolute Priority Using Absolute Priority Realtime Scheduling Basic Scheduling Functions sched_get_priority_max*
sched_get_priority_min
sched_getparam*
sched_getscheduler*
sched_rr_get_interval*
sched_setparam*
sched_setscheduler*
sched_yield*
Traditional Scheduling Introduction To Traditional Scheduling Functions For Traditional Scheduling getpriority*
nice*
setpriority*
Limiting execution to certain CPUs CPU_CLR
CPU_ISSET
CPU_SET
CPU_ZERO
sched_getaffinity
sched_setaffinity
Querying memory available resources Overview about traditional Unix memory handling How to get information about the memory subsystem? get_avphys_pages
get_phys_pages
getpagesize
Learn about the processors available get_nprocs
get_nprocs_conf
getloadavg
Syscall sys_nice
sys_setrlimit
sys_getrusage
sys_getpriority
sys_setpriority
sys_sched_setparam
sys_sched_getparam
sys_sched_setscheduler
sys_sched_getscheduler
sys_sched_yield
sys_sched_get_priority_max
sys_sched_get_priority_min
sys_sched_rr_get_interval
sys_getrlimit
sys_sched_setaffinity
sys_sched_getaffinity
sys_old_getrlimit
sys_capget
sys_capset
+ Non-Local Exits Introduction to Non-Local Exits Details of Non-Local Exits longjmp*
setjmp*
Non-Local Exits and Signals siglongjmp*
sigsetjmp*
Complete Context Control getcontext*
makecontext*
setcontext*
swapcontext*
Posix Functions _longjmp*
+ Signal Handling Basic Concepts of Signals Some Kinds of Signals Concepts of Signal Generation How Signals Are Delivered Standard Signals Program Error Signals Termination Signals Alarm Signals Asynchronous I/O Signals Job Control Signals Operation Error Signals Miscellaneous Signals Signal Messages psignal
strsignal
Specifying Signal Actions Basic Signal Handling signal*
ssignal
sysv_signal
Advanced Signal Handling sigaction*
Interaction of signal and sigaction sigaction Function Example Flags for sigaction Initial Signal Actions Defining Signal Handlers Signal Handlers that Return Handlers That Terminate the Process Nonlocal Control Transfer in Handlers Signals Arriving While a Handler Runs Signals Close Together Merge into One Signal Handling and Nonreentrant Functions Atomic Data Access and Signal Handling Problems with Non-Atomic Access Atomic Types Atomic Usage Patterns Primitives Interrupted by Signals TEMP_FAILURE_RETRY
Generating Signals Signaling Yourself gsignal
raise*
Signaling Another Process kill*
killpg*
Permission for using kill Using kill for Communication Blocking Signals Why Blocking Signals is Useful Signal Sets sigaddset*
sigdelset*
sigemptyset*
sigfillset*
sigismember*
Process Signal Mask sigprocmask*
Blocking to Test for Delivery of a Signal Blocking Signals for a Handler Checking for Pending Signals sigpending*
Remembering a Signal to Act On Later Waiting for a Signal Using pause pause*
Problems with pause Using sigsuspend sigsuspend*
Using a Separate Signal Stack sigaltstack*
sigstack
BSD Signal Handling BSD Function to Establish a Handler siginterrupt*
sigvec
BSD Functions for Blocking Signals sigblock
sigmask
sigpause*
sigsetmask
Posix Functions bsd_signal*
sighold*
sigqueue*
sigrelse*
sigtimedwait*
sigwaitinfo*
timer_create*
timer_delete*
timer_getoverrun*
ualarm*
Syscall sys_pause
sys_kill
sys_signal
sys_sigaction
sys_sigsuspend
sys_sigpending
sys_sigprocmask
sys_sigaltstack
sys_timer_create
sys_timer_settime
sys_timer_gettime
sys_timer_getoverrun
sys_timer_delete
sys_sgetmask
sys_ssetmask
sys_sigreturn
sys_rt_sigreturn
sys_rt_sigaction
sys_rt_sigprocmask
sys_rt_sigpending
sys_rt_sigtimedwait
sys_rt_sigqueueinfo
sys_rt_sigsuspend
sys_gettid
sys_tkill
sys_tgkill
+ The Basic Program/System Interface Program Arguments main
Program Argument Syntax Conventions Parsing Program Arguments Parsing program options using getopt Using the getopt function getopt*
Example of Parsing Arguments with getopt Parsing Long Options with getopt_long getopt_long
getopt_long_only
Example of Parsing Long Options with getopt_long Parsing Program Options with Argp argp_parse
The argp_parse Function Argp Global Variables Specifying Argp Parsers Specifying Options in an Argp Parser Flags for Argp Options Argp Parser Functions Special Keys for Argp Parser Functions Functions For Use in Argp Parsers argp_error
argp_failure
argp_state_help
argp_usage
Argp Parsing State Combining Multiple Argp Parsers Flags for argp_parse Customizing Argp Help Output Special Keys for Argp Help Filter Functions The argp_help Function argp_help
Flags for the argp_help Function Argp Examples A Minimal Program Using Argp A Program Using Argp with Only Default Options A Program Using Argp with User Options A Program Using Multiple Combined Argp Parsers Argp User Customization Parsing of Suboptions getsubopt*
Parsing of Suboptions Example Environment Variables Environment Access clearenv
getenv*
putenv*
setenv*
unsetenv*
Standard Environment Variables System Calls syscall
Program Termination Normal Termination exit*
Exit Status Cleanups on Exit atexit*
on_exit
Aborting a Program abort*
Termination Internals _Exit*
_exit*
Posix Functions optarg*
+ Processes Running a Command system*
Process Creation Concepts Process Identification getpid*
getppid*
Creating a Process fork*
vfork*
Executing a File execl
execle
execlp
execv
execve
execvp
Process Completion wait*
wait4
waitpid*
Process Completion Status WCOREDUMP
WEXITSTATUS
WIFEXITED
WIFSIGNALED
WIFSTOPPED
WSTOPSIG
WTERMSIG
BSD Process Wait Functions wait3
Process Creation Example Posix Functions environ*
waitid*
Posix Functions - Dynamic Library dlclose*
dlerror*
dlopen*
dlsym*
Posix Functions _spawn posix_spawn*
posix_spawn_file_actions_addclose*
posix_spawn_file_actions_adddup2*
posix_spawn_file_actions_addopen*
posix_spawn_file_actions_destroy*
posix_spawnattr_destroy*
posix_spawnattr_getflags*
posix_spawnattr_getpgroup*
posix_spawnattr_getschedparam*
posix_spawnattr_getschedpolicy*
posix_spawnattr_getsigdefault*
posix_spawnattr_getsigmask*
posix_spawnattr_init*
posix_spawnattr_setflags*
posix_spawnattr_setpgroup*
posix_spawnattr_setschedparam*
posix_spawnattr_setschedpolicy*
posix_spawnattr_setsigdefault*
posix_spawnattr_setsigmask*
posix_spawnp*
Syscall sys_exit
sys_fork
sys_waitpid
sys_execve
sys_getpid
sys_getppid
sys_wait4
sys_vfork
sys_waitid
sys_clone
sys_personality
sys_set_tid_address
+ Job Control Concepts of Job Control Job Control is Optional Controlling Terminal of a Process Access to the Controlling Terminal Orphaned Process Groups Implementing a Job Control Shell Data Structures for the Shell Initializing the Shell Launching Jobs Foreground and Background Stopped and Terminated Jobs Continuing Stopped Jobs The Missing Pieces Functions for Job Control Identifying the Controlling Terminal ctermid*
Process Group Functions getpgid*
getpgrp*
getsid*
setpgid*
setpgrp*
setsid*
Functions for Controlling Terminal Access tcgetpgrp*
tcgetsid*
tcsetpgrp*
Syscall sys_setpgid
sys_getpgrp
sys_setsid
sys_getpgid
sys_getsid
+ System Databases and Name Service Switch NSS Basics The NSS Configuration File Services in the NSS configuration File Actions in the NSS configuration notfound
success
tryagain
unavail
Notes on the NSS Configuration File NSS Module Internals The Naming Scheme of the NSS Modules The Interface of the Function in NSS Modules Extending NSS Adding another Service to NSS Internals of the NSS Module Functions + Users and Groups User and Group IDs The Persona of a Process Why Change the Persona of a Process? How an Application Can Change Persona Reading the Persona of a Process getegid*
geteuid*
getgid*
getgroups*
getuid*
Setting the User ID seteuid*
setreuid*
setuid*
Setting the Group IDs getgrouplist
initgroups
setegid*
setgid*
setgroups
setregid*
Enabling and Disabling Setuid Access Setuid Program Example Tips for Writing Setuid Programs Identifying Who Logged In cuserid
getlogin*
The User Accounting Database Manipulating the User Accounting Database endutent
getutent
getutent_r
getutid
getutid_r
getutline
getutline_r
pututline
setutent
updwtmp
utmpname
XPG User Accounting Database Functions endutxent*
getutmp
getutmpx
getutxent*
getutxid
getutxline
pututxline*
setutxent*
utmpxname
Logging In and Out login
login_tty
logout
logwtmp
User Database The Data Structure that Describes a User Looking Up One User getpwnam*
getpwnam_r
getpwuid*
getpwuid_r
Scanning the List of All Users endpwent*
fgetpwent
fgetpwent_r
getpwent*
getpwent_r
setpwent*
Writing a User Entry putpwent
Group Database The Data Structure for a Group Looking Up One Group getgrgid*
getgrgid_r
getgrnam*
getgrnam_r
Scanning the List of All Groups endgrent*
fgetgrent
fgetgrent_r
getgrent*
getgrent_r
setgrent*
User and Group Database Example Netgroup Database Netgroup Data Looking up one Netgroup endnetgrent
getnetgrent
getnetgrent_r
setnetgrent
Testing for Netgroup Membership innetgr
Syscall sys_setuid16
sys_getuid16
sys_setgid16
sys_getgid16
sys_geteuid16
sys_getegid16
sys_setreuid16
sys_setregid16
sys_getgroups16
sys_setgroups16
sys_getuid
sys_getgid
sys_geteuid
sys_getegid
sys_setreuid
sys_setregid
sys_getgroups
sys_setgroups
sys_setuid
sys_setgid
sys_newuname
sys_olduname
sys_setfsuid16
sys_setfsgid16
sys_setresuid16
sys_getresuid16
sys_setresgid16
sys_getresgid16
sys_setresuid
sys_getresuid
sys_setresgid
sys_getresgid
sys_setfsuid
sys_setfsgid
+ System Management Host Identification getdomainnname
gethostid*
gethostname*
setdomainname
sethostid
sethostname
Platform Type Identification uname*
Controlling and Querying Mounts Mount Information The fstab file endfsent
getfsent
getfsfile
getfsspec
setfsent
The mtab file addmntent
endmntent
getmntent
getmntent_r
hasmntopt
setmntent
Other (Non-libc) Sources of Mount Information Mount, Unmount, Remount mount
umount
umount2
System Parameters sysctl
Syscall sys_sethostname
sys_uname
sys_setdomainname
sys_sysctl
sys_restart_syscall
sys_vm86old
sys_reboot
sys_sysinfo
sys_init_module
sys_delete_module
sys_vm86
sys_prctl
sys_acct
+ System Configuration Parameters General Capacity Limits Overall System Options Which Version of POSIX is Supported Using sysconf Definition of sysconf sysconf*
Constants for sysconf Parameters Examples of sysconf Minimum Values for General Capacity Limits Limits on File System Capacity Optional Features in File Support Minimum Values for File System Limits Using pathconf fpathconf*
pathconf*
Utility Program Capacity Limits Minimum Values for Utility Limits String-Valued Parameters confstr*
+ DES Encryption and Password Handling Legal Problems Reading Passwords getpass
Encrypting Passwords crypt*
crypt_r
DES Encryption cbc_crypt
DES_FAILED
des_setparity
ecb_crypt
encrypt*
encrypt_r
setkey*
setkey_r
+ Debugging support Backtraces backtrace
backtrace_symbols
backtrace_symbols_fd
Posix Functions posix_trace_attr_destroy*
posix_trace_attr_getclockres*
posix_trace_attr_getinherited*
posix_trace_attr_getlogsize*
posix_trace_attr_getname*
posix_trace_attr_getstreamfullpolicy*
posix_trace_attr_getstreamsize*
posix_trace_attr_init*
posix_trace_attr_setinherited*
posix_trace_attr_setlogsize*
posix_trace_attr_setname*
posix_trace_attr_setstreamfullpolicy*
posix_trace_attr_setstreamsize*
posix_trace_clear*
posix_trace_close*
posix_trace_create*
posix_trace_event*
posix_trace_eventid_equal*
posix_trace_eventid_open*
posix_trace_eventset_add*
posix_trace_eventtypelist_getnext_id*
posix_trace_flush*
posix_trace_get_attr*
posix_trace_get_filter*
posix_trace_get_status*
posix_trace_getnext_event*
posix_trace_open*
posix_trace_set_filter*
posix_trace_shutdown*
posix_trace_start*
posix_trace_timedgetnext_event*
posix_trace_trid_eventid_open*
posix_trace_trygetnext_event*
Syscall sys_ptrace
+ POSIX Threads Basic Thread Operations pthread_cancel*
pthread_create*
pthread_exit*
pthread_join*
Thread Attributes pthread_attr_destroy*
pthread_attr_getattr
pthread_attr_getdetachstate*
pthread_attr_getguardsize*
pthread_attr_getinheritsched*
pthread_attr_getschedparam*
pthread_attr_getschedpolicy*
pthread_attr_getscope*
pthread_attr_getstack*
pthread_attr_getstackaddr*
pthread_attr_getstacksize*
pthread_attr_init*
pthread_attr_setattr
pthread_attr_setdetachstate*
pthread_attr_setguardsize*
pthread_attr_setinheritsched*
pthread_attr_setschedparam*
pthread_attr_setschedpolicy*
pthread_attr_setscope*
pthread_attr_setstack*
pthread_attr_setstackaddr*
pthread_attr_setstacksize*
Cancellation pthread_setcancelstate*
pthread_setcanceltype
pthread_testcancel*
Cleanup Handlers pthread_cleanup_pop*
pthread_cleanup_pop_restore_np
pthread_cleanup_push
pthread_cleanup_push_defer_np
Mutexes pthread_mutex_destroy*
pthread_mutex_init*
pthread_mutex_lock*
pthread_mutex_timedlock*
pthread_mutex_trylock*
pthread_mutex_unlock
pthread_mutexattr_destroy*
pthread_mutexattr_gettype*
pthread_mutexattr_init*
pthread_mutexattr_settype*
Condition Variables pthread_cond_broadcast*
pthread_cond_destroy*
pthread_cond_init
pthread_cond_signal*
pthread_cond_timedwait*
pthread_cond_wait
pthread_condattr_destroy*
pthread_condattr_init*
POSIX Semaphores sem_destroy*
sem_getvalue*
sem_init*
sem_post*
sem_trywait*
sem_wait*
Thread-Specific Data pthread_getspecific*
pthread_key_create*
pthread_key_delete*
pthread_setspecific*
Threads and Signal Handling pthread_kill*
pthread_sigmask*
sigwait*
Threads and Fork pthread_atfork*
Streams and Fork Miscellaneous Thread Functions pthread_detach*
pthread_equal*
pthread_getconcurrency*
pthread_getschedparam*
pthread_kill_other_threads_np
pthread_once*
pthread_self*
pthread_setconcurrency*
pthread_setschedparam*
Posix Functions pthread_barrier_destroy*
pthread_barrier_wait*
pthread_barrierattr_destroy*
pthread_barrierattr_getpshared*
pthread_barrierattr_init*
pthread_barrierattr_setpshared*
pthread_condattr_getclock*
pthread_condattr_getpshared*
pthread_condattr_setclock*
pthread_condattr_setpshared*
pthread_getcpuclockid*
pthread_mutex_getprioceiling*
pthread_mutex_setprioceiling*
pthread_mutexattr_getprioceiling*
pthread_mutexattr_getprotocol*
pthread_mutexattr_getpshared*
pthread_mutexattr_setprioceiling*
pthread_mutexattr_setprotocol*
pthread_mutexattr_setpshared*
pthread_rwlock_destroy*
pthread_rwlock_rdlock*
pthread_rwlock_timedrdlock*
pthread_rwlock_timedwrlock*
pthread_rwlock_tryrdlock*
pthread_rwlock_trywrlock*
pthread_rwlock_unlock*
pthread_rwlock_wrlock*
pthread_rwlockattr_destroy*
pthread_rwlockattr_getpshared*
pthread_rwlockattr_init*
pthread_rwlockattr_setpshared*
pthread_setschedprio*
pthread_spin_destroy*
pthread_spin_lock*
pthread_spin_unlock*
Syscall sys_set_thread_area
sys_get_thread_area
sys_exit_group
+ C Language Facilities in the Library Explicitly Checking Internal Consistency assert*
assert_perror
Variadic Functions Why Variadic Functions are Used How Variadic Functions are Defined and Used Syntax for Variable Arguments Receiving the Argument Values How Many Arguments Were Supplied Calling Variadic Functions Argument Access Macros __va_copy
va_arg*
va_end
Example of a Variadic Function Old-Style Variadic Functions va_alist
va_dcl
va_start
Null Pointer Constant Important Data Types Data Type Measurements Computing the Width of an Integer Data Type Range of an Integer Type Floating Type Macros Floating Point Representation Concepts Floating Point Parameters IEEE Floating Point Structure Field Offset Measurement offsetof
Summary of Library Facilities + Installing the GNU C Library Configuring and compiling GNU Libc Installing the C Library Recommended Tools for Compilation Supported Configurations Specific advice for GNU/Linux systems Reporting Bugs + Library Maintenance Adding New Functions Porting the GNU C Library Layout of the sysdeps Directory Hierarchy Porting the GNU C Library to Unix Systems Contributors to the GNU C Library Free Software Needs Free Documentation + GNU Lesser General Public License Preamble How to Apply These Terms to Your New Libraries + GNU Free Documentation License ADDENDUM: How to use this License for your documents Concept Index Type Index Function and Macro Index Variable and Constant Macro Index Program and File Index + Note What this is
Linux C functions list
Version:
0.01 (2005.4 - 2005.8)
How to use this page
Paste the html content into Glibc doc "libc_entire.html"
Glibc doc
This is Edition 0.10, last updated 2001-07-06, of The GNU C Library Reference Manual, for Version 2.3.x.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
http://www.gnu.org/software/libc/libc.html
Posix doc
The Open Group Base Specifications Issue 6 - IEEE Std 1003.1, 2004 Edition
Copyright ? 2001-2004 The IEEE and The Open Group
http://www.opengroup.org/onlinepubs/009695399/toc.htm
func-name*
The function is also in Posix doc
Total functions
1513 (in Glibc doc: 1335, in Posix doc: 865, only in Posix doc: 177)
Report bug to
lu_yi_ming(_at_)sina.com (_at_) should be @