* [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
@ 2011-06-02 2:21 Alexandre Raymond
2011-06-02 10:13 ` Andreas Färber
2011-06-02 22:44 ` Stefan Hajnoczi
0 siblings, 2 replies; 6+ messages in thread
From: Alexandre Raymond @ 2011-06-02 2:21 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Alexandre Raymond
Fix the following warning by including signal.h directly in qemu-common.h
----8<----
iohandler.c: In function ‘qemu_init_child_watch’:
iohandler.c:172: warning: implicit declaration of function ‘sigaction’
iohandler.c:172: warning: nested extern declaration of ‘sigaction’
----8<----
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
---
qemu-common.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/qemu-common.h b/qemu-common.h
index b851b20..39fabc9 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -39,6 +39,7 @@ typedef struct Monitor Monitor;
#include <sys/stat.h>
#include <sys/time.h>
#include <assert.h>
+#include <signal.h>
#ifdef _WIN32
#include "qemu-os-win32.h"
--
1.7.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
2011-06-02 2:21 [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction Alexandre Raymond
@ 2011-06-02 10:13 ` Andreas Färber
2011-06-02 13:27 ` Alexandre Raymond
2011-06-02 22:44 ` Stefan Hajnoczi
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2011-06-02 10:13 UTC (permalink / raw)
To: Alexandre Raymond; +Cc: qemu-trivial, qemu-devel
Am 02.06.2011 um 04:21 schrieb Alexandre Raymond:
> Fix the following warning by including signal.h directly in qemu-
> common.h
> ----8<----
> iohandler.c: In function ‘qemu_init_child_watch’:
> iohandler.c:172: warning: implicit declaration of function ‘sigaction’
> iohandler.c:172: warning: nested extern declaration of ‘sigaction’
> ----8<----
>
> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Tested-by: Andreas Färber <andreas.faerber@web.de>
Why in qemu-common.h and not in iohandler.c though?
If we put it into qemu-common.h, you should remove other inclusions of
signal.h.
Andreas
> ---
> qemu-common.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-common.h b/qemu-common.h
> index b851b20..39fabc9 100644
> --- a/qemu-common.h
> +++ b/qemu-common.h
> @@ -39,6 +39,7 @@ typedef struct Monitor Monitor;
> #include <sys/stat.h>
> #include <sys/time.h>
> #include <assert.h>
> +#include <signal.h>
>
> #ifdef _WIN32
> #include "qemu-os-win32.h"
> --
> 1.7.5
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
2011-06-02 10:13 ` Andreas Färber
@ 2011-06-02 13:27 ` Alexandre Raymond
0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Raymond @ 2011-06-02 13:27 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-trivial, qemu-devel
On Thu, Jun 2, 2011 at 6:13 AM, Andreas Färber <andreas.faerber@web.de> wrote:
> Am 02.06.2011 um 04:21 schrieb Alexandre Raymond:
>
>> Fix the following warning by including signal.h directly in qemu-common.h
>> ----8<----
>> iohandler.c: In function ‘qemu_init_child_watch’:
>> iohandler.c:172: warning: implicit declaration of function ‘sigaction’
>> iohandler.c:172: warning: nested extern declaration of ‘sigaction’
>> ----8<----
>>
>> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
>
> Tested-by: Andreas Färber <andreas.faerber@web.de>
>
> Why in qemu-common.h and not in iohandler.c though?
> If we put it into qemu-common.h, you should remove other inclusions of
> signal.h.
Well, I was simply following Anthony's advice from "[PATCH] #include
cleanlines" : "The idea behind qemu-common.h is to avoid direct
includes to help with portability."
Alexandre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
2011-06-02 2:21 [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction Alexandre Raymond
2011-06-02 10:13 ` Andreas Färber
@ 2011-06-02 22:44 ` Stefan Hajnoczi
2011-06-02 22:55 ` Alexandre Raymond
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-06-02 22:44 UTC (permalink / raw)
To: Alexandre Raymond; +Cc: qemu-trivial, Andreas Färber, qemu-devel
On Thu, Jun 2, 2011 at 3:21 AM, Alexandre Raymond <cerbere@gmail.com> wrote:
> Fix the following warning by including signal.h directly in qemu-common.h
> ----8<----
> iohandler.c: In function ‘qemu_init_child_watch’:
> iohandler.c:172: warning: implicit declaration of function ‘sigaction’
> iohandler.c:172: warning: nested extern declaration of ‘sigaction’
> ----8<----
>
> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
> ---
> qemu-common.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
2011-06-02 22:44 ` Stefan Hajnoczi
@ 2011-06-02 22:55 ` Alexandre Raymond
2011-06-02 23:04 ` Stefan Hajnoczi
0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Raymond @ 2011-06-02 22:55 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-trivial, Andreas Färber, qemu-devel
Thanks Stefan,
Should I send a follow-up patch to remove signal.h wherever
qemu-common.h is already included?
Alexandre
On Thu, Jun 2, 2011 at 6:44 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Thu, Jun 2, 2011 at 3:21 AM, Alexandre Raymond <cerbere@gmail.com> wrote:
>> Fix the following warning by including signal.h directly in qemu-common.h
>> ----8<----
>> iohandler.c: In function ‘qemu_init_child_watch’:
>> iohandler.c:172: warning: implicit declaration of function ‘sigaction’
>> iohandler.c:172: warning: nested extern declaration of ‘sigaction’
>> ----8<----
>>
>> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
>> ---
>> qemu-common.h | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> Thanks, applied to the trivial patches tree:
> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
>
> Stefan
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction
2011-06-02 22:55 ` Alexandre Raymond
@ 2011-06-02 23:04 ` Stefan Hajnoczi
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-06-02 23:04 UTC (permalink / raw)
To: Alexandre Raymond; +Cc: qemu-trivial, Andreas Färber, qemu-devel
On Thu, Jun 2, 2011 at 11:55 PM, Alexandre Raymond <cerbere@gmail.com> wrote:
> Should I send a follow-up patch to remove signal.h wherever
> qemu-common.h is already included?
Yes, please.
I didn't know that qemu-common.h pulls in system headers so users
don't need to, I always figured .c files should include what they use.
But if we use this approach we might as well update the codebase.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-02 23:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-02 2:21 [Qemu-devel] [PATCH] Fix compilation warning due to missing header for sigaction Alexandre Raymond
2011-06-02 10:13 ` Andreas Färber
2011-06-02 13:27 ` Alexandre Raymond
2011-06-02 22:44 ` Stefan Hajnoczi
2011-06-02 22:55 ` Alexandre Raymond
2011-06-02 23:04 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).