QNX4-Patch

From: "Tegge, Bernd" <tegge(at)repas-aeg(dot)de>
To: pgsql-ports(at)postgresql(dot)org
Subject: QNX4-Patch
Date: 2001-11-06 11:21:46
Message-ID: 5.1.0.14.0.20011106102458.01d41ec0@dragon.dr.repas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

I have tried to build the 7.2 beta from cvs on QNX4. Found the following
problems :
MaxBackends not defined in semaphore test program.

*** tstsem.c Sun Nov 4 19:51:26 2001
--- tstsem.c.new Sun Nov 4 19:52:58 2001
***************
*** 26,31 ****
--- 26,33 ----
#define SEMMAX 16
#define OPSMAX 1

+ int MaxBackends = SEMMAX;
+
static int semid;

static void

Number of necessary semaphores in sem.c not consistent with
.../storage/lmgr/proc.c. IMHO, it would be better to change the macro
PROC_SEM_MAP_ENTRIES in proc.h to "((maxBackends+1)/PROC_NSEMS_PER_SET+1)"
instead. Otherwise the darwin port has a similar problem.

*** sem.c Sun Nov 4 19:53:22 2001
--- sem.c.new Sun Nov 4 19:52:46 2001
***************
*** 175,179 ****
return fd;
/* The size may only be set once. Ignore errors. */
! nsets = PROC_SEM_MAP_ENTRIES(MaxBackends);
sem_info_size = sizeof(struct sem_info) + (nsets - 1) *
sizeof(struct sem_set_info);
ltrunc(fd, sem_info_size, SEEK_SET);
--- 175,179 ----
return fd;
/* The size may only be set once. Ignore errors. */
! nsets = PROC_SEM_MAP_ENTRIES(MaxBackends + 1);
sem_info_size = sizeof(struct sem_info) + (nsets - 1) *
sizeof(struct sem_set_info);
ltrunc(fd, sem_info_size, SEEK_SET);

--
Bernd Tegge mailto:tegge(at)repas-aeg(dot)de
Tel: ++49-511-87449-12 repas AEG Automation GmbH
Fax: ++49-511-87449-20 GS Hannover, Germany

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2001-11-06 19:04:40 Re: QNX4-Patch
Previous Message H Jeremy Bockholt 2001-11-06 00:02:13 Re: PostgreSQL v7.1.3 fails to build on Irix 6.5.13m