qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken
@ 2009-02-01 21:14 Robert Riebisch
  2009-02-01 22:04 ` malc
       [not found] ` <1D432B39-17C0-4F1C-971B-255F015A10AE@hotmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Riebisch @ 2009-02-01 21:14 UTC (permalink / raw)
  To: qemu-devel

Hi!

I'm getting this error:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h:369:
error: syntax error before "__attribute__"

I was able to fix this by moving inclusion of `dsound.h' above that of
`qemu-common.h'. The real cause seems to be "#define noreturn
__attribute__ ((__noreturn__))" in `qemu-common.h'. This has been added
in r6303 and "fixed" in r6330.

Here's my patch for demonstration:
***
--- dsoundaudio.c.orig	Wed Dec 03 23:48:44 2008
+++ dsoundaudio.c	Sun Feb 01 21:48:59 2009
@@ -26,6 +26,8 @@
  * SEAL 1.07 by Carlos 'pel' Hasan was used as documentation
  */

+#include <dsound.h>
+
 #include "qemu-common.h"
 #include "audio.h"

@@ -35,8 +37,6 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <mmsystem.h>
-#include <objbase.h>
-#include <dsound.h>

 /* #define DEBUG_DSOUND */

***

Signed-off-by: Robert Riebisch <rr@bttr-software.de>

I've just removed `objbase.h', because it will be included with
`dsound.h' already.

Robert Riebisch
P.S. I'm using 2002 `directx-devel.tar.gz' from the SDL project.
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken
  2009-02-01 21:14 [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken Robert Riebisch
@ 2009-02-01 22:04 ` malc
       [not found] ` <1D432B39-17C0-4F1C-971B-255F015A10AE@hotmail.com>
  1 sibling, 0 replies; 4+ messages in thread
From: malc @ 2009-02-01 22:04 UTC (permalink / raw)
  To: qemu-devel

On Sun, 1 Feb 2009, Robert Riebisch wrote:

> Hi!
> 
> I'm getting this error:
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h:369:
> error: syntax error before "__attribute__"
> 
> I was able to fix this by moving inclusion of `dsound.h' above that of
> `qemu-common.h'. The real cause seems to be "#define noreturn
> __attribute__ ((__noreturn__))" in `qemu-common.h'. This has been added
> in r6303 and "fixed" in r6330.

Aha, so finally we are at the bottom of things. Thanks.

[..snip..]

> 
> I've just removed `objbase.h', because it will be included with
> `dsound.h' already.

The fix however is wrong, Microsoft states that CoCreateInstance 
should reside in objbase.h thus removing it is wrong, unless somone
could find the same being stated about dsound.h always including objbase.

While pretty and seductive the idea of lower case noreturn was always
rotten. (Not that one can not make a strong case for blaming w32api
developers for that particular way of handling noreturn in rpcdce.h)

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken
       [not found] ` <1D432B39-17C0-4F1C-971B-255F015A10AE@hotmail.com>
@ 2009-02-01 22:29   ` C.W. Betts
  2009-02-01 22:38     ` Robert Riebisch
  0 siblings, 1 reply; 4+ messages in thread
From: C.W. Betts @ 2009-02-01 22:29 UTC (permalink / raw)
  To: qemu-devel, Robert Riebisch

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

If you are using CVS, please note that it is not being maintained.   
Please use Subversion(SVN) instead.
On Feb 1, 2009, at 2:14 PM, Robert Riebisch wrote:

> Hi!
>
> I'm getting this error:
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h: 
> 369:
> error: syntax error before "__attribute__"
>
> I was able to fix this by moving inclusion of `dsound.h' above that of
> `qemu-common.h'. The real cause seems to be "#define noreturn
> __attribute__ ((__noreturn__))" in `qemu-common.h'. This has been  
> added
> in r6303 and "fixed" in r6330.
>
> Here's my patch for demonstration:
> ***
> --- dsoundaudio.c.orig	Wed Dec 03 23:48:44 2008
> +++ dsoundaudio.c	Sun Feb 01 21:48:59 2009
> @@ -26,6 +26,8 @@
>  * SEAL 1.07 by Carlos 'pel' Hasan was used as documentation
>  */
>
> +#include <dsound.h>
> +
> #include "qemu-common.h"
> #include "audio.h"
>
> @@ -35,8 +37,6 @@
> #define WIN32_LEAN_AND_MEAN
> #include <windows.h>
> #include <mmsystem.h>
> -#include <objbase.h>
> -#include <dsound.h>
>
> /* #define DEBUG_DSOUND */
>
> ***
>
> Signed-off-by: Robert Riebisch <rr@bttr-software.de>
>
> I've just removed `objbase.h', because it will be included with
> `dsound.h' already.
>
> Robert Riebisch
> P.S. I'm using 2002 `directx-devel.tar.gz' from the SDL project.
> -- 
> BTTR Software
> http://www.bttr-software.de/
>
>


[-- Attachment #2: Type: text/html, Size: 1876 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken
  2009-02-01 22:29   ` C.W. Betts
@ 2009-02-01 22:38     ` Robert Riebisch
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Riebisch @ 2009-02-01 22:38 UTC (permalink / raw)
  To: qemu-devel

C.W. Betts wrote:

> If you are using CVS, please note that it is not being maintained.
>  Please use Subversion(SVN) instead.

Sorry, I meant SVN, of course. :-)

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-01 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-01 21:14 [Qemu-devel] Building QEMU CVS with DirectSound on MinGW broken Robert Riebisch
2009-02-01 22:04 ` malc
     [not found] ` <1D432B39-17C0-4F1C-971B-255F015A10AE@hotmail.com>
2009-02-01 22:29   ` C.W. Betts
2009-02-01 22:38     ` Robert Riebisch

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).