Received: from eggs.gnu.org ([208.118.235.92]:46754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsRSP-0003G7-Nq for qemu-devel@nongnu.org; Tue, 08 Jan 2013 00:10:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsRSO-0008UA-KI for qemu-devel@nongnu.org; Tue, 08 Jan 2013 00:10:37 -0500 Message-ID: In-Reply-To: <20130107221257.GG18372@otherpad.lan.raisama.net> References: <1357579795-11770-1-git-send-email-peter.maydell@linaro.org> <50EB0805.604@weilnetz.de> <20130107221257.GG18372@otherpad.lan.raisama.net> Date: Tue, 8 Jan 2013 06:08:19 +0100 From: "Stefan Weil" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] qga/channel-posix.c: Explicitly include string.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Peter Maydell , patches@linaro.org, qemu-trivial@nongnu.org, Stefan Weil , qemu-devel@nongnu.org, Paolo Bonzini > On Mon, Jan 07, 2013 at 05:50:14PM +0000, Peter Maydell wrote: >> On 7 January 2013 17:38, Stefan Weil wrote: >> > Am 07.01.2013 18:29, schrieb Peter Maydell: >> > >> >> Explicitly include string.h to avoid warnings under MacOS X/clang >> >> about implicit declarations of strerror() and strlen(). >> >> > Better: include qemu-common.h first and remove all >> > three standard includes. >> >> This would be reversing direction from commit 4d4922c33... >> I took the commit message in that commit to imply that we >> shouldn't be including qemu-common.h for standalone >> executables like qga. > > Including qemu-common.h from .c files is OK, although I wouldn't do tha= t > in this specific case (I would include string.h instead). > > The problem with qemu-common.h is when it is included by header files, > because qemu-common.h includes lots of other headers, easily leading to > circular header dependencies. > > -- > Eduardo > I just noticed that on my Linux host qemu-common.h is no longer included indirectly (it was with earlier revisions of QEMU). Therefore the patch is ok. Reviewed-by: Stefan Weil