* [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure @ 2011-04-29 15:59 Marc-Antoine Perennou 2011-05-27 9:00 ` Marc-Antoine Perennou ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Marc-Antoine Perennou @ 2011-04-29 15:59 UTC (permalink / raw) To: qemu-devel pulse/simple.h does not include stdlib.h We cannot use NULL since it may not be defined Use 0 instead Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> --- configure | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index ea8b676..d67c3ce 100755 --- a/configure +++ b/configure @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do pa) audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ - "pa_simple *s = NULL; pa_simple_free(s); return 0;" + "pa_simple *s = 0; pa_simple_free(s); return 0;" libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" audio_pt_int="yes" ;; -- 1.7.5.52.ge839f.dirty ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-04-29 15:59 [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure Marc-Antoine Perennou @ 2011-05-27 9:00 ` Marc-Antoine Perennou 2011-06-03 20:33 ` Aurelien Jarno 2011-06-24 14:49 ` Stefan Hajnoczi 2 siblings, 0 replies; 14+ messages in thread From: Marc-Antoine Perennou @ 2011-05-27 9:00 UTC (permalink / raw) To: qemu-devel Any chance to get this reviewed/applied any time soon ? It currently does not build without it with gcc 4.6.0 On 29 April 2011 17:59, Marc-Antoine Perennou <Marc-Antoine@perennou.com> wrote: > pulse/simple.h does not include stdlib.h > We cannot use NULL since it may not be defined > Use 0 instead > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > --- > configure | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index ea8b676..d67c3ce 100755 > --- a/configure > +++ b/configure > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do > > pa) > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" > + "pa_simple *s = 0; pa_simple_free(s); return 0;" > libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" > audio_pt_int="yes" > ;; > -- > 1.7.5.52.ge839f.dirty > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-04-29 15:59 [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure Marc-Antoine Perennou 2011-05-27 9:00 ` Marc-Antoine Perennou @ 2011-06-03 20:33 ` Aurelien Jarno 2011-06-03 21:57 ` malc 2011-06-09 18:25 ` Markus Armbruster 2011-06-24 14:49 ` Stefan Hajnoczi 2 siblings, 2 replies; 14+ messages in thread From: Aurelien Jarno @ 2011-06-03 20:33 UTC (permalink / raw) To: Marc-Antoine Perennou; +Cc: qemu-devel On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: > pulse/simple.h does not include stdlib.h > We cannot use NULL since it may not be defined > Use 0 instead I am unable to reproduce this issue, even with gcc-4.6. Also please note that NULL is defined in <stddef.h>, not <stdlib.h>. <stddef.h> is included from <sys/types.h> which is included from <pulse/simple.h>. Do you have more information about the issue. > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > --- > configure | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index ea8b676..d67c3ce 100755 > --- a/configure > +++ b/configure > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do > > pa) > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" > + "pa_simple *s = 0; pa_simple_free(s); return 0;" It should be ((void*)0) instead of simply 0. > libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" > audio_pt_int="yes" > ;; > -- > 1.7.5.52.ge839f.dirty > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-03 20:33 ` Aurelien Jarno @ 2011-06-03 21:57 ` malc 2011-06-03 22:17 ` Aurelien Jarno 2011-06-09 18:25 ` Markus Armbruster 1 sibling, 1 reply; 14+ messages in thread From: malc @ 2011-06-03 21:57 UTC (permalink / raw) To: Aurelien Jarno; +Cc: Marc-Antoine Perennou, qemu-devel On Fri, 3 Jun 2011, Aurelien Jarno wrote: > On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: > > pulse/simple.h does not include stdlib.h > > We cannot use NULL since it may not be defined > > Use 0 instead > > I am unable to reproduce this issue, even with gcc-4.6. Also please note > that NULL is defined in <stddef.h>, not <stdlib.h>. <stddef.h> is > included from <sys/types.h> which is included from <pulse/simple.h>. > > Do you have more information about the issue. > > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > > --- > > configure | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/configure b/configure > > index ea8b676..d67c3ce 100755 > > --- a/configure > > +++ b/configure > > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do > > > > pa) > > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ > > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" > > + "pa_simple *s = 0; pa_simple_free(s); return 0;" > > It should be ((void*)0) instead of simply 0. No it shouldn't. > > > libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" > > audio_pt_int="yes" > > ;; > > -- > > 1.7.5.52.ge839f.dirty > > > > > > -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-03 21:57 ` malc @ 2011-06-03 22:17 ` Aurelien Jarno 2011-06-03 22:54 ` malc 0 siblings, 1 reply; 14+ messages in thread From: Aurelien Jarno @ 2011-06-03 22:17 UTC (permalink / raw) To: malc; +Cc: Marc-Antoine Perennou, qemu-devel On Sat, Jun 04, 2011 at 01:57:23AM +0400, malc wrote: > On Fri, 3 Jun 2011, Aurelien Jarno wrote: > > > On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: > > > pulse/simple.h does not include stdlib.h > > > We cannot use NULL since it may not be defined > > > Use 0 instead > > > > I am unable to reproduce this issue, even with gcc-4.6. Also please note > > that NULL is defined in <stddef.h>, not <stdlib.h>. <stddef.h> is > > included from <sys/types.h> which is included from <pulse/simple.h>. > > > > Do you have more information about the issue. > > > > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > > > --- > > > configure | 2 +- > > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > > > diff --git a/configure b/configure > > > index ea8b676..d67c3ce 100755 > > > --- a/configure > > > +++ b/configure > > > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do > > > > > > pa) > > > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ > > > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" > > > + "pa_simple *s = 0; pa_simple_free(s); return 0;" > > > > It should be ((void*)0) instead of simply 0. > > No it shouldn't. > If we want to replace #include <stddef.h>, which should use the same code, that is: | #ifndef __cplusplus | #define NULL ((void *)0) | #else /* C++ */ | #define NULL 0 | #endif /* C++ */ Given we are writing C code and not C++ code, NULL is defined as ((void *)0). -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-03 22:17 ` Aurelien Jarno @ 2011-06-03 22:54 ` malc 2011-06-09 15:52 ` Marc-Antoine Perennou 0 siblings, 1 reply; 14+ messages in thread From: malc @ 2011-06-03 22:54 UTC (permalink / raw) To: Aurelien Jarno; +Cc: Marc-Antoine Perennou, qemu-devel [-- Attachment #1: Type: TEXT/PLAIN, Size: 1843 bytes --] On Sat, 4 Jun 2011, Aurelien Jarno wrote: > On Sat, Jun 04, 2011 at 01:57:23AM +0400, malc wrote: > > On Fri, 3 Jun 2011, Aurelien Jarno wrote: > > > > > On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: > > > > pulse/simple.h does not include stdlib.h > > > > We cannot use NULL since it may not be defined > > > > Use 0 instead > > > > > > I am unable to reproduce this issue, even with gcc-4.6. Also please note > > > that NULL is defined in <stddef.h>, not <stdlib.h>. <stddef.h> is > > > included from <sys/types.h> which is included from <pulse/simple.h>. > > > > > > Do you have more information about the issue. > > > > > > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > > > > --- > > > > configure | 2 +- > > > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > > > > > diff --git a/configure b/configure > > > > index ea8b676..d67c3ce 100755 > > > > --- a/configure > > > > +++ b/configure > > > > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do > > > > > > > > pa) > > > > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ > > > > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" > > > > + "pa_simple *s = 0; pa_simple_free(s); return 0;" > > > > > > It should be ((void*)0) instead of simply 0. > > > > No it shouldn't. > > > > If we want to replace #include <stddef.h>, which should use the same > code, that is: > > | #ifndef __cplusplus > | #define NULL ((void *)0) > | #else /* C++ */ > | #define NULL 0 > | #endif /* C++ */ > > Given we are writing C code and not C++ code, NULL is defined as > ((void *)0). Doesn't make a dent of a differnce how particular implementation defines NULL, 6.2.3.3#3 covers it, what i'm trying to get across is that your strong "should" is wrong. -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-03 22:54 ` malc @ 2011-06-09 15:52 ` Marc-Antoine Perennou 2011-06-09 17:44 ` Andreas Färber 0 siblings, 1 reply; 14+ messages in thread From: Marc-Antoine Perennou @ 2011-06-09 15:52 UTC (permalink / raw) To: malc; +Cc: qemu-devel, Aurelien Jarno On 4 June 2011 00:54, malc <av1474@comtv.ru> wrote: > On Sat, 4 Jun 2011, Aurelien Jarno wrote: > >> On Sat, Jun 04, 2011 at 01:57:23AM +0400, malc wrote: >> > On Fri, 3 Jun 2011, Aurelien Jarno wrote: >> > >> > > On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: >> > > > pulse/simple.h does not include stdlib.h >> > > > We cannot use NULL since it may not be defined >> > > > Use 0 instead >> > > >> > > I am unable to reproduce this issue, even with gcc-4.6. Also please note >> > > that NULL is defined in <stddef.h>, not <stdlib.h>. <stddef.h> is >> > > included from <sys/types.h> which is included from <pulse/simple.h>. >> > > >> > > Do you have more information about the issue. >> > > >> > > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> >> > > > --- >> > > > configure | 2 +- >> > > > 1 files changed, 1 insertions(+), 1 deletions(-) >> > > > >> > > > diff --git a/configure b/configure >> > > > index ea8b676..d67c3ce 100755 >> > > > --- a/configure >> > > > +++ b/configure >> > > > @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do >> > > > >> > > > pa) >> > > > audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ >> > > > - "pa_simple *s = NULL; pa_simple_free(s); return 0;" >> > > > + "pa_simple *s = 0; pa_simple_free(s); return 0;" >> > > >> > > It should be ((void*)0) instead of simply 0. >> > >> > No it shouldn't. >> > >> >> If we want to replace #include <stddef.h>, which should use the same >> code, that is: >> >> | #ifndef __cplusplus >> | #define NULL ((void *)0) >> | #else /* C++ */ >> | #define NULL 0 >> | #endif /* C++ */ >> >> Given we are writing C code and not C++ code, NULL is defined as >> ((void *)0). > > Doesn't make a dent of a differnce how particular implementation defines > NULL, 6.2.3.3#3 covers it, what i'm trying to get across is that your > strong "should" is wrong. > > -- > mailto:av1474@comtv.ru It's kinda weird actually, just wrote a small program to test: #include <stddef.h> int main() { int * i = NULL; return 0; } It builds fine Now if I replace "stddef.h" by "sys/types.h" ‘NULL’ undeclared I'm running Gentoo GNU/Linux, and everyone using it in my friends get the same problem, and there is no problem at all with the whole system which is around. (Only gcc 4.6 is installed fyi) Manually including stddef.h or replacing NULL by 0 or (void*)0 makes it work. Hope I provided enough informations to justify this thread ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-09 15:52 ` Marc-Antoine Perennou @ 2011-06-09 17:44 ` Andreas Färber 2011-06-09 19:07 ` Peter Maydell 0 siblings, 1 reply; 14+ messages in thread From: Andreas Färber @ 2011-06-09 17:44 UTC (permalink / raw) To: Marc-Antoine Perennou; +Cc: qemu-devel, Aurelien Jarno Am 09.06.2011 um 17:52 schrieb Marc-Antoine Perennou: > On 4 June 2011 00:54, malc <av1474@comtv.ru> wrote: >> On Sat, 4 Jun 2011, Aurelien Jarno wrote: >> >>> On Sat, Jun 04, 2011 at 01:57:23AM +0400, malc wrote: >>>> On Fri, 3 Jun 2011, Aurelien Jarno wrote: >>>> >>>>> On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou >>>>> wrote: >>>>>> diff --git a/configure b/configure >>>>>> index ea8b676..d67c3ce 100755 >>>>>> --- a/configure >>>>>> +++ b/configure >>>>>> @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do >>>>>> >>>>>> pa) >>>>>> audio_drv_probe $drv pulse/simple.h "-lpulse-simple - >>>>>> lpulse" \ >>>>>> - "pa_simple *s = NULL; pa_simple_free(s); return 0;" >>>>>> + "pa_simple *s = 0; pa_simple_free(s); return 0;" > It's kinda weird actually, just wrote a small program to test: > > #include <stddef.h> > int main() { > int * i = NULL; > return 0; > } > > It builds fine > Now if I replace "stddef.h" by "sys/types.h" > ‘NULL’ undeclared > > I'm running Gentoo GNU/Linux [...] > > Manually including stddef.h or replacing NULL by 0 or (void*)0 makes > it work. Then please submit a new patch that explicit includes that header with a comment explaining why, so that it doesn't get removed by accident. Andreas ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-09 17:44 ` Andreas Färber @ 2011-06-09 19:07 ` Peter Maydell 2011-06-10 7:14 ` Markus Armbruster 0 siblings, 1 reply; 14+ messages in thread From: Peter Maydell @ 2011-06-09 19:07 UTC (permalink / raw) To: Andreas Färber; +Cc: Marc-Antoine Perennou, qemu-devel, Aurelien Jarno On 9 June 2011 18:44, Andreas Färber <andreas.faerber@web.de> wrote: > Am 09.06.2011 um 17:52 schrieb Marc-Antoine Perennou: >> Manually including stddef.h or replacing NULL by 0 or (void*)0 makes it >> work. > > Then please submit a new patch that explicit includes that header with a > comment explaining why, so that it doesn't get removed by accident. I think the original patch is fine. This configure test isn't trying to test whether we correctly found some definition of NULL, it's testing pulseaudio presence. The test code should be the simplest and most stand-alone code that achieves that. There's no need to go dragging in extra headers when we don't even need to be using NULL here anyhow. We already have configure tests which use unadorned 0 for pointers (eg the pthread test), it's legal C, and it works. I think we should call this a trivial patch and just apply it. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> -- PMM ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-09 19:07 ` Peter Maydell @ 2011-06-10 7:14 ` Markus Armbruster 2011-06-24 13:31 ` Marc-Antoine Perennou 0 siblings, 1 reply; 14+ messages in thread From: Markus Armbruster @ 2011-06-10 7:14 UTC (permalink / raw) To: Peter Maydell Cc: Andreas Färber, Marc-Antoine Perennou, Aurelien Jarno, qemu-devel Peter Maydell <peter.maydell@linaro.org> writes: > On 9 June 2011 18:44, Andreas Färber <andreas.faerber@web.de> wrote: >> Am 09.06.2011 um 17:52 schrieb Marc-Antoine Perennou: >>> Manually including stddef.h or replacing NULL by 0 or (void*)0 makes it >>> work. >> >> Then please submit a new patch that explicit includes that header with a >> comment explaining why, so that it doesn't get removed by accident. > > I think the original patch is fine. This configure test isn't > trying to test whether we correctly found some definition of > NULL, it's testing pulseaudio presence. The test code should > be the simplest and most stand-alone code that achieves that. > There's no need to go dragging in extra headers when we don't > even need to be using NULL here anyhow. > > We already have configure tests which use unadorned 0 for > pointers (eg the pthread test), it's legal C, and it works. > I think we should call this a trivial patch and just apply it. > > Reviewed-by: Peter Maydell <peter.maydell@linaro.org> I agree with your reasoning. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-10 7:14 ` Markus Armbruster @ 2011-06-24 13:31 ` Marc-Antoine Perennou 2011-06-24 16:52 ` Stefan Hajnoczi 0 siblings, 1 reply; 14+ messages in thread From: Marc-Antoine Perennou @ 2011-06-24 13:31 UTC (permalink / raw) To: Markus Armbruster Cc: Peter Maydell, Andreas Färber, qemu-devel, Aurelien Jarno On 10 June 2011 09:14, Markus Armbruster <armbru@redhat.com> wrote: > Peter Maydell <peter.maydell@linaro.org> writes: > >> On 9 June 2011 18:44, Andreas Färber <andreas.faerber@web.de> wrote: >>> Am 09.06.2011 um 17:52 schrieb Marc-Antoine Perennou: >>>> Manually including stddef.h or replacing NULL by 0 or (void*)0 makes it >>>> work. >>> >>> Then please submit a new patch that explicit includes that header with a >>> comment explaining why, so that it doesn't get removed by accident. >> >> I think the original patch is fine. This configure test isn't >> trying to test whether we correctly found some definition of >> NULL, it's testing pulseaudio presence. The test code should >> be the simplest and most stand-alone code that achieves that. >> There's no need to go dragging in extra headers when we don't >> even need to be using NULL here anyhow. >> >> We already have configure tests which use unadorned 0 for >> pointers (eg the pthread test), it's legal C, and it works. >> I think we should call this a trivial patch and just apply it. >> >> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> > > I agree with your reasoning. > If you want me to provide a patch with the extra include instead, I can, otherwise, could this trivial one get merged so qemu-kvm can be built on several systems on which it actually can't ? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-24 13:31 ` Marc-Antoine Perennou @ 2011-06-24 16:52 ` Stefan Hajnoczi 0 siblings, 0 replies; 14+ messages in thread From: Stefan Hajnoczi @ 2011-06-24 16:52 UTC (permalink / raw) To: Marc-Antoine Perennou Cc: Peter Maydell, Andreas Färber, Markus Armbruster, Aurelien Jarno, qemu-devel On Fri, Jun 24, 2011 at 2:31 PM, Marc-Antoine Perennou <Marc-Antoine@perennou.com> wrote: > On 10 June 2011 09:14, Markus Armbruster <armbru@redhat.com> wrote: >> Peter Maydell <peter.maydell@linaro.org> writes: >> >>> On 9 June 2011 18:44, Andreas Färber <andreas.faerber@web.de> wrote: >>>> Am 09.06.2011 um 17:52 schrieb Marc-Antoine Perennou: >>>>> Manually including stddef.h or replacing NULL by 0 or (void*)0 makes it >>>>> work. >>>> >>>> Then please submit a new patch that explicit includes that header with a >>>> comment explaining why, so that it doesn't get removed by accident. >>> >>> I think the original patch is fine. This configure test isn't >>> trying to test whether we correctly found some definition of >>> NULL, it's testing pulseaudio presence. The test code should >>> be the simplest and most stand-alone code that achieves that. >>> There's no need to go dragging in extra headers when we don't >>> even need to be using NULL here anyhow. >>> >>> We already have configure tests which use unadorned 0 for >>> pointers (eg the pthread test), it's legal C, and it works. >>> I think we should call this a trivial patch and just apply it. >>> >>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> >> >> I agree with your reasoning. >> > > If you want me to provide a patch with the extra include instead, I > can, otherwise, could this trivial one get merged so qemu-kvm can be > built on several systems on which it actually can't ? It is in the trivial-patches tree now. qemu.git will pick it up next and then qemu-kvm.git will pull it in when it syncs up with qemu.git. Stefan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-06-03 20:33 ` Aurelien Jarno 2011-06-03 21:57 ` malc @ 2011-06-09 18:25 ` Markus Armbruster 1 sibling, 0 replies; 14+ messages in thread From: Markus Armbruster @ 2011-06-09 18:25 UTC (permalink / raw) To: Aurelien Jarno; +Cc: Marc-Antoine Perennou, qemu-devel Aurelien Jarno <aurelien@aurel32.net> writes: > On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: >> pulse/simple.h does not include stdlib.h >> We cannot use NULL since it may not be defined >> Use 0 instead > > I am unable to reproduce this issue, even with gcc-4.6. Also please note > that NULL is defined in <stddef.h>, not <stdlib.h>. NULL is defined in stddef.h (ISO/IEC 9899:1999 7.17), locale.h (ibid 7.11), stdio.h (ibid 7.19.1), stdlib.h (ibid 7.20), string.h (ibid 7.21.1), time.h (ibid 7.23.1), wchar.h (ibid 7.24.1). > <stddef.h> is > included from <sys/types.h> which is included from <pulse/simple.h>. I don't think POSIX specifies sys/types.h defines NULL, let alone includes stddef.h. > Do you have more information about the issue. > >> Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> >> --- >> configure | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/configure b/configure >> index ea8b676..d67c3ce 100755 >> --- a/configure >> +++ b/configure >> @@ -1567,7 +1567,7 @@ for drv in $audio_drv_list; do >> >> pa) >> audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \ >> - "pa_simple *s = NULL; pa_simple_free(s); return 0;" >> + "pa_simple *s = 0; pa_simple_free(s); return 0;" > > It should be ((void*)0) instead of simply 0. Matter of taste. >> libs_softmmu="-lpulse -lpulse-simple $libs_softmmu" >> audio_pt_int="yes" >> ;; ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure 2011-04-29 15:59 [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure Marc-Antoine Perennou 2011-05-27 9:00 ` Marc-Antoine Perennou 2011-06-03 20:33 ` Aurelien Jarno @ 2011-06-24 14:49 ` Stefan Hajnoczi 2 siblings, 0 replies; 14+ messages in thread From: Stefan Hajnoczi @ 2011-06-24 14:49 UTC (permalink / raw) To: Marc-Antoine Perennou; +Cc: qemu-devel On Fri, Apr 29, 2011 at 05:59:19PM +0200, Marc-Antoine Perennou wrote: > pulse/simple.h does not include stdlib.h > We cannot use NULL since it may not be defined > Use 0 instead > > Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> > --- > configure | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) There has been discussion but I hope we've arrived at consensus based on the fact that 0 is already used for pthreads and it's valid C. 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] 14+ messages in thread
end of thread, other threads:[~2011-06-24 16:52 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-29 15:59 [Qemu-devel] [PATCH] qemu-kvm: fix pulseaudio detection in configure Marc-Antoine Perennou 2011-05-27 9:00 ` Marc-Antoine Perennou 2011-06-03 20:33 ` Aurelien Jarno 2011-06-03 21:57 ` malc 2011-06-03 22:17 ` Aurelien Jarno 2011-06-03 22:54 ` malc 2011-06-09 15:52 ` Marc-Antoine Perennou 2011-06-09 17:44 ` Andreas Färber 2011-06-09 19:07 ` Peter Maydell 2011-06-10 7:14 ` Markus Armbruster 2011-06-24 13:31 ` Marc-Antoine Perennou 2011-06-24 16:52 ` Stefan Hajnoczi 2011-06-09 18:25 ` Markus Armbruster 2011-06-24 14:49 ` 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).