Skip to contentSkip to conversation

build fix for audio/mixeng.c

PATCH New Christoph Egger 1 participant 1 message Sep 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build fix for audio/mixeng.c

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.

Signature · 6 lines
---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
audio/mixeng.c +51 -48
index 8ce942e..aefdab2 100644
@@ -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)
             }
         }
     }