Remove most references to atoq() in this page, since this function
was present only in Linux libc (not glibc).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
And add an entry to BUGS explaining the ambiguity that was
present before the addition of this error.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
My testing on this point was bogus, overlooking details of
strace(1)'s behavior with setuid programs.
See https://sourceware.org/bugzilla/show_bug.cgi?id=12155
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Rich Felker noted that "scare text" in the man page warned about
the use of snprintf() on libc, and that some people had cited
this as a reason not to use snprintf(). Linux libc is now
ancient history, so there is no real need to keep that text.
But, while we're at it, we may as well clear out all of the
other ancient libc4 and libc5 pieces in the page. They are
nowadays more clutter than help.
Reported-by: Rich Felker <dalias@libc.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function getdtablesize() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions mkstemp(), mkostemp(), mkstemps() and mkostemps()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function getdirentries() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function siginterrupt() is not thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function iconv() is thread safe.
Reviewed-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function lockf() is thread safe.
Reviewed-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function matherr() is thread safe.
Reviewed-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function malloc_usable_size() is thread safe.
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions mq_getattr() and mq_setattr() are thread safe.
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions basename() and dirname() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions mq_send() and mq_timedsend() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions mq_receive() and mq_timedreceive() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function posix_fallocate() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The nonstandard functions malloc_set_state() and
malloc_get_state() are provided by <malloc.h> not <stdlib.h>.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Only the definedness of _GNU_SOURCE matters, so eliminate a possible
source of confusion by not using a specific replacement text in the
example program.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some information that was here will move to locale(7).
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_setaffinity_np() and
pthread_getaffinity_np() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_equal() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_getcpuclockid() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_setconcurrency() and
pthread_getconcurrency() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The rootp argument to tfind is "void * const *",
not "const void **".
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The alphasort and versionsort functions take arguments of type const
struct dirent **, not const void *.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix const- and signedness of various char* parameters.
Also, there is no "struct state", but _res is a struct
__res_state. (Actually, _res is errno-like in that it is really a
macro expanding to (*__res_state()).)
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Remove const qualifiers from arguments to key_decryptsession,
key_encryptsession, and key_setsecret.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There doesn't seem to be any reason for getauxval.3 to be
executable...
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The buflen argument to getnetgrent_r has type size_t.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The header <rpc/des_crypt.h> does not provide rtime();
<rpc/auth_des.h> does, as is also implied in both the NOTES and
EXAMPLE sections.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The user, passwd and cmd arguments to rexec and rexec_af are all
const.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
re_comp and re_exec take const char* arguments.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Unlike the BSDs, the second argument of rcmd() and rcmd_af() has
type unsigned short.
The first argument of iruserok_af() has type const void*.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Add return type for pthread_setschedprio.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Add return type for pthread_{s,g}etschedparam.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The name parameter of pthread_getname_np is an output parameter and
hence not const.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Each of the pthread_attr_get* functions extract some piece of
information from a pthread_attr_t, which is passed by const
reference. Add the const keyword to the prototypes of these
functions.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The elements of the array sys_errlist are also const.
Also, it is probably not desirable to pretend that errno.h defines
errno in the traditional way (errno(3) correctly contains an explicit
warning against this). I don't know what the best solution is, though.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The newattr parameter to mq_setattr is const.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As mentioned further down, malloc_trim returns an integer.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
gnu_dev_makedev, and hence its trivial macro wrapper makedev, takes
two unsigned int parameters; this is consistent with it being the
inverse of (gnu_dev_)major/minor, which return unsigned int.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The second argument to swapcontext() is const.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The parameters to inet_makeaddr have type in_addr_t.
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The prototype for getrpcport() is obtained by #include'ing
<rpc/rpc.h>. Also, update its prototype.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The hostlen and servlen parameters to have type socklet_t.
mtk: The types changed in glibc 2.2, with commit
e10b8512ce40cfb9f706e40edc7ed0ebdd151471
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_setschedparam() and pthread_getschedparam()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_testcancel() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_sigqueue() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_sigmask() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_setschedprio() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Change consistent with the fact that the scheduling overview
page is now sched(7) not sched_setscheduler(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_setcancelstate() and
pthread_setcanceltype() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_kill_other_threads_np() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The function pthread_yield() is thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Quoting Ingo:
I just noticed that the stpcpy(3) manual contains a speculation
that appears to be untrue on closer investigation: That function
did not originate in MS DOS, but in Lattice C on AmigaDOS.
Here is a patch against the git master HEAD to fix that, and add
some more historical information. To provide some background and
allow you to more easily verify the correctness of the patch, i'm
appending my mail to <misc@openbsd.org>, where i'm giving some
more details about the history and pointing to some primary
sources. That mail also contains the (similar, but shorter)
patch i just committed to the OpenBSD manual page.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions remquo(), remquof() and remquol() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_attr_setstacksize() and
pthread_attr_getstacksize() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_attr_setstackaddr() and
pthread_attr_getstackaddr() are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_attr_setstack() and pthread_attr_getstack()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The functions pthread_attr_setscope() and pthread_attr_getscope()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>