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

Re: [coldsync-hackers] help compiling with gcc 4.0.1 on Mac OS 10.4.4



On Wed, Feb 01, 2006 at 01:37:31PM -0700, Joseph J. Strout wrote:
> I'm trying to compile coldsync on my Mac.  I did a './configure', 
> which claimed that my kit looks good, and then 'make'.  I don't have 
> very much experience with Unix hacking, so I'm not sure what to make 
> of the errors I'm seeing, which start with:
> 
> gcc -Wall -ansi -pedantic -g -O2 -DHAVE_CONFIG_H -I. -I./.. 
> -I./../include -I/usr/local/include -c PConnection_net.c
> In file included from PConnection_net.c:14:
> /usr/include/arpa/nameser.h:121: error: parse error before '*' token
> /usr/include/arpa/nameser.h:123: error: parse error before '*' token
> /usr/include/arpa/nameser.h:126: error: parse error before '*' token
> 
> ...and a zillion more like these.  Line 121 of nameser.h is:
> 
> 	const u_char	*_msg, *_eom;
> 
> So maybe my setup hasn't defined what u_char is?

	Which version of MacOS are you running? Though I suppose a
better question might be, where did the files in /usr/include come
from? Also, which version of ColdSync are you trying to build?

	For what it's worth, ColdSync 2.2.5 compiles for me (not
cleanly, but still) under MacOS 10.2.

	Yes, you're probably right that the compiler isn't finding a
definition of 'u_char'.

	Looking at the code, it looks as though <arpa/nameser.h> is
included to make inet_ntop() work under Solaris. Under MacOS 10.2, the
man page fore inet_ntop() says to use:

	#include <sys/types.h>
	#include <sys/socket.h>
	#include <netinet/in.h>
	#include <arpa/inet.h>

All four of those files are already included. So you may want to
comment out the #if HAVE_INET_NTOP...#endif block, and see whether
that fixes things.
	If it does, then future releases of ColdSync should probably
use something like
	#if HAVE_INET_NTOP && defined(sun)
or some such.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
	  If I ever get a Lexus, I'm going to spend a little
	  extra money and get the one with the turn signals.