diff options
Diffstat (limited to 'TAO/tests/MProfile_Connection_Timeout/server.cpp')
-rw-r--r-- | TAO/tests/MProfile_Connection_Timeout/server.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/TAO/tests/MProfile_Connection_Timeout/server.cpp b/TAO/tests/MProfile_Connection_Timeout/server.cpp index 9daac4d75f7..a8e06ff8f47 100644 --- a/TAO/tests/MProfile_Connection_Timeout/server.cpp +++ b/TAO/tests/MProfile_Connection_Timeout/server.cpp @@ -1,8 +1,9 @@ // $Id$ -#include "ace/Get_Opt.h" #include "test_i.h" #include "ace/OS_NS_stdio.h" +#include "ace/Argv_Type_Converter.h" +#include "ace/Get_Opt.h" ACE_RCSID(MProfile_Connection_Timeout, server, @@ -13,7 +14,7 @@ int orb_run = 0; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "o:r"); + ACE_Get_Arg_Opt<char> get_opts (argc, argv, "o:r"); int c; while ((c = get_opts ()) != -1) @@ -39,12 +40,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 = @@ -68,7 +71,7 @@ main (int argc, char *argv[]) poa_manager->activate (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 ()); @@ -86,7 +89,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", |