summaryrefslogtreecommitdiffstats
path: root/lib/libstand/bzlib.c.diff
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-09-18 13:01:12 +0000
committersobomax <sobomax@FreeBSD.org>2001-09-18 13:01:12 +0000
commitf261311bf8a95a68eddd17de69be6a0d0320326e (patch)
tree76acf0e35441ab9a8a740fc6881d0952b04fcc94 /lib/libstand/bzlib.c.diff
parent62ef09324a4fe4b7bcba6695b290d2daced18a7c (diff)
downloadFreeBSD-src-f261311bf8a95a68eddd17de69be6a0d0320326e.zip
FreeBSD-src-f261311bf8a95a68eddd17de69be6a0d0320326e.tar.gz
Add support for loading bzip2-compressed filesystems. Among other things
this would allow to load bzip2-compressed kernels/modules from the loader(8) (support for that will be committer separately). MFC after: 1 month
Diffstat (limited to 'lib/libstand/bzlib.c.diff')
-rw-r--r--lib/libstand/bzlib.c.diff55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/libstand/bzlib.c.diff b/lib/libstand/bzlib.c.diff
new file mode 100644
index 0000000..f13482b
--- /dev/null
+++ b/lib/libstand/bzlib.c.diff
@@ -0,0 +1,55 @@
+$FreeBSD$
+
+A patch to avoid linking into libstand compression routines from the bzip2
+that never being used anyway, while bloat loader(8) by additional 15KB.
+
+--- _bzlib.c 2001/09/13 12:20:50 1.1
++++ _bzlib.c 2001/09/13 12:29:24
+@@ -75,6 +75,7 @@
+
+ #include "bzlib_private.h"
+
++#ifndef BZ_NO_COMPRESS
+
+ /*---------------------------------------------------*/
+ /*--- Compression stuff ---*/
+@@ -101,6 +102,7 @@
+ }
+ #endif
+
++#endif /* BZ_NO_COMPRESS */
+
+ /*---------------------------------------------------*/
+ static
+@@ -127,6 +128,7 @@
+ if (addr != NULL) free ( addr );
+ }
+
++#ifndef BZ_NO_COMPRESS
+
+ /*---------------------------------------------------*/
+ static
+@@ -499,6 +501,7 @@
+ return BZ_OK;
+ }
+
++#endif /* BZ_NO_COMPRESS */
+
+ /*---------------------------------------------------*/
+ /*--- Decompression stuff ---*/
+@@ -869,6 +869,7 @@
+ return BZ_OK;
+ }
+
++#ifndef BZ_NO_COMPRESS
+
+ #ifndef BZ_NO_STDIO
+ /*---------------------------------------------------*/
+@@ -1558,6 +1559,7 @@
+ }
+ #endif
+
++#endif /* BZ_NO_COMPRESS */
+
+ /*-------------------------------------------------------------*/
+ /*--- end bzlib.c ---*/
OpenPOWER on IntegriCloud