From mboxrd@z Thu Jan 1 00:00:00 1970 From: ramsdell@mitre.org (John D. Ramsdell) Subject: Re: [PATCH] Use stddef.h in Mini-OS to define size_t Date: 02 May 2006 05:41:47 -0400 Message-ID: References: <2b20bb71f6da14a494eab4d0ac9631f7@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <2b20bb71f6da14a494eab4d0ac9631f7@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser 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. John