aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma.h
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/api/lzma.h
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/api/lzma.h')
-rw-r--r--src/liblzma/api/lzma.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
index 24bdc74e..bb617213 100644
--- a/src/liblzma/api/lzma.h
+++ b/src/liblzma/api/lzma.h
@@ -149,6 +149,23 @@
#endif /* ifdef LZMA_MANUAL_HEADERS */
+/******************
+ * LZMA_API macro *
+ ******************/
+
+/*
+ * Some systems require that the functions are declared specially
+ * in the headers.
+ */
+#ifndef LZMA_API
+# if defined(_WIN32)
+# define LZMA_API __cdecl __declspec(dllimport)
+# else
+# define LZMA_API
+# endif
+#endif
+
+
/********************
* GNU C extensions *
********************/