Module Name: src Committed By: uebayasi Date: Sat Aug 29 14:07:46 UTC 2015
Modified Files: src/sys/conf: Makefile.kern.inc files src/sys/sys: param.h src/usr.bin/config: defs.h gram.y mkmakefile.c Log Message: Convert MAXUSERS, take 2. Define MAXUSERS in opt_param.h and include it from sys/param.h, for more accurate dependency. Don't define -DMAXUSERS and add it to ${CPPFLAGS}. config(5)'s "maxusers" syntax doesn't change. (The version just before revert was OK, but I had something bad in my obj dirs.) To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.1138 -r1.1139 src/sys/conf/files cvs rdiff -u -r1.485 -r1.486 src/sys/sys/param.h cvs rdiff -u -r1.69 -r1.70 src/usr.bin/config/defs.h cvs rdiff -u -r1.48 -r1.49 src/usr.bin/config/gram.y cvs rdiff -u -r1.44 -r1.45 src/usr.bin/config/mkmakefile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.202 src/sys/conf/Makefile.kern.inc:1.203 --- src/sys/conf/Makefile.kern.inc:1.202 Sat Aug 29 07:33:18 2015 +++ src/sys/conf/Makefile.kern.inc Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.202 2015/08/29 07:33:18 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.203 2015/08/29 14:07:45 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -62,7 +62,7 @@ S!= cd ../../../..; pwd ## INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \ -I$S -nostdinc -CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT +CPPFLAGS+= ${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT CPPFLAGS+= -std=gnu99 DEFCOPTS?= -O2 COPTS?= ${DEFCOPTS} Index: src/sys/conf/files diff -u src/sys/conf/files:1.1138 src/sys/conf/files:1.1139 --- src/sys/conf/files:1.1138 Sat Aug 29 07:33:18 2015 +++ src/sys/conf/files Sat Aug 29 14:07:45 2015 @@ -1,7 +1,7 @@ -# $NetBSD: files,v 1.1138 2015/08/29 07:33:18 uebayasi Exp $ +# $NetBSD: files,v 1.1139 2015/08/29 14:07:45 uebayasi Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 -version 20150820 +version 20150830 # # device classes @@ -17,6 +17,7 @@ devclass bus # options understood by the machine-independent part of the kernel # (note, these are case-sensitive) # +defparam opt_param.h MAXUSERS defflag INSECURE defflag KMEMSTATS defflag KTRACE Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.485 src/sys/sys/param.h:1.486 --- src/sys/sys/param.h:1.485 Sat Aug 29 07:33:18 2015 +++ src/sys/sys/param.h Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.485 2015/08/29 07:33:18 uebayasi Exp $ */ +/* $NetBSD: param.h,v 1.486 2015/08/29 14:07:45 uebayasi Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -39,6 +39,10 @@ #ifndef _SYS_PARAM_H_ #define _SYS_PARAM_H_ +#ifdef _KERNEL_OPT +#include "opt_param.h" +#endif + /* * Historic BSD #defines -- probably will remain untouched for all time. */ Index: src/usr.bin/config/defs.h diff -u src/usr.bin/config/defs.h:1.69 src/usr.bin/config/defs.h:1.70 --- src/usr.bin/config/defs.h:1.69 Sat Aug 29 07:33:18 2015 +++ src/usr.bin/config/defs.h Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.69 2015/08/29 07:33:18 uebayasi Exp $ */ +/* $NetBSD: defs.h,v 1.70 2015/08/29 14:07:45 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -107,7 +107,7 @@ extern const char *progname; * The next two lines define the current version of the config(1) binary, * and the minimum version of the configuration files it supports. */ -#define CONFIG_VERSION 20150820 +#define CONFIG_VERSION 20150830 #define CONFIG_MINVERSION 0 /* Index: src/usr.bin/config/gram.y diff -u src/usr.bin/config/gram.y:1.48 src/usr.bin/config/gram.y:1.49 --- src/usr.bin/config/gram.y:1.48 Sat Aug 29 02:54:07 2015 +++ src/usr.bin/config/gram.y Sat Aug 29 14:07:45 2015 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: gram.y,v 1.48 2015/08/29 02:54:07 uebayasi Exp $ */ +/* $NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: gram.y,v 1.48 2015/08/29 02:54:07 uebayasi Exp $"); +__RCSID("$NetBSD: gram.y,v 1.49 2015/08/29 14:07:45 uebayasi Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -760,7 +760,13 @@ select_options: ; select_maxusers: - MAXUSERS int32 { setmaxusers($2); } + MAXUSERS int32 { + char str[32]; + + setmaxusers($2); + snprintf(str, sizeof(str), "%d", $2); + addoption(intern("MAXUSERS"), intern(str)); + } ; select_ident: Index: src/usr.bin/config/mkmakefile.c diff -u src/usr.bin/config/mkmakefile.c:1.44 src/usr.bin/config/mkmakefile.c:1.45 --- src/usr.bin/config/mkmakefile.c:1.44 Sat Aug 29 07:33:18 2015 +++ src/usr.bin/config/mkmakefile.c Sat Aug 29 14:07:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mkmakefile.c,v 1.44 2015/08/29 07:33:18 uebayasi Exp $ */ +/* $NetBSD: mkmakefile.c,v 1.45 2015/08/29 14:07:45 uebayasi Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: mkmakefile.c,v 1.44 2015/08/29 07:33:18 uebayasi Exp $"); +__RCSID("$NetBSD: mkmakefile.c,v 1.45 2015/08/29 14:07:45 uebayasi Exp $"); #include <sys/param.h> #include <ctype.h> @@ -276,7 +276,6 @@ emitdefs(FILE *fp) s ? "\"" : ""); } putc('\n', fp); - fprintf(fp, "PARAM=-DMAXUSERS=%d\n", maxusers); fprintf(fp, "MACHINE=%s\n", machine); const char *subdir = "";