1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * stdbool.h - A version for systems which lack their own stdbool.h
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2003 Steve Underwood
9  *
10  * All rights reserved.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 2.1,
14  * as published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 /*! \file */
27 
28 
29 /*
30  * ISO C Standard:  7.16  Boolean type and values  <stdbool.h>
31  */
32 
33 #if !defined(_STDBOOL_H)
34 #define _STDBOOL_H
35 
36 #ifdef _MSC_VER
37 #pragma warning (disable: 4005)
38 #endif
39 
40 #if !defined(__cplusplus)
41 
42 #ifndef _MSC_VER
43 typedef int     _Bool;
44 #endif
45 typedef int     bool;
46 #define false   0
47 #define true    (!false)
48 
49 #else
50 
51 typedef bool    _Bool;
52 #define false   false
53 #define true    true
54 
55 #endif
56 
57 #ifdef _MSC_VER
58 #pragma warning (default: 4005)
59 #endif
60 
61 /* Signal that all the definitions are present.  */
62 #define __bool_true_false_are_defined   1
63 
64 #endif
65