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

Bug#317363: debian unstable powerpc, gcc-4.0.0, and glibc-2.3.5



Since gcc-4.0.0 is the compiler for debian unstable on powerpc, it looks like 
glibc-2.3.5 is a Build-Depend.

in glibc-2.3.5 IXDR_PUT_LONG has been redefined as follows

#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v)))
#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))

Removing the cast fixes the gcc-4.0.0 error. 

I took the macro definitions from 
glibc-2.3.5/build-tree/glibc-2.3.5/sunrpc/rpc/xdr.h that is in debian 
experimental.

Changing my testing program to the following on debian unstable powerpc:

#include <rpc/types.h>
/* #include <rpc/xdr.h> */
#include <arpa/inet.h>

#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v)))
#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))

int main() {
            register int32_t *buf=buf;
            int i;

            IXDR_PUT_LONG(buf, i);
}

Compiles clean.


-- 
Bob Tanner <tanner@real-time.com>          | Phone : (952)943-8700
http://www.real-time.com, Minnesota, Linux | Fax   : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288



Reply to: