https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bda22774a74ab9fd24620…
commit bda22774a74ab9fd246201de35ada73477b7d68f
Author: Victor Perevertkin <victor(a)perevertkin.ru>
AuthorDate: Sat Aug 17 23:08:22 2019 +0300
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Tue Aug 20 15:05:47 2019 +0200
[PSDK] Fix GCC8 complaining on duplicate and wrong declarations
---
sdk/include/psdk/cguid.h | 46 ++++++++++++++++++++++++-------------------
sdk/include/psdk/docobj.idl | 2 +-
sdk/include/psdk/mswsockdef.h | 4 ++--
3 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/sdk/include/psdk/cguid.h b/sdk/include/psdk/cguid.h
index 3473851ac83..d8f06bd6c35 100644
--- a/sdk/include/psdk/cguid.h
+++ b/sdk/include/psdk/cguid.h
@@ -19,33 +19,39 @@
#ifndef __CGUID_H__
#define __CGUID_H__
+#if __GNUC__ >= 8
+#define GCC8DECLSPEC_SELECTANY DECLSPEC_SELECTANY
+#else
+#define GCC8DECLSPEC_SELECTANY
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-extern const IID GUID_NULL;
-extern const IID IID_IRpcChannel;
-extern const IID IID_IRpcStub;
-extern const IID IID_IStubManager;
-extern const IID IID_IRpcProxy;
-extern const IID IID_IProxyManager;
-extern const IID IID_IPSFactory;
-extern const IID IID_IInternalMoniker;
-extern const IID IID_IDfReserved1;
-extern const IID IID_IDfReserved2;
-extern const IID IID_IDfReserved3;
+extern const IID GCC8DECLSPEC_SELECTANY GUID_NULL;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IRpcChannel;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IRpcStub;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IStubManager;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IRpcProxy;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IProxyManager;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IPSFactory;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IInternalMoniker;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IDfReserved1;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IDfReserved2;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IDfReserved3;
extern const CLSID CLSID_StdMarshal;
extern const CLSID CLSID_AggStdMarshal;
extern const CLSID CLSID_StdAsyncActManager;
-extern const IID IID_IStub;
-extern const IID IID_IProxy;
-extern const IID IID_IEnumGeneric;
-extern const IID IID_IEnumHolder;
-extern const IID IID_IEnumCallback;
-extern const IID IID_IOleManager;
-extern const IID IID_IOlePresObj;
-extern const IID IID_IDebug;
-extern const IID IID_IDebugStream;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IStub;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IProxy;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IEnumGeneric;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IEnumHolder;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IEnumCallback;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IOleManager;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IOlePresObj;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IDebug;
+extern const IID GCC8DECLSPEC_SELECTANY IID_IDebugStream;
extern const CLSID CLSID_PSGenObject;
extern const CLSID CLSID_PSClientSite;
extern const CLSID CLSID_PSClassObject;
diff --git a/sdk/include/psdk/docobj.idl b/sdk/include/psdk/docobj.idl
index 119d4eab84e..e90c19023b1 100644
--- a/sdk/include/psdk/docobj.idl
+++ b/sdk/include/psdk/docobj.idl
@@ -419,4 +419,4 @@ cpp_quote("#define IID_IMsoView
IID_IOleDocumentView")
cpp_quote("#define IID_IEnumMsoView IID_IEnumOleDocumentViews")
cpp_quote("#define IID_IMsoCommandTarget IID_IOleCommandTarget")
-cpp_quote("EXTERN_C const GUID SID_SContainerDispatch;")
+cpp_quote("DEFINE_GUID(SID_SContainerDispatch,
0xb722be00,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);")
diff --git a/sdk/include/psdk/mswsockdef.h b/sdk/include/psdk/mswsockdef.h
index 6303cf46978..75d812c2029 100644
--- a/sdk/include/psdk/mswsockdef.h
+++ b/sdk/include/psdk/mswsockdef.h
@@ -21,7 +21,7 @@ extern "C" {
#ifdef _WS2DEF_
-extern CONST UCHAR sockaddr_size[AF_MAX];
+const UCHAR sockaddr_size[AF_MAX];
MSWSOCKDEF_INLINE
UCHAR
@@ -53,7 +53,7 @@ typedef enum _WSA_COMPATIBILITY_BEHAVIOR_ID {
typedef struct _WSA_COMPATIBILITY_MODE {
WSA_COMPATIBILITY_BEHAVIOR_ID BehaviorId;
ULONG TargetOsVersion;
-} WSA_COMPATIBILITY_MODE, *PWSA_COMPATIBILITY_MODE;
+} WSA_COMPATIBILITY_MODE, *PWSA_COMPATIBILITY_MODE;
#endif /* (_WIN32_WINNT>=0x0600) */