[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [kdemultimedia/kmidi/TIMIDITY] output.c needs sys/types.h
From:       The Hermit Hacker <scrappy () hub ! org>
Date:       2001-04-27 15:59:10
[Download RAW message or body]



gmake[3]: Entering directory `/usr/local/kde/kdemultimedia/kmidi/TIMIDITY'
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/X11R6/include `/usr/local/bin/artsc-config \
--cflags`  -pthread -D_THREAD_SAFE -I/usr/local/include \
-DDEFAULT_PATH=\"//usr/local/share/apps/kmidi/config\" -DAU_OSS  -DIA_XAW -pthread \
                -D_THREAD_SAFE -I/usr/local/include  -O3 -fomit-frame-pointer \
                -ffast-math -c output.c
output.c: In function `s32tos16x':
output.c:176: syntax error before `__X'
output.c:176: `__X' undeclared (first use in this function)
output.c:176: (Each undeclared identifier is reported only once
output.c:176: for each function it appears in.)
output.c: In function `s32tou16x':
output.c:189: syntax error before `__X'
output.c:189: `__X' undeclared (first use in this function)
gmake[3]: *** [output.o] Error 1
gmake[3]: Leaving directory `/usr/local/kde/kdemultimedia/kmidi/TIMIDITY'

=========================

The function is:

void s32tos16x(int32 *lp, uint32 c)
{
  int16 *sp=(int16 *)(lp);
  int32 l;
  while (c--)
    {
      l=(*lp++)>>(32-16-GUARD_BITS);
      if (l > 32767) { l=32767; output_clips++; }
      else if (l<-32768) { l=-32768; output_clips++; }
      *sp++ = XCHG_SHORT((int16)(l));
    }
}

========================

From what I can tell, the problem is in machine/endian.h, where
__byte_to_word is defined as:

#define __byte_swap_word(x) \
__extension__ ({ register u_short __X = (x); \
   __asm ("xchgb %h1, %b1" \
        : "=q" (__X) \
        : "0" (__X)); \
   __X; })


=======================

Adding

#include <sys/types.h>

to the top of output.c appears to fix it, as its required to define
u_short in the above ...


Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

 
> > Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic