diff --git a/configure.win b/configure.win index f72c921..841e28a 100644 --- a/configure.win +++ b/configure.win @@ -22,7 +22,7 @@ echo " JAVA_HOME=$JAVA_HOME" echo "JAVA_HOME:=$JAVA_HOME" > src/Makevars.java -if [ -e jri/configure.win ]; then +if [ -e src/jri/configure.win ]; then echo "=== Building JRI ===" CONFIGURED=1 export CONFIGURED @@ -33,21 +33,21 @@ if [ -e jri/configure.win ]; then export R_HOME export RHOME export JAVA_HOME - cd jri + cd src/jri sh configure.win make BR=$? - cd .. + cd ../.. if [ $BR = 0 ]; then echo "=== JRI built ===" mkdir -p inst/jri # also copy into R_ARCH is present to avoid overwriting different archs if [ -n "${R_ARCH}" ]; then mkdir -p inst/jri${R_ARCH} - cp jri/src/jri.dll inst/jri${R_ARCH}/ + cp src/jri/src/jri.dll inst/jri${R_ARCH}/ fi # yet still install into JRI in case users get confused - cp -r jri/run.bat jri/src/jri.dll jri/src/JRI.jar jri/examples inst/jri/ + cp -r src/jri/run.bat src/jri/src/jri.dll src/jri/src/JRI.jar src/jri/examples inst/jri/ else echo "**** WARNING: JRI could NOT be built" >&2 if [ -z "$IGNORE" ]; then diff --git a/src/jri/src/Rdecl.h b/src/jri/src/Rdecl.h index abe9913..0c9338f 100644 --- a/src/jri/src/Rdecl.h +++ b/src/jri/src/Rdecl.h @@ -6,13 +6,22 @@ #include +/* Rinterface.h is not available on Windows */ +#ifndef Win32 #define R_INTERFACE_PTRS 1 #define CSTACK_DEFNS 1 #include /* R_ReadConsole since 4.6.0 */ +#endif /* some have been added to R 4.6.0 */ #if R_VERSION >= R_Version(4,6,0) #include /* run_Rmainloop (since 4.6.0), Rf_initialize_R (since 2.4.0) */ + +/* required on Windows (since 4.6.0) */ +#ifdef Win32 +int R_ReadConsole(const char *, unsigned char *, int, int); +#endif + #else void run_Rmainloop(void); /* main/main.c */ int R_ReadConsole(char*, unsigned char*, int, int); /* include/Defn.h */