summaryrefslogtreecommitdiff
path: root/TAO/tests/InterOp-Naming
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/InterOp-Naming')
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_client.cpp13
-rw-r--r--TAO/tests/InterOp-Naming/INS_test_server.cpp6
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.cpp4
-rw-r--r--TAO/tests/InterOp-Naming/Server_i.h1
4 files changed, 14 insertions, 10 deletions
diff --git a/TAO/tests/InterOp-Naming/INS_test_client.cpp b/TAO/tests/InterOp-Naming/INS_test_client.cpp
index 374ab158593..d22fb76e4a1 100644
--- a/TAO/tests/InterOp-Naming/INS_test_client.cpp
+++ b/TAO/tests/InterOp-Naming/INS_test_client.cpp
@@ -7,18 +7,21 @@
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
+#include "ace/Argv_Type_Converter.h"
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
+
int i = 0;
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
// Retrieve a reference to the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init (argc,
- argv,
+ CORBA::ORB_var orb = CORBA::ORB_init (convert.get_argc(),
+ convert.get_ASCII_argv(),
0
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -34,7 +37,7 @@ main (int argc, char *argv[])
for (i = 1; i < argc; ++i)
{
- if (ACE_OS::strcmp (argv[i], "-l") == 0)
+ if (ACE_OS::strcmp (argv[i], ACE_TEXT("-l")) == 0)
{
// List initial services
CORBA::ORB::ObjectIdList_var list =
@@ -69,7 +72,7 @@ main (int argc, char *argv[])
}
else
{
- objref = orb->resolve_initial_references (argv[i] ACE_ENV_ARG_PARAMETER);
+ objref = orb->resolve_initial_references (ACE_TEXT_TO_CHAR_IN(argv[i]) ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (CORBA::is_nil (objref.in ()))
diff --git a/TAO/tests/InterOp-Naming/INS_test_server.cpp b/TAO/tests/InterOp-Naming/INS_test_server.cpp
index c45f732a26f..f0d12921979 100644
--- a/TAO/tests/InterOp-Naming/INS_test_server.cpp
+++ b/TAO/tests/InterOp-Naming/INS_test_server.cpp
@@ -5,8 +5,9 @@
// This is the main driver program for the INS test server.
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ ACE_Argv_Type_Converter convert (argc, argv);
Server_i server;
@@ -15,8 +16,7 @@ main (int argc, char *argv[])
ACE_TRY_NEW_ENV
{
- if (server.init (argc,
- argv
+ if (server.init (convert.get_argc(), convert.get_ASCII_argv()
ACE_ENV_ARG_PARAMETER) == -1)
return 1;
else
diff --git a/TAO/tests/InterOp-Naming/Server_i.cpp b/TAO/tests/InterOp-Naming/Server_i.cpp
index ec60caff7ea..343dd6d4835 100644
--- a/TAO/tests/InterOp-Naming/Server_i.cpp
+++ b/TAO/tests/InterOp-Naming/Server_i.cpp
@@ -25,7 +25,7 @@ Server_i::~Server_i (void)
int
Server_i::parse_args (void)
{
- ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ni:");
+ ACE_Get_Arg_Opt<char> get_opts (this->argc_, this->argv_, "do:ni:");
int c = 0;
while ((c = get_opts ()) != -1)
@@ -35,7 +35,7 @@ Server_i::parse_args (void)
TAO_debug_level++;
break;
case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), "w");
+ this->ior_output_file_ = ACE_OS::fopen (get_opts.opt_arg (), ACE_TEXT("w"));
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open %s for writing: %p\n",
diff --git a/TAO/tests/InterOp-Naming/Server_i.h b/TAO/tests/InterOp-Naming/Server_i.h
index 7df2f070c41..62abca27e44 100644
--- a/TAO/tests/InterOp-Naming/Server_i.h
+++ b/TAO/tests/InterOp-Naming/Server_i.h
@@ -22,6 +22,7 @@
#include "tao/Utils/ORB_Manager.h"
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "INS_i.h"
class Server_i