+2004-07-14 Jeffrey Altman <jaltman@mit.edu>
+
+ * k5-int.h: define for WIN32 the macro krb5int_zap_data to
+ utilize the Win32 API SecureZeroMemory which is guaranteed
+ by Microsoft not to be optimized out by the compiler.
+ Both memset and ZeroMemory will be optimized out by the
+ compiler when possible.
+
2004-07-13 Ken Raeburn <raeburn@mit.edu>
* k5-platform.h (k5_call_init_function) [DELAY_INITIALIZER]
* fake-addrinfo.h (in6addr_any): If we need to define a static
copy, rename it with a macro first.
+>>>>>>> 1.444
2004-07-09 Ken Raeburn <raeburn@mit.edu>
* k5-thread.h: Test HAVE_PTHREAD instead of HAVE_PTHREAD_H.
const krb5_data *);
/* Make this a function eventually? */
-#define krb5int_zap_data(ptr, len) memset((volatile void *)ptr, 0, len)
-#if defined(__GNUC__) && defined(__GLIBC__)
+#ifdef WIN32
+# define krb5int_zap_data(ptr, len) SecureZeroMemory(ptr, len)
+#else
+# define krb5int_zap_data(ptr, len) memset((volatile void *)ptr, 0, len)
+# if defined(__GNUC__) && defined(__GLIBC__)
/* GNU libc generates multiple bogus initialization warnings if we
pass memset a volatile pointer. The compiler should do well enough
with memset even without GNU libc's attempt at optimization. */
-#undef memset
-#endif
+# undef memset
+# endif
+#endif /* WIN32 */
#define zap(p,l) krb5int_zap_data(p,l)
/* A definition of init_state for DES based encryption systems.