Module Name: src
Committed By: riastradh
Date: Mon Sep 3 16:54:55 UTC 2018
Modified Files:
src/sys/lib/libkern: Makefile.libkern
src/sys/lib/libkern/arch/mips: Makefile.inc
src/sys/lib/libkern/arch/usermode: Makefile.inc
src/sys/lib/libkern/arch/vax: Makefile.inc
Added Files:
src/sys/lib/libkern: uimax.c uimin.c
Removed Files:
src/sys/lib/libkern: max.c min.c
Log Message:
Rename min.c -> uimin.c, max.c -> uimax.c in libkern.
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/lib/libkern/Makefile.libkern
cvs rdiff -u -r1.7 -r0 src/sys/lib/libkern/max.c src/sys/lib/libkern/min.c
cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/uimax.c \
src/sys/lib/libkern/uimin.c
cvs rdiff -u -r1.23 -r1.24 src/sys/lib/libkern/arch/mips/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/usermode/Makefile.inc
cvs rdiff -u -r1.24 -r1.25 src/sys/lib/libkern/arch/vax/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/lib/libkern/Makefile.libkern
diff -u src/sys/lib/libkern/Makefile.libkern:1.42 src/sys/lib/libkern/Makefile.libkern:1.43
--- src/sys/lib/libkern/Makefile.libkern:1.42 Sun Jul 8 17:54:42 2018
+++ src/sys/lib/libkern/Makefile.libkern Mon Sep 3 16:54:54 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.libkern,v 1.42 2018/07/08 17:54:42 christos Exp $
+# $NetBSD: Makefile.libkern,v 1.43 2018/09/03 16:54:54 riastradh Exp $
#
# Variable definitions for libkern.
@@ -61,7 +61,7 @@ SRCS+= ppath_kmem_alloc.c
SRCS+= strsep.c strstr.c
SRCS+= strlcpy.c strlcat.c
-SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c
+SRCS+= imax.c imin.c lmax.c lmin.c uimax.c uimin.c ulmax.c ulmin.c
SRCS+= memmove.c
SRCS+= strchr.c strrchr.c
SRCS+= memcmp.c memmem.c
Index: src/sys/lib/libkern/arch/mips/Makefile.inc
diff -u src/sys/lib/libkern/arch/mips/Makefile.inc:1.23 src/sys/lib/libkern/arch/mips/Makefile.inc:1.24
--- src/sys/lib/libkern/arch/mips/Makefile.inc:1.23 Wed Jan 20 18:13:40 2010
+++ src/sys/lib/libkern/arch/mips/Makefile.inc Mon Sep 3 16:54:54 2018
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.23 2010/01/20 18:13:40 pgoyette Exp $
+# $NetBSD: Makefile.inc,v 1.24 2018/09/03 16:54:54 riastradh Exp $
#
# There are likely more that we will notice when we go native
-NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c
+NO_SRCS+= imax.c imin.c lmax.c lmin.c uimax.c uimin.c ulmax.c ulmin.c
NO_SRCS+= __main.c
SRCS+= memchr.c memcmp.c random.c scanc.c \
Index: src/sys/lib/libkern/arch/usermode/Makefile.inc
diff -u src/sys/lib/libkern/arch/usermode/Makefile.inc:1.3 src/sys/lib/libkern/arch/usermode/Makefile.inc:1.4
--- src/sys/lib/libkern/arch/usermode/Makefile.inc:1.3 Fri Aug 14 19:23:55 2009
+++ src/sys/lib/libkern/arch/usermode/Makefile.inc Mon Sep 3 16:54:55 2018
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile.inc,v 1.3 2009/08/14 19:23:55 dsl Exp $
+# $NetBSD: Makefile.inc,v 1.4 2018/09/03 16:54:55 riastradh Exp $
#
# There are likely more that we will notice when we go native
-NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c
+NO_SRCS+= imax.c imin.c lmax.c lmin.c uimax.c uimin.c ulmax.c ulmin.c
NO_SRCS+= __main.c strlen.c strcmp.c
Index: src/sys/lib/libkern/arch/vax/Makefile.inc
diff -u src/sys/lib/libkern/arch/vax/Makefile.inc:1.24 src/sys/lib/libkern/arch/vax/Makefile.inc:1.25
--- src/sys/lib/libkern/arch/vax/Makefile.inc:1.24 Mon Mar 15 11:46:49 2010
+++ src/sys/lib/libkern/arch/vax/Makefile.inc Mon Sep 3 16:54:55 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.24 2010/03/15 11:46:49 uwe Exp $
+# $NetBSD: Makefile.inc,v 1.25 2018/09/03 16:54:55 riastradh Exp $
#
# The rest of the lib routines are in machine/macros.h
#
@@ -7,5 +7,5 @@ SRCS+= blkcpy.S blkset.S bswap16.S bswap
SRCS+= random.S
SRCS+= udiv.S urem.S
-NO_SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c
+NO_SRCS+= imax.c imin.c lmax.c lmin.c uimax.c uimin.c ulmax.c ulmin.c
NO_SRCS+= scanc.c skpc.c
Added files:
Index: src/sys/lib/libkern/uimax.c
diff -u /dev/null src/sys/lib/libkern/uimax.c:1.1
--- /dev/null Mon Sep 3 16:54:55 2018
+++ src/sys/lib/libkern/uimax.c Mon Sep 3 16:54:54 2018
@@ -0,0 +1,41 @@
+/* $NetBSD: uimax.c,v 1.1 2018/09/03 16:54:54 riastradh Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1991 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
+ */
+
+#define LIBKERN_INLINE
+#include <lib/libkern/libkern.h>
+
+unsigned int
+uimax(unsigned int a, unsigned int b)
+{
+ return (a > b ? a : b);
+}
Index: src/sys/lib/libkern/uimin.c
diff -u /dev/null src/sys/lib/libkern/uimin.c:1.1
--- /dev/null Mon Sep 3 16:54:55 2018
+++ src/sys/lib/libkern/uimin.c Mon Sep 3 16:54:54 2018
@@ -0,0 +1,41 @@
+/* $NetBSD: uimin.c,v 1.1 2018/09/03 16:54:54 riastradh Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1991 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
+ */
+
+#define LIBKERN_INLINE
+#include <lib/libkern/libkern.h>
+
+unsigned int
+uimin(unsigned int a, unsigned int b)
+{
+ return (a < b ? a : b);
+}