[][src]Crate libc

libc - Raw FFI bindings to platforms' system libraries

Documentation for other platforms.

Structs

Dl_info
addrinfo
cmsghdr
dirent
fd_set
flock
glob_t
group
hostent
in6_addr
in_addr
iovec
ip_mreq
ipv6_mreq
itimerval
lconv
linger
msghdr
passwd
pollfd
protoent
pthread_cond_t
pthread_condattr_t
pthread_mutex_t
pthread_rwlock_t
rlimit
rusage
sem_t
servent
sigaction
sigevent
siginfo_t
sigval
sockaddr
sockaddr_in
sockaddr_in6
sockaddr_storage
sockaddr_un
stack_t
stat
statvfs
termios
timespec
timeval
tm
tms
utimbuf
utsname
winsize

Enums

DIR
FILE
c_void

Equivalent to C's void type when used as a pointer.

fpos_t
timezone

Constants

AF_APPLETALK
AF_BLUETOOTH
AF_DLI
AF_INET
AF_INET6
AF_IPX
AF_LINK
AF_LOCAL
AF_NOTIFY
AF_ROUTE
AF_UNIX
AF_UNSPEC
ARPOP_REPLY
ARPOP_REQUEST
ATF_COM
ATF_PERM
ATF_PUBL
ATF_USETRAILERS
AT_EACCESS
AT_FDCWD
AT_REMOVEDIR
AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW
B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B31250
B38400
B57600
B115200
B230400
BRKINT
BS0
BS1
BSDLY
BUFSIZ
CLOCAL
CLOCK_MONOTONIC
CLOCK_REALTIME
CR0
CR1
CR2
CR3
CRDLY
CREAD
CRTSCTS
CS5
CS6
CS7
CS8
CSIZE
CSTOPB
CTSFLOW
DT_BLK
DT_CHR
DT_DIR
DT_FIFO
DT_LNK
DT_REG
DT_SOCK
DT_UNKNOWN
E2BIG
EACCES
EADDRINUSE
EADDRNOTAVAIL
EAFNOSUPPORT
EAGAIN
EAI_AGAIN
EAI_BADFLAGS
EAI_FAIL
EAI_FAMILY
EAI_MEMORY
EAI_NODATA
EAI_NONAME
EAI_OVERFLOW
EAI_SERVICE
EAI_SOCKTYPE
EAI_SYSTEM
EALREADY
EBADF
EBADMSG
EBUSY
ECANCELED
ECHILD
ECHO
ECHOCTL
ECHOE
ECHOK
ECHOKE
ECHONL
ECHOPRT
ECONNABORTED
ECONNREFUSED
ECONNRESET
EDEADLK
EDESTADDRREQ
EDOM
EDQUOT
EEXIST
EFAULT
EFBIG
EFPOS
EHOSTDOWN
EHOSTUNREACH
EIDRM
EILSEQ
EINPROGRESS
EINTR
EINVAL
EIO
EISCONN
EISDIR
ELOOP
EMFILE
EMLINK
EMSGSIZE
EMULTIHOP
ENAMETOOLONG
ENETDOWN
ENETRESET
ENETUNREACH
ENFILE
ENOATTR
ENOBUFS
ENODATA
ENODEV
ENOENT
ENOEXEC
ENOLCK
ENOLINK
ENOMEM
ENOMSG
ENOPROTOOPT
ENOSPC
ENOSR
ENOSTR
ENOSYS
ENOTCONN
ENOTDIR
ENOTEMPTY
ENOTSOCK
ENOTSUP
ENOTTY
ENXIO
EOF
EOPNOTSUPP
EOVERFLOW
EPERM
EPFNOSUPPORT
EPIPE
EPROTO
EPROTONOSUPPORT
EPROTOTYPE
ERANGE
EROFS
ESHUTDOWN
ESIGPARM
ESPIPE
ESRCH
ESTALE
ETIME
ETIMEDOUT
ETXTBSY
EWOULDBLOCK
EXDEV
EXIT_FAILURE
EXIT_SUCCESS
FD_CLOEXEC
FD_SETSIZE
FF0
FF1
FFDLY
FILENAME_MAX
FIOCLEX
FIONBIO
FLUSHO
FOPEN_MAX
F_DUPFD
F_DUPFD_CLOEXEC
F_GETFD
F_GETFL
F_GETLK
F_OK
F_RDLCK
F_SETFD
F_SETFL
F_SETLK
F_SETLKW
F_UNLCK
F_WRLCK
GRPQUOTA
HUPCL
ICANON
ICRNL
IEXTEN
IFF_ALLMULTI
IFF_AUTOUP
IFF_AUTO_CONFIGURED
IFF_BROADCAST
IFF_CONFIGURING
IFF_LINK
IFF_LOOPBACK
IFF_MULTICAST
IFF_NOARP
IFF_POINTOPOINT
IFF_PROMISC
IFF_SIMPLEX
IFF_UP
IFNAMSIZ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G
LOG_USER
LOG_UUCP
LOG_WARNING
L_tmpnam
MADV_DONTNEED
MADV_NORMAL
MADV_RANDOM
MADV_SEQUENTIAL
MADV_WILLNEED
MAP_ANON
MAP_ANONYMOUS
MAP_FAILED
MAP_FILE
MAP_FIXED
MAP_PRIVATE
MAP_SHARED
MSG_BCAST
MSG_CTRUNC
MSG_DONTROUTE
MSG_DONTWAIT
MSG_EOF
MSG_EOR
MSG_MCAST
MSG_NOSIGNAL
MSG_OOB
MSG_PEEK
MSG_TRUNC
MSG_WAITALL
MS_ASYNC
MS_INVALIDATE
MS_SYNC
NCCS
NI_MAXHOST
NL0
NL1
NLDLY
NOFLSH
OCRNL
OFDEL
OFILL
OLCUC
ONLCR
ONLRET
ONOCR
OPOST
O_ACCMODE
O_APPEND
O_CLOEXEC
O_CREAT
O_DIRECTORY
O_DSYNC
O_EXCL
O_NOCACHE
O_NOCTTY
O_NOFOLLOW
O_NONBLOCK
O_NOTRAVERSE
O_RDONLY
O_RDWR
O_RSYNC
O_SYNC
O_TRUNC
O_WRONLY
PARENB
PARMRK
PARODD
PATH_MAX
PENDIN
POLLERR
POLLHUP
POLLIN
POLLNVAL
POLLOUT
POLLPRI
POLLRDBAND
POLLRDNORM
POLLWRBAND
POLLWRNORM
PRIO_MAX
PRIO_MIN
PRIO_PGRP
PRIO_PROCESS
PRIO_USER
PROT_EXEC
PROT_NONE
PROT_READ
PROT_WRITE
PTHREAD_COND_INITIALIZER
PTHREAD_CREATE_DETACHED
PTHREAD_CREATE_JOINABLE
PTHREAD_MUTEX_DEFAULT
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_INITIALIZER
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_RECURSIVE
PTHREAD_RWLOCK_INITIALIZER
PTHREAD_STACK_MIN
P_ALL
P_PGID
P_PID
RAND_MAX
RLIMIT_AS
RLIMIT_CORE
RLIMIT_CPU
RLIMIT_DATA
RLIMIT_FSIZE
RLIMIT_NLIMITS
RLIMI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_SYMLINK_MAX
_PC_SYNC_IO
_PC_VDISABLE
_PC_XATTR_ENABLED
_PC_XATTR_EXISTS
_SC_ARG_MAX
_SC_ATEXIT_MAX
_SC_AVPHYS_PAGES
_SC_CHILD_MAX
_SC_CLK_TCK
_SC_CPUTIME
_SC_DELAYTIMER_MAX
_SC_GETGR_R_SIZE_MAX
_SC_GETPW_R_SIZE_MAX
_SC_HOST_NAME_MAX
_SC_IOV_MAX
_SC_JOB_CONTROL
_SC_MAPPED_FILES
_SC_MEMORY_PROTECTION
_SC_MONOTONIC_CLOCK
_SC_NGROUPS_MAX
_SC_NPROCESSORS_CONF
_SC_NPROCESSORS_ONLN
_SC_OPEN_MAX
_SC_PAGESIZE
_SC_PAGE_SIZE
_SC_PASS_MAX
_SC_PHYS_PAGES
_SC_PIPE
_SC_POLL
_SC_REALTIME_SIGNALS
_SC_REGEXP
_SC_RTSIG_MAX
_SC_SAVED_IDS
_SC_SELECT
_SC_SEMAPHORES
_SC_SEM_NSEMS_MAX
_SC_SEM_VALUE_MAX
_SC_SHELL
_SC_SIGQUEUE_MAX
_SC_STREAM_MAX
_SC_SYMLOOP_MAX
_SC_THREADS
_SC_THREAD_ATTR_STACKADDR
_SC_THREAD_ATTR_STACKSIZE
_SC_THREAD_CPUTIME
_SC_THREAD_PRIORITY_SCHEDULING
_SC_THREAD_PROCESS_SHARED
_SC_THREAD_STACK_MIN
_SC_TIMERS
_SC_TIMER_MAX
_SC_TZNAME_MAX
_SC_UIO_MAXIOV
_SC_VERSION

Functions

FD_CLR
FD_ISSET
FD_SET
FD_ZERO
WCOREDUMP
WEXITSTATUS
WIFCONTINUED
WIFEXITED
WIFSIGNALED
WIFSTOPPED
WSTOPSIG
WTERMSIG
_errnop
_exit
abort
abs
accept
access
alarm
atexit
atof
atoi
bind
bsearch
calloc
cfgetispeed
cfgetospeed
cfmakeraw
cfsetispeed
cfsetospeed
cfsetspeed
chdir
chmod
chown
chroot
clearerr
clock_gettime
clock_settime
close
closedir
closelog
connect
creat
daemon
difftime
dirfd
dladdr
dlclose
dlerror
dlopen
dlsym
dup
dup2
execl
execle
execlp
execv
execve
execvp
execvpe
exit
fchdir
fchmod
fchmodat
fchown
fchownat
fclose
fcntl
fdopen
fdopendir
feof
ferror
fflush
fgetc
fgetpos
fgets
fileno
flock
fmemopen
fopen
fork
forkpty
fpathconf
fprintf
fputc
fputs
fread
free
freeaddrinfo
freopen
fscanf
fseek
fseeko
fsetpos
fstat
fstatat
fstatvfs
fsync
ftell
ftello
ftruncate
futimens
fwrite
gai_strerror
getaddrinfo
getchar
getchar_unlocked
getcwd
getdtablesize
getegid
getenv
geteuid
getgid
getgrgid
getgrgid_r
getgrnam
getgrnam_r
getgroups
gethostname
getline
getlogin
getnameinfo
getopt
getpeername
getpgid
getpgrp
getpid
getppid
getpriority
getprotobyname
getprotobynumber
getpwnam
getpwnam_r
getpwuid
getpwuid_r
getrlimit
getrusage
getservbyname
getsid
getsockname
getsockopt
gettimeofday
getuid
glob
globfree
gmtime
gmtime_r
grantpt
if_indextoname
if_nametoindex
ioctl
isalnum
isalpha
isatty
isblank
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
kill
killpg
labs
lchown
link
linkat
listen
localeconv
localtime
localtime_r
lockf
lseek
lstat
lutimes
madvise
malloc
memalign
memchr
memcmp
memcpy
memmove
memset
mkdir
mkdirat
mkdtemp
mkfifo
mknod
mkstemp
mkstemps
mktime
mlock
mlockall
mmap
mprotect
msync
munlock
munlockall
munmap
nanosleep
nice
nl_langinfo
open
open_memstream
open_wmemstream
openat
opendir
openlog
openpty
pathconf
pause
pclose
perror
pipe
poll
popen
posix_madvise
posix_memalign
posix_openpt
pread
printf
pselect
pthread_atfork
pthread_attr_destroy
pthread_attr_getguardsize
pthread_attr_getstack
pthread_attr_init
pthread_attr_setdetachstate
pthread_attr_setstacksize
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_timedwait
pthread_cond_wait
pthread_condattr_destroy
pthread_condattr_getclock
pthread_condattr_init
pthread_condattr_setclock
pthread_create
pthread_detach
pthread_exit
pthread_getspecific
pthread_join
pthread_key_create
pthread_key_delete
pthread_kill
pthread_mutex_destroy
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_timedlock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_mutexattr_destroy
pthread_mutexattr_init
pthread_mutexattr_settype
pthread_rwlock_destroy
pthread_rwlock_init
pthread_rwlock_rdlock
pthread_rwlock_tryrdlock
pthread_rwlock_trywrlock
pthread_rwlock_unlock
pthread_rwlock_wrlock
pthread_rwlockattr_destroy
pthread_rwlockattr_init
pthread_self
pthread_setspecific
pthread_sigmask
ptsname
putchar
putchar_unlocked
putenv
puts
pwrite
qsort
raise
rand
read
readdir
readdir_r

The 64-bit libc on Solaris and illumos only has readdir_r. If a 32-bit Solaris or illumos target is ever created, it should use __posix_readdir_r. See libc(3LIB) on Solaris or illumos: https://illumos.org/man/3lib/libc https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html https://www.unix.com/man-page/opensolaris/3LIB/libc/

readlink
readlinkat
readv
realloc
realpath
recv
recvfrom
recvmsg
remove
rename
renameat
res_init
rewind
rewinddir
rmdir
scanf
sched_yield
seekdir
select
sem_close
sem_destroy
sem_init
sem_open
sem_post
sem_trywait
sem_unlink
sem_wait
send
sendmsg
sendto
setbuf
setegid
setenv
seteuid
setgid
setgroups
sethostname
setlocale
setlogmask
setpgid
setpriority
setrlimit
setsid
setsockopt
setuid
setvbuf
shm_open
shm_unlink
shutdown
sigaction
sigaddset
sigaltstack
sigdelset
sigemptyset
sigfillset
sigismember
signal
sigpending
sigprocmask
sigwait
sleep
snprintf
socket
socketpair
sprintf
srand
sscanf
stat
statvfs
strcasecmp
strcasestr
strcat
strchr
strcmp
strcoll
strcpy
strcspn
strdup
strerror
strerror_r
strlen
strncasecmp
strncat
strncmp
strncpy
strndup
strnlen
strpbrk
strrchr
strsignal
strspn
strstr
strtod
strtok
strtol
strtoul
strxfrm
symlink
symlinkat
sysconf
syslog
system
tcdrain
tcflow
tcflush
tcgetattr
tcgetpgrp
tcgetsid
tcsendbreak
tcsetattr
tcsetpgrp
telldir
time
timegm
times
tmpfile
tmpnam
tolower
toupper
truncate
ttyname
ttyname_r
umask
uname
ungetc
unlink
unlinkat
unlockpt
unsetenv
usleep
utime
utimensat
utimes
wait
waitid
waitpid
wcslen
wcstombs
wmemchr
write
writev

Type Definitions

blkcnt_t
blksize_t
c_char
c_double
c_float
c_int
c_long
c_longlong
c_schar
c_short
c_uchar
c_uint
c_ulong
c_ulonglong
c_ushort
cc_t
clock_t
clockid_t
dev_t
fsblkcnt_t
fsfilcnt_t
gid_t
id_t
idtype_t
in_addr_t
in_port_t
ino_t
int8_tDeprecated
int16_tDeprecated
int32_tDeprecated
int64_tDeprecated
intmax_t
intptr_t
locale_t
mode_t
nfds_t
nl_item
nlink_t
off_t
pid_t
pthread_attr_t
pthread_key_t
pthread_mutexattr_t
pthread_rwlockattr_t
pthread_t
ptrdiff_t
rlim_t
sa_family_t
sighandler_t
sigset_t
size_t
socklen_t
speed_t
ssize_t
suseconds_t
tcflag_t
time_t
uid_t
uint8_tDeprecated
uint16_tDeprecated
uint32_tDeprecated
uint64_tDeprecated
uintmax_t
uintptr_t
useconds_t
wchar_t