[PATCH v6 0/1] MR7369: include/security.h: Add definition of NEGOSSP_NAME
`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 https://gitlab.winehq.org/wine/wine/-/merge_requests/7369
From: Vadim Kazakov <xipster(a)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) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7369
Please look how this is done in other places, like schannel.h. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7369#note_96049
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 */ ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7369#note_96235
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.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7369#note_96236
participants (3)
-
Alexandre Julliard (@julliard) -
Vadim Kazakov -
Vadim Kazakov (@xipster)