You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2007/02/07 12:12:58 UTC

svn commit: r504502 - in /incubator/tuscany/cpp/sca/runtime/extensions/php: README src/tuscany/sca/php/PHPServiceWrapper.cpp src/tuscany/sca/php/sca.cpp

Author: slaws
Date: Wed Feb  7 03:12:56 2007
New Revision: 504502

URL: http://svn.apache.org/viewvc?view=rev&rev=504502
Log:
Add windows specific macro processing to the PHP extension 
source code. The extension now builds on windows but doesn't
run due to a failure in the PHP embedding SAPI. 

Modified:
    incubator/tuscany/cpp/sca/runtime/extensions/php/README
    incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/sca.cpp

Modified: incubator/tuscany/cpp/sca/runtime/extensions/php/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/php/README?view=diff&rev=504502&r1=504501&r2=504502
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/php/README (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/php/README Wed Feb  7 03:12:56 2007
@@ -108,7 +108,7 @@
 10Implement meta data exchange between the PHP SCA implementation and the Tuscany C++ SCA
   implementations so that selected parts of the SCDL definition can be omitted.
 11There is a threading issue with the way that we are firing up the PHP embedding SAPI 
-  TSRM should solve it failes on the embedding initialization for some reason. 
+  TSRM should solve it fails on the embedding initialization for some reason. 
 
 Dependencies 
 ------------
@@ -143,8 +143,16 @@
 
 PHP_SCA_SDO_HOME = the directory in which the SCA_SDO pecl extension source is installed
 
-These changes come over and above the enviroment changes you need to make
-to build the core C++ SCA software (where are these described?)
+These changes come over and above the environment changes you need to make
+to build the core C++ SCA software. I have the following set in my environment but
+of course the details depend on where you have the various bits of software installed. 
+
+AXIS2C_HOME=c:\axis2c-bin-0.96-win32
+LIBXML2_HOME=c:\libxml2-2.6.26.ein32
+ICONV_HOME=c:\iconv-1.9.2.win32
+ZLIB_HOME=c:\zlib-1.2.3.win32
+TUSCANY_SCACPP=c:\sca\deploy
+TUSCANY_SDOCPP=c:\sdo\deploy
 
 Now compile the PHP extension. Compiling with VC++ Express requires some care
 

Modified: incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp?view=diff&rev=504502&r1=504501&r2=504502
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp Wed Feb  7 03:12:56 2007
@@ -19,16 +19,23 @@
 
 /* $Rev$ $Date$ */
 
+#ifdef WIN32
 
 // some strangeness in the build that causes 
 // WinSock.h and WinSock2.h to be included leading to redefinitions
-//#define _WINSOCKAPI_
+#define _WINSOCKAPI_
 
-#include <php_embed.h>
+// sdo.cpp also includes the math libraries and causes redeclarations
+// of all the math functions
+#define _INC_MATH
+
+#endif //WIN32
 
 #include <iostream>
 #include <sstream>
 
+#include <php_embed.h>
+
 #include "tuscany/sca/php/PHPServiceWrapper.h"
 #include "tuscany/sca/php/PHPServiceProxy.h"
 #include "tuscany/sca/util/Logging.h"
@@ -142,7 +149,9 @@
             void PHPServiceWrapper::invoke(Operation& operation)
             {
                 logentry();
-
+string temp;
+cout << "Press Key\n";
+cin >> temp;
                 // set the current component in the SCA runtime
                 // so that other things can get at it thorugh this
                 // static class

Modified: incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/sca.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/sca.cpp?view=diff&rev=504502&r1=504501&r2=504502
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/sca.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/sca.cpp Wed Feb  7 03:12:56 2007
@@ -19,6 +19,14 @@
 
 /* $ Id: $ */ 
 
+#ifdef WIN32
+
+// some strangeness in the build that causes 
+// WinSock.h and WinSock2.h to be included leading to redefinitions
+#define _WINSOCKAPI_
+
+#endif //WIN32
+
 #include "tuscany/sca/core/SCARuntime.h"
 #include "tuscany/sca/php/PHPServiceProxy.h"
 #include "commonj/sdo/RefCountingPointer.h"
@@ -707,6 +715,7 @@
     
     // create an object of type SCA_Tuscany
     zval *_this_zval;
+    MAKE_STD_ZVAL(_this_zval);
     Z_TYPE_P(_this_zval) = IS_OBJECT;
     if ( object_init_ex(_this_zval, SCA_Tuscany_ce_ptr) == FAILURE) {
     	char *class_name;



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org