diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2010-05-26 10:36:46 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2010-05-26 10:36:46 +0300 |
commit | 920a69a8d8e4203c5edddd829d932130eac188ea (patch) | |
tree | e1478b0896e839202014fe63b97876740d7f9f5f /src/liblzma/common | |
parent | Fix compilation of debug/known_sizes.c. (diff) | |
download | xz-920a69a8d8e4203c5edddd829d932130eac188ea.tar.xz |
Rename MIN() and MAX() to my_min() and my_max().
This should avoid some minor portability issues.
Diffstat (limited to 'src/liblzma/common')
-rw-r--r-- | src/liblzma/common/block_buffer_encoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/common.c | 2 | ||||
-rw-r--r-- | src/liblzma/common/stream_buffer_encoder.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/common/block_buffer_encoder.c b/src/liblzma/common/block_buffer_encoder.c index 4d90feef..a8f71c21 100644 --- a/src/liblzma/common/block_buffer_encoder.c +++ b/src/liblzma/common/block_buffer_encoder.c @@ -139,7 +139,7 @@ block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size, // Size of the uncompressed chunk const size_t copy_size - = MIN(in_size - in_pos, LZMA2_CHUNK_MAX); + = my_min(in_size - in_pos, LZMA2_CHUNK_MAX); out[(*out_pos)++] = (copy_size - 1) >> 8; out[(*out_pos)++] = (copy_size - 1) & 0xFF; diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index 2f185e49..07b1d476 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -76,7 +76,7 @@ lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos, { const size_t in_avail = in_size - *in_pos; const size_t out_avail = out_size - *out_pos; - const size_t copy_size = MIN(in_avail, out_avail); + const size_t copy_size = my_min(in_avail, out_avail); memcpy(out + *out_pos, in + *in_pos, copy_size); diff --git a/src/liblzma/common/stream_buffer_encoder.c b/src/liblzma/common/stream_buffer_encoder.c index bbafaa6d..f727d854 100644 --- a/src/liblzma/common/stream_buffer_encoder.c +++ b/src/liblzma/common/stream_buffer_encoder.c @@ -33,7 +33,7 @@ lzma_stream_buffer_bound(size_t uncompressed_size) // Catch the possible integer overflow and also prevent the size of // the Stream exceeding LZMA_VLI_MAX (theoretically possible on // 64-bit systems). - if (MIN(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND) + if (my_min(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND) return 0; return block_bound + HEADERS_BOUND; |