Avoid collision with Solaris definition of index_t.
Solaris 11 defines index_t in sys/types.h. (How rude!) This commit
uses the name prefix_t instead.
diff --git a/pigz.c b/pigz.c
index f915c4a..ce17dfa 100644
--- a/pigz.c
+++ b/pigz.c
@@ -374,11 +374,11 @@
# include <inttypes.h> // intmax_t, uintmax_t
typedef uintmax_t length_t;
typedef uint32_t crc_t;
- typedef uint_least16_t index_t;
+ typedef uint_least16_t prefix_t;
#else
typedef unsigned long length_t;
typedef unsigned long crc_t;
- typedef unsigned index_t;
+ typedef unsigned prefix_t;
#endif
#ifdef PIGZ_DEBUG
@@ -3661,7 +3661,7 @@
// memory for unlzw() -- the first 256 entries of prefix[] and suffix[] are
// never used, so could have offset the index but it's faster to waste a
// little memory
- index_t prefix[65536]; // index to LZW prefix string
+ prefix_t prefix[65536]; // index to LZW prefix string
unsigned char suffix[65536]; // one-character LZW suffix
unsigned char match[65280 + 2]; // buffer for reversed match
@@ -3807,7 +3807,7 @@
// link new table entry
if (end < mask) {
end++;
- prefix[end] = (index_t)prev;
+ prefix[end] = (prefix_t)prev;
suffix[end] = (unsigned char)final;
}