DEVEL15-windows-vista-sdk-ntsecapi-compat-20070324
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 24 Mar 2007 05:03:11 +0000 (05:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 24 Mar 2007 05:03:11 +0000 (05:03 +0000)
When loading the Vista SDK ntsecapi.h we must set _WIN32_WINNT
to 0x0501 or greater

(cherry picked from commit a6cb25c5d34db370e73d5e0044eaa88cf291228a)

src/WINNT/afsd/afskfw-int.h
src/WINNT/afsd/afslogon.h
src/WINNT/afsd/smb.h

index d787112..e975f2f 100644 (file)
 #ifdef USE_MS2MIT
 #define SECURITY_WIN32
 #include <security.h>
+#if _WIN32_WINNT < 0x0501
+#define AFS_WIN32_WINNT _WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
 #include <ntsecapi.h>
+#ifdef AFS_WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT AFS_WIN32_WINNT
+#undef AFS_WIN32_WINNT
+#endif
 #endif /* USE_MS2MIT */
 #include <stdio.h>
 #include <string.h>
index 46065c3..a5ed23a 100644 (file)
@@ -28,7 +28,17 @@ SOFTWARE.
 
 #include <windows.h>
 #include <npapi.h>
+#if _WIN32_WINNT < 0x0501
+#define AFS_WIN32_WINNT _WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
 #include <ntsecapi.h>
+#ifdef AFS_WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT AFS_WIN32_WINNT
+#undef AFS_WIN32_WINNT
+#endif
 #include <tchar.h>
 #include <strsafe.h>
 
index ebb5e09..3782909 100644 (file)
 #include "netbios95.h"
 #endif /* DJGPP */
 
+#if _WIN32_WINNT < 0x0501
+#define AFS_WIN32_WINNT _WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
 #include <ntsecapi.h>
+#ifdef AFS_WIN32_WINNT
+#undef _WIN32_WINNT
+#define _WIN32_WINNT AFS_WIN32_WINNT
+#undef AFS_WIN32_WINNT
+#endif
 
 /* Support largefiles by default */
 #define AFS_LARGEFILES