aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-12-09 00:38:55 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-12-09 00:38:55 +0200
commitf7e44c6c11f630519072971b8b07a5729c096c36 (patch)
treeb1b45dd12185b7c6bc55be3a25ea776245bbf722 /src
parentFix file_io.c on DOS-like systems. (diff)
downloadxz-f7e44c6c11f630519072971b8b07a5729c096c36.tar.xz
Always rely on GCC's auto-import on Windows.
I understood that this is nicer, because then people don't need to worry about the LZMA_API_STATIC macro. Thanks to Charles Wilson and Keith Marshall.
Diffstat (limited to 'src')
-rw-r--r--src/liblzma/api/lzma.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
index f5ab30d1..5be9b4e3 100644
--- a/src/liblzma/api/lzma.h
+++ b/src/liblzma/api/lzma.h
@@ -162,10 +162,9 @@
******************/
/*
- * Some systems require (or at least recommend) that the functions and
- * function pointers are declared specially in the headers. LZMA_API_IMPORT
- * is for importing symbols and LZMA_API_CALL is to specify calling
- * convention.
+ * Some systems require that the functions and function pointers are
+ * declared specially in the headers. LZMA_API_IMPORT is for importing
+ * symbols and LZMA_API_CALL is to specify the calling convention.
*
* By default it is assumed that the application will link dynamically
* against liblzma. #define LZMA_API_STATIC in your application if you
@@ -174,11 +173,14 @@
* 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.
+ * The GCC variants are a special case on Windows (Cygwin and MinGW).
+ * We rely on GCC doing the right thing with its auto-import feature,
+ * and thus don't use __declspec(dllimport). This way developers don't
+ * need to worry about LZMA_API_STATIC. Also the calling convention is
+ * omitted on Cygwin but not on MinGW.
*/
#ifndef LZMA_API_IMPORT
-# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__CYGWIN__)
+# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
# define LZMA_API_IMPORT __declspec(dllimport)
# else
# define LZMA_API_IMPORT