Skip to content

Commit

Permalink
Merge pull request #32 from zeux/master
Browse files Browse the repository at this point in the history
sdefl: Fix MSVC and GCC builds
  • Loading branch information
vurtun committed Dec 23, 2020
2 parents f6d7d37 + 6c57d54 commit b9918a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdefl.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct sdefl_codes {
struct sdefl_code_words word;
struct sdefl_lens len;
};
struct sdefl_seq {
struct sdefl_seqt {
int off, len;
};
struct sdefl {
Expand All @@ -154,7 +154,7 @@ struct sdefl {
int prv[SDEFL_WIN_SIZ];

int seq_cnt;
struct sdefl_seq seq[SDEFL_SEQ_SIZ];
struct sdefl_seqt seq[SDEFL_SEQ_SIZ];
struct sdefl_freq freq;
struct sdefl_codes cod;
};
Expand Down Expand Up @@ -190,7 +190,7 @@ sdefl_ilog2(int n) {
if (!n) return 0;
#ifdef _MSC_VER
unsigned long msbp = 0;
_BitScanReverse(&msbp, (unsignd long)n);
_BitScanReverse(&msbp, (unsigned long)n);
return (int)msbp;
#elif defined(__GNUC__) || defined(__clang__)
return (int)sizeof(unsigned long) * CHAR_BIT - 1 - __builtin_clzl((unsigned long)n);
Expand All @@ -207,7 +207,6 @@ sdefl_ilog2(int n) {
}
#undef lt
#endif
return 0;
}
static unsigned
sdefl_uload32(const void *p) {
Expand Down

0 comments on commit b9918a8

Please sign in to comment.