diff options
| author | Paul Eggert | 2020-06-28 13:22:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-06-28 13:24:06 -0700 |
| commit | 665014452dec841302785bcd0fc4dc96d93f3d30 (patch) | |
| tree | 2fb65ad54fd18d9e9c5e717dc2ef03f0ad024c7a /lib | |
| parent | 162f375bac22786d95a253f03de0148be4fe3201 (diff) | |
| download | emacs-665014452dec841302785bcd0fc4dc96d93f3d30.tar.gz emacs-665014452dec841302785bcd0fc4dc96d93f3d30.zip | |
Update from Gnulib.
This incorporates:
2020-06-28 getrandom: do not depend on ‘open’ on mingw
2020-06-28 getrandom: fix compilation errors on older versions of mingw
* build-aux/config.sub, lib/getrandom.c, m4/getrandom.m4:
Copy from Gnulib
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/getrandom.c | 11 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/getrandom.c b/lib/getrandom.c index f0b3f535007..030a78bb08d 100644 --- a/lib/getrandom.c +++ b/lib/getrandom.c | |||
| @@ -29,7 +29,16 @@ | |||
| 29 | #if defined _WIN32 && ! defined __CYGWIN__ | 29 | #if defined _WIN32 && ! defined __CYGWIN__ |
| 30 | # define WIN32_LEAN_AND_MEAN | 30 | # define WIN32_LEAN_AND_MEAN |
| 31 | # include <windows.h> | 31 | # include <windows.h> |
| 32 | # include <bcrypt.h> | 32 | # if HAVE_BCRYPT_H |
| 33 | # include <bcrypt.h> | ||
| 34 | # else | ||
| 35 | # include <ntdef.h> /* NTSTATUS */ | ||
| 36 | typedef void * BCRYPT_ALG_HANDLE; | ||
| 37 | # define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 | ||
| 38 | # if HAVE_LIB_BCRYPT | ||
| 39 | extern NTSTATUS WINAPI BCryptGenRandom (BCRYPT_ALG_HANDLE, UCHAR *, ULONG, ULONG); | ||
| 40 | # endif | ||
| 41 | # endif | ||
| 33 | # if !HAVE_LIB_BCRYPT | 42 | # if !HAVE_LIB_BCRYPT |
| 34 | # include <wincrypt.h> | 43 | # include <wincrypt.h> |
| 35 | # ifndef CRYPT_VERIFY_CONTEXT | 44 | # ifndef CRYPT_VERIFY_CONTEXT |
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 8174ea26fa5..35d2db09bd4 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -109,6 +109,7 @@ | |||
| 109 | # futimens \ | 109 | # futimens \ |
| 110 | # getloadavg \ | 110 | # getloadavg \ |
| 111 | # getopt-gnu \ | 111 | # getopt-gnu \ |
| 112 | # getrandom \ | ||
| 112 | # gettime \ | 113 | # gettime \ |
| 113 | # gettimeofday \ | 114 | # gettimeofday \ |
| 114 | # gitlog-to-changelog \ | 115 | # gitlog-to-changelog \ |
| @@ -1095,6 +1096,7 @@ gl_GNULIB_ENABLED_getdtablesize = @gl_GNULIB_ENABLED_getdtablesize@ | |||
| 1095 | gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@ | 1096 | gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@ |
| 1096 | gl_GNULIB_ENABLED_lchmod = @gl_GNULIB_ENABLED_lchmod@ | 1097 | gl_GNULIB_ENABLED_lchmod = @gl_GNULIB_ENABLED_lchmod@ |
| 1097 | gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@ | 1098 | gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@ |
| 1099 | gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@ | ||
| 1098 | gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@ | 1100 | gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@ |
| 1099 | gl_GNULIB_ENABLED_utimens = @gl_GNULIB_ENABLED_utimens@ | 1101 | gl_GNULIB_ENABLED_utimens = @gl_GNULIB_ENABLED_utimens@ |
| 1100 | gl_LIBOBJS = @gl_LIBOBJS@ | 1102 | gl_LIBOBJS = @gl_LIBOBJS@ |
| @@ -2168,7 +2170,9 @@ endif | |||
| 2168 | ## begin gnulib module open | 2170 | ## begin gnulib module open |
| 2169 | ifeq (,$(OMIT_GNULIB_MODULE_open)) | 2171 | ifeq (,$(OMIT_GNULIB_MODULE_open)) |
| 2170 | 2172 | ||
| 2173 | ifneq (,$(gl_GNULIB_ENABLED_open)) | ||
| 2171 | 2174 | ||
| 2175 | endif | ||
| 2172 | EXTRA_DIST += open.c | 2176 | EXTRA_DIST += open.c |
| 2173 | 2177 | ||
| 2174 | EXTRA_libgnu_a_SOURCES += open.c | 2178 | EXTRA_libgnu_a_SOURCES += open.c |