summaryrefslogtreecommitdiff
path: root/lib/gc-gnulib.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-05-30 11:04:02 +0200
committerBruno Haible <bruno@clisp.org>2020-05-30 11:04:02 +0200
commit57f80070ccd8461a224cc84b255844539ab72a8d (patch)
tree2f22eed44e3690bdaa660c6b1fe7322ef6063c69 /lib/gc-gnulib.c
parent4bc0be55d618e5b276f12f3a9cf8ef37ed0529f5 (diff)
downloadgnulib-57f80070ccd8461a224cc84b255844539ab72a8d.tar.gz
Don't assume that UNICODE is not defined.
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.
Diffstat (limited to 'lib/gc-gnulib.c')
-rw-r--r--lib/gc-gnulib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c
index 8e9b88f075..84f42e43f8 100644
--- a/lib/gc-gnulib.c
+++ b/lib/gc-gnulib.c
@@ -89,6 +89,12 @@ HCRYPTPROV g_hProv = 0;
# endif
#endif
+#if defined _WIN32 && ! defined __CYGWIN__
+/* Don't assume that UNICODE is not defined. */
+# undef CryptAcquireContext
+# define CryptAcquireContext CryptAcquireContextA
+#endif
+
Gc_rc
gc_init (void)
{