|
1 | 1 | /* |
2 | 2 | * R : A Computer Language for Statistical Data Analysis |
3 | | - * Copyright (C) 2000, 2025 The R Core Team. |
| 3 | + * Copyright (C) 2000, 2001 The R Core Team. |
4 | 4 | * |
5 | 5 | * This header file is free software; you can redistribute it and/or modify |
6 | 6 | * it under the terms of the GNU Lesser General Public License as published by |
|
21 | 21 | * https://www.R-project.org/Licenses/ |
22 | 22 | */ |
23 | 23 |
|
24 | | -/* Included by R.h: Part of the API. */ |
| 24 | +/* Included by R.h: API */ |
25 | 25 |
|
26 | 26 | #ifndef R_EXT_BOOLEAN_H_ |
27 | 27 | #define R_EXT_BOOLEAN_H_ |
28 | 28 |
|
29 | 29 | #undef FALSE |
30 | 30 | #undef TRUE |
31 | 31 |
|
32 | | - |
33 | | - |
34 | 32 | #ifdef __cplusplus |
35 | | - |
36 | 33 | extern "C" { |
37 | | - /* once cpp11 is sorted |
38 | | -typedef bool Rboolean; |
39 | | -#define FALSE false |
40 | | -#define TRUE true |
41 | | - */ |
42 | | -typedef enum { FALSE = 0, TRUE } Rboolean; |
43 | | -} |
44 | | - |
45 | | -# else |
46 | | - |
47 | | -// Also include standard C boolean type |
48 | | -#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L |
49 | | -// C23 so these are keywords |
50 | | -#else |
51 | | -// stdbool.h is C99, so available everywhere |
52 | | -//# include <stdbool.h> |
53 | 34 | #endif |
| 35 | +typedef enum { FALSE = 0, TRUE /*, MAYBE */ } Rboolean; |
54 | 36 |
|
55 | | -/* |
56 | | - __bool_true_false_are_defined is defined in stdbool.h, and C23, but |
57 | | - it and stdbool.h are declared obsolescent in C23. |
58 | | -*/ |
59 | | -#ifdef __bool_true_false_are_defined |
60 | | -typedef bool Rboolean; |
61 | | -# define FALSE false |
62 | | -# define TRUE true |
63 | | -# define _R_RBOOLEAN_IS_BOOL_ 1 |
64 | | -#else |
65 | | -typedef enum { FALSE = 0, TRUE } Rboolean; |
66 | | -#endif //__bool_true_false_are_defined |
67 | | - |
68 | | -# endif // __cplusplus |
69 | | - |
| 37 | +#ifdef __cplusplus |
| 38 | +} |
| 39 | +#endif |
70 | 40 |
|
71 | 41 | #endif /* R_EXT_BOOLEAN_H_ */ |
0 commit comments