[news.software.nn] sys/types.h included multiple times when s-bsd4-2.h

apratt@atari.UUCP (Allan Pratt) (02/07/90)

I'm having trouble compiling nn patchlevel 10... I'm on s-bsd4-2.h
(which defines HAVE_MULTIGROUP), and sys/types.h is being included
twice: once outright in s-bsd4-2.h, and once by global.c, which
contains the following:

	#ifdef HAVE_MULTIGROUP
	#ifndef NGROUPS
	#include <sys/param.h>
	#endif
	...
	#endif

Unfortunately, my sys/param.h includes sys/types.h, which contains
typedefs and no guard against multiple inclusion.  Now, I could edit
sys/types.h, which I resist, or I could import NGROUPS into my config.h
or something (it's 8), or I could just forget about HAVE_MULTIGROUP in
s-bsd4-2.h.  I don't like any of these solutions, because they either
change what BSD distributes or what Kim Storm distributes.

Is there another alternative?

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

storm@texas.dk (Kim F. Storm) (02/09/90)

apratt@atari.UUCP (Allan Pratt) writes:

>... sys/types.h is being included twice: once outright in s-bsd4-2.h, 
>and once by global.c, which contains the following:

>	#ifndef NGROUPS
>	#include <sys/param.h>   (which includes types.h)
>	#endif

If this is a generic BSD4.2 problem then it should be fixed in s-bsd4-2.h.
I haven't heard about it before, so if other users running 4.2 have
not seen this problem, please speak up (E-mail answers only).

Otherwise, I suggest you create your own s- file based on s-bsd4-2.h
and includes param.h instead of types.h.  And if you give it a
suitable name you can send it to me for inclusion in the 6.4 release.

-- 
Kim F. Storm        storm@texas.dk        Tel +45 429 174 00
Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
	  No news is good news, but nn is better!