redundant = both left and right-hand side are in one of (C89/C99/POSIX), so I simply declare the old one to be redundant since the new one can cover the old's use case.
Obsolete | Replacement | Reason for using new |
---|---|---|
asctime | strftime | redundant |
atof | strtod | error checking |
atoi | strtol | error checking |
atol | strtol | error checking |
atoll | strtoll | error checking |
atoq | strtoll | error checking, POSIX |
bcmp | memcmp | POSIX |
bcopy | memcpy | POSIX |
brk | mmap | smarter, POSIX |
bzero | memset | POSIX |
ctime | strftime | redundant |
ecvt | snprintf | POSIX |
endutent | endutxent | POSIX |
fcvt | snprintf | POSIX |
futimes | futimens | high-resolution, POSIX |
futimesat | utimensat | high-resolution, POSIX |
gcvt | snprintf | POSIX |
gethostbyaddr | getaddrinfo/getnameinfo | thread-safe, POSIX |
gethostbyname | getaddrinfo | thread-safe, POSIX |
getitimer | timer_gettime | high-resolution, POSIX |
getprotobynumber | getaddrinfo/getnameinfo? | thread-safe, POSIX |
getprotoent | getaddrinfo | thread-safe, POSIX |
getpw | getpwent | redundant |
gets | fgets | overflow-safer |
getservbyname | getaddrinfo | thread-safe, POSIX |
getservbyport | getaddrinfo/getnameinfo | thread-safe, POSIX |
gettimeofday | clock_gettime | high-resolution, POSIX |
getutent | getutxent | POSIX |
getutid | getutxid | POSIX |
getutline | getutxline | POSIX |
getwd | getcwd | overflow-safe |
inet_addr | inet_pton | thread-safe, multi-protocol, POSIX |
inet_aton | inet_pton | thread-safe, multi-protocol, POSIX |
inet_ntoa | inet_ntop | thread-safe, multi-protocol, POSIX |
isascii | isalpha/isdigit/etc. | portable |
itoa | snprintf | thread-safe, portable |
matherr | fenv | |
memalign | posix_memalign | |
mktemp | mkstemp | security |
msgctl | mq_unlink | POSIX |
msgget | mq_open | POSIX |
msgrcv | mq_receive | POSIX |
msgsnd | mq_send | POSIX |
msleep | nanosleep | high-resolution |
pause | sigsuspend | redundant |
pselect | ppoll | high-resolution |
pututline | pututxline | POSIX |
qecvt | snprintf | POSIX |
qfcvt | snprintf | POSIX |
qgcvt | snprintf | POSIX |
scalb | scalbln | redundant |
select | poll | high-resolution |
semctl | sem_wait/sem_post | |
semget | sem_open | POSIX |
semop | sem_? | POSIX |
setitimer | timer_settime | high-resolution |
settimeofday | clock_settime | high-resolution |
setutent | setutxent | POSIX |
shmat | shm_open | POSIX |
shmctl | shm_unlink | POSIX |
shmdt | close | POSIX |
shmget | shm_open | POSIX |
sigblock | sigprocmask | POSIX |
siggetmask | sigprocmask | POSIX |
siginterrupt | sigaction | POSIX |
sigmask | sigaddset | POSIX |
signal | sigaction | POSIX |
sigsetmask | sigprocmask | POSIX |
sigvec | sigaction | POSIX |
sleep | nanosleep | high-resolution |
strtok | strsep/strtok_r | thread-safe |
tempnam | mkstemp | security, POSIX |
timegm | mktime+setenv | POSIX |
timelocal | mktime | POSIX |
tmpfile | mkstemp | security |
tmpnam | mkstemp | security, POSIX |
ualarm | timer_settime | high-resolution, POSIX |
ulimit | getrlimit/setrlimit | POSIX |
usleep | nanosleep | high-resolution, POSIX |
utime | utimensat | high-resolution, POSIX |
utimes | utimensat | high-resolution, POSIX |
valloc | posix_memalign | POSIX |