Module Name:    src
Committed By:   christos
Date:           Sat Jun 20 17:03:25 UTC 2009

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

Log Message:
fix for non NetBSD systems


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/usr.sbin/sup/source/c.h:1.7
--- src/usr.sbin/sup/source/c.h:1.6	Fri Jun 19 19:36:41 2009
+++ src/usr.sbin/sup/source/c.h	Sat Jun 20 13:03:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: c.h,v 1.6 2009/06/19 23:36:41 dyoung Exp $	*/
+/*	$NetBSD: c.h,v 1.7 2009/06/20 17:03:25 christos Exp $	*/
 
 /*
  * Copyright (c) 1991 Carnegie Mellon University
@@ -62,11 +62,20 @@
 #ifndef	FALSE
 #define FALSE	0
 #endif	/* FALSE */
+
 #ifndef	TRUE
 #define TRUE	1
 #endif	/* TRUE */
 
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifdef __arraycount
 #define sizeofA(array)	__arraycount(array)
+#else
+#define sizeofA(array) (sizeof(array)/sizeof(array[0]))
+#endif
 
 #ifndef __unused
 #ifndef __GNUC__

Reply via email to