[PATCH 3 of 5] Improved ansi C compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 This patch aims to improve ansi C compatibility. That is, on the issues
addressed by this patch, bcc does not flag any error, but any ansi C
compiler will produce an error and will terminate compilation.

 The errors corrected with this patch were found attempting to build ELKS
using gcc (instead of bcc). This patch produces a small increase in code
size building ELKS using bcc (less than 16 bytes). However, the system
start flawlessly and with no apparent differences.

 The Image builded without errors. The kernel was tested with QEMU and
dioscuri emulators. Also in a PPro pc booting from floppy.

Greetings,

Juan

diff -Nurb elks.orig/include/linuxmt/signal.h elks/include/linuxmt/signal.h
--- elks.orig/include/linuxmt/signal.h  2002-06-03 17:22:58.000000000 -0500
+++ elks/include/linuxmt/signal.h       2011-12-13 10:15:13.000000000 -0600
@@ -139,6 +139,7 @@

 };

+struct task_struct;
 extern int send_sig(sig_t,struct task_struct *,int);
 extern void arch_setup_sighandler_stack(register struct task_struct *,
 					__sighandler_t,unsigned);
diff -Nurb elks.orig/include/linuxmt/socket.h elks/include/linuxmt/socket.h
--- elks.orig/include/linuxmt/socket.h  2002-06-04 12:25:18.000000000 -0500
+++ elks/include/linuxmt/socket.h       2011-12-13 09:34:33.000000000 -0600
@@ -33,6 +33,7 @@
 #define SOCK_RDM        4	/* reliably-delivered message   */
 #define SOCK_SEQPACKET  5	/* sequential packet socket     */

+struct proto_ops;
 extern int sock_register(int,struct proto_ops *);

 #endif
diff -Nurb elks.orig/arch/i86/kernel/irq.c elks/arch/i86/kernel/irq.c
--- elks.orig/arch/i86/kernel/irq.c	2002-10-26 15:06:31.000000000 -0500
+++ elks/arch/i86/kernel/irq.c	2012-01-18 18:30:44.000000000 -0600
@@ -268,8 +268,8 @@

     action->handler = NULL;
     action->dev_id = NULL;
-    action->flags = 0;
-    action->name = NULL;
+/*    action->flags = 0;
+    action->name = NULL;*/

     restore_flags(flags);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux