🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1302

NGROUPS_MAX problem in make-3.62.30

#1302
From: Kaveh R. Ghazi
Date: Thu, 21 Jan 1993 23:22
35 lines
1660 bytes
	I had a problem with NGROUPS_MAX in the file job.c in make-3.62.30
on a Tek XD88/10 running UTekV 3.2e.

	The problem is that it is defined to 0 in <sys/limits.h> which causes
a warning during the compile:
'"job.c", line 850: warning: Negative or zero array size'

	Since sysconf(_SC_NGROUPS_MAX) returns 16 and the value of NGROUP in
<sys/param.h> is also 16, I added a little code to #undef NGROUPS_MAX if it
equals zero so those other methods of determining the max # of groups will
be utilized in job.c.

	Here is the context diff:
diff -c job.c~ job.c
*** job.c~      Tue Jan 19 00:32:39 1993
--- job.c       Thu Jan 21 22:50:34 1993
***************
*** 28,33 ****
--- 28,38 ----
  /* Default shell to use.  */
  char default_shell[] = "/bin/sh";
  
+ /* If NGROUPS_MAX == 0 then try other methods for finding max # groups.  */
+ #if defined(NGROUPS_MAX) && (NGROUPS_MAX == 0)
+ #undef NGROUPS_MAX
+ #endif /* NGROUPS_MAX == 0 */
+ 
  #ifndef       NGROUPS_MAX
  #ifdef        POSIX
  #define       GET_NGROUPS_MAX sysconf (_SC_NGROUPS_MAX)

		--Kaveh
--
Kaveh R. Ghazi			CAIP Center, Rutgers University.
ghazi@caip.rutgers.edu		rutgers!caip.rutgers.edu!ghazi
Technical Details
Message-ID: <9301212258.AA18867@caip.rutgers.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!caip.rutgers.edu!ghazi

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!caip.rutgers.edu!ghazi
From: ghazi@caip.rutgers.edu (Kaveh R. Ghazi)
Newsgroups: gnu.utils.bug
Subject: NGROUPS_MAX problem in make-3.62.30
Date: 21 Jan 1993 18:22:48 -0500
Organization: GNUs Not Usenet
Lines: 36
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-utils@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9301212258.AA18867@caip.rutgers.edu>