axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/src/platforms/windows PlatformSpecificWindows.hpp
Date Mon, 01 Nov 2004 15:04:50 GMT
whitlock    2004/11/01 07:04:50

  Modified:    c        build.xml buildApache20Module.xml buildClient.xml
                        buildInitialize.xml buildServerEngine.xml
                        buildSimpleAxisServer.xml buildTransport.xml
                        buildXMLParser.xml
               c/src/common AxisConfig.cpp
               c/src/engine HandlerLoader.cpp HandlerLoader.h
                        SOAPTransportFactory.cpp SOAPTransportFactory.h
                        XMLParserFactory.cpp XMLParserFactory.h
  Added:       c        build.OS400.properties
               c/src/platforms PlatformAutoSense.hpp
               c/src/platforms/os400 PlatformSpecificOS400.cpp
                        PlatformSpecificOS400.hpp
               c/src/platforms/unix PlatformSpecificUnix.hpp
               c/src/platforms/windows PlatformSpecificWindows.hpp
  Log:
  Commit AXISCPP-232 "Add support for OS/400" on behalf of Nadir Amra
  
  Revision  Changes    Path
  1.12      +10 -5     ws-axis/c/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/build.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- build.xml	18 Oct 2004 11:54:45 -0000	1.11
  +++ build.xml	1 Nov 2004 15:04:49 -0000	1.12
  @@ -42,7 +42,12 @@
   	<import file="${basedir}/buildSimpleAxisServer.xml"/>
   	<import file="${basedir}/buildWSDL2Ws.xml"/>
   
  -	<target name="compileServer">
  +	<target name="compileClient" depends="initialize">
  +		<antcall target="compileAxisClient" inheritall="true"/>
  +	</target>
  +
  +
  +	<target name="compileServer" depends="initialize">
   		<antcall target="compileAxisServerEngine" inheritall="true"/>
   		<if>
   			<equals arg1="${server.apache13}" arg2="true"/>
  @@ -64,7 +69,7 @@
   		</if>
   	</target>
   
  -	<target name="compileTransport">
  +	<target name="compileTransport" depends="initialize">
   		<!-- Determine which flavour of transport to use -->
   		<!-- Ideally extend this to produce multiple flavours -->
   		<if>
  @@ -96,7 +101,7 @@
   		</if>
   	</target>
   
  -	<target name="compileXMLParser">
  +	<target name="compileXMLParser" depends="initialize">
   		<!-- Determine which flavour of xmlParser to use -->
   		<!-- Ideally extend this to produce multiple flavours -->
   		<if>
  @@ -135,8 +140,8 @@
   		</if>
   	</target>
   
  -	<target name="compile">
  -		<antcall target="compileAxisClient" inheritall="true"/>
  +	<target name="compile" depends="initialize">
  +		<antcall target="compileClient" inheritall="true"/>
   		<antcall target="compileTransport" inheritall="true"/>
   		<antcall target="compileXMLParser" inheritall="true"/>
   		<antcall target="compileServer" inheritall="true"/>
  
  
  
  1.3       +10 -1     ws-axis/c/buildApache20Module.xml
  
  Index: buildApache20Module.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildApache20Module.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildApache20Module.xml	19 Oct 2004 08:16:07 -0000	1.2
  +++ buildApache20Module.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -24,6 +24,7 @@
   							<define name="APACHE2_0_EXPORTS"/>
   						</defineset>
   					</compiler>
  +			            <compiler refid="OS400icc"/>
   					<includepath path="${apache20.dir.server}/include" unless="windows"/>
   					<!-- Additional compiler flag for Client library on all platforms -->
   					<defineset>
  @@ -33,8 +34,16 @@
   					<linker refid="SolarisLinker"/>
   					<linker refid="LinuxLinker"/>
   					<linker refid="VisualC++Linker"/>
  +			            <linker extends="OS400Linker">
  +                                 <linkerarg value="-qDUPPROC"/>
  +                                 <linkerarg value="-qDUPVAR"/>
  +                                 <linkerarg location="end" value="${dir.bin}/lib${serverEngineLibraryName}.so"/>
  +                                 <linkerarg location="end" value="${apache20.dir.server}/lib/libapr.so"/>
  +                                 <linkerarg location="end" value="${apache20.dir.server}/lib/libhttpd.so"/>
  +                              </linker>
  +
   					<libset dir="${apache20.dir.server}/lib" libs="libapr, libhttpd" if="windows"/>
  -					<libset dir="${dir.bin}" libs="${serverEngineLibraryName}"/>
  +					<libset dir="${dir.bin}" libs="${serverEngineLibraryName}" unless="os400"/>
   					<!-- Files to be compiled -->
   					<fileset dir="${dir.src}">
   						<include name="server/apache2/*.cpp"/>
  
  
  
  1.4       +3 -0      ws-axis/c/buildClient.xml
  
  Index: buildClient.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildClient.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- buildClient.xml	15 Oct 2004 15:51:30 -0000	1.3
  +++ buildClient.xml	1 Nov 2004 15:04:49 -0000	1.4
  @@ -21,6 +21,7 @@
   							<define name="AXISCLIENTDLL_EXPORTS"/>
   						</defineset>
   					</compiler>
  +			            <compiler refid="OS400icc"/>
   					<!-- Additional compiler flag for Client library on all platforms -->
   					<defineset>
   						<define name="AXIS_CLIENT_LIB"/>
  @@ -30,6 +31,7 @@
   					<linker refid="SolarisLinker"/>
   					<linker refid="LinuxLinker"/>
   					<linker refid="VisualC++Linker"/>
  +		                  <linker refid="OS400Linker"/>
   					<!-- Files to be compiled -->
   					<fileset dir="${dir.src}">
   						<include name="common/*.cpp"/>
  @@ -40,6 +42,7 @@
   						<include name="wsdd/*.cpp"/>
   						<include name="xml/*.cpp"/>
   						<include name="transport/axis/AxisTransportException.cpp"/>
  +						<include name="platforms/os400/PlatformSpecificOS400.cpp" if="os400"/>
   						<!-- The following files need to be excluded -->
   						<exclude name="common/Packet.cpp"/>
   						<exclude name="common/AxisSocketUtils.cpp"/>
  
  
  
  1.3       +28 -0     ws-axis/c/buildInitialize.xml
  
  Index: buildInitialize.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildInitialize.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildInitialize.xml	15 Oct 2004 15:51:30 -0000	1.2
  +++ buildInitialize.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -102,6 +102,24 @@
   			<includepath path="${dir.include}"/>
   		</compiler>
   
  +		<!--
  +		  Definition of icc compile for OS400
  +	      -->
  +		<compiler id="OS400icc" name="icc" if="os400">
  +			<compilerarg value="-qLOCALETYPE=*LOCALEUCS2"/>
  +			<compilerarg value="-qENUM=*INT"/>
  +			<compilerarg value="-g" if="debug"/>
  +			<defineset>
  +				<define name="ENABLE_AXIS_EXCEPTION"/>
  +				<define name="HAVE_CONFIG_H"/>
  +				<define name="OS400"/>
  +				<define name="AS400"/>
  +				<define name="_XOPEN_SOURCE" value="520"/>
  +				<define name="_MULTI_THREADED"/>
  +			</defineset>
  +			<includepath path="${dir.include}"/>
  +		</compiler>
  +
   	<!--
   	  Linker Definitions
   	  -->
  @@ -147,6 +165,10 @@
   			<linkerarg value="-lc"/>
   		</linker>
   
  +		<!-- Definition of OS/400 linker -->
  +		<linker id="OS400Linker" name="ld" libtool="false" if="os400">
  +		</linker>
  +
   	<!--
   	  Determine platform
   	  -->
  @@ -163,6 +185,9 @@
           <condition property="linux">
               <os name="Linux"/>
           </condition>
  +        <condition property="os400">
  +            <os name="OS/400"/>
  +        </condition>
   	</target>
   	
   	<!--
  @@ -180,6 +205,9 @@
   		</condition>
   		<condition property="platform" value="AIX">
   			<isset property="aix"/>
  +		</condition>
  +		<condition property="platform" value="OS400">
  +			<isset property="os400"/>
   		</condition>
   		
   		<!-- Load properties from file -->
  
  
  
  1.3       +3 -0      ws-axis/c/buildServerEngine.xml
  
  Index: buildServerEngine.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildServerEngine.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildServerEngine.xml	19 Oct 2004 08:16:07 -0000	1.2
  +++ buildServerEngine.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -21,6 +21,7 @@
   							<define name="DYNALIB_EXPORTS"/>
   						</defineset>
   					</compiler>
  +                    <compiler refid="OS400icc"/>
   					<!-- Additional compiler flag for Client library on all platforms -->
   					<defineset>
   						<define name="ENABLE_AXISTRACE" if="trace"/>
  @@ -29,6 +30,7 @@
   					<linker refid="SolarisLinker"/>
   					<linker refid="LinuxLinker"/>
   					<linker refid="VisualC++Linker"/>
  +                    <linker refid="OS400Linker"/>
   					<!-- Files to be compiled -->
   					<fileset dir="${dir.src}">
   						<include name="common/*.cpp"/>
  @@ -38,6 +40,7 @@
   						<include name="soap/*.c"/>
   						<include name="wsdd/*.cpp"/>
   						<include name="xml/*.cpp"/>
  +						<include name="platforms/os400/PlatformSpecificOS400.cpp" if="os400"/>
   						<!-- The following files need to be excluded @Adrian - query these! -->
   						<exclude name="common/Packet.cpp"/>
   						<exclude name="common/AxisSocketUtils.cpp"/>
  
  
  
  1.3       +2 -0      ws-axis/c/buildSimpleAxisServer.xml
  
  Index: buildSimpleAxisServer.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildSimpleAxisServer.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildSimpleAxisServer.xml	19 Oct 2004 08:16:07 -0000	1.2
  +++ buildSimpleAxisServer.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -13,11 +13,13 @@
   			<compiler refid="Linuxgcc"/>
   			<compiler extends="VisualC++"/>
   			<compiler refid="AIXxlc"/>
  +            <compiler refid="OS400icc"/>
   			<!-- Linkers -->
   			<linker refid="SolarisLinker"/>
   			<linker refid="LinuxLinker"/>
   			<linker refid="VisualC++Linker"/>
   			<linker refid="AIXExecutableLinker"/>
  +			<linker refid="OS400Linker"/>
   			<libset dir="${dir.bin}" libs="${serverEngineLibraryName}"/>
   			<!-- Files to be compiled -->
   			<fileset dir="${dir.src}">
  
  
  
  1.3       +2 -0      ws-axis/c/buildTransport.xml
  
  Index: buildTransport.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildTransport.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildTransport.xml	15 Oct 2004 15:51:30 -0000	1.2
  +++ buildTransport.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -21,12 +21,14 @@
   							<define name="AXISTRANSPORTDLL_EXPORTS"/>
   						</defineset>
   					</compiler>
  +                              <compiler refid="OS400icc"/>
   					<!-- Linkers -->
   					<linker refid="SolarisLinker"/>
   					<linker refid="LinuxLinker"/>
   					<linker extends="VisualC++Linker">
   						<syslibset libs="wsock32"/>
   					</linker>
  +                              <linker refid="OS400Linker"/>
   					<!-- Files to compile -->
   					<fileset dir="${dir.src}">
   						<include name="transport/${transport}/*.cpp"/>
  
  
  
  1.3       +8 -1      ws-axis/c/buildXMLParser.xml
  
  Index: buildXMLParser.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/buildXMLParser.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- buildXMLParser.xml	15 Oct 2004 15:51:30 -0000	1.2
  +++ buildXMLParser.xml	1 Nov 2004 15:04:49 -0000	1.3
  @@ -22,6 +22,7 @@
   							<define name="AXISXMLPARSERXERCES_EXPORTS"/>
   						</defineset>
   					</compiler>
  +                              <compiler refid="OS400icc"/>
   					<!-- Additional include directory for XML Parser -->
   					<includepath path="${dir.xmlParser}/include"/>
   					<includepath path="${dir.xmlParser}/lib"/>
  @@ -30,8 +31,14 @@
   					<linker refid="VisualC++Linker"/>
   					<linker refid="LinuxLinker"/>
   					<linker refid="AIXLinker"/>
  +			            <linker extends="OS400Linker">
  +                                 <linkerarg value="-qDUPPROC"/>
  +                                 <linkerarg value="-qDUPVAR"/>
  +                                 <linkerarg location="end" value="${dir.xmlParser}/lib/${xmlParserLibrary}.so"/>
  +                              </linker>
  +
   					<!-- Additional library of XMLParser -->
  -					<libset dir="${dir.xmlParser}/lib" libs="${xmlParserLibrary}"/>
  +					<libset dir="${dir.xmlParser}/lib" libs="${xmlParserLibrary}" unless="os400"/>
   					<!-- Files to be compiled -->
   					<fileset dir="${dir.src}">
   						<include name="xml/${xmlParser}/*.cpp"/>
  
  
  
  1.1                  ws-axis/c/build.OS400.properties
  
  Index: build.OS400.properties
  ===================================================================
  #####################
  # Parser Properties #
  #####################
  
  # Typical values are:
  #	For Xerces, on Windows:
  #		xmlParser = xerces
  #		xmlParserLibrary = xerces-c_2
  #	For Xerces, on Unix:
  #		xmlParser = xerces
  #		xmlParserLibrary = xerces-c
  #	For Expat, on Unix:
  #		xmlParser = expat
  #		xmlParserLibrary = expat
  
  # Parsers to be used
  xmlParser.xml4c = true
  xmlParser.xerces = false
  xmlParser.expat = false
  
  ## Values used for XML4C
  xml4c.xmlParserLibrary = xml4c
  xml4c.dir.xmlParser = ${env.XML4C_HOME}
  xml4c.xmlParserLibraryName = axis_xml4c
  
  ## Values used for Xerces
  xerces.xmlParserLibrary = xerces-c
  xerces.dir.xmlParser = ${env.XERCES_HOME}
  xerces.xmlParserLibraryName = axis_xerces
  
  ## Values used for Expat
  expat.xmlParserLibrary = expat
  expat.dir.xmlParser = ${env.EXPAT_HOME}
  expat.xmlParserLibraryName = axis_expat
  
  # Name for compiled XML Parser library - excluding any prefix or suffix
  # eg: For Windows :   axis_xmlParser will produce axis_xmlParser.dll
  #     For Unix    :   axis_xmlParser will produce libaxis_xmlParser.so
  xmlParserLibraryName = axis_xmlParser
  
  ########################
  # Transport Properties #
  ########################
  
  # Transports to be used
  transport.axis = true
  transport.axis2 = true
  transport.libwww = false
  
  ## Values used for axis
  axis.transportLibraryName = axis_transport
  
  ## Values used for axis2
  axis2.transportLibraryName = axis2_transport
  
  ## Values used for libwww
  libwww.transportLibraryName = libwww_transport
  
  # Name for compiled transport library - excluding any prefix or suffix
  # eg: For Windows :   axis_transport will produce axis_transport.dll
  #     For Unix    :   axis_transport will produce libaxis_transport.so
  #
  transportLibraryName = axis_transport
  
  #####################
  # Client Properties #
  #####################
  
  # Name for compiled client - excluding any prefix or suffix
  # eg: For Windows :   axis_client will produce axis_client.dll
  #     For Unix    :   axis_client will produce libaxis_client.so
  clientLibraryName = axis_client
  
  ############################
  # Server Engine Properties #
  ############################
  
  # Name for compiled server engine - excluding any prefix or suffix
  # eg: For Windows :   axis_server will produce axis_server.dll
  #     For Unix    :   axis_server will produce libaxis_server.so
  serverEngineLibraryName = axis_server
  
  #################################
  # Simple Axis Server Properties #
  #################################
  
  # Is Simple Axis Server to be used?
  server.simpleAxisServer = false
  
  # Name for compiled server engine - excluding any prefix or suffix
  # eg: For Windows :   simple_axis_server will produce simple_axis_server.exe
  #     For Unix    :   simple_axis_server will produce simple_axis_server
  simpleAxisServerExecutableName = simple_axis_server
  
  #####################
  # Apache Properties #
  #####################
  
  # Apache versions to be used
  server.apache13 = false
  server.apache20 = true
  
  ## Values used for Apache 1.3
  apache13.dir.server = ${env.APACHE_HOME}
  apache13.serverLibraryName = mod_axis
  
  ## Values used for Apache 2.0
  apache20.dir.server = ${env.APACHE2_HOME}
  apache20.serverLibraryName = mod_axis2
  
  # Name for compiled Apache plugin library - excluding any prefix or suffix
  # eg: For Windows :   axis_apache will produce axis_apache.dll
  #     For Unix    :   axis_apache will produce libaxis_apache.so
  serverLibraryName = mod_axis
  
  ####################
  # Trace Properties #
  ####################
  
  # Instrument the Axis C++ source code with entry/exit trace
  dir.src.instrumented = ${basedir}/obj/src
  
  #######################################
  # Properties for compiling C/C++ code #
  #######################################
  
  # Directory in which to place compiled libraries
  dir.bin = ${basedir}/obj/bin
  
  # Directory in which to place object files
  dir.objects = ${basedir}/obj/objects
  
  ####################################
  # Properties for compiling WSDL2Ws #
  ####################################
  
  # Location of Axis JARs
  dir.axisJARs = ${env.AXISJAVA_LIB}
  
  # Directory in which to place compiled Java classes
  dir.classes = ${basedir}/obj/classes
  
  ###########################################
  # Properties for packaging Binary release #
  ###########################################
  release = axis-c-${version}-${platform}
  dir.release = ${basedir}/obj/package/${release}
  
  ###############################
  # Properties for Deliverables #
  ###############################
  dir.zips = ${basedir}/zips
  
  ############################
  # Properties for packaging #
  ############################
  # Base directory for packaging - not used directly within build.xml, just used to simplify this property file
  dir.package = ${basedir}/obj/package
  
  # Directory in which to place DLLs - Only used for Windows platform
  dir.package.bin = ${dir.package}/bin
  
  # Directory in which to place library files
  dir.package.lib = ${dir.package}/lib
  
  # Directory in which to place header files
  dir.package.include = ${dir.package}/include
  
  # Directory in which to place WSDL2Ws JAR files
  dir.package.WSDL2Ws = ${dir.package}/WSDL2Ws
  
  # Directory in which to place Documentation
  dir.package.docs = ${dir.package}/docs
  
  ############################################
  # Properties for building and running test #
  ############################################
  
  # Directory in which to place all generated test artifacts
  # This is also the directory in which code is built and run
  dir.test.generated = ${basedir}/obj/test/generated
  
  # Log files for test results
  results.log = ${dir.test.generated}/results.log
  
  # Prefix and suffix used for executables and libraries
  # Typical values are:
  #   For windows:
  #		executableSuffix = .exe
  #		librarySuffix = .dll
  #		libraryPrefix = 
  #	For unix:
  #		executableSuffix = 
  #		librarySuffix = .so
  #		libraryPrefix = lib
  #	For AIX (as Unix, except):
  #		librarySuffix = .a
  executableSuffix = 
  librarySuffix = .so
  libraryPrefix = lib
  
  # Directory containing Axis C libraries
  # For Windows this should be ${dir.package.bin}
  # For Unix this should be ${dir.package.lib}
  dir.libraries = ${dir.package.lib}
  
  # May want to uncomment for testing so the build output is used
  #dir.include = ${dir.package.include}
  
  # If only a single language is required then set it here.
  # Valid values are cpp or c. Default if unset is both.
  target.lang = cpp
  
  # AXISCPP_DEPLOY directory
  axiscpp_deploy = ${dir.test.generated}
  
  # Details of server to be used for testing clients
  testHost = localhost
  testPort = 9080
  monitorPort = 13260
  
  
  
  1.56      +9 -39     ws-axis/c/src/common/AxisConfig.cpp
  
  Index: AxisConfig.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisConfig.cpp,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- AxisConfig.cpp	26 Oct 2004 09:37:57 -0000	1.55
  +++ AxisConfig.cpp	1 Nov 2004 15:04:49 -0000	1.56
  @@ -21,6 +21,8 @@
    *
    */
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include "AxisConfig.h"
   #include <axis/server/GDefine.hpp>
   #include "../common/AxisFile.h"
  @@ -48,40 +50,12 @@
       m_pcKeyArray[AXCONF_NODENAME] = "NodeName";
       m_pcKeyArray[AXCONF_LISTENPORT] = "ListenPort";
   
  -#ifdef _DEBUG
  -#ifdef WIN32
  -    m_pcValueArray[AXCONF_XMLPARSER] = "AxisXMLParser_D.dll";
  -    m_pcValueArray[AXCONF_TRANSPORTHTTP] = "AxisTransport_D.dll";
  -    m_pcValueArray[AXCONF_NODENAME] = "server name";
  -    m_pcValueArray[AXCONF_LISTENPORT] = "listen port";
  -#else
  -    m_pcValueArray[AXCONF_XMLPARSER] = 
  -		"/usr/local/axiscpp_deploy/lib/libaxis_xmlparser.so";
  -    m_pcValueArray[AXCONF_TRANSPORTHTTP] =
  -		"/usr/local/axiscpp_deploy/lib/libaxis_transport.so";
  -    m_pcValueArray[AXCONF_NODENAME] = "server name";
  -    m_pcValueArray[AXCONF_LISTENPORT] = "listen port";
  -#endif
  -#else
  -#ifdef WIN32
  -    m_pcValueArray[AXCONF_XMLPARSER] = "AxisXMLParser.dll";
  -    m_pcValueArray[AXCONF_TRANSPORTHTTP] = "AxisTransport.dll";
  -    m_pcValueArray[AXCONF_NODENAME] = "server name";
  -    m_pcValueArray[AXCONF_LISTENPORT] = "listen port";
  -#else
  -    m_pcValueArray[AXCONF_XMLPARSER] =
  -		"/usr/local/axiscpp_deploy/lib/libaxis_xmlparser.so";
  -    m_pcValueArray[AXCONF_TRANSPORTHTTP] =
  -		"/usr/local/axiscpp_deploy/lib/libaxis_transport.so";
  -    m_pcValueArray[AXCONF_LOGPATH] =
  -		"/usr/local/axiscpp_deploy/log/AxisLog";
  -    m_pcValueArray[AXCONF_CLIENTLOGPATH] =
  -		"/usr/local/axiscpp_deploy/log/AxisClientLog";
  -    m_pcValueArray[AXCONF_NODENAME] = "server name";
  -    m_pcValueArray[AXCONF_LISTENPORT] = "listen port";
  -#endif
  -#endif
  -
  +    m_pcValueArray[AXCONF_NODENAME]      = "server name";
  +    m_pcValueArray[AXCONF_LISTENPORT]    = "listen port";
  +    m_pcValueArray[AXCONF_XMLPARSER]     = PLATFORM_XMLPARSER_PATH;
  +    m_pcValueArray[AXCONF_TRANSPORTHTTP] = PLATFORM_TRANSPORTHTTP_PATH;
  +    m_pcValueArray[AXCONF_LOGPATH]       = PLATFORM_LOG_PATH;
  +    m_pcValueArray[AXCONF_CLIENTLOGPATH] = PLATFORM_CLIENTLOG_PATH;
   }
   
   int AxisConfig::readConfFile ()
  @@ -110,11 +84,7 @@
       }
   
       strcpy (sNewConfPath, sConfPath);
  -#ifdef WIN32
  -    strcat (sNewConfPath, "/axiscpp.conf");
  -#else
  -    strcat (sNewConfPath, "/etc/axiscpp.conf");
  -#endif
  +    strcat (sNewConfPath, PLATFORM_CONFIG_PATH);
       /*
          Even if axiscpp.conf does not exist in AXISCPP_DEPLOY default values 
          will be used. Therefore return AXIS_SUCCESS
  
  
  
  1.32      +22 -68    ws-axis/c/src/engine/HandlerLoader.cpp
  
  Index: HandlerLoader.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/HandlerLoader.cpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- HandlerLoader.cpp	23 Sep 2004 15:12:57 -0000	1.31
  +++ HandlerLoader.cpp	1 Nov 2004 15:04:49 -0000	1.32
  @@ -23,6 +23,8 @@
   #pragma warning (disable : 4390)        // empty controlled statement found;
   #endif
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include "HandlerLoader.h"
   #include <stdio.h>
   #include "../common/AxisUtils.h"
  @@ -36,9 +38,7 @@
   
   HandlerLoader::HandlerLoader ()
   {
  -#if defined(USE_LTDL)
  -    lt_dlinit ();
  -#endif
  +    PLATFORM_LOADLIBINIT();
   }
   
   HandlerLoader::~HandlerLoader ()
  @@ -49,17 +49,15 @@
            m_HandlerInfoList.begin (); it != m_HandlerInfoList.end (); it++)
       {
           pHandlerInfo = (*it).second;
  -        if (pHandlerInfo->m_nObjCount != 0);  /* It seems that some objects 
  -                                               * created have not been deleted 
  -					       * - unexpected
  -					       */ 
  +        if (pHandlerInfo->m_nObjCount != 0);  /* It seems that some objects
  +                                               * created have not been deleted
  +					                           * - unexpected
  +					                           */
               unloadLib (pHandlerInfo);
           delete pHandlerInfo;
       }
       unlock ();
  -#if defined(US_LTDL)
  -    lt_dlexit ();
  -#endif
  +    PLATFORM_LOADLIBEXIT()
   }
   
   int HandlerLoader::deleteHandler (BasicHandler* pHandler, int nLibId)
  @@ -72,52 +70,32 @@
           pHandlerInfo->m_Delete (pHandler);
           if (pHandlerInfo->m_nObjCount == 0);  //time to unload the DLL
               unlock ();
  -        return AXIS_SUCCESS;
       }
       else
       {
           unlock ();
           throw AxisEngineException(SERVER_ENGINE_HANDLER_NOT_LOADED);
       }
  +    return AXIS_SUCCESS;
   }
   
   int HandlerLoader::loadLib (HandlerInformation* pHandlerInfo)
   {
  -//#ifdef WIN32
  -#if defined(USE_LTDL)
  -    pHandlerInfo->m_Handler = lt_dlopen (pHandlerInfo->m_sLib.c_str ());
  +    pHandlerInfo->m_Handler = PLATFORM_LOADLIB(pHandlerInfo->m_sLib.c_str());
  +
       if (!pHandlerInfo->m_Handler)
       {
           AXISTRACE1("SERVER_ENGINE_LIBRARY_LOADING_FAILED", CRITICAL);
           throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED);
       }
  -#elif defined(WIN32)
  -    pHandlerInfo->m_Handler = LoadLibrary (pHandlerInfo->m_sLib.c_str ());
  -#else //Linux
  -    pHandlerInfo->m_nLoadOptions = RTLD_LAZY;
  -    pHandlerInfo->m_Handler =
  -        dlopen (pHandlerInfo->m_sLib.c_str (), pHandlerInfo->m_nLoadOptions);
  -    if (!pHandlerInfo->m_Handler)
  -    {
  -        AXISTRACE1("DLOPEN FAILED", CRITICAL);
  -        throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED);
  -        //printf ("DLOPEN FAILED: %s\n", dlerror ());
  -        //exit (1);
  -    }
  -#endif
  -    return (pHandlerInfo->m_Handler != 0) ? AXIS_SUCCESS : AXIS_FAIL;
  +
  +    return AXIS_SUCCESS;
   }
   
   int HandlerLoader::unloadLib (HandlerInformation* pHandlerInfo)
   {
  -//#ifdef WIN32
  -#if defined(USE_LTDL)
  -    lt_dlclose (pHandlerInfo->m_Handler);
  -#elif defined(WIN32)
  -    FreeLibrary (pHandlerInfo->m_Handler);
  -#else //Linux
  -    dlclose (pHandlerInfo->m_Handler);
  -#endif
  +    PLATFORM_UNLOADLIB(pHandlerInfo->m_Handler);
  +
       return AXIS_SUCCESS;
   }
   
  @@ -136,34 +114,17 @@
               unlock ();
               AXISTRACE1("SERVER_CONFIG_LIBRARY_PATH_EMPTY", CRITICAL);
               throw AxisConfigException(SERVER_CONFIG_LIBRARY_PATH_EMPTY);
  -            //return SERVER_CONFIG_LIBRARYPATHEMPTY;
           }
  -        // pHandlerInfo->m_nLoadOptions = RTLD_LAZY;
  +
           if (AXIS_SUCCESS == loadLib (pHandlerInfo))
           {
  -            //#ifdef WIN32
  -#if defined(USE_LTDL)
               pHandlerInfo->m_Create =
  -                (CREATE_OBJECT) lt_dlsym (pHandlerInfo->m_Handler,
  +                (CREATE_OBJECT) PLATFORM_GETPROCADDR(pHandlerInfo->m_Handler,
                   CREATE_FUNCTION);
               pHandlerInfo->m_Delete =
  -                (DELETE_OBJECT) lt_dlsym (pHandlerInfo->m_Handler,
  +                (DELETE_OBJECT) PLATFORM_GETPROCADDR(pHandlerInfo->m_Handler,
                   DELETE_FUNCTION);
  -#elif defined(WIN32)
  -            pHandlerInfo->m_Create =
  -                (CREATE_OBJECT) GetProcAddress (pHandlerInfo->m_Handler,
  -                CREATE_FUNCTION);
  -            pHandlerInfo->m_Delete =
  -                (DELETE_OBJECT) GetProcAddress (pHandlerInfo->m_Handler,
  -                DELETE_FUNCTION);
  -#else //Linux
  -            pHandlerInfo->m_Create =
  -                (CREATE_OBJECT) dlsym (pHandlerInfo->m_Handler,
  -                CREATE_FUNCTION);
  -            pHandlerInfo->m_Delete =
  -                (DELETE_OBJECT) dlsym (pHandlerInfo->m_Handler, 
  -                DELETE_FUNCTION);
  -#endif
  +
               if (!pHandlerInfo->m_Create || !pHandlerInfo->m_Delete)
               {
                   unloadLib (pHandlerInfo);
  @@ -171,7 +132,6 @@
                   unlock ();
                   AXISTRACE1 ("Library loading failed", CRITICAL);
                   throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED);
  -                //return SERVER_ENGINE_LIBRARYLOADINGFAILED;
               }
               else // success
               {
  @@ -183,7 +143,6 @@
               unlock ();
               AXISTRACE1 ("Library loading failed", CRITICAL);
               throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED);
  -            //return SERVER_ENGINE_LIBRARYLOADINGFAILED;
           }
       }
   
  @@ -199,8 +158,6 @@
               {
                   pHandlerInfo->m_nObjCount++;
                   *pHandler = pBH;
  -                unlock ();
  -                return AXIS_SUCCESS;
               }
               else
               {
  @@ -209,14 +166,12 @@
                   unlock ();
                   AXISTRACE1("SERVER_ENGINE_HANDLER_INIT_FAILED", CRITICAL);
                   throw AxisEngineException(SERVER_ENGINE_HANDLER_INIT_FAILED);
  -                //return SERVER_ENGINE_HANDLERINITFAILED;
               }
           }
           else if (0 == pBH->_object)
           {
               AXISTRACE1("SERVER_ENGINE_HANDLER_CREATION_FAILED", CRITICAL);
               throw AxisEngineException(SERVER_ENGINE_HANDLER_CREATION_FAILED);
  -            //return SERVER_ENGINE_HANDLERCREATIONFAILED;
           }
           else
           /* C++ service or handler */
  @@ -225,8 +180,6 @@
               {
                   pHandlerInfo->m_nObjCount++;
                   *pHandler = pBH;
  -                unlock ();
  -                return AXIS_SUCCESS;
               }
               else
               {
  @@ -235,7 +188,6 @@
                   unlock ();
                   AXISTRACE1("SERVER_ENGINE_HANDLER_INIT_FAILED", CRITICAL);
                   throw AxisEngineException(SERVER_ENGINE_HANDLER_INIT_FAILED);
  -                //return SERVER_ENGINE_HANDLERINITFAILED;
               }
           }
       }
  @@ -244,8 +196,10 @@
           unlock ();
           AXISTRACE1("SERVER_ENGINE_HANDLER_CREATION_FAILED", CRITICAL);
           throw AxisEngineException(SERVER_ENGINE_HANDLER_CREATION_FAILED);
  -        //return SERVER_ENGINE_HANDLERCREATIONFAILED;
       }
  +
  +    unlock ();
  +    return AXIS_SUCCESS;
   }
   
   AXIS_CPP_NAMESPACE_END
  
  
  
  1.17      +2 -11     ws-axis/c/src/engine/HandlerLoader.h
  
  Index: HandlerLoader.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/HandlerLoader.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- HandlerLoader.h	26 Oct 2004 10:21:59 -0000	1.16
  +++ HandlerLoader.h	1 Nov 2004 15:04:49 -0000	1.17
  @@ -19,6 +19,8 @@
   #if !defined(__HANDLERLOADER_H_OF_AXIS_INCLUDED__)
   #define __HANDLERLOADER_H_OF_AXIS_INCLUDED__
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include "../common/MessageData.h"
   #include <axis/server/GDefine.hpp>
   #include <axis/server/WrapperClassHandler.hpp>
  @@ -41,17 +43,6 @@
   
   AXIS_CPP_NAMESPACE_END
   
  -#if defined(USE_LTDL)
  -#include <ltdl.h>
  -#define DLHandler lt_dlhandle
  -#elif defined(WIN32)
  -#include <windows.h>
  -#define DLHandler HINSTANCE
  -#define RTLD_LAZY 0
  -#else //Linux
  -#include <dlfcn.h>
  -#define DLHandler void*
  -#endif
   
   //status codes
   /*#define HANDLER_INIT_FAIL	1
  
  
  
  1.18      +24 -68    ws-axis/c/src/engine/SOAPTransportFactory.cpp
  
  Index: SOAPTransportFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SOAPTransportFactory.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SOAPTransportFactory.cpp	28 Sep 2004 11:07:18 -0000	1.17
  +++ SOAPTransportFactory.cpp	1 Nov 2004 15:04:49 -0000	1.18
  @@ -21,6 +21,8 @@
    *
    */
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include "SOAPTransportFactory.h"
   #include "../transport/SOAPTransport.h"
   #include <stdio.h>
  @@ -56,74 +58,45 @@
   
   	if (!loadLib())
   	{
  -#if defined(USE_LTDL)
  -        m_Create = (CREATE_OBJECT1) lt_dlsym(m_LibHandler, CREATE_FUNCTION1);
  -        m_Delete = (DELETE_OBJECT1) lt_dlsym(m_LibHandler, DELETE_FUNCTION1);
  -#elif defined(WIN32)
  -        m_Create = (CREATE_OBJECT1) GetProcAddress(m_LibHandler, CREATE_FUNCTION1);
  -        m_Delete = (DELETE_OBJECT1) GetProcAddress(m_LibHandler, DELETE_FUNCTION1);
  -#else
  -        m_Create = (CREATE_OBJECT1) dlsym(m_LibHandler, CREATE_FUNCTION1);
  -        m_Delete = (DELETE_OBJECT1) dlsym(m_LibHandler, DELETE_FUNCTION1);
  -#endif
  +        m_Create = (CREATE_OBJECT1) PLATFORM_GETPROCADDR(m_LibHandler, CREATE_FUNCTION1);
  +        m_Delete = (DELETE_OBJECT1) PLATFORM_GETPROCADDR(m_LibHandler, DELETE_FUNCTION1);
  +
           if (!m_Create || !m_Delete)
           {
               unloadLib();
  -                        AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  -                        throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED,  strdup(m_pcLibraryPath));
  -			//throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
  +            AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  +            throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED,  strdup(m_pcLibraryPath));
           }
           else
           {
               // Load function to do lib level inits
               void (*initializeLibrary) (void);
  -#if defined(USE_LTDL)
  -            initializeLibrary = (void (*)(void))lt_dlsym(m_LibHandler, INIT_FUNCTION);
  -#elif defined(WIN32)
  -            initializeLibrary = (void (*)(void))GetProcAddress(m_LibHandler, INIT_FUNCTION);
  -#else
  -            initializeLibrary = (void (*)(void))dlsym(m_LibHandler, INIT_FUNCTION);
  -#endif
  +            initializeLibrary = (void (*)(void))PLATFORM_GETPROCADDR(m_LibHandler, INIT_FUNCTION);
  +
               if (initializeLibrary)
                    (*initializeLibrary)();
   
   /*
               // Load functions that does start and stop of event loop
  -#if defined(USE_LTDL)
  -            m_startEventLoop = (void (*)(void))lt_dlsym(m_LibHandler, START_EVENT_LOOP_FUNCTION);
  -            m_stopEventLoop = (void (*)(void))lt_dlsym(m_LibHandler, STOP_EVENT_LOOP_FUNCTION);
  -#elif defined(WIN32)
  -            m_startEventLoop = (void (*)(void))GetProcAddress(m_LibHandler, START_EVENT_LOOP_FUNCTION);
  -            m_stopEventLoop = (void (*)(void))GetProcAddress(m_LibHandler, STOP_EVENT_LOOP_FUNCTION);
  -#else
  -            m_startEventLoop = (void (*)(void))dlsym(m_LibHandler, START_EVENT_LOOP_FUNCTION);
  -            m_stopEventLoop = (void (*)(void))dlsym(m_LibHandler, STOP_EVENT_LOOP_FUNCTION);
  -#endif
  -*/             
  -            return AXIS_SUCCESS;
  +            m_startEventLoop = (void (*)(void))PLATFORM_GETPROCADDR(m_LibHandler, START_EVENT_LOOP_FUNCTION);
  +            m_stopEventLoop = (void (*)(void))PLATFORM_GETPROCADDR(m_LibHandler, STOP_EVENT_LOOP_FUNCTION);
  +*/
           }		
   	}
   	else
   	{
  -                AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  -                throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED,  strdup(m_pcLibraryPath));
  -		//throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
  +        AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  +        throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED,  strdup(m_pcLibraryPath));
   	}
  -	return AXIS_FAIL;
  +	return AXIS_SUCCESS;
   }
   
   int SOAPTransportFactory::uninitialize()
   {
  -            void (*uninitializeLibrary) (void);
  -#if defined(USE_LTDL)
  -            uninitializeLibrary = (void (*)(void))lt_dlsym(m_LibHandler, UNINIT_FUNCTION);
  -#elif defined(WIN32)
  -            uninitializeLibrary = (void (*)(void))GetProcAddress(m_LibHandler, UNINIT_FUNCTION);
  -#else
  -            uninitializeLibrary = (void (*)(void))dlsym(m_LibHandler, UNINIT_FUNCTION);
  -#endif
  -            if (uninitializeLibrary)
  -                 (*uninitializeLibrary)();
  +   void (*uninitializeLibrary) (void);
  +   uninitializeLibrary = (void (*)(void))PLATFORM_GETPROCADDR(m_LibHandler, UNINIT_FUNCTION);
  +   if (uninitializeLibrary)
  +        (*uninitializeLibrary)();
   	return unloadLib();
   }
   
  @@ -144,37 +117,20 @@
   
   int SOAPTransportFactory::loadLib()
   {
  -#if defined(USE_LTDL)
  -    m_LibHandler = lt_dlopen(m_pcLibraryPath);
  -    if (!m_LibHandler)
  -    {
  -        AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  -        //printf("DLOPEN FAILED in loading transport library: %s\n", lt_dlerror ());
  -        throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED);
  -    }
  -#elif defined(WIN32)
  -    m_LibHandler = LoadLibrary(m_pcLibraryPath);
  -#else 
  -    m_LibHandler = dlopen(m_pcLibraryPath, RTLD_LAZY);
  -#endif
  +    m_LibHandler = PLATFORM_LOADLIB(m_pcLibraryPath);
  +
       if (!m_LibHandler)
       {
           AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  -        //printf("DLOPEN FAILED in loading transport library: %s\n", dlerror());
           throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED);
       }
  -    return (m_LibHandler != 0) ? AXIS_SUCCESS : AXIS_FAIL;
  +    return AXIS_SUCCESS;
   }
   
   int SOAPTransportFactory::unloadLib()
   {
  -#if defined(USE_LTDL)
  -    lt_dlclose(m_LibHandler);
  -#elif defined(WIN32)
  -    FreeLibrary(m_LibHandler);
  -#else 
  -    dlclose(m_LibHandler);
  -#endif
  +    PLATFORM_UNLOADLIB(m_LibHandler);
  +
       return AXIS_SUCCESS;
   }
   
  
  
  
  1.7       +2 -12     ws-axis/c/src/engine/SOAPTransportFactory.h
  
  Index: SOAPTransportFactory.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SOAPTransportFactory.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SOAPTransportFactory.h	26 Oct 2004 10:21:59 -0000	1.6
  +++ SOAPTransportFactory.h	1 Nov 2004 15:04:49 -0000	1.7
  @@ -25,6 +25,8 @@
   #if !defined(AXIS_SOAPTRANSPORTFACTORY_H__OF_AXIS_INCLUDED_)
   #define AXIS_SOAPTRANSPORTFACTORY_H__OF_AXIS_INCLUDED_
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include <axis/server/GDefine.hpp>
   
   #define CREATE_FUNCTION1 "CreateInstance"
  @@ -41,18 +43,6 @@
   //function to stop event loop for transport (libWWW)
   #define STOP_EVENT_LOOP_FUNCTION "stopEventLoop"
   */
  -
  -#if defined(USE_LTDL)
  -#include <ltdl.h>
  -#define DLHandler lt_dlhandle
  -#elif defined(WIN32)
  -#include <windows.h>
  -#define DLHandler HINSTANCE
  -#define RTLD_LAZY 0
  -#else /* Linux */
  -#include <dlfcn.h>
  -#define DLHandler void*
  -#endif
   
   AXIS_CPP_NAMESPACE_START
   
  
  
  
  1.17      +15 -43    ws-axis/c/src/engine/XMLParserFactory.cpp
  
  Index: XMLParserFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/XMLParserFactory.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- XMLParserFactory.cpp	23 Sep 2004 15:12:57 -0000	1.16
  +++ XMLParserFactory.cpp	1 Nov 2004 15:04:49 -0000	1.17
  @@ -21,6 +21,8 @@
    *
    */
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include "XMLParserFactory.h"
   #include "../xml/XMLParser.h"
   #include <stdio.h>
  @@ -54,35 +56,21 @@
   
   	if (!loadLib())
   	{
  -#if defined(USE_LTDL)
  -        m_Create = (CREATE_OBJECT2) lt_dlsym(m_LibHandler, CREATE_FUNCTION2);
  -        m_Delete = (DELETE_OBJECT2) lt_dlsym(m_LibHandler, DELETE_FUNCTION2);
  -#elif defined(WIN32)
  -        m_Create = (CREATE_OBJECT2) GetProcAddress(m_LibHandler, CREATE_FUNCTION2);
  -        m_Delete = (DELETE_OBJECT2) GetProcAddress(m_LibHandler, DELETE_FUNCTION2);
  -#else
  -        m_Create = (CREATE_OBJECT2) dlsym(m_LibHandler, CREATE_FUNCTION2);
  -        m_Delete = (DELETE_OBJECT2) dlsym(m_LibHandler, DELETE_FUNCTION2);
  -#endif
  +        m_Create = (CREATE_OBJECT2) PLATFORM_GETPROCADDR(m_LibHandler, CREATE_FUNCTION2);
  +        m_Delete = (DELETE_OBJECT2) PLATFORM_GETPROCADDR(m_LibHandler, DELETE_FUNCTION2);
           if (!m_Create || !m_Delete)
           {
               unloadLib();
  -                        AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  -                        throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, strdup(m_pcLibraryPath));
  -			//throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
  +            AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  +            throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, strdup(m_pcLibraryPath));
           }
  -        else
  -        {
  -            return AXIS_SUCCESS;
  -        }		
   	}
   	else
   	{
  -                AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  -                throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, strdup(m_pcLibraryPath));
  -		//throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
  +        AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  +        throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, strdup(m_pcLibraryPath));
   	}
  -	return AXIS_FAIL;
  +   return AXIS_SUCCESS;
   }
   
   int XMLParserFactory::uninitialize()
  @@ -107,37 +95,21 @@
   
   int XMLParserFactory::loadLib()
   {
  -#if defined(USE_LTDL)
  -    m_LibHandler = lt_dlopen(m_pcLibraryPath);
  -    if (!m_LibHandler)
  -    {
  -        AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  -        throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED);
  -        //printf("DLOPEN FAILED in loading parser library: %s\n", lt_dlerror ());
  -    }
  -#elif defined(WIN32)
  -    m_LibHandler = LoadLibrary(m_pcLibraryPath);
  -#else 
  -    m_LibHandler = dlopen(m_pcLibraryPath, RTLD_LAZY);
  +    m_LibHandler = PLATFORM_LOADLIB(m_pcLibraryPath);
  +
       if (!m_LibHandler)
       {
           AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
           throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED);
  -        //printf("DLOPEN FAILED in loading parser library: %s\n", dlerror());
       }
  -#endif
  -    return (m_LibHandler != 0) ? AXIS_SUCCESS : AXIS_FAIL;
  +
  +    return AXIS_SUCCESS;
   }
   
   int XMLParserFactory::unloadLib()
   {
  -#if defined(USE_LTDL)
  -    lt_dlclose(m_LibHandler);
  -#elif defined(WIN32)
  -    FreeLibrary(m_LibHandler);
  -#else 
  -    dlclose(m_LibHandler);
  -#endif
  +    PLATFORM_UNLOADLIB(m_LibHandler);
  +
       return AXIS_SUCCESS;
   }
   
  
  
  
  1.6       +2 -12     ws-axis/c/src/engine/XMLParserFactory.h
  
  Index: XMLParserFactory.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/XMLParserFactory.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLParserFactory.h	26 Oct 2004 10:21:59 -0000	1.5
  +++ XMLParserFactory.h	1 Nov 2004 15:04:49 -0000	1.6
  @@ -25,23 +25,13 @@
   #if !defined(AXIS_XMLPARSERFACTORY_H__OF_AXIS_INCLUDED_)
   #define AXIS_XMLPARSERFACTORY_H__OF_AXIS_INCLUDED_
   
  +#include "../platforms/PlatformAutoSense.hpp"
  +
   #include <axis/server/GDefine.hpp>
   #include "../xml/XMLParser.h"
   
   #define CREATE_FUNCTION2 "CreateInstance"
   #define DELETE_FUNCTION2 "DestroyInstance"
  -
  -#if defined(USE_LTDL)
  -#include <ltdl.h>
  -#define DLHandler lt_dlhandle
  -#elif defined(WIN32)
  -#include <windows.h>
  -#define DLHandler HINSTANCE
  -#define RTLD_LAZY 0
  -#else /* Linux */
  -#include <dlfcn.h>
  -#define DLHandler void*
  -#endif
   
   typedef int (* CREATE_OBJECT2) (XMLParser** inst);
   typedef int (* DELETE_OBJECT2) (XMLParser* inst);
  
  
  
  1.1                  ws-axis/c/src/platforms/PlatformAutoSense.hpp
  
  Index: PlatformAutoSense.hpp
  ===================================================================
  /*
   *   Copyright 2004-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  
  #if !defined(_PLATFORM_AUTOSENSE_HPP)
  #define _PLATFORM_AUTOSENSE_HPP
  
  
  #if defined( WIN32 )
    #include "windows/PlatformSpecificWindows.hpp"
  #elif defined ( __OS400__  )
    #include "os400/PlatformSpecificOS400.hpp"
  #else
    #include "unix/PlatformSpecificUnix.hpp"
  #endif
  
  
  #endif
  
  
  
  
  
  1.1                  ws-axis/c/src/platforms/os400/PlatformSpecificOS400.cpp
  
  Index: PlatformSpecificOS400.cpp
  ===================================================================
  /*
   *   Copyright 2004-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  
  #include "PlatformSpecificOS400.hpp"
  
  #include <ctype.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <qusec.h>                      // Qus_EC_t
  #include <mih/rslvsp.h>                 // rslvsp()
  #include <mih/micommon.h>               // _AUTH_EXECUTE
  #include <qleawi.h>                     // QleActBndPgm(), QleGetExp()
  #include <qp0lstdi.h>                   // Qp0lCvtPathToQSYSObjName()
  #include <unistd.h>                     // readlink()
  #include <except.h>
  
  typedef int HMODULE;
  
  /*
   * ==========================================
   * dlopen()
   * Gain access to an executable object file.
   * ==========================================
   */
  void * os400_dlopen(const char *file)
  {
      Qus_EC_t err = { sizeof(err),  0};
  
      // Assume symbolic link, if error, assume actual path
      char  dllPath[4*1024+1];
      memset(dllPath, 0x00, 4*1024+1);
      int rc = readlink ( file  , dllPath, 4*1024);
      if (rc == -1)
         strcpy(dllPath, file);
  
      // Uppercase file
      char *fp = dllPath;
      while (*fp++) *fp = toupper(*fp);
  
      // Parse the path to its QSYS.LIB file system name: library and service program.
      char pathNameBuffer[8*1024];
      Qlg_Path_Name_T *pathName = (Qlg_Path_Name_T *)pathNameBuffer;
      Qp0l_QSYS_Info_t  qsys_info;
  
      memset(pathNameBuffer, 0x00, sizeof (pathNameBuffer));
      pathName->Path_Length = strlen(dllPath);
      memcpy( &(((char *) pathName)[sizeof(Qlg_Path_Name_T)]), dllPath, pathName->Path_Length);
      pathName->Path_Name_Delimiter[0] = '/';
  
      Qp0lCvtPathToQSYSObjName(pathName,&qsys_info,"QSYS0100",sizeof(Qp0l_QSYS_Info_t), 0, &err);
  
      if (err.Bytes_Available)
          return NULL;
  
      // blank pad object name and library in order to use on rslvsp().
      char objectName[11];
      char objectLibrary[11];
      sprintf(objectName,   "%-10.10s", qsys_info.Obj_Name);
      sprintf(objectLibrary,"%-10.10s", qsys_info.Lib_Name);
  
      _SYSPTR sysP;
      _OBJ_TYPE_T objectType;
  
  #pragma exception_handler (LBL_RSLV_EH, 0,_C1_ALL,_C2_MH_ESCAPE |_C2_MH_FUNCTION_CHECK, _CTLA_HANDLE)
  
      // Resolve pointer to DLL.
      objectType = WLI_SRVPGM;
      sysP = rslvsp(objectType,objectName, objectLibrary,_AUTH_EXECUTE);
  
  #pragma disable_handler
  
      // We got a pointer to the DLL.  Activate it (i.e. load it).
      HMODULE handle;
      int actInfoLen;
      Qle_ABP_Info_t activationInfo;
      actInfoLen = sizeof(activationInfo);
      QleActBndPgm (&sysP,&handle,&activationInfo,&actInfoLen,&err);
      if (err.Bytes_Available)
          return NULL;
  
      // Return the dlopen object.
      void *returnHandle = malloc(sizeof(HMODULE));
      memcpy(returnHandle, &handle, sizeof(HMODULE));
      return returnHandle;
  
      LBL_RSLV_EH:
        return NULL;
  }
  
  /*
   * dlsym()
   * Obtain the address to symbol from a dlopen() object.
   */
  void * os400_dlsym(void *handle, const char * name)
  {
      void *symbolAddress = NULL;
      int exportType;
  
      Qus_EC_t err = {sizeof(err),0 };
  
  #pragma exception_handler (LBL_RSLV_EH, 0,_C1_ALL,_C2_MH_ESCAPE |_C2_MH_FUNCTION_CHECK, _CTLA_HANDLE)
  
      // Get the function pointer.
      // Export type of 1 means that that the pointer is to a procedure.
  
      QleGetExp ((int *)handle,0,0,(char *)name,&symbolAddress,&exportType,&err);
      if (err.Bytes_Available)
          return NULL;
  
      return symbolAddress;
  
  #pragma disable_handler
  
      LBL_RSLV_EH:
        return NULL;
  }
  
  
  /*
   * ==========================================
   * dlclose()
   * Close a dlopen() object.
   * ==========================================
   */
  int os400_dlclose(void *handle)
  {
      *(int *)handle = -1;
      free(handle);
      return 0;
  }
  
  
  
  
  
  1.1                  ws-axis/c/src/platforms/os400/PlatformSpecificOS400.hpp
  
  Index: PlatformSpecificOS400.hpp
  ===================================================================
  /*
   *   Copyright 2004-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  
  #if !defined(_PLATFORM_SPECIFIC_OS400_HPP)
  #define _PLATFORM_SPECIFIC_OS400_HPP
  
  
  // =============================================================
  // Default paths to shared library/DLLs and files
  // =============================================================
  #define PLATFORM_XMLPARSER_PATH      "/usr/local/axiscpp_deploy/lib/libaxis_xmlparser.so"
  #define PLATFORM_TRANSPORTHTTP_PATH  "/usr/local/axiscpp_deploy/lib/libaxis_transport.so"
  
  #define PLATFORM_LOG_PATH            "/usr/local/axiscpp_deploy/log/AxisLog"
  #define PLATFORM_CLIENTLOG_PATH      "/usr/local/axiscpp_deploy/log/AxisClientLog"
  #define PLATFORM_CONFIG_PATH         "/etc/axiscpp.conf"
  
  // =============================================================
  // Library loading and procedure resolution
  // =============================================================
  #define DLHandler void*
  #define RTLD_LAZY 0    // not sure this is needed?
  
  #define PLATFORM_LOADLIBINIT()
  #define PLATFORM_LOADLIB(_lib)     os400_dlopen(_lib)
  #define PLATFORM_UNLOADLIB         os400_dlclose
  #define PLATFORM_GETPROCADDR       os400_dlsym
  #define PLATFORM_LOADLIBEXIT()
  
  extern void	*os400_dlopen(const char *);
  extern void	*os400_dlsym(void *, const char *);
  extern int   os400_dlclose(void *);
  
  // =============================================================
  // National Language Support
  // =============================================================
  
  // STRTOASC is to translate single byte 'native' character representation to ASCII
  // ASCTOSTR is to translate single byte ascii representation to 'native' character (EBCDIC)
  // CANNOT be used with constants
  extern char*      cvtSingleByteEbcdicToAsciiStr( char* );
  extern char*      cvtSingleByteAsciiToEbcdicStr( char* );
  #define PLATFORM_STRTOASC( x ) cvtSingleByteEbcdicToAsciiStr( (char*)(x) )
  #define PLATFORM_ASCTOSTR( x ) cvtSingleByteAsciiToEbcdicStr( (char*)(x) )
  
  #endif
  
  
  
  
  
  1.1                  ws-axis/c/src/platforms/unix/PlatformSpecificUnix.hpp
  
  Index: PlatformSpecificUnix.hpp
  ===================================================================
  /*
   *   Copyright 2004-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  
  #if !defined(_PLATFORM_SPECIFIC_UNIX_HPP)
  #define _PLATFORM_SPECIFIC_UNIX_HPP
  
  
  // =============================================================
  // Default paths to shared library/DLLs and files
  // =============================================================
  #define PLATFORM_XMLPARSER_PATH      "/usr/local/axiscpp_deploy/lib/libaxis_xmlparser.so"
  #define PLATFORM_TRANSPORTHTTP_PATH  "/usr/local/axiscpp_deploy/lib/libaxis_transport.so"
  
  #define PLATFORM_LOG_PATH            "/usr/local/axiscpp_deploy/log/AxisLog"
  #define PLATFORM_CLIENTLOG_PATH      "/usr/local/axiscpp_deploy/log/AxisClientLog"
  #define PLATFORM_CONFIG_PATH         "/etc/axiscpp.conf"
  
  // =============================================================
  // Library loading and procedure resolution
  // =============================================================
  #ifdef USE_LTDL
   #include <ltdl.h>
   #define DLHandler lt_dlhandle
  
   #define PLATFORM_LOADLIBINIT       lt_dlinit
   #define PLATFORM_LOADLIB(_lib)     lt_dlopen(_lib)
   #define PLATFORM_UNLOADLIB         lt_dlclose
   #define PLATFORM_GETPROCADDR       lt_dlsym
   #define PLATFORM_LOADLIBEXIT       lt_dlexit
  #else
   #include <dlfcn.h>
   #define DLHandler void*
  
   #define PLATFORM_LOADLIBINIT()
   #define PLATFORM_LOADLIB(_lib)     dlopen(_lib, RTLD_LAZY)
   #define PLATFORM_UNLOADLIB         dlclose
   #define PLATFORM_GETPROCADDR       dlsym
   #define PLATFORM_LOADLIBEXIT()
  #endif
  
  // =============================================================
  // National Language Support
  // =============================================================
  
  // STRTOASC is to translate single byte 'native' character representation to ASCII
  // ASCTOSTR is to translate single byte ascii representation to 'native' character
  // CANNOT be used with constants
  #define PLATFORM_STRTOASC( x ) ( x )
  #define PLATFORM_ASCTOSTR( x ) ( x )
  
  #endif
  
  
  
  
  
  1.1                  ws-axis/c/src/platforms/windows/PlatformSpecificWindows.hpp
  
  Index: PlatformSpecificWindows.hpp
  ===================================================================
  /*
   *   Copyright 2004-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  
  #if !defined( _PLATFORM_SPECIFIC_WINDOWS_HPP )
  #define _PLATFORM_SPECIFIC_WINDOWS_HPP
  
  #include <windows.h>
  
  // =============================================================
  // Default paths to shared library/DLLs and files
  // =============================================================
  #ifdef _DEBUG
    #define PLATFORM_XMLPARSER_PATH      "AxisXMLParser_D.dll"
    #define PLATFORM_TRANSPORTHTTP_PATH  "AxisTransport_D.dll"
  #else
    #define PLATFORM_XMLPARSER_PATH      "AxisXMLParser.dll"
    #define PLATFORM_TRANSPORTHTTP_PATH  "AxisTransport.dll"
  #endif
  
  #define PLATFORM_LOG_PATH            ""
  #define PLATFORM_CLIENTLOG_PATH      ""
  #define PLATFORM_CONFIG_PATH         "/axiscpp.conf"
  
  // =============================================================
  // Library loading and procedure resolution
  // =============================================================
  #define DLHandler HINSTANCE
  #define RTLD_LAZY 0    // not sure this is needed?
  
  #define PLATFORM_LOADLIBINIT()
  #define PLATFORM_LOADLIB(_lib)     LoadLibrary(_lib)
  #define PLATFORM_UNLOADLIB         FreeLibrary
  #define PLATFORM_GETPROCADDR       GetProcAddress
  #define PLATFORM_LOADLIBEXIT()
  
  // =============================================================
  // National Language Support
  // =============================================================
  
  // STRTOASC is to translate single byte 'native' character representation to ASCII
  // ASCTOSTR is to translate single byte ascii representation to 'native' character
  // CANNOT be used with constants
  #define PLATFORM_STRTOASC( x ) ( x )
  #define PLATFORM_ASCTOSTR( x ) ( x )
  
  #endif
  
  
  
  
  

Mime
View raw message