summaryrefslogtreecommitdiff
path: root/TAO/examples/PluggableUDP/tests
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/PluggableUDP/tests')
-rw-r--r--TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp2
-rw-r--r--TAO/examples/PluggableUDP/tests/Basic/client.cpp10
-rw-r--r--TAO/examples/PluggableUDP/tests/Basic/server.cpp12
-rw-r--r--TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp2
-rw-r--r--TAO/examples/PluggableUDP/tests/Performance/client.cpp10
-rw-r--r--TAO/examples/PluggableUDP/tests/Performance/server.cpp12
-rw-r--r--TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp7
-rw-r--r--TAO/examples/PluggableUDP/tests/SimplePerformance/server.cpp9
8 files changed, 37 insertions, 27 deletions
diff --git a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp
index 882b5078c5d..1b0da8ea299 100644
--- a/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp
+++ b/TAO/examples/PluggableUDP/tests/Basic/UDP_Client_i.cpp
@@ -32,7 +32,7 @@ UDP_Client_i::svc (void)
{
ACE_CString client_name ("UDP");
- ACE_TCHAR pid[256];
+ char pid[256];
ACE_OS::sprintf (pid,
"%u",
static_cast<u_int> (ACE_OS::getpid ()));
diff --git a/TAO/examples/PluggableUDP/tests/Basic/client.cpp b/TAO/examples/PluggableUDP/tests/Basic/client.cpp
index f7db9081cbd..0cc01c831e8 100644
--- a/TAO/examples/PluggableUDP/tests/Basic/client.cpp
+++ b/TAO/examples/PluggableUDP/tests/Basic/client.cpp
@@ -25,6 +25,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
// The following include file forces DIOP to be linked into the
// executable and initialized for static builds.
@@ -39,7 +40,7 @@ unsigned int iterations = 1;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "dk:t:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "dk:t:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -74,15 +75,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/examples/PluggableUDP/tests/Basic/server.cpp b/TAO/examples/PluggableUDP/tests/Basic/server.cpp
index ba54736c4d4..bd7f21ffee2 100644
--- a/TAO/examples/PluggableUDP/tests/Basic/server.cpp
+++ b/TAO/examples/PluggableUDP/tests/Basic/server.cpp
@@ -22,6 +22,7 @@
#include "tao/debug.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
// The following include file forces DIOP to be linked into the
// executable and initialized for static builds.
@@ -34,7 +35,7 @@ const char *ior_output_file = "test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:d");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:d");
int c;
while ((c = get_opts ()) != -1)
@@ -60,12 +61,13 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -112,7 +114,7 @@ main (int argc, char *argv[])
policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
UDP_i udp_i;
@@ -150,7 +152,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp b/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp
index 77db4ccca0e..dfce99289c6 100644
--- a/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp
+++ b/TAO/examples/PluggableUDP/tests/Performance/UDP_PerformanceClient.cpp
@@ -35,7 +35,7 @@ UDP_PerformanceClient::svc ()
{
ACE_CString client_name ("UDP");
- ACE_TCHAR pid[256];
+ char pid[256];
ACE_OS::sprintf (pid,
"%u",
static_cast<u_int> (ACE_OS::getpid ()));
diff --git a/TAO/examples/PluggableUDP/tests/Performance/client.cpp b/TAO/examples/PluggableUDP/tests/Performance/client.cpp
index 07bb98914ee..b641317ef94 100644
--- a/TAO/examples/PluggableUDP/tests/Performance/client.cpp
+++ b/TAO/examples/PluggableUDP/tests/Performance/client.cpp
@@ -19,6 +19,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
+#include "ace/Argv_Type_Converter.h"
#include "UDPC.h"
@@ -41,7 +42,7 @@ unsigned char performance_test = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:t:i:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:t:i:");
int c;
while ((c = get_opts ()) != -1)
@@ -73,15 +74,16 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "PerformanceClient" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "PerformanceClient" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
CORBA::Object_var object =
diff --git a/TAO/examples/PluggableUDP/tests/Performance/server.cpp b/TAO/examples/PluggableUDP/tests/Performance/server.cpp
index 0a003a08589..b015d29ba63 100644
--- a/TAO/examples/PluggableUDP/tests/Performance/server.cpp
+++ b/TAO/examples/PluggableUDP/tests/Performance/server.cpp
@@ -18,6 +18,7 @@
#include "ace/Get_Opt.h"
#include "ace/Thread_Manager.h"
+#include "ace/Argv_Type_Converter.h"
#include "UDP_i.h"
@@ -34,7 +35,7 @@ int orb_threads = 1; // Number of threads running inside the ORB.
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "i:o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "i:o:");
int c;
while ((c = get_opts ()) != -1)
@@ -79,12 +80,13 @@ static ACE_THR_FUNC_RETURN svc (void *arg)
}
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "PerformanceServer" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(), "PerformanceServer" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
CORBA::Object_var poa_object =
@@ -132,7 +134,7 @@ main (int argc, char *argv[])
policies[1]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (parse_args (argc, argv) != 0)
+ if (parse_args (convert.get_argc(), convert.get_ASCII_argv()) != 0)
return 1;
UDP_i udp_i;
@@ -169,7 +171,7 @@ main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
diff --git a/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp b/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp
index 8c5b4c7bd21..0f8f2217a1d 100644
--- a/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp
+++ b/TAO/examples/PluggableUDP/tests/SimplePerformance/client.cpp
@@ -19,6 +19,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "ace/High_Res_Timer.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
// The following include file forces DIOP to be linked into the
@@ -61,13 +62,13 @@ private:
//int testClient (char* orbName, char* iorFile)
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
"ORB_Test_Client"
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/examples/PluggableUDP/tests/SimplePerformance/server.cpp b/TAO/examples/PluggableUDP/tests/SimplePerformance/server.cpp
index acc84689614..6fe540360ff 100644
--- a/TAO/examples/PluggableUDP/tests/SimplePerformance/server.cpp
+++ b/TAO/examples/PluggableUDP/tests/SimplePerformance/server.cpp
@@ -18,6 +18,7 @@
#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
#include "test_i.h"
@@ -33,13 +34,13 @@
const char *ior_output_file = "test.ior";
-int main (int argc, char *argv[])
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
ACE_TRY_NEW_ENV
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_init (convert.get_argc(), convert.get_ASCII_argv(),
"ORB_Test_Server" ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -80,7 +81,7 @@ int main (int argc, char *argv[])
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
{
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file= ACE_OS::fopen (ior_output_file, ACE_TEXT("w"));
if (output_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",