mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-10 04:43:00 +03:00
getusershell: Optimize stdio accesses when possible.
* lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of USE_UNLOCKED_IO. * modules/getusershell (Depends-on): Add unlocked-io-internal. * doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2021-03-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
getusershell: Optimize stdio accesses when possible.
|
||||
* lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of
|
||||
USE_UNLOCKED_IO.
|
||||
* modules/getusershell (Depends-on): Add unlocked-io-internal.
|
||||
* doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD.
|
||||
|
||||
2021-03-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
unlocked-io-internal: New module.
|
||||
|
@@ -274,4 +274,8 @@ You may define the C macro @code{GNULIB_WCHAR_SINGLE}, if all the programs in
|
||||
your package are single-threaded and won't change the locale after it has
|
||||
been initialized. This macro optimizes the functions @code{mbrtowc} and
|
||||
@code{wcwidth}.
|
||||
@item
|
||||
You may define the C macro @code{GNULIB_GETUSERSHELL_SINGLE_THREAD}, if all the
|
||||
programs in your package invoke the functions @code{setusershell},
|
||||
@code{getusershell}, @code{endusershell} only from a single thread.
|
||||
@end itemize
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#include "stdio--.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#if USE_UNLOCKED_IO
|
||||
#if GNULIB_GETUSERSHELL_SINGLE_THREAD
|
||||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
|
@@ -8,8 +8,9 @@ m4/getusershell.m4
|
||||
Depends-on:
|
||||
unistd
|
||||
extensions
|
||||
fopen-safer [test $HAVE_GETUSERSHELL = 0]
|
||||
xalloc [test $HAVE_GETUSERSHELL = 0]
|
||||
fopen-safer [test $HAVE_GETUSERSHELL = 0]
|
||||
unlocked-io-internal [test $HAVE_GETUSERSHELL = 0]
|
||||
xalloc [test $HAVE_GETUSERSHELL = 0]
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_GETUSERSHELL
|
||||
|
Reference in New Issue
Block a user