| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/gl_anytree_list2.h (gl_tree_iterator_free)
(gl_tree_next_node, gl_tree_node_nx_set_value)
(gl_tree_previous_node, gl_tree_next_node):
Mark unused arguments.
* lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
* lib/gl_anylinked_list2.h (gl_linked_node_value)
(gl_linked_node_nx_set_value, gl_linked_iterator_free): Likewise.
* lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Avoid using
the same variable name in nested scopes.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Akim Demaille in
<https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00102.html>.
* lib/gl_list.hh (gl_List::iterator::next): Avoid a reinterpret_cast.
* lib/gl_set.hh (gl_Set::iterator::next): Likewise.
* lib/gl_oset.hh (gl_OSet::iterator::next): Likewise.
* lib/gl_map.hh (gl_Map::iterator::next): Likewise.
* lib/gl_omap.hh (gl_OMap::iterator::next): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>.
* lib/wchar.in.h (wmempcpy): New declaration.
* lib/wmempcpy.c: New file.
* m4/wmempcpy.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY.
* modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY,
HAVE_WMEMPCPY.
* modules/wmempcpy: New file.
* tests/test-wchar-c++.cc: Check the signature of wmempcpy.
* doc/glibc-functions/wmempcpy.texi: Mention the new module.
* modules/mempcpy (Description): Fix typo.
|
|
|
|
|
|
|
|
|
| |
* m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Include <sys/types.h> and
<stdlib.h> before <sys/random.h>.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
* lib/sys_random.in.h: On macOS, include <sys/types.h> and <stdlib.h>
first.
* doc/glibc-headers/sys_random.texi: Mention the macOS problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1.
* lib/getrandom.c (getrandom): When the system has getrandom, just
invoke it.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the
system's getrandom function's prototype is not the expected one.
* m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize
REPLACE_GETRANDOM.
* modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM.
* modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM.
* tests/test-getrandom.c (main): Allow error EINVAL as an alternative to
EAGAIN.
* doc/glibc-functions/getrandom.texi: Mention the new module and the
Solaris problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_random.in.h: Use the common idioms for overridable header
files.
* m4/sys_random_h.m4: New file.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Require gl_SYS_RANDOM_H_DEFAULTS.
* modules/sys_random: New file.
* modules/getrandom (Files): Remove lib/sys_random.in.h.
(Depends-on): Add sys_random.
(configure.ac): Use gl_SYS_RANDOM_MODULE_INDICATOR, not
gl_UNISTD_MODULE_INDICATOR.
(Makefile.am): Don't generate sys/random.h here.
* doc/glibc-headers/sys_random.texi: New file.
* doc/gnulib.texi: Include it.
|
|
|
|
|
|
|
|
|
|
| |
* lib/unistd.in.h (getrandom): Remove declaration.
* m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
declared.
(gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
HAVE_GETRANDOM.
* modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
HAVE_GETRANDOM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many Windows API functions are defined differently (redirecting to a
function with suffix 'W') if the application defines the macro UNICODE
than by default (redirecting to a function with suffix 'A').
* lib/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
variant with suffix 'A'.
* lib/dirent-private.h (WIN32_FIND_DATA): Likewise.
* lib/gc-gnulib.c (CryptAcquireContext): Likewise.
* lib/getaddrinfo.c (GetModuleHandle): Likewise.
* lib/getlogin.c (GetUserName): Likewise.
* lib/getlogin_r.c (GetUserName): Likewise.
* lib/gettimeofday.c (LoadLibrary): Likewise.
* lib/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
* lib/link.c (GetModuleHandle, CreateHardLink): Likewise.
* lib/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
* lib/mountlist.c (GetDriveType): Likewise.
* lib/nonblocking.c (GetNamedPipeHandleState): Likewise.
* lib/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
Likewise.
* lib/physmem.c (GetModuleHandle): Likewise.
* lib/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
PeekMessage, DispatchMessage): Likewise.
* lib/progreloc.c (GetModuleFileName): Likewise.
* lib/putenv.c (SetEnvironmentVariable): Likewise.
* lib/read.c (GetNamedPipeHandleState): Likewise.
* lib/readdir.c (FindNextFile): Likewise.
* lib/relocatable.c (GetModuleFileName): Likewise.
* lib/rename.c (MoveFileEx): Likewise.
* lib/rewinddir.c (FindFirstFile): Likewise.
* lib/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
PeekMessage, DispatchMessage): Likewise.
* lib/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
* lib/socket.c (WSASocket): Likewise.
* lib/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
* lib/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
* lib/stdio-read.c (GetNamedPipeHandleState): Likewise.
* lib/stdio-write.c (GetNamedPipeHandleState): Likewise.
* lib/tmpdir.c (GetTempPath): Likewise.
* lib/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
* lib/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
* lib/utime.c (CreateFile, GetFileAttributes): Likewise.
* lib/windows-cond.c (CreateEvent): Likewise.
* lib/windows-rwlock.c (CreateEvent): Likewise.
* lib/windows-timedmutex.c (CreateEvent): Likewise.
* lib/windows-timedrecmutex.c (CreateEvent): Likewise.
* lib/windows-timedrwlock.c (CreateEvent): Likewise.
* lib/write.c (GetNamedPipeHandleState): Likewise.
|
|
|
|
|
| |
* lib/physmem.c (PFN_MS_EX): Use BOOL, not WINBOOL.
* modules/physmem (Depends-on): Add unistd.
|
|
|
|
|
|
|
|
|
|
| |
* modules/fnmatch (Depends-on): Add btowc, isblank, iswctype, wmemchr,
wmempcpy, mempcpy.
* lib/fnmatch.c: Assume that HAVE_WCTYPE_H, HAVE_BTOWC, HAVE_ISWCTYPE,
HAVE_WMEMCHR, HAVE_WMEMPCPY, HAVE_ISBLANK, HAVE_DECL_ISBLANK,
HAVE_MEMPCPY are all 1.
* m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't test for btowc, isblank,
iswctype, mempcpy, wmemchr, wmemcpy, wmempcpy, <wctype.h>.
|
|
|
|
|
|
|
|
|
|
| |
* lib/getaddrinfo.c (GetProcAddress, getaddrinfo_func,
freeaddrinfo_func, getnameinfo_func, getaddrinfo_ptr, freeaddrinfo_ptr,
getnameinfo_ptr): Don't define in a build for Windows XP or higher.
(use_win32_p): Define differently.
* lib/link.c (GetProcAddress, CreateHardLinkFuncType,
CreateHardLinkFunc, initialized, initialize): Don't define in a build
for Windows XP or higher.
|
|
|
|
|
|
|
| |
* lib/read-file.c (read_file): Call setvbuf if RF_SENSITIVE.
Suggested by Glenn Strauss.
(fread_file): Suggest calling setvbuf before calling this
function. Suggested by Bruno Haible.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Daiki Ueno.
* lib/gettimeofday.c (GetSystemTimePreciseAsFileTimeFunc): Define as
macro when not using dynamic loading.
* lib/isatty.c (GetNamedPipeClientProcessIdFunc,
QueryFullProcessImageNameFunc): Likewise.
* lib/stat-w32.c (GetFileInformationByHandleExFunc,
GetFinalPathNameByHandleFunc): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Steve Lhomme <robux4@ycbcr.xyz> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00182.html>.
* lib/gettimeofday.c (GetProcAddress,
GetSystemTimePreciseAsFileTimeFuncType,
GetSystemTimePreciseAsFileTimeFunc, initialized, initialize): Don't
define in a build for Windows 8 or higher.
* lib/isatty.c (GetProcAddress, GetNamedPipeClientProcessIdFuncType,
GetNamedPipeClientProcessIdFunc, QueryFullProcessImageNameFuncType,
QueryFullProcessImageNameFunc, initialized, initialize): Don't define
in a build for Windows Vista or higher.
* lib/stat-w32.c (GetProcAddress, GetFileInformationByHandleExFuncType,
GetFileInformationByHandleExFunc, GetFinalPathNameByHandleFuncType,
GetFinalPathNameByHandleFunc, initialized, initialize): Likewise.
|
|
|
|
|
|
|
|
|
| |
* lib/git-merge-changelog.c (read_changelog_file): Update read_file
invocation.
* tests/test-sameacls.c (main): Likewise.
* tests/test-pipe-filter-gi1.c (main): Call read_file instead of
read_binary_file.
* tests/test-pipe-filter-ii1.c (main): Likewise.
|
|
|
|
|
| |
* lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
* modules/fts (Depends-on): Add 'open'.
|
|
|
|
|
|
|
| |
* lib/progreloc.c (O_CLOEXEC): Define fallback to 0 when use from module
relocatable-prog-wrapper.
(find_executable): Pass an O_CLOEXEC flag to open().
* modules/relocatable-prog (Depends-on): Add 'open'.
|
|
|
|
|
|
| |
* lib/getloadavg.c (getloadavg): Pass an O_CLOEXEC flag to open().
Simplify use of O_CLOEXEC.
* modules/getloadavg (Depends-on): Add 'open'.
|
|
|
|
|
|
| |
* lib/vma-iter.c (rof_open, vma_iterate): Pass an O_CLOEXEC flag to
open().
* modules/vma-iter (Depends-on): Add 'open'.
|
|
|
|
| |
* lib/truncate.c (truncate): Pass an O_CLOEXEC flag to open().
|
|
|
|
|
|
| |
* lib/pagealign_alloc.c (pagealign_alloc): Pass an O_CLOEXEC flag to
open().
* modules/pagealign_alloc (Depends-on): Add 'open'.
|
|
|
|
| |
* lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
|
|
|
|
|
| |
* lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
open().
|
|
|
|
|
|
| |
* lib/mountlist.c (read_file_system_list): Pass an O_CLOEXEC flag to
open().
* modules/mountlist (Depends-on): Add 'open'.
|
|
|
|
|
| |
* lib/login_tty.c (login_tty): Pass an O_CLOEXEC flag to open().
* modules/login_tty (Depends-on): Add 'open'.
|
|
|
|
|
|
| |
* lib/javacomp.c (get_classfile_version): Pass an O_CLOEXEC flag to
open().
* modules/javacomp (Depends-on): Add 'open'.
|
|
|
|
|
| |
* lib/getprogname.c (getprogname): Pass an O_CLOEXEC flag to open().
* modules/getprogname (Depends-on): Add 'open'.
|
|
|
|
|
|
| |
* lib/get_progname_of.c (get_progname_of): Pass an O_CLOEXEC flag to
open().
* modules/get_progname_of (Depends-on): Add 'open'.
|
|
|
|
|
| |
* lib/get_ppid_of.c (get_ppid_of): Pass an O_CLOEXEC flag to open().
* modules/get_ppid_of (Depends-on): Add 'open'.
|
|
|
|
|
|
| |
* lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
flag to open().
* modules/get-rusage-as (Depends-on): Add 'open'.
|
|
|
|
|
| |
* lib/gc-gnulib.c (randomize): Pass an O_CLOEXEC flag to open().
* modules/crypto/gc (Depends-on): Add 'open'.
|
|
|
|
|
| |
* lib/copy-file.c (qcopy_file_preserving): Pass an O_CLOEXEC flag to
open().
|
|
|
|
| |
* lib/chown.c (rpl_chown): Pass an O_CLOEXEC flag to open().
|
|
|
|
|
|
|
| |
* lib/fopen.c (rpl_fopen): Pass O_BINARY to open, if a 'b' flag is
specified on Windows.
* tests/test-fopen-gnu.c (DATA): New define.
(main): Add test for reading binary files with an 'e' flag.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some Windows types, such as TCHAR, LPTSTR, LPCTSTR, are defined
differently if the application defines the macro UNICODE.
Reported by Steve Lhomme <robux4@ycbcr.xyz> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00184.html>.
* lib/link.c (CreateHardLinkFuncType): Use LPCSTR, not LPCTSTR.
* lib/localename.c (enum_locales_fn): Use LPSTR, not LPTSTR.
* lib/stat-w32.c (GetFinalPathNameByHandleFuncType): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of the Windows API may not only add, but also remove API
functions. Therefore, when the user is e.g. building for Windows 10, we
should not set _WIN32_WINNT to e.g. Windows 8, as this may enable the
use of APIs that were present in Windows 8 but removed in Windows 10.
Suggested by Steve Lhomme <robux4@ycbcr.xyz> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00318.html>.
* lib/ftruncate.c (_WIN32_WINNT): Don't set to a smaller value.
* lib/sethostname.c (_WIN32_WINNT): Likewise.
* lib/stat-w32.c (_WIN32_WINNT): Likewise.
|
|
|
|
|
| |
* lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
* modules/javacomp (Depends-on): Add fopen-gnu.
|
|
|
|
|
|
| |
* lib/mountlist.c (setmntent, read_file_system_list): Pass an 'e' flag
to fopen.
* modules/mountlist (Depends-on): Add fopen-gnu.
|
|
|
|
|
| |
* lib/sethostname.c (sethostname): Pass an 'e' flag to fopen.
* modules/sethostname (Depends-on): Add fopen-gnu.
|
|
|
|
|
| |
* lib/readutmp.c (read_utmp): Pass an 'e' flag to fopen.
* modules/readutmp (Depends-on): Add fopen-gnu.
|
|
|
|
|
| |
* lib/getpass.c (getpass): Pass an 'e' flag to fopen.
* modules/getpass (Depends-on): Add fopen-gnu.
|
|
|
|
|
| |
* lib/getloadavg.c (getloadavg): Pass an 'e' flag to fopen.
* modules/getloadavg (Depends-on): Add fopen-gnu.
|
|
|
|
|
| |
* lib/exclude.c (add_exclude_file): Pass an 'e' flag to fopen.
* modules/exclude (Depends-on): Add fopen-gnu.
|
|
|
|
|
|
| |
* lib/bitset/stats.c (bitset_stats_read, bitset_stats_write): Pass an
'e' flag to fopen.
* modules/bitset (Depends-on): Add fopen-gnu.
|
|
|
|
|
|
|
|
|
|
| |
* lib/read-file.h (RF_SENSITIVE): New define.
* lib/read-file.c (fread_file, read_file): Take into account of
RF_SENSITIVE flag.
* modules/read-file (Depends-on): Add explicit_bzero.
This adds an alternative behavior of those functions to explicitly
clear the internal memory block when it becomes unused. This is
useful for reading sensitive information from a file.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/read-file.h (RF_BINARY): New define.
(fread_file, read_file): Take FLAGS argument.
(read_binary_file): Remove.
* lib/read-file.c (internal_read_file): Merge into ...
(read_file): ... here.
* modules/read-file-tests (Files): Add "tests/macros.h".
* tests/test-read-file.c (main): Refactor using ASSERT macro.
* NEWS: Mention this change.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Gisle Vanem <gisle.vanem@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00309.html>.
* lib/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Don't define if we're
using GCC.
[_MSC_VER]: Use correct syntax for #pragma intrinsic.
(__popcnt64): In 32-bit mode, define as an inline function.
(COUNT_ONE_BITS): Rename first argument to GCC_BUILTIN.
|
|
|
|
|
|
|
|
|
| |
Reported by Gisle Vanem <gisle.vanem@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00308.html>.
* lib/argz.h: Don't use __ prefixed identifiers.
(const): Remove definition.
(argz_next): Remove inline definitions.
|
|
|
|
|
|
| |
* lib/read-file.c (read_file): Pass an 'e' flag to fopen.
(read_binary_file): Likewise.
* modules/read-file (Depends-on): Add fopen-gnu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* MODULES.html.sh (func_all_modules):
* lib/unistd.in.h (getentropy, getrandom):
* m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS):
* modules/unistd (unistd.h):
Add support for getentropy, getrandom.
* doc/glibc-functions/getentropy.texi (getentropy):
* doc/glibc-functions/getrandom.texi (getrandom):
These are now fixed on some platforms.
* lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h:
* m4/getentropy.m4, m4/getrandom.m4:
* modules/getentropy, modules/getentropy-tests:
* modules/getrandom, modules/getrandom-tests:
* tests/test-getentropy.c, tests/test-getrandom.c:
New files.
|