Skip site navigation (1) Skip section navigation (2)

Re: Compiling on 8.1.3 on Openserver 5.05

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Campbell <mark(dot)campbell(at)ucs-software(dot)co(dot)za>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: Compiling on 8.1.3 on Openserver 5.05
Date: 2006-05-11 17:22:57
Message-ID: 14842.1147368177@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-ports
Mark Campbell <mark(dot)campbell(at)ucs-software(dot)co(dot)za> writes:
> I found the following:

> u_long ntohl __P((u_long)), htonl __P((u_long));
> u_short ntohs __P((u_short)), htons __P((u_short));
> #define htonl(x)        (x)
> #define ntohs(x)        (x)
> #define htons(x)        (x)
> in /usr/include/sys/byteorder.h

Hmm ... you could add "#include <sys/byteorder.h>" but I fear you're
going to need that in a lot of places.  The Single Unix Spec specifies
that these functions are to be declared in <arpa/inet.h>, and that
seems to be where most systems put 'em, because I can't recall having
heard many previous complaints about this sort of failure.  The shortest
route to success might be to modify your local copy of 
/usr/include/arpa/inet.h to include sys/byteorder.h, instead.

BTW, it could be that arpa/inet.h already does include sys/byteorder.h,
but only when some configuration symbol is defined.  In that case you
might want to force the configuration symbol instead.  Compare HPUX,
where we do
	CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED"
in order to get access to a reasonable set of predefined symbols ...

			regards, tom lane

In response to

Responses

pgsql-ports by date

Next:From: Mark CampbellDate: 2006-05-11 19:11:03
Subject: Re: Compiling on 8.1.3 on Openserver 5.05
Previous:From: Mark CampbellDate: 2006-05-11 15:20:52
Subject: Re: Compiling on 8.1.3 on Openserver 5.05

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2006-05-11 17:39:23
Subject: Re: sblock state on FreeBSD 6.1
Previous:From: Jim C. NasbyDate: 2006-05-11 17:18:06
Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal

pgsql-general by date

Next:From: Joshua D. DrakeDate: 2006-05-11 18:09:38
Subject: Re: pg_dump and grants to PUBLIC
Previous:From: Scott MarloweDate: 2006-05-11 17:20:01
Subject: Re: string primary key

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group