Have read_variable_length use fixed size types
authorNigel Tao <nigeltao@golang.org>
Sun, 15 Sep 2019 23:20:02 +0000 (09:20 +1000)
committerNigel Tao <nigeltao@golang.org>
Sat, 21 Sep 2019 02:38:46 +0000 (12:38 +1000)
commitc5a83c1a48722108460f8542d92703fd5f59e296
treeaeb1cd1932b2452911265d235027a0d0ff60d767
parent9b2b96edc4642c4a21e2485ffe9bd43ed5f3a2b2
Have read_variable_length use fixed size types

Otherwise, the output from decoding LZ4-compressed input could be
platform dependent.

Also add a compile-time check to confirm the existing code's assumptions
that, if <stdint.h> isn't used, then sizeof(int) == 4.

Updates #792
lib/lz4.c