* lib/memset_explicit.c (memset_explicit):
Remove special case for C==0 and MS-Windows. The code isn’t
needed for correctness and it’s more trouble than it’s worth as it
prevents this module from being used with GNU Emacs, which wants
to port to MS-Windows versions so old that they lack
SecureZeroMemory.
+2022-12-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ memset_explicit: port to older MS-Windows
+ * lib/memset_explicit.c (memset_explicit):
+ Remove special case for C==0 and MS-Windows. The code isn’t
+ needed for correctness and it’s more trouble than it’s worth as it
+ prevents this module from being used with GNU Emacs, which wants
+ to port to MS-Windows versions so old that they lack
+ SecureZeroMemory.
+
2022-12-09 Bruno Haible <bruno@clisp.org>
Update users.txt.
#include <string.h>
-#if defined _WIN32 && !defined __CYGWIN__
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-#endif
-
/* Set S's bytes to C, where S has LEN bytes. The compiler will not
optimize effects away, even if S is dead after the call. */
void *
memset_explicit (void *s, int c, size_t len)
{
-#if defined _WIN32 && !defined __CYGWIN__
- if (!c)
- return SecureZeroMemory (s, len);
-#endif
#if HAVE_EXPLICIT_MEMSET
return explicit_memset (s, c, len);
#elif HAVE_MEMSET_S