Changeset: ad4454fb9529 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad4454fb9529
Modified Files:
        NT/rules.msc
        monetdb5/extras/rapi/Makefile.ag
        monetdb5/extras/rapi/rapi.c
Branch: Oct2014
Log Message:

RIntegration links on Windows...


Unterschiede (94 Zeilen):

diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -188,11 +188,26 @@ RUBY_DIR = lib\ruby\gems\1.9.1
 
 !IFDEF HAVE_LIBR
 # This is the location of the R library
+libr_LIBDEP = R.lib
 !IFNDEF LIBR
-LIBR = "c:\Program Files\R\R-3.1.0\"
+LIBR = c:\Program Files\R\R-3.1.0
+!IF $(bits) == 32
+libr_DLL=$(LIBR)\bin\i386\R.dll
+!ELSE
+libr_DLL=$(LIBR)\bin\x64\R.dll
 !ENDIF
-R_LIBS = "$(LIBR)\bin\x64\R.dll" # not sure...
-R_CFLAGS = -DHAVE_LIBR "-I$(LIBR)\include"
+!ENDIF
+libr_LIBS = C:\cygwin\home\hannes\R.lib
+libr_CFLAGS = -DHAVE_LIBR "-I$(LIBR)\include"
+
+R.lib: $(libr_DLL)
+       # generate R.lib from R.dll, needed for linking
+       echo LIBRARY R> R.def
+       echo EXPORTS>> R.def
+       dumpbin /exports "$(libr_DLL)" | grep -Po "^\s*\d+\s+\w+\s+\w+\s+\K\w+" 
>> R.def
+       lib /def:R.def /out:R.lib
+       rm R.def
+       
 !ENDIF
 
 # some programs we use, probably no need to edit
@@ -223,7 +238,7 @@ COMPILERFLAGS = -GF -W3 $(W_CFLAGS) -MDd
 # add -Zi flag (implies -debug, not -D_DEBUG) to get symbol info in .pdb files
 COMPILERFLAGS = -GF -W3 $(W_CFLAGS) -MD -nologo -Ox -Zi -Oi
 !ENDIF
-CFLAGS = $(COMPILERFLAGS)  -I. -I$(TOPDIR) $(LIBC_INCS) $(INCLUDES) 
$(WINCONFIG_INCS) $(R_CFLAGS) $(ICONV_CFLAGS) $(ATOMIC_OPS_CFLAGS)
+CFLAGS = $(COMPILERFLAGS)  -I. -I$(TOPDIR) $(LIBC_INCS) $(INCLUDES) 
$(WINCONFIG_INCS) $(ICONV_CFLAGS) $(ATOMIC_OPS_CFLAGS)
 
 # No general LDFLAGS needed
 INSTALL = copy
diff --git a/monetdb5/extras/rapi/Makefile.ag b/monetdb5/extras/rapi/Makefile.ag
--- a/monetdb5/extras/rapi/Makefile.ag
+++ b/monetdb5/extras/rapi/Makefile.ag
@@ -29,7 +29,9 @@ lib__rapi = {
        MODULE
        DIR = libdir/monetdb5
        SOURCES = rapi.c rapi.h
-       LIBS = $(libr_LIBS)
+       LIBS = ../../tools/libmonetdb5 \
+       ../../../gdk/libbat \
+       $(MALLOC_LIBS) $(libr_LIBS)
 }
 
 headers_rapi_mal = {
diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -229,6 +229,7 @@ static int RAPIinitialize(void) {
 /* Completely different Windows initialization */
 /* Gratefully inspired by the JRI code by Simon Urbanek (LGPL)  */
 
+/* R likes this spelling better */
 #define Win32
 
 #define NONAMELESSUNION
@@ -284,7 +285,7 @@ static void my_onintr(int sig)
     UserBreak = 1;
 }
 
-extern Rboolean R_LoadRconsole;
+//extern Rboolean R_LoadRconsole;
 
 int RAPIinitialize(void) {
         structRstart rp;
@@ -325,7 +326,7 @@ int RAPIinitialize(void) {
 
        signal(SIGBREAK, my_onintr);
        //GA_initapp(0, 0);
-       R_LoadRconsole = FALSE;
+       //R_LoadRconsole = FALSE;
        setup_Rmainloop();
 
     return RAPIinstalladdons();
@@ -440,7 +441,7 @@ str RAPIeval(Client cntxt, MalBlkPtr mb,
        // first argument after the return contains the pointer to the sql_func 
structure
        // NEW macro temporarily renamed to MNEW to allow including 
sql_catalog.h
 
-       if (sqlfun != NULL && !list_empty(sqlfun->ops)) {
+       if (sqlfun != NULL && sqlfun->ops->cnt > 0) {
                int carg = pci->retc + 2;
                argnode = sqlfun->ops->h;
                while (argnode) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to