mmap() and msync() were already described as not leading to
inotify events. This patch adds munmap(). I created and executed
a test to verify this.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This example of the usage of the inotify API shows the
usage of inotify_init1(2) and inotify_add_watch(2) as well
as polling and reading from the inotify file descriptor.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Example from https://sourceware.org/glibc/wiki/Locales
After modifying a locale, make sure it compiles, and install it to a
temporary directory for testing:
unset LC_ALL
LOCALE=fi_FI
export I18NPATH=$HOME/locale-test/
export LOCPATH=$HOME/locale-test/
mkdir -p $LOCPATH
localedef --no-archive -f localedata/charmaps/UTF-8 -i localedata/locales/$LOCALE $I18NPATH/$LOCALE.UTF-8
LC_TIME=$LOCALE.UTF-8 locale -ck LC_TIME
LC_TIME=$LOCALE.UTF-8 locale -ck date_fmt
LC_TIME=$LOCALE.UTF-8 date
LC_CTYPE=$LOCALE.UTF-8 iconv -f UTF-8 -t ASCII//TRANSLIT < translit-test-input.txt
LC_COLLATE=$LOCALE.UTF-8 sort < sorting-test-input.txt
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
am_pm should be defined only if AM/PM convention is used to signal
applications they should not try to print them when using them in
unwanted.
Same for all LC_NAME keywords expect for name_fmt which should be
always defined.
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>
As noted by Keld Simonsen in the lib-locales@sourceware mailing
list:
https://sourceware.org/ml/libc-locales/2014-q2/msg00008.html
From: Keld Simonsen <keld at rap dot rap dot dk>
To: Marko Myllynen <myllynen at redhat dot com>
Date: Tue, 29 Apr 2014 17:02:09 +0200
lang_term reflects ISO 639-2/T (terminology) codes, while
lang_lib reflects ISO 639-2/B (bibliographic) codes.
lang_term is preferred over lang_lib codes for locale names.
There are 20 specific ISO 639-2/B codes.
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>
Michael Kerrisk pointed me to alignment issues which may
arise when reading misaligned integers.
On some systems integer values can only be read if they are
correctly aligned. Other system have a lower performance when
reading from or writing to misaligned memory positions.
Therefore, the buffer used to call read(2) for a fanotify
file descriptor should have the same alignment as
struct fanotify_event_metadata.
Due to the casting to char* inside the macros
FAN_EVENT_OK and FAN_EVENT_NEXT we can use any
data structure for the buffer.
With the patch an array of struct fanotify_event_metadata is
used as buffer which seems a natural choice to ensure proper
alignment.
It should be remembered that the offset between events is given
by field event_len and iterating over the array may not be
allowable in future. Instead the macros should be used.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
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 <asm/page.h> header is not readily available, and the comment
seems to indicate that it is for getting PAGE_SIZE. But it is
never mentioned why one would need to know that, and it is in any
case better obtained using sysconf(), provided by <unistd.h>.
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>