[tnozaki-liblzf] TNF local patch - introduce reentrant version of lzf_compress

Issue #268 wontfix
Takehiko NOZAKI repo owner created an issue


Adjust liblzf to offer the LZF_STATE_ARG API, which is better for small-stack
environments (think bootblocks etc) and no worse elsewise (you can always
just pass the same state argument...) and have correct prototypes when doing


Sigh provide, by default, the dumb "allocate 64K on the stack" variant
of the lzf_compress API by default. This is because there is evidently
code floating around out there in the world with broken autoconf scripts that
don't check for LZF_STATE_ARG in the lzf header files and just assume the
dumb version of the API.

We rename the sane API to lzf_compress_r and implement the dumb API in
terms of it. Consequently, bump liblzf major version number. This is
fine because nothing used our liblzf with the old API.

Comments (5)

  1. Takehiko NOZAKI reporter

    this patch is completely wrong

    • lzf_compress_r, “_r” suffix meaning reentrant(MT-Safe). but lzfcompress is MT-Safe too(but conmsumption huge stack size). it is wrong naming
    • 5th extra argument of LZF_STATE_ARG idea is completely evil, if you want small stack environment, only change HLOG value 16 → 13 with preprocessor
    • this changes want install lzfP.h, it’s a private header, don’t install /usr/include

  2. Log in to comment