diff options
author | john_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-11-02 18:21:59 +0000 |
---|---|---|
committer | john_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-11-02 18:21:59 +0000 |
commit | 66994f6920f0dbf1771fd08eacc4b8e11d3fb3c8 (patch) | |
tree | 39743414a0c5103f08a2efee9a2ebc623396b40c | |
parent | 50d4fb453474c7f222ff8d3a305521f7d47f1c9d (diff) | |
download | ATCD-66994f6920f0dbf1771fd08eacc4b8e11d3fb3c8.tar.gz |
More of Daves ACE_USES_WCHAR fixes
47 files changed, 94 insertions, 36 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp index 374aa315357..4f544812221 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp @@ -1,6 +1,7 @@ // $Id$ #include "server.h" +#include "ace/Argv_Type_Converter.h" FTP_Server_FlowEndPoint::FTP_Server_FlowEndPoint (void) :TAO_FlowConsumer ("Data",FTP_SERVER::instance ()->protocols (), FTP_SERVER::instance ()->format ()) diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp index d44665ee44f..380c9b1774d 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp @@ -8,6 +8,7 @@ #include "ace/Get_Opt.h" #include "ace/Argv_Type_Converter.h" #include "ace/INET_Addr.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (Latency, ping, diff --git a/TAO/orbsvcs/tests/BiDir_CORBALOC/TimeServer.cpp b/TAO/orbsvcs/tests/BiDir_CORBALOC/TimeServer.cpp index 58535a5ffd8..01c18a645e5 100644 --- a/TAO/orbsvcs/tests/BiDir_CORBALOC/TimeServer.cpp +++ b/TAO/orbsvcs/tests/BiDir_CORBALOC/TimeServer.cpp @@ -5,6 +5,7 @@ #include "tao/Utils/PolicyList_Destroyer.h" #include "orbsvcs/CosNamingC.h" #include "tao/AnyTypeCode/Any.h" +#include "ace/Argv_Type_Converter.h" class Time_impl : public POA_TimeModule::Time diff --git a/TAO/orbsvcs/tests/Bug_1334_Regression/client.cpp b/TAO/orbsvcs/tests/Bug_1334_Regression/client.cpp index 88f1a575b63..caf397dfb63 100644 --- a/TAO/orbsvcs/tests/Bug_1334_Regression/client.cpp +++ b/TAO/orbsvcs/tests/Bug_1334_Regression/client.cpp @@ -2,6 +2,7 @@ // $Id$ // #include "tao/corba.h" +#include "ace/Argv_Type_Converter.h" // Attempts to resolve the NameService. // Returns: diff --git a/TAO/orbsvcs/tests/Bug_1630_Regression/testclient.cpp b/TAO/orbsvcs/tests/Bug_1630_Regression/testclient.cpp index 359e8a1f8ce..fb387fc28c7 100644 --- a/TAO/orbsvcs/tests/Bug_1630_Regression/testclient.cpp +++ b/TAO/orbsvcs/tests/Bug_1630_Regression/testclient.cpp @@ -6,6 +6,7 @@ #include "tao/IFR_Client/IFR_Client_Adapter_Impl.h" #include "tao/AnyTypeCode/NVList.h" #include "ace/OS_NS_string.h" +#include "ace/Argv_Type_Converter.h" int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp index 4da957a73f4..d8485d8ba45 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Disconnect.cpp @@ -6,6 +6,7 @@ #include "orbsvcs/Time_Utilities.h" #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "orbsvcs/CosEvent/CEC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (CEC_Tests, Disconnect, diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp index feb7d737f06..de7a4095f71 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/MT_Disconnect.cpp @@ -3,6 +3,7 @@ #include "MT_Disconnect.h" #include "Counting_Consumer.h" #include "Counting_Supplier.h" +#include "ace/Argv_Type_Converter.h" #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "orbsvcs/CosEvent/CEC_Default_Factory.h" diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp index cca5eae7f43..c57760a147a 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Pull_Push_Event.cpp @@ -5,6 +5,7 @@ #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "orbsvcs/CosEvent/CEC_Default_Factory.h" #include "ace/OS_NS_unistd.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (CEC_Tests_Basic, Pull_Push_Event, diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp index 1c2c0141bb8..627999a0e97 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Push_Event.cpp @@ -5,6 +5,7 @@ #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "orbsvcs/CosEvent/CEC_Default_Factory.h" #include "ace/OS_NS_unistd.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (CEC_Tests_Basic, Push_Event, diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp index c24bfa7cc24..0fce694b649 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp @@ -4,6 +4,7 @@ #include "Counting_Supplier.h" #include "orbsvcs/CosEvent/CEC_EventChannel.h" #include "orbsvcs/CosEvent/CEC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID( CEC_Tests_Basic, Shutdown, diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/Consumer.cpp b/TAO/orbsvcs/tests/EC_MT_Mcast/Consumer.cpp index 2ec6c650a2c..a67e826a5e6 100644 --- a/TAO/orbsvcs/tests/EC_MT_Mcast/Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_MT_Mcast/Consumer.cpp @@ -4,6 +4,7 @@ #include "Consumer.h" #include "orbsvcs/RtecEventChannelAdminS.h" #include "orbsvcs/Event_Service_Constants.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(EC_MT_Mcast, Consumer, diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/Supplier.cpp b/TAO/orbsvcs/tests/EC_MT_Mcast/Supplier.cpp index 0060bd58ed5..102c098053f 100644 --- a/TAO/orbsvcs/tests/EC_MT_Mcast/Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_MT_Mcast/Supplier.cpp @@ -4,6 +4,7 @@ #include "Supplier.h" #include "orbsvcs/RtecEventChannelAdminS.h" #include "orbsvcs/Event_Service_Constants.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(EC_MT_Mcast, Supplier, diff --git a/TAO/orbsvcs/tests/Event/Basic/Atomic_Reconnect.cpp b/TAO/orbsvcs/tests/Event/Basic/Atomic_Reconnect.cpp index 46b0f2e0976..3ddb3d7c466 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Atomic_Reconnect.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Atomic_Reconnect.cpp @@ -4,6 +4,7 @@ #include "Counting_Supplier.h" #include "ace/OS_NS_unistd.h" +#include "ace/Argv_Type_Converter.h" #include "orbsvcs/Time_Utilities.h" #include "orbsvcs/Event_Utilities.h" diff --git a/TAO/orbsvcs/tests/Event/Basic/Bitmask.cpp b/TAO/orbsvcs/tests/Event/Basic/Bitmask.cpp index 225b737576c..4c299497b98 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Bitmask.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Bitmask.cpp @@ -7,6 +7,7 @@ #include "orbsvcs/Event_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Bitmask, diff --git a/TAO/orbsvcs/tests/Event/Basic/Complex.cpp b/TAO/orbsvcs/tests/Event/Basic/Complex.cpp index 96d6f5188d6..3cb84193bb9 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Complex.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Complex.cpp @@ -6,6 +6,7 @@ #include "orbsvcs/Event_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Complex, diff --git a/TAO/orbsvcs/tests/Event/Basic/Gateway.cpp b/TAO/orbsvcs/tests/Event/Basic/Gateway.cpp index 3cfc0ebd465..324bda69d55 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Gateway.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Gateway.cpp @@ -7,6 +7,7 @@ #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" #include "orbsvcs/Event/EC_Gateway_IIOP.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Gateway, diff --git a/TAO/orbsvcs/tests/Event/Basic/Negation.cpp b/TAO/orbsvcs/tests/Event/Basic/Negation.cpp index 3bb9d0e579e..8d4124d1ea7 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Negation.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Negation.cpp @@ -7,6 +7,7 @@ #include "orbsvcs/Event_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Negation, diff --git a/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp b/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp index 5c18c9af4c3..6a2f80bde09 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Timeout.cpp @@ -7,6 +7,7 @@ #include "orbsvcs/Event_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Timeout, diff --git a/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp b/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp index 8e3b9824392..05ad26f5f44 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Wildcard.cpp @@ -6,6 +6,7 @@ #include "orbsvcs/Event_Utilities.h" #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (EC_Tests, Wildcard, diff --git a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp index e14cf58ed0a..178d8417b90 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Common/Gateway_EC.cpp @@ -91,7 +91,7 @@ Gateway_EC::run (int argc, char ** argv) { // Initialize ORB and POA, POA Manager, parse args. CORBA::ORB_var orb = - CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; orb_destroyer.init (orb); diff --git a/TAO/orbsvcs/tests/Event/Mcast/Complex/gateway-ec.cpp b/TAO/orbsvcs/tests/Event/Mcast/Complex/gateway-ec.cpp index eabb9441d4c..2008a8f43aa 100644 --- a/TAO/orbsvcs/tests/Event/Mcast/Complex/gateway-ec.cpp +++ b/TAO/orbsvcs/tests/Event/Mcast/Complex/gateway-ec.cpp @@ -1,6 +1,7 @@ // $Id$ #include "Gateway_EC.h" +#include "ace/Argv_Type_Converter.h" int ACE_TMAIN (int argc, ACE_TCHAR ** argv) diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.cpp b/TAO/orbsvcs/tests/Event/lib/Driver.cpp index aa8162270d7..d0bd0fbd9ad 100644 --- a/TAO/orbsvcs/tests/Event/lib/Driver.cpp +++ b/TAO/orbsvcs/tests/Event/lib/Driver.cpp @@ -68,7 +68,7 @@ EC_Driver::run (int argc, char* argv[]) // test. ACE_High_Res_Timer::calibrate (); - this->run_init (convert.get_argc(), convert.get_ASCII_argv() ACE_ENV_ARG_PARAMETER); + this->run_init (argc, argv ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; this->execute_test (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -175,7 +175,7 @@ EC_Driver::initialize_orb_and_poa (int &argc, char* argv[] ACE_ENV_ARG_DECL) { this->orb_ = - CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); ACE_CHECK; CORBA::Object_var poa_object = diff --git a/TAO/orbsvcs/tests/FT_App/FT_Client.cpp b/TAO/orbsvcs/tests/FT_App/FT_Client.cpp index 0fb925028ab..18dd45040a5 100644 --- a/TAO/orbsvcs/tests/FT_App/FT_Client.cpp +++ b/TAO/orbsvcs/tests/FT_App/FT_Client.cpp @@ -8,6 +8,7 @@ #include "ace/streams.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_stdio.h" +#include "ace/Argv_Type_Converter.h" class FTClientMain { diff --git a/TAO/orbsvcs/tests/FT_App/FT_Creator.cpp b/TAO/orbsvcs/tests/FT_App/FT_Creator.cpp index e681ee0c140..d78eaefc3d0 100644 --- a/TAO/orbsvcs/tests/FT_App/FT_Creator.cpp +++ b/TAO/orbsvcs/tests/FT_App/FT_Creator.cpp @@ -19,6 +19,7 @@ #include <ace/Get_Opt.h> #include <ace/OS_NS_stdio.h> +#include "ace/Argv_Type_Converter.h" FTAPP::FT_Creator::FT_Creator () : creator_ () diff --git a/TAO/orbsvcs/tests/FT_App/FT_ReplicationManagerController.cpp b/TAO/orbsvcs/tests/FT_App/FT_ReplicationManagerController.cpp index 65fc2dba0f4..2a549b6aaa7 100755 --- a/TAO/orbsvcs/tests/FT_App/FT_ReplicationManagerController.cpp +++ b/TAO/orbsvcs/tests/FT_App/FT_ReplicationManagerController.cpp @@ -6,6 +6,7 @@ #include "ace/streams.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_stdio.h" +#include "ace/Argv_Type_Converter.h" // A simple class for building a client that "controls' the // Replication Manager (right now it just shuts it down). diff --git a/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp b/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp index da5232b6467..63bd82cd46a 100644 --- a/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp +++ b/TAO/orbsvcs/tests/FaultTolerance/IOGRManipulation/IOGRTest.cpp @@ -20,6 +20,7 @@ #include "tao/ORB.h" #include "orbsvcs/FT_CORBA_ORBC.h" #include "orbsvcs/FaultTolerance/FT_IOGR_Property.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(IOGRManipluation, IOGRTest, diff --git a/TAO/orbsvcs/tests/ImplRepo/NameService/test.cpp b/TAO/orbsvcs/tests/ImplRepo/NameService/test.cpp index afbba7d4507..1004fb6663b 100644 --- a/TAO/orbsvcs/tests/ImplRepo/NameService/test.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/NameService/test.cpp @@ -3,6 +3,7 @@ // #include "orbsvcs/CosNamingC.h" +#include "ace/Argv_Type_Converter.h" #include "ace/Log_Msg.h" diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp index f8b6542ca25..8baba3b2ff9 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp @@ -1,6 +1,7 @@ // $Id$ #include "airplane_server_i.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (ImplRepo, airplane_server, diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp index f28e4dca349..0c68b4ad481 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp @@ -3,6 +3,7 @@ #include "nestea_client_i.h" #include "ace/Log_Msg.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (ImplRepo, nestea_client, diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp index ae8600d8656..3d6803e847e 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp @@ -1,6 +1,7 @@ // $Id$ #include "nestea_server_i.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(ImplRepo, nestea_server, "$Id$") diff --git a/TAO/orbsvcs/tests/Notify/Destroy/main.cpp b/TAO/orbsvcs/tests/Notify/Destroy/main.cpp index 24c32fdeb75..fd925c0b1ee 100644 --- a/TAO/orbsvcs/tests/Notify/Destroy/main.cpp +++ b/TAO/orbsvcs/tests/Notify/Destroy/main.cpp @@ -3,6 +3,7 @@ #include "../lib/Notify_Test_Client.h" #include "orbsvcs/NotifyExtC.h" #include "ace/OS_main.h" +#include "ace/Argv_Type_Converter.h" int ACE_TMAIN (int argc, char *argv[]) diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp index 938396dabc9..30ac0894ea3 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp @@ -60,7 +60,7 @@ Notify_Test_Client::init_ORB (int argc, char *argv[] ACE_ENV_ARG_DECL) { - this->orb_ = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), + this->orb_ = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp index cc27838df92..21e600ff250 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp @@ -150,8 +150,7 @@ RedGreen_Test::init_ORB (int argc, char *argv[] ACE_ENV_ARG_DECL) { - this->orb_ = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv() - argv, + this->orb_ = CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER); ACE_CHECK; diff --git a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp b/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp index 9f3ee07f92c..68688eaabaa 100644 --- a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp +++ b/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp @@ -2,6 +2,7 @@ #include "orbsvcs/Sched/Strategy_Scheduler.h" #include "orbsvcs/Time_Utilities.h" +#include "ace/Argv_Type_Converter.h" #if defined (ACE_HAS_QUANTIFY) # include <quantify.h> #endif /* ACE_HAS_QUANTIFY */ diff --git a/TAO/orbsvcs/tests/tests_svc_loader/tests_svc_loader.cpp b/TAO/orbsvcs/tests/tests_svc_loader/tests_svc_loader.cpp index c523c170efd..5a3aa8a218a 100644 --- a/TAO/orbsvcs/tests/tests_svc_loader/tests_svc_loader.cpp +++ b/TAO/orbsvcs/tests/tests_svc_loader/tests_svc_loader.cpp @@ -29,6 +29,7 @@ #include "ace/Service_Config.h" #include "ace/Log_Msg.h" #include "ace/CORBA_macros.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID (tests_svc_loader, diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp index 8dea4079d3c..445b884b223 100644 --- a/TAO/tests/CodeSets/simple/client.cpp +++ b/TAO/tests/CodeSets/simple/client.cpp @@ -74,7 +74,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } else { - ACE_OS::strcpy (buf, AC_TEXT_TO_CHAR_IN(argv[1])); + ACE_OS::strcpy (buf, ACE_TEXT_TO_CHAR_IN(argv[1])); } // The first arg should be the IOR diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.cpp b/TAO/tests/Exposed_Policies/Policy_Tester.cpp index e8c1597dc98..8918ae6cc86 100644 --- a/TAO/tests/Exposed_Policies/Policy_Tester.cpp +++ b/TAO/tests/Exposed_Policies/Policy_Tester.cpp @@ -69,25 +69,25 @@ Policy_Tester::init (int argc, // Here we parse the command line paramether passed // to the application. - ACE_Arg_Shifter arg_shifter (argc, argv); + ACE_TArg_Shifter<char> arg_shifter (argc, argv); while (arg_shifter.is_anything_left ()) { const char *arg = 0; // IOR File Name Option. - if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-POAConfigFile")))) + if ((arg = arg_shifter.get_the_parameter ("-POAConfigFile"))) { this->rt_poa_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-ObjectConfigFile")))) + else if ((arg = arg_shifter.get_the_parameter ("-ObjectConfigFile"))) { this->rt_object_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-BaseObjectIOR")))) + else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR"))) { if (this->rt_poa_properties_ == 0) { @@ -99,7 +99,7 @@ Policy_Tester::init (int argc, } this->rt_poa_properties_->ior_source (arg); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-OverriddenIOR")))) + else if ((arg = arg_shifter.get_the_parameter ("-OverriddenIOR"))) { if (this->rt_object_properties_ == 0) { diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp index 34bb97e5187..280217d99a9 100644 --- a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp +++ b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp @@ -26,7 +26,7 @@ Policy_Verifier::init (int argc, CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (false); - ACE_Arg_Shifter arg_shifter (argc, argv); + ACE_TArg_Shifter<char> arg_shifter (argc, argv); while (arg_shifter.is_anything_left ()) { @@ -40,13 +40,13 @@ Policy_Verifier::init (int argc, this->priority_bands_ = this->rt_poa_properties_->priority_bands ().length (); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-ObjectConfigFile")))) + else if ((arg = arg_shifter.get_the_parameter ("-ObjectConfigFile"))) { this->rt_object_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (false); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-BaseObjectIOR")))) + else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR"))) { if (this->rt_poa_properties_ == 0) { @@ -61,7 +61,7 @@ Policy_Verifier::init (int argc, ACE_OS::strcat (this->base_object_ref_, this->rt_poa_properties_->ior_source ()); } - else if ((arg = arg_shifter.get_the_parameter (ACE_TEXT("-OverriddenIOR")))) + else if ((arg = arg_shifter.get_the_parameter ("-OverriddenIOR"))) { if (this->rt_object_properties_ == 0) { diff --git a/ace/Argv_Type_Converter.inl b/ace/Argv_Type_Converter.inl index 19906bec37d..fcb0c1d6263 100644 --- a/ace/Argv_Type_Converter.inl +++ b/ace/Argv_Type_Converter.inl @@ -13,7 +13,7 @@ ACE_Argv_Type_Converter::get_TCHAR_argv (void) #endif } -wchar_t** +ACE_INLINE wchar_t** ACE_Argv_Type_Converter::get_Wide_argv (void) { if (this->char_passed_) diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl index 110fada58f4..f7934977c22 100644 --- a/ace/OS_NS_stdio.inl +++ b/ace/OS_NS_stdio.inl @@ -1007,12 +1007,18 @@ ACE_OS::tempnam (const wchar_t *dir, const wchar_t *pfx) ACE_TEXT_TO_CHAR_IN (pfx)); // ACE_OS::tempnam returns a pointer to a malloc()-allocated space. // Convert that string to wide-char and free() the original. - wchar_t *wname = 0; + const wchar_t* init = 0; + static ACE_TSS< wchar_t* > wname (&init); + ACE::String_Conversion::Allocator_malloc().free(*wname); if (name != 0) { - wname = ACE_TEXT_TO_WCHAR_OUT( name ); + *wname.ts_object() = ACE_TEXT_TO_MALLOC_WCHAR_OUT( name ); // memory allocated! } - return wname; + else + { + *wname.ts_object() = 0; + } + return *wname; #endif /* ACE_LACKS_TEMPNAM */ } diff --git a/ace/OS_NS_stdlib.h b/ace/OS_NS_stdlib.h index 0398a1263ed..bed4e867439 100644 --- a/ace/OS_NS_stdlib.h +++ b/ace/OS_NS_stdlib.h @@ -105,10 +105,8 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION char *getenv (const char *symbol); -# if defined (ACE_WIN32) ACE_NAMESPACE_INLINE_FUNCTION wchar_t *getenv (const wchar_t *symbol); -# endif /* ACE_WIN32 */ // not in spec extern ACE_Export diff --git a/ace/OS_NS_stdlib.inl b/ace/OS_NS_stdlib.inl index dcc0efb8e81..e0abe6ebedd 100644 --- a/ace/OS_NS_stdlib.inl +++ b/ace/OS_NS_stdlib.inl @@ -140,18 +140,23 @@ ACE_OS::getenv (const char *symbol) #endif /* ACE_LACKS_ENV */ } -#if defined (ACE_WIN32) ACE_INLINE wchar_t * ACE_OS::getenv (const wchar_t *symbol) { #if defined (ACE_LACKS_ENV) ACE_UNUSED_ARG (symbol); ACE_NOTSUP_RETURN (0); -#else +#elif defined (ACE_WIN32) ACE_OSCALL_RETURN (::_wgetenv (symbol), wchar_t *, 0); +#else + const wchar_t* init = 0; + static ACE_TSS< wchar_t* > wvalue (&init); + ACE::String_Conversion::Allocator_malloc().free(*wvalue); + *wvalue.ts_object() = ACE_TEXT_TO_MALLOC_WCHAR_OUT ( + ACE_OS::getenv (ACE_TEXT_TO_CHAR_IN (symbol))); + return *wvalue; #endif /* ACE_LACKS_ENV */ } -#endif /* ACE_WIN32 */ ACE_INLINE char * ACE_OS::itoa (int value, char *string, int radix) @@ -181,6 +186,7 @@ ACE_OS::mkstemp (char *s) #if !defined (ACE_LACKS_MKSTEMP) return ::mkstemp (s); #else + s[0] = 0; return ACE_OS::mkstemp_emulation (ACE_TEXT_TO_TCHAR_INOUT (s) ); #endif /* !ACE_LACKS_MKSTEMP */ } @@ -188,10 +194,13 @@ ACE_OS::mkstemp (char *s) ACE_INLINE ACE_HANDLE ACE_OS::mkstemp (wchar_t *s) { + s[0] = 0; # if !defined (ACE_LACKS_MKSTEMP) - return ::mkstemp (ACE_TEXT_TO_CHAR_INOUT (s)); + ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, MAX_PATH ); + return ::mkstemp (convert.c_str()); # else - return ACE_OS::mkstemp_emulation (ACE_TEXT_TO_TCHAR_INOUT (s)); + ACE::String_Conversion::Convert_InOut<ACE_TCHAR, ACE_ANTI_TCHAR> convert( s, MAX_PATH ); + return ACE_OS::mkstemp_emulation (convert.c_str()); # endif /* !ACE_LACKS_MKSTEMP */ } @@ -221,7 +230,9 @@ ACE_OS::mktemp (wchar_t *s) // For narrow-char filesystems, we must convert the wide-char input to // a narrow-char string for mktemp(), then convert the name back to // wide-char for the caller. - if (::mktemp (ACE_TEXT_TO_CHAR_INOUT (s)) == 0) + s[0] = 0; + ACE::String_Conversion::Convert_InOut<char, wchar_t> convert( s, MAX_PATH ); + if (::mktemp (convert.c_str()) == 0) return 0; return s; #endif diff --git a/ace/OS_NS_time.inl b/ace/OS_NS_time.inl index d24afc0abc6..25f43d0e3f0 100644 --- a/ace/OS_NS_time.inl +++ b/ace/OS_NS_time.inl @@ -117,15 +117,15 @@ ACE_OS::ctime (const time_t *t) ACE_OSCALL (::ctime (t), char *, 0, narrow_time); if (narrow_time == 0) return 0; - // ACE_TEXT_TO_WCHAR_IN::convert allocates (via new []) a wchar_t[]. If + // ACE_TEXT_TO_WCHAR_OUT allocates (via malloc) a wchar_t[]. If // we've done this before, free the previous one. Yes, this leaves a // small memory leak (26 characters) but there's no way around this // that I know of. (Steve Huston, 12-Feb-2003). - static wchar_t *wide_time = 0; - if (wide_time != 0) - delete [] wide_time; - wide_time = ACE_TEXT_TO_WCHAR_OUT(narrow_time); - return wide_time; + const wchar_t* init = 0; + static ACE_TSS< wchar_t* > wide_time (&init); + ACE::String_Conversion::Allocator_malloc().free(*wide_time); + *wide_time.ts_object() = ACE_TEXT_TO_MALLOC_WCHAR_OUT (narrow_time); + return *wide_time; # else ACE_OSCALL_RETURN (::ctime (t), char *, 0); # endif /* ACE_USES_WCHAR */ diff --git a/ace/OS_NS_unistd.cpp b/ace/OS_NS_unistd.cpp index c81f5384580..4233b19afce 100644 --- a/ace/OS_NS_unistd.cpp +++ b/ace/OS_NS_unistd.cpp @@ -270,7 +270,7 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) --arg_count; // Back to 0-indexed cargv[arg_count] = 0; while (--arg_count >= 0) - cargv[arg_count] = ACE_TEXT_TO_CHAR_OUT::convert (argv[arg_count]); + cargv[arg_count] = ACE_TEXT_TO_CHAR_OUT(argv[arg_count]); // memory allocated! // Don't worry about freeing the cargv or the strings it points to. // Either the process will be replaced, or we'll exit. if (ACE_OS::execv (cargv[0], cargv) == -1) diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl index 7a0f31201cd..e26afd6076b 100644 --- a/ace/OS_NS_unistd.inl +++ b/ace/OS_NS_unistd.inl @@ -518,6 +518,7 @@ ACE_OS::getcwd (wchar_t *buf, size_t size) # elif defined (ACE_WIN32) return ::_wgetcwd (buf, static_cast<int> (size)); # else + buf[0]=0; ACE::String_Conversion::Convert_InOut< char, wchar_t > convert( buf, size ); char* result = ACE_OS::getcwd( convert.c_str(), convert.size() ); return ( result ? buf : 0 ); @@ -683,6 +684,7 @@ ACE_OS::hostname (wchar_t name[], size_t maxnamelen) ace_result_), int, -1); #else /* ACE_WIN32 && !ACE_HAS_WINCE */ // Emulate using the char version + name[0]=0; ACE::String_Conversion::Convert_InOut< char, wchar_t > convert (name, maxnamelen); return ACE_OS::hostname (convert.c_str(), convert.size()); #endif /* ACE_WIN32 && !ACE_HAS_WINCE */ diff --git a/ace/String_Conversion_T.h b/ace/String_Conversion_T.h index 343a136abbc..481ef722744 100644 --- a/ace/String_Conversion_T.h +++ b/ace/String_Conversion_T.h @@ -218,6 +218,7 @@ public: //template <> explicit Convert_InOut( DestT* src, size_t size = calc_len ) : len_(size==calc_len ? calc_len : size-1) + , encode_factor_(1) , str_(src) , orig_(0) , ownstr_(0) diff --git a/ace/config-linux-common.h b/ace/config-linux-common.h index 716d5c42f20..93dc1faa6fb 100644 --- a/ace/config-linux-common.h +++ b/ace/config-linux-common.h @@ -1,3 +1,7 @@ +here is the linux config file need to be in. + + + /* -*- C++ -*- */ // $Id$ @@ -219,7 +223,7 @@ # error unsupported compiler in ace/config-linux-common.h #endif /* ! __GNUG__ && ! __KCC */ -// Completely common part :-) +// Completely common part :-) // Platform/compiler has the sigwait(2) prototype # define ACE_HAS_SIGWAIT @@ -274,6 +278,12 @@ #define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES +// ACE WChar support +#define ACE_SIZEOF_WCHAR 4 +#define ACE_WCHAR_MAX 0x7FFFFFFF +#define ACE_LACKS_BUILTIN_WCHAR_T + + // Optimize ACE_Handle_Set for select(). #define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT |