File: bool.h

package info (click to toggle)
xmlrpc-c 1.60.05-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,132 kB
  • sloc: ansic: 55,332; cpp: 13,541; sh: 3,321; makefile: 2,556; perl: 593; xml: 134
file content (22 lines) | stat: -rw-r--r-- 565 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* This takes the place of C99 stdbool.h, which at least some Windows
   compilers don't have.  (October 2005).

   One must not also include <stdbool.h>, because it might cause a name
   collision.
*/

#ifdef __cplusplus
/* bool has always been part of the C++ language */
#elif __STDC_VERSION__ >= 202311L
/* bool is part of the C23 standard */
#else
/* At least the GNU compiler defines __bool_true_false_are_defined */
#ifndef __bool_true_false_are_defined
#define __bool_true_false_are_defined
typedef enum {
    false = 0,
    true = 1
} bool;
#endif
#endif