diff options
author | Brad King <brad.king@kitware.com> | 2014-07-24 14:51:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-29 12:45:36 (GMT) |
commit | 73eab246fbfad22bcc1b0bb5599f8e0cffb79c0d (patch) | |
tree | d3358ae784286a14a0bafb60e6c413f7f204c4eb /Utilities/cmliblzma/liblzma/lz/lz_decoder.c | |
parent | 90e7a4d41f588d87415381fdb507735e6438992c (diff) | |
download | CMake-73eab246fbfad22bcc1b0bb5599f8e0cffb79c0d.zip CMake-73eab246fbfad22bcc1b0bb5599f8e0cffb79c0d.tar.gz CMake-73eab246fbfad22bcc1b0bb5599f8e0cffb79c0d.tar.bz2 |
liblzma: Avoid defining a 'restrict' macro
Any "#define restrict ..." line may conflict with MSVC header files
that use "__declspec(restrict)". Define our own LZMA_RESTRICT macro
in "Utilities/cmliblzma/config.h.in" and transform liblzma code to
use it:
git grep -lE '\<restrict\>' Utilities/cmliblzma/liblzma |
xargs sed -i 's/\<restrict\>/LZMA_RESTRICT/g'
Diffstat (limited to 'Utilities/cmliblzma/liblzma/lz/lz_decoder.c')
-rw-r--r-- | Utilities/cmliblzma/liblzma/lz/lz_decoder.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Utilities/cmliblzma/liblzma/lz/lz_decoder.c b/Utilities/cmliblzma/liblzma/lz/lz_decoder.c index f45984e..9fa1bdc 100644 --- a/Utilities/cmliblzma/liblzma/lz/lz_decoder.c +++ b/Utilities/cmliblzma/liblzma/lz/lz_decoder.c @@ -64,9 +64,9 @@ lz_decoder_reset(lzma_coder *coder) static lzma_ret decode_buffer(lzma_coder *coder, - const uint8_t *restrict in, size_t *restrict in_pos, - size_t in_size, uint8_t *restrict out, - size_t *restrict out_pos, size_t out_size) + const uint8_t *LZMA_RESTRICT in, size_t *LZMA_RESTRICT in_pos, + size_t in_size, uint8_t *LZMA_RESTRICT out, + size_t *LZMA_RESTRICT out_pos, size_t out_size) { while (true) { size_t copy_size; @@ -131,9 +131,9 @@ decode_buffer(lzma_coder *coder, static lzma_ret lz_decode(lzma_coder *coder, lzma_allocator *allocator lzma_attribute((__unused__)), - const uint8_t *restrict in, size_t *restrict in_pos, - size_t in_size, uint8_t *restrict out, - size_t *restrict out_pos, size_t out_size, + const uint8_t *LZMA_RESTRICT in, size_t *LZMA_RESTRICT in_pos, + size_t in_size, uint8_t *LZMA_RESTRICT out, + size_t *LZMA_RESTRICT out_pos, size_t out_size, lzma_action action) { if (coder->next.code == NULL) |