File: ick_bool.h

package info (click to toggle)
intercal 30:0.30-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,044 kB
  • sloc: ansic: 8,936; sh: 1,274; yacc: 1,073; lex: 518; lisp: 460; makefile: 435; perl: 295
file content (28 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (4)
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
/*
 * Hide difference between compilers with the C99 bool type and those without.
 * The main reason this is desirable is so splint can do more rigorous checking
 * on bools. This also allows for compilers that define _Bool but not true or
 * false, etc.
 */

/*@-redef@ -incondefs*/
#ifndef __bool_true_false_are_defined
# if HAVE_STDBOOL_H >= 1
#  include <stdbool.h>
# else
#  if !defined(HAVE__BOOL) || HAVE__BOOL < 1
#   if HAVE_STDINT_H >= 1
#    include <stdint.h>
typedef int_fast8_t bool;
#   else
typedef int bool;
#   endif
#  else
typedef _Bool bool;
#  endif
#  define true 1
#  define false 0
#  define __bool_true_false_are_defined 1
# endif
#endif
/*@=redef =incondefs@*/