Ruby
3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
include
ruby
internal
stdbool.h
Go to the documentation of this file.
1
#ifndef RBIMPL_STDBOOL_H
/*-*-C++-*-vi:se ft=cpp:*/
2
#define RBIMPL_STDBOOL_H
23
#include "ruby/internal/config.h"
24
25
#if defined(__bool_true_false_are_defined)
26
#
/* Take that. */
27
28
#elif defined(__cplusplus)
29
#
/* bool is a keyword in C++. */
30
# if defined(HAVE_STDBOOL_H) && (__cplusplus >= 201103L)
31
# include <cstdbool>
32
# endif
33
#
34
# ifndef __bool_true_false_are_defined
35
# define __bool_true_false_are_defined
36
# endif
37
38
#elif defined(HAVE_STDBOOL_H)
39
#
/* Take stdbool.h definition. */
40
# include <
stdbool.h
>
41
42
#elif !defined(HAVE__BOOL)
43
typedef
unsigned
char
_Bool;
44
#
/* See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2229.htm */
45
# define bool _Bool
46
# define true ((_Bool)+1)
47
# define false ((_Bool)+0)
48
# define __bool_true_false_are_defined
49
#endif
50
51
#endif
/* RBIMPL_STDBOOL_H */
stdbool.h
C99 shim for <stdbool.h>
Generated by
1.9.1