Module Name:    src
Committed By:   christos
Date:           Wed Jul 29 00:10:26 UTC 2015

Modified Files:
        src/include: Makefile
        src/sys/sys: Makefile pool.h types.h
Added Files:
        src/sys/sys: stdbool.h
Removed Files:
        src/include: stdbool.h

Log Message:
move stdbool.h to sys, reuire pool.h to include <sys/stdbool.h> for bool,
centralize definitions of bool, true, false, to <sys/stdbool.h>


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/include/Makefile
cvs rdiff -u -r1.5 -r0 src/include/stdbool.h
cvs rdiff -u -r1.154 -r1.155 src/sys/sys/Makefile
cvs rdiff -u -r1.78 -r1.79 src/sys/sys/pool.h
cvs rdiff -u -r0 -r1.1 src/sys/sys/stdbool.h
cvs rdiff -u -r1.91 -r1.92 src/sys/sys/types.h

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

Modified files:

Index: src/include/Makefile
diff -u src/include/Makefile:1.140 src/include/Makefile:1.141
--- src/include/Makefile:1.140	Tue Dec 10 20:24:08 2013
+++ src/include/Makefile	Tue Jul 28 20:10:26 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.140 2013/12/11 01:24:08 joerg Exp $
+#	$NetBSD: Makefile,v 1.141 2015/07/29 00:10:26 christos Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/4/94
 
 # Doing a make includes builds /usr/include
@@ -18,7 +18,7 @@ INCS=	a.out.h aio.h ar.h assert.h atomic
 	ndbm.h netconfig.h netdb.h netgroup.h nlist.h nl_types.h nsswitch.h \
 	paths.h pwd.h quota.h randomid.h ranlib.h re_comp.h regex.h regexp.h \
 	resolv.h res_update.h rmt.h sched.h search.h semaphore.h setjmp.h \
-	string.h sgtty.h signal.h spawn.h stab.h stdbool.h stddef.h stdio.h \
+	string.h sgtty.h signal.h spawn.h stab.h stddef.h stdio.h \
 	stdlib.h strings.h stringlist.h struct.h sysexits.h tar.h time.h \
 	ttyent.h tzfile.h ucontext.h ulimit.h unistd.h util.h utime.h utmp.h \
 	utmpx.h uuid.h vis.h wchar.h wctype.h wordexp.h

Index: src/sys/sys/Makefile
diff -u src/sys/sys/Makefile:1.154 src/sys/sys/Makefile:1.155
--- src/sys/sys/Makefile:1.154	Fri Jun 26 10:38:54 2015
+++ src/sys/sys/Makefile	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.154 2015/06/26 14:38:54 matt Exp $
+#	$NetBSD: Makefile,v 1.155 2015/07/29 00:10:25 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -37,8 +37,8 @@ INCS=	acct.h agpio.h aio.h ansi.h aout_m
 	sha2.h shm.h siginfo.h signal.h signalvar.h sigtypes.h \
 	sleepq.h socket.h \
 	socketvar.h sockio.h spawn.h specificdata.h stat.h \
-	statvfs.h syscall.h syscallargs.h sysctl.h stdarg.h stdint.h swap.h \
-	syncobj.h syslimits.h syslog.h \
+	statvfs.h syscall.h syscallargs.h sysctl.h stdarg.h stdbool.h \
+	stdint.h swap.h syncobj.h syslimits.h syslog.h \
 	tape.h termios.h time.h timeb.h timepps.h times.h \
 	timex.h tls.h trace.h tree.h tty.h ttychars.h ttycom.h \
 	ttydefaults.h ttydev.h types.h \
@@ -52,6 +52,7 @@ INCSYMLINKS=\
 	sys/fcntl.h /usr/include/fcntl.h \
 	sys/poll.h /usr/include/poll.h \
 	sys/stdarg.h /usr/include/stdarg.h \
+	sys/stdbool.h /usr/include/stdbool.h \
 	sys/stdint.h /usr/include/stdint.h \
 	sys/syslog.h /usr/include/syslog.h \
 	sys/termios.h /usr/include/termios.h \

Index: src/sys/sys/pool.h
diff -u src/sys/sys/pool.h:1.78 src/sys/sys/pool.h:1.79
--- src/sys/sys/pool.h:1.78	Tue Jul 28 08:32:44 2015
+++ src/sys/sys/pool.h	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pool.h,v 1.78 2015/07/28 12:32:44 maxv Exp $	*/
+/*	$NetBSD: pool.h,v 1.79 2015/07/29 00:10:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000, 2007 The NetBSD Foundation, Inc.
@@ -32,6 +32,8 @@
 
 #ifndef _SYS_POOL_H_
 #define _SYS_POOL_H_
+
+#include <sys/stdbool.h>
 #include <sys/stdint.h>
 
 struct pool_sysctl {

Index: src/sys/sys/types.h
diff -u src/sys/sys/types.h:1.91 src/sys/sys/types.h:1.92
--- src/sys/sys/types.h:1.91	Thu Dec 12 12:53:03 2013
+++ src/sys/sys/types.h	Tue Jul 28 20:10:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.91 2013/12/12 17:53:03 matt Exp $	*/
+/*	$NetBSD: types.h,v 1.92 2015/07/29 00:10:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993, 1994
@@ -204,11 +204,14 @@ typedef	int		psetid_t;
  * Boolean type definitions for the kernel environment.  User-space
  * boolean definitions are found in <stdbool.h>.
  */
+#ifndef __bool_true_false_are_defined
 #ifndef __cplusplus
 #define bool	_Bool
 #define true	1
 #define false	0
 #endif
+#define __bool_true_false_are_defined 1
+#endif
 
 /*
  * Deprecated Mach-style boolean_t type.  Should not be used by new code.

Added files:

Index: src/sys/sys/stdbool.h
diff -u /dev/null src/sys/sys/stdbool.h:1.1
--- /dev/null	Tue Jul 28 20:10:26 2015
+++ src/sys/sys/stdbool.h	Tue Jul 28 20:10:25 2015
@@ -0,0 +1,47 @@
+/*	$NetBSD: stdbool.h,v 1.1 2015/07/29 00:10:25 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of Wasabi Systems, Inc.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#ifndef _SYS_STDBOOL_H_
+#define	_SYS_STDBOOL_H_
+
+#ifndef __bool_true_false_are_defined
+#ifndef __cplusplus
+#define	bool	_Bool
+
+#define	true	1
+#define	false	0
+
+#endif /* __cplusplus */
+
+#define	__bool_true_false_are_defined	1
+#endif
+
+#endif /* _SYS_STDBOOL_H_ */

Reply via email to