Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id HAA13967 for postgres-dist; Thu, 25 Nov 1993 07:53:54 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311251553.HAA13967@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from mailgzrz.TU-Berlin.DE (mailgzrz.TU-Berlin.DE [130.149.4.10]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id HAA13950 for <postgres@postgres.berkeley.edu>; Thu, 25 Nov 1993 07:43:18 -0800
Received: from marie.physik.TU-Berlin.DE by mailgzrz.TU-Berlin.DE (5.65c/ZRZ-MX)
          for <postgres@postgres.berkeley.edu>
	  id AA00242; Thu, 25 Nov 1993 16:38:55 +0100
Received: by marie.physik.tu-berlin.de (5.65c8/SMI-SVR4)
	id AA07151; Thu, 25 Nov 1993 16:38:40 +0100
Message-Id: <199311251538.AA07151@marie.physik.tu-berlin.de>
Subject: Re: Installation / Linux
Date: Thu, 25 Nov 93 0:47:26 MET
From: wpp@marie.physik.tu-berlin.de (Kai Petzke)
To: postgres@postgres.Berkeley.EDU
In-Reply-To: <9311242035.AA15471@gwdu03.gwdg.de>; from "Karl Eichwalder" at Nov 24, 93 9:35 pm
X-Mailer: ELM [version 2.3 PL11]
Content-Type: text
Content-Length: 1988
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Thu, 25 Nov 93 07:53:54 -0800
Resent-XMts: smtp


I CC: - ed my last reply to Karl Eichwalder also to the postgres
mailing list, but something apparently went wrong.  Let me have
another try, that anybody can see my reply - it is not very
interesting for non Linux people, though:

Hi,

> > Postgres is even available at the ftp server of your site: ftp.gwdg.de,
> > directory /pub/linux/linux2/databases/postgres.
> 
> i've taken it from there of course; but i thought it might be helpfull for you to know, that this archive came from sunsite resp. tsx-11 (gwdg.de is a mirror site).

Ok, ok, it was not a flame.  Luckily, all the postgres for Linux versions
on the various ftp servers around are identical.

> $ compiling storage/file/fd.c
> $ fd.c: In function `AssertLruRoom':
> $ fd.c:382: `OPEN_MAX' undeclared (first use this function)
> $ fd.c:382: (Each undeclared identifier is reported only once
> $ fd.c:382: for each function it appears in.)
> $ fd.c: In function `fileNameOpenFile':
> $ fd.c:539: `OPEN_MAX' undeclared (first use this function)
> $ fd.c: In function `AllocateFile':
> $ fd.c:800: `OPEN_MAX' undeclared (first use this function)
> $ make[1]: *** [/mnt/data/pub/postgres/obj.linux/storage/file/fd.o] Error 1
> $ make[1]: Leaving directory `/mnt/data/pub/postgres'
> $ done

The problem is the macro MAXFILES, which is defined as:

	#define MAXFILES	(NOFILE - RESERVE_FOR_LD)

in storage/file/fd.c.

NOFILE is defined in /usr/include/sys/param.h or <sys/param.h>:

	#define NOFILE		OPEN_MAX

OPEN_MAX is be defined in <linux/limits.h> (kernel 99p13r):

	#define OPEN_MAX	256

It is the maximum number of open file descripters a process may have.


At least with my include files, the following happens:

<sys/param.h> includes <limits.h>.  <limits.h> then includes <posix1_lim.h>,
but only if __USE_POSIX is set, which includes <linux/limits.h>.

This is likely to be a bug with the header files.

Quick and dirty recovery: include

	#include <linux/limits.h>

near the top of /usr/include/sys/param.h.


Kai

