aboutsummaryrefslogtreecommitdiff
path: root/doc/liblzma-intro.txt
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-01-06 16:27:41 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-01-06 16:27:41 +0200
commit4e7e54c4c522ab2f6a7abb92cefc4f707e9568fb (patch)
tree852cde1e5bef3e46c5415884e283ef874f8eed73 /doc/liblzma-intro.txt
parentFix typo in comment (INT64_MAX -> UINT64_MAX). (diff)
downloadxz-4e7e54c4c522ab2f6a7abb92cefc4f707e9568fb.tar.xz
Introduced compatibility with systems that have pre-C99
or no inttypes.h. This is useful when the compiler has good enough support for C99, but libc headers don't. Changed liblzma API so that sys/types.h and inttypes.h have to be #included before #including lzma.h. On systems that don't have C99 inttypes.h, it's the problem of the applications to provide the required types and macros before #including lzma.h. If lzma.h defined the missing types and macros, it could conflict with third-party applications whose configure has detected that the types are missing and defined them in config.h already. An alternative would have been introducing lzma_uint32 and similar types, but that would just be an extra pain on modern systems.
Diffstat (limited to 'doc/liblzma-intro.txt')
-rw-r--r--doc/liblzma-intro.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/liblzma-intro.txt b/doc/liblzma-intro.txt
index 9cbd63a9..52c4d920 100644
--- a/doc/liblzma-intro.txt
+++ b/doc/liblzma-intro.txt
@@ -5,8 +5,14 @@ Introduction to liblzma
Writing applications to work with liblzma
liblzma API is split in several subheaders to improve readability and
- maintainance. The subheaders must not be #included directly; simply
- use `#include <lzma.h>' instead.
+ maintainance. The subheaders must not be #included directly. lzma.h
+ requires that certain integer types and macros are available when
+ the header is #included. On systems that have inttypes.h that conforms
+ to C99, the following will work:
+
+ #include <sys/types.h>
+ #include <inttypes.h>
+ #include <lzma.h>
Those who have used zlib should find liblzma's API easy to use.
To developers who haven't used zlib before, I recommend learning