
Open portability issues:

/usr/local should be searched for lib and include for all ports if present 
(currently not working, I have libreadline there)

the stream functions on AIX need a size_t for addrlen's in fe-connect.c and pqcomm.c.

lock.c still has an incompatible TPRINTF(flags, args...) definition

the long long int printf format in int8.h is %lld on AIX

AIX 4.2.1 and 4.3.1 need one other simpler Makefile, another template
and must not include dynloader.c

   
Andreas

PS: all unsigned char problems are gone. 
keep it cidr not inet !!
and no, the heaptuple.c fix did not fix the pg_class index problem
sorry i am off to weekend now

begin 600 aix_42
M05)/4%0Z8W)S"D-&3$%'4SHM<6-H87)S/7-I9VYE9" M<6UA>&UE;3TX,3DR
M("UQ:&%L=#UW("UQ<W)C;7-G("UQ8VAE8VL]9&EV>F5R;R M<6QO;F=L;VYG
M"E-(05)%1%],24(Z"D%,3#H*4U)#2%])3D,Z"E-20TA?3$E".@I54T5?3$]#
K04Q%.FYO"D1,4U5&1DE8.BYS;PI91DQ!1U,Z+60*64%#0SH*0T,Z>&QC"D]#
`
end

begin 600 Makefile.aix4
M34M?3D]?3$]21$52/2!T<G5E"@HE)"A$3%-51D9)6"DZ("4N;PH))"A,1"D@
J+4<@+6)E>'!A;&P@+6)N;V5N=')Y("UO("1 ("0\("0H3$1&3$%'4RD*
`
end

begin 600 .similar
M86QP:&$M9&5C+6]S9CUA;'!H80IA;'!H82UU;FMN;W=N+6QI;G5X+6=N=3UL
M:6YU>%]A;'!H80IH<'!A,2XQ+6AP+6AP=7@Q,"XR,#UH<'5X7V-C"FAP<&$Q
M+C$M<W1R871U<RUS>7-V-#US=G(T"FDS.#8M;F5X="UN97AT<W1E<#,];F5X
M='-T97 *:3,X-BUP8RUB<V1I,BXP/6)S9&E?,BXP"FDS.#8M<&,M8G-D:3(N
M,3UB<V1I7S(N,0II,S@V+7!C+6)S9&DS+C ]8G-D:5\S+C *:3,X-BUP8RUL
M:6YU>"UG;G4];&EN=7A?:3,X-@II,S@V+7!C+7-O;&%R:7,R+C8]<V]L87)I
M<U]I,S@V7V=C8PII,S@V+7!C+7-U;F]S-3US;VQA<FES7VDS.#9?9V-C"FDS
M.#8M=6YK;F]W;BUF<F5E8G-D/69R965B<V0*:3,X-BUU;FMN;W=N+6YE=&)S
M9#UN971B<V0*:30X-BUP8RUL:6YU>"UG;G4];&EN=7A?:3,X-@II-3@V+7!C
M+6QI;G5X+6=N=3UL:6YU>%]I,S@V"FDU.#8M<&,M<V-O,RXR=CUS8V\*:38X
M-BUP8RUL:6YU>"UG;G4];&EN=7A?:3,X-@IM:7!S+7-G:2UI<FEX/6ER:7@U
M"G!O=V5R<&,M:6)M+6%I>#,N,BXU/6%I>%\S,C4*<&]W97)P8RUI8FTM86EX
M-"XQ+C0N,#UA:7A?-#$*<&]W97)P8RUI8FTM86EX-"XQ+C4N,#UA:7A?-#$*
M<&]W97)P8RUI8FTM86EX-"XR+C$N,#UA:7A?-#(*<&]W97)P8RUI8FTM86EX
M-"XS+C$N,#UA:7A?-#(*<&]W97)P8RUU;FMN;W=N+6QI;G5X+6=N=3UL:6YU
M>%]P<&,*<W!A<F,M<W5N+7-O;&%R:7,]<V]L87)I<U]S<&%R8U]G8V,*<W!A
M<F,M<W5N+7-U;F]S-#US=6YO<S1?9V-C"G-P87)C+7-U;BUS=6YO<S4]<V]L
M87)I<U]S<&%R8U]G8V,*<W!A<F,M=6YK;F]W;BUL:6YU>"UG;G4];&EN=7A?
&<W!A<F,*
`
end


Fri, 4 Sep 1998 21:10:52 +0200
Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
Open portability issues
   Open portability issues:

   /usr/local should be searched for lib and include for all ports if present 
   (currently not working, I have libreadline there)

See the INSTALL file for using configure.

       --with-includes=DIRS
                          Include DIRS in list of directories searched
                          for header files.  (Typical use will need
                          --with-includes=/usr/local/include)

       --with-libs=DIRS
       --with-libraries=DIRS
                          Include DIRS in list of directories searched
                          for archive libraries.  (Typical use will need
                          --with-libraries=/usr/local/lib)

Cheers,
Brook

Fri, 4 Sep 1998 15:53:26 -0600 (MDT)
Brook Milligan <brook@trillium.NMSU.Edu>
Re: [HACKERS] Open portability issues
> the long long int printf format in int8.h is %lld on AIX

This is on my list. %lld will work with gcc also, so since we don't have
very many reported successful ports for int8, we should just change it
for now.

                    - Tom

Sat, 05 Sep 1998 01:00:00 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Open portability issues
> 
> 
> Open portability issues:
> 
> /usr/local should be searched for lib and include for all ports if present 
> (currently not working, I have libreadline there)
> 
> the stream functions on AIX need a size_t for addrlen's in fe-connect.c and pqcomm.c.
> 
> lock.c still has an incompatible TPRINTF(flags, args...) definition

Please apply this patch:

*** src/backend/storage/lmgr/lock.c.orig	Wed Aug 26 09:00:55 1998
--- src/backend/storage/lmgr/lock.c	Mon Sep  7 14:44:53 1998
*************** static int WaitOnLock(LOCKMETHOD lockmet
*** 136,153 ****
  		 xidentP->holders[5], \
  		 xidentP->nHolding)
  
- #define LOCK_TPRINTF(lock, args...) \
-     if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
- 	     && (lock->tag.relId >= lockDebugOidMin)) \
- 	    || (lock->tag.relId == lockDebugRelation)) \
- 	    TPRINTF(TRACE_ALL, args)
- 
  #else	/* !LOCK_MGR_DEBUG */
  #define LOCK_PRINT(where,lock,type)
  #define LOCK_PRINT_AUX(where,lock,type)
  #define XID_PRINT(where,xidentP)
  #define XID_PRINT_AUX(where,xidentP)
- #define LOCK_TPRINTF(lock, args...)
  #endif	/* !LOCK_MGR_DEBUG */
  
  static char *lock_types[] = {
--- 136,146 ----
*************** LockRelease(LOCKMETHOD lockmethod, LOCKT
*** 1200,1206 ****
  	}
  	else
  	{
! 		LOCK_TPRINTF(lock, "LockRelease: no wakeup needed");
  	}
  
  	SpinRelease(masterLock);
--- 1193,1202 ----
  	}
  	else
  	{
! 		if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
! 			 && (lock->tag.relId >= lockDebugOidMin)) \
! 			|| (lock->tag.relId == lockDebugRelation))
! 			TPRINTF(TRACE_ALL, "LockRelease: no wakeup needed");
  	}
  
  	SpinRelease(masterLock);


-- 
Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto                email:  dz@cs.unitn.it             |
|  Via Marconi, 141                 phone:  ++39-461-534251            |
|  38057 Pergine Valsugana (TN)     www:  http://www.cs.unitn.it/~dz/  |
|  Italy                            pgp:  finger dz@tango.cs.unitn.it  |
+----------------------------------------------------------------------+

Mon, 7 Sep 1998 21:15:27 +0200 (MET DST)
Massimo Dal Zotto <dz@cs.unitn.it>
Re: [HACKERS] Open portability issues
Patch applied.


[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > 
> > 
> > Open portability issues:
> > 
> > /usr/local should be searched for lib and include for all ports if present 
> > (currently not working, I have libreadline there)
> > 
> > the stream functions on AIX need a size_t for addrlen's in fe-connect.c and pqcomm.c.
> > 
> > lock.c still has an incompatible TPRINTF(flags, args...) definition
> 
> Please apply this patch:
> 
> *** src/backend/storage/lmgr/lock.c.orig	Wed Aug 26 09:00:55 1998
> --- src/backend/storage/lmgr/lock.c	Mon Sep  7 14:44:53 1998
> *************** static int WaitOnLock(LOCKMETHOD lockmet
> *** 136,153 ****
>   		 xidentP->holders[5], \
>   		 xidentP->nHolding)
>   
> - #define LOCK_TPRINTF(lock, args...) \
> -     if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
> - 	     && (lock->tag.relId >= lockDebugOidMin)) \
> - 	    || (lock->tag.relId == lockDebugRelation)) \
> - 	    TPRINTF(TRACE_ALL, args)
> - 
>   #else	/* !LOCK_MGR_DEBUG */
>   #define LOCK_PRINT(where,lock,type)
>   #define LOCK_PRINT_AUX(where,lock,type)
>   #define XID_PRINT(where,xidentP)
>   #define XID_PRINT_AUX(where,xidentP)
> - #define LOCK_TPRINTF(lock, args...)
>   #endif	/* !LOCK_MGR_DEBUG */
>   
>   static char *lock_types[] = {
> --- 136,146 ----
> *************** LockRelease(LOCKMETHOD lockmethod, LOCKT
> *** 1200,1206 ****
>   	}
>   	else
>   	{
> ! 		LOCK_TPRINTF(lock, "LockRelease: no wakeup needed");
>   	}
>   
>   	SpinRelease(masterLock);
> --- 1193,1202 ----
>   	}
>   	else
>   	{
> ! 		if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
> ! 			 && (lock->tag.relId >= lockDebugOidMin)) \
> ! 			|| (lock->tag.relId == lockDebugRelation))
> ! 			TPRINTF(TRACE_ALL, "LockRelease: no wakeup needed");
>   	}
>   
>   	SpinRelease(masterLock);
> 
> 
> -- 
> Massimo Dal Zotto
> 
> +----------------------------------------------------------------------+
> |  Massimo Dal Zotto                email:  dz@cs.unitn.it             |
> |  Via Marconi, 141                 phone:  ++39-461-534251            |
> |  38057 Pergine Valsugana (TN)     www:  http://www.cs.unitn.it/~dz/  |
> |  Italy                            pgp:  finger dz@tango.cs.unitn.it  |
> +----------------------------------------------------------------------+
> 
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Wed, 9 Sep 1998 14:32:19 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Open portability issues
> 
> Open portability issues:
> 
> /usr/local should be searched for lib and include for all ports if present 
> (currently not working, I have libreadline there)

I actually us a flag to configure:

        --with-includes="/u/readline" \
        --with-libraries="/u/readline /usr/contrib/lib"

Should we be poking around in /usr/local by default?  Comments?

> 
> the stream functions on AIX need a size_t for addrlen's in fe-connect.c and pqcomm.c.

This has come up before.  AIX wants size_t for certain structures like
getsockname().  I believe the third parameter on AIX is size_t, while it
used to be int on my machine, but is not socklen_t.  Is this correct? 
The 'int' code works fine for me, but I can see why AIX is having a
problem, and perhaps it is time for configure to check on the various
types.

	getsockname(int s, struct sockaddr *name, socklen_t *namelen);

Can you confirm this?

> 
> lock.c still has an incompatible TPRINTF(flags, args...) definition

Massimo has fixed this.

> 
> the long long int printf format in int8.h is %lld on AIX
> 
> AIX 4.2.1 and 4.3.1 need one other simpler Makefile, another template
> and must not include dynloader.c

Done.  Files added.


> 
> PS: all unsigned char problems are gone. 
> keep it cidr not inet !!
> and no, the heaptuple.c fix did not fix the pg_class index problem
> sorry i am off to weekend now
> 
> begin 600 aix_42
> M05)/4%0Z8W)S"D-&3$%'4SHM<6-H87)S/7-I9VYE9" M<6UA>&UE;3TX,3DR
> M("UQ:&%L=#UW("UQ<W)C;7-G("UQ8VAE8VL]9&EV>F5R;R M<6QO;F=L;VYG
> M"E-(05)%1%],24(Z"D%,3#H*4U)#2%])3D,Z"E-20TA?3$E".@I54T5?3$]#
> K04Q%.FYO"D1,4U5&1DE8.BYS;PI91DQ!1U,Z+60*64%#0SH*0T,Z>&QC"D]#
> `
> end
> 
> begin 600 Makefile.aix4
> M34M?3D]?3$]21$52/2!T<G5E"@HE)"A$3%-51D9)6"DZ("4N;PH))"A,1"D@
> J+4<@+6)E>'!A;&P@+6)N;V5N=')Y("UO("1 ("0\("0H3$1&3$%'4RD*
> `
> end
> 
> begin 600 .similar
> M86QP:&$M9&5C+6]S9CUA;'!H80IA;'!H82UU;FMN;W=N+6QI;G5X+6=N=3UL
> M:6YU>%]A;'!H80IH<'!A,2XQ+6AP+6AP=7@Q,"XR,#UH<'5X7V-C"FAP<&$Q
> M+C$M<W1R871U<RUS>7-V-#US=G(T"FDS.#8M;F5X="UN97AT<W1E<#,];F5X
> M='-T97 *:3,X-BUP8RUB<V1I,BXP/6)S9&E?,BXP"FDS.#8M<&,M8G-D:3(N
> M,3UB<V1I7S(N,0II,S@V+7!C+6)S9&DS+C ]8G-D:5\S+C *:3,X-BUP8RUL
> M:6YU>"UG;G4];&EN=7A?:3,X-@II,S@V+7!C+7-O;&%R:7,R+C8]<V]L87)I
> M<U]I,S@V7V=C8PII,S@V+7!C+7-U;F]S-3US;VQA<FES7VDS.#9?9V-C"FDS
> M.#8M=6YK;F]W;BUF<F5E8G-D/69R965B<V0*:3,X-BUU;FMN;W=N+6YE=&)S
> M9#UN971B<V0*:30X-BUP8RUL:6YU>"UG;G4];&EN=7A?:3,X-@II-3@V+7!C
> M+6QI;G5X+6=N=3UL:6YU>%]I,S@V"FDU.#8M<&,M<V-O,RXR=CUS8V\*:38X
> M-BUP8RUL:6YU>"UG;G4];&EN=7A?:3,X-@IM:7!S+7-G:2UI<FEX/6ER:7@U
> M"G!O=V5R<&,M:6)M+6%I>#,N,BXU/6%I>%\S,C4*<&]W97)P8RUI8FTM86EX
> M-"XQ+C0N,#UA:7A?-#$*<&]W97)P8RUI8FTM86EX-"XQ+C4N,#UA:7A?-#$*
> M<&]W97)P8RUI8FTM86EX-"XR+C$N,#UA:7A?-#(*<&]W97)P8RUI8FTM86EX
> M-"XS+C$N,#UA:7A?-#(*<&]W97)P8RUU;FMN;W=N+6QI;G5X+6=N=3UL:6YU
> M>%]P<&,*<W!A<F,M<W5N+7-O;&%R:7,]<V]L87)I<U]S<&%R8U]G8V,*<W!A
> M<F,M<W5N+7-U;F]S-#US=6YO<S1?9V-C"G-P87)C+7-U;BUS=6YO<S4]<V]L
> M87)I<U]S<&%R8U]G8V,*<W!A<F,M=6YK;F]W;BUL:6YU>"UG;G4];&EN=7A?
> &<W!A<F,*
> `
> end
> 
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Wed, 9 Sep 1998 14:47:41 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: Open portability issues
   > Open portability issues:
   > 
   > /usr/local should be searched for lib and include for all ports if present 
   > (currently not working, I have libreadline there)

   I actually us a flag to configure:

	   --with-includes="/u/readline" \
	   --with-libraries="/u/readline /usr/contrib/lib"

   Should we be poking around in /usr/local by default?  Comments?

No!  The configure options (including the /usr/local typical usage)
are clearly outlined in INSTALL and easy to use.  In fact, arbitrary
series of space-separated directories can be given as you illustrate.

The configuration stuff works fine now.  Why mung it up again?  If we
make searching /usr/local a default, we need a way to prevent that if
the wrong stuff is in /usr/local.  It makes sense to simply specify
where to look, document what to do, and be done.

Cheers,
Brook

Wed, 9 Sep 1998 14:09:56 -0600 (MDT)
Brook Milligan <brook@trillium.NMSU.Edu>
Re: [HACKERS] Re: Open portability issues
On Wed, 9 Sep 1998, Bruce Momjian wrote:

> > 
> > Open portability issues:
> > 
> > /usr/local should be searched for lib and include for all ports if present 
> > (currently not working, I have libreadline there)
> 
> I actually us a flag to configure:
> 
>         --with-includes="/u/readline" \
>         --with-libraries="/u/readline /usr/contrib/lib"
> 
> Should we be poking around in /usr/local by default?  Comments?

	No...unless someone can point me at a package that explicitly goes
out and looking /usr/local.  I've yet to have a problem with any package
I've installed not being able to find libraries and include files that are
installed in /usr/local ... if someone is having a problem, they should be
directed to look at *fixing* their system in the first place, as they are
definitely going to have more problems then just with PostgreSQL...


Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 


Thu, 10 Sep 1998 00:32:14 -0300 (ADT)
The Hermit Hacker <scrappy@hub.org>
Re: [HACKERS] Re: Open portability issues