From f53d338d60f1f8d4b151fcd332fdd1e96b08a2ff Mon Sep 17 00:00:00 2001 From: bala Date: Thu, 12 Jun 2003 20:32:20 +0000 Subject: ChangeLogTag:Thu Jun 12 15:20:37 2003 Balachandran Natarajan --- ChangeLog | 15 +++++++++++++++ ace/INET_Addr.cpp | 2 +- ace/Makefile.ace | 2 +- ace/Stats.cpp | 10 +++------- ace/Template_Instantiations.cpp | 23 ++++++++++++++++++++--- 5 files changed, 40 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index a602ad0bb66..f77ded0bffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Thu Jun 12 15:20:37 2003 Balachandran Natarajan + + * ace/Template_Instantiations.cpp: This file now contains some + useful template definitions that would be used by ACE+TAO and + its applications. We have started of by doing + ACE_Unbounded_Queue. In future we will add other basic + types on a case by case basis. + + * ace/Stats.cpp: Removed the template instantiations of + ACE_Unbounded_Queue since it has now been moved to another + file. + + * ace/Makefile.ace: Compile the file Template_Instantiations.cpp + in normal builds. + Wed Jun 11 16:27:41 2003 Steve Huston * examples/C++NPv1/Logging_Client.cpp: diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp index a95818359d7..d29cb18bb75 100644 --- a/ace/INET_Addr.cpp +++ b/ace/INET_Addr.cpp @@ -325,7 +325,7 @@ static int get_port_number_from_name (const char port_name[], // We try to resolve port number from its name. #if defined (VXWORKS) || defined (CHORUS) || defined (ACE_LACKS_GETSERVBYNAME) - port_number = -1; + port_number = 0; ACE_UNUSED_ARG (port_name); ACE_UNUSED_ARG (protocol); #else diff --git a/ace/Makefile.ace b/ace/Makefile.ace index 98cbd309256..de6de582a3e 100644 --- a/ace/Makefile.ace +++ b/ace/Makefile.ace @@ -59,6 +59,7 @@ UTILS_FILES = \ String_Base_Const \ SString \ Stats \ + Template_Instantiations \ Sample_History #### NOTE: see below for Filecache. LOGGING_FILES = \ @@ -317,7 +318,6 @@ TEMPLATE_FILES = \ Svc_Handler \ Synch_T \ Task_T \ - Template_Instantiations \ Test_and_Set \ Timeprobe_T \ Timer_Hash_T \ diff --git a/ace/Stats.cpp b/ace/Stats.cpp index f9d60fbcd78..0ca18fafcb8 100644 --- a/ace/Stats.cpp +++ b/ace/Stats.cpp @@ -591,7 +591,7 @@ ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, ACE_static_cast (double, ACE_UINT64_DBLCAST_ADAPTER(elapsed_time / sf)); #endif /* ! ACE_LACKS_LONGLONG_T */ - seconds /= ACE_HR_SCALE_CONVERSION; + seconds /= ACE_HR_SCALE_CONVERSION; double t_avg = samples_count / seconds; ACE_DEBUG ((LM_DEBUG, @@ -602,11 +602,7 @@ ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, // **************************************************************** #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Node ; -template class ACE_Unbounded_Queue ; -template class ACE_Unbounded_Queue_Iterator ; + #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Node -#pragma instantiate ACE_Unbounded_Queue -#pragma instantiate ACE_Unbounded_Queue_Iterator + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/Template_Instantiations.cpp b/ace/Template_Instantiations.cpp index 28f6aa318e7..645917aca35 100644 --- a/ace/Template_Instantiations.cpp +++ b/ace/Template_Instantiations.cpp @@ -1,6 +1,25 @@ // $Id$ +#include "ace/CDR_Base.h" +#include "ace/Unbounded_Queue.h" -// Note: this file has been created through concatenation of ALL +// Instantiations of templates with basic data types that can be used +// across ACE+TAO. +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Node; +template class ACE_Unbounded_Queue; +template class ACE_Unbounded_Queue_Iterator; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Node; +#pragma instantiate ACE_Unbounded_Queue; +#pragma instantiate ACE_Unbounded_Queue_Iterator; + +#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION*/ + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE) +// Note: this part has been created through concatenation of ALL // explicit template instantiations in ACE, and only those that // interfered with the multithreaded port of ACE to pSOS using the // Diab D-C++ 4.1a compiler have been wrapped with the appropriate @@ -10,8 +29,6 @@ // wish to extend this technique to instantiation pragmas, you will // need to modify the preprocesor directives below -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE) - // header files that are not already included #include "ace/Local_Tokens.h" #include "ace/Token.h" -- cgit v1.2.1