[PSDK][XDK] Remove DECLSPEC_* from windef.h, protect against redefinition in winnt.h

This commit is contained in:
Thomas Faber 2018-02-04 19:24:00 +01:00
parent 0d838f40a3
commit b9f88d594d
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
3 changed files with 10 additions and 26 deletions

View file

@ -22,7 +22,6 @@
#define _INC_WINDOWS #define _INC_WINDOWS
#define COM_NO_WINDOWS_H #define COM_NO_WINDOWS_H
#include <shlobj.h> #include <shlobj.h>
#undef DECLSPEC_IMPORT
#include "resource.h" #include "resource.h"

View file

@ -107,29 +107,6 @@ typedef int INT;
#define PACKED #define PACKED
#endif #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 far
#undef near #undef near
#undef pascal #undef pascal

View file

@ -163,8 +163,16 @@
/* Import and Export Specifiers */ /* Import and Export Specifiers */
/* Done the same way as in windef.h for now */ #ifndef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT __declspec(dllimport) // MIDL? #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) #define DECLSPEC_NORETURN __declspec(noreturn)
#ifndef DECLSPEC_ADDRSAFE #ifndef DECLSPEC_ADDRSAFE