advapi32: Avoid defining SECURITY_INFORMATION multiple times.

Francois Gouget fgouget at free.fr
Sat Feb 28 11:51:06 CST 2015


---

This uses the usual _XXX_DEFINED approach but it seems to be the first 
time it's used in an idl file. I have thought about importing an idl 
file providing the SECURITY_INFORMATION but there appears to be none 
right now. Is there a better way?

This fixes the compilation on FreeBSD (7.0 and 8.1 in my case).


 include/wine/svcctl.idl | 3 +++
 include/winnt.h         | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/include/wine/svcctl.idl b/include/wine/svcctl.idl
index e8463b5..1c3d22f 100644
--- a/include/wine/svcctl.idl
+++ b/include/wine/svcctl.idl
@@ -65,7 +65,10 @@ interface svcctl
     typedef [context_handle] void *SC_RPC_LOCK;
     typedef [context_handle] void *SC_NOTIFY_RPC_HANDLE;
 
+    cpp_quote("#ifndef _SECURITY_INFORMATION_DEFINED")
+    cpp_quote("#define _SECURITY_INFORMATION_DEFINED")
     typedef DWORD SECURITY_INFORMATION;
+    cpp_quote("#endif")
 
     /* undocumented access rights */
     cpp_quote("#define SERVICE_SET_STATUS   0x8000")
diff --git a/include/winnt.h b/include/winnt.h
index 4b06b2c..0a4185d 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3971,7 +3971,10 @@ static const WCHAR SE_CREATE_GLOBAL_NAME[] = { 'S','e','C','r','e','a','t','e','
 #define SE_RM_CONTROL_VALID		0x00004000
 #define SE_SELF_RELATIVE		0x00008000
 
+#ifndef _SECURITY_INFORMATION_DEFINED
+#define _SECURITY_INFORMATION_DEFINED
 typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION;
+#endif
 typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
 
 /* The security descriptor structure */
-- 
2.1.4



More information about the wine-patches mailing list