From: Jacek Caban jacek@codeweavers.com
--- include/dde.h | 4 +++- include/ddeml.h | 4 +++- include/ntgdi.h | 4 +++- include/ntuser.h | 4 +++- include/rpc.h | 2 ++ include/twain.h | 17 ++++++++++++----- include/wingdi.h | 4 +++- include/winnt.h | 4 +++- include/winuser.h | 8 +++++--- 9 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/include/dde.h b/include/dde.h index 7b236414dac..c7e4448e221 100644 --- a/include/dde.h +++ b/include/dde.h @@ -29,8 +29,10 @@ extern "C" { #endif
#ifndef WINUSERAPI -#if defined(_USER32_) || defined(WINE_UNIX_LIB) +#if defined(WINE_UNIX_LIB) #define WINUSERAPI DECLSPEC_EXPORT +#elif defined(_USER32_) +#define WINUSERAPI #else #define WINUSERAPI DECLSPEC_IMPORT #endif diff --git a/include/ddeml.h b/include/ddeml.h index 0bffa851c79..bf5859c4a6d 100644 --- a/include/ddeml.h +++ b/include/ddeml.h @@ -27,8 +27,10 @@ extern "C" { #endif /* defined(__cplusplus) */
#ifndef WINUSERAPI -#if defined(_USER32_) || defined(WINE_UNIX_LIB) +#if defined(WINE_UNIX_LIB) #define WINUSERAPI DECLSPEC_EXPORT +#elif defined(_USER32_) +#define WINUSERAPI #else #define WINUSERAPI DECLSPEC_IMPORT #endif diff --git a/include/ntgdi.h b/include/ntgdi.h index c2cb1924730..14e2a503286 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -25,8 +25,10 @@ #include <ddk/d3dkmthk.h>
#ifndef W32KAPI -# if defined(_WIN32U_) || defined(WINE_UNIX_LIB) +# if defined(WINE_UNIX_LIB) # define W32KAPI DECLSPEC_EXPORT +# elif defined(_WIN32U_) +# define W32KAPI # else # define W32KAPI DECLSPEC_IMPORT # endif diff --git a/include/ntuser.h b/include/ntuser.h index def89a82aff..8eb6b2c71c8 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -26,8 +26,10 @@ #include <winternl.h>
#ifndef W32KAPI -# if defined(_WIN32U_) || defined(WINE_UNIX_LIB) +# if defined(WINE_UNIX_LIB) # define W32KAPI DECLSPEC_EXPORT +# elif defined(_WIN32U_) +# define W32KAPI # else # define W32KAPI DECLSPEC_IMPORT # endif diff --git a/include/rpc.h b/include/rpc.h index 2d4323428c4..cc1d9c8e1e3 100644 --- a/include/rpc.h +++ b/include/rpc.h @@ -42,6 +42,8 @@ #ifndef RPCRTAPI #if !defined(_RPCRT4_) && !defined(_KRPCENV_) #define RPCRTAPI DECLSPEC_IMPORT +#elif defined(__WINESRC__) +#define RPCRTAPI #else #define RPCRTAPI DECLSPEC_EXPORT #endif diff --git a/include/twain.h b/include/twain.h index 28eaddf0840..455126e6b21 100644 --- a/include/twain.h +++ b/include/twain.h @@ -1817,11 +1817,18 @@ typedef TW_UINT16 (*DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, extern "C" { #endif /* __cplusplus */ #ifdef _MSWIN_ - TW_UINT16 DECLSPEC_EXPORT PASCAL DS_Entry (pTW_IDENTITY pOrigin, - TW_UINT32 DG, - TW_UINT16 DAT, - TW_UINT16 MSG, - TW_MEMREF pData); + +#ifdef __WINESRC__ +# define TWAIN_EXPORT +#else +# define TWAIN_EXPORT DECLSPEC_EXPORT +#endif + + TW_UINT16 TWAIN_EXPORT PASCAL DS_Entry (pTW_IDENTITY pOrigin, + TW_UINT32 DG, + TW_UINT16 DAT, + TW_UINT16 MSG, + TW_MEMREF pData);
typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin, TW_UINT32 DG, diff --git a/include/wingdi.h b/include/wingdi.h index ff0bbb6fc85..f1cdfef3a45 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -25,8 +25,10 @@ extern "C" { #endif
#ifndef WINGDIAPI -#if defined(_GDI32_) || defined(WINE_UNIX_LIB) +#if defined(WINE_UNIX_LIB) #define WINGDIAPI DECLSPEC_EXPORT +#elif defined(_GDI32_) +#define WINGDIAPI #else #define WINGDIAPI DECLSPEC_IMPORT #endif diff --git a/include/winnt.h b/include/winnt.h index d1c82084f9f..8a6e8e6850a 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -42,8 +42,10 @@ extern "C" { #endif
-#if defined(_NTSYSTEM_) || defined(WINE_UNIX_LIB) +#if defined(WINE_UNIX_LIB) #define NTSYSAPI DECLSPEC_EXPORT +#elif defined(_NTSYSTEM_) +#define NTSYSAPI #else #define NTSYSAPI DECLSPEC_IMPORT #endif diff --git a/include/winuser.h b/include/winuser.h index 73e7919aaea..f8aa471631d 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -20,10 +20,12 @@ #define _WINUSER_
#ifndef WINUSERAPI -#if !defined(_USER32_) && !defined(WINE_UNIX_LIB) -#define WINUSERAPI DECLSPEC_IMPORT -#else +#if defined(WINE_UNIX_LIB) #define WINUSERAPI DECLSPEC_EXPORT +#elif defined(_USER32_) +#define WINUSERAPI +#else +#define WINUSERAPI DECLSPEC_IMPORT #endif #endif