https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9f88d594d9ec036474a09c6f27a9b9e5c878a18

commit b9f88d594d9ec036474a09c6f27a9b9e5c878a18
Author:     Thomas Faber <thomas.fa...@reactos.org>
AuthorDate: Sun Feb 4 19:24:00 2018 +0100
Commit:     Thomas Faber <thomas.fa...@reactos.org>
CommitDate: Sun Feb 4 19:28:36 2018 +0100

    [PSDK][XDK] Remove DECLSPEC_* from windef.h, protect against redefinition 
in winnt.h
---
 dll/win32/browseui/browseui.rc |  1 -
 sdk/include/psdk/windef.h      | 23 -----------------------
 sdk/include/xdk/ntbasedef.h    | 12 ++++++++++--
 3 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc
index 030d614112..aa8c3435a9 100644
--- a/dll/win32/browseui/browseui.rc
+++ b/dll/win32/browseui/browseui.rc
@@ -22,7 +22,6 @@
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
 #include <shlobj.h>
-#undef DECLSPEC_IMPORT
 
 #include "resource.h"
 
diff --git a/sdk/include/psdk/windef.h b/sdk/include/psdk/windef.h
index 0166f3c832..a456269b55 100644
--- a/sdk/include/psdk/windef.h
+++ b/sdk/include/psdk/windef.h
@@ -107,29 +107,6 @@ typedef int INT;
 #define PACKED
 #endif
 
-#ifdef __GNUC__
-#define DECLSPEC_NORETURN __declspec(noreturn)
-#define DECLARE_STDCALL_P( type ) __stdcall type
-#elif defined(__WATCOMC__)
-#define DECLSPEC_NORETURN
-#define DECLARE_STDCALL_P( type ) type __stdcall
-#elif defined(_MSC_VER)
-#define DECLSPEC_NORETURN __declspec(noreturn)
-#define DECLARE_STDCALL_P( type ) type __stdcall
-#endif /* __GNUC__/__WATCOMC__ */
-
-#define DECLSPEC_IMPORT __declspec(dllimport)
-#define DECLSPEC_EXPORT __declspec(dllexport)
-#ifndef DECLSPEC_NOINLINE
-#if (_MSC_VER >= 1300)
-#define DECLSPEC_NOINLINE  __declspec(noinline)
-#elif defined(__GNUC__)
-#define DECLSPEC_NOINLINE __attribute__((noinline))
-#else
-#define DECLSPEC_NOINLINE
-#endif
-#endif
-
 #undef far
 #undef near
 #undef pascal
diff --git a/sdk/include/xdk/ntbasedef.h b/sdk/include/xdk/ntbasedef.h
index a1270d2428..7a1cded3cc 100644
--- a/sdk/include/xdk/ntbasedef.h
+++ b/sdk/include/xdk/ntbasedef.h
@@ -163,8 +163,16 @@
 
 /* Import and Export Specifiers */
 
-/* Done the same way as in windef.h for now */
-#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL?
+#ifndef DECLSPEC_IMPORT
+ #define DECLSPEC_IMPORT __declspec(dllimport) // MIDL?
+#endif /* DECLSPEC_IMPORT */
+
+#ifndef DECLSPEC_EXPORT
+ #if defined(__REACTOS__) || defined(__WINESRC__)
+  #define DECLSPEC_EXPORT __declspec(dllexport)
+ #endif
+#endif /* DECLSPEC_EXPORT */
+
 #define DECLSPEC_NORETURN __declspec(noreturn)
 
 #ifndef DECLSPEC_ADDRSAFE

Reply via email to