diff --git a/doc/manual/R-exts.texi b/doc/manual/R-exts.texi index 72f0619ecb..075d1c9128 100644 --- a/doc/manual/R-exts.texi +++ b/doc/manual/R-exts.texi @@ -5894,14 +5894,17 @@ standards and the @code{} headers are not supplied by some of the compilers used for @R{}, including on macOS. (Use the C++11 versions instead.) -@c Centos had 10 years of support, for Centos 7 expiring in June 2024. @c RHEL has 10 years, with more extended support, up to 4 years. @c Ubuntu LTS has 5 years' general support and 8 extended support. @c Ubuntu 16.04 (EOL 2021-04) came with GCC 5.4 but 7 was available @c Ubuntu 18.04 came with GCC 7.3 or 7.4. -@c RHEL/Centos 6 came with GCC 4.4. -@c RHEL/Centos 7 came with GCC 4.8, with 4.4 available. -@c RHEL/Centos 8 has GCC 8. +@c Ubuntu 20.04 came with GCC 9.4 +@c Ubuntu 22.04 came with GCC 11 +@c RHEL 6 came with GCC 4.4. +@c RHEL 7 came with GCC 4.8, with 4.4 available. +@c RHEL 8 has GCC 8 with 9 available +@c RHEL 9 has GCC 11 +@c All versions of Cwntos is now EOL. A common error is to assume recent versions of compilers or OSes. In production environments `long term support' versions of OSes may be in use for many years,@footnote{Ubuntu provides 5 years of support (but diff --git a/src/include/R_ext/Boolean.h b/src/include/R_ext/Boolean.h index 56bce4e4a0..19a315aab5 100644 --- a/src/include/R_ext/Boolean.h +++ b/src/include/R_ext/Boolean.h @@ -1,6 +1,6 @@ /* * R : A Computer Language for Statistical Data Analysis - * Copyright (C) 2000, 2001 The R Core Team. + * Copyright (C) 2000, 2025 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -29,13 +29,22 @@ #undef FALSE #undef TRUE -#ifdef __cplusplus +// Fer now, only when the compiler claims to be a C23 compiler. + +#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L +typedef bool Rboolean; +# define FALSE false +# define TRUE true +# define _R_RBOOLEAN_IS_BOOL_ 1 +#else +# ifdef __cplusplus extern "C" { -#endif +# endif typedef enum { FALSE = 0, TRUE /*, MAYBE */ } Rboolean; -#ifdef __cplusplus +# ifdef __cplusplus } +# endif #endif #endif /* R_EXT_BOOLEAN_H_ */ diff --git a/src/include/R_ext/RStartup.h b/src/include/R_ext/RStartup.h index fb7a8aa264..2165477cbc 100644 --- a/src/include/R_ext/RStartup.h +++ b/src/include/R_ext/RStartup.h @@ -73,7 +73,8 @@ typedef struct R_SIZE_T max_vsize; R_SIZE_T max_nsize; R_SIZE_T ppsize; - Rboolean NoRenviron : 16; + // This used to be Rboolean, but that is not guaraneteed to have >= 16 bits + int NoRenviron : 16; /* RstartVersion has been added in R 4.2.0. Earlier, NoRenviron was an int (normally 32-bit like Rboolean), so on most machines the version would become 0 when setting NoRenviron to FALSE in