patch-2.0.32 linux/arch/i386/boot/compressed/misc.c

Next file: linux/arch/i386/kernel/head.S
Previous file: linux/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.31/linux/arch/i386/boot/compressed/misc.c linux/arch/i386/boot/compressed/misc.c
@@ -9,10 +9,9 @@
  * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
  */
 
-#include <string.h>
-
 #include <asm/segment.h>
 #include <asm/io.h>
+#include <linux/types.h>
 
 /*
  * gzip declarations
@@ -21,8 +20,13 @@
 #define OF(args)  args
 #define STATIC static
 
+void* memset(void* s, int c, size_t n);
+void* memcpy(void* __dest, __const void* __src,
+	     size_t __n);
+
 #define memzero(s, n)     memset ((s), 0, (n))
 
+
 typedef unsigned char  uch;
 typedef unsigned short ush;
 typedef unsigned long  ulg;
@@ -113,7 +117,6 @@
 static void gzip_mark(void **);
 static void gzip_release(void **);
  
-#ifndef STANDALONE_DEBUG
 static void puts(const char *);
   
 extern int end;
@@ -212,7 +215,7 @@
 	outb_p(0xff & (pos >> 1), vidport+1);
 }
 
-__ptr_t memset(__ptr_t s, int c, size_t n)
+void* memset(void* s, int c, size_t n)
 {
 	int i;
 	char *ss = (char*)s;
@@ -220,7 +223,7 @@
 	for (i=0;i<n;i++) ss[i] = c;
 }
 
-__ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src,
+void* memcpy(void* __dest, __const void* __src,
 			    size_t __n)
 {
 	int i;
@@ -228,7 +231,6 @@
 
 	for (i=0;i<__n;i++) d[i] = s[i];
 }
-#endif
 
 /* ===========================================================================
  * Fill the input buffer. This is called only when the buffer is empty
@@ -308,33 +310,6 @@
 	short b;
 	} stack_start = { & user_stack [STACK_SIZE] , KERNEL_DS };
 
-#ifdef STANDALONE_DEBUG
-
-static void gzip_mark(void **ptr)
-{
-}
-
-static void gzip_release(void **ptr)
-{
-}
-
-char output_buffer[1024 * 800];
-
-int
-main(argc, argv)
-	int	argc;
-	char	**argv;
-{
-	output_data = output_buffer;
-
-	makecrc();
-	puts("Uncompressing Linux...");
-	gunzip();
-	puts("done.\n");
-	return 0;
-}
-
-#else
 
 void setup_normal_output_buffer()
 {
@@ -396,8 +371,3 @@
 	if (high_loaded) close_output_buffer_if_we_run_high(mv);
 	return high_loaded;
 }
-#endif
-
-
-
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov