WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Use stddef.h in Mini-OS to define size_t

To: Grzegorz Milos <gm281@xxxxxxxxx>
Subject: [Xen-devel] [PATCH] Use stddef.h in Mini-OS to define size_t
From: ramsdell@xxxxxxxxx (John D. Ramsdell)
Date: 01 May 2006 11:10:29 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 01 May 2006 08:10:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1FaZpb-00044N-Hs@host-192-168-0-1-bcn-london>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
Please patch Mini-OS so that it uses stddef.h to define size_t and
NULL. This problem fixes errors that occur when linking Mini-OS with
ANSI standard code that uses stddef.h.

John

diff -ur oxen-3.0-testing/extras/mini-os/include/lib.h 
nxen-3.0-testing/extras/mini-os/include/lib.h
--- oxen-3.0-testing/extras/mini-os/include/lib.h       2006-04-14 
22:21:55.000000000 -0400
+++ nxen-3.0-testing/extras/mini-os/include/lib.h       2006-04-28 
13:37:44.000000000 -0400
@@ -56,6 +56,7 @@
 #define _LIB_H_
 
 #include <stdarg.h>
+#include <stddef.h>
 #include <console.h>
 
 /* printing */
diff -ur oxen-3.0-testing/extras/mini-os/include/os.h 
nxen-3.0-testing/extras/mini-os/include/os.h
--- oxen-3.0-testing/extras/mini-os/include/os.h        2006-04-14 
22:21:55.000000000 -0400
+++ nxen-3.0-testing/extras/mini-os/include/os.h        2006-04-28 
13:39:13.000000000 -0400
@@ -7,9 +7,6 @@
 #ifndef _OS_H_
 #define _OS_H_
 
-#define NULL 0
-
-
 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
 #define __builtin_expect(x, expected_value) (x)
 #endif
diff -ur oxen-3.0-testing/extras/mini-os/include/types.h 
nxen-3.0-testing/extras/mini-os/include/types.h
--- oxen-3.0-testing/extras/mini-os/include/types.h     2006-04-14 
22:21:55.000000000 -0400
+++ nxen-3.0-testing/extras/mini-os/include/types.h     2006-04-28 
13:39:17.000000000 -0400
@@ -34,8 +34,6 @@
 typedef unsigned long       u64;
 #endif
 
-typedef unsigned int        size_t;
-
 /* FreeBSD compat types */
 typedef unsigned char       u_char;
 typedef unsigned int        u_int;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel