From 04a3aa99a6b051807ce400f1ae093d31bad2053f Mon Sep 17 00:00:00 2001
From: Francois Gouget <fgouget@free.fr>
Date: Sun, 27 May 2007 13:36:48 +0200
Subject: [PATCH] schannel: Fix the name of the SetContextAttributes field of
 SECPKG_FUNCTION_TABLE.

---
 dlls/schannel/lsamode.c    | 4 ++--
 dlls/schannel/tests/main.c | 2 +-
 include/ntsecpkg.h         | 6 +++++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/schannel/lsamode.c b/dlls/schannel/lsamode.c
index b017eb9beac..23d85994cc4 100644
--- a/dlls/schannel/lsamode.c
+++ b/dlls/schannel/lsamode.c
@@ -107,7 +107,7 @@ static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
     NULL, /* SpQueryContextAttributes */
     NULL, /* SpAddCredentials */
     NULL, /* SetExtendedInformation */
-    NULL, /* SpSetContextAttributes */
+    NULL, /* SetContextAttributes */
     NULL, /* SetCredentialsAttributes */
   }, {
     NULL, /* InitializePackage */
@@ -137,7 +137,7 @@ static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
     NULL, /* SpQueryContextAttributes */
     NULL, /* SpAddCredentials */
     NULL, /* SetExtendedInformation */
-    NULL, /* SpSetContextAttributes */
+    NULL, /* SetContextAttributes */
     NULL, /* SetCredentialsAttributes */
   }
 };
diff --git a/dlls/schannel/tests/main.c b/dlls/schannel/tests/main.c
index 88cafc79754..69f4bd670bd 100644
--- a/dlls/schannel/tests/main.c
+++ b/dlls/schannel/tests/main.c
@@ -34,7 +34,7 @@
 
 /* Helper macros to find the size of SECPKG_FUNCTION_TABLE */
 #define SECPKG_FUNCTION_TABLE_SIZE_1 offsetof(SECPKG_FUNCTION_TABLE, \
-    SpSetContextAttributes)
+    SetContextAttributes)
 #define SECPKG_FUNCTION_TABLE_SIZE_2 offsetof(SECPKG_FUNCTION_TABLE, \
     SetCredentialsAttributes)
 #define SECPKG_FUNCTION_TABLE_SIZE_3 sizeof(SECPKG_FUNCTION_TABLE)
diff --git a/include/ntsecpkg.h b/include/ntsecpkg.h
index b8ef222aa6c..e88736012fa 100644
--- a/include/ntsecpkg.h
+++ b/include/ntsecpkg.h
@@ -368,6 +368,10 @@ typedef NTSTATUS (NTAPI SpExportSecurityContextFn)(LSA_SEC_HANDLE, ULONG,
 typedef NTSTATUS (NTAPI SpImportSecurityContextFn)(PSecBuffer, HANDLE,
  PLSA_SEC_HANDLE);
 
+#ifdef WINE_NO_UNICODE_MACROS
+#undef SetContextAttributes
+#endif
+
 /* dispatch tables of LSA-mode functions implemented by SSP/AP */
 typedef struct SECPKG_FUNCTION_TABLE {
     PLSA_AP_INITIALIZE_PACKAGE InitializePackage;
@@ -398,7 +402,7 @@ typedef struct SECPKG_FUNCTION_TABLE {
     SpAddCredentialsFn *SpAddCredentials;
     SpSetExtendedInformationFn *SetExtendedInformation;
     /* Packages with version SECPKG_INTERFACE_VERSION end here */
-    SpSetContextAttributesFn *SpSetContextAttributes;
+    SpSetContextAttributesFn *SetContextAttributes;
     /* Packages with version SECPKG_INTERFACE_VERSION_2 end here */
     SpSetCredentialsAttributesFn *SetCredentialsAttributes;
     /* Packages with version SECPKG_INTERFACE_VERSION_3 end here */
-- 
GitLab