`error: use of undeclared identifier 'NEGOSSP_NAME'`
I encountered the following problem when trying to compile these programs with winegcc:
- https://learn.microsoft.com/en-us/windows/win32/secauthn/using-sspi-with-a-w... - https://learn.microsoft.com/en-us/windows/win32/secauthn/using-sspi-with-a-w...
So, adding this code helps to solve the problem
-- v6: include/security.h: Add definition of NEGOSSP_NAME
From: Vadim Kazakov xipster@etersoft.ru
--- include/security.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/include/security.h b/include/security.h index 11ff6f77044..09f17684c96 100644 --- a/include/security.h +++ b/include/security.h @@ -17,6 +17,17 @@ #ifndef _SECURITY_H #define _SECURITY_H
+#ifndef NEGOSSP_NAME +#define NEGOSSP_NAME_W L"Negotiate" +#define NEGOSSP_NAME_A "Negotiate" + +#ifdef UNICODE +#define NEGOSSP_NAME NEGOSSP_NAME_W +#else +#define NEGOSSP_NAME NEGOSSP_NAME_A +#endif +#endif /* NEGOSSP_NAME */ + #include <sspi.h>
#if defined(SECURITY_WIN32) || defined(SECURITY_KERNEL)
Please look how this is done in other places, like schannel.h.
On Fri Feb 28 17:38:27 2025 +0000, Alexandre Julliard wrote:
Please look how this is done in other places, like schannel.h.
You mean, I should do it like this?
``` #ifndef NEGOSSP_NAME #define NEGOSSP_NAME_A "Negotiate" #if defined(_MSC_VER) || defined(__MINGW32__) #define NEGOSSP_NAME_W L"Negotiate" #else static const WCHAR NEGOSSP_NAME_W[] = { 'N','e','g','o','t','i','a','t','e',0 }; #endif #define NEGOSSP_NAME WINELIB_NAME_AW(NEGOSSP_NAME_) #endif /* NEGOSSP_NAME */ ```
On Fri Feb 28 17:38:27 2025 +0000, Vadim Kazakov wrote:
You mean, I should do it like this?
#ifndef NEGOSSP_NAME #define NEGOSSP_NAME_A "Negotiate" #if defined(_MSC_VER) || defined(__MINGW32__) #define NEGOSSP_NAME_W L"Negotiate" #else static const WCHAR NEGOSSP_NAME_W[] = { 'N','e','g','o','t','i','a','t','e',0 }; #endif #define NEGOSSP_NAME WINELIB_NAME_AW(NEGOSSP_NAME_) #endif /* NEGOSSP_NAME */
Yes, exactly.