Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Move MIN/MAX forward to that headers included by <sy...



details:   https://anonhg.NetBSD.org/src/rev/3e3c6231f24d
branches:  trunk
changeset: 332396:3e3c6231f24d
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Sep 19 17:27:55 2014 +0000

description:
Move MIN/MAX forward to that headers included by <sys/param.h> can use them.

diffstat:

 sys/sys/param.h |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 734c7a759cba -r 3e3c6231f24d sys/sys/param.h
--- a/sys/sys/param.h   Fri Sep 19 17:27:12 2014 +0000
+++ b/sys/sys/param.h   Fri Sep 19 17:27:55 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.460 2014/08/11 09:10:52 riz Exp $  */
+/*     $NetBSD: param.h,v 1.461 2014/09/19 17:27:55 matt Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -130,8 +130,13 @@
 #endif /* (MAXUPRC - 0) < CHILD_MAX */
 #endif /* !defined(MAXUPRC) */
 
+#define        MIN(a,b)        ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#define        MAX(a,b)        ((/*CONSTCOND*/(a)>(b))?(a):(b))
+
 /* More types and definitions used throughout the kernel. */
 #ifdef _KERNEL
+/* Macros for min/max. */
+
 #include <sys/cdefs.h>
 #include <sys/errno.h>
 #include <sys/time.h>
@@ -373,10 +378,6 @@
 #define        roundup2(x, m)  (((x) + (m) - 1) & ~((m) - 1))
 #define        powerof2(x)     ((((x)-1)&(x))==0)
 
-/* Macros for min/max. */
-#define        MIN(a,b)        ((/*CONSTCOND*/(a)<(b))?(a):(b))
-#define        MAX(a,b)        ((/*CONSTCOND*/(a)>(b))?(a):(b))
-
 /*
  * Constants for setting the parameters of the kernel memory allocator.
  *



Home | Main Index | Thread Index | Old Index