[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] qga/channel-posix.c: Explicitly
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] qga/channel-posix.c: Explicitly include string.h |
Date: |
Mon, 7 Jan 2013 20:12:57 -0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jan 07, 2013 at 05:50:14PM +0000, Peter Maydell wrote:
> On 7 January 2013 17:38, Stefan Weil <address@hidden> 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 that
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