🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.b
Article #7084

Re: closeall.c problem

#7084
From: Bill Campbell
Date: Sat, 25 Sep 1993 17:17
59 lines
3059 bytes
In <CDw9oI.J07@jpradley.jpr.com> jpr@jpradley.jpr.com (Jean-Pierre Radley) writes:

: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.

It's funny how this stuff comes around.  I ran across this NOFILE
definition in several things I compiled yesterday (gnu-make, and
flexfax in particular).  As JP pointed out, there are references
to NOFILES in sys/param.h, but no definition of NOFILE.  NOFILE
is referenced in <sys/socket.h> and <tam/tam.h> in comments, but
it's not defined anywhere in the /usr/include headers.

My fix was to modify sys/param.h with the enclosed patch.  I put
the modified file in /usr/local/include/sys/param.h and use
-I/usr/local/include in CFLAGS to make the compiler look there
before it searches /usr/include (this isn't really necessary
with gcc, but it doesn't hurt either).  Putting it in a separate
directory protects it when I install a DevSys update.

Patch for sys/param.h
*** /tmp/tmp121115	Sat Sep 25 10:01:06 1993
--- /tmp/tmp221115	Sat Sep 25 10:01:06 1993
***************
*** 58,63 ****
--- 58,70 ----
  #define	NOFILES_MIN	60
  #define	NOFILES_MAX	11000
  
+ #ifndef	NOFILES			/* { */
+ #	define NOFILES NOFILES_MAX
+ #endif				/* } NOFILES */
+ #ifndef	NOFILE			/* { */
+ #	define NOFILE NOFILES
+ #endif				/* } NOFILE */
+ 
  /*	The following represents the maximum value to which
  **	the parameter NGROUPS in the kernel master file may be set.
  **

This patch will define NOFILES and NOFILE if someone else hasn't
done it first.

Bill
-- 
INTERNET:  bill@Celestial.COM   Bill Campbell; Celestial Software
UUCP:   ...!thebes!camco!bill   8545 SE 68th Street
             uunet!camco!bill   Mercer Island, WA 98040; (206) 947-5591
SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
Technical Details
Message-ID: <1993Sep25.171748.973@Celestial.COM>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!mdisea!uw-coco!nwnexus!camco1!bill
References: <1993Sep22.200314.881@esseye.si.com> <CDw9oI.J07@jpradley.jpr.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
X-Google-Attributes: gid1122ea,public
X-Google-ArrivalTime: 1993-09-25 16:00:32 PST
Newsgroups: news.software.b,biz.sco.general
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!mdisea!uw-coco!nwnexus!camco1!bill
From: bill@Celestial.COM (Bill Campbell)
Subject: Re: closeall.c problem
Organization: Celestial Software, Mercer Island, WA
Date: Sat, 25 Sep 1993 17:17:48 GMT
Message-ID: <1993Sep25.171748.973@Celestial.COM>
References: <1993Sep22.200314.881@esseye.si.com> <CDw9oI.J07@jpradley.jpr.com>
Lines: 59