1 #define _LINUX_STRING_H_
3 #include <linux/compiler.h> /* for inline */
4 #include <linux/types.h> /* for size_t */
5 #include <linux/stddef.h> /* for NULL */
6 #include <linux/linkage.h>
7 #include <asm/string.h>
9 extern unsigned long free_mem_ptr
;
10 extern unsigned long free_mem_end_ptr
;
11 extern void error(char *);
14 #define STATIC_RW_DATA /* non-static please */
16 #define ARCH_HAS_DECOMP_WDOG
18 /* Diagnostic functions */
20 # define Assert(cond,msg) {if(!(cond)) error(msg);}
21 # define Trace(x) fprintf x
22 # define Tracev(x) {if (verbose) fprintf x ;}
23 # define Tracevv(x) {if (verbose>1) fprintf x ;}
24 # define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
25 # define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
27 # define Assert(cond,msg)
35 /* Not needed, but used in some headers pulled in by decompressors */
36 extern char * strstr(const char * s1
, const char *s2
);
38 #ifdef CONFIG_KERNEL_GZIP
39 #include "../../../../lib/decompress_inflate.c"
42 #ifdef CONFIG_KERNEL_LZO
43 #include "../../../../lib/decompress_unlzo.c"
46 #ifdef CONFIG_KERNEL_LZMA
47 #include "../../../../lib/decompress_unlzma.c"
50 #ifdef CONFIG_KERNEL_XZ
51 #define memmove memmove
53 #include "../../../../lib/decompress_unxz.c"
56 int do_decompress(u8
*input
, int len
, u8
*output
, void (*error
)(char *x
))
58 return decompress(input
, len
, NULL
, NULL
, output
, NULL
, error
);