diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2013-04-15 19:42:17 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2013-04-15 19:42:17 +0300 |
commit | 94d107ea0ce2772359ee7d09041abd920ec8b8bb (patch) | |
tree | eb2ac6c9c69e3a13e3f019ebac6955e9c5ec3b58 | |
parent | 25a0224510ba143251e6df122b649b3b3b0b0257 (diff) | |
download | xz-embedded-94d107ea0ce2772359ee7d09041abd920ec8b8bb.tar.gz |
Add support for MSVC in xz_config.h.
Thanks to Luke Deller for the original patch.
-rw-r--r-- | userspace/xz_config.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/userspace/xz_config.h b/userspace/xz_config.h index 9a1dfef..eb9dac1 100644 --- a/userspace/xz_config.h +++ b/userspace/xz_config.h @@ -21,7 +21,19 @@ /* #define XZ_DEC_ARMTHUMB */ /* #define XZ_DEC_SPARC */ -#include <stdbool.h> +/* + * MSVC doesn't support modern C but XZ Embedded is mostly C89 + * so these are enough. + */ +#ifdef _MSC_VER +typedef unsigned char bool; +# define true 1 +# define false 0 +# define inline __inline +#else +# include <stdbool.h> +#endif + #include <stdlib.h> #include <string.h> |