Re: [HACKERS] Open portability issues

Massimo Dal Zotto <dz@cs.unitn.it>

From: Massimo Dal Zotto <dz@cs.unitn.it>
To: hackers@postgreSQL.org (PostgreSQL Hackers), pgsql-patches@postgreSQL.org (Pgsql Patches)
Cc: andreas.zeugswetter@telecom.at (Andreas Zeugswetter)
Date: 1998-09-07T19:15:27Z
Lists: pgsql-hackers
> 
> 
> 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  |
+----------------------------------------------------------------------+