You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2004/03/10 08:05:00 UTC

cvs commit: ws-axis/c/src/server/apache Makefile.am

damitha     2004/03/09 23:05:00

  Modified:    c/include/axis/engine HandlerLoader.h
               c/samples/client/interoptests/base InteropTestPortType.cpp
                        Makefile.am
               c/samples/client/interoptests/cbase Makefile.am
               c/samples/server/interoptests/base Makefile.am
               c/samples/server/interoptests/cbase Makefile.am
               c/src/client Makefile.am
               c/src/engine HandlerLoader.cpp Makefile.am
               c/src/server/apache Makefile.am
  Log:
  Applied Joe Bester's patch for ltdl dynamic loading mechanism
  
  Revision  Changes    Path
  1.3       +4 -1      ws-axis/c/include/axis/engine/HandlerLoader.h
  
  Index: HandlerLoader.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/engine/HandlerLoader.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HandlerLoader.h	14 Jan 2004 12:57:10 -0000	1.2
  +++ HandlerLoader.h	10 Mar 2004 07:04:59 -0000	1.3
  @@ -76,7 +76,10 @@
   typedef int (* CREATE_OBJECT)(BasicHandler **inst);
   typedef int (* DELETE_OBJECT)(BasicHandler *inst);
   
  -#ifdef WIN32
  +#if defined(USE_LTDL)
  +#include "ltdl.h"
  +#define DLHandler lt_dlhandle
  +#elif defined(WIN32)
   #include <windows.h>
   #define DLHandler HINSTANCE
   #define RTLD_LAZY 0
  
  
  
  1.6       +1 -1      ws-axis/c/samples/client/interoptests/base/InteropTestPortType.cpp
  
  Index: InteropTestPortType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/base/InteropTestPortType.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InteropTestPortType.cpp	8 Mar 2004 05:43:46 -0000	1.5
  +++ InteropTestPortType.cpp	10 Mar 2004 07:04:59 -0000	1.6
  @@ -18,7 +18,7 @@
   {
   	m_pCall = new Call();
   	m_pCall->SetProtocol(APTHTTP);
  -	m_pCall->SetEndpointURI("http://localhost:80/axis/InteropBase");
  +	m_pCall->SetEndpointURI("http://192.168.101.4:80/axis/InteropBase");
   }
   
   InteropTestPortType::~InteropTestPortType()
  
  
  
  1.3       +2 -1      ws-axis/c/samples/client/interoptests/base/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/base/Makefile.am,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.am	27 Jan 2004 05:47:03 -0000	1.2
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.3
  @@ -3,5 +3,6 @@
   AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
   interopbase_SOURCES = InteropBaseClient.cpp InteropTestPortType.cpp  SOAPStruct.cpp 
   
  -interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lssl
  +interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -lltdl -lssl
  +#interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lssl
   INCLUDES = -I$(AXISCPP_HOME)/include
  
  
  
  1.2       +2 -1      ws-axis/c/samples/client/interoptests/cbase/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/cbase/Makefile.am,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.am	29 Jan 2004 08:08:32 -0000	1.1
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.2
  @@ -3,5 +3,6 @@
   AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
   interopbase_SOURCES = InteropBaseClient.c InteropTestPortType.c  SOAPStruct.c
   
  -interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lssl -lstdc++
  +#interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lssl -lstdc++
  +interopbase_LDADD   =  $(AXISCPP_HOME)/lib/axis/libaxiscpp_client.a $(AXISCPP_HOME)/bin/libaxiscpp_mod.a -L$(AXISCPP_HOME)/lib/expat -lexpat -lltdl -lssl -lstdc++
   INCLUDES = -I$(AXISCPP_HOME)/include
  
  
  
  1.3       +2 -1      ws-axis/c/samples/server/interoptests/base/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/Makefile.am,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.am	27 Jan 2004 05:47:05 -0000	1.2
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.3
  @@ -1,6 +1,7 @@
   lib_LTLIBRARIES = libinteropbase.la
   SUBDIRS =
   libinteropbase_la_SOURCES = InteropTestPortType.cpp InteropTestPortTypeService.cpp  SOAPStruct.cpp InteropTestPortTypeWrapper.cpp
  -libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
  +#libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
  +libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -lltdl -lstdc++
   
   INCLUDES = -I$(AXISCPP_HOME)/include
  
  
  
  1.2       +2 -1      ws-axis/c/samples/server/interoptests/cbase/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/cbase/Makefile.am,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.am	29 Jan 2004 08:08:33 -0000	1.1
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.2
  @@ -1,6 +1,7 @@
   lib_LTLIBRARIES = libinteropbase.la
   SUBDIRS =
   libinteropbase_la_SOURCES = InteropTestPortType.c InteropTestPortTypeService.c  SOAPStruct.c InteropTestPortTypeWrapper.c
  -libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
  +#libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
  +libinteropbase_la_LIBADD   = -L$(AXISCPP_HOME)/lib/expat -lexpat -lltdl -lstdc++
   
   INCLUDES = -I$(AXISCPP_HOME)/include
  
  
  
  1.4       +2 -1      ws-axis/c/src/client/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/Makefile.am,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.am	21 Oct 2003 03:50:15 -0000	1.3
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.4
  @@ -2,6 +2,7 @@
   SUBDIRS = transport
   AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
   libaxiscpp_client_la_SOURCES =	Call.cpp
  -libaxiscpp_client_la_LIBADD   = ./transport/axis/libtransport.la -ldl -lstdc++
  +#libaxiscpp_client_la_LIBADD   = ./transport/axis/libtransport.la -ldl -lstdc++
  +libaxiscpp_client_la_LIBADD   = ./transport/axis/libtransport.la -lltdl -lstdc++
   
   INCLUDES = -I$(AXISCPP_HOME)/include
  
  
  
  1.20      +30 -4     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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- HandlerLoader.cpp	3 Feb 2004 13:04:47 -0000	1.19
  +++ HandlerLoader.cpp	10 Mar 2004 07:04:59 -0000	1.20
  @@ -76,6 +76,9 @@
   
   HandlerLoader::HandlerLoader()
   {
  +#if defined(USE_LTDL)
  +	lt_dlinit();
  +#endif
   }
   
   HandlerLoader::~HandlerLoader()
  @@ -90,6 +93,9 @@
   		delete pHandlerInfo;
   	}
   	unlock();
  +	#if defined(US_LTDL)
  +		lt_dlexit();
  +	#endif
   }
   
   int HandlerLoader::DeleteHandler(BasicHandler* pHandler, int nLibId)
  @@ -113,17 +119,33 @@
   
   int HandlerLoader::LoadLib(HandlerInformation* pHandlerInfo)
   {	
  -#ifdef WIN32
  +//#ifdef WIN32
  +#if defined(USE_LTDL)
  +	pHandlerInfo->m_Handler = lt_dlopen(pHandlerInfo->m_sLib.c_str());
  +        if(!pHandlerInfo->m_Handler)
  +	{
  +		printf("DLOPEN FAILED: %s\n", lt_dlerror());
  +	}
  +#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)
  +        {
  +            printf("DLOPEN FAILED: %s\n", dlerror());
  +            exit(1);
  +        }
   #endif
   	return (pHandlerInfo->m_Handler != 0)?AXIS_SUCCESS:AXIS_FAIL;
   }
   
   int HandlerLoader::UnloadLib(HandlerInformation* pHandlerInfo)
   {
  -#ifdef WIN32
  +//#ifdef WIN32
  +#if defined(USE_LTDL)
  +	lt_dlclose(pHandlerInfo->m_Handler);
  +#elif defined(WIN32)
   	FreeLibrary(pHandlerInfo->m_Handler);
   #else //Linux
   	dlclose(pHandlerInfo->m_Handler);
  @@ -146,10 +168,14 @@
   			unlock();
   			return LIBRARY_PATH_EMPTY;
   		}
  -		pHandlerInfo->m_nLoadOptions = RTLD_LAZY;
  +		//pHandlerInfo->m_nLoadOptions = RTLD_LAZY;
   		if (AXIS_SUCCESS == LoadLib(pHandlerInfo))
   		{  
  -			#ifdef WIN32
  +			//#ifdef WIN32
  +			#if defined(USE_LTDL)
  +				pHandlerInfo->m_Create = (CREATE_OBJECT)lt_dlsym(pHandlerInfo->m_Handler,CREATE_FUNCTION);
  +			        pHandlerInfo->m_Delete = (DELETE_OBJECT)lt_dlsym(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
  
  
  
  1.10      +1 -1      ws-axis/c/src/engine/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/Makefile.am,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.am	28 Jan 2004 08:07:41 -0000	1.9
  +++ Makefile.am	10 Mar 2004 07:04:59 -0000	1.10
  @@ -1,5 +1,5 @@
   noinst_LTLIBRARIES = libengine.la
  -AM_CPPFLAGS = -Wall -DUSE_EXPAT_PARSER
  +AM_CPPFLAGS = -Wall -DUSE_EXPAT_PARSER -DUSE_LTDL
   libengine_la_SOURCES = Axis.cpp \
   		AxisEngine.cpp \
                   ServerAxisEngine.cpp \
  
  
  
  1.6       +3 -1      ws-axis/c/src/server/apache/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/server/apache/Makefile.am,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.am	29 Jan 2004 08:08:33 -0000	1.5
  +++ Makefile.am	10 Mar 2004 07:05:00 -0000	1.6
  @@ -2,7 +2,9 @@
   AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
   libaxiscpp_mod_la_SOURCES = mod_axis.c
   
  -libaxiscpp_mod_la_LIBADD   = ../../common/libcommon.la ../../engine/libengine.la ../../soap/libsoap.la ../../wsdd/libwsdd.la ../../xml/libxml.la -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
  +libaxiscpp_mod_la_LIBADD   = ../../common/libcommon.la ../../engine/libengine.la ../../soap/libsoap.la ../../wsdd/libwsdd.la ../../xml/libxml.la -L$(AXISCPP_HOME)/lib/expat -lexpat -lstdc++ -lltdl
  +
  +#libaxiscpp_mod_la_LIBADD   = ../../common/libcommon.la ../../engine/libengine.la ../../soap/libsoap.la ../../wsdd/libwsdd.la ../../xml/libxml.la -L$(AXISCPP_HOME)/lib/expat -lexpat -ldl -lstdc++
   
   
   INCLUDES = -I$(AXISCPP_HOME)/include