Subject: lib/205: MIN & MAX should be ifdef'd for user code in sys/param.h
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 04/06/1994 15:20:06
>Number:         205
>Category:       lib
>Synopsis:       MIN & MAX should be ifdef'd for user code in sys/param.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Library Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Apr  6 15:20:04 1994
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        
>Environment:
	
System: NetBSD ed209 0.9a ED209#0 i386

Machine: i386
>Description:
	After too many warnings from compilation of various sources, I've
	come to the conclusion that MIN & MAX should be ifdef'd for user
	code in sys/param.h.
>How-To-Repeat:
	
>Fix:
*** sys/param.h-	Thu Jan 13 11:45:26 1994
--- sys/param.h	Fri Apr  1 03:06:52 1994
***************
*** 185,192 ****
--- 185,196 ----
  #define	MIN(a,b) min((a), (b))
  #define	MAX(a,b) max((a), (b))
  #else
+ #ifndef MIN
  #define	MIN(a,b) (((a)<(b))?(a):(b))
+ #endif
+ #ifndef MAX
  #define	MAX(a,b) (((a)>(b))?(a):(b))
+ #endif
  #endif
  
  /*
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------