From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6d68-0004Pz-JA for qemu-devel@nongnu.org; Tue, 15 Nov 2016 07:44:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6d64-00089L-KV for qemu-devel@nongnu.org; Tue, 15 Nov 2016 07:44:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6d64-00088Z-F4 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 07:44:20 -0500 Date: Tue, 15 Nov 2016 20:44:17 +0800 From: Fam Zheng Message-ID: <20161115124417.GC9226@lemon> References: <1478566785-4002-1-git-send-email-ashish.mittal@veritas.com> <1478566785-4002-2-git-send-email-ashish.mittal@veritas.com> <20161114150701.GD26198@stefanha-x1.localdomain> <20161114154906.GC2373@lemon> <20161114165034.GA1352@stefanha-x1.localdomain> <20161114180359.GA24217@lemon> <20161115020405.GB9226@lemon> <20161115101850.GA4836@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161115101850.GA4836@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [PATCH v6 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Peter Maydell Cc: Eric Blake , kwolf@redhat.com, Venkatesha.Mg@veritas.com, ashish.mittal@veritas.com, jcody@redhat.com, qemu-devel@nongnu.org, Rakesh.Ranjan@veritas.com, armbru@redhat.com, Ketan.Nilangekar@veritas.com, Abhijit.Dey@veritas.com, pbonzini@redhat.com, Buddhi.Madhav@veritas.com, Ashish Mittal On Tue, 11/15 10:18, Stefan Hajnoczi wrote: > Fam, Markus: Unfortunately neither the clean-includes script nor its > patch series cover letter explains *why* osdep.h should be included > before system headers. I don't know Peter's exact intention either, but AFAICT it is about the few quirks in osdep.h: /* Older versions of C++ don't get definitions of various macros from * stdlib.h unless we define these macros before first inclusion of * that system header. */ #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif /* The following block of code temporarily renames the daemon() function so the * compiler does not see the warning associated with it in stdlib.h on OSX */ #ifdef __APPLE__ #define daemon qemu_fake_daemon_function #include #undef daemon extern int daemon(int, int); #endif <...> /* Mac OSX has a bug that incorrectly defines SIZE_MAX with * the wrong type. Our replacement isn't usable in preprocessor * expressions, but it is sufficient for our needs. */ #if defined(HAVE_BROKEN_SIZE_MAX) && HAVE_BROKEN_SIZE_MAX #undef SIZE_MAX #define SIZE_MAX ((size_t)-1) #endif