Module Name:    src
Committed By:   dyoung
Date:           Fri Jun 19 23:36:42 UTC 2009

Modified Files:
        src/usr.sbin/sup/source: c.h

Log Message:
Use the definition in <sys/param.h> instead of redefining MAX().
(Used to work because the redefinition was identical to the original
definition, but no longer.)

While I'm here, define sizeofA() in terms of __arraycount() from
<sys/cdefs.h>.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sup/source/c.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sup/source/c.h
diff -u src/usr.sbin/sup/source/c.h:1.5 src/usr.sbin/sup/source/c.h:1.6
--- src/usr.sbin/sup/source/c.h:1.5	Thu Dec 20 20:12:12 2007
+++ src/usr.sbin/sup/source/c.h	Fri Jun 19 23:36:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: c.h,v 1.5 2007/12/20 20:12:12 christos Exp $	*/
+/*	$NetBSD: c.h,v 1.6 2009/06/19 23:36:41 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1991 Carnegie Mellon University
@@ -56,7 +56,8 @@
 #ifndef	_C_INCLUDE_
 #define	_C_INCLUDE_
 
-#define	MAX(a,b) (((a)>(b))?(a):(b))
+#include <sys/cdefs.h>
+#include <sys/param.h>
 
 #ifndef	FALSE
 #define FALSE	0
@@ -65,7 +66,7 @@
 #define TRUE	1
 #endif	/* TRUE */
 
-#define sizeofA(array)	(sizeof(array)/sizeof(array[0]))
+#define sizeofA(array)	__arraycount(array)
 
 #ifndef __unused
 #ifndef __GNUC__

Reply via email to