🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.b
Article #7083

Re: closeall.c problem

#7083
From: Jean-Pierre Radley
Date: Sat, 25 Sep 1993 05:24
52 lines
2110 bytes
In article <1993Sep22.200314.881@esseye.si.com>,
Ken Jongsma <jongsma@tws4.si.com> wrote:
>I've been trying to compile the latest release of c-news on a 386
>that was recently upgraded from Xenix to SCO Dev. Edition.
>
>The make gets as far as compiling closeall.c and chokes. closeall.c
>makes reference to a variable called NOFILE that I can't find a
>definition for in any of the system or c-news .h files.
>

I just saw that one last night. The prior time I compiled Cnews was
with SCO's 3.2v4.0 Development System. Now I have 3.2v4.2, and you're
right, NOFILE appears in none of the header files.

The header file that closeall.c includes is sys/param.h, and there we now
see:

/*	The following represent the minimum and maximum values to
**	which the parameter NOFILES in the kernel master file may
**	be set.
*/

#define	NOFILES_MIN	60
#define	NOFILES_MAX	11000

Henry's build script will need a minor change. But for the moment,
to get a recompilation done last night, I just checked what I used for
NOFILES (plural!) when running /etc/conf/cf.d/configure. It was 60, and I
just used brute force in closeall.c:


#include <sys/param.h>

/* JPRadley: */
#ifndef NOFILE
#define NOFILE 60
#endif

void
closeall(leavestd)
int leavestd;
{
	register int i;

	for (i = (leavestd? 3: 0); i < NOFILE; i++)
		close(i);
}


Ain't standards grand, etc., etc...
-- 
Jean-Pierre Radley   Unix in NYC   XC custodian   jpr@jpr.com   CIS: 72160.1341
Technical Details
Message-ID: <CDw9oI.J07@jpradley.jpr.com>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!murphy.com!jpradley!jpr
References: <1993Sep22.200314.881@esseye.si.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d020,d1a056254efdd821
X-Google-Attributes: gid10d020,public
X-Google-Thread: 1122ea,befb00a719502f2c,start
X-Google-Attributes: gid1122ea,public
X-Google-ArrivalTime: 1993-09-25 00:53:28 PST
Newsgroups: news.software.b,biz.sco.general
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!murphy.com!jpradley!jpr
From: jpr@jpradley.jpr.com (Jean-Pierre Radley)
Subject: Re: closeall.c problem
Organization: Unix in NYC
Date: Sat, 25 Sep 1993 05:24:17 GMT
Message-ID: <CDw9oI.J07@jpradley.jpr.com>
References: <1993Sep22.200314.881@esseye.si.com>
Lines: 52