rspec/rules/S1911/rule.adoc

35 lines
1023 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
To ensure future code portability, obsolete POSIX functions should be removed. Those functions, with their replacements are listed below:
||Obsolete||Use Instead||
|asctime|strftime|
|asctime_r|strftime|
|bcmp|memcmp|
|bcopy|memmove memcpy|
|bsd_signal|sigaction|
|bzero|memset|
|ctime|strftime|
|ecvt|sprintf|
|fcvt|sprintf|
|ftime|no replacement function|
|gcvt|sprintf|
|getcontext|Rewrite to use POSIX threads.|
|gethostbyaddr|getnameinfo|
|gethostbyname|getaddrinfo|
|getwd|getcwd|
|index|strchr|
|makecontext|Rewrite to use POSIX threads.|
|mktemp|mkstemp|
|pthread_attr_getstackaddr|pthread_attr_getstack|
|pthread_attr_setstackaddr|pthread_attr_setstack|
|rand_r|rand|
|rindex|strrchr|
|scalb|scalbln', 'scalblnf' or 'scalblnl' instead of this function|
|swapcontext|Rewrite to use POSIX threads.|
|ualarm|'timer_create', 'timer_delete', 'timer_getoverrun', 'timer_gettime', or 'timer_settime' instead of this function|
|usleep|'nanosleep' or 'setitimer' function|
|utime|utimensat|
|vfork|fork|
|wcswcs|wcsstr|