Re: [HACKERS] Open portability issues - Mailing list pgsql-hackers

From Massimo Dal Zotto
Subject Re: [HACKERS] Open portability issues
Date
Msg-id 199809071915.VAA00986@nikita.wizard.net
Whole thread Raw
In response to Open portability issues  (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>)
Responses Re: [HACKERS] Open portability issues  (Bruce Momjian <maillist@candle.pha.pa.us>)
List 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  |
+----------------------------------------------------------------------+

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] SIGSEGV in 'select * from pg_user'
Next
From: David Hartwig
Date:
Subject: Re: [INTERFACES] Re: DELETE FROM TABLE doesn't work (AGAIN)