lzma: make lzma reentrant

The error function pointer used by lzma is global (file scope) which
prevents it being used concurrently.  This patch removes the global
error pointer use, and instead passes it to all functions that need it.

The error function pointer is still used by bunzip2, inflate and unlzo.
This patch moves the definition into the separate bunzip2, inflate
and unlzo header files.  This prevents gcc from complaining about an
unused definition compiling lzma.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
5 files changed