spandsp: stdbool.h Source File

spandsp 0.0.6

stdbool.h
Go to the documentation of this file.
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#if !defined(__cplusplus)
37
38#define _Bool int
39#define bool int
40#define false 0
41#define true (!false)
42
43#else
44
45#define _Bool bool
46#define bool bool
47#define false false
48#define true true
49
50#endif
51
52/* Signal that all the definitions are present. */
53#define __bool_true_false_are_defined 1
54
55#endif