- write ISO C99 math function error handling and boundary case ======================================================================= - restrict for all functions: find all functions with two or more pointers where the type can be the same. XSH dlsym(), 7759 void *dlsym (void *restrict handle, const char *restrict name) ecvt(), 8007-8009 char *ecvt (double value, int ndigit, int *restrict decpt, int *restrict sign) char *fcvt (double value, int ndigit, int *restrict decpt, int *restrict sign) not gcvt() also fcvt(), 10012 freeaddrinfo(), 12398-12399 int getaddrinfo (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict, struct addrinfo *restrict *res) also 14365-14366 fstatvfs(), 13242 int statvfs (const char *restrict path, struct statvfs *restrict buf) gethostbyaddr(), 15322 struct hostent *getipnodebyaddr (const void *restrict, socklen_t len, int type, int *restrict error_num) also getipnodebyaddr(), 15538 setitimer(), 15555-15556 int setitimer (int which, const struct itimerval *restrict value, struct itimerval *restrict ovalue) getmsg(), 15721-15724 int getmsg (int fildes, struct strbuf *restrict ctlptr, struct strbuf *restrict dataptr, int *restrict flagsp) int getpmsg (int fildes, struct strbuf *restrict ctlptr, struct strbuf *restrict dataptr, int *restrict bandp, int *restrict flagsp) also 16345-16346 getnameinfo(), 15876-15878 int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, unsigned int flags) getsockname(), 17001-17002 int getsockname (intsocket, struct sockaddr *address, socklen_t *address_len) getsockopt(), 17043-17044 int getsockopt (int socket, int level, int option_name, void *restrict option_value, socklen_t *restrict option_len) gettimeofday(), 17301 int gettimeofday (struct timeval *tp, void *tcp) glob(), 17487-17488 int glob (const char *restrict pattern, int flags, int (*restrict errfunc) (const char *epath, int eerrno), glob_t *restrict pglob) gmtime(), 17650 struct tm *gmtime_r (const time_t *restrict clock, struct tm *restrict result) iconv(), 17969-17970 size_t iconv (iconv_t cd, char **resrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft) inet_ntop(), 18416-18419 const char *inet_ntop (int af, const void *restrict src, char *restrict dst, socklen_t size) int inet_pton (int ad, const char *restrict src, void *restrict dst) lio_listio(), 20883-20884 int lio_listio (int mode, struct aiocb *restict const list[restrict], int nent, struct sigevent *restrict sig) localtime_r(), 21202 struct tm *localtime_r (const time_t *restrict clock, struct tm *restrict result) lstat(), 21824 int lstat (const char *restrict path, struct stat *restrict buf) makecontext(), 21807 int swapcontext (ucontext_t *restrict oucp, const ucontext_t *restrict ucp) also 41366 memccpy(), 22329 void *memccpy (void *restrict s1, const void *restrict s2, int c, size_t n) mq_receive(), 23805-23806 int mq_timedreceive (mqd_t mqdes, char *resrict msg_ptr, size_t msg_len, unsigned int *restrict msg_prio, const struct timespec *restrict abs_timeout) also 24027-24028 mq_setattr(), 23980-23981 int mq_setattr (mqd_t mqdes, const struct mq_attr *restrict mqstat, struct mq_attr *restrict omqstat) posix_mem_offset(), 26104-26105 int posix_mem_offset (const void *restrict addr, size_t len, off_t *restrict off, size_t *restrict config_len, int *restrict fildes) posix_spawn(), 26185-26193 int posix_spawn (pid_t *restrict, const char *restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *restrict attrp, char *const restrict argv[], char *const restrict envp[]) int posix_spawnp (pid_t *restrict, const char *restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *restrict attrp, char *const restrict argv[], char *const restrict envp[]) also 27152-27155 posix_spawn_file_actions_addclose(), 26523-26525 int posix_spawn_file_actions_addopen (posi_spawn_file_actions_t *restrict file_actions, int fildes, const char *restrict, int oflag, mode_t mode) also 26670-26672 posix_spawn_attr_getsigdefault(), 26796-26800 int posix_spawnattr_getsigdefault (const posix_spawnattr_t *restrict attr, sigset_t *restrict sigdefault) int posix_spawnattr_setsigdefault (posix_spawnattr_t *restrict attr, const sigset_t *restrict sigdefault) also 27093-27094 posix_spawnattr_getflags(), 26843-26844 int posix_spawnattr_getflags (const posix_spawnattr_t *restrict attr, short *restrict flags) posix_spawnattr_getpgroup(), 26893-26894 int posix_spawnattr_getpgroup (const posix_spawnattr_t *restrict attr, pid_t *restrict pgroup) posix_spawnattr_getschedparam(), 26940-26941 int posix_spawnattr_getschedparam (const posix_spawnattr_t *restrict attr, struct sched_param *restrict schedparam) int posix_spawnattr_setschedparam (posix_spawnattr_t *restrict attr, const struct sched_param *restrict schedparam) posix_spawnattr_getschedpolicy(), 26989-26990 int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *restrict attr, int *restrict schedpolicy) posix_spawn_attr_getsigmask(), 27037-27040 int posix_spawnattr_getsigmask (const posix_spawnattr_t *restrict attr, sigset_t *restrict sigmask) int posix_spawnattr_setsigmask (posix_spawnattr_t *restrict attr, const sigset_t *restrict sigmask) also 27143-27144 pthread_attr_getguardsize(), 27631-27632 int pthread_attr_getguardsize (const pthread_attr_t *restrict attr, size_t *restrict guardsize) pthread_attr_getinheritsched(), 27691-27692 int pthread_attr_getinheritsched (const pthread_attr_t *restrict attr, int *restrict inheritsched) pthtread_attr_getshedparam(), 27743-27746 int pthread_attr_getschedparam (const pthread_attr_t *restrict attr, struct sched_param *restrict param) int pthread_attr_setschedparam (pthread_attr_t *restrict attr, const struct sched_param *restrict param) also 27991-27992 pthread_attr_getschedpolicy(), 27791-27792 int pthread_attr_getschedpolicy (const pthread_attr_t *restrict attr, int *restrict policy) pthread_attr_getscope(), 27837-27838 int pthread_attr_getscope (const pthread_attr_t *restrict attr, int *restrict contentionscope) pthread_attr_getstackaddr(), 27881-27882 int pthread_attr_getstackaddr (const pthread_attr_t *restrict attr, void **restrict stackaddr) pthread_attr_getstacksize(), 27918-27919 int pthread_attr_getstacksize (const pthread_attr_t *restrict attr, size_t *restrict stacksize) pthread_barrier_destroy(), 28038-28039 int pthread_barrier_init (pthread_barrier_t *restrict barrier, const pthread_barrierattr_t *restrict attr, unsigned int count) also 28101-28102 pthread_barrierattr_getpshared(), 28207-28208 int pthread_barrierattr_getpshared (const pthread_barrierattr_t *restrict attr, int *restrict pshared) pthread_cond_destroy(), 28633-28634 int pthread_cond_init (pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr) also 28735-28736 pthread_cond_timedwait(), 28753-28756 int pthread_cond_timedwait (pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime) int pthread_cond_wait (pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex also 28944 pthread_condattr_getclock(), 29003-29004 int pthread_condattr_getclock (const pthread_condattr_t *restrict attr, clockid_t *restrict clock_id) pthread_condattr_getpshared(), 29050-29051 int pthread_condattr_getpshared (const pthread_condattr_t *restrict attr, int *restrict pshared) pthread_create(), 29128-29129 int pthread_create (pthread_t *restrict, const pthread_attr_t *restrict attr, void *(*start_routine)(void *), void *arg) pthread_getschedparam(), 29457-29458 int pthread_getschedparam (pthread_t thread, int *restrict policy, struct sched_para *restrict param) pthread_mutex_destroy(), 29909-29910 int pthread_mutex_init (pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr) also 30166-30167 pthread_mutex_getprioceiling(), 30115-30119 int pthread_mutex_getprioceiling (const pthread_mutex_t *restrict mutex, int *restrict prioceiling) int pthread)mutex_setprioceiling (pthread_mutex_t *restrict, mutex, int prioceiling, int *restrict old_ceiling) also 30284-30285 pthread_mutex_timedlock(), 30294-30295 int pthread_mutex_timedlock (pthread_mutex_t *restrict mutex, const struct timespec *restrict abs_timeout) pthread_mutexattr_getprioceiling(), 30581-30582 int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *restrict attr, int *restrict prioceiling) pthread_mutexattr_getprotocol(), 30632-30633 int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *restrict attr, int *restrict protocol) pthread_mutexattr_getpshared(), 30707-30708 int pthread_mutexattr_getpshared (const pthread_mutexattr_t *restrict attr, int *restrict pshared) pthread_mutexattr_gettype(), 30760-30761 int pthread_mutexattr_gettype (const pthread_mutexattr_t *restrict attr, int *restrict type) pthread_rwlock_destroy(), 30958-30959 int pthread_rwlock_init (pthred_rwlock_t *restrict rwlock, const pthread_rwlockattr_t *restrict attr) also 31036-31037 pthread_rwlock_timedrdlock(), 31129-31130 int pthread_rwlock_timedrdlock (pthread_rwlock_t *restrict rwlock, const struct timespec *restrict abs_timeout) pthread_rwlock_timedwrlock(), 31129-31130 int pthread_rwlock_timedwrlock (pthread_rwlock_t *restrict rwlock, const struct timespec *restrict abs_timeout) pthread_rwlockattr_getpsahred(), 31424-31425 int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *restrict attr, int *restrict pshared) pthread_sigmask(), 31618-31619 int pthread_sigmask (int how, const sigset_t *restrict set, sigset_t *restrict oset) int sigprocmask (int how, const sigset_t *restrict set, sigset_t *restrict oset) readdir(), 32831 int readdir_r (DIR *restrict disp, struct dirent *restrict entry, struct dirent **restrict result) readlink(), 32968 ssize_t readlink (const char *restrict path, char *restrict buf, size_t bufsize) realpath(), 33122 char *realpath (const char *restrict file_name, char *restrict resolved_named) recvfrom(), 33260-33261 ssize_t recvfrom (int socket, void *restrict buffer, size_t length, int flags, struct sockaddr *restrict address, socklent *restrict address_len) regcomp(), 33454-33458 int regcomp (regex_t *restrict preg, const char *restrict pattern, int cflags) size_t regerror (int errcode, const rege_t *restrict preg, char *restrict errbuf, size_t errbuf_size) int regexec (const regex_t *restrict preg, const char *restrict string, size_t nmatch, regmatch_t pmatch[restrict], int eflags) select(), 34779-34780 int select (int nfds, fd_set *restrict readfds, restrict *restrict writefds, fd_set *restrict errorfds, struct timeval *restrict restrict timeout) sem_getvalue(), 34982 int sem_getvalue (sem_t *restrict sem, int *restrict sval) sem_timedwait(), 35224 int sem_timedwait (sem_t *restrict sem, const timespec *restrict abs_timeout) setitimer(), 36363-3364 int setitimer (int wwhich, onst struct itimerval *restrict value, struct itimerval *restrict ovalue) sigaction(), 37784-37785 int sigaction (int sig, const struct sigaction *restrict act, struct sigaction *restrict oact) sigaltstack(), 38114 int sigaltstack (const stack_t *restrict ss, stack_t *restrict oss) sigprocmask(), 38619 int sigprocmask (int how, const sigset_t *restrict set, sigset_t *restrict oset) sigtimedwait(), 38839-38840 int sigtimedwait (const sigset_t *restrict set, siginfo_t *restrict info, const struct timespec *restrict timeout) int sigwaitinfo (const sigset_t *restrict set, siginfo_t *restrict info) also 39039 sigwait(), 38984 int sigwait (const sigset_t *restrict set, int *restrict sig) stat(), 39468 int stat (const char *restrict path, struct stat *restrict buf) statvfs(), 39635 int statvfs (const char *restrict path, struct statvfs *restrict buf) strfmon(), 40137 ssize_t strfmon (char *restrict s, size_t maxsize, const char *restrict format, ...) strptime(), 40653 char *strptime (const char *restrict buf, const char *restrict format, struct tm*restrict tm) strtok(), 40982 char *strtok_r (char *restrict s, const char *restrict sep, char **restrict lasts) swab(), 41327 void swab (const void *restrict src, void *restrict dest, ssize_t nbytes) tdelete(), 42636-42637 void *tdelete (const void *restrict key, void **restrict rootp, int (*compar)(const void *, const void *)) also 43598-43599 timer_create(), 42836-42837 int timer_create (clockid_t clockid, struct sigevent *restrict evp, timer_t *restrict timerid) timer_getoverrun(), 42983-42984 int timer_settime (timer_t timerid, int flags, const struct itimerspec *restrct value, struct itimerspec *restrict ovalue) wordexp(), 46667 int wordexp (const char *restrict words, wordexp_t *restrict pwordep, int flags) ??? getgrgid_r(), getgrnam_r(), getpwnam_r(), getpwuid_r(), nanosleep(), clock_nanosleep(), pthread_attr_setstackaddr(), pthread_getcpuclockid(), pthread_setschedparam(), pthread_join() ??? not crypt(), insque(), pthread_setspecific(), putmsg(), putpmsg(), sendto() ... 82 pages, ~95 functions ======================================================================= EXTRA aardvark: pthread_condattr_setclock(), 29110-29111 wrong prototype: *get* and not *set* pthread_setschedparam(), 31601 second arg: int, not int* sem_getvalue(), 34982 why first arg not const?