aboutsummaryrefslogtreecommitdiff
path: root/linux/lib/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:26:31 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:26:31 +0200
commit7af581c41d3342d1b247824456ae83f78d071106 (patch)
tree1fad5bc5d72e37cd7053dea5d88f5620268c92ab /linux/lib/xz
parentb4f568b4e0d0c39da0fa98497122a3cee8c0e34e (diff)
downloadxz-embedded-7af581c41d3342d1b247824456ae83f78d071106.tar.gz
Get rid of XZ_IGNORE_KCONFIG macro.
It's no longer needed because initramfs decompression uses the regular xz_dec module. The definitions of memeq(), memzero(), and get_le32() macros were moved to be done after all headers have been included. Shouldn't matter in practice but looks safer just in case some of those names appear in other headers in the future.
Diffstat (limited to 'linux/lib/xz')
-rw-r--r--linux/lib/xz/xz_private.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/linux/lib/xz/xz_private.h b/linux/lib/xz/xz_private.h
index 213d026..0ec855f 100644
--- a/linux/lib/xz/xz_private.h
+++ b/linux/lib/xz/xz_private.h
@@ -11,19 +11,14 @@
#define XZ_PRIVATE_H
#ifdef __KERNEL__
+# include <linux/xz.h>
+# include <asm/byteorder.h>
+# include <asm/unaligned.h>
/* XZ_PREBOOT may be defined only via decompress_unxz.c. */
# ifndef XZ_PREBOOT
# include <linux/slab.h>
# include <linux/vmalloc.h>
# include <linux/string.h>
-# define memeq(a, b, size) (memcmp(a, b, size) == 0)
-# define memzero(buf, size) memset(buf, 0, size)
-# endif
-# include <asm/byteorder.h>
-# include <asm/unaligned.h>
-# define get_le32(p) le32_to_cpup((const uint32_t *)(p))
- /* XZ_IGNORE_KCONFIG may be defined only via decompress_unxz.c. */
-# ifndef XZ_IGNORE_KCONFIG
# ifdef CONFIG_XZ_DEC_X86
# define XZ_DEC_X86
# endif
@@ -42,8 +37,10 @@
# ifdef CONFIG_XZ_DEC_SPARC
# define XZ_DEC_SPARC
# endif
+# define memeq(a, b, size) (memcmp(a, b, size) == 0)
+# define memzero(buf, size) memset(buf, 0, size)
# endif
-# include <linux/xz.h>
+# define get_le32(p) le32_to_cpup((const uint32_t *)(p))
#else
/*
* For userspace builds, use a separate header to define the required