aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-02 20:14:03 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-02 20:14:03 +0200
commit22a0c6dd940b78cdac2f4a4b4b0e7cc0ac15021f (patch)
tree0e99fcc4cf336731fb52e3b028a0ecccbbbe1673 /src/liblzma/common
parentFix a bug in lzma_block_buffer_decode(), although this (diff)
downloadxz-22a0c6dd940b78cdac2f4a4b4b0e7cc0ac15021f.tar.xz
Modify LZMA_API macro so that it works on Windows with
other compilers than MinGW. This may hurt readability of the API headers slightly, but I don't know any better way to do this.
Diffstat (limited to 'src/liblzma/common')
-rw-r--r--src/liblzma/common/alone_decoder.c2
-rw-r--r--src/liblzma/common/alone_encoder.c2
-rw-r--r--src/liblzma/common/auto_decoder.c2
-rw-r--r--src/liblzma/common/block_buffer_decoder.c2
-rw-r--r--src/liblzma/common/block_buffer_encoder.c4
-rw-r--r--src/liblzma/common/block_decoder.c2
-rw-r--r--src/liblzma/common/block_encoder.c2
-rw-r--r--src/liblzma/common/block_header_decoder.c2
-rw-r--r--src/liblzma/common/block_header_encoder.c4
-rw-r--r--src/liblzma/common/block_util.c6
-rw-r--r--src/liblzma/common/chunk_size.c2
-rw-r--r--src/liblzma/common/common.c16
-rw-r--r--src/liblzma/common/common.h2
-rw-r--r--src/liblzma/common/easy.c6
-rw-r--r--src/liblzma/common/filter_buffer_decoder.c2
-rw-r--r--src/liblzma/common/filter_buffer_encoder.c2
-rw-r--r--src/liblzma/common/filter_decoder.c8
-rw-r--r--src/liblzma/common/filter_encoder.c12
-rw-r--r--src/liblzma/common/filter_flags_decoder.c2
-rw-r--r--src/liblzma/common/filter_flags_encoder.c4
-rw-r--r--src/liblzma/common/index.c32
-rw-r--r--src/liblzma/common/index_decoder.c4
-rw-r--r--src/liblzma/common/index_encoder.c4
-rw-r--r--src/liblzma/common/index_hash.c10
-rw-r--r--src/liblzma/common/stream_buffer_decoder.c2
-rw-r--r--src/liblzma/common/stream_buffer_encoder.c4
-rw-r--r--src/liblzma/common/stream_decoder.c2
-rw-r--r--src/liblzma/common/stream_encoder.c2
-rw-r--r--src/liblzma/common/stream_flags_common.c2
-rw-r--r--src/liblzma/common/stream_flags_decoder.c4
-rw-r--r--src/liblzma/common/stream_flags_encoder.c4
-rw-r--r--src/liblzma/common/vli_decoder.c2
-rw-r--r--src/liblzma/common/vli_encoder.c2
-rw-r--r--src/liblzma/common/vli_size.c2
34 files changed, 80 insertions, 80 deletions
diff --git a/src/liblzma/common/alone_decoder.c b/src/liblzma/common/alone_decoder.c
index c822f04c..7d1672f2 100644
--- a/src/liblzma/common/alone_decoder.c
+++ b/src/liblzma/common/alone_decoder.c
@@ -224,7 +224,7 @@ lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
{
lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit);
diff --git a/src/liblzma/common/alone_encoder.c b/src/liblzma/common/alone_encoder.c
index b2dccf05..429fbbf0 100644
--- a/src/liblzma/common/alone_encoder.c
+++ b/src/liblzma/common/alone_encoder.c
@@ -152,7 +152,7 @@ lzma_alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
*/
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
{
lzma_next_strm_init(alone_encoder_init, strm, options);
diff --git a/src/liblzma/common/auto_decoder.c b/src/liblzma/common/auto_decoder.c
index 7333da66..50630613 100644
--- a/src/liblzma/common/auto_decoder.c
+++ b/src/liblzma/common/auto_decoder.c
@@ -181,7 +181,7 @@ auto_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
{
lzma_next_strm_init(auto_decoder_init, strm, memlimit, flags);
diff --git a/src/liblzma/common/block_buffer_decoder.c b/src/liblzma/common/block_buffer_decoder.c
index 9f95637c..5f22822e 100644
--- a/src/liblzma/common/block_buffer_decoder.c
+++ b/src/liblzma/common/block_buffer_decoder.c
@@ -20,7 +20,7 @@
#include "block_decoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_buffer_decode(lzma_block *block, lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size,
uint8_t *out, size_t *out_pos, size_t out_size)
diff --git a/src/liblzma/common/block_buffer_encoder.c b/src/liblzma/common/block_buffer_encoder.c
index 67412a7d..79587d9c 100644
--- a/src/liblzma/common/block_buffer_encoder.c
+++ b/src/liblzma/common/block_buffer_encoder.c
@@ -58,7 +58,7 @@ lzma2_bound(lzma_vli uncompressed_size)
}
-extern LZMA_API size_t
+extern LZMA_API(size_t)
lzma_block_buffer_bound(size_t uncompressed_size)
{
// For now, if the data doesn't compress, we always use uncompressed
@@ -228,7 +228,7 @@ block_encode_normal(lzma_block *block, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
const uint8_t *in, size_t in_size,
uint8_t *out, size_t *out_pos, size_t out_size)
diff --git a/src/liblzma/common/block_decoder.c b/src/liblzma/common/block_decoder.c
index 59a20bfa..eea0759d 100644
--- a/src/liblzma/common/block_decoder.c
+++ b/src/liblzma/common/block_decoder.c
@@ -241,7 +241,7 @@ lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_decoder(lzma_stream *strm, lzma_block *block)
{
lzma_next_strm_init(lzma_block_decoder_init, strm, block);
diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c
index 2b9151eb..8492eb2f 100644
--- a/src/liblzma/common/block_encoder.c
+++ b/src/liblzma/common/block_encoder.c
@@ -196,7 +196,7 @@ lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_encoder(lzma_stream *strm, lzma_block *block)
{
lzma_next_strm_init(lzma_block_encoder_init, strm, block);
diff --git a/src/liblzma/common/block_header_decoder.c b/src/liblzma/common/block_header_decoder.c
index 82afb425..096d4620 100644
--- a/src/liblzma/common/block_header_decoder.c
+++ b/src/liblzma/common/block_header_decoder.c
@@ -37,7 +37,7 @@ free_properties(lzma_block *block, lzma_allocator *allocator)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_header_decode(lzma_block *block,
lzma_allocator *allocator, const uint8_t *in)
{
diff --git a/src/liblzma/common/block_header_encoder.c b/src/liblzma/common/block_header_encoder.c
index d4427c3d..1dd9eab2 100644
--- a/src/liblzma/common/block_header_encoder.c
+++ b/src/liblzma/common/block_header_encoder.c
@@ -21,7 +21,7 @@
#include "check.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_header_size(lzma_block *block)
{
if (block->version != 0)
@@ -77,7 +77,7 @@ lzma_block_header_size(lzma_block *block)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_header_encode(const lzma_block *block, uint8_t *out)
{
// Valdidate everything but filters.
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c
index fa25b9a0..2a950507 100644
--- a/src/liblzma/common/block_util.c
+++ b/src/liblzma/common/block_util.c
@@ -21,7 +21,7 @@
#include "index.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_block_compressed_size(lzma_block *block, lzma_vli total_size)
{
// Validate everything but Uncompressed Size and filters.
@@ -49,7 +49,7 @@ lzma_block_compressed_size(lzma_block *block, lzma_vli total_size)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_block_unpadded_size(const lzma_block *block)
{
// Validate the values that we are interested in i.e. all but
@@ -85,7 +85,7 @@ lzma_block_unpadded_size(const lzma_block *block)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_block_total_size(const lzma_block *block)
{
lzma_vli unpadded_size = lzma_block_unpadded_size(block);
diff --git a/src/liblzma/common/chunk_size.c b/src/liblzma/common/chunk_size.c
index 33276b28..29a8e02b 100644
--- a/src/liblzma/common/chunk_size.c
+++ b/src/liblzma/common/chunk_size.c
@@ -36,7 +36,7 @@
Zero if the Uncompressed Sizes of Blocks don't matter
*/
-extern LZMA_API size_t
+extern LZMA_API(size_t)
lzma_chunk_size(const lzma_options_filter *filters)
{
while (filters->id != LZMA_VLI_UNKNOWN) {
diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c
index 92308fe4..b1733973 100644
--- a/src/liblzma/common/common.c
+++ b/src/liblzma/common/common.c
@@ -24,14 +24,14 @@
// Version //
/////////////
-extern LZMA_API uint32_t
+extern LZMA_API(uint32_t)
lzma_version_number(void)
{
return LZMA_VERSION;
}
-extern LZMA_API const char *
+extern LZMA_API(const char *)
lzma_version_string(void)
{
return PACKAGE_VERSION;
@@ -158,7 +158,7 @@ lzma_strm_init(lzma_stream *strm)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_code(lzma_stream *strm, lzma_action action)
{
// Sanity checks
@@ -284,7 +284,7 @@ lzma_code(lzma_stream *strm, lzma_action action)
}
-extern LZMA_API void
+extern LZMA_API(void)
lzma_end(lzma_stream *strm)
{
if (strm != NULL && strm->internal != NULL) {
@@ -297,7 +297,7 @@ lzma_end(lzma_stream *strm)
}
-extern LZMA_API lzma_check
+extern LZMA_API(lzma_check)
lzma_get_check(const lzma_stream *strm)
{
// Return LZMA_CHECK_NONE if we cannot know the check type.
@@ -309,7 +309,7 @@ lzma_get_check(const lzma_stream *strm)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_memusage(const lzma_stream *strm)
{
uint64_t memusage;
@@ -326,7 +326,7 @@ lzma_memusage(const lzma_stream *strm)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_memlimit_get(const lzma_stream *strm)
{
uint64_t old_memlimit;
@@ -343,7 +343,7 @@ lzma_memlimit_get(const lzma_stream *strm)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
{
// Dummy variables to simplify memconfig functions
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h
index 4d5b773a..cbb2eb9b 100644
--- a/src/liblzma/common/common.h
+++ b/src/liblzma/common/common.h
@@ -33,7 +33,7 @@
# define LZMA_API_EXPORT
#endif
-#define LZMA_API LZMA_API_CALL LZMA_API_EXPORT
+#define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
#include "lzma.h"
diff --git a/src/liblzma/common/easy.c b/src/liblzma/common/easy.c
index 718fffdd..8147a5b5 100644
--- a/src/liblzma/common/easy.c
+++ b/src/liblzma/common/easy.c
@@ -92,7 +92,7 @@ easy_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
{
lzma_next_strm_init(easy_encoder_init, strm, preset, check);
@@ -106,7 +106,7 @@ lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_easy_encoder_memusage(uint32_t preset)
{
lzma_coder coder;
@@ -117,7 +117,7 @@ lzma_easy_encoder_memusage(uint32_t preset)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_easy_decoder_memusage(uint32_t preset)
{
lzma_coder coder;
diff --git a/src/liblzma/common/filter_buffer_decoder.c b/src/liblzma/common/filter_buffer_decoder.c
index bf682aa6..ab50d2d7 100644
--- a/src/liblzma/common/filter_buffer_decoder.c
+++ b/src/liblzma/common/filter_buffer_decoder.c
@@ -20,7 +20,7 @@
#include "filter_decoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size,
uint8_t *out, size_t *out_pos, size_t out_size)
diff --git a/src/liblzma/common/filter_buffer_encoder.c b/src/liblzma/common/filter_buffer_encoder.c
index 95e325a9..b146a9e9 100644
--- a/src/liblzma/common/filter_buffer_encoder.c
+++ b/src/liblzma/common/filter_buffer_encoder.c
@@ -20,7 +20,7 @@
#include "filter_encoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_raw_buffer_encode(const lzma_filter *filters, lzma_allocator *allocator,
const uint8_t *in, size_t in_size, uint8_t *out,
size_t *out_pos, size_t out_size)
diff --git a/src/liblzma/common/filter_decoder.c b/src/liblzma/common/filter_decoder.c
index 2b6ff840..050bdd9a 100644
--- a/src/liblzma/common/filter_decoder.c
+++ b/src/liblzma/common/filter_decoder.c
@@ -151,7 +151,7 @@ decoder_find(lzma_vli id)
}
-extern LZMA_API lzma_bool
+extern LZMA_API(lzma_bool)
lzma_filter_decoder_is_supported(lzma_vli id)
{
return decoder_find(id) != NULL;
@@ -167,7 +167,7 @@ lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
{
lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
@@ -179,7 +179,7 @@ lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_raw_decoder_memusage(const lzma_filter *filters)
{
return lzma_raw_coder_memusage(
@@ -187,7 +187,7 @@ lzma_raw_decoder_memusage(const lzma_filter *filters)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_properties_decode(lzma_filter *filter, lzma_allocator *allocator,
const uint8_t *props, size_t props_size)
{
diff --git a/src/liblzma/common/filter_encoder.c b/src/liblzma/common/filter_encoder.c
index 661a54db..8d94031b 100644
--- a/src/liblzma/common/filter_encoder.c
+++ b/src/liblzma/common/filter_encoder.c
@@ -180,7 +180,7 @@ encoder_find(lzma_vli id)
}
-extern LZMA_API lzma_bool
+extern LZMA_API(lzma_bool)
lzma_filter_encoder_is_supported(lzma_vli id)
{
return encoder_find(id) != NULL;
@@ -196,7 +196,7 @@ lzma_raw_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
{
lzma_next_strm_init(lzma_raw_coder_init, strm, options,
@@ -210,7 +210,7 @@ lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
}
-extern LZMA_API uint64_t
+extern LZMA_API(uint64_t)
lzma_raw_encoder_memusage(const lzma_filter *filters)
{
return lzma_raw_coder_memusage(
@@ -218,7 +218,7 @@ lzma_raw_encoder_memusage(const lzma_filter *filters)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_chunk_size(const lzma_filter *filters)
{
lzma_vli max = 0;
@@ -241,7 +241,7 @@ lzma_chunk_size(const lzma_filter *filters)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_properties_size(uint32_t *size, const lzma_filter *filter)
{
const lzma_filter_encoder *const fe = encoder_find(filter->id);
@@ -264,7 +264,7 @@ lzma_properties_size(uint32_t *size, const lzma_filter *filter)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
{
const lzma_filter_encoder *const fe = encoder_find(filter->id);
diff --git a/src/liblzma/common/filter_flags_decoder.c b/src/liblzma/common/filter_flags_decoder.c
index c2247312..345b565f 100644
--- a/src/liblzma/common/filter_flags_decoder.c
+++ b/src/liblzma/common/filter_flags_decoder.c
@@ -20,7 +20,7 @@
#include "filter_decoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_filter_flags_decode(
lzma_filter *filter, lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size)
diff --git a/src/liblzma/common/filter_flags_encoder.c b/src/liblzma/common/filter_flags_encoder.c
index 22b6dd1f..da8a34fd 100644
--- a/src/liblzma/common/filter_flags_encoder.c
+++ b/src/liblzma/common/filter_flags_encoder.c
@@ -20,7 +20,7 @@
#include "filter_encoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
{
if (filter->id >= LZMA_FILTER_RESERVED_START)
@@ -34,7 +34,7 @@ lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_filter_flags_encode(const lzma_filter *filter,
uint8_t *out, size_t *out_pos, size_t out_size)
{
diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c
index d7025fff..2478deab 100644
--- a/src/liblzma/common/index.c
+++ b/src/liblzma/common/index.c
@@ -114,7 +114,7 @@ struct lzma_index_s {
};
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_memusage(lzma_vli count)
{
if (count > LZMA_VLI_MAX)
@@ -140,7 +140,7 @@ free_index_list(lzma_index *i, lzma_allocator *allocator)
}
-extern LZMA_API lzma_index *
+extern LZMA_API(lzma_index *)
lzma_index_init(lzma_index *i, lzma_allocator *allocator)
{
if (i == NULL) {
@@ -166,7 +166,7 @@ lzma_index_init(lzma_index *i, lzma_allocator *allocator)
}
-extern LZMA_API void
+extern LZMA_API(void)
lzma_index_end(lzma_index *i, lzma_allocator *allocator)
{
if (i != NULL) {
@@ -178,28 +178,28 @@ lzma_index_end(lzma_index *i, lzma_allocator *allocator)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_count(const lzma_index *i)
{
return i->count;
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_size(const lzma_index *i)
{
return index_size(i->count, i->index_list_size);
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_total_size(const lzma_index *i)
{
return i->total_size;
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_stream_size(const lzma_index *i)
{
// Stream Header + Blocks + Index + Stream Footer
@@ -209,7 +209,7 @@ lzma_index_stream_size(const lzma_index *i)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_file_size(const lzma_index *i)
{
// If multiple Streams are concatenated, the Stream Header, Index,
@@ -223,7 +223,7 @@ lzma_index_file_size(const lzma_index *i)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_uncompressed_size(const lzma_index *i)
{
return i->uncompressed_size;
@@ -286,7 +286,7 @@ index_append_real(lzma_index *i, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_append(lzma_index *i, lzma_allocator *allocator,
lzma_vli unpadded_size, lzma_vli uncompressed_size)
{
@@ -436,7 +436,7 @@ set_info(const lzma_index *i, lzma_index_record *info)
}
-extern LZMA_API lzma_bool
+extern LZMA_API(lzma_bool)
lzma_index_read(lzma_index *i, lzma_index_record *info)
{
if (i->current.group == NULL) {
@@ -462,7 +462,7 @@ lzma_index_read(lzma_index *i, lzma_index_record *info)
}
-extern LZMA_API void
+extern LZMA_API(void)
lzma_index_rewind(lzma_index *i)
{
i->current.group = NULL;
@@ -470,7 +470,7 @@ lzma_index_rewind(lzma_index *i)
}
-extern LZMA_API lzma_bool
+extern LZMA_API(lzma_bool)
lzma_index_locate(lzma_index *i, lzma_index_record *info, lzma_vli target)
{
// Check if it is possible to fullfill the request.
@@ -541,7 +541,7 @@ lzma_index_locate(lzma_index *i, lzma_index_record *info, lzma_vli target)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
lzma_allocator *allocator, lzma_vli padding)
{
@@ -687,7 +687,7 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
}
-extern LZMA_API lzma_index *
+extern LZMA_API(lzma_index *)
lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
{
lzma_index *dest = lzma_alloc(sizeof(lzma_index), allocator);
@@ -745,7 +745,7 @@ lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
}
-extern LZMA_API lzma_bool
+extern LZMA_API(lzma_bool)
lzma_index_equal(const lzma_index *a, const lzma_index *b)
{
// No point to compare more if the pointers are the same.
diff --git a/src/liblzma/common/index_decoder.c b/src/liblzma/common/index_decoder.c
index de507978..f7cb8e4f 100644
--- a/src/liblzma/common/index_decoder.c
+++ b/src/liblzma/common/index_decoder.c
@@ -272,7 +272,7 @@ index_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
{
lzma_next_strm_init(index_decoder_init, strm, i, memlimit);
@@ -283,7 +283,7 @@ lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_buffer_decode(
lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size)
diff --git a/src/liblzma/common/index_encoder.c b/src/liblzma/common/index_encoder.c
index 17a0806a..52910f08 100644
--- a/src/liblzma/common/index_encoder.c
+++ b/src/liblzma/common/index_encoder.c
@@ -216,7 +216,7 @@ lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_encoder(lzma_stream *strm, lzma_index *i)
{
lzma_next_strm_init(lzma_index_encoder_init, strm, i);
@@ -227,7 +227,7 @@ lzma_index_encoder(lzma_stream *strm, lzma_index *i)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_buffer_encode(lzma_index *i,
uint8_t *out, size_t *out_pos, size_t out_size)
{
diff --git a/src/liblzma/common/index_hash.c b/src/liblzma/common/index_hash.c
index 162094d1..6371caa9 100644
--- a/src/liblzma/common/index_hash.c
+++ b/src/liblzma/common/index_hash.c
@@ -76,7 +76,7 @@ struct lzma_index_hash_s {
};
-extern LZMA_API lzma_index_hash *
+extern LZMA_API(lzma_index_hash *)
lzma_index_hash_init(lzma_index_hash *index_hash, lzma_allocator *allocator)
{
if (index_hash == NULL) {
@@ -107,7 +107,7 @@ lzma_index_hash_init(lzma_index_hash *index_hash, lzma_allocator *allocator)
}
-extern LZMA_API void
+extern LZMA_API(void)
lzma_index_hash_end(lzma_index_hash *index_hash, lzma_allocator *allocator)
{
lzma_free(index_hash, allocator);
@@ -115,7 +115,7 @@ lzma_index_hash_end(lzma_index_hash *index_hash, lzma_allocator *allocator)
}
-extern LZMA_API lzma_vli
+extern LZMA_API(lzma_vli)
lzma_index_hash_size(const lzma_index_hash *index_hash)
{
// Get the size of the Index from ->blocks instead of ->records for
@@ -145,7 +145,7 @@ hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
lzma_vli uncompressed_size)
{
@@ -176,7 +176,7 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
size_t *in_pos, size_t in_size)
{
diff --git a/src/liblzma/common/stream_buffer_decoder.c b/src/liblzma/common/stream_buffer_decoder.c
index aef2b982..937534ce 100644
--- a/src/liblzma/common/stream_buffer_decoder.c
+++ b/src/liblzma/common/stream_buffer_decoder.c
@@ -20,7 +20,7 @@
#include "stream_decoder.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size,
diff --git a/src/liblzma/common/stream_buffer_encoder.c b/src/liblzma/common/stream_buffer_encoder.c
index 29588365..3ecc694a 100644
--- a/src/liblzma/common/stream_buffer_encoder.c
+++ b/src/liblzma/common/stream_buffer_encoder.c
@@ -29,7 +29,7 @@
#define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
-extern LZMA_API size_t
+extern LZMA_API(size_t)
lzma_stream_buffer_bound(size_t uncompressed_size)
{
// Get the maximum possible size of a Block.
@@ -47,7 +47,7 @@ lzma_stream_buffer_bound(size_t uncompressed_size)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
lzma_allocator *allocator, const uint8_t *in, size_t in_size,
uint8_t *out, size_t *out_pos_ptr, size_t out_size)
diff --git a/src/liblzma/common/stream_decoder.c b/src/liblzma/common/stream_decoder.c
index 66dfa778..796a7fd4 100644
--- a/src/liblzma/common/stream_decoder.c
+++ b/src/liblzma/common/stream_decoder.c
@@ -440,7 +440,7 @@ lzma_stream_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
{
lzma_next_strm_init(lzma_stream_decoder_init, strm, memlimit, flags);
diff --git a/src/liblzma/common/stream_encoder.c b/src/liblzma/common/stream_encoder.c
index 4400e26a..89fc2f9d 100644
--- a/src/liblzma/common/stream_encoder.c
+++ b/src/liblzma/common/stream_encoder.c
@@ -266,7 +266,7 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_encoder(lzma_stream *strm,
const lzma_filter *filters, lzma_check check)
{
diff --git a/src/liblzma/common/stream_flags_common.c b/src/liblzma/common/stream_flags_common.c
index ae587717..51dd981c 100644
--- a/src/liblzma/common/stream_flags_common.c
+++ b/src/liblzma/common/stream_flags_common.c
@@ -24,7 +24,7 @@ const uint8_t lzma_header_magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
const uint8_t lzma_footer_magic[2] = { 0x59, 0x5A };
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_flags_compare(
const lzma_stream_flags *a, const lzma_stream_flags *b)
{
diff --git a/src/liblzma/common/stream_flags_decoder.c b/src/liblzma/common/stream_flags_decoder.c
index 50463096..7c9aabf1 100644
--- a/src/liblzma/common/stream_flags_decoder.c
+++ b/src/liblzma/common/stream_flags_decoder.c
@@ -34,7 +34,7 @@ stream_flags_decode(lzma_stream_flags *options, const uint8_t *in)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
{
// Magic
@@ -63,7 +63,7 @@ lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
{
// Magic
diff --git a/src/liblzma/common/stream_flags_encoder.c b/src/liblzma/common/stream_flags_encoder.c
index 21c62ffd..2dfaf92f 100644
--- a/src/liblzma/common/stream_flags_encoder.c
+++ b/src/liblzma/common/stream_flags_encoder.c
@@ -33,7 +33,7 @@ stream_flags_encode(const lzma_stream_flags *options, uint8_t *out)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
{
assert(sizeof(lzma_header_magic) + LZMA_STREAM_FLAGS_SIZE
@@ -60,7 +60,7 @@ lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
}
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
{
assert(2 * 4 + LZMA_STREAM_FLAGS_SIZE + sizeof(lzma_footer_magic)
diff --git a/src/liblzma/common/vli_decoder.c b/src/liblzma/common/vli_decoder.c
index 78ef539a..c2a4b1eb 100644
--- a/src/liblzma/common/vli_decoder.c
+++ b/src/liblzma/common/vli_decoder.c
@@ -20,7 +20,7 @@
#include "common.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_vli_decode(lzma_vli *restrict vli, size_t *restrict vli_pos,
const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size)
diff --git a/src/liblzma/common/vli_encoder.c b/src/liblzma/common/vli_encoder.c
index 0d8e7f1a..f8215002 100644
--- a/src/liblzma/common/vli_encoder.c
+++ b/src/liblzma/common/vli_encoder.c
@@ -20,7 +20,7 @@
#include "common.h"
-extern LZMA_API lzma_ret
+extern LZMA_API(lzma_ret)
lzma_vli_encode(lzma_vli vli, size_t *restrict vli_pos,
uint8_t *restrict out, size_t *restrict out_pos,
size_t out_size)
diff --git a/src/liblzma/common/vli_size.c b/src/liblzma/common/vli_size.c
index e87094d8..dfdceecd 100644
--- a/src/liblzma/common/vli_size.c
+++ b/src/liblzma/common/vli_size.c
@@ -20,7 +20,7 @@
#include "common.h"
-extern LZMA_API uint32_t
+extern LZMA_API(uint32_t)
lzma_vli_size(lzma_vli vli)
{
if (vli > LZMA_VLI_MAX)