diff options
98 files changed, 1027 insertions, 282 deletions
diff --git a/ACE-INSTALL.html b/ACE-INSTALL.html index d60f7901006..b01171a817e 100644 --- a/ACE-INSTALL.html +++ b/ACE-INSTALL.html @@ -606,9 +606,11 @@ supported by the DOC group, Riverace, or OCI. <P> 1.8.8/1.8.9 and g++ compilers that are distributed with VxWorks/Tornado. An anonymous contributor has also provided <a href="os-patches/vxworks-5.1.txt">notes for using - ACE with VxWorks 5.1.</a><P> + ACE with VxWorks 5.1.</a>. It is not possible to use VxWorks 5.4 + and earlier with ACE anymore because the compilers delivered with + 5.4 and earlier don't support the C++ features ACE needs.<P> - Tornado II/VxWorks 5.4 support IP multicast. That is not enabled + Tornado 2.2/VxWorks 5.5 support IP multicast. That is not enabled by default in ACE for VxWorks, because it probably depends on kernel configuration. To enable it, add <code>#define ACE_HAS_IP_MULTICAST</code> to your @@ -643,7 +645,7 @@ supported by the DOC group, Riverace, or OCI. <P> by the presence of a static in the Wind River/g++ iostream.h. ACE hides this and provides an easy-to-use workaround in the very unlikely situation where it becomes a problem. - Please see ace/config-vxworks5.2-g++.h for more information.<P> + Please see ace/config-vxworks5.x.h for more information.<P> </OL> In addition, as noted <A HREF="#g++">below</A> following the @@ -909,8 +911,8 @@ option available with for reporting the problem with ACE_Singleton on g++, and for helping to find and implement these solutions.<P> - <LI>On VxWorks only, g++ (thru version 2.7.2, distributed - with Tornado 1.0.1/VxWorks 5.3.1), for x86 targets, + <LI>On VxWorks only, g++ (thru version 2.9.6, distributed + with Tornado 2.2/VxWorks 5.5), for x86 targets, -fno-implicit-templates is broken. In addition, -O2 is not supported on some targets.<P> </UL> @@ -2398,10 +2400,13 @@ below.</p> </ol> <h3>Borland C++</h3> <p>Support for building TAO's SSLIOP pluggable protocol with Borland C++ - does exist. E-mail the - <a href="mailto:ace-users@cs.wustl.edu">ace-users</a> mailing list to - obtain instructions that detail how to build it using Borland C++. - These instructions will soon be integrated into this web page.</p> + does exist. First get a patch for the Open SSL makefile from <A + HREF="http://www.tenermerx.com/tao_bcb/index.html"> + http://www.tenermerx.com/tao_bcb/index.html</A>. Then build the OpenSSL + library. When you use the DLL version of ACE+TAO you have to build a DLL + version of OpenSSL. Then you must set the environment variable SSL_ROOT + to the location of your OpenSSL and then build ACE and TAO as normally. +</p> <HR><P> diff --git a/ChangeLog b/ChangeLog index c12df4fc106..e7c413cd409 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,110 @@ +Wed Apr 9 17:11:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl + + List of changed gathered the last weeks by Mark Drijver + <mdrijver@remedy.nl> and me. Improves VxWorks 5.5, MingW, Cygwin + and Kylix support. + + * ACE-INSTALL.html: + Updated for VxWorks 5.5 and documented how to use BCB with SSL. + + * Makefile.bor: + Removed build variable nightlybuild because we don't need it + anymore. + + * ace/Based_Pointer_Repository.cpp: + * ace/Dynamic.cpp: + For VxWorks also explicit instantiate static template member. This + fixes unresolved externals when using implicit templates. + + * ace/Event_Handler_T.i (get_handle ): + In case of an error, return ACE_INVALID_HANDLE and not -1 because + -1 causes problems with MingW and is not portable. + + * ace/Log_Msg_NT_Event_Log.cpp: + * ace/Log_Msg_NT_Event_Log.h: + * ace/README: + * ace/config-doxygen.h: + * ace/config-win32-common.h: + For the WinNT event log backend added a new define called + ACE_HAS_LOG_MSG_NT_EVENT_LOG. This is set in the doxygen file to + generate documentation for it. This makes it possible to generate + the documentation and to better specify to use the WinNT event log + backend or not. + + * ace/Date_Time.{h,i}: + Added a constructor to initialize an ACE_Date_Time with an + ACE_Time_Value. + + * ace/Module.h: + Improved doxygen documentation. + + * ace/config-win32-mingw.h: + Require win32api version 2.0 or later and removed Win32 API + definitions because older versions of win32api lacked these. + + * apps/drwho/Makefile: + Don't build drwho with MingW and Cygwin. + + * examples/Reactor/Misc/test_event_handler_t.cpp (signal_handler): + Signum should be an int instead of an ACE_HANDLE. + + * examples/Reactor/Ntalker/ntalker.cpp: + Changed argument interface to a_interface because interface is a + macro with MinGW. + + * examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp: + * examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp: + * examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp: + * examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp: + Modified code so that when SystemV IPC isn't supported this is + printed, else the code is build normally. Fixes Cygwin and MinGW + compile problems. + + * include/makeinclude/platform_cygwin32.GNU: + * include/makeinclude/platform_mingw32.GNU: + Disable auto import warnings. There is a bug in the MinGW/Cygwin + compiler and until that is fixed the warnings are wrong so we + disable. See these files for the link to the MinGW bugentry. + + * include/makeinclude/platform_g++_common.GNU: + Make sure that unrecognized compiler options are not set with + VxWorks 5.5. Fixes bugzilla entry [1452]. Thanks to Thomas Lockhart + <Thomas.Lockhart@jpl.nasa.gov> for reporting this and sending the + fix. + + * include/makeinclude/platform_linux_borland.GNU: + Improved this file so that we better support the Kylix3 compiler. We + don't support it 100% but we can now build the ACE tests without + problems. Several also run but also several still have problems. + + * include/makeinclude/platform_sunos5_ghs.GNU: + * include/makeinclude/platform_sunos5_kcc.GNU: + Use explicit without double quotes to match other files. + + * include/makeinclude/platform_vxworks5.x_diab.GNU: + Set VSHDIR to $(VDIR) to make it possible to override it. + + * include/makeinclude/platform_vxworks5.x_g++.GNU: + Set VSHDIR to $(VDIR) to make it possible to override it. Moved + include of platform_g++_common.GNU after the place where CXX is set + to resolve compiler problems. Also use explicit with double quotes + to match the other files, the result is that explicit template + instantiation is again the default to use. + + * include/makeinclude/rules.bin.GNU: + * include/makeinclude/rules.lib.GNU: + * include/makeinclude/wrapper_macros.GNU: + Improved and extended Kylix specific rules. For Kylix we strip the + -l in from of each shared library passed to the linker and prefix + with lib and postfix with .so. + + * tests/Time_Value_Test.cpp: + Test assignment operator of ACE_Time_Value. + Wed Apr 9 15:51:32 UTC 2003 Don Hinton <dhinton@dresystems.com> - + * ace/Malloc_Allocator.{i,cpp}: - + Uninlined ACE_New_Allocator::{malloc, calloc, free} () to avoid the multiple heap problem on systems like Windows. Thanks to Gonzalo Diethelm <gonzalo.diethelm@aditiva.com> diff --git a/Makefile.bor b/Makefile.bor index c9d4323933f..a10fc536b15 100644 --- a/Makefile.bor +++ b/Makefile.bor @@ -16,21 +16,8 @@ DIRS = \ ACEXML \ ACEXML\tests -!elif $(BUILD) == nightlybuild - -DIRS = \ - ace \ - apps \ - netsvcs \ - tests \ - examples \ - performance-tests \ - ACEXML \ - ACEXML\tests \ - TAO - !else -!error Please set your BUILD variable to either "nightlybuild" or "all". +!error Please set your BUILD variable to either "all". !endif diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 23be6de1afd..a7a453ae70a 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,117 @@ +Wed Apr 9 17:12:23 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> + + List of changed gathered the last weeks by me and Mark Drijver + <mdrijver@remedy.nl>. + + * Makefile.bor: + Removed nightlybuild because it is not needed anymore. Added + orbsvcs/examples to the list of directories to build with a full + build. + + * orbsvcs/examples/Makefile.bor: + * orbsvcs/examples/RtEC/Makefile.bor: + * orbsvcs/examples/RtEC/Simple/EC_Simple_Consumer.bor: + * orbsvcs/examples/RtEC/Simple/EC_Simple_Service.bor: + * orbsvcs/examples/RtEC/Simple/EC_Simple_Supplier.bor: + * orbsvcs/examples/RtEC/Simple/Makefile.bor: + * orbsvcs/examples/Security/Makefile.bor: + * orbsvcs/examples/Security/Send_File/Makefile.bor: + * orbsvcs/examples/Security/Send_File/client.bor: + * orbsvcs/examples/Security/Send_File/server.bor: + Added these new BCB makefiles to build these examples with BCB. + + * orbsvcs/examples/RtEC/Simple/Consumer.cpp: + * orbsvcs/examples/RtEC/Simple/Service.cpp: + * orbsvcs/examples/RtEC/Simple/Supplier.cpp: + * orbsvcs/examples/RtEC/Simple/run_test.pl: + * orbsvcs/examples/RtEC/Simple/README: + Extended this example so that the Naming Service is used to locate + the Event Service. This makes it a lot easier to use this test + because we don't have to copy the IOR of the Event Service to the + commandline options of the consumer and supplier. + + * docs/cec_options.html: + * orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.h: + * orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.i: + * orbsvcs/orbsvcs/CosEvent/CEC_Defaults.h: + * orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.h: + * orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.cpp: + * orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.h: + When CECConsumerControl or CECSupplierControl is set to reactive the + consumer/supplier was called and when the call took more than 10ms + the consumer/supplier was assumed to be died. These 10ms was + hardcoded and couldn't be configured. This is a problem on a WAN + where just the method call can take 100ms. The CosEvent is extended + with CECConsumerControlTimeout and CECSupplierControlTimeout with + which this timeout can be specified. + + * docs/ec_options.html: + * orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.h: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.i: + * orbsvcs/orbsvcs/Event/EC_Defaults.h: + * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp: + * orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp: + * orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h: + * orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp: + * orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h: + When ECConsumerControl or ECSupplierControl is set to reactive the + consumer/supplier was called and when the call took more than 10ms + the consumer/supplier was assumed to be died. These 10ms was + hardcoded and couldn't be configured. This is a problem on a WAN + where just the method call can take 100ms. The RTEvent is extended + with ECConsumerControlTimeout and ECSupplierControlTimeout with + which this timeout can be specified. + + * orbsvcs/tests/Makefile.bor: + Added Bug_1393_Regression to the list of directories to build. + + * orbsvcs/tests/Notify/performance-tests/Filter/Makefile: + Only build this test when the Notify and Naming service are build. + + * tao/Connection_Handler.cpp: + * tao/IIOP_Acceptor.cpp: + * tao/IIOP_Connection_Handler.cpp: + * tao/IIOP_Transport.cpp: + * tao/Invocation.cpp: + * tao/Transport.cpp: + * tao/Transport_Cache_Manager.cpp: + * tao/Messaging/Connection_Timeout_Policy_i.cpp: + * tao/Messaging/Messaging_Policy_i.cpp: + Improved debugging lines to make the logs more readable, some lines + where incompletely printed. + + * tao/ORBInitializer_Registry.cpp: + * tao/ORB_Core.cpp: + * tao/ORB_Table.cpp: + * tao/ValueFactory_Map.cpp: + For VxWorks, AIX and HPUX explicit instantiate static template + member. Fixes problems when using implicit template instantiations. + + * tao/Server_Strategy_Factory.h: + Converted documentation to doxygen style. + + * tao/RTCORBA/RT_Mutex.h: + * tao/RTCORBA/RT_ORBInitializer.h: + * tao/RTCORBA/RT_Protocols_Hooks.h: + * tao/RTCORBA/RT_Stub.h: + * tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h: + * tao/RTCORBA/Thread_Pool.h: + * tao/TypeCodeFactory/TypeCodeFactory_i.h: + Improved doxygen documentation. + + * tests/CodeSets/libs/IBM1047_ISO8859/Makefile: + * tests/DLL_ORB/Makefile.Test_Client_Module: + * tests/DLL_ORB/Makefile.Test_Server_Module: + Set correct BUILD_DLL defines for Cygwin/MingW/Kylix. + + * tests/TestUtils/TestCombinedThreads.h: + Don't forward declare ACE_CString but include correct file. Fixes a + VxWorks error. + Wed Apr 09 17:54:59 2003 Simon McQueen <sm@prismtechnologies.com> * tests/AMI_Buffering/admin.dsp: @@ -8,7 +122,7 @@ Wed Apr 9 11:19:42 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * tests/Bug_1482_Regression/Client_Task.h: * tests/Bug_1482_Regression/Client_Task.cpp: Minor memory management tweaks to prevent the test from dumping a core during - exit. + exit. Wed Apr 09 16:41:18 2003 Simon McQueen <sm@prismtechnologies.com> diff --git a/TAO/Makefile.bor b/TAO/Makefile.bor index ef16bf16093..78ace555f0b 100644 --- a/TAO/Makefile.bor +++ b/TAO/Makefile.bor @@ -44,23 +44,12 @@ DIRS = \ examples \ tests \ performance-tests \ - orbsvcs\tests \ - utils - -!elif $(BUILD) == nightlybuild - -DIRS = \ - tao \ - TAO_IDL \ - orbsvcs \ - examples \ - tests \ - performance-tests \ + orbsvcs\examples \ orbsvcs\tests \ utils !else -!error Please set your BUILD variable to one of "minimal", "typical", "NIGHTLYBUILD", or "all". +!error Please set your BUILD variable to one of "minimal", "typical", or "all". !endif !include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/docs/cec_options.html b/TAO/docs/cec_options.html index b1b859634ab..8df20da62bb 100644 --- a/TAO/docs/cec_options.html +++ b/TAO/docs/cec_options.html @@ -153,6 +153,28 @@ static CEC_Factory "-CECDispatching reactive ....." </TD> </TR> + <!-- <TR NAME="CECConsumerControlTimeout"> --> + <TR> + <TD><CODE>-CECConsumerControlTimeout</CODE> + <EM>timeout</EM> + </TD> + <TD>Set the timeout period (in microseconds) used by the reactive + consumer control policy to detect a timeout when polling the state + of the consumers. + </TD> + </TR> + + <!-- <TR NAME="CECSupplierControlTimeout"> --> + <TR> + <TD><CODE>-CECSupplierControlTimeout</CODE> + <EM>timeout</EM> + </TD> + <TD>Set the timeout period (in microseconds) used by the reactive + supplier control policy to detect a timeout when polling the state + of the suppliers. + </TD> + </TR> + <!-- <TR NAME="CECReactivePullingPeriod"> --> <TR> <TD><CODE>-CECReactivePullingPeriod</CODE> diff --git a/TAO/docs/ec_options.html b/TAO/docs/ec_options.html index c36aed5983a..6b73519e8c3 100644 --- a/TAO/docs/ec_options.html +++ b/TAO/docs/ec_options.html @@ -313,7 +313,29 @@ static EC_Factory "-ECFiltering basic ....." </TD> </TR> - <!-- <TR NAME="ECProxyPushConsumerCollection"> --> + <!-- <TR NAME="ECConsumerControlTimeout"> --> + <TR> + <TD><CODE>-ECConsumerControlTimeout</CODE> + <EM>timeout</EM> + </TD> + <TD>Set the timeout period (in microseconds) used by the reactive + consumer control policy to detect a timeout when polling the state + of the consumers. + </TD> + </TR> + + <!-- <TR NAME="ECSupplierControlTimeout"> --> + <TR> + <TD><CODE>-ECSupplierControlTimeout</CODE> + <EM>timeout</EM> + </TD> + <TD>Set the timeout period (in microseconds) used by the reactive + supplier control policy to detect a timeout when polling the state + of the suppliers. + </TD> + </TR> + + <!-- <TR NAME="ECProxyPushConsumerCollection"> --> <TR> <TD><CODE>-ECProxyPushConsumerCollection</CODE> <EM>flag[:flags]</EM> diff --git a/TAO/orbsvcs/examples/Makefile.bor b/TAO/orbsvcs/examples/Makefile.bor new file mode 100644 index 00000000000..7d71c481151 --- /dev/null +++ b/TAO/orbsvcs/examples/Makefile.bor @@ -0,0 +1,9 @@ +# +# Makefile for building orbsvcs examples +# + +DIRS = \ + RtEC \ + Security + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Makefile.bor b/TAO/orbsvcs/examples/RtEC/Makefile.bor new file mode 100644 index 00000000000..7a366c1b5d1 --- /dev/null +++ b/TAO/orbsvcs/examples/RtEC/Makefile.bor @@ -0,0 +1,8 @@ +# +# Makefile for building orbsvcs RtEC examples +# + +DIRS = \ + Simple + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Simple/Consumer.cpp b/TAO/orbsvcs/examples/RtEC/Simple/Consumer.cpp index 191503bfb3d..ca7c00abed3 100644 --- a/TAO/orbsvcs/examples/RtEC/Simple/Consumer.cpp +++ b/TAO/orbsvcs/examples/RtEC/Simple/Consumer.cpp @@ -3,6 +3,7 @@ #include "Consumer.h" #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/CosNamingC.h" ACE_RCSID(EC_Examples, Consumer, "$Id$") @@ -36,13 +37,6 @@ Consumer::run (int argc, char* argv[]) // the run() method. this->orb_ = orb.in (); - if (argc <= 1) - { - ACE_ERROR ((LM_ERROR, - "Usage: Consumer <event_channel_ior>\n")); - return 1; - } - CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -55,15 +49,30 @@ Consumer::run (int argc, char* argv[]) poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - // Obtain the event channel, we could use a naming service, a - // command line argument or resolve_initial_references(), but - // this is simpler... - object = - orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER); + // Obtain the event channel from the naming service + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup ("EventService"); + + CORBA::Object_var ec_obj = + naming_context->resolve (name ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; RtecEventChannelAdmin::EventChannel_var event_channel = - RtecEventChannelAdmin::EventChannel::_narrow (object.in () + RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Consumer.bor b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Consumer.bor new file mode 100644 index 00000000000..e6d11077a5c --- /dev/null +++ b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Consumer.bor @@ -0,0 +1,34 @@ +# +# $Id$ +# + +NAME = Consumer + +OBJFILES = \ + $(OBJDIR)\Consumer.obj + +CFLAGS = \ + $(TAO_RTSCHED_CFLAGS) \ + $(TAO_RTEVENT_CFLAGS) \ + $(TAO_NAMING_CFLAGS) \ + $(TAO_SVC_UTILS_CFLAGS) \ + $(TAO_IORTABLE_CFLAGS) \ + $(TAO_PORTABLESERVER_CFLAGS) \ + $(TAO_MESSAGING_CFLAGS) \ + $(TAO_CFLAGS) \ + $(ACE_CFLAGS) + +LIBFILES = \ + $(TAO_RTSCHED_LIB) \ + $(TAO_RTEVENT_LIB) \ + $(TAO_NAMING_LIB) \ + $(TAO_SVC_UTILS_LIB) \ + $(TAO_IORTABLE_LIB) \ + $(TAO_PORTABLESERVER_LIB) \ + $(TAO_MESSAGING_LIB) \ + $(TAO_LIB) \ + $(ACE_LIB) + +CPPDIR = . + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Service.bor b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Service.bor new file mode 100644 index 00000000000..70a16056527 --- /dev/null +++ b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Service.bor @@ -0,0 +1,36 @@ +# +# $Id$ +# + +NAME = Service + +OBJFILES = \ + $(OBJDIR)\Service.obj + +CFLAGS = \ + $(TAO_RTOLDEVENT_CFLAGS) \ + $(TAO_RTSCHED_CFLAGS) \ + $(TAO_RTEVENT_CFLAGS) \ + $(TAO_NAMING_CFLAGS) \ + $(TAO_SVC_UTILS_CFLAGS) \ + $(TAO_IORTABLE_CFLAGS) \ + $(TAO_PORTABLESERVER_CFLAGS) \ + $(TAO_MESSAGING_CFLAGS) \ + $(TAO_CFLAGS) \ + $(ACE_CFLAGS) + +LIBFILES = \ + $(TAO_RTOLDEVENT_LIB) \ + $(TAO_RTSCHED_LIB) \ + $(TAO_RTEVENT_LIB) \ + $(TAO_NAMING_LIB) \ + $(TAO_SVC_UTILS_LIB) \ + $(TAO_IORTABLE_LIB) \ + $(TAO_PORTABLESERVER_LIB) \ + $(TAO_MESSAGING_LIB) \ + $(TAO_LIB) \ + $(ACE_LIB) + +CPPDIR = . + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Supplier.bor b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Supplier.bor new file mode 100644 index 00000000000..f4c89ba10be --- /dev/null +++ b/TAO/orbsvcs/examples/RtEC/Simple/EC_Simple_Supplier.bor @@ -0,0 +1,34 @@ +# +# $Id$ +# + +NAME = Supplier + +OBJFILES = \ + $(OBJDIR)\Supplier.obj + +CFLAGS = \ + $(TAO_RTSCHED_CFLAGS) \ + $(TAO_RTEVENT_CFLAGS) \ + $(TAO_NAMING_CFLAGS) \ + $(TAO_SVC_UTILS_CFLAGS) \ + $(TAO_IORTABLE_CFLAGS) \ + $(TAO_PORTABLESERVER_CFLAGS) \ + $(TAO_MESSAGING_CFLAGS) \ + $(TAO_CFLAGS) \ + $(ACE_CFLAGS) + +LIBFILES = \ + $(TAO_RTSCHED_LIB) \ + $(TAO_RTEVENT_LIB) \ + $(TAO_NAMING_LIB) \ + $(TAO_SVC_UTILS_LIB) \ + $(TAO_IORTABLE_LIB) \ + $(TAO_PORTABLESERVER_LIB) \ + $(TAO_MESSAGING_LIB) \ + $(TAO_LIB) \ + $(ACE_LIB) + +CPPDIR = . + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Simple/Makefile.bor b/TAO/orbsvcs/examples/RtEC/Simple/Makefile.bor new file mode 100644 index 00000000000..4d5627cba21 --- /dev/null +++ b/TAO/orbsvcs/examples/RtEC/Simple/Makefile.bor @@ -0,0 +1,10 @@ +# +# $Id$ +# + +MAKEFILES = \ + EC_Simple_Service.bor \ + EC_Simple_Consumer.bor \ + EC_Simple_Supplier.bor + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/orbsvcs/examples/RtEC/Simple/README b/TAO/orbsvcs/examples/RtEC/Simple/README index fff86abc12f..a0cc11e59e4 100644 --- a/TAO/orbsvcs/examples/RtEC/Simple/README +++ b/TAO/orbsvcs/examples/RtEC/Simple/README @@ -6,9 +6,10 @@ consumer, supplier and a program to create the event channel itself. Run using the run_test.pl script or: -$ ./Service -o ec.ior -$ ./Consumer file://ec.ior -$ ./Supplier file://ec.ior +$ ../../../Naming_Service/Naming_Service +$ ./Service +$ ./Consumer +$ ./Supplier more advanced tests are available in $TAO_ROOT/orbsvcs/tests/Event and $TAO_ROOT/orbsvcs/EC_* diff --git a/TAO/orbsvcs/examples/RtEC/Simple/Service.cpp b/TAO/orbsvcs/examples/RtEC/Simple/Service.cpp index 657aaae2f3b..beb024502bd 100644 --- a/TAO/orbsvcs/examples/RtEC/Simple/Service.cpp +++ b/TAO/orbsvcs/examples/RtEC/Simple/Service.cpp @@ -3,6 +3,7 @@ #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" #include "ace/Get_Opt.h" +#include "orbsvcs/CosNamingC.h" ACE_RCSID(EC_Examples, Service, "$Id$") @@ -23,14 +24,7 @@ main (int argc, char* argv[]) CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - if (parse_args (argc, argv) == -1) - { - ACE_ERROR ((LM_ERROR, - "Usage: Service [-o IOR_file_name]\n")); - return 1; - } - - CORBA::Object_var object = + CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = @@ -42,7 +36,21 @@ main (int argc, char* argv[]) poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - TAO_EC_Event_Channel_Attributes attributes (poa.in (), + // Obtain the naming service + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + TAO_EC_Event_Channel_Attributes attributes (poa.in (), poa.in ()); TAO_EC_Event_Channel ec_impl (attributes); @@ -53,12 +61,21 @@ main (int argc, char* argv[]) ec_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; + // Create a name. + CosNaming::Name name; + name.length (1); + name[0].id = CORBA::string_dup ("EventService"); + name[0].kind = CORBA::string_dup (""); + + // Register with the name server + naming_context->bind (name, event_channel.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Example code: How to write ior to file CORBA::String_var ior = orb->object_to_string (event_channel.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); - // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) { diff --git a/TAO/orbsvcs/examples/RtEC/Simple/Supplier.cpp b/TAO/orbsvcs/examples/RtEC/Simple/Supplier.cpp index 481850d7a64..2b675d94f14 100644 --- a/TAO/orbsvcs/examples/RtEC/Simple/Supplier.cpp +++ b/TAO/orbsvcs/examples/RtEC/Simple/Supplier.cpp @@ -3,6 +3,7 @@ #include "Supplier.h" #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/CosNamingC.h" ACE_RCSID(EC_Examples, Supplier, "$Id$") @@ -31,13 +32,6 @@ Supplier::run (int argc, char* argv[]) CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - if (argc <= 1) - { - ACE_ERROR ((LM_ERROR, - "Usage: Supplier <event_channel_ior>\n")); - return 1; - } - CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -50,15 +44,30 @@ Supplier::run (int argc, char* argv[]) poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - // Obtain the event channel, we could use a naming service, a - // command line argument or resolve_initial_references(), but - // this is simpler... - object = - orb->string_to_object (argv[1] ACE_ENV_ARG_PARAMETER); + // Obtain the event channel from the naming service + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to get the Naming Service.\n"), + 1); + + CosNaming::NamingContext_var naming_context = + CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup ("EventService"); + + CORBA::Object_var ec_obj = + naming_context->resolve (name ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; RtecEventChannelAdmin::EventChannel_var event_channel = - RtecEventChannelAdmin::EventChannel::_narrow (object.in () + RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/examples/RtEC/Simple/run_test.pl b/TAO/orbsvcs/examples/RtEC/Simple/run_test.pl index c6569e66368..ca45c8b972e 100755 --- a/TAO/orbsvcs/examples/RtEC/Simple/run_test.pl +++ b/TAO/orbsvcs/examples/RtEC/Simple/run_test.pl @@ -10,34 +10,46 @@ use PerlACE::Run_Test; $status = 0; -$iorfile = PerlACE::LocalFile ("ec.ior"); +$ns_ior = PerlACE::LocalFile ("ns.ior"); $conffile = PerlACE::LocalFile ("ec" . "$PerlACE::svcconf_ext"); -unlink $iorfile; +unlink $ns_ior; + +$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", + "-o $ns_ior "); $T = new PerlACE::Process ("Service", - "-ORBsvcconf $conffile -o $iorfile"); + "-ORBInitRef NameService=file://$ns_ior " + . "-ORBsvcconf $conffile"); $C = new PerlACE::Process ("Consumer", - "file://$iorfile"); + "-ORBInitRef NameService=file://$ns_ior "); $S = new PerlACE::Process ("Supplier", - "file://$iorfile"); + "-ORBInitRef NameService=file://$ns_ior "); -$T->Spawn (); +print STDOUT "Starting name server\n"; +$NS->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $T->Kill (); +if (PerlACE::waitforfile_timed ($ns_ior, 15) == -1) { + print STDERR "ERROR: cannot find file <$ns_ior>\n"; + $NS->Kill (); exit 1; } +print STDOUT "Starting event server\n"; +$T->Spawn (); + +sleep 2; + +print STDOUT "Starting consumer\n"; $C->Spawn (); -sleep 5; +sleep 1; +print STDOUT "Starting supplier\n"; $supplier = $S->SpawnWaitKill (120); if ($supplier != 0) { @@ -59,6 +71,13 @@ if ($service != 0) { $status = 1; } -unlink $iorfile; +$nserver = $NS->TerminateWaitKill (5); + +if ($nserver != 0) { + print STDERR "ERROR: name server returned $nserver\n"; + $status = 1; +} + +unlink $ns_ior; exit $status; diff --git a/TAO/orbsvcs/examples/Security/Makefile.bor b/TAO/orbsvcs/examples/Security/Makefile.bor new file mode 100644 index 00000000000..4d30128a8a0 --- /dev/null +++ b/TAO/orbsvcs/examples/Security/Makefile.bor @@ -0,0 +1,8 @@ +# +# Makefile for building orbsvcs security examples +# + +DIRS = \ + Send_File + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/orbsvcs/examples/Security/Send_File/Makefile.bor b/TAO/orbsvcs/examples/Security/Send_File/Makefile.bor new file mode 100644 index 00000000000..cf74b15e3cd --- /dev/null +++ b/TAO/orbsvcs/examples/Security/Send_File/Makefile.bor @@ -0,0 +1,7 @@ +# +# Makefile for building the security send_file test executables +# + +MAKEFILES = server.bor client.bor + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/TAO/orbsvcs/examples/Security/Send_File/client.bor b/TAO/orbsvcs/examples/Security/Send_File/client.bor new file mode 100644 index 00000000000..6779fd870d2 --- /dev/null +++ b/TAO/orbsvcs/examples/Security/Send_File/client.bor @@ -0,0 +1,37 @@ +# +# Makefile for building the security send_file executable +# + +!ifdef SSL_ROOT +NAME = client +!endif + +TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1 + +OBJFILES = \ + $(OBJDIR)\testC.obj \ + $(OBJDIR)\client.obj + +CFLAGS = \ + $(ACE_CFLAGS) \ + $(TAO_CFLAGS) + +LIBFILES = \ + $(ACE_LIB) \ + $(TAO_LIB) + +IDLFILES = \ + $(IDLDIR)\test.idl + +CPPDIR = . + +IDLDIR = . + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> + +# +# IDL Build rules +# + +$(IDLDIR)\testS.cpp $(IDLDIR)\testC.cpp: $(IDLDIR)\test.idl + $(TAO_IDL) $** diff --git a/TAO/orbsvcs/examples/Security/Send_File/server.bor b/TAO/orbsvcs/examples/Security/Send_File/server.bor new file mode 100644 index 00000000000..3ef9f70550b --- /dev/null +++ b/TAO/orbsvcs/examples/Security/Send_File/server.bor @@ -0,0 +1,47 @@ +# +# Makefile for building the security send_file executable +# + +!ifdef SSL_ROOT +NAME = server +!endif + +TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1 + +OBJFILES = \ + $(OBJDIR)\testC.obj \ + $(OBJDIR)\testS.obj \ + $(OBJDIR)\test_i.obj \ + $(OBJDIR)\server.obj + +CFLAGS = \ + $(ACE_CFLAGS) \ + $(ACE_SSL_CFLAGS) \ + $(SSL_CFLAGS) \ + $(TAO_CFLAGS) \ + $(TAO_PORTABLESERVER_CFLAGS) \ + $(TAO_SSLIOP_CFLAGS) + +LIBFILES = \ + $(ACE_LIB) \ + $(ACE_SSL_LIB) \ + $(SSL_LIB) \ + $(TAO_LIB) \ + $(TAO_PORTABLESERVER_LIB) \ + $(TAO_SSLIOP_LIB) + +IDLFILES = \ + $(IDLDIR)\test.idl + +CPPDIR = . + +IDLDIR = . + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> + +# +# IDL Build rules +# + +$(IDLDIR)\testS.cpp $(IDLDIR)\testC.cpp: $(IDLDIR)\test.idl + $(TAO_IDL) $** diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp index 1d52ba86c0a..0421f66e7ac 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp @@ -323,6 +323,32 @@ TAO_CEC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) } } + else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-CECConsumerControlTimeout")) == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10); + this->consumer_control_timeout_.usec(timeout_); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-CECSupplierControlTimeout")) == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10); + this->supplier_control_timeout_.usec(timeout_); + arg_shifter.consume_arg (); + } + } + else if (ACE_OS::strncmp (arg, ACE_LIB_TEXT("-CEC"), 3) == 0) { arg_shifter.consume_arg (); @@ -912,7 +938,7 @@ TAO_CEC_Default_Factory::create_consumer_control (TAO_CEC_EventChannel* ec) CORBA::ORB_init (argc, argv, this->orbid_); ACE_Time_Value rate (0, this->consumer_control_period_); - return new TAO_CEC_Reactive_ConsumerControl (rate, ec, orb.in ()); + return new TAO_CEC_Reactive_ConsumerControl (rate, consumer_control_timeout_, ec, orb.in ()); } return 0; } @@ -936,7 +962,7 @@ TAO_CEC_Default_Factory::create_supplier_control (TAO_CEC_EventChannel* ec) CORBA::ORB_init (argc, argv, this->orbid_); ACE_Time_Value rate (0, this->consumer_control_period_); - return new TAO_CEC_Reactive_SupplierControl (rate, ec, orb.in ()); + return new TAO_CEC_Reactive_SupplierControl (rate, supplier_control_timeout_, ec, orb.in ()); } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.h index 610669b7559..a7b0443573a 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.h @@ -153,6 +153,10 @@ private: /// The consumer and supplier control periods in usecs int consumer_control_period_; int supplier_control_period_; + + /// The consumer and supplier control timeout in usecs + ACE_Time_Value consumer_control_timeout_; + ACE_Time_Value supplier_control_timeout_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.i b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.i index 27708f2d61d..f7699383cb4 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.i +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.i @@ -18,6 +18,8 @@ TAO_CEC_Default_Factory::TAO_CEC_Default_Factory (void) consumer_control_ (TAO_CEC_DEFAULT_CONSUMER_CONTROL), supplier_control_ (TAO_CEC_DEFAULT_SUPPLIER_CONTROL), consumer_control_period_ (TAO_CEC_DEFAULT_CONSUMER_CONTROL_PERIOD), - supplier_control_period_ (TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD) + supplier_control_period_ (TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD), + consumer_control_timeout_ (0, TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT), + supplier_control_timeout_ (0, TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT) { } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Defaults.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Defaults.h index 317eae870c8..99860d8d0de 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Defaults.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Defaults.h @@ -120,5 +120,13 @@ # define TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD 5000000 /* usecs */ #endif /* TAO_CEC_DEFAULT_SUPPLIER_CONTROL_PERIOD */ +#ifndef TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT +# define TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT 10000 /* usecs */ +#endif /* TAO_CEC_DEFAULT_CONSUMER_CONTROL_TIMEOUT */ + +#ifndef TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT +# define TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT 10000 /* usecs */ +#endif /* TAO_CEC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT */ + #include "ace/post.h" #endif /* TAO_CEC_DEFAULTS_H */ diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.cpp index 48f3cbfed6b..a1741daf162 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.cpp @@ -17,9 +17,11 @@ ACE_RCSID(CosEvent, CEC_Reactive_ConsumerControl, "$Id$") TAO_CEC_Reactive_ConsumerControl:: TAO_CEC_Reactive_ConsumerControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_CEC_EventChannel *ec, CORBA::ORB_ptr orb) : rate_ (rate), + timeout_ (timeout), adapter_ (this), event_channel_ (ec), orb_ (CORBA::ORB::_duplicate (orb)) @@ -113,10 +115,8 @@ TAO_CEC_Reactive_ConsumerControl::activate (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // Pre-compute the policy list to the set the right timeout - // value... - // @@ TODO It is currently hard-coded to 10 milliseconds - TimeBase::TimeT timeout = 10 * 10000; + // Timeout for polling state (default = 10 msec) + TimeBase::TimeT timeout = timeout_.usec() * 10; CORBA::Any any; any <<= timeout; diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.h index 5aa9d8263fe..84f3c179235 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_ConsumerControl.h @@ -73,6 +73,7 @@ public: /// Constructor. It does not assume ownership of the <event_channel> /// parameter. TAO_CEC_Reactive_ConsumerControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_CEC_EventChannel *event_channel, CORBA::ORB_ptr orb); @@ -103,6 +104,9 @@ private: /// The polling rate ACE_Time_Value rate_; + /// The polling timeout + ACE_Time_Value timeout_; + /// The Adapter for the reactor events TAO_CEC_ConsumerControl_Adapter adapter_; diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.cpp index eed1fcca6aa..f7387bfaf0f 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.cpp @@ -18,9 +18,11 @@ ACE_RCSID(CosEvent, CEC_Reactive_SupplierControl, "$Id$") TAO_CEC_Reactive_SupplierControl:: TAO_CEC_Reactive_SupplierControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_CEC_EventChannel *ec, CORBA::ORB_ptr orb) : rate_ (rate), + timeout_ (timeout), adapter_ (this), event_channel_ (ec), orb_ (CORBA::ORB::_duplicate (orb)) @@ -114,11 +116,9 @@ TAO_CEC_Reactive_SupplierControl::activate (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // Pre-compute the policy list to the set the right timeout - // value... - // @@ TODO It is currently hard-coded to 10 milliseconds - TimeBase::TimeT timeout = 10 * 10000; - CORBA::Any any; + // Timeout for polling state (default = 10 msec) + TimeBase::TimeT timeout = timeout_.usec() * 10; + CORBA::Any any; any <<= timeout; this->policy_list_.length (1); diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.h index bda347d7776..521feaf77c7 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Reactive_SupplierControl.h @@ -73,8 +73,9 @@ public: /// Constructor. It does not assume ownership of the <event_channel> /// parameter. TAO_CEC_Reactive_SupplierControl (const ACE_Time_Value &rate, - TAO_CEC_EventChannel *event_channel, - CORBA::ORB_ptr orb); + const ACE_Time_Value &timeout, + TAO_CEC_EventChannel *event_channel, + CORBA::ORB_ptr orb); /// destructor... virtual ~TAO_CEC_Reactive_SupplierControl (void); @@ -103,6 +104,9 @@ private: /// The polling rate ACE_Time_Value rate_; + /// The polling timeout + ACE_Time_Value timeout_; + /// The Adapter for the reactor events TAO_CEC_SupplierControl_Adapter adapter_; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp index 13e31b03f64..ff1ba640a69 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Basic_Factory.cpp @@ -223,7 +223,9 @@ TAO_EC_Basic_Factory::create_consumer_control (TAO_EC_Event_Channel* ec) CORBA::ORB_init (argc, argv, ""); // Hard-coded rate to 10 times a second ACE_Time_Value rate (0, 100000); - return new TAO_EC_Reactive_ConsumerControl (rate, ec, orb.in ()); + // Hard-coded polling-timeout to 10 msec + ACE_Time_Value timeout (0, TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT); + return new TAO_EC_Reactive_ConsumerControl (rate, timeout, ec, orb.in ()); } void @@ -241,7 +243,9 @@ TAO_EC_Basic_Factory::create_supplier_control (TAO_EC_Event_Channel* ec) CORBA::ORB_init (argc, argv, ""); // Hard-coded rate to 10 times a second ACE_Time_Value rate (0, 100000); - return new TAO_EC_Reactive_SupplierControl (rate, ec, orb.in ()); + // Hard-coded polling-timeout to 10 msec + ACE_Time_Value timeout (0, TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT); + return new TAO_EC_Reactive_SupplierControl (rate, timeout, ec, orb.in ()); } void diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index b6c8596e5bf..3694d31c2e2 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -409,6 +409,32 @@ TAO_EC_Default_Factory::init (int argc, ACE_TCHAR* argv[]) } } + else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-ECConsumerControlTimeout")) == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10); + this->consumer_control_timeout_.usec(timeout_); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-ECSupplierControlTimeout")) == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + unsigned long timeout_ = ACE_OS::strtoul(opt, 0, 10); + this->supplier_control_timeout_.usec(timeout_); + arg_shifter.consume_arg (); + } + } + else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-ECPushSupplierSet")) == 0) { ACE_ERROR ((LM_ERROR, @@ -876,7 +902,7 @@ TAO_EC_Default_Factory::create_consumer_control (TAO_EC_Event_Channel* ec) CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->consumer_control_period_); - return new TAO_EC_Reactive_ConsumerControl (rate, ec, orb.in ()); + return new TAO_EC_Reactive_ConsumerControl (rate, consumer_control_timeout_, ec, orb.in ()); } return 0; } @@ -900,7 +926,7 @@ TAO_EC_Default_Factory::create_supplier_control (TAO_EC_Event_Channel* ec) CORBA::ORB_init (argc, argv, this->orbid_.c_str ()); ACE_Time_Value rate (0, this->supplier_control_period_); - return new TAO_EC_Reactive_SupplierControl (rate, ec, orb.in ()); + return new TAO_EC_Reactive_SupplierControl (rate, supplier_control_timeout_, ec, orb.in ()); } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h index 9055f07453b..b2e7b313eda 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.h @@ -149,6 +149,12 @@ protected: /// The consumer and supplier control periods in usecs int consumer_control_period_; int supplier_control_period_; + + /// The consumer control timeout in usecs + ACE_Time_Value consumer_control_timeout_; + + /// The supplier control timeout in usecs + ACE_Time_Value supplier_control_timeout_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i index 7e80488bf44..cd98301fa1d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.i @@ -20,6 +20,8 @@ TAO_EC_Default_Factory::TAO_EC_Default_Factory (void) consumer_control_ (TAO_EC_DEFAULT_CONSUMER_CONTROL), supplier_control_ (TAO_EC_DEFAULT_SUPPLIER_CONTROL), consumer_control_period_ (TAO_EC_DEFAULT_CONSUMER_CONTROL_PERIOD), - supplier_control_period_ (TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD) + supplier_control_period_ (TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD), + consumer_control_timeout_ (0, TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT), + supplier_control_timeout_ (0, TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT) { } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Defaults.h b/TAO/orbsvcs/orbsvcs/Event/EC_Defaults.h index d34deb58353..7dc1b4a3237 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Defaults.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Defaults.h @@ -133,5 +133,13 @@ # define TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD 5000000 /* usecs */ #endif /* TAO_EC_DEFAULT_SUPPLIER_CONTROL_PERIOD */ +#ifndef TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT +# define TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT 10000 /* usecs */ +#endif /* TAO_EC_DEFAULT_CONSUMER_CONTROL_TIMEOUT */ + +#ifndef TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT +# define TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT 10000 /* usecs */ +#endif /* TAO_EC_DEFAULT_SUPPLIER_CONTROL_TIMEOUT */ + #include "ace/post.h" #endif /* TAO_EC_DEFAULTS_H */ diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index be322c6c6a7..6c5f997384e 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -265,6 +265,14 @@ TAO_EC_ProxyPushSupplier::connect_push_consumer ( RtecEventComm::PushConsumer::_duplicate (push_consumer); this->qos_ = qos; + // AVE-WEB test. Try to validate the connection to the consumer + ACE_DEBUG ((LM_DEBUG, "Before validate connection \n")); + CORBA::PolicyList_var pols; + this->consumer_->_validate_connection(pols); + ACE_CHECK; + ACE_DEBUG ((LM_DEBUG, "After validate connection \n")); + + #if TAO_EC_ENABLE_DEBUG_MESSAGES ACE_DEBUG ((LM_DEBUG, "Building filters for consumer <%x>\n", this)); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp index 25e473a8f30..84eab4dc3c3 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp @@ -19,9 +19,11 @@ ACE_RCSID(Event, EC_Reactive_ConsumerControl, "$Id$") TAO_EC_Reactive_ConsumerControl:: TAO_EC_Reactive_ConsumerControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_EC_Event_Channel *ec, CORBA::ORB_ptr orb) : rate_ (rate), + timeout_ (timeout), adapter_ (this), event_channel_ (ec), orb_ (CORBA::ORB::_duplicate (orb)) @@ -110,10 +112,8 @@ TAO_EC_Reactive_ConsumerControl::activate (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // Pre-compute the policy list to the set the right timeout - // value... - // @@ TODO It is currently hard-coded to 10 milliseconds - TimeBase::TimeT timeout = 10 * 10000; + // Timeout for polling state (default = 10 msec) + TimeBase::TimeT timeout = timeout_.usec() * 10; CORBA::Any any; any <<= timeout; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h index 063d478b916..8ab5f0767df 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.h @@ -68,6 +68,7 @@ public: /// Constructor. It does not assume ownership of the <event_channel> /// parameter. TAO_EC_Reactive_ConsumerControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_EC_Event_Channel *event_channel, CORBA::ORB_ptr orb); @@ -96,6 +97,9 @@ private: /// The polling rate ACE_Time_Value rate_; + /// The polling timeout + ACE_Time_Value timeout_; + /// The Adapter for the reactor events TAO_EC_ConsumerControl_Adapter adapter_; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp index e1f7e0f7421..30c83096e8c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp @@ -19,9 +19,11 @@ ACE_RCSID(Event, EC_Reactive_SupplierControl, "$Id$") TAO_EC_Reactive_SupplierControl:: TAO_EC_Reactive_SupplierControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_EC_Event_Channel *ec, CORBA::ORB_ptr orb) : rate_ (rate), + timeout_ (timeout), adapter_ (this), event_channel_ (ec), orb_ (CORBA::ORB::_duplicate (orb)) @@ -110,10 +112,8 @@ TAO_EC_Reactive_SupplierControl::activate (void) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // Pre-compute the policy list to the set the right timeout - // value... - // @@ TODO It is currently hard-coded to 10 milliseconds - TimeBase::TimeT timeout = 10 * 10000; + // Timeout for polling state (default = 10 msec) + TimeBase::TimeT timeout = timeout_.usec() * 10; CORBA::Any any; any <<= timeout; @@ -122,7 +122,7 @@ TAO_EC_Reactive_SupplierControl::activate (void) this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, any - ACE_ENV_ARG_PARAMETER); + ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h index 1dbaad605e3..a38b9adc291 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.h @@ -68,6 +68,7 @@ public: /// Constructor. It does not assume ownership of the <event_channel> /// parameter. TAO_EC_Reactive_SupplierControl (const ACE_Time_Value &rate, + const ACE_Time_Value &timeout, TAO_EC_Event_Channel *event_channel, CORBA::ORB_ptr orb); @@ -96,6 +97,9 @@ private: /// The polling rate ACE_Time_Value rate_; + /// The polling timeout + ACE_Time_Value timeout_; + /// The Adapter for the reactor events TAO_EC_SupplierControl_Adapter adapter_; diff --git a/TAO/orbsvcs/tests/Makefile.bor b/TAO/orbsvcs/tests/Makefile.bor index 6ec947c0544..69553d90d9a 100644 --- a/TAO/orbsvcs/tests/Makefile.bor +++ b/TAO/orbsvcs/tests/Makefile.bor @@ -5,6 +5,7 @@ DIRS = \ AVStreams \ + Bug_1393_Regression \ Concurrency \ CosEvent \ FaultTolerance \ diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile index 2107bdf0c32..44b66343b54 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/Makefile @@ -12,8 +12,8 @@ ifndef TAO_ROOT TAO_ROOT = $(ACE_ROOT)/TAO endif # ! TAO_ROOT -BIN = Structured_Supplier Structured_Consumer \ - Sequence_Supplier Sequence_Consumer +BIN2 = Structured_Supplier Structured_Consumer \ + Sequence_Supplier Sequence_Consumer IDL_FILES = go IDL_SRC = goC.cpp goS.cpp @@ -37,8 +37,17 @@ SRC = Structured_Supplier.cpp common.cpp \ CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs -I../../lib LDLIBS = -lTAO_NotifyTests -lTAO_CosNotification -lTAO_ETCL -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_PortableServer -lTAO - TAO_IDLFLAGS += -Ge 1 + +#### If the TAO orbsvcs library wasn't built with sufficient components, +#### don't try to build here. +TAO_ORBSVCS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs) +ifeq (Notify,$(findstring Notify,$(TAO_ORBSVCS))) + ifeq (Naming,$(findstring Naming,$(TAO_ORBSVCS))) + BIN = $(BIN2) + endif # Naming +endif # Notify + #---------------------------------------------------------------------------- # Include macros and targets #---------------------------------------------------------------------------- diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 84adb46e89f..60f9b434550 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -94,7 +94,7 @@ TAO_Connection_Handler::svc_i (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) TAO_Connection_Handler::svc_i begin\n"))); + ACE_TEXT ("TAO (%P|%t) - TAO_Connection_Handler::svc_i begin\n"))); // Here we simply synthesize the "typical" event loop one might find // in a reactive handler, except that this can simply block waiting @@ -342,7 +342,7 @@ TAO_Connection_Handler::handle_input_eh ( { ACE_HANDLE handle = eh->get_handle (); ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Connection_Handler[%d]::handle_input, " + "TAO (%P|%t) - Connection_Handler[%d]::handle_input, " "handle = %d/%d, refcount = %d, retval = %d\n", t_id, handle, h, refcount, return_value)); } diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 64665e89673..3ebf8db8842 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -278,8 +278,8 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, // The hostname cache has already been set! // This is bad mojo, i.e. an internal TAO error. ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) ") - ACE_TEXT ("IIOP_Acceptor::open - "), + ACE_TEXT ("TAO (%P|%t) - ") + ACE_TEXT ("IIOP_Acceptor::open, "), ACE_TEXT ("hostname already set\n\n")), -1); } diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index 80a94ac6dd4..c0d86311759 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -136,8 +136,8 @@ TAO_IIOP_Connection_Handler::open (void*) return -1; ACE_DEBUG ((LM_DEBUG, - ACE_LIB_TEXT ("TAO (%P|%t) IIOP connection to peer ") - ACE_LIB_TEXT ("<%s> on %d\n"), + ACE_LIB_TEXT ("TAO (%P|%t) - Connection_Handler::open, IIOP ") + ACE_LIB_TEXT ("connection to peer <%s> on %d\n"), client, this->peer ().get_handle ())); } @@ -164,8 +164,8 @@ TAO_IIOP_Connection_Handler::activate (long flags, { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ACE_LIB_TEXT ("TAO (%P|%t) IIOP_Connection_Handler::activate %d ") - ACE_LIB_TEXT ("threads, flags = %d\n"), + ACE_LIB_TEXT ("TAO (%P|%t) - IIOP_Connection_Handler::") + ACE_LIB_TEXT ("activate %d threads, flags = %d\n"), n_threads, flags, THR_BOUND)); diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index c392e3808ba..95a3d7b4c6a 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -111,8 +111,8 @@ TAO_IIOP_Transport::recv_i (char *buf, { ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::recv_i, "), - ACE_TEXT ("read failure - %m"), + ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::recv_i, ") + ACE_TEXT ("read failure - %m\n"), this->id ())); } @@ -388,7 +388,7 @@ TAO_IIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails) *acceptor) == -1) { ACE_ERROR ((LM_ERROR, - "TAO (%P|%t) - IIOP_Transport::set_bidir_info, ", + "TAO (%P|%t) - IIOP_Transport::set_bidir_info, " "error getting listen_point \n")); return; @@ -448,7 +448,7 @@ TAO_IIOP_Transport::get_listen_point ( { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) Could not resolve local ") - ACE_TEXT ("host address in ") + ACE_TEXT ("host address in ") ACE_TEXT ("get_listen_point()\n")), -1); } diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 882aebaa6af..54bd5f0b0da 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -681,7 +681,7 @@ TAO_GIOP_Synch_Invocation::invoke_i (CORBA::Boolean is_locate_request CORBA::ULong msecs = this->max_wait_time_->msec (); ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) Synch_Invocation::invoke_i, " + "TAO (%P|%t) - Synch_Invocation::invoke_i, " "timeout after recv is <%u> status <%d>\n", msecs, reply_error)); diff --git a/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp b/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp index fb3e2342e88..d3881e46707 100644 --- a/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp +++ b/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp @@ -78,7 +78,7 @@ TAO_ConnectionTimeoutPolicy::hook (TAO_ORB_Core *orb_core, CORBA::ULong msecs = ACE_static_cast (CORBA::ULong, microseconds / 1000); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) Timeout is <%u>\n"), + ACE_TEXT ("TAO (%P|%t) - Timeout is <%u>\n"), msecs)); } } diff --git a/TAO/tao/Messaging/Messaging_Policy_i.cpp b/TAO/tao/Messaging/Messaging_Policy_i.cpp index a82e0706a7d..cb44c2c2a6c 100644 --- a/TAO/tao/Messaging/Messaging_Policy_i.cpp +++ b/TAO/tao/Messaging/Messaging_Policy_i.cpp @@ -81,7 +81,7 @@ TAO_RelativeRoundtripTimeoutPolicy::hook (TAO_ORB_Core *orb_core, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) Timeout is <%u>\n"), + ACE_TEXT ("TAO (%P|%t) - Timeout is <%u>\n"), time_value.msec ())); } } diff --git a/TAO/tao/ORBInitializer_Registry.cpp b/TAO/tao/ORBInitializer_Registry.cpp index cb2229d494f..6e3ef414f3d 100644 --- a/TAO/tao/ORBInitializer_Registry.cpp +++ b/TAO/tao/ORBInitializer_Registry.cpp @@ -121,4 +121,7 @@ template class ACE_Array_Base<PortableInterceptor::ORBInitializer_var>; #pragma instantiate TAO_Singleton<TAO_ORBInitializer_Registry, TAO_SYNCH_MUTEX> #pragma instantiate ACE_Array_Base<PortableInterceptor::ORBInitializer_var> +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) +template TAO_Singleton<TAO_ORBInitializer_Registry, TAO_SYNCH_MUTEX> * TAO_Singleton<TAO_ORBInitializer_Registry, TAO_SYNCH_MUTEX>::singleton_; + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 70aac86538f..cfa544dcc1a 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -2949,4 +2949,7 @@ template class ACE_Dynamic_Service<TAO_Client_Strategy_Factory>; #pragma instantiate ACE_Dynamic_Service<TAO_Server_Strategy_Factory> #pragma instantiate ACE_Dynamic_Service<TAO_Client_Strategy_Factory> +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) +template TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX> * TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX>::singleton_; + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/ORB_Table.cpp b/TAO/tao/ORB_Table.cpp index 12ac9358b70..4edbb624fd5 100644 --- a/TAO/tao/ORB_Table.cpp +++ b/TAO/tao/ORB_Table.cpp @@ -153,4 +153,8 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, TAO_ORB_Core *, AC #pragma instantiate ACE_Hash_Map_Iterator_Ex<const char *, TAO_ORB_Core *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, TAO_ORB_Core *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) + +template TAO_Singleton<TAO_ORB_Table,TAO_SYNCH_MUTEX> * TAO_Singleton<TAO_ORB_Table,TAO_SYNCH_MUTEX>::singleton_; + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/RTCORBA/RT_Mutex.h b/TAO/tao/RTCORBA/RT_Mutex.h index bc5e5cb1ab9..d15d37748db 100644 --- a/TAO/tao/RTCORBA/RT_Mutex.h +++ b/TAO/tao/RTCORBA/RT_Mutex.h @@ -64,7 +64,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); /** - * Acquire the lock, but only wait up to <max_wait> time. Note + * Acquire the lock, but only wait up to @a max_wait time. Note * that this operation may not be available on all OS platforms, so * if you're interested in writing maximally portable programs avoid * using this operation in your program designs. @@ -88,7 +88,6 @@ protected: * @brief Extension to TAO_RT_Mutex to support named mutexes. * */ - class TAO_RTCORBA_Export TAO_Named_RT_Mutex : public TAO_RT_Mutex { public: diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.h b/TAO/tao/RTCORBA/RT_ORBInitializer.h index 395aa0d70e6..ae59bccdbdf 100644 --- a/TAO/tao/RTCORBA/RT_ORBInitializer.h +++ b/TAO/tao/RTCORBA/RT_ORBInitializer.h @@ -42,7 +42,7 @@ class TAO_RTCORBA_Export TAO_RT_ORBInitializer : public virtual TAO_Local_RefCounted_Object { public: - // Priority mapping types + /// Priority mapping types enum { TAO_PRIORITY_MAPPING_CONTINUOUS, @@ -90,7 +90,7 @@ private: /** Scheduling policy. This value is passed to ACE_OS::thr_setprio(). * For POSIX pthreads, it maps directly to the pthread_setschedparam() policy - * parameter. Legal values are ACE_SCHED_RR, ACE_SCHED_FIFO, + * parameter. Legal values are ACE_SCHED_RR, ACE_SCHED_FIFO, * ACE_SCHED_OTHER, ACE_SCHED_*, etc. */ long sched_policy_; diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h index 095b4da8023..32fedf30e00 100644 --- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h +++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h @@ -29,11 +29,10 @@ class TAO_RTCORBA_Export TAO_RT_Protocols_Hooks : public TAO_Protocols_Hooks { public: - - /// constructor + /// Constructor TAO_RT_Protocols_Hooks (void); - /// destructor + /// Destructor virtual ~TAO_RT_Protocols_Hooks (void); /// Initialize the protocols hooks instance. @@ -45,15 +44,14 @@ public: * The timeout hook is used to determine if the client_protocols policy is * set and with what value. If the ORB is compiled without support * for RTCORBA this feature does not take effect - * \param tcp_properties returns the Protocol List set + * @param tcp_properties returns the Protocol List set */ - virtual int call_client_protocols_hook (int &send_buffer_size, int &recv_buffer_size, int &no_delay, int &enable_network_priority, const char *protocol_type); - + /// Define the Client_Protocols_TCP_Hook signature typedef int (*Client_Protocols_Hook) (TAO_ORB_Core *, int &send_buffer_size, @@ -72,7 +70,7 @@ public: * The timeout hook is used to determine if the client_protocols policy is * set and with what value. If the ORB is compiled without support * for RTCORBA this feature does not take effect - * \param tcp_properties returns the Protocol List set + * @param tcp_properties returns the Protocol List set */ virtual int call_server_protocols_hook (int &send_buffer_size, int &recv_buffer_size, @@ -101,7 +99,7 @@ public: int &no_delay, int &enable_network_priority, const char *protocol_type); - + virtual int get_effective_server_protocol_properties (TAO_Adpater *poa, int &send_buffer_size, int &recv_buffer_size, @@ -114,24 +112,24 @@ public: virtual int update_client_protocol_properties (TAO_Stub *stub, TAO_Connection_Handler * connection_handler, const char *protocol_type); - + virtual int update_server_protocol_properties (CORBA::Policy *server_policy, TAO_Connection_Handler * connection_handler, const char *protocol_type); virtual CORBA::Long get_dscp_codepoint (void); - + virtual void rt_service_context (TAO_Stub *stub, TAO_Service_Context &service_context, CORBA::Boolean restart ACE_ENV_ARG_DECL); - + virtual void add_rt_service_context_hook (TAO_Service_Context &service_context, CORBA::Policy *model_policy, CORBA::Short &client_priority ACE_ENV_ARG_DECL); - + virtual void get_selector_hook (CORBA::Policy *model_policy, CORBA::Boolean &is_client_propagated, diff --git a/TAO/tao/RTCORBA/RT_Stub.h b/TAO/tao/RTCORBA/RT_Stub.h index 9c5e0fe4ee6..64a23f09b87 100644 --- a/TAO/tao/RTCORBA/RT_Stub.h +++ b/TAO/tao/RTCORBA/RT_Stub.h @@ -35,7 +35,8 @@ class TAO_PrivateConnectionPolicy; /** * @class TAO_RT_Stub * - * This class reprent a stub with extended functionality, which are needed for RTCORBA. + * This class represent a stub with extended functionality, which are needed + * for RTCORBA. */ class TAO_RTCORBA_Export TAO_RT_Stub : public TAO_Stub { diff --git a/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h b/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h index 3d86903c910..716d0f4d430 100644 --- a/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h +++ b/TAO/tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h @@ -52,7 +52,7 @@ public: /// Shutdown reactor. void shutdown_reactor (void); - // Does <mprofile> belong to us? + /// Does @a mprofile belong to us? int is_collocated (const TAO_MProfile &mprofile); /// @name Accessors diff --git a/TAO/tao/RTCORBA/Thread_Pool.h b/TAO/tao/RTCORBA/Thread_Pool.h index 9e18d09619f..f633ae1a6bd 100644 --- a/TAO/tao/RTCORBA/Thread_Pool.h +++ b/TAO/tao/RTCORBA/Thread_Pool.h @@ -123,13 +123,13 @@ public: /// Wait for threads to exit. void wait (void); - // Does <mprofile> belong to us? + /// Does @a mprofile belong to us? int is_collocated (const TAO_MProfile &mprofile); /// Create the static threads - only called once. int create_static_threads (void); - /// Create <number_of_threads> of dynamic threads. Can be called + /// Create @a number_of_threads of dynamic threads. Can be called /// multiple times. int create_dynamic_threads (CORBA::ULong number_of_threads); @@ -232,7 +232,7 @@ public: /// Wait for threads to exit. void wait (void); - // Does <mprofile> belong to us? + /// Does @a mprofile belong to us? int is_collocated (const TAO_MProfile &mprofile); /// Create the static threads - only called once. @@ -303,7 +303,7 @@ public: /// Wait for threads to exit. void wait (void); - // Does <mprofile> belong to us? + /// Does @a mprofile belong to us? int is_collocated (const TAO_MProfile &mprofile); /// Create a threadpool without lanes. diff --git a/TAO/tao/Server_Strategy_Factory.h b/TAO/tao/Server_Strategy_Factory.h index 066ea9db029..e0aa6204fb2 100644 --- a/TAO/tao/Server_Strategy_Factory.h +++ b/TAO/tao/Server_Strategy_Factory.h @@ -49,8 +49,8 @@ public: struct Active_Object_Map_Creation_Parameters { + /// Constructor. Active_Object_Map_Creation_Parameters (void); - // Constructor. CORBA::ULong active_object_map_size_; // Default size of object lookup table. diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 2d630961eaa..fae8fa4c7b8 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -1704,7 +1704,7 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, } // If the queue did not have a complete message put this piece of - // message in the queue. We kow it did not have a complete + // message in the queue. We know it did not have a complete // message. That is why we are here. size_t n = this->incoming_message_queue_.copy_tail (incoming); @@ -1712,8 +1712,8 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, if (TAO_debug_level > 6) { ACE_DEBUG ((LM_DEBUG, - "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", - "copied [%d] bytes to the tail \n", + "TAO (%P|%t) - Transport[%d]::consolidate_message_queue, " + "copied [%d] bytes to the tail\n", this->id (), n)); } @@ -1725,14 +1725,14 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, if (TAO_debug_level > 6) { ACE_DEBUG ((LM_DEBUG, - "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", - "missing [%d] bytes in the tail messahe \n", + "TAO (%P|%t) - Transport[%d]::consolidate_message_queue, " + "missing [%d] bytes in the tail message\n", this->id (), missing_data)); } // Move the read pointer of the <incoming> message block to the end - // of the copied message and process the remaining portion... + // of the copied message and process the remaining portion... incoming.rd_ptr (n); // If we have some more information left in the message block.. @@ -1802,8 +1802,8 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, if (TAO_debug_level > 5) ACE_DEBUG ((LM_DEBUG, - "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", - " trying recv, again \n", + "TAO (%P|%t) - Transport[%d]::consolidate_message_queue, " + "trying recv, again\n", this->id ())); // Try to do a read again. If we have some luck it would be @@ -1814,8 +1814,8 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, if (TAO_debug_level > 5) ACE_DEBUG ((LM_DEBUG, - "(%P|%t) TAO_Transport[%d]::consolidate_message_queue", - " recv retval [%d] \n", + "TAO (%P|%t) - Transport[%d]::consolidate_message_queue, " + "recv retval [%d]\n", this->id (), n)); // Error... diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp index 656ddee570d..eb23ede059a 100644 --- a/TAO/tao/Transport_Cache_Manager.cpp +++ b/TAO/tao/Transport_Cache_Manager.cpp @@ -141,7 +141,7 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id, { ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - Transport_Cache_Manager::bind_i, " - " size is [%d] \n", + "size is [%d]\n", this->current_size ())); } @@ -368,7 +368,7 @@ TAO_Transport_Cache_Manager::purge_entry_i (HASH_MAP_ENTRY *&entry) return 0; // Remove the entry from the Map - int retval = this->cache_map_.unbind (entry); + int retval = this->cache_map_.unbind (entry); // Set the entry pointer to zero entry = 0; diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h index d3268d08692..9749a703b84 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h @@ -41,11 +41,11 @@ class TAO_TypeCodeFactory_Export TAO_TypeCodeFactory_i * Implementation of the CORBA::TypeCodeFactory interface */ public: - TAO_TypeCodeFactory_i (void); /// ctor + TAO_TypeCodeFactory_i (void); - ~TAO_TypeCodeFactory_i (void); /// dtor + ~TAO_TypeCodeFactory_i (void); /// = LocalObject methods static TAO_TypeCodeFactory_i *_narrow ( diff --git a/TAO/tao/ValueFactory_Map.cpp b/TAO/tao/ValueFactory_Map.cpp index 214085bc2f7..d43b139f1c2 100644 --- a/TAO/tao/ValueFactory_Map.cpp +++ b/TAO/tao/ValueFactory_Map.cpp @@ -123,5 +123,8 @@ template class TAO_Singleton<TAO_ValueFactory_Map, TAO_SYNCH_MUTEX>; #pragma instantiate ACE_Hash_Map_Entry<const char *, CORBA::ValueFactoryBase *> #pragma instantiate TAO_Singleton<TAO_ValueFactory_Map, TAO_SYNCH_MUTEX> +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) +template TAO_Singleton<TAO_ValueFactory_Map, TAO_SYNCH_MUTEX> * TAO_Singleton<TAO_ValueFactory_Map, TAO_SYNCH_MUTEX>::singleton_; + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Makefile b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Makefile index 470465a6bda..709174f6724 100644 --- a/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Makefile +++ b/TAO/tests/CodeSets/libs/IBM1047_ISO8859/Makefile @@ -49,6 +49,12 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU LDFLAGS += -L$(TAO_ROOT)/tao CPPFLAGS += -I$(TAO_ROOT) +ifeq ($(shared_libs),1) +ifneq ($(SHLIB),) +CPPFLAGS += -DIBM1047_ISO8859_BUILD_DLL +endif +endif + #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- diff --git a/TAO/tests/DLL_ORB/Makefile.Test_Client_Module b/TAO/tests/DLL_ORB/Makefile.Test_Client_Module index 68043663022..70fe0b32d66 100644 --- a/TAO/tests/DLL_ORB/Makefile.Test_Client_Module +++ b/TAO/tests/DLL_ORB/Makefile.Test_Client_Module @@ -57,6 +57,12 @@ endif realclean: clean -$(RM) $(foreach ext, $(IDL_EXT), Test$(ext)) +ifeq ($(shared_libs),1) + ifneq ($(SHLIB),) + CPPFLAGS += -DTEST_CLIENT_MODULE_BUILD_DLL + endif +endif + #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- diff --git a/TAO/tests/DLL_ORB/Makefile.Test_Server_Module b/TAO/tests/DLL_ORB/Makefile.Test_Server_Module index 59ec101a8ea..ef9a26aea24 100644 --- a/TAO/tests/DLL_ORB/Makefile.Test_Server_Module +++ b/TAO/tests/DLL_ORB/Makefile.Test_Server_Module @@ -57,6 +57,12 @@ endif realclean: clean -$(RM) $(foreach ext, $(IDL_EXT), Test$(ext)) +ifeq ($(shared_libs),1) + ifneq ($(SHLIB),) + CPPFLAGS += -DTEST_SERVER_MODULE_BUILD_DLL + endif +endif + #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- diff --git a/TAO/tests/TestUtils/TestCombinedThreads.h b/TAO/tests/TestUtils/TestCombinedThreads.h index c582d3a7bda..0016d980511 100644 --- a/TAO/tests/TestUtils/TestCombinedThreads.h +++ b/TAO/tests/TestUtils/TestCombinedThreads.h @@ -20,13 +20,12 @@ #include "ace/OS.h" #include "ace/Auto_Ptr.h" +#include "ace/SString.h" // ******************************************************************* // Typedefs, forward declarations and defines // ******************************************************************* -class ACE_CString; - typedef int (*TEST_MAIN_TYPE_FUNC)(int, char**); #define TEST_MAIN_FUNC_DECLARE(X) int X(int argc, char** argv) #ifndef FULL_PATH diff --git a/ace/Based_Pointer_Repository.cpp b/ace/Based_Pointer_Repository.cpp index fa6c7e4c842..d3b5193610a 100644 --- a/ace/Based_Pointer_Repository.cpp +++ b/ace/Based_Pointer_Repository.cpp @@ -121,7 +121,7 @@ template class ACE_Map_Iterator_Base<void *, size_t, ACE_Null_Mutex>; #pragma instantiate ACE_Map_Iterator<void *, size_t, ACE_Null_Mutex> #pragma instantiate ACE_Map_Reverse_Iterator<void *, size_t, ACE_Null_Mutex> #pragma instantiate ACE_Map_Iterator_Base<void *, size_t, ACE_Null_Mutex> -#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux)) +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) template ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX> * ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX>::singleton_; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/Date_Time.h b/ace/Date_Time.h index 52df165365a..4343059a2f3 100644 --- a/ace/Date_Time.h +++ b/ace/Date_Time.h @@ -34,6 +34,9 @@ public: /// Constructor initializes current time/date info. ACE_Date_Time (void); + /// Constructor initializes with the given ACE_Time_Value + ACE_EXPLICIT ACE_Date_Time (const ACE_Time_Value& timevalue); + /// Constructor with init values, no check for validy /// Set/get portions of ACE_Date_Time, no check for validity. ACE_Date_Time (long day, diff --git a/ace/Date_Time.i b/ace/Date_Time.i index 9678fbc0081..2480a88001a 100644 --- a/ace/Date_Time.i +++ b/ace/Date_Time.i @@ -34,6 +34,13 @@ ACE_Date_Time::ACE_Date_Time (void) this->update (); } +ASYS_INLINE +ACE_Date_Time::ACE_Date_Time (const ACE_Time_Value& timevalue) +{ + ACE_TRACE ("ACE_Date_Time::ACE_Date_Time: timevalue"); + this->update (timevalue); +} + // Constructor with init values, no check for validy ASYS_INLINE ACE_Date_Time::ACE_Date_Time (long day, diff --git a/ace/Dynamic.cpp b/ace/Dynamic.cpp index 9d6f1f9b670..4042cd56402 100644 --- a/ace/Dynamic.cpp +++ b/ace/Dynamic.cpp @@ -36,7 +36,7 @@ ACE_Dynamic::instance (void) #pragma instantiate ACE_TSS<ACE_Dynamic> # endif /* ACE_HAS_THREADS && (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION) */ -#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux)) +#elif defined (__GNUC__) && (defined (_AIX) || defined (__hpux) || defined (VXWORKS)) template ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex> * ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>::singleton_; diff --git a/ace/Event_Handler_T.i b/ace/Event_Handler_T.i index b31415f7b73..31d030c555f 100644 --- a/ace/Event_Handler_T.i +++ b/ace/Event_Handler_T.i @@ -19,7 +19,7 @@ template<class T> ACE_INLINE ACE_HANDLE ACE_Event_Handler_T<T>::get_handle (void) const { ACE_TRACE ("ACE_Event_Handler_T<T>::get_handle"); - return this->get_handle_ == 0 ? -1 : (this->op_handler_->*get_handle_) (); + return this->get_handle_ == 0 ? ACE_INVALID_HANDLE : (this->op_handler_->*get_handle_) (); } template<class T> ACE_INLINE void diff --git a/ace/Log_Msg_NT_Event_Log.cpp b/ace/Log_Msg_NT_Event_Log.cpp index d9b82fb2d16..ed3c29cb0c6 100644 --- a/ace/Log_Msg_NT_Event_Log.cpp +++ b/ace/Log_Msg_NT_Event_Log.cpp @@ -2,7 +2,7 @@ #include "ace/config-all.h" -#if defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_HAS_LOG_MSG_NT_EVENT_LOG) #include "ace/Log_Msg_NT_Event_Log.h" #include "ace/Log_Msg.h" @@ -150,4 +150,4 @@ ACE_Log_Msg_NT_Event_Log::log (ACE_Log_Record &log_record) return 0; } -#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ +#endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ diff --git a/ace/Log_Msg_NT_Event_Log.h b/ace/Log_Msg_NT_Event_Log.h index f379c1dfc1a..b901aea2e00 100644 --- a/ace/Log_Msg_NT_Event_Log.h +++ b/ace/Log_Msg_NT_Event_Log.h @@ -20,7 +20,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +#if defined ACE_HAS_LOG_MSG_NT_EVENT_LOG #include "ace/Log_Msg_Backend.h" @@ -62,7 +62,7 @@ private: HANDLE evlog_handle_; }; -#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ +#endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ #include "ace/post.h" #endif /* ACE_LOG_MSG_NT_EVENT_LOG_H */ diff --git a/ace/Module.h b/ace/Module.h index c515ae350df..092f0f915e7 100644 --- a/ace/Module.h +++ b/ace/Module.h @@ -81,8 +81,8 @@ public: /// Shutdown the Module. ~ACE_Module (void); - /// Create an initialized module with <module_name> as its identity - /// and <reader> and <writer> as its tasks. + /// Create an initialized module with @a module_name as its identity + /// and @a reader and @a writer as its tasks. ACE_Module (const ACE_TCHAR *module_name, ACE_Task<ACE_SYNCH_USE> *writer = 0, ACE_Task<ACE_SYNCH_USE> *reader = 0, @@ -136,7 +136,7 @@ public: */ void reader (ACE_Task<ACE_SYNCH_USE> *q, int flags = M_DELETE_READER); - /// Set and get pointer to sibling <ACE_Task> in an <ACE_Module> + /// Set and get pointer to sibling ACE_Task in an ACE_Module ACE_Task<ACE_SYNCH_USE> *sibling (ACE_Task<ACE_SYNCH_USE> *orig); // = Identify the module diff --git a/ace/README b/ace/README index 07555825c1f..e21894fbb75 100644 --- a/ace/README +++ b/ace/README @@ -370,6 +370,9 @@ ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has only two fields. ACE_HAS_LIMITED_SELECT The select is unable to deal with large file descriptors. +ACE_HAS_LOG_MSG_NT_EVENT_LOG Platform supports Windows NT event + log so we can create an + ACE_Log_Msg_Backend to log to it. ACE_HAS_LONG_MAP_FAILED Platform defines MAP_FAILED as a long constant. ACE_HAS_MALLOC_STATS Enabled malloc statistics @@ -439,7 +442,7 @@ ACE_HAS_POSIX_NONBLOCK Platform supports POSIX O_NONBLOCK semantics ACE_HAS_POSIX_REALTIME_SIGNALS Platform supports POSIX RT signals. Corresponds to _POSIX_REALTIME_SIGNALS - constant in <unistd.h>. + constant in <unistd.h>. ACE_HAS_POSIX_SEM Platform supports POSIX real-time semaphores (e.g., VxWorks and Solaris). Corresponds @@ -807,8 +810,8 @@ ACE_LACKS_PARAM_H Platform lacks <sys/param.h> ACE_LACKS_PERFECT_MULTICAST_FILTERING Platform lacks IGMPv3 "perfect" filtering of multicast dgrams at the socket level. If == 1, ACE_SOCK_Dgram_Mcast will bind - the first joined multicast group to the - socket, and all future joins on that + the first joined multicast group to the + socket, and all future joins on that socket will fail with an error. ACE_LACKS_POSIX_PROTOTYPES Platform lacks POSIX prototypes for certain System diff --git a/ace/config-doxygen.h b/ace/config-doxygen.h index 92971ac7c68..85b492322c6 100644 --- a/ace/config-doxygen.h +++ b/ace/config-doxygen.h @@ -97,4 +97,7 @@ /// Generate ACE_Event_Handler_T documentation #define ACE_HAS_TEMPLATE_TYPEDEFS +/// Generate ACE_Log_Msg_NT_Event_Log documentation +#define ACE_HAS_LOG_MSG_NT_EVENT_LOG + #endif /* ACE_CONFIG_DOXYGEN_H */ diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index d3fc29ab4b5..fcefdfdebf5 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -565,5 +565,9 @@ typedef unsigned long long ACE_UINT64; # define ACE_DISABLES_THREAD_LIBRARY_CALLS 0 #endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */ +#if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) +# define ACE_HAS_LOG_MSG_NT_EVENT_LOG +#endif /* !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ + #include "ace/post.h" #endif /* ACE_CONFIG_WIN32_COMMON_H */ diff --git a/ace/config-win32-mingw.h b/ace/config-win32-mingw.h index af590f6003b..e4cc77e30de 100644 --- a/ace/config-win32-mingw.h +++ b/ace/config-win32-mingw.h @@ -11,7 +11,7 @@ #include "ace/pre.h" #ifndef ACE_CONFIG_WIN32_H -#error Use config-win32.h in config.h instead of this header +# error Use config-win32.h in config.h instead of this header #endif /* ACE_CONFIG_WIN32_H */ #define ACE_CC_NAME ACE_LIB_TEXT ("g++") @@ -37,8 +37,8 @@ #define ACE_LACKS_MODE_MASKS #define ACE_HAS_USER_MODE_MASKS -#if (__MINGW32_MAJOR_VERSION == 0) && (__MINGW32_MINOR_VERSION < 5) -#error You need a newer version (>= 0.5) of mingw32/w32api +#if (__MINGW32_MAJOR_VERSION < 2) +# error You need a newer version (>= 2.0) of mingw32/w32api #endif #define ACE_LACKS_STRRECVFD @@ -61,36 +61,5 @@ #define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) (STATUS)) -#if ( __W32API_MAJOR_VERSION < 1) || ((__W32API_MAJOR_VERSION == 1) && (__W32API_MINOR_VERSION <= 5)) - -// The MingW32 w32api version 1.50 and lower don't define these types and methods -// but we need it in the Win32_Asynch_IO.cpp - -extern "C" { - - typedef void *PVOID,*LPVOID; - - /* FIXME for __WIN64 */ - #ifndef __ptr64 - #define __ptr64 - #endif - typedef void* __ptr64 PVOID64; - - // - // Define segement buffer structure for scatter/gather read/write. - // - typedef union _FILE_SEGMENT_ELEMENT { - PVOID64 Buffer; - ULONGLONG Alignment; - }FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; - - - BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); - - BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); -} - -#endif - #include "ace/post.h" #endif /* ACE_CONFIG_WIN32_MINGW_H */ diff --git a/apps/drwho/Makefile b/apps/drwho/Makefile index be9c94e3841..2d5f2aecd75 100644 --- a/apps/drwho/Makefile +++ b/apps/drwho/Makefile @@ -77,16 +77,29 @@ ifeq (1,$(VXWORKS)) # drwho will not build on vxworks all clean realclean: @echo drwho will not build on vxworks - else # VXWORKS + ifeq (1,$(CHORUS)) # since protocols/rwhod.h is not available under Chorus # drwho will not build on chorus all clean realclean: @echo drwho will not build on chorus - else # CHORUS + ifeq (1,$(mingw32)) + # since protocols/rwhod.h is not available under mingw32 + # drwho will not build on mingw32 + all clean realclean: + @echo drwho will not build on mingw32 + else # mingw32 + + ifeq (1,$(cygwin32)) + # since protocols/rwhod.h is not available under cygwin32 + # drwho will not build on cygwin32 + all clean realclean: + @echo drwho will not build on cygwin32 + else # cygwin32 + include $(ACE_ROOT)/include/makeinclude/macros.GNU include $(ACE_ROOT)/include/makeinclude/rules.common.GNU include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU @@ -102,9 +115,12 @@ drwho-client: $(addprefix $(VDIR),$(CLIENT-OBJ)) $(addprefix $(VDIR),$(SHARED-OB drwho-server: $(addprefix $(VDIR),$(SERVER-OBJ)) $(addprefix $(VDIR),$(SHARED-OBJ)) $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) + + endif #cygwin32 + endif #mingw32 endif #Chorus endif #VxWorks - + #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- diff --git a/examples/Reactor/Misc/test_event_handler_t.cpp b/examples/Reactor/Misc/test_event_handler_t.cpp index a944c739ac5..f5195d17aff 100644 --- a/examples/Reactor/Misc/test_event_handler_t.cpp +++ b/examples/Reactor/Misc/test_event_handler_t.cpp @@ -15,7 +15,7 @@ public: virtual void set_handle (ACE_HANDLE) {} virtual int handle_async_io (ACE_HANDLE) { return 0; } virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask) { return 0; } - virtual int signal_handler (ACE_HANDLE /* signum */, + virtual int signal_handler (int /* signum */, siginfo_t * = 0, ucontext_t * = 0) { diff --git a/examples/Reactor/Ntalker/ntalker.cpp b/examples/Reactor/Ntalker/ntalker.cpp index 547de486d50..3b4019044fa 100644 --- a/examples/Reactor/Ntalker/ntalker.cpp +++ b/examples/Reactor/Ntalker/ntalker.cpp @@ -29,8 +29,8 @@ public: // = Initialization and termination methods. Handler (u_short udp_port, const char *ip_addr, - const ACE_TCHAR *interface, - ACE_Reactor &); + const ACE_TCHAR *a_interface, + ACE_Reactor & ); // Constructor. ~Handler (void); @@ -141,7 +141,7 @@ Handler::~Handler (void) Handler::Handler (u_short udp_port, const char *ip_addr, - const ACE_TCHAR *interface, + const ACE_TCHAR *a_interface, ACE_Reactor &reactor) { // Create multicast address to listen on. @@ -150,11 +150,12 @@ Handler::Handler (u_short udp_port, // subscribe to multicast group. - if (this->mcast_.subscribe (sockmc_addr, 1, interface) == -1) - ACE_ERROR ((LM_ERROR, + if (this->mcast_.subscribe (sockmc_addr, 1, a_interface) == -1) + { + ACE_ERROR ((LM_ERROR, "%p\n", "can't subscribe to multicast group")); - + } // Disable loopbacks. // if (this->mcast_.set_option (IP_MULTICAST_LOOP, 0) == -1 ) // ACE_OS::perror (" can't disable loopbacks " ), ACE_OS::exit (1); diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp index 79b70627168..9a6020d590c 100644 --- a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp +++ b/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp @@ -3,10 +3,13 @@ #include "ace/SV_Message_Queue.h" #include "test.h" #include "ace/streams.h" +#include "ace/Malloc.h" ACE_RCSID(SV_Message_Queues, MQ_Client, "$Id$") -int +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + +int main (int, char *[]) { long pid = long (ACE_OS::getpid ()); @@ -23,13 +26,24 @@ main (int, char *[]) if (msgque.recv (recv_msg, sizeof (Message_Data), recv_msg.type ()) < 0) ACE_OS::perror ("msgrcv"), ACE_OS::exit (1); - cout << "a message of length " + cout << "a message of length " << recv_msg.length () - << " received from server " - << recv_msg.pid () - << " (user " - << recv_msg.user () << "): " + << " received from server " + << recv_msg.pid () + << " (user " + << recv_msg.user () << "): " << recv_msg.text () << "\n"; return 0; } + +#else + +int main (int, char *[]) +{ + ACE_ERROR ((LM_ERROR, + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); + return 0; +} +#endif /* ACE_HAS_SYSV_IPC && !ACE_LACKS_SYSV_SHMEM*/ + diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp index 6e42d0d2629..7b6bca929f8 100644 --- a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp +++ b/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp @@ -7,6 +7,8 @@ ACE_RCSID(SV_Message_Queues, MQ_Server, "$Id$") +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + // Must be global for signal Message... static ACE_SV_Message_Queue ace_sv_message_queue (SRV_KEY, ACE_SV_Message_Queue::ACE_CREATE); @@ -59,3 +61,13 @@ main (int, char *[]) ACE_NOTREACHED (return 0;) } + +#else + +int main (int, char *[]) +{ + ACE_ERROR ((LM_ERROR, + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); + return 0; +} +#endif /* ACE_HAS_SYSV_IPC && !ACE_LACKS_SYSV_SHMEM */ diff --git a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp index db0c2ae9a03..373c92dae79 100644 --- a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp +++ b/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp @@ -9,6 +9,8 @@ ACE_RCSID(SV_Message_Queues, TMQ_Server, "$Id$") +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + // Must be global for signal Message... static ACE_Typed_SV_Message_Queue<Message_Data> ace_sv_message_queue (SRV_KEY, ACE_Typed_SV_Message_Queue<Message_Data>::ACE_CREATE); @@ -65,3 +67,14 @@ template class ACE_Typed_SV_Message<Message_Data>; #pragma instantiate ACE_Typed_SV_Message_Queue<Message_Data> #pragma instantiate ACE_Typed_SV_Message<Message_Data> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#else + +int main (int, char *[]) +{ + ACE_ERROR ((LM_ERROR, + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); + return 0; +} +#endif /* ACE_HAS_SYSV_IPC && !ACE_LACKS_SYSV_SHMEM */ + diff --git a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp index e0aae71f3fc..0a7d718009d 100644 --- a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp +++ b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp @@ -5,6 +5,8 @@ ACE_RCSID(SV_Shared_Memory, SV_Shared_Memory_Test, "$Id$") +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + static void client (void) { @@ -51,8 +53,8 @@ main (int, char *argv[]) { case -1: ACE_OS::perror (argv[0]), ACE_OS::exit (1); - case 0: - ACE_OS::sleep (1); + case 0: + ACE_OS::sleep (1); client (); default: server (); @@ -60,3 +62,13 @@ main (int, char *argv[]) return 0; } +#else + +int main (int, char *[]) +{ + ACE_ERROR ((LM_ERROR, + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); + return 0; +} +#endif /* ACE_HAS_SYSV_IPC && !ACE_LACKS_SYSV_SHMEM/ + diff --git a/include/makeinclude/platform_cygwin32.GNU b/include/makeinclude/platform_cygwin32.GNU index 71ee0639793..63ed5d5137e 100644 --- a/include/makeinclude/platform_cygwin32.GNU +++ b/include/makeinclude/platform_cygwin32.GNU @@ -26,4 +26,9 @@ endif SONAME= SOVERSION= +# Disable auto-import warnings. The Cygwin linker has a problem with imports +# See https://sourceforge.net/tracker/?func=detail&atid=102435&aid=683455&group_id=2435 +# for the details why to do this. +LDFLAGS += -Wl,--enable-auto-import + include $(ACE_ROOT)/include/makeinclude/platform_gnuwin32_common.GNU diff --git a/include/makeinclude/platform_g++_common.GNU b/include/makeinclude/platform_g++_common.GNU index 04de1224b65..6a92ba2845f 100644 --- a/include/makeinclude/platform_g++_common.GNU +++ b/include/makeinclude/platform_g++_common.GNU @@ -50,8 +50,10 @@ ifneq ($(SONAME),) ifeq ($(with_ld),hpux) SOFLAGS += -Wl,+h -Wl,$(SONAME) else - ifneq ($(with_ld),aix) - SOFLAGS += -Wl,-h -Wl,$(SONAME) + ifneq ($(with_ld),vxworks) + ifneq ($(with_ld),aix) + SOFLAGS += -Wl,-h -Wl,$(SONAME) + endif endif endif endif diff --git a/include/makeinclude/platform_linux_borland.GNU b/include/makeinclude/platform_linux_borland.GNU index 7912951ec62..0b9580a7b7c 100644 --- a/include/makeinclude/platform_linux_borland.GNU +++ b/include/makeinclude/platform_linux_borland.GNU @@ -2,9 +2,6 @@ # platform_linux_borland.GNU -# debug = 1 -# optimize = 1 - ifndef BCB BCB = /usr/local/kylix3 endif @@ -83,7 +80,7 @@ DCFLAGS = -DNDEBUG DCCFLAGS = endif -kylix_build = 1 +kylix = 1 INCLUDEPATH = $(BCB)/include/stlport:$(BCB)/include:$(BCB)/include/vcl:/usr/include:$(ACE_ROOT) LIBPATH = $(BCB)/lib/obj:$(BCB)/lib:/usr/lib:/lib:/usr/X11R6/lib:$(BCB)/bin ACELIBPATH = $(ACE_ROOT)/ace:./ @@ -102,18 +99,16 @@ CFLAGS = $(WARNINGS_CFLAGS) -q -VP -Vx -a8 -b- -k $(DCFLAGS) \ CPPFLAGS += #$(CFLAGS) CCFLAGS += $(CFLAGS) -BORLDFLAGS = -c -L$(LIBPATH):$(ACELIBPATH) -x -Gn -v -L$(LIBPATH):$(ACELIBPATH) +BORLDFLAGS = -c -L$(LIBPATH):$(ACELIBPATH) -x -Gn -v BORINITOBJ = borinitso.o borinit.o crt1.o BORSHAREDOBJ += libborcrtl.so libborstl.so libborunwind.so libc.so libm.so libdl.so PRELINK= -SOFLAGS= $(BORSHAREDOBJ) borinitso.o -Tpd -#ACELIB= libACE.so -#TAO_IDL_FE_LIB= libTAO_IDL_FE_DLL.so +SOFLAGS= -Tpd -SOLINK.cc = $(LD) $(BORINITOBJ) -Tpd +SOLINK.cc = $(LD) -Tpd LINK.cc = override -LINK.cc.override = $(LD) $(LDFLAGS) $(VLDLIBS) $(BORINITOBJ) $(BORSHAREDOBJ) $(BORLDFLAGS) $(POSTLINK) +LINK.cc.override = $(LD) $(LDFLAGS) $(BORINITOBJ) $(BORSHAREDOBJ) $(BORLDFLAGS) $(POSTLINK) SONAME= SOVERSION= diff --git a/include/makeinclude/platform_mingw32.GNU b/include/makeinclude/platform_mingw32.GNU index 0d6850458c6..98fda38062d 100644 --- a/include/makeinclude/platform_mingw32.GNU +++ b/include/makeinclude/platform_mingw32.GNU @@ -10,16 +10,7 @@ # See also http://www.mingw.org. # # You will also need a GNU Make for win32 (so you can actualy -# USE this file :-). Tested with make/sh from cygwin. -# -# Tested with: -# -# mingw-runtime-0.5-20010221 -# w32api-0.5-20010301 -# gcc-2.95.2-20001116 -# binutils-2.10.91-20010114 -# ld-2.10.91-20010126 -# libbfd-2.10.91-20010121 +# USE this file :-). Tested with MSYS from MinGW # # Caveat: # @@ -40,10 +31,16 @@ TCPU = pentiumpro #TCPU = i486 #TCPU = i386 +mingw32 = 1 + # MingW doesn't allow to add the version number of ACE to the dll name # because fe ace.dll.5.2.3 isn't a valid dll name SONAME= SOVERSION= -mingw32 = 1 +# Disable auto-import warnings. The MingW linker has a problem with imports +# See https://sourceforge.net/tracker/?func=detail&atid=102435&aid=683455&group_id=2435 +# for the details why to do this. +LDFLAGS += -Wl,--enable-auto-import + include $(ACE_ROOT)/include/makeinclude/platform_gnuwin32_common.GNU diff --git a/include/makeinclude/platform_sunos5_ghs.GNU b/include/makeinclude/platform_sunos5_ghs.GNU index 5c4d2aead4e..6c27f4ce6f2 100644 --- a/include/makeinclude/platform_sunos5_ghs.GNU +++ b/include/makeinclude/platform_sunos5_ghs.GNU @@ -9,11 +9,11 @@ threads = 1 # I(kitty) don't know anything about this compiler. Making it explicit. # -templates = "explicit" +templates = explicit # Turn on the proper flags for explicit template instantiation. # -ifeq ("$(templates)","explicit") +ifeq ($(templates),explicit) ifeq ($(TEMPLATES_FLAG),) # Turn on flags if none is speficied. TEMPLATES_FLAG=-tnone endif diff --git a/include/makeinclude/platform_sunos5_kcc.GNU b/include/makeinclude/platform_sunos5_kcc.GNU index f12e4f031ec..50f8261240b 100644 --- a/include/makeinclude/platform_sunos5_kcc.GNU +++ b/include/makeinclude/platform_sunos5_kcc.GNU @@ -9,11 +9,11 @@ exceptions = 1 # I(kitty) don't know anything about this combination. Making it explicit. # XXX: Get the flags from the Kai web-site and fill it in. -templates = "explicit" +templates = explicit # Turn on the proper flags for explicit template instantiation. # -ifeq ("$(templates)","explicit") +ifeq ($(templates),explicit) ifeq ($(TEMPLATES_FLAG),) # Turn on flags if none is speficied. TEMPLATES_FLAG= endif diff --git a/include/makeinclude/platform_vxworks5.x_diab.GNU b/include/makeinclude/platform_vxworks5.x_diab.GNU index 931843ae1e9..a0b49fa2137 100644 --- a/include/makeinclude/platform_vxworks5.x_diab.GNU +++ b/include/makeinclude/platform_vxworks5.x_diab.GNU @@ -113,7 +113,7 @@ endif ifeq ($(SHARED_LIBS),1) ACELIB = -L./ #### There's no difference between non-shared and shared object code. - VSHDIR = .obj/ + VSHDIR = $(VDIR) endif # shared_libs ifeq ($(static_libs),1) diff --git a/include/makeinclude/platform_vxworks5.x_g++.GNU b/include/makeinclude/platform_vxworks5.x_g++.GNU index 4452ebdc6ac..6406a0b2e87 100644 --- a/include/makeinclude/platform_vxworks5.x_g++.GNU +++ b/include/makeinclude/platform_vxworks5.x_g++.GNU @@ -30,6 +30,9 @@ endif # ! optimize ifndef rtti rtti = 0 endif # ! rtti +ifndef with_ld + with_ld = vxworks +endif # ! with_ld shared_libs = static_libs = 1 @@ -39,11 +42,7 @@ static_libs = 1 # they are welcome to check the instantiation problem. Overriding it to be # explicit. # -templates = "explicit" - -# Test for template instantiation. -# -include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU +templates = explicit ifeq (,$(WIND_BASE)) default: @@ -97,7 +96,7 @@ endif # default GCC Version # These variables may be set on the command line if a different ACE_VXWORKS # flag is desired. - + ifeq ($(VXWORKS_VERSION_FLAG),) ifeq ($(GCC_VERSION),gcc-2.96) VXWORKS_VERSION_FLAG = -DACE_VXWORKS=0x542 @@ -106,7 +105,7 @@ ifeq ($(VXWORKS_VERSION_FLAG),) VXWORKS_STDINC_FLAG = -nostdinc endif # GCC_VERSION endif # VXWORKS_VERSION_FLAG - + ifeq ($(CPU),SH7700) @@ -177,12 +176,12 @@ else ifeq ($(CPU),PENTIUMPRO) BINXSYM_NAME = xsymDec CFLAGS += -DCPU=PENTIUMPRO - TOOLENV = 386 + TOOLENV = pentium else ifeq ($(CPU),PENTIUM) BINXSYM_NAME = xsymDec CFLAGS += -DCPU=PENTIUM - TOOLENV = 386 + TOOLENV = pentium else ifeq ($(CPU),I80486) #### Note: -fno-implicit-templates doesn't seem to work well with g++ @@ -279,6 +278,10 @@ else endif # simso endif # x86-win32 +# Test for template instantiation. +# +include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU + ifeq ($(shared_libs),1) SHARED_LIBS = 1 endif @@ -289,7 +292,7 @@ endif ifeq ($(SHARED_LIBS),1) ACELIB = -L./ #### There's no difference between non-shared and shared object code. - VSHDIR = .obj/ + VSHDIR = $(VDIR) endif # shared_libs ifeq ($(static_libs),1) diff --git a/include/makeinclude/rules.bin.GNU b/include/makeinclude/rules.bin.GNU index 8548c05fb56..b93ad077d5d 100644 --- a/include/makeinclude/rules.bin.GNU +++ b/include/makeinclude/rules.bin.GNU @@ -22,7 +22,7 @@ ifeq (1,$(using_aix_vacpp)) $(BIN): %: %.icc $(SRC) vacbld_r $< -severitylevel=warning else -ifdef kylix_build +ifdef kylix $(BIN): %: $(VDIR)%.$(OBJEXT) $(VOBJS) $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(POSTLINK) $^, $@,, else diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU index e2f1c9cce0e..346eee4ae36 100644 --- a/include/makeinclude/rules.lib.GNU +++ b/include/makeinclude/rules.lib.GNU @@ -118,8 +118,8 @@ ifdef ibmcxx_build $(SOLINK.cc) $(SO_OUTPUT_FLAG) $@ $(VSHOBJS1) $(LDFLAGS) $(ACE_SHLIBS) $(LIBS); \ fi else -ifdef kylix_build - $(SOLINK.cc) $(VSHOBJS1), $@,, $(ACE_SHLIBS) $(LIBS) $(LDFLAGS) +ifdef kylix + $(SOLINK.cc) $(LDFLAGS) $(VSHOBJS1), $@,, $(LDFLAGS) $(ACE_SHLIBS) $(LIBS) else ifeq (1,$(ace_lib_prelink)) #### Attempt a link (which will fail), to add template instantiations diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU index 8392100bbd1..5d8ab91e145 100644 --- a/include/makeinclude/wrapper_macros.GNU +++ b/include/makeinclude/wrapper_macros.GNU @@ -587,6 +587,12 @@ else # ! shared_libs endif # ! static_libs endif # ! shared_libs +ifdef kylix + LDLIBS := $(LDLIBS:-l%=lib%.$(SOEXT)) + LIBS := $(LIBS:-l%=lib%.$(SOEXT)) + ACELIB := $(ACELIB:-l%=lib%.$(SOEXT)) +endif # kylix + VLDLIBS = $(LDLIBS) $(ACELIB) $(LIBS) ifeq ($(probe),0) diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp index 212eb7e95c1..19626ded276 100644 --- a/tests/Time_Value_Test.cpp +++ b/tests/Time_Value_Test.cpp @@ -197,6 +197,10 @@ ACE_TMAIN (int, ACE_TCHAR *[]) // actually warn about it without the case. ACE_Time_Value tv8 (ACE_static_cast (long, 2.5)); + // Test assignment operator, tv9 and tv6 must be the same after this + ACE_Time_Value tv9; + tv9 = tv6; + ACE_ASSERT (tv1 == ACE_Time_Value (0)); ACE_ASSERT (tv2 < tv3); ACE_ASSERT (tv2 <= tv2); @@ -209,6 +213,7 @@ ACE_TMAIN (int, ACE_TCHAR *[]) ACE_ASSERT (tv6 == tv1); ACE_ASSERT (tv5 == tv7); ACE_ASSERT (tv7 == tv8); // That's right! See above . . . + ACE_ASSERT (tv9 == tv6); #if defined (sun) && !defined (ACE_LACKS_LONGLONG_T) if (test_ace_u_longlong () != 0) |