Changeset 767 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jun 9, 2016, 2:21:26 PM (9 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/configure.ac
r753 r767 587 587 then 588 588 JAVA_LDFLAGS="-framework JavaVM" 589 JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" 589 for i in `ls /Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/`; do 590 JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/$i/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" 591 done 590 592 else 591 593 if test -d "$JDKHOME/jre/lib/i386"; … … 594 596 JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" 595 597 else 596 JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/server/ -ljvm -lpthread" 597 JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" 598 if test -d "$JDKHOME/jre/lib/amd64"; then 599 JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/server/ -ljvm -lpthread" 600 JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux" 601 else 602 JAVA_LDFLAGS="-L$JDKHOME/jre/lib/server/ -ljvm -lpthread" 603 JAVA_CPPFLAGS="-I$JDKHOME/include/ -I$JDKHOME/include/darwin" 604 fi 598 605 fi 599 606 fi 600 607 608 AC_LANG([C++]) 609 echo $JAVA_CPPFLAGS 601 610 # Check headers file (second time we check that in fact) 602 611 CPPFLAGS_SAVE="$CPPFLAGS" … … 604 613 AC_CHECK_HEADERS([jni.h], 605 614 [], [AC_MSG_ERROR([could not find jni.h file])]) 606 615 CPPFLAGS="$CPPFLAGS_SAVE" 607 616 # Ensure we can link against libjava 608 617 LIBS_SAVE="$LIBS" -
trunk/zoo-project/zoo-kernel/request_parser.h
r640 r767 31 31 #include "ulinet.h" 32 32 33 #include <libxml/parser.h> 34 #include <libxml/xpath.h> 35 33 36 #ifdef __cplusplus 34 37 extern "C" { 35 38 #endif 36 #include <libxml/parser.h>37 #include <libxml/xpath.h>38 39 39 40 xmlXPathObjectPtr extractFromDoc (xmlDocPtr, const char *); -
trunk/zoo-project/zoo-kernel/response_print.h
r676 r767 92 92 #include <openssl/buffer.h> 93 93 94 #include <libxml/parser.h> 95 #include <libxml/xpath.h> 96 94 97 #ifdef __cplusplus 95 98 extern "C" { 96 99 #endif 97 #include <libxml/parser.h>98 #include <libxml/xpath.h>99 100 100 /** 101 101 * Maximum number of XML namespaces -
trunk/zoo-project/zoo-kernel/server_internal.h
r680 r767 38 38 extern int conf_read(const char*,maps*); 39 39 40 #include <libxml/parser.h> 41 #include <libxml/xpath.h> 42 40 43 #ifdef __cplusplus 41 44 extern "C" { 42 45 #endif 43 #include <libxml/parser.h>44 #include <libxml/xpath.h>45 46 46 47 char *get_uuid(); -
trunk/zoo-project/zoo-kernel/service.h
r757 r767 112 112 #ifndef WIN32 113 113 #include <ctype.h> 114 #ifndef bool 115 #define bool int 116 #endif 117 #ifndef true 118 /** 119 * Local true definition 120 */ 121 #define true 1 122 /** 123 * Local false definition 124 */ 125 #define false 0 126 #endif 114 #include <stdbool.h> 127 115 #endif 128 116 -
trunk/zoo-project/zoo-kernel/service_internal_java.c
r765 r767 40 40 maps* inputs=*real_inputs; 41 41 maps* outputs=*real_outputs; 42 char ntmp[1024]; 43 getcwd(ntmp,1024); 42 map* cwdMap=getMapFromMaps(*main_conf,"lenv","cwd"); 43 char *ntmp=NULL; 44 if(cwdMap!=NULL) 45 ntmp=zStrdup(cwdMap->value); 44 46 map* tmp=getMap(request,"metapath"); 45 47 char *classpath; … … 80 82 } 81 83 sprintf(oclasspath,"-Djava.class.path=%s",classpath); 82 83 84 #ifdef DEBUG 84 85 fprintf(stderr,"CLASSPATH=%s\n",classpath); 85 86 fprintf(stderr,"(%s)\n",oclasspath); 86 87 #endif 88 #ifndef USE_JDB 89 int njdb=0; 90 #else 91 int njdb=2; 92 #endif 87 93 #ifndef WIN32 88 int nb= 1;94 int nb=3+njdb; 89 95 #endif 90 96 int nbc0=0; … … 125 131 options[0].optionString = oclasspath; 126 132 options[0].extraInfo=NULL; 133 options[1].optionString = "-server"; 134 options[1].extraInfo=NULL; 135 char tmp1[100]; 136 sprintf(tmp1,"-Djava.library.path=%s",cwdMap->value); 137 fprintf(stderr,"%s\n",tmp1); 138 options[2].optionString = tmp1; 139 options[2].extraInfo=NULL; 140 #ifdef USE_JDB 141 options[3].optionString = "-Xdebug"; 142 options[3].extraInfo=NULL; 143 options[4].optionString = "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7896"; 144 options[4].extraInfo=NULL; 145 #endif 127 146 #ifdef WIN32 128 147 start=2; 129 148 options[1].optionString = "-Xmx512m"; 130 149 #else 131 start= 1;150 start=3+njdb; 132 151 #endif 133 152 for(i=0;i<nbc0;i++){ … … 164 183 tmp=getMap(s->content,"serviceProvider"); 165 184 #ifdef JAVA7 166 cls = env->FindClass(tmp->value); 167 cls_gr = env->NewGlobalRef(cls); 185 cls = (*env).FindClass(tmp->value); 168 186 #else 169 187 cls = (*env)->FindClass(env,tmp->value); 170 cls_gr = (*env)->NewGlobalRef(env, cls);171 188 #endif 172 189 if( cls == NULL ) { … … 183 200 fprintf(stderr,"%s loaded\n",tmp->value); 184 201 } 202 #endif 203 #ifdef JAVA7 204 cls_gr = (*env)NewGlobalRef(cls); 205 #else 206 cls_gr = (*env)->NewGlobalRef(env, cls); 185 207 #endif 186 208 … … 246 268 displayStack(env,*main_conf); 247 269 #ifdef JAVA7 270 (*env).ExceptionDescribe(); 248 271 (*jvm).DestroyJavaVM(); 249 272 #else … … 324 347 if(strncasecmp(m->value,"minus",5)==0) 325 348 sprintf(res,"-XX:-%s",m->name); 326 else if(strncasecmp(m->value,"plus", 5)==0)349 else if(strncasecmp(m->value,"plus",4)==0) 327 350 sprintf(res,"-XX:+%s",m->name); 328 351 else … … 393 416 jbyteArray tmpData=(*env).NewByteArray(atoi(sizeV->value)); 394 417 (*env).SetByteArrayRegion(tmpData,0,atoi(sizeV->value),(const jbyte *)tmp1->value); 395 (*env).CallObjectMethod( scObject1, put_mid, (*env).NewStringUTF(tmp1->name), tmpData);418 (*env).CallObjectMethod(env,scObject1, put_mid, (*env).NewStringUTF(env,tmp1->name), tmpData); 396 419 #else 397 420 jbyteArray tmpData=(*env)->NewByteArray(env,atoi(sizeV->value)); 398 (*env)->SetByteArrayRegion(env,tmpData,0,atoi(sizeV->value), tmp1->value);421 (*env)->SetByteArrayRegion(env,tmpData,0,atoi(sizeV->value),(jbyte*) tmp1->value); 399 422 (*env)->CallObjectMethod(env,scObject1, put_mid, (*env)->NewStringUTF(env,tmp1->name), tmpData); 400 423 #endif -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r765 r767 34 34 #include "cgic.h" 35 35 36 extern "C"37 {38 36 #include <libxml/tree.h> 39 37 #include <libxml/xmlmemory.h> … … 41 39 #include <libxml/xpath.h> 42 40 #include <libxml/xpathInternals.h> 43 }44 41 45 42 #include "ulinet.h" … … 1722 1719 #ifndef WIN32 1723 1720 setenv (mapcs->name, mapcs->value, 1); 1724 #else1725 1721 #ifdef DEBUG 1726 1722 fprintf (stderr, "[ZOO: setenv (%s=%s)]\n", mapcs->name, 1727 1723 mapcs->value); 1728 1724 #endif 1725 #else 1729 1726 if (mapcs->value[strlen (mapcs->value) - 2] == '\r') 1730 1727 { … … 1746 1743 } 1747 1744 #else 1748 1749 1750 1745 SetEnvironmentVariable (mapcs->name, mapcs->value); 1751 1746 #endif
Note: See TracChangeset
for help on using the changeset viewer.