From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6ezo-00028d-4e for qemu-devel@nongnu.org; Tue, 15 Nov 2016 09:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6ezj-0006RN-8r for qemu-devel@nongnu.org; Tue, 15 Nov 2016 09:46:00 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:34496) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c6ezj-0006R7-1Z for qemu-devel@nongnu.org; Tue, 15 Nov 2016 09:45:55 -0500 Received: by mail-wm0-x244.google.com with SMTP id g23so553217wme.1 for ; Tue, 15 Nov 2016 06:45:54 -0800 (PST) Date: Tue, 15 Nov 2016 14:45:52 +0000 From: Stefan Hajnoczi Message-ID: <20161115144551.GB17672@stefanha-x1.localdomain> 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> <20161115124417.GC9226@lemon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline In-Reply-To: <20161115124417.GC9226@lemon> 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: Fam Zheng Cc: Peter Maydell , 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 --+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 15, 2016 at 08:44:17PM +0800, Fam Zheng wrote: > 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. >=20 > I don't know Peter's exact intention either, but AFAICT it is about the f= ew > quirks in osdep.h: >=20 >=20 > /* 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 >=20 > /* 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 >=20 > <...> >=20 >=20 > /* 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 This is exactly the kind of stuff we should not be doing to the libqnio header file! Those redefinitions are useful for QEMU code. They should not be done to third-party system headers though. Stefan --+g7M9IMkV8truYOl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYKx+fAAoJEJykq7OBq3PIA3kH/3GNf6opqAlXvxM0O83pSD4U qB4Os8nOeRIvzqsVEirLf0dHrqvRynsBMlBer0wvDaMt7G7dRbElvCNGLYCfR3Qr bjqYUdDc3oLPyiXkpc9vJLMVH+zp9gY7hAbOP7syACnR5tmeEllsph81kTtp6JsH XrVqI656fOgDd67ILv87GuqrbhUntu9hD4cRkMDOeti4Diyi9WNI+5tinpcHF+9D xnvwEWznbQcLjXN6CSCoqxBO1q+xDt0FOhknQiLVE1qp1Q33mIdguHKjzKZC0j9Q kb3f/HBTUzlrvF8HMsmm/EtYLMGGPXwnkE/B69F62wFNknlaftnogOBl/wmmNXU= =wdx7 -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl--