[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Mar 20 14:39:54 2001 
Subject:Re: rebuilding Poplog on AIX ... 
From:Stephen Isard 
Volume-ID:1010320.08 

bsl@cs.nott.ac.uk wrote:
> 
> I am trying to rebuild Poplog v15.53 on AIX/PowerPC release 3.  
<snip>
>   c_core.c:1792: conflicting types for `htonl'
>   /usr/include/netinet/in.h:274: previous declaration of `htonl'
>   c_core.c:1794: conflicting types for `ntohl'
>   /usr/include/netinet/in.h:273: previous declaration of `ntohl'

You might try
gcc -E $popexternlib/c_core.c |egrep -v "^[ \t]*$" | tr -s "\n" > junk

This runs only the preprocessor, not the compiler, and should give you
information about which declarations you are actually getting, and from
what files.  (The grep and tr filters just eliminate lines with nothing
on them.)

Search through the file junk for occurrences of htonl and then upwards
for a comment indicating the filename. For instance, under SunOS I find

# 38 "/usr/include/netinet/in.h" 2 3
# 1
"/usr/local/GNU/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.1/include/sys/byteorder.h"
1 3
static __inline__ unsigned long htonl (unsigned long);

Then you can try to work out where the path through the ifdefs has gone
wrong.

Hope that is useful.

Steve