Skip to content

Commit 96c457c

Browse files
committed
Windows: update to libssh 0.10.5
1 parent 6b4d275 commit 96c457c

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
0.8.3
2+
- Windows: update to libssh 0.10.5
23
- scp_upload() now copies the file mode permissions similar to scp -p
34

45
0.8.2

src/Makevars.ucrt

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/Makevars.win

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
VERSION = 0.9.5
2-
RWINLIB = ../windows/libssh-${VERSION}
1+
VERSION = 0.10.5
2+
RWINLIB = ../windows/libssh-$(VERSION)
3+
TARGET = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH)
34

4-
PKG_CPPFLAGS = -DLIBSSH_STATIC \
5-
-I${RWINLIB}/include
5+
PKG_CPPFLAGS = -I$(RWINLIB)/include -DLIBSSH_STATIC
66

77
PKG_LIBS = \
8-
-L${RWINLIB}/lib${R_ARCH}${CRT} \
8+
-L$(RWINLIB)/$(TARGET) \
9+
-L$(RWINLIB)/lib$(R_ARCH) \
910
-lssh -lcrypto -lz -lws2_32 -lgdi32 -lcrypt32
1011

1112
all: clean winlibs

src/writer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ SEXP R_ssh_write_file_writer(SEXP ptr, SEXP buf, SEXP close){
2929
} else if(Rf_length(buf)) {
3030
fflush(fp);
3131
}
32-
return ScalarInteger(len);
32+
return Rf_ScalarInteger(len);
3333
}
3434

3535
SEXP R_ssh_new_file_writer(SEXP path){
3636
SEXP ptr = PROTECT(R_MakeExternalPtr(NULL, path, R_NilValue));
3737
R_RegisterCFinalizerEx(ptr, fin_file_writer, TRUE);
38-
setAttrib(ptr, R_ClassSymbol, mkString("file_writer"));
38+
Rf_setAttrib(ptr, R_ClassSymbol, Rf_mkString("file_writer"));
3939
UNPROTECT(1);
4040
return ptr;
4141
}
4242

4343
SEXP R_ssh_total_writers(void){
44-
return(ScalarInteger(total_open_writers));
44+
return(Rf_ScalarInteger(total_open_writers));
4545
}

tools/winlibs.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# We need https
2-
if(getRversion() < "3.3.0") setInternet2()
1+
# Download libssh + dependencies
32
VERSION <- commandArgs(TRUE)
4-
5-
# Downloads libssh2 + dependencies
63
if(!file.exists(sprintf("../windows/libssh-%s/include/libssh/libssh.h", VERSION))){
74
download.file(sprintf("https://github.com/rwinlib/libssh/archive/v%s.zip", VERSION), "lib.zip", quiet = TRUE)
85
dir.create("../windows", showWarnings = FALSE)

0 commit comments

Comments
 (0)