Skip to content

Commit

Permalink
Avoid Msys2 path conversion.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84978 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Aug 17, 2023
1 parent 9f2efba commit f2b5de0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/library/grDevices/src/Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PKG_CPPFLAGS = -I$(R_HOME)/src/include -DHAVE_CONFIG_H
devPS-CPPFLAGS = -I"$(EXT_LIBS)/include" -I$(R_HOME)/src/gnuwin32

## devWindows needs opt.h, console.h, rui.h and graphapp headers
arch_DEFS = -DR_ARCH='"$(R_ARCH)"'
## remove slash to avoid Msys2 path conversion
arch_DEFS = -DR_ARCH='"$(subst /,,$(R_ARCH))"'
devWindows-CPPFLAGS = -I$(R_HOME)/src/gnuwin32 -I$(R_HOME)/src/extra $(arch_DEFS)

winbitmap-CPPFLAGS = -DHAVE_PNG -DHAVE_JPEG -DHAVE_TIFF -I"$(EXT_LIBS)/include"
Expand Down
4 changes: 2 additions & 2 deletions src/library/grDevices/src/devWindows.c
Original file line number Diff line number Diff line change
Expand Up @@ -3951,7 +3951,7 @@ static int Load_Rcairo_Dll()
{
if (!RcairoAlreadyLoaded) {
size_t needed = strlen(R_HomeDir())
+ strlen("/library/grDevices/libs")
+ strlen("/library/grDevices/libs/")
+ strlen(R_ARCH)
+ strlen("/winCairo.dll") + 1;
char *szFullPath = malloc(needed);
Expand All @@ -3960,7 +3960,7 @@ static int Load_Rcairo_Dll()
return -1;
}
strcpy(szFullPath, R_HomeDir());
strcat(szFullPath, "/library/grDevices/libs");
strcat(szFullPath, "/library/grDevices/libs/");
strcat(szFullPath, R_ARCH);
strcat(szFullPath, "/winCairo.dll");
if (((hRcairoDll = LoadLibrary(szFullPath)) != NULL) &&
Expand Down

0 comments on commit f2b5de0

Please sign in to comment.