qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] build fix for audio/mixeng.c
Date: Mon, 7 Sep 2009 16:00:01 +0200	[thread overview]
Message-ID: <200909071600.02095.Christoph.Egger@amd.com> (raw)

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


Hi!


Attached patch fixes the build errors:

audio/mixeng.c:150: error: 'conv_natural_uint8_t_to_mono' undeclared here (not 
in a function)
audio/mixeng.c:151: error: 'conv_natural_uint16_t_to_mono' undeclared here 
(not in a function)
audio/mixeng.c:152: error: 'conv_natural_uint32_t_to_mono' undeclared here 
(not in a function)
[...]

NetBSD provides standard types by default as both a typedef and a macro hence
the fix makes the function use match the function definition.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: qemu_audio_buildfix.diff --]
[-- Type: text/x-diff, Size: 6288 bytes --]

diff --git a/audio/mixeng.c b/audio/mixeng.c
index 8ce942e..aefdab2 100644
--- a/audio/mixeng.c
+++ b/audio/mixeng.c
@@ -143,56 +143,59 @@
 #undef IN_T
 #undef SHIFT
 
+/* NetBSD provides standard types by default as both a typedef and a macro */
+#define concat(x,y,z) glue(glue(x,y),z)
+
 t_sample *mixeng_conv[2][2][2][3] = {
     {
         {
             {
-                conv_natural_uint8_t_to_mono,
-                conv_natural_uint16_t_to_mono,
-                conv_natural_uint32_t_to_mono
+                concat(conv_natural_, uint8_t, _to_mono),
+                concat(conv_natural_, uint16_t, _to_mono),
+                concat(conv_natural_, uint32_t, _to_mono),
             },
             {
-                conv_natural_uint8_t_to_mono,
-                conv_swap_uint16_t_to_mono,
-                conv_swap_uint32_t_to_mono,
+                concat(conv_natural_, uint8_t, _to_mono),
+                concat(conv_swap_, uint16_t, _to_mono),
+                concat(conv_swap_, uint32_t, _to_mono),
             }
         },
         {
             {
-                conv_natural_int8_t_to_mono,
-                conv_natural_int16_t_to_mono,
-                conv_natural_int32_t_to_mono
+                concat(conv_natural_, int8_t, _to_mono),
+                concat(conv_natural_, int16_t, _to_mono),
+                concat(conv_natural_, int32_t, _to_mono)
             },
             {
-                conv_natural_int8_t_to_mono,
-                conv_swap_int16_t_to_mono,
-                conv_swap_int32_t_to_mono
+                concat(conv_natural_, int8_t, _to_mono),
+                concat(conv_swap_, int16_t, _to_mono),
+                concat(conv_swap_, int32_t, _to_mono)
             }
         }
     },
     {
         {
             {
-                conv_natural_uint8_t_to_stereo,
-                conv_natural_uint16_t_to_stereo,
-                conv_natural_uint32_t_to_stereo
+                concat(conv_natural_, uint8_t, _to_stereo),
+                concat(conv_natural_, uint16_t, _to_stereo),
+                concat(conv_natural_, uint32_t, _to_stereo)
             },
             {
-                conv_natural_uint8_t_to_stereo,
-                conv_swap_uint16_t_to_stereo,
-                conv_swap_uint32_t_to_stereo
+                concat(conv_natural_, uint8_t, _to_stereo),
+                concat(conv_swap_, uint16_t, _to_stereo),
+                concat(conv_swap_, uint32_t, _to_stereo)
             }
         },
         {
             {
-                conv_natural_int8_t_to_stereo,
-                conv_natural_int16_t_to_stereo,
-                conv_natural_int32_t_to_stereo
+                concat(conv_natural_, int8_t, _to_stereo),
+                concat(conv_natural_, int16_t, _to_stereo),
+                concat(conv_natural_, int32_t, _to_stereo)
             },
             {
-                conv_natural_int8_t_to_stereo,
-                conv_swap_int16_t_to_stereo,
-                conv_swap_int32_t_to_stereo,
+                concat(conv_natural_, int8_t, _to_stereo),
+                concat(conv_swap_, int16_t, _to_stereo),
+                concat(conv_swap_, int32_t, _to_stereo),
             }
         }
     }
@@ -202,52 +205,52 @@ f_sample *mixeng_clip[2][2][2][3] = {
     {
         {
             {
-                clip_natural_uint8_t_from_mono,
-                clip_natural_uint16_t_from_mono,
-                clip_natural_uint32_t_from_mono
+                concat(clip_natural_, uint8_t, _from_mono),
+                concat(clip_natural_, uint16_t, _from_mono),
+                concat(clip_natural_, uint32_t, _from_mono)
             },
             {
-                clip_natural_uint8_t_from_mono,
-                clip_swap_uint16_t_from_mono,
-                clip_swap_uint32_t_from_mono
+                concat(clip_natural_, uint8_t, _from_mono),
+                concat(clip_swap_, uint16_t, _from_mono),
+                concat(clip_swap_, uint32_t, _from_mono)
             }
         },
         {
             {
-                clip_natural_int8_t_from_mono,
-                clip_natural_int16_t_from_mono,
-                clip_natural_int32_t_from_mono
+                concat(clip_natural_, int8_t, _from_mono),
+                concat(clip_natural_, int16_t, _from_mono),
+                concat(clip_natural_, int32_t, _from_mono)
             },
             {
-                clip_natural_int8_t_from_mono,
-                clip_swap_int16_t_from_mono,
-                clip_swap_int32_t_from_mono
+                concat(clip_natural_, int8_t, _from_mono),
+                concat(clip_swap_, int16_t, _from_mono),
+                concat(clip_swap_, int32_t, _from_mono)
             }
         }
     },
     {
         {
             {
-                clip_natural_uint8_t_from_stereo,
-                clip_natural_uint16_t_from_stereo,
-                clip_natural_uint32_t_from_stereo
+                concat(clip_natural_, uint8_t, _from_stereo),
+                concat(clip_natural_, uint16_t, _from_stereo),
+                concat(clip_natural_, uint32_t, _from_stereo)
             },
             {
-                clip_natural_uint8_t_from_stereo,
-                clip_swap_uint16_t_from_stereo,
-                clip_swap_uint32_t_from_stereo
+                concat(clip_natural_, uint8_t, _from_stereo),
+                concat(clip_swap_, uint16_t, _from_stereo),
+                concat(clip_swap_, uint32_t, _from_stereo)
             }
         },
         {
             {
-                clip_natural_int8_t_from_stereo,
-                clip_natural_int16_t_from_stereo,
-                clip_natural_int32_t_from_stereo
+                concat(clip_natural_, int8_t, _from_stereo),
+                concat(clip_natural_, int16_t, _from_stereo),
+                concat(clip_natural_, int32_t, _from_stereo)
             },
             {
-                clip_natural_int8_t_from_stereo,
-                clip_swap_int16_t_from_stereo,
-                clip_swap_int32_t_from_stereo
+                concat(clip_natural_, int8_t, _from_stereo),
+                concat(clip_swap_, int16_t, _from_stereo),
+                concat(clip_swap_, int32_t, _from_stereo)
             }
         }
     }

                 reply	other threads:[~2009-09-07 14:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909071600.02095.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).