ia64/xen-unstable

changeset 9932:1a84eec74331

Change 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.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 04 11:24:19 2006 +0100 (2006-05-04)
parents 6719dae17b6a
children 51484df99be1
files extras/mini-os/include/lib.h extras/mini-os/include/os.h extras/mini-os/include/types.h
line diff
     1.1 --- a/extras/mini-os/include/lib.h	Thu May 04 11:22:19 2006 +0100
     1.2 +++ b/extras/mini-os/include/lib.h	Thu May 04 11:24:19 2006 +0100
     1.3 @@ -56,6 +56,7 @@
     1.4  #define _LIB_H_
     1.5  
     1.6  #include <stdarg.h>
     1.7 +#include <stddef.h>
     1.8  #include <console.h>
     1.9  
    1.10  /* printing */
     2.1 --- a/extras/mini-os/include/os.h	Thu May 04 11:22:19 2006 +0100
     2.2 +++ b/extras/mini-os/include/os.h	Thu May 04 11:24:19 2006 +0100
     2.3 @@ -7,9 +7,6 @@
     2.4  #ifndef _OS_H_
     2.5  #define _OS_H_
     2.6  
     2.7 -#define NULL 0
     2.8 -
     2.9 -
    2.10  #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
    2.11  #define __builtin_expect(x, expected_value) (x)
    2.12  #endif
     3.1 --- a/extras/mini-os/include/types.h	Thu May 04 11:22:19 2006 +0100
     3.2 +++ b/extras/mini-os/include/types.h	Thu May 04 11:24:19 2006 +0100
     3.3 @@ -34,8 +34,6 @@ typedef signed long         s64;
     3.4  typedef unsigned long       u64;
     3.5  #endif
     3.6  
     3.7 -typedef unsigned int        size_t;
     3.8 -
     3.9  /* FreeBSD compat types */
    3.10  typedef unsigned char       u_char;
    3.11  typedef unsigned int        u_int;