From b60c57da2db112c9fe1b0fca0ee411078325f70d Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Fri, 2 Feb 2001 18:21:59 +0000
Subject: [PATCH] Apply patches for QNX from Maurizio

---
 src/backend/port/qnx4/sem.c       | 4 ++--
 src/include/storage/s_lock.h      | 4 ++--
 src/interfaces/ecpg/preproc/pgc.l | 7 ++++++-
 src/interfaces/python/README      | 4 ++--
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/backend/port/qnx4/sem.c b/src/backend/port/qnx4/sem.c
index bcd784e6c21..f339e16973a 100644
--- a/src/backend/port/qnx4/sem.c
+++ b/src/backend/port/qnx4/sem.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.3 2000/04/12 17:15:30 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.4 2001/02/02 18:21:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -26,7 +26,7 @@
 
 
 #define SETMAX	((MAXBACKENDS + PROC_NSEMS_PER_SET - 1) / PROC_NSEMS_PER_SET)
-#define SEMMAX	(PROC_NSEMS_PER_SET)
+#define SEMMAX	(PROC_NSEMS_PER_SET+1)
 #define OPMAX	8
 
 #define MODE	0700
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 947e16352ba..33dc5b62265 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.86 2001/01/24 19:43:28 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.87 2001/02/02 18:21:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -112,7 +112,7 @@ extern void s_lock_sleep(unsigned spins, int microsec,
  */
 
 
-#if defined(__i386__)
+#if defined(__i386__) && !defined(__QNX__)
 #define TAS(lock) tas(lock)
 
 static __inline__ int
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index d33c71bdec5..1467f67b9d0 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.73 2001/01/24 19:43:29 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.74 2001/02/02 18:21:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,6 +35,11 @@
 #undef yywrap
 #endif /* yywrap */
 
+#ifdef __QNX__
+/* For some reason, QNX needs this, bjm 2001-02-02 */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
 #define YY_NO_UNPUT
 
 extern YYSTYPE yylval;
diff --git a/src/interfaces/python/README b/src/interfaces/python/README
index 0637d8827cd..b51b18b8eb7 100644
--- a/src/interfaces/python/README
+++ b/src/interfaces/python/README
@@ -1,11 +1,11 @@
 
-PyGreSQL - v2.5: PostgreSQL module for Python
+PyGreSQL - v3.1: PostgreSQL module for Python
 ==============================================
 
 0. Copyright notice
 ===================
 
-  PyGreSQL, version 2.5
+  PyGreSQL, version 3.1
   A Python interface for PostgreSQL database.
   Written by D'Arcy J.M. Cain, darcy@druid.net<BR>
   Based heavily on code written by Pascal Andre, andre@chimay.via.ecp.fr.
-- 
GitLab