File: stdbool.h

package info (click to toggle)
sudo 1.9.17p2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,624 kB
  • sloc: ansic: 114,008; sh: 13,621; makefile: 9,805; yacc: 2,608; lex: 1,574; perl: 366; python: 362; sed: 265
file content (44 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */

/*
 * Written by Marc Espie, September 25, 1999
 * Public domain.
 */

#ifndef	COMPAT_STDBOOL_H
#define	COMPAT_STDBOOL_H

#ifndef __cplusplus

#if (defined(HAVE__BOOL) && HAVE__BOOL > 0) || defined(lint)
/* Support for _C99: type _Bool is already built-in. */
#define false	0
#define true	1

#else
/* `_Bool' type must promote to `int' or `unsigned int'. */
typedef enum {
	false = 0,
	true = 1
} _Bool;

/* And those constants must also be available as macros. */
#define	false	false
#define	true	true

#endif

/* User visible type `bool' is provided as a macro which may be redefined */
#define bool _Bool

#else /* __cplusplus */
#define _Bool 	bool
#define bool 	bool
#define false 	false
#define true 	true
#endif /* __cplusplus */

/* Inform that everything is fine */
#define __bool_true_false_are_defined 1

#endif /* COMPAT_STDBOOL_H */