Subject: misc/4473: machine/limits.h can get included multiple times
To: None <>
From: Mika Nystrom <>
List: netbsd-bugs
Date: 11/12/1997 04:28:21
>Number:         4473
>Category:       misc
>Synopsis:       machine/limits.h can get included multiple times
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 12 04:35:01 1997
>Originator:     Mika Nystrom
   Department of Computer Science, California Institute of Technology
>Release:        Nov. 1, 1997
System: NetBSD 1.3_ALPHA NetBSD 1.3_ALPHA (VARESE) #1: Sat Nov 1 22:44:13 PST 1997 mika@varese:/usr/src/sys/arch/i386/compile/VARESE i386

    A user of the system sent me this email:
	strange includes in C programs that refer to machine/limits.h

        easy fix: bracket machine/limits.h with #ifndef _MACHINE_LIMITS_H,
   but perhaps there's some design issue involved here that I am not 
aware of.
>> Why are you including <machine/limits.h>?  This makes your code non-
>> portable, since ANSI C specifies <limits.h>, not <machine/limits.h>.
>> If you include <limits.h>, that will grab <machine/limits.h> for you,
>> keep you on the right side of ANSI, and do the check for double
>> includes, all at once!
>I'm not.  "I" am using /usr/include/arpa/inet.h, which includes
>/usr/include/sys/param.h, which includes the miscreant file in
>However, simply rearranging include files in the original file seems
>to have bought me something, so my complaint is no longer urgent.