X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9C7409FA2C8 for ; Thu, 11 May 2006 16:05:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 56294-03 for ; Thu, 11 May 2006 16:05:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ucsns.ucs.co.za (ucsns.ucs.co.za [196.23.43.2]) by postgresql.org (Postfix) with ESMTP id 10D959FA19B for ; Thu, 11 May 2006 16:05:11 -0300 (ADT) Received: from ucspost.ucs.co.za (ucspost.ucs.co.za [196.23.43.3]) by ucsns.ucs.co.za (Postfix) with ESMTP id C25212BD4A; Thu, 11 May 2006 21:05:06 +0200 (SAST) Received: from jhb.ucs.co.za (jhb.ucs.co.za [172.31.1.3]) by ucspost.ucs.co.za (Postfix) with ESMTP id BBD6BD9DFC; Thu, 11 May 2006 21:05:06 +0200 (SAST) Received: from [192.168.0.241] (unknown [172.31.4.237]) by jhb.ucs.co.za (Postfix) with ESMTP id 39AF697DB9; Thu, 11 May 2006 21:05:05 +0200 (SAST) Message-ID: <44638C47.6010707@ucs-software.co.za> Date: Thu, 11 May 2006 21:11:03 +0200 From: Mark Campbell User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-ports@postgresql.org Subject: Re: Compiling on 8.1.3 on Openserver 5.05 References: <4463437E.5020108@ucs-software.co.za> <6844.1147359792@sss.pgh.pa.us> <44635654.6000904@ucs-software.co.za> <14842.1147368177@sss.pgh.pa.us> In-Reply-To: <14842.1147368177@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------080104010400000201000108" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/10 X-Sequence-Number: 2391 This is a multi-part message in MIME format. --------------080104010400000201000108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thx Tom I edited the /usr/include/arpa/inet.h and added the following : #include Looks correct as some of the errors seem to be gone, however where would I have to add/include the "h_errno" and the "warning: unreachable code at beginning of switch statement" worries me gmake command as follows: ksh# gmake gmake -C doc all gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc' gmake[1]: Nothing to be done for `all'. gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc' gmake -C src all gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src' gmake -C port all gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND-I../../src/include -c -o getaddrinfo.o getaddrinfo.c getaddrinfo.c: In function `pg_getaddrinfo': getaddrinfo.c:211: `h_errno' undeclared (first use in this function) getaddrinfo.c:211: (Each undeclared identifier is reported only once getaddrinfo.c:211: for each function it appears in.) getaddrinfo.c:215: warning: unreachable code at beginning of switch statement gmake[2]: *** [getaddrinfo.o] Error 1 gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src' gmake: *** [all] Error 2 ksh# Regards Mark Tom Lane wrote: >Mark Campbell 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 " 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 , 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 > >---------------------------(end of broadcast)--------------------------- >TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > > --------------080104010400000201000108 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thx Tom

I edited the /usr/include/arpa/inet.h and added the following : #include <sys/byteorder.h>

Looks correct as some of the errors seem to be gone, however where would I have to add/include the "h_errno" and the "warning: unreachable code at beginning of switch statement" worries me

gmake command as follows:

ksh# gmake
gmake -C doc all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake -C src all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake -C port all
gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND-I../../src/include   -c -o getaddrinfo.o getaddrinfo.c
getaddrinfo.c: In function `pg_getaddrinfo':
getaddrinfo.c:211: `h_errno' undeclared (first use in this function)
getaddrinfo.c:211: (Each undeclared identifier is reported only once
getaddrinfo.c:211: for each function it appears in.)
getaddrinfo.c:215: warning: unreachable code at beginning of switch statement
gmake[2]: *** [getaddrinfo.o] Error 1
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
ksh#

Regards

Mark

Tom Lane wrote:
Mark Campbell <mark.campbell@ucs-software.co.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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
  

--------------080104010400000201000108--