stdbool.h revision 69356
165918Sasmodai/* 265918Sasmodai * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> 365918Sasmodai * All rights reserved. 465918Sasmodai * 565918Sasmodai * Redistribution and use in source and binary forms, with or without 665918Sasmodai * modification, are permitted provided that the following conditions 765918Sasmodai * are met: 865918Sasmodai * 1. Redistributions of source code must retain the above copyright 965918Sasmodai * notice, this list of conditions and the following disclaimer. 1065918Sasmodai * 2. Redistributions in binary form must reproduce the above copyright 1165918Sasmodai * notice, this list of conditions and the following disclaimer in the 1265918Sasmodai * documentation and/or other materials provided with the distribution. 1365918Sasmodai * 1465918Sasmodai * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1565918Sasmodai * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1665918Sasmodai * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1765918Sasmodai * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1865918Sasmodai * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1965918Sasmodai * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2065918Sasmodai * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2165918Sasmodai * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2265918Sasmodai * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2365918Sasmodai * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2465918Sasmodai * SUCH DAMAGE. 2565918Sasmodai * 2665918Sasmodai * $FreeBSD: head/include/stdbool.h 69356 2000-11-29 14:41:00Z asmodai $ 2765918Sasmodai */ 2865918Sasmodai 2965918Sasmodai/* This should be compliant with the ANSI C99 definition */ 3065918Sasmodai 3165918Sasmodai#ifndef _STDBOOL_H_ 3265918Sasmodai#define _STDBOOL_H_ 3365918Sasmodai 3469356Sasmodai#define __bool_true_false_are_defined 1 3565918Sasmodai 3665918Sasmodai/* And those constants must also be available as macros */ 3769356Sasmodai#define false 0 3869356Sasmodai#define true 1 3965918Sasmodai 4065918Sasmodai/* User visible type `bool' is provided as a macro which may be redefined */ 4165918Sasmodai#define bool _Bool 4265918Sasmodai#if __STDC_VERSION__ < 199901L 4365918Sasmodaitypedef int _Bool; /* not built into pre-C99 compilers */ 4465918Sasmodai#endif 4565918Sasmodai 4665918Sasmodai#endif /* _STDBOOL_H_ */ 47