aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-01-31 11:01:48 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-01-31 11:01:48 +0200
commit6a2eb54092fc625d59921a607ff68cd1a90aa898 (patch)
tree83d03f866e998f3576e127196a41b5ff5265c1d4 /src/liblzma/common
parentUse _WIN32 instead of WIN32 in xzdec.c to test if compiling on Windows. (diff)
downloadxz-6a2eb54092fc625d59921a607ff68cd1a90aa898.tar.xz
Add LZMA_API to liblzma API headers. It's useful at least
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h has to be #included separately where needed.
Diffstat (limited to 'src/liblzma/common')
-rw-r--r--src/liblzma/common/common.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h
index 392491e4..2642c5bd 100644
--- a/src/liblzma/common/common.h
+++ b/src/liblzma/common/common.h
@@ -26,11 +26,20 @@
// Don't use ifdef...
#if HAVE_VISIBILITY
-# define LZMA_API __attribute__((__visibility__("default")))
+# define LZMA_VISIBILITY __attribute__((__visibility__("default")))
#else
-# define LZMA_API
+# define LZMA_VISIBILITY
#endif
+#ifdef _WIN32
+# define LZMA_EXPORT __cdecl __declspec(dllexport)
+#else
+# define LZMA_EXPORT
+#endif
+
+#define LZMA_API LZMA_VISIBILITY LZMA_EXPORT
+
+#include "lzma.h"
// These allow helping the compiler in some often-executed branches, whose
// result is almost always the same.