diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-01-31 11:01:48 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-01-31 11:01:48 +0200 |
commit | 6a2eb54092fc625d59921a607ff68cd1a90aa898 (patch) | |
tree | 83d03f866e998f3576e127196a41b5ff5265c1d4 /src/liblzma/api/lzma.h | |
parent | Use _WIN32 instead of WIN32 in xzdec.c to test if compiling on Windows. (diff) | |
download | xz-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 '')
-rw-r--r-- | src/liblzma/api/lzma.h | 17 |
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 * ********************/ |