summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Security
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Security')
-rw-r--r--TAO/orbsvcs/examples/Security/SecurityLevel1/client.cpp4
-rw-r--r--TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp2
-rw-r--r--TAO/orbsvcs/examples/Security/Send_File/client.cpp11
-rw-r--r--TAO/orbsvcs/examples/Security/Send_File/server.cpp13
4 files changed, 18 insertions, 12 deletions
diff --git a/TAO/orbsvcs/examples/Security/SecurityLevel1/client.cpp b/TAO/orbsvcs/examples/Security/SecurityLevel1/client.cpp
index b7779c65615..4e82a15ffa4 100644
--- a/TAO/orbsvcs/examples/Security/SecurityLevel1/client.cpp
+++ b/TAO/orbsvcs/examples/Security/SecurityLevel1/client.cpp
@@ -9,7 +9,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -32,7 +32,7 @@ parse_args (int argc, char *argv[])
}
int
-main (int argc, char *argv [])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_TRY_NEW_ENV
{
diff --git a/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp b/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
index 2b39bda82e3..e2550d85d06 100644
--- a/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
+++ b/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
@@ -9,7 +9,7 @@ ACE_RCSID (SecurityLevel1,
const char *ior_output_file = 0;
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_TRY_NEW_ENV
{
diff --git a/TAO/orbsvcs/examples/Security/Send_File/client.cpp b/TAO/orbsvcs/examples/Security/Send_File/client.cpp
index 507bdde5847..1c930262112 100644
--- a/TAO/orbsvcs/examples/Security/Send_File/client.cpp
+++ b/TAO/orbsvcs/examples/Security/Send_File/client.cpp
@@ -2,6 +2,7 @@
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+#include "ace/Argv_Type_Converter.h"
#include "testC.h"
ACE_RCSID(Send_File, client, "$Id$")
@@ -11,7 +12,7 @@ const char *ior = "file://test.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "k:");
int c;
while ((c = get_opts ()) != -1)
@@ -34,15 +35,17 @@ 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/orbsvcs/examples/Security/Send_File/server.cpp b/TAO/orbsvcs/examples/Security/Send_File/server.cpp
index 97a4beace1c..c71c738e8bd 100644
--- a/TAO/orbsvcs/examples/Security/Send_File/server.cpp
+++ b/TAO/orbsvcs/examples/Security/Send_File/server.cpp
@@ -4,6 +4,7 @@
#include "test_i.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/Argv_Type_Converter.h"
ACE_RCSID(Send_File, server, "$Id$")
@@ -12,7 +13,7 @@ const char *ior_output_file = 0;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:");
+ ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:");
int c;
while ((c = get_opts ()) != -1)
@@ -35,12 +36,14 @@ 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 =
@@ -60,7 +63,7 @@ main (int argc, char *argv[])
root_poa->the_POAManager (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;
Simple_Server_i server_impl (orb.in ());
@@ -78,7 +81,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",