From: Keir Fraser Subject: Re: [PATCH] Use stddef.h in Mini-OS to define size_t Date: Tue, 2 May 2006 10:45:39 +0100 Message-ID: References: <2b20bb71f6da14a494eab4d0ac9631f7@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "John D. Ramsdell" Cc: xen-devel Devel , Grzegorz Milos List-Id: xen-devel@lists.xenproject.org On 2 May 2006, at 10:41, John D. Ramsdell wrote: >> 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. Okay, well ultimately it's up to Grzegorz whether to take the patch as he's currently de facto maintainer of mini-os. However, I don't see any obvious problem in using stddef.h from within minios. -- Keir