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/
Home Products Support Community News


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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Use stddef.h in Mini-OS to define size_t
From: ramsdell@xxxxxxxxx (John D. Ramsdell)
Date: 02 May 2006 05:41:47 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 02 May 2006 02:42:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2b20bb71f6da14a494eab4d0ac9631f7@xxxxxxxxxxxx>
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>
References: <ogthd494w7u.fsf@xxxxxxxxxxxxxxx> <f07a10d3e6a7d026e0cc2ff2732553ea@xxxxxxxxxxxx> <ogtmze18o3l.fsf@xxxxxxxxxxxxxxx> <2b20bb71f6da14a494eab4d0ac9631f7@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> writes:

> Don't you get horrible namespace collisions when linking with a C
> library replacement? Not just stddef.h, but what about the
> definitions in minios's include/lib.h?

I received no compiler warnings other than the reported problem with
size_t and NULL.  The console source file includes lib.h before it
includes Lua headers, so the other definitions must fit with Lua's
definitions.  The functions in lib.c take precedence over the ones in
the C library, so they better be good.  The definition of gettimeofday
also overrides that which is provided by the C library, which is good
because the C library simply provides a stub routine.  By the way, the
Lua allocator in the modified version of console.c does not free
enough.  I did that to look for malloc bugs, but forgot to remove the
change when it made no difference.


Xen-devel mailing list