[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
- To: coldsync-hackers at lusars dot net
- Subject: Re: [coldsync-hackers] help compiling with gcc 4.0.1 on Mac OS 10.4.4
- From: Andrew Arensburger <arensb+CShackers at ooblick dot com>
- Date: Wed, 1 Feb 2006 20:24:26 -0500
- In-reply-to: <a0620076bc006ca73cd70@[10.0.1.13]>
- Mail-followup-to: coldsync-hackers at lusars dot net
- References: <a0620076bc006ca73cd70@[10.0.1.13]>
- Reply-to: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
- User-agent: Mutt/1.4.2.1i
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.