From d64ca34f1b6f34e86adefc7f735b4eff8e6d4a35 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 1 Feb 2009 00:10:07 +0200 Subject: Use __cdecl also for function pointers in liblzma API when on Windows. --- src/liblzma/common/common.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/liblzma/common') diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index 2642c5bd..4d5b773a 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -24,20 +24,16 @@ #include "../../common/mythread.h" #include "../../common/integer.h" -// Don't use ifdef... -#if HAVE_VISIBILITY -# define LZMA_VISIBILITY __attribute__((__visibility__("default"))) +#if defined(_WIN32) +# define LZMA_API_EXPORT __declspec(dllexport) +// Don't use ifdef or defined() below. +#elif HAVE_VISIBILITY +# define LZMA_API_EXPORT __attribute__((__visibility__("default"))) #else -# define LZMA_VISIBILITY +# define LZMA_API_EXPORT #endif -#ifdef _WIN32 -# define LZMA_EXPORT __cdecl __declspec(dllexport) -#else -# define LZMA_EXPORT -#endif - -#define LZMA_API LZMA_VISIBILITY LZMA_EXPORT +#define LZMA_API LZMA_API_CALL LZMA_API_EXPORT #include "lzma.h" -- cgit v1.2.3