diff options
Diffstat (limited to 'ACE/tests')
-rw-r--r-- | ACE/tests/MEM_Stream_Test.cpp | 14 | ||||
-rw-r--r-- | ACE/tests/Malloc_Test.cpp | 10 | ||||
-rw-r--r-- | ACE/tests/Naming_Test.cpp | 6 | ||||
-rw-r--r-- | ACE/tests/Pipe_Test.cpp | 8 | ||||
-rw-r--r-- | ACE/tests/Process_Mutex_Test.cpp | 10 | ||||
-rw-r--r-- | ACE/tests/Process_Test.cpp | 8 | ||||
-rw-r--r-- | ACE/tests/RW_Process_Mutex_Test.cpp | 10 | ||||
-rw-r--r-- | ACE/tests/test_config.h | 10 |
8 files changed, 20 insertions, 56 deletions
diff --git a/ACE/tests/MEM_Stream_Test.cpp b/ACE/tests/MEM_Stream_Test.cpp index 8cc11482e4a..56e7d629cd6 100644 --- a/ACE/tests/MEM_Stream_Test.cpp +++ b/ACE/tests/MEM_Stream_Test.cpp @@ -281,12 +281,7 @@ test_reactive (const ACE_TCHAR *prog, ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n ()"))); #else ACE_Process_Options opts; -# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%s -p%d -r"); -# else - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%ls -p%d -r"); -# endif /* ACE_WIN32 || !ACE_USES_WCHAR */ - opts.command_line (cmdline_fmt, prog, sport); + opts.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" -p%d -r"), prog, sport); if (ACE_Process_Manager::instance ()->spawn_n (NUMBER_OF_REACTIVE_CONNECTIONS, opts) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n ()"))); @@ -372,12 +367,7 @@ test_concurrent (const ACE_TCHAR *prog, ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n()"))); #else ACE_Process_Options opts; -# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%s -p%d -m"); -# else - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%ls -p%d -m"); -# endif /* ACE_WIN32 || !ACE_USES_WCHAR */ - opts.command_line (cmdline_fmt, prog, sport); + opts.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT (" -p%d -m"), prog, sport); if (ACE_Process_Manager::instance ()->spawn_n (NUMBER_OF_MT_CONNECTIONS, opts) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n()"))); diff --git a/ACE/tests/Malloc_Test.cpp b/ACE/tests/Malloc_Test.cpp index 037e5744ddb..03a91bd228f 100644 --- a/ACE/tests/Malloc_Test.cpp +++ b/ACE/tests/Malloc_Test.cpp @@ -358,12 +358,10 @@ run_main (int argc, ACE_TCHAR *argv[]) // No arguments means we're the parent process. ACE_Process_Options options (1); -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - static const ACE_TCHAR* format = ACE_TEXT ("%ls%ls%ls"); -#else - static const ACE_TCHAR* format = ACE_TEXT ("%s%s%s"); -#endif /* !ACE_WIN32 && ACE_USES_WCHAR */ - options.command_line (format, EXE_LOCATION, + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs + ACE_TEXT ("%") ACE_TEXT_PRIs + ACE_TEXT ("%") ACE_TEXT_PRIs + EXE_LOCATION, argc > 0 ? argv[0] : ACE_TEXT ("Malloc_Test"), ACE_TEXT (" run_as_test")); diff --git a/ACE/tests/Naming_Test.cpp b/ACE/tests/Naming_Test.cpp index 04f183c738c..a593c0adb3c 100644 --- a/ACE/tests/Naming_Test.cpp +++ b/ACE/tests/Naming_Test.cpp @@ -257,11 +257,7 @@ run_main (int argc, ACE_TCHAR *argv[]) } // Set the database name using the pid. mktemp isn't always available. ACE_OS::snprintf(temp_file, BUFSIZ, -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_TEXT ("%ls%d"), -#else - ACE_TEXT ("%s%d"), -#endif + ACE_TEXT ("%") ACE_TEXT_PRIs ACE_TEXT ("%d"), pname, (int)ACE_OS::getpid ()); diff --git a/ACE/tests/Pipe_Test.cpp b/ACE/tests/Pipe_Test.cpp index 9b1a1120d4a..5cb4b10e1b4 100644 --- a/ACE/tests/Pipe_Test.cpp +++ b/ACE/tests/Pipe_Test.cpp @@ -113,14 +113,10 @@ run_main (int argc, ACE_TCHAR *argv[]) ACE_START_TEST (ACE_TEXT("Pipe_Test")); ACE_INIT_LOG (ACE_TEXT("Pipe_Test-children")); -# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%s -c%s"); -# else - const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%ls -c%ls"); -# endif /* ACE_WIN32 || !ACE_USES_WCHAR */ ACE_Process_Options options; # ifndef ACE_LACKS_VA_FUNCTIONS - options.command_line (cmdline_fmt, + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs + ACE_TEXT (" -c%") ACE_TEXT_PRIs, argc > 0 ? argv[0] : ACE_TEXT ("Pipe_Test"), close_pipe == 0 ? ACE_TEXT (" -d") : ACE_TEXT ("")); # else diff --git a/ACE/tests/Process_Mutex_Test.cpp b/ACE/tests/Process_Mutex_Test.cpp index 5d35c51bb7a..620415e0a5f 100644 --- a/ACE/tests/Process_Mutex_Test.cpp +++ b/ACE/tests/Process_Mutex_Test.cpp @@ -146,15 +146,13 @@ run_main (int argc, ACE_TCHAR *argv[]) ACE_Process_Mutex mutex( mutex_name ); # endif -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - static const ACE_TCHAR* format = ACE_TEXT ("%ls -c -n %ls%ls"); -#else - static const ACE_TCHAR* format = ACE_TEXT ("%s -c -n %s%s"); -#endif /* !ACE_WIN32 && ACE_USES_WCHAR */ ACE_Process_Options options; #ifndef ACE_LACKS_VA_FUNCTIONS - options.command_line (format, argc > 0 ? argv[0] : ACE_TEXT ("Process_Mutex_Test"), mutex_name, + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs + ACE_TEXT (" -c -n %") ACE_TEXT_PRIs + ACE_TEXT ("%") ACE_TEXT_PRIs, + argc > 0 ? argv[0] : ACE_TEXT ("Process_Mutex_Test"), mutex_name, release_mutex == 0 ? ACE_TEXT (" -d") : ACE_TEXT ("")); #else ACE_UNUSED_ARG (format); diff --git a/ACE/tests/Process_Test.cpp b/ACE/tests/Process_Test.cpp index d18a5265af8..3cfc9def393 100644 --- a/ACE/tests/Process_Test.cpp +++ b/ACE/tests/Process_Test.cpp @@ -34,13 +34,7 @@ test_setenv () ACE_OS::strcat (bigval, ACE_TEXT ("01234567890123456789012345678901234567890123456789")); #ifndef ACE_LACKS_VA_FUNCTIONS -# if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - const ACE_TCHAR *fmt = ACE_TEXT ("%ls"); -# else - const ACE_TCHAR *fmt = ACE_TEXT ("%s"); -# endif - - if (0 != opts.setenv (ACE_TEXT ("A"), fmt, bigval)) + if (0 != opts.setenv (ACE_TEXT ("A"), ACE_TEXT ("%") ACE_TEXT_PRIs, bigval)) { status = errno; ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("setenv"))); diff --git a/ACE/tests/RW_Process_Mutex_Test.cpp b/ACE/tests/RW_Process_Mutex_Test.cpp index 36ba22dd187..138046df8a5 100644 --- a/ACE/tests/RW_Process_Mutex_Test.cpp +++ b/ACE/tests/RW_Process_Mutex_Test.cpp @@ -431,11 +431,6 @@ run_main (int argc, ACE_TCHAR *argv[]) mutex_name.c_str (), ACE_TEXT ("ctor"))); } -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - static const ACE_TCHAR* format = ACE_TEXT ("%ls -c %d -p %u -n %ls"); -#else - static const ACE_TCHAR* format = ACE_TEXT ("%s -c %d -p %u -n %s"); -#endif /* !ACE_WIN32 && ACE_USES_WCHAR */ // The parent process reads time ranges sent from the children via // UDP. Grab an unused UDP port to tell the children to send to. @@ -462,13 +457,12 @@ run_main (int argc, ACE_TCHAR *argv[]) Child *child = (i == 0 ? &writer : &readers[i-1]); ACE_Process_Options options; #ifndef ACE_LACKS_VA_FUNCTIONS - options.command_line (format, + options.command_line (ACE_TEXT ("%") ACE_TEXT_PRIs + ACE_TEXT (" -c %d -p %u -n %") ACE_TEXT_PRIs, argc > 0 ? argv[0] : ACE_TEXT ("RW_Process_Mutex_Test"), i, (unsigned int)me.get_port_number (), mutex_name.c_str ()); -#else - ACE_UNUSED_ARG (format); #endif if (child->spawn (options) == -1) { diff --git a/ACE/tests/test_config.h b/ACE/tests/test_config.h index e606f048a21..79b21ec8099 100644 --- a/ACE/tests/test_config.h +++ b/ACE/tests/test_config.h @@ -149,14 +149,12 @@ size_t const ACE_MAX_THREADS = 4; } #else /* ! VXWORKS */ -# if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) -# define ACE_INIT_LOG_FMT ACE_TEXT ("%ls%ls%ls") -# else -# define ACE_INIT_LOG_FMT ACE_TEXT ("%s%s%s") -# endif /* !ACE_WIN32 && ACE_USES_WCHAR */ #define ACE_INIT_LOG(NAME) \ ACE_TCHAR temp[MAXPATHLEN]; \ - ACE_OS::sprintf (temp, ACE_INIT_LOG_FMT, \ + ACE_OS::sprintf (temp, \ + ACE_TEXT ("%") ACE_TEXT_PRIs \ + ACE_TEXT ("%") ACE_TEXT_PRIs \ + ACE_TEXT ("%") ACE_TEXT_PRIs, \ ACE_LOG_DIRECTORY, \ ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \ ACE_LOG_FILE_EXT_NAME); \ |