Skip to content

Commit f2b264f

Browse files
author
ripley
committed
make _R_CXX_USE_NO_REMAP_ the default
git-svn-id: https://svn.r-project.org/R/trunk@87314 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 262938f commit f2b264f

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

doc/NEWS.Rd

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,21 @@
256256

257257
\subsection{UTILITIES}{
258258
\itemize{
259-
\item \command{R CMD check --as-cran} will compile C++ code with
260-
\code{-DR_NO_REMAP}.
259+
\item \command{R CMD INSTALL} (and hence \command{check}) now by
260+
default compile C++ code with \code{-DR_NO_REMAP}. For the time
261+
being this can be reverted by setting environment
262+
variable\env{_R_CXX_USE_NO_REMAP_} to a false value (but that will
263+
be removed in the near future).
264+
265+
%% \item \command{R CMD check --as-cran} will compile C++ code with
266+
%% \code{-DR_NO_REMAP}.
261267

262268
\item \command{R CMD check --as-cran} notes bad parts in the
263269
\file{DESCRIPTION} file's URL fields.
264270
265-
\item Installation will define \code{STRICT_R_HEADERS} if
266-
environment variable \env{_R_USE_STRICT_R_HEADERS_} is set to a
267-
true value: this is done by \command{R CMD check --as-cran}.
271+
%% \item Installation will define \code{STRICT_R_HEADERS} if
272+
%% environment variable \env{_R_USE_STRICT_R_HEADERS_} is set to a
273+
%% true value: this is done by \command{R CMD check --as-cran}.
268274
269275
\item \command{R CMD check} now reports more warnings on
270276
long-deprecated/obsolete Fortran features from

doc/manual/R-exts.texi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17080,12 +17080,13 @@ use.
1708017080
Let us re-iterate the advice to include in C++ code system headers
1708117081
before the @R{} header files, especially @file{Rinternals.h} (included
1708217082
by @file{Rdefines.h}) and @file{Rmath.h}, which redefine names which may
17083-
be used in system headers, or (preferably) to define @code{R_NO_REMAP}.
17084-
Setting the environment variable @env{_R_CXX_USE_NO_REMAP_} to a true value
17085-
allows the need for this to be tested, as it causes @command{R CMD
17086-
INSTALL} to compile C++ code defining @code{R_NO_REMAP}.
17087-
@env{_R_CXX_USE_NO_REMAP_} is set by @command{R CMD check --as-cran} and
17088-
is planned to become the default in future.
17083+
be used in system headers, or (preferably and now the default) to define
17084+
@code{R_NO_REMAP}.
17085+
@c Setting the environment variable @env{_R_CXX_USE_NO_REMAP_} to a true value
17086+
@c allows the need for this to be tested, as it causes @command{R CMD
17087+
@c INSTALL} to compile C++ code defining @code{R_NO_REMAP}.
17088+
@c @env{_R_CXX_USE_NO_REMAP_} is set by @command{R CMD check --as-cran} and
17089+
@c is planned to become the default in future.
1708917090

1709017091

1709117092
@node Moving into C API compliance

src/library/tools/R/check.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7296,7 +7296,8 @@ add_dummies <- function(dir, Log)
72967296
Sys.setenv("_R_CHECK_RD_NOTE_LOST_BRACES_" = "TRUE")
72977297
Sys.setenv("_R_CHECK_MBCS_CONVERSION_FAILURE_" = "TRUE")
72987298
Sys.setenv("_R_CHECK_VALIDATE_UTF8_" = "TRUE")
7299-
Sys.setenv("_R_CXX_USE_NO_REMAP_" = "TRUE")
7299+
## next two are the defailt as from R 4.5.0
7300+
## Sys.setenv("_R_CXX_USE_NO_REMAP_" = "TRUE")
73007301
## Sys.setenv("_R_USE_STRICT_R_HEADERS_" = "TRUE")
73017302
Sys.setenv("_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_" = "TRUE")
73027303
Sys.setenv("_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_" = "TRUE")

src/library/tools/R/install.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ if(FALSE) {
27622762
paste0("LTO_FC=", shQuote("$(LTO_FC_OPT)")))
27632763
else if(isFALSE(use_lto)) c("LTO=", "LTO_FC=")
27642764
)
2765-
if(config_val_to_logical(Sys.getenv("_R_CXX_USE_NO_REMAP_", "FALSE")))
2765+
if(config_val_to_logical(Sys.getenv("_R_CXX_USE_NO_REMAP_", "TRUE")))
27662766
makeargs <- c(makeargs, "CXX_DEFS=-DR_NO_REMAP")
27672767
## if(config_val_to_logical(Sys.getenv("_R_USE_STRICT_R_HEADERS_", "FALSE")))
27682768
## makeargs <- c(makeargs, "XDEFS=-DSTRICT_R_HEADERS=1")

0 commit comments

Comments
 (0)