summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* c-dtoastr, c-ldtoastr: new modulesMarc Nieper-Wißkirchen2020-06-2514-6/+284
| | | | | | | | | | | | | | | | | These modules provide the same functionality as the modules dtoastr and ldtoastr except for the formatting taking place in the C locale. * MODULES.html.sh: Add c-dtoastr and c-ldtoastr. * lib/c-dtoastr.c, lib/c-ldtoastr.c: New files. * lib/ftoastr.c: Prefix exported functions when the macro C_LOCALE is defined. Use c_snprintf and c_strtod/c_strtold instead of snprintf and strtod/strtold whhen the macro C_LOCALE is defined. * lib/ftoastr.h: Add prototypes for c_dtoastr and c_ldtoastr. * modules/c-dtoastr, modules/c-dtoastr-tests, modules/c-ldtoastr, modules/c-ldtoastr-tests: New files. * tests/test-c-dtoastr.c, tests/test-c-dtoastr.sh, tests-c-ldtoastr.c tests-c-ldtoastr.sh: New files.
* tzset: Fix compilation warnings on mingw (regression from 2017-05-01).Bruno Haible2020-06-212-0/+8
| | | | * lib/tzset.c: Include <stdlib.h>, <string.h>.
* autoupdateKarl Berry2020-06-211-9/+2
|
* autoupdateKarl Berry2020-06-181-1/+11
|
* thread: Avoid possible compiler warnings in uses of gl_thread_exit.Bruno Haible2020-06-172-2/+7
| | | | * lib/glthread/thread.h (gl_thread_exit): Add a cast to void.
* thread, thrd: Avoid a compiler warning.Bruno Haible2020-06-172-1/+6
| | | | * lib/windows-thread.h (glwthread_thread_exit): Mark as non-returning.
* windows-thread: Avoid a compiler warning.Biswapriyo Nath2020-06-173-2/+9
| | | | | | | | * lib/windows-thread.h (glwthread_thread_exit): Change return type to void. * lib/windows-thread.c (glwthread_thread_exit): Likewise. Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
* unictype/joininggroup-name: Fix warning on 64-bit mingw.Bruno Haible2020-06-152-1/+9
| | | | | | | | Reported by Biswapriyo Nath <nathbappai@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00036.html>. * lib/unictype/joininggroup_name.c (ELEM): Cast struct offset to size_t first.
* autoupdateKarl Berry2020-06-151-1/+11
|
* autoupdateKarl Berry2020-06-141-54/+259
|
* calloc-gnu tests: Avoid a test failure with clang.Bruno Haible2020-06-062-11/+23
| | | | | * tests/test-calloc-gnu.c (main): Mark the pointer variable as 'volatile', to defeat compiler optimizations.
* git-version-gen: update scriptversionDmitry V. Levin2020-06-031-1/+1
| | | | | | | | | | scriptversion in git-version-gen should be kept up-to-date because this script is used by projects that update it from gnulib when its scriptversion changes. * build-aux/git-version-gen (scriptversion): Update. Fixes: 8f41f1918 ("git-version-gen: Allow 'snapshot' as .tarball-version contents.")
* autoupdateKarl Berry2020-06-023-21/+21
|
* getloadavg: fix double-increment bugPaul Eggert2020-06-012-1/+8
| | | | | | | | * lib/getloadavg.c (getloadavg): Fix double-increment typo on Linux without glibc, Android, Cygwin. This fixes a bug I introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu. Problem and fix reported by Semen Verchenko in: https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
* getentropy, getrandom: compare to crypto/gc-randomPaul Eggert2020-06-012-0/+8
|
* tempname: use getrandom, not getentropyPaul Eggert2020-06-013-5/+12
| | | | | | | This removes a dependency, as getentropy depends on getrandom. * lib/tempname.c: Include sys/random.h instead of unistd.h. (RANDOM_BITS) [!_LIBC]: Use getrandom, not getentropy. * modules/tempname (Depends-on): Depend on getrandom, not getentropy.
* doc: New chapter 'Multithreading'.Bruno Haible2020-06-023-0/+228
| | | | | * doc/multithread.texi: New file. * doc/gnulib.texi: Include it.
* getentropy, getrandom: update version numbers in docPaul Eggert2020-06-012-2/+2
|
* doc: Move 'Running self-tests under valgrind' section.Bruno Haible2020-06-012-3/+10
| | | | | | * doc/gnulib.texi (Build Infrastructure Modules): Include valgrind-tests.texi here... (Miscellaneous Notes): ... not here.
* doc: Move 'Visual Studio Compatibility' section.Bruno Haible2020-06-012-3/+10
| | | | | | * doc/gnulib.texi (Native Windows Support): Include ld-output-def.texi here... (Build Infrastructure Modules): ... not here.
* doc: improve randomness discussionPaul Eggert2020-06-013-12/+36
| | | | | | | | | Inspired by comments from Jeffrey Walton in: https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html * doc/glibc-functions/getentropy.texi (getentropy): * doc/glibc-functions/getrandom.texi (getrandom): Improve discussion of problems with "random" data, and cite Ristenpart & Yilek. Also, mention GRND_INSECURE.
* doc: Fix Texinfo syntax error.Bruno Haible2020-06-012-0/+6
| | | | * doc/glibc-functions/getrandom.texi: Add missing '@item'.
* doc: Change '.' to '@.' where appropriate.Asher Gordon2020-06-0174-80/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/c-ctype.texi: Change '.' to '@.' where appropriate. * doc/glibc-functions/fstatfs.texi: Likewise. * doc/glibc-functions/fts_children.texi: Likewise. * doc/glibc-functions/fts_read.texi: Likewise. * doc/glibc-functions/getdirentries.texi: Likewise. * doc/glibc-functions/mkostemp.texi: Likewise. * doc/glibc-functions/mkostemps.texi: Likewise. * doc/glibc-functions/mkstemps.texi: Likewise. * doc/glibc-functions/preadv.texi: Likewise. * doc/glibc-functions/pwritev.texi: Likewise. * doc/glibc-functions/sendfile.texi: Likewise. * doc/glibc-functions/statfs.texi: Likewise. * doc/gnulib-intro.texi: Likewise. * doc/gnulib-tool.texi: Likewise. * doc/intprops.texi: Likewise. * doc/lib-symbol-visibility.texi: Likewise. * doc/licenses-texi.texi: Likewise. * doc/pastposix-functions/bcmp.texi: Likewise. * doc/pastposix-functions/bcopy.texi: Likewise. * doc/pastposix-functions/bzero.texi: Likewise. * doc/pastposix-functions/ecvt.texi: Likewise. * doc/pastposix-functions/fcvt.texi: Likewise. * doc/pastposix-functions/ftime.texi: Likewise. * doc/pastposix-functions/gcvt.texi: Likewise. * doc/pastposix-functions/getwd.texi: Likewise. * doc/pastposix-functions/index.texi: Likewise. * doc/pastposix-functions/mktemp.texi: Likewise. * doc/pastposix-functions/rindex.texi: Likewise. * doc/pastposix-functions/wcswcs.texi: Likewise. * doc/posix-functions/aio_cancel.texi: Likewise. * doc/posix-functions/aio_error.texi: Likewise. * doc/posix-functions/aio_fsync.texi: Likewise. * doc/posix-functions/aio_read.texi: Likewise. * doc/posix-functions/aio_return.texi: Likewise. * doc/posix-functions/aio_suspend.texi: Likewise. * doc/posix-functions/aio_write.texi: Likewise. * doc/posix-functions/creat.texi: Likewise. * doc/posix-functions/ctime.texi: Likewise. * doc/posix-functions/daylight.texi: Likewise. * doc/posix-functions/fgetpos.texi: Likewise. * doc/posix-functions/fopen.texi: Likewise. * doc/posix-functions/freopen.texi: Likewise. * doc/posix-functions/fseeko.texi: Likewise. * doc/posix-functions/fsetpos.texi: Likewise. * doc/posix-functions/fstatat.texi: Likewise. * doc/posix-functions/fstatvfs.texi: Likewise. * doc/posix-functions/ftello.texi: Likewise. * doc/posix-functions/ftruncate.texi: Likewise. * doc/posix-functions/getrlimit.texi: Likewise. * doc/posix-functions/lio_listio.texi: Likewise. * doc/posix-functions/localtime.texi: Likewise. * doc/posix-functions/lseek.texi: Likewise. * doc/posix-functions/mkstemp.texi: Likewise. * doc/posix-functions/mktime.texi: Likewise. * doc/posix-functions/open.texi: Likewise. * doc/posix-functions/openat.texi: Likewise. * doc/posix-functions/opendir.texi: Likewise. * doc/posix-functions/pread.texi: Likewise. * doc/posix-functions/pwrite.texi: Likewise. * doc/posix-functions/readdir.texi: Likewise. * doc/posix-functions/readdir_r.texi: Likewise. * doc/posix-functions/scandir.texi: Likewise. * doc/posix-functions/seekdir.texi: Likewise. * doc/posix-functions/setrlimit.texi: Likewise. * doc/posix-functions/statvfs.texi: Likewise. * doc/posix-functions/strftime.texi: Likewise. * doc/posix-functions/telldir.texi: Likewise. * doc/posix-functions/timezone.texi: Likewise. * doc/posix-functions/tmpfile.texi: Likewise. * doc/posix-functions/truncate.texi: Likewise. * doc/posix-functions/tzname.texi: Likewise. * doc/posix-functions/wcsftime.texi: Likewise. * doc/windows-sockets.texi: Likewise.
* getrandom-tests: do not assume GRND_RANDOM yields short readPaul Eggert2020-05-312-18/+12
| | | | | | | | | | | | * tests/test-getrandom.c (main): Omit assertion that getrandom (b, sizeof b, GRND_RANDOM | GRND_NONBLOCK) < sizeof b when b’s size is 100000. This assertion fails with Linux kernel 5.6.13, as that kernel ignores the GRND_RANDOM flag. The separate blocking pool is going away in the Linux kernel, and they’ve added a flag GRND_INSECURE instead; see: https://lore.kernel.org/linux-api/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.org/ The assertion was iffy anyway; what’s to prevent a kernel from lazily filling a large buffer with random bytes?
* read-file-test: pacify --enable-gcc-warningsPaul Eggert2020-05-312-1/+4
| | | | * tests/test-read-file.c (test_read_file): Now static.
* tempname: merge from glibc and coreutilsPaul Eggert2020-05-314-141/+173
| | | | | | | | | | | | | | | | | | | | | | | | | Also, merge in Gnulib’s more-recent methods of making it easier to share between Gnulib and glibc, and fix a few randomness glitches. * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC. (__set_errno): Remove; libc-config.h does that for us. Do not include <sys/time.h>. (__secure_getenv) [_LIBC]: New macro. (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros. (RANDOM_BITS): Rewrite. (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros. (random_value): New typedef. (try_file, try_dir, try_nocreate): Move up. (gen_tempname_len, try_tempname_len): New functions. (gen_tempname_len): Use a constant array rather than a switch. (try_tempname_len): Don’t assume string length fits in int. Generalize use of RANDOM_BITS. If _LIBC, don’t assume RANDOM_BITS has enough entropy (it’s a bit short). (__gen_tempname): Rewrite in terms of gen_tempname_len. (__try_tempname): Rewrite in terms of try_tempname_len. * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls. * modules/tempname (Depends-on): Remove gettimeofday, sys_time. Add getentropy, libc-config.
* getrandom, getentropy: Mention the crypto/gc-random module.Bruno Haible2020-05-313-1/+22
| | | | | | | | | Suggested by Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00400.html>. * doc/glibc-functions/getrandom.texi: Mention the quality issues and the crypto/gc-random module. * doc/glibc-functions/getentropy.texi: Likewise.
* getentropy: Enhance tests.Bruno Haible2020-05-313-0/+21
| | | | | * tests/test-getentropy.c (main): Add one more test. * tests/test-unistd-c++.cc: Check the signature of getentropy.
* getentropy: Work around a macOS and Solaris problem.Bruno Haible2020-05-316-7/+38
| | | | | | | | | | | | * lib/unistd.in.h: Include <sys/random.h>, when needed for the 'getentropy' module. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize UNISTD_H_HAVE_SYS_RANDOM_H. * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set UNISTD_H_HAVE_SYS_RANDOM_H. * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H. * doc/glibc-functions/getentropy.texi: Document the macOS and Solaris problem. List more platforms.
* fnmatch: merge from glibcPaul Eggert2020-05-315-467/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, merge in Gnulib’s more-recent methods of making it easier to share between Gnulib and glibc. * lib/fnmatch.c: Reorder includes to match glibc better. Include libc-config.h instead of config.h. Include alloca.h only if _LIBC || HAVE_ALLOCA. Do not include "../locale/elem-hash.h" if _LIBC. Define macros for btowc, etc. if _LIBC. All uses simplified. Define FALLTHROUGH if _LIBC, instead of including attribute.h. Include intprops.h, since glibc has it now. (SIZE_MAX): Remove; use (size_t) -1 instead. Omit the "Comment out all this code" ifdef, since Gnulib has never really needed it. (STREQ): Remove; no longer used. (__libc_use_alloca, alloca, alloca_account): Define as needed if !_LIBC. (ISWCTYPE): Remove; all uses replaced by iswctype. (HANDLE_MULTIBYTE): Remove. All uses removed by assuming true. (internal_function): Remove. All uses removed. (STRUCT): New macro. (WIDE_CHAR_VERSION): Define to 0 instead of leaving undefined. (WMEMCMP): New macro. (FINDIDX): Define if _LIBC, and include <locale/weight.h> and <locale/weightwc.h>. (fnmatch): Prefer __glibc_likely and __glibc_unlikely to __builtin_expect. Check for integer overflow more systematically. Account for alloca storage better when recursive. Use strnlen instead of strlen for efficiency. * lib/fnmatch_loop.c: Include stdint.h if _LIBC, for int32_t etc. (struct STRUCT): New type. (FCT, EXT): New ENDS and ALLOCA_USED args. All callers changed. (FCT): Prefer __glibc_unlikely to __builtin_expect. Simplify by assuming WIDE_CHAR_SUPPORT. Copy _LIBC code from glibc without worrying Gnulib compatibility. Cast cold to UCHAR to avoid signedness warning. (END): Check for invalid pattern. (EXT): Improve alloca/malloc checking (taken from glibc), and improve it some more by using intprops.h and checking for integer overflow and using bool for booleans. * lib/libc-config.h (compat_symbol): New macro. (versioned_symbol): Make it ‘extern int dummy’ so that it’s acceptable to non-GCC when a trailing semicolon is added. * modules/fnmatch (Depends-on): Add alloca-opt, intprops, libc-config, strnlen. Remove alloca.
* getrandom: Doc and test tweaks.Bruno Haible2020-05-315-10/+44
| | | | | | | | | | | | * lib/getrandom.c (getrandom): Mention that it never returns 0, and that it sets errno when failing. * tests/test-getrandom.c (main): Disable the high-quality check on those platforms on which it fails. * doc/glibc-functions/getrandom.texi: Add Minix, AIX, HP-UX, IRIX, Cygwin to the list of platforms that don't have the function. Add a note about the quality of the result. * doc/glibc-headers/sys_random.texi: Don't mention the 'getrandom' declaration; this is fixed by module 'getrandom'.
* getrandom: Add support for native Windows.Bruno Haible2020-05-319-5/+168
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>, <wincrypt.h>. (CRYPT_VERIFY_CONTEXT): New macro. (LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix 'A'. (GetProcAddress): New macro. (BCryptGenRandomFuncType): New type. (BCryptGenRandomFunc, initialized): New variables. (initialize): New function. (getrandom): On native Windows, use <bcrypt.h> API when available, and <wincrypt.h> API as fallback. * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM. * modules/getrandom (Link): New section. * modules/getentropy (Link): Likewise. * modules/getrandom-tests (Makefile.am): Link test-getrandom against $(LIB_GETRANDOM). * modules/getentropy-tests (Makefile.am): Link test-getentropy against $(LIB_GETRANDOM). * modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++ against $(LIB_GETRANDOM). * doc/glibc-functions/getrandom.texi: Mention the native Windows support.
* getrandom: Simplify the determination of the random number devices.Bruno Haible2020-05-313-1/+28
| | | | | | | | | Suggested by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00383.html>. * lib/getrandom.c (NAME_OF_RANDOM_DEVICE, NAME_OF_NONCE_DEVICE): New macros. * modules/getrandom (Depends-on): Remove crypto/gc-random.
* crypto/gc-random: Fix list of crypto devices for Solaris.Bruno Haible2020-05-312-2/+7
| | | | * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case Solaris.
* list: fix GCC warningsAkim Demaille2020-05-315-17/+37
| | | | | | | | | | | | | * 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.
* list-c++, set-c++, oset-c++, map-c++, omap-c++: Don't fool the compiler.Bruno Haible2020-05-316-6/+61
| | | | | | | | | | | 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.
* wmemchr: Relicense under LGPLv2+.Bruno Haible2020-05-312-1/+6
| | | | * modules/wmemchr (License): Set to LGPLv2+.
* wmempcpy: New module.Bruno Haible2020-05-3110-7/+133
| | | | | | | | | | | | | | | | | 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.
* crypto/gc-random: Fix list of crypto devices for NetBSD, OpenBSD.Bruno Haible2020-05-312-8/+7
| | | | * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case NetBSD and OpenBSD.
* sys_random: Work around macOS bug.Bruno Haible2020-05-315-3/+29
| | | | | | | | | * 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.
* getrandom: Fix typo in last commit.Bruno Haible2020-05-301-1/+1
| | | | * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Fix value of REPLACE_GETRANDOM.
* getrandom: Override incompatible system function on Solaris 11.Bruno Haible2020-05-309-11/+70
| | | | | | | | | | | | | | | | * 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.
* sys_random: Add C++ tests.Bruno Haible2020-05-304-0/+59
| | | | | | * tests/test-sys_random-c++.cc: New file. * modules/sys_random-c++-tests: New file. * modules/sys_random-tests (Depends-on): Depend on it.
* sys_random: Add tests.Bruno Haible2020-05-303-0/+46
| | | | | * tests/test-sys_random.c: New file. * modules/sys_random-tests: New file.
* sys_random: New module.Bruno Haible2020-05-308-21/+217
| | | | | | | | | | | | | | | * 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.
* unistd: Remove conflicting declaration of getrandom().Bruno Haible2020-05-304-24/+13
| | | | | | | | | | * 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.
* getrandom: Add tests.Bruno Haible2020-05-303-0/+101
| | | | | * tests/test-getrandom.c: New file. * modules/getrandom-tests: New file.
* crypto/gc-random: Fix typo in last commit.Bruno Haible2020-05-304-7/+7
|
* crypto/gc-random: Fix link error on MSVC.Bruno Haible2020-05-304-3/+22
| | | | | | | * m4/gc-random.m4 (gl_GC_RANDOM): Set LIB_GC_RAMDOM. * modules/crypto/gc-random (Link): New section. * modules/crypto/gc-tests (Makefile.am): Link test-gc against $(LIB_GC_RAMDOM).
* Don't assume that UNICODE is not defined.Bruno Haible2020-05-3040-27/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.