From 390a6408563067613b29de895cb40e4d0386d62c Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Fri, 26 Jun 2009 15:37:53 +0300 Subject: Basic support for building with Cygwin and MinGW using the Autotools based build system. It's not good yet, more fixes will follow. --- src/liblzma/api/lzma.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/liblzma/api') diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h index 97e02958..77032f3a 100644 --- a/src/liblzma/api/lzma.h +++ b/src/liblzma/api/lzma.h @@ -173,9 +173,12 @@ * to operating systems like Windows, or at least don't care about linking * against static liblzma on them, don't worry about LZMA_API_STATIC. That * is, most developers will never need to use LZMA_API_STATIC. + * + * Cygwin is a special case on Windows. We rely on GCC doing the right thing + * and thus don't use dllimport and don't specify the calling convention. */ #ifndef LZMA_API_IMPORT -# if !defined(LZMA_API_STATIC) && defined(_WIN32) +# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__CYGWIN__) # define LZMA_API_IMPORT __declspec(dllimport) # else # define LZMA_API_IMPORT @@ -183,7 +186,7 @@ #endif #ifndef LZMA_API_CALL -# ifdef _WIN32 +# if defined(_WIN32) && !defined(__CYGWIN__) # define LZMA_API_CALL __cdecl # else # define LZMA_API_CALL -- cgit v1.2.3