diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-10-04 22:57:12 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-10-04 22:57:12 +0300 |
commit | ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24 (patch) | |
tree | 7e2f519ad2be01b8f9c7b230f71d479d550c9ae4 /src/liblzma/simple | |
parent | Add support for --enable-assume-ram=SIZE. (diff) | |
download | xz-ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24.tar.xz |
Use a tuklib module for integer handling.
This replaces bswap.h and integer.h.
The tuklib module uses <byteswap.h> on GNU,
<sys/endian.h> on *BSDs and <sys/byteorder.h>
on Solaris, which may contain optimized code
like inline assembly.
Diffstat (limited to 'src/liblzma/simple')
-rw-r--r-- | src/liblzma/simple/simple_decoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/simple/simple_encoder.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/simple/simple_decoder.c b/src/liblzma/simple/simple_decoder.c index 9be1bfef..0beccd32 100644 --- a/src/liblzma/simple/simple_decoder.c +++ b/src/liblzma/simple/simple_decoder.c @@ -28,7 +28,7 @@ lzma_simple_props_decode(void **options, lzma_allocator *allocator, if (opt == NULL) return LZMA_MEM_ERROR; - opt->start_offset = integer_read_32(props); + opt->start_offset = unaligned_read32le(props); // Don't leave an options structure allocated if start_offset is zero. if (opt->start_offset == 0) diff --git a/src/liblzma/simple/simple_encoder.c b/src/liblzma/simple/simple_encoder.c index 1ceabd1f..8aa463be 100644 --- a/src/liblzma/simple/simple_encoder.c +++ b/src/liblzma/simple/simple_encoder.c @@ -32,7 +32,7 @@ lzma_simple_props_encode(const void *options, uint8_t *out) if (opt == NULL || opt->start_offset == 0) return LZMA_OK; - integer_write_32(out, opt->start_offset); + unaligned_write32le(out, opt->start_offset); return LZMA_OK; } |