Re: Another ORBit problem



Philip Trickett wrote:
> 
> Hi, I have just checked out the ORBit CVS.  I run ./autogen.sh and it
> reports no errors.  However, when I run make I get the following output:
> gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -I../../src
> -I/usr/local/lib/glib/include -I/usr/local/include -g -O2
> -Wp,-MD,.deps/iiop-endian.p -c -fPIC -DPIC iiop-endian.c
> iiop-endian.c:6: redefinition of `byteswap'
> iiop-endian.h:30: `byteswap' previously defined here
> make[3]: *** [iiop-endian.lo] Error 1
> make[3]: Leaving directory `/scratch/gnomecvs/ORBit/src/IIOP'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/scratch/gnomecvs/ORBit/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/scratch/gnomecvs/ORBit'
> make: *** [all-recursive-am] Error 2

Do this:
Edit iiop-endian.h. Comment out or remove this bit:
/* This is also defined in IIOP-types.c */
  extern inline void byteswap(guchar *outdata,
                            const guchar *data,
                            gulong datalen)
{
  const guchar *source_ptr = data;
  guchar *dest_ptr = outdata + datalen - 1;
  while(dest_ptr >= outdata)
    *dest_ptr-- = *source_ptr++;
}

And replace it with this bit:

extern void byteswap(guchar *outdata,
                     const guchar *data,
                     gulong datalen);


All forms of non-declarative code in header files are evil!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]