summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-13 05:53:35 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-13 05:53:35 +0000
commit0e4074e5eb948725226f82c74847eb3d9f898d24 (patch)
tree8143a11e4dab1f05c4b60b232cdc01441cf74635
parent304b7d18f7920933c5485423a6a68d141fa1e1e5 (diff)
downloadATCD-0e4074e5eb948725226f82c74847eb3d9f898d24.tar.gz
Made CE friendly
-rw-r--r--ace/Acceptor.cpp8
-rw-r--r--tests/Future_Test.cpp116
-rw-r--r--tests/MM_Shared_Memory_Test.cpp16
-rw-r--r--tests/MT_Reactor_Timer_Test.cpp10
-rw-r--r--tests/MT_SOCK_Test.cpp79
-rw-r--r--tests/Mem_Map_Test.cpp26
-rw-r--r--tests/Message_Queue_Notifications_Test.cpp20
-rw-r--r--tests/Message_Queue_Test.cpp30
-rw-r--r--tests/Notify_Performance_Test.cpp46
-rw-r--r--tests/OrdMultiSet_Test.cpp4
-rw-r--r--tests/Priority_Buffer_Test.cpp12
-rw-r--r--tests/Priority_Task_Test.cpp30
-rw-r--r--tests/Reactor_Exceptions_Test.cpp36
-rw-r--r--tests/Reactor_Notify_Test.cpp56
-rw-r--r--tests/Reactor_Performance_Test.cpp76
-rw-r--r--tests/Reactor_Timer_Test.cpp6
-rw-r--r--tests/Reader_Writer_Test.cpp48
-rw-r--r--tests/Recursive_Mutex_Test.cpp10
-rw-r--r--tests/SOCK_Connector_Test.cpp20
-rw-r--r--tests/SOCK_Test.cpp64
-rw-r--r--tests/SString_Test.cpp4
-rw-r--r--tests/Semaphore_Test.cpp22
-rw-r--r--tests/Sigset_Ops_Test.cpp22
-rw-r--r--tests/Simple_Message_Block_Test.cpp4
-rw-r--r--tests/TSS_Test.cpp61
-rw-r--r--tests/Task_Test.cpp10
-rw-r--r--tests/Thread_Pool_Test.cpp39
-rw-r--r--tests/Time_Value_Test.cpp56
-rw-r--r--tests/Timer_Queue_Test.cpp62
-rw-r--r--tests/test_config.h5
30 files changed, 511 insertions, 487 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index ade8a94f61b..2fcc9185185 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -187,7 +187,7 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
// Shut down the listen socket to recycle the handles.
if (this->peer_acceptor_.close () == -1)
- ACE_ERROR ((LM_ERROR, "close\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("close\n")));
// Set the Reactor to 0 so that we don't try to close down
// again.
@@ -657,7 +657,7 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp
return -1;
// @@ Should add the protocol in...
- ACE_OS::sprintf (buf, "%s\t %s #%s\n",
+ ACE_OS::sprintf (buf, ASYS_TEXT ("%s\t %s #%s\n"),
this->service_name_,
service_addr_str,
this->service_description_);
@@ -732,8 +732,8 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor
{
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
if (this->open (addr, reactor, cs) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n",
- "ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor")));
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp
index 978fbd875e9..5af6cc97a6f 100644
--- a/tests/Future_Test.cpp
+++ b/tests/Future_Test.cpp
@@ -48,7 +48,7 @@ class Scheduler : public ACE_Task_Base
// Active Object Scheduler.
{
public:
- Scheduler (const char *, Scheduler * = 0);
+ Scheduler (const ASYS_TCHAR *, Scheduler * = 0);
virtual ~Scheduler (void);
virtual int open (void *args = 0);
@@ -56,14 +56,14 @@ public:
virtual int svc (void);
ACE_Future<u_long> work (u_long param, int count = 1);
- ACE_Future<const char*> name (void);
+ ACE_Future<const ASYS_TCHAR*> name (void);
void end (void);
u_long work_i (u_long, int);
- const char *name_i (void);
+ const ASYS_TCHAR *name_i (void);
private:
- char *name_;
+ ASYS_TCHAR *name_;
ACE_Activation_Queue activation_queue_;
Scheduler *scheduler_;
};
@@ -94,13 +94,13 @@ Method_Object_work::Method_Object_work (Scheduler* new_Scheduler,
future_result_ (new_result)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Method_Object_work created\n"));
+ ASYS_TEXT ("(%t) Method_Object_work created\n")));
}
Method_Object_work::~Method_Object_work (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Method_Object_work will be deleted.\n"));
+ ASYS_TEXT ("(%t) Method_Object_work will be deleted.\n")));
}
@@ -118,28 +118,28 @@ class Method_Object_name : public ACE_Method_Object
{
public:
Method_Object_name (Scheduler *,
- ACE_Future<const char*> &);
+ ACE_Future<const ASYS_TCHAR*> &);
virtual ~Method_Object_name (void);
virtual int call (void);
private:
Scheduler *scheduler_;
- ACE_Future<const char*> future_result_;
+ ACE_Future<const ASYS_TCHAR*> future_result_;
};
Method_Object_name::Method_Object_name (Scheduler *new_scheduler,
- ACE_Future<const char*> &new_result)
+ ACE_Future<const ASYS_TCHAR*> &new_result)
: scheduler_ (new_scheduler),
future_result_ (new_result)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Method_Object_name created\n"));
+ ASYS_TEXT ("(%t) Method_Object_name created\n")));
}
Method_Object_name::~Method_Object_name (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Method_Object_name will be deleted.\n"));
+ ASYS_TEXT ("(%t) Method_Object_name will be deleted.\n")));
}
int
@@ -166,14 +166,14 @@ private:
};
// constructor
-Scheduler::Scheduler (const char *newname,
+Scheduler::Scheduler (const ASYS_TCHAR *newname,
Scheduler *new_Scheduler)
{
- ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]);
- ACE_OS::strcpy ((char *) this->name_, newname);
+ ACE_NEW (this->name_, ASYS_TCHAR[ACE_OS::strlen (newname) + 1]);
+ ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, newname);
this->scheduler_ = new_Scheduler;
ACE_DEBUG ((LM_DEBUG,
- "(%t) Scheduler %s created\n",
+ ASYS_TEXT ("(%t) Scheduler %s created\n"),
this->name_));
}
@@ -181,7 +181,7 @@ Scheduler::Scheduler (const char *newname,
Scheduler::~Scheduler (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Scheduler %s will be destroyed\n",
+ ASYS_TEXT ("(%t) Scheduler %s will be destroyed\n"),
this->name_));
delete[] this->name_;
}
@@ -192,7 +192,7 @@ Scheduler::open (void *)
{
task_count++;
ACE_DEBUG ((LM_DEBUG,
- "(%t) Scheduler %s open\n",
+ ASYS_TEXT ("(%t) Scheduler %s open\n"),
this->name_));
// Become an Active Object.
return this->activate (THR_BOUND | THR_DETACHED);
@@ -203,7 +203,7 @@ int
Scheduler::close (u_long)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) Scheduler %s close\n",
+ ASYS_TEXT ("(%t) Scheduler %s close\n"),
this->name_));
task_count--;
return 0;
@@ -219,7 +219,7 @@ Scheduler::svc (void)
// case an exception is thrown in the <call>).
auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ());
- ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) calling method object\n")));
// Call it.
if (mo->call () == -1)
break;
@@ -247,13 +247,13 @@ Scheduler::work_i (u_long param,
return ACE::is_prime (param, 2, param / 2);
}
-const char *
+const ASYS_TCHAR *
Scheduler::name_i (void)
{
return this->name_;
}
-ACE_Future<const char *>
+ACE_Future<const ASYS_TCHAR *>
Scheduler::name (void)
{
if (this->scheduler_)
@@ -261,7 +261,7 @@ Scheduler::name (void)
return this->scheduler_->name ();
else
{
- ACE_Future<const char*> new_future;
+ ACE_Future<const ASYS_TCHAR*> new_future;
// @@ What happens if new fails here?
this->activation_queue_.enqueue
@@ -294,20 +294,20 @@ static int n_loops = 100;
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Atomic_Op<ACE_Thread_Mutex, int>;
-template class ACE_Future<const char *>;
+template class ACE_Future<const ASYS_TCHAR *>;
template class ACE_Future<int>;
template class ACE_Future<u_long>;
-template class ACE_Future_Rep<char const *>;
+template class ACE_Future_Rep<ASYS_TCHAR const *>;
template class ACE_Future_Rep<int>;
template class ACE_Future_Rep<u_long>;
template class auto_ptr<ACE_Method_Object>;
template class ACE_Auto_Basic_Ptr<ACE_Method_Object>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int>
-#pragma instantiate ACE_Future<const char *>
+#pragma instantiate ACE_Future<const ASYS_TCHAR *>
#pragma instantiate ACE_Future<int>
#pragma instantiate ACE_Future<u_long>
-#pragma instantiate ACE_Future_Rep<char const *>
+#pragma instantiate ACE_Future_Rep<ASYS_TCHAR const *>
#pragma instantiate ACE_Future_Rep<int>
#pragma instantiate ACE_Future_Rep<u_long>
#pragma instantiate auto_ptr<ACE_Method_Object>
@@ -317,9 +317,9 @@ template class ACE_Auto_Basic_Ptr<ACE_Method_Object>;
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Future_Test");
+ ACE_START_TEST (ASYS_TEXT ("Future_Test"));
#if defined (ACE_HAS_THREADS)
Scheduler *andres = 0, *peter = 0, *helmut = 0, *matias = 0;
@@ -327,25 +327,25 @@ main (int, char *[])
// Create active objects..
// @@ Should "open" be subsumed within the constructor of
// Scheduler()?
- ACE_NEW_RETURN (andres, Scheduler ("andres"), -1);
+ ACE_NEW_RETURN (andres, Scheduler (ASYS_TEXT ("andres")), -1);
andres->open ();
- ACE_NEW_RETURN (peter, Scheduler ("peter"), -1);
+ ACE_NEW_RETURN (peter, Scheduler (ASYS_TEXT ("peter")), -1);
peter->open ();
- ACE_NEW_RETURN (helmut, Scheduler ("helmut"), -1);
+ ACE_NEW_RETURN (helmut, Scheduler (ASYS_TEXT ("helmut")), -1);
helmut->open ();
// Matias passes all asynchronous method calls on to Andres...
- ACE_NEW_RETURN (matias, Scheduler ("matias", andres), -1);
+ ACE_NEW_RETURN (matias, Scheduler (ASYS_TEXT ("matias"), andres), -1);
matias->open ();
for (int i = 0; i < n_loops; i++)
{
{
ACE_Future<u_long> fresulta, fresultb, fresultc, fresultd, fresulte;
- ACE_Future<const char*> fname;
+ ACE_Future<const ASYS_TCHAR*> fname;
ACE_DEBUG ((LM_DEBUG,
- "(%t) going to do a non-blocking call\n"));
+ ASYS_TEXT ("(%t) going to do a non-blocking call\n")));
fresulta = andres->work (9013);
fresultb = peter->work (9013);
@@ -356,10 +356,10 @@ main (int, char *[])
// see if the result is available...
if (fresulta.ready ())
ACE_DEBUG ((LM_DEBUG,
- "(%t) wow.. work is ready.....\n"));
+ ASYS_TEXT ("(%t) wow.. work is ready.....\n")));
ACE_DEBUG ((LM_DEBUG,
- "(%t) non-blocking call done... now blocking...\n"));
+ ASYS_TEXT ("(%t) non-blocking call done... now blocking...\n")));
// Save the result of fresulta.
@@ -383,22 +383,22 @@ main (int, char *[])
fresultd.get (resultd);
fresulte.get (resulte);
- ACE_DEBUG ((LM_DEBUG, "(%t) result a %u\n", (u_int) resulte));
- ACE_DEBUG ((LM_DEBUG, "(%t) result b %u\n", (u_int) resulta));
- ACE_DEBUG ((LM_DEBUG, "(%t) result c %u\n", (u_int) resultb));
- ACE_DEBUG ((LM_DEBUG, "(%t) result d %u\n", (u_int) resultc));
- ACE_DEBUG ((LM_DEBUG, "(%t) result e %u\n", (u_int) resultd));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) result a %u\n"), (u_int) resulte));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) result b %u\n"), (u_int) resulta));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) result c %u\n"), (u_int) resultb));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) result d %u\n"), (u_int) resultc));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) result e %u\n"), (u_int) resultd));
- const char *name;
+ const ASYS_TCHAR *name;
fname.get (name);
- ACE_DEBUG ((LM_DEBUG, "(%t) name %s\n", name));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) name %s\n"), name));
}
ACE_DEBUG ((LM_DEBUG,
- "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n",
+ ASYS_TEXT ("(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n"),
task_count.value (),
future_count.value (),
capsule_count.value (),
@@ -414,7 +414,7 @@ main (int, char *[])
ACE_OS::sleep (2);
ACE_DEBUG ((LM_DEBUG,
- "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n",
+ ASYS_TEXT ("(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n"),
task_count.value (),
future_count.value (),
capsule_count.value (),
@@ -433,16 +433,16 @@ main (int, char *[])
if (f1.get (value, &timeout) == 0 && value == 100)
ACE_DEBUG ((LM_DEBUG,
- "Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n"));
+ ASYS_TEXT ("Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n")));
else
ACE_DEBUG ((LM_DEBUG,
- "ACE_Future<T>::Set followed by Ace_Future<T>::Get does "
- "not work, broken Ace_Future<> implementation.\n"));
+ ASYS_TEXT ("ACE_Future<T>::Set followed by Ace_Future<T>::Get does ")
+ ASYS_TEXT ("not work, broken Ace_Future<> implementation.\n")));
}
{
ACE_DEBUG ((LM_DEBUG,
- "Checking if Ace_Future<T>::operator= is implemented "
- "incorrectly this might crash the program.\n"));
+ ASYS_TEXT ("Checking if Ace_Future<T>::operator= is implemented ")
+ ASYS_TEXT ("incorrectly this might crash the program.\n")));
ACE_Future<int> f1;
{
@@ -450,7 +450,7 @@ main (int, char *[])
}
// Now it is one ACE_Future<int> referencing the rep instance
- ACE_DEBUG ((LM_DEBUG, "0.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("0.\n")));
//check that self assignment works
f1 = f1;
// Is there any repesentation left, and if so what is the ref
@@ -465,33 +465,33 @@ main (int, char *[])
f1.set (100);
f1.get (value, &timeout);
- ACE_DEBUG ((LM_DEBUG, "1.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("1.\n")));
{ // Might delete the same data a couple of times
ACE_Future<int> f2 (f1);
f1.set (100);
f1.get (value, &timeout);
}
- ACE_DEBUG ((LM_DEBUG, "2.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("2.\n")));
{
ACE_Future<int> f2 (f1);
f1.set (100);
f1.get (value, &timeout);
}
- ACE_DEBUG ((LM_DEBUG, "3.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("3.\n")));
{
ACE_Future<int> f2 (f1);
f1.set (100);
f1.get (value, &timeout);
}
- ACE_DEBUG ((LM_DEBUG, "4.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("4.\n")));
{
ACE_Future<int> f2 (f1);
f1.set (100);
f1.get (value, &timeout);
}
- ACE_DEBUG ((LM_DEBUG, "5.\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("5.\n")));
{
ACE_Future<int> f2 (90);
f2.get (value, &timeout);
@@ -499,7 +499,7 @@ main (int, char *[])
}
}
ACE_DEBUG ((LM_DEBUG,
- "No it did not crash the program.\n"));
+ ASYS_TEXT ("No it did not crash the program.\n")));
ACE_OS::sleep (5);
@@ -509,7 +509,7 @@ main (int, char *[])
delete matias;
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp
index 5bf0d755e0c..a0f5b62273e 100644
--- a/tests/MM_Shared_Memory_Test.cpp
+++ b/tests/MM_Shared_Memory_Test.cpp
@@ -66,7 +66,7 @@ server (void *)
ACE_OS::sleep (1);
if (shm_server.remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "remove"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("remove")));
ACE_OS::unlink (shm_key);
return 0;
@@ -79,7 +79,7 @@ spawn (void)
switch (ACE_OS::fork ())
{
case -1:
- ACE_ERROR ((LM_ERROR, "%p\n%a", "fork failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("fork failed")));
exit (-1);
case 0:
client (0);
@@ -90,25 +90,25 @@ spawn (void)
if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client),
(void *) 0,
THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed")));
if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server),
(void *) 0,
THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed")));
ACE_Thread_Manager::instance ()->wait ();
#else
- ACE_ERROR ((LM_ERROR, "only one thread may be run in a process on this platform\n%a", 1));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("only one thread may be run in a process on this platform\n%a"), 1));
#endif /* ACE_HAS_THREADS */
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("MM_Shared_Memory_Test");
+ ACE_START_TEST (ASYS_TEXT ("MM_Shared_Memory_Test"));
if (ACE_OS::mktemp (shm_key) == 0 || (ACE_OS::unlink (shm_key) == -1 && errno == EPERM))
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", shm_key), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), shm_key), 1);
spawn ();
diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp
index 071cbfc4599..677eeab48b8 100644
--- a/tests/MT_Reactor_Timer_Test.cpp
+++ b/tests/MT_Reactor_Timer_Test.cpp
@@ -77,7 +77,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv,
int i;
ACE_DEBUG ((LM_DEBUG,
- "%T (%t): heartbeat\n"));
+ ASYS_TEXT ("%T (%t): heartbeat\n")));
// See if all of the timers have fired. If so, leave the thread's
// reactor loop which will exit the thread and end the test.
@@ -99,7 +99,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv,
}
ACE_DEBUG ((LM_DEBUG,
- "%T (%t): Timer #%d (id #%d) expired\n",
+ ASYS_TEXT ("%T (%t): Timer #%d (id #%d) expired\n"),
time_tag,
this->timer_id_[time_tag]));
@@ -113,9 +113,9 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv,
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("MT_Reactor_Timer_Test");
+ ACE_START_TEST (ASYS_TEXT ("MT_Reactor_Timer_Test"));
#if defined (ACE_HAS_THREADS)
@@ -134,7 +134,7 @@ main (int, char *[])
the_reactor->run_event_loop ();
other_thread.wait ();
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
diff --git a/tests/MT_SOCK_Test.cpp b/tests/MT_SOCK_Test.cpp
index 40a45928abf..576e8c71c7f 100644
--- a/tests/MT_SOCK_Test.cpp
+++ b/tests/MT_SOCK_Test.cpp
@@ -46,7 +46,7 @@ client (void *arg)
ACE_Time_Value *timeout = &tv;
#endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting timed connect\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting timed connect\n")));
// Initiate timed connection with server.
// Attempt a timed connect to the server.
@@ -55,44 +55,45 @@ client (void *arg)
timeout) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) %p\n",
- "connection failed"),
+ ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("connection failed")),
0);
}
if (cli_stream.get_local_addr (client_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "get_local_addr"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("get_local_addr")), 0);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) connected client at %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) connected client at %d\n"),
client_addr.get_port_number ()));
if (cli_stream.disable (ACE_NONBLOCK) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "disable"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("disable")));
// Send data to server (correctly handles "incomplete writes").
for (char *c = ACE_ALPHABET; *c != '\0'; c++)
if (cli_stream.send_n (c, 1) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n")));
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) closing writer\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) closing writer\n")));
// Explicitly close the writer-side of the connection.
if (cli_stream.close_writer () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close_writer"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close_writer")));
char buf[1];
// Wait for handshake with server.
if (cli_stream.recv_n (buf, 1) != 1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "recv_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n")));
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) received handshake from server\n"));
+ ASYS_TEXT ("(%P|%t) received handshake from server\n")));
// Close the connection completely.
if (cli_stream.close () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close")));
return 0;
}
@@ -103,7 +104,7 @@ server (void *arg)
ACE_SOCK_Acceptor *peer_acceptor = (ACE_SOCK_Acceptor *) arg;
if (peer_acceptor->enable (ACE_NONBLOCK) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "enable"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable")));
// Keep these objects out here to prevent excessive constructor
// calls...
@@ -128,10 +129,12 @@ server (void *arg)
ACE_ASSERT (tv == def_timeout);
if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("select")), 0);
else if (result == 0)
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) select timed out, shutting down\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%P|%t) select timed out, shutting down\n")));
return 0;
}
@@ -142,12 +145,13 @@ server (void *arg)
{
char *t = ACE_ALPHABET;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client %s connected from %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) client %s connected from %d\n"),
cli_addr.get_host_name (), cli_addr.get_port_number ()));
// Enable non-blocking I/O.
if (new_stream.enable (ACE_NONBLOCK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "enable"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("enable")), 0);
handle_set.reset ();
handle_set.set_bit (new_stream.get_handle ());
@@ -156,11 +160,12 @@ server (void *arg)
for (ssize_t r_bytes; ;)
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) waiting in select\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) waiting in select\n")));
if (ACE_OS::select (int (new_stream.get_handle ()) + 1,
handle_set,
0, 0, 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("select")), 0);
while ((r_bytes = new_stream.recv (buf, 1)) > 0)
{
@@ -172,23 +177,27 @@ server (void *arg)
{
// Handshake back with client.
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) reached end of input, connection closed by client\n"));
+ ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n")));
if (new_stream.send_n ("", 1) != 1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("send_n")));
// Close endpoint.
if (new_stream.close () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("close")));
break;
}
else if (r_bytes == -1)
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) no input available, going back to reading\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%P|%t) no input available, going back to reading\n")));
else
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "recv_n"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("recv_n")), 0);
}
}
}
@@ -196,9 +205,11 @@ server (void *arg)
if (result == -1)
{
if (errno == EWOULDBLOCK)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) no connections available, going back to accepting\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ASYS_TEXT ("(%P|%t) no connections available, going back to accepting\n")));
else
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "accept"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"),
+ ASYS_TEXT ("accept")));
}
}
@@ -217,10 +228,10 @@ spawn (void)
// Bind listener to any port and then find out what the port was.
if (peer_acceptor.open (ACE_Addr::sap_any) == -1
|| peer_acceptor.get_local_addr (server_addr) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "open"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("open")));
else
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting server at port %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting server at port %d\n"),
server_addr.get_port_number ()));
#if !defined (ACE_WIN32) && !defined (VXWORKS)
@@ -252,20 +263,22 @@ spawn (void)
(ACE_THR_FUNC (server),
(void *) &peer_acceptor,
THR_BOUND | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "spawn failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"),
+ ASYS_TEXT ("spawn failed")));
if (ACE_Thread_Manager::instance ()->spawn_n
(ACE_MAX_CLIENTS,
ACE_THR_FUNC (client),
(void *) &server_addr,
THR_BOUND | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "spawn failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"),
+ ASYS_TEXT ("spawn failed")));
// Wait for the threads to exit.
ACE_Thread_Manager::instance ()->wait ();
#else
ACE_ERROR ((LM_ERROR,
- "(%P|%t) only one thread may be run in a process on this platform\n%a",
+ ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"),
1));
#endif /* ACE_HAS_THREADS */
@@ -274,9 +287,9 @@ spawn (void)
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("MT_SOCK_Test");
+ ACE_START_TEST (ASYS_TEXT ("MT_SOCK_Test"));
spawn ();
diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp
index bda710603f1..1965817fe26 100644
--- a/tests/Mem_Map_Test.cpp
+++ b/tests/Mem_Map_Test.cpp
@@ -41,7 +41,7 @@ reverse_file (ACE_HANDLE file_handle,
if (array[size] == '\n')
{
ACE_OS::write (file_handle, array + size + 1, count);
- ACE_OS::write (file_handle, "\n", 1);
+ ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1);
count = 0;
}
else
@@ -66,7 +66,7 @@ create_test_file (int line_length, int num_lines)
if (file_handle == ACE_INVALID_HANDLE)
{
delete [] mybuf;
- ACE_ERROR_RETURN ((LM_ERROR, "Open failed\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1);
}
for (int j = 0; j < num_lines; j++)
@@ -84,14 +84,14 @@ create_test_file (int line_length, int num_lines)
if (ACE_OS::write (file_handle, mybuf, line_length) != line_length)
{
delete [] mybuf;
- ACE_ERROR_RETURN ((LM_ERROR, "write to file failed: %p (%d)\n",
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed: %p (%d)\n"),
errno, errno), -1);
}
- if (ACE_OS::write (file_handle, "\n", 1) != 1)
+ if (ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1) != 1)
{
delete [] mybuf;
- ACE_ERROR_RETURN ((LM_ERROR, "write to file failed\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed\n")), -1);
}
}
@@ -102,19 +102,19 @@ create_test_file (int line_length, int num_lines)
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Mem_Map_Test");
+ ACE_START_TEST (ASYS_TEXT ("Mem_Map_Test"));
// First create a test file to work on
if (create_test_file (LINE_LENGTH, NUM_LINES) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Create test file failed\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Create test file failed\n")), -1);
ACE_Mem_Map mmap;
// First memory map the test file
if (mmap.map (ACE_DEFAULT_TEST_FILE) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n%a", "mmap"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1);
// Now create a temporary file for intermediate processing
ACE_HANDLE temp_file_handle = ACE_OS::open (ACE_TEMP_FILE_NAME,
@@ -122,7 +122,7 @@ main (int, char *[])
0666);
if (temp_file_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR, "Open failed\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1);
// Reverse the original file and write the output to the temporary
// file.
@@ -136,7 +136,7 @@ main (int, char *[])
// Now memory map the temporary file
if (temp_mmap.map (ACE_TEMP_FILE_NAME) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n%a", "mmap"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1);
TCHAR temp_file_name[BUFSIZ];
@@ -147,7 +147,7 @@ main (int, char *[])
if ((temp_file_handle = ACE_OS::open (temp_file_name,
O_RDWR | O_TRUNC | O_CREAT,
0666)) == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR, "Open failed\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1);
// Now reverse the temporary file and write everything to the second
// temporary file.
@@ -161,7 +161,7 @@ main (int, char *[])
ACE_Mem_Map temp_mmap2;
if (temp_mmap2.map (temp_file_name) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n%a", "mmap"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1);
// Now do a memcmp -- the orig file and the second temporary file
// should be identical.
diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp
index 8fad3692e11..40b823afe9e 100644
--- a/tests/Message_Queue_Notifications_Test.cpp
+++ b/tests/Message_Queue_Notifications_Test.cpp
@@ -64,7 +64,7 @@ Message_Handler::Message_Handler (ACE_Reactor &reactor)
int
Message_Handler::handle_input (ACE_HANDLE)
{
- ACE_DEBUG ((LM_DEBUG, "Message_Handler::handle_input\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Message_Handler::handle_input\n")));
// Next time handle_output will be called
this->notification_strategy_.mask (ACE_Event_Handler::WRITE_MASK);
@@ -75,7 +75,7 @@ Message_Handler::handle_input (ACE_HANDLE)
int
Message_Handler::handle_output (ACE_HANDLE fd)
{
- ACE_DEBUG ((LM_DEBUG, "Message_Handler::handle_output\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Message_Handler::handle_output\n")));
ACE_UNUSED_ARG (fd);
// Next time handle_exception will be called
@@ -87,7 +87,7 @@ Message_Handler::handle_output (ACE_HANDLE fd)
int
Message_Handler::handle_exception (ACE_HANDLE fd)
{
- ACE_DEBUG ((LM_DEBUG, "Message_Handler::handle_exception\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Message_Handler::handle_exception\n")));
ACE_UNUSED_ARG (fd);
// Next time handle_input will be called
@@ -102,10 +102,10 @@ Message_Handler::process_message (void)
ACE_Message_Block *mb;
if (this->getq (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "dequeue_head"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("dequeue_head")), -1);
else
{
- ACE_DEBUG ((LM_DEBUG, "message received = %s\n", mb->rd_ptr ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("message received = %s\n"), mb->rd_ptr ()));
delete mb;
}
@@ -118,18 +118,18 @@ Message_Handler::make_message (void)
{
if (--iterations > 0)
{
- ACE_Message_Block *mb = new ACE_Message_Block ("hello");
+ ACE_Message_Block *mb = new ACE_Message_Block ((char *) ASYS_TEXT ("hello"));
- ACE_DEBUG ((LM_DEBUG, "sending message\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sending message\n")));
this->putq (mb);
}
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Message_Queue_Notifications_Test");
+ ACE_START_TEST (ASYS_TEXT ("Message_Queue_Notifications_Test"));
#if defined (ACE_HAS_THREADS)
ACE_Reactor reactor;
@@ -139,7 +139,7 @@ main (int, char *[])
reactor.handle_events ();
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp
index 6ea1d61b945..693b870691a 100644
--- a/tests/Message_Queue_Test.cpp
+++ b/tests/Message_Queue_Test.cpp
@@ -26,70 +26,70 @@ typedef ACE_Message_Queue_Iterator <ACE_NULL_SYNCH> ITERATOR;
typedef ACE_Message_Queue_Reverse_Iterator <ACE_NULL_SYNCH> REVERSE_ITERATOR;
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Message_Queue_Test");
+ ACE_START_TEST (ASYS_TEXT ("Message_Queue_Test"));
const int ITERATIONS = 5;
- char buffer[ITERATIONS][BUFSIZ];
+ ASYS_TCHAR buffer[ITERATIONS][BUFSIZ];
QUEUE queue (32 * 1024);
int i;
for (i = 0; i < ITERATIONS; i++)
{
- ACE_OS::sprintf (buffer[i], "%d", i+1);
+ ACE_OS::sprintf (buffer[i], ASYS_TEXT ("%d"), i+1);
ACE_Message_Block *entry;
- ACE_NEW_RETURN (entry, ACE_Message_Block (buffer[i], sizeof buffer[i]), -1);
+ ACE_NEW_RETURN (entry, ACE_Message_Block ((char *) buffer[i], sizeof buffer[i]), -1);
if (queue.is_full ())
ACE_ERROR_RETURN ((LM_ERROR,
- "QUEUE:: the message queue is full on iteration %u!\n",
+ ASYS_TEXT ("QUEUE:: the message queue is full on iteration %u!\n"),
i+1),
-1);
if (queue.enqueue (entry) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "QUEUE::enqueue\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("QUEUE::enqueue\n")), -1);
}
- ACE_DEBUG ((LM_DEBUG, "\nForward Iterations\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nForward Iterations\n")));
{
ITERATOR iterator (queue);
for (ACE_Message_Block *entry = 0;
iterator.next (entry) != 0;
iterator.advance ())
- ACE_DEBUG ((LM_DEBUG, "%s\n", entry->base ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s\n"), entry->base ()));
}
- ACE_DEBUG ((LM_DEBUG, "\nReverse Iterations\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nReverse Iterations\n")));
{
REVERSE_ITERATOR iterator (queue);
for (ACE_Message_Block *entry = 0;
iterator.next (entry) != 0;
iterator.advance ())
- ACE_DEBUG ((LM_DEBUG, "%s\n", entry->base ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s\n"), entry->base ()));
}
- ACE_DEBUG ((LM_DEBUG, "\nForward Iterations\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nForward Iterations\n")));
{
QUEUE::ITERATOR iterator (queue);
for (ACE_Message_Block *entry = 0;
iterator.next (entry) != 0;
iterator.advance ())
- ACE_DEBUG ((LM_DEBUG, "%s\n", entry->base ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s\n"), entry->base ()));
}
- ACE_DEBUG ((LM_DEBUG, "\nReverse Iterations\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nReverse Iterations\n")));
{
QUEUE::REVERSE_ITERATOR iterator (queue);
for (ACE_Message_Block *entry = 0;
iterator.next (entry) != 0;
iterator.advance ())
- ACE_DEBUG ((LM_DEBUG, "%s\n", entry->base ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s\n"), entry->base ()));
}
ACE_END_TEST;
diff --git a/tests/Notify_Performance_Test.cpp b/tests/Notify_Performance_Test.cpp
index cfb94efab7d..7810803a9b8 100644
--- a/tests/Notify_Performance_Test.cpp
+++ b/tests/Notify_Performance_Test.cpp
@@ -94,7 +94,7 @@ create_reactor (void)
if (opt_wfmo_reactor)
{
-#if defined (ACE_WIN32)
+#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
ACE_NEW (impl, ACE_WFMO_Reactor);
#endif /* ACE_WIN32 */
}
@@ -110,37 +110,37 @@ create_reactor (void)
void
print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et)
{
- char *reactor_type = 0;
+ ASYS_TCHAR *reactor_type = 0;
if (opt_wfmo_reactor)
- reactor_type = "WFMO_Reactor";
+ reactor_type = ASYS_TEXT ("WFMO_Reactor");
else if (opt_select_reactor)
- reactor_type = "Select_Reactor";
+ reactor_type = ASYS_TEXT ("Select_Reactor");
else
- reactor_type = "Platform's default Reactor";
+ reactor_type = ASYS_TEXT ("Platform's default Reactor");
- ACE_DEBUG ((LM_DEBUG, "\nNotify_Performance Test statistics:\n\n"));
- ACE_DEBUG ((LM_DEBUG, "\tReactor Type: %s\n", reactor_type));
- ACE_DEBUG ((LM_DEBUG, "\tWorker threads (calling notify()): %d\n", opt_nthreads));
- ACE_DEBUG ((LM_DEBUG, "\tIteration per thread: %d\n", opt_nloops));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nNotify_Performance Test statistics:\n\n")));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tReactor Type: %s\n"), reactor_type));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tWorker threads (calling notify()): %d\n"), opt_nthreads));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tIteration per thread: %d\n"), opt_nloops));
if (opt_pass_notify_data)
- ACE_DEBUG ((LM_DEBUG, "\tData was passed in the notify() call\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tData was passed in the notify() call\n")));
else
- ACE_DEBUG ((LM_DEBUG, "\tNo data was passed in the notify() call\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tNo data was passed in the notify() call\n")));
- ACE_DEBUG ((LM_DEBUG, "\n\tTiming results notify() call:\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\tTiming results notify() call:\n")));
ACE_DEBUG ((LM_DEBUG,
- "\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n",
+ ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"),
et.real_time,
et.user_time,
et.system_time));
}
int
-main (int argc, char *argv[])
+main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Notify_Performance_Test");
+ ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test"));
- ACE_Get_Opt getopt (argc, argv, "swdc:l:", 1);
+ ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("swdc:l:"), 1);
for (int c; (c = getopt ()) != -1; )
switch (c)
{
@@ -151,10 +151,10 @@ main (int argc, char *argv[])
opt_wfmo_reactor = 1;
break;
case 'c':
- opt_nthreads = atoi (getopt.optarg);
+ opt_nthreads = ACE_OS::atoi (getopt.optarg);
break;
case 'l':
- opt_nloops = atoi (getopt.optarg);
+ opt_nloops = ACE_OS::atoi (getopt.optarg);
break;
case 'd':
opt_pass_notify_data = 1;
@@ -182,7 +182,7 @@ main (int argc, char *argv[])
ACE_THR_FUNC (client),
(void *) &handler,
THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed")));
// Timer business
ACE_Profile_Timer timer;
@@ -199,7 +199,7 @@ main (int argc, char *argv[])
// Print results
print_results (et);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) waiting for the worker threads...\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) waiting for the worker threads...\n")));
// Wait for all worker to get done.
ACE_Thread_Manager::instance ()->wait ();
@@ -224,11 +224,11 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, long>;
#else
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Notify_Performance_Test");
+ ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test"));
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
ACE_END_TEST;
return 0;
diff --git a/tests/OrdMultiSet_Test.cpp b/tests/OrdMultiSet_Test.cpp
index 91d6d878ff5..c4b9a100e7f 100644
--- a/tests/OrdMultiSet_Test.cpp
+++ b/tests/OrdMultiSet_Test.cpp
@@ -26,12 +26,12 @@
#include "ace/Containers.h"
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
int ret = 0;
int *ptr = 0;
- ACE_START_TEST ("OrdMultiSet_Test");
+ ACE_START_TEST (ASYS_TEXT ("OrdMultiSet_Test"));
// make an empty set of int and an iterator
ACE_Ordered_MultiSet<int> set;
diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp
index 57e253658e1..f1b4b71b62b 100644
--- a/tests/Priority_Buffer_Test.cpp
+++ b/tests/Priority_Buffer_Test.cpp
@@ -106,14 +106,14 @@ producer (void *args)
// Enqueue in priority order.
if (msg_queue->enqueue_prio (mb) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "put_next"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("put_next")), 0);
}
// Now send a 0-sized shutdown message to the other thread
ACE_NEW_RETURN (mb, ACE_Message_Block ((size_t) 0), 0);
if (msg_queue->enqueue_tail (mb) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("put_next")));
count++;
@@ -130,9 +130,9 @@ producer (void *args)
// size of each line.
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Priority_Buffer_Test");
+ ACE_START_TEST (ASYS_TEXT ("Priority_Buffer_Test"));
#if defined (ACE_HAS_THREADS)
// Message queue.
@@ -141,12 +141,12 @@ main (int, char *[])
if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (producer),
(void *) &msg_queue,
THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), 1);
// Wait for producer and consumer threads to exit.
ACE_Thread_Manager::instance ()->wait ();
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp
index fb99d232ccd..8762848416a 100644
--- a/tests/Priority_Task_Test.cpp
+++ b/tests/Priority_Task_Test.cpp
@@ -22,7 +22,7 @@
#include "ace/Sched_Params.h"
#include "test_config.h"
-static char *usage = "usage: %s [-d]\n";
+static ASYS_TCHAR *usage = ASYS_TEXT ("usage: %s [-d]\n");
#if defined (ACE_HAS_THREADS)
@@ -84,20 +84,20 @@ Priority_Task::open (void *arg)
ACE_Sched_Params::priority_min (ACE_SCHED_OTHER,
ACE_SCOPE_THREAD);
- ACE_DEBUG ((LM_DEBUG, "(%t) task activation at priority %d with "
- "flags 0x%X failed; retry at priority %d with "
- "flags 0x%X (errno is %d%p)\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) task activation at priority %d with ")
+ ASYS_TEXT ("flags 0x%X failed; retry at priority %d with ")
+ ASYS_TEXT ("flags 0x%X (errno is %d%p)\n"),
this->priority_,
flags,
fallback_priority,
- THR_NEW_LWP, errno, ""));
+ THR_NEW_LWP, errno, ASYS_TEXT ("")));
flags = THR_NEW_LWP;
this->priority_ = fallback_priority;
if (this->activate (flags, 1, 1, this->priority_) == -1)
- ACE_DEBUG ((LM_ERROR, "(%t) task activation at priority %d failed, "
- "exiting!\n%a",
+ ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("(%t) task activation at priority %d failed, ")
+ ASYS_TEXT ("exiting!\n%a"),
this->priority_,
-1));
}
@@ -112,14 +112,14 @@ Priority_Task::svc (void)
int prio;
if (ACE_Thread::getprio (thr_handle, prio) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("getprio failed")), -1);
if (prio == this->priority_)
- ACE_DEBUG ((LM_INFO, "(%t) actual prio of %d equals desired priority\n",
+ ACE_DEBUG ((LM_INFO, ASYS_TEXT ("(%t) actual prio of %d equals desired priority\n"),
prio));
else
{
- ACE_DEBUG ((LM_ERROR, "(%t) actual prio = %d, desired priority_ = %d!\n",
+ ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("(%t) actual prio = %d, desired priority_ = %d!\n"),
prio, this->priority_));
++error_;
}
@@ -130,9 +130,9 @@ Priority_Task::svc (void)
#endif /* ACE_HAS_THREADS */
int
-main (int argc, char *argv[])
+main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Priority_Task_Test");
+ ACE_START_TEST (ASYS_TEXT ("Priority_Task_Test"));
if (argc <= 1)
// Disable LM_DEBUG messages.
@@ -140,7 +140,7 @@ main (int argc, char *argv[])
(ACE_Log_Msg::instance ()->priority_mask () & ~ LM_DEBUG);
else if (argc == 2)
{
- if (ACE_OS::strcmp (argv[1], "-d") != 0)
+ if (ACE_OS::strcmp (argv[1], ASYS_TEXT ("-d")) != 0)
ACE_ERROR_RETURN ((LM_ERROR, usage, argv [0]), -1);
// else -d option: don't disable LM_DEBUG messages
}
@@ -176,7 +176,7 @@ main (int argc, char *argv[])
priority.next ();
}
- ACE_DEBUG ((LM_INFO, "(%t) %d tasks spawned, wait for them to exit . . .\n",
+ ACE_DEBUG ((LM_INFO, ASYS_TEXT ("(%t) %d tasks spawned, wait for them to exit . . .\n"),
ACE_MAX_ITERATIONS));
// Wait for all tasks to exit.
@@ -192,7 +192,7 @@ main (int argc, char *argv[])
}
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
// Re-enable LM_DEBUG messages.
diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp
index ffad996b3e4..2defaad0818 100644
--- a/tests/Reactor_Exceptions_Test.cpp
+++ b/tests/Reactor_Exceptions_Test.cpp
@@ -30,7 +30,7 @@ static void
throw_exception (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) throw exception\n"));
+ ASYS_TEXT ("(%P|%t) throw exception\n")));
// Cause a Win32 structured exception.
*(char *) 0 = 0;
@@ -43,7 +43,7 @@ static void
throw_exception (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) throw exception\n"));
+ ASYS_TEXT ("(%P|%t) throw exception\n")));
throw Except ();
}
#endif /* ACE_WIN32 */
@@ -71,11 +71,11 @@ My_Handler::get_handle (void) const
int
My_Handler::handle_input (ACE_HANDLE)
{
- char buf[BUFSIZ];
+ ASYS_TCHAR buf[BUFSIZ];
ACE_INET_Addr from_addr;
ACE_DEBUG ((LM_DEBUG,
- "Activity occurred on handle %d!\n",
+ ASYS_TEXT ("Activity occurred on handle %d!\n"),
ACE_SOCK_Dgram::get_handle ()));
ssize_t n = ACE_SOCK_Dgram::recv (buf,
@@ -83,11 +83,11 @@ My_Handler::handle_input (ACE_HANDLE)
from_addr);
if (n == -1)
ACE_ERROR ((LM_ERROR,
- "%p\n",
- "handle_input"));
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("handle_input")));
else
ACE_DEBUG ((LM_DEBUG,
- "got buf = %s\n",
+ ASYS_TEXT ("got buf = %s\n"),
buf));
throw_exception ();
@@ -107,7 +107,7 @@ public:
catch (...)
{
ACE_DEBUG ((LM_DEBUG,
- " (%t) catch exception\n"));
+ ASYS_TEXT (" (%t) catch exception\n")));
ret = -1;
// do your thing, etc.
}
@@ -128,7 +128,7 @@ worker (void)
for (;;)
if (ACE_Reactor::instance ()->handle_events () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- " (%t) exception return\n"),
+ ASYS_TEXT (" (%t) exception return\n")),
0);
ACE_NOTREACHED (return 0);
@@ -136,9 +136,9 @@ worker (void)
#endif /* ACE_HAS_EXCEPTIONS */
int
-main (int argc, char *argv[])
+main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Reactor_Exceptions_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reactor_Exceptions_Test"));
#if defined (ACE_HAS_EXCEPTIONS)
My_Reactor reactor;
@@ -146,7 +146,7 @@ main (int argc, char *argv[])
u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT;
ACE_DEBUG ((LM_DEBUG,
- "Starting tracing\n"));
+ ASYS_TEXT ("Starting tracing\n")));
ACE_Reactor::instance (&reactor);
ACE_Thread_Manager *thr_mgr =
@@ -161,8 +161,8 @@ main (int argc, char *argv[])
(&handler,
ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "register_handler"),
+ ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("register_handler")),
-1);
#if defined (ACE_HAS_THREADS)
@@ -170,13 +170,13 @@ main (int argc, char *argv[])
#else
// Need to figure out how to implement this test.
ACE_ERROR ((LM_ERROR,
- "threads not supported on this platform\n"));
+ ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_SOCK_Dgram dgram ((ACE_INET_Addr &) ACE_Addr::sap_any);
for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++)
- dgram.send ("Hello", sizeof ("Hello"), remote_addr);
+ dgram.send (ASYS_TEXT ("Hello"), sizeof (ASYS_TEXT ("Hello")), remote_addr);
// Barrier to wait for the other thread to return.
thr_mgr->wait ();
@@ -185,12 +185,12 @@ main (int argc, char *argv[])
dgram.close ();
ACE_DEBUG ((LM_DEBUG,
- " (%t) exiting main\n"));
+ ASYS_TEXT (" (%t) exiting main\n")));
#else
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
ACE_ERROR ((LM_ERROR,
- "C++ exceptions not supported on this platform\n"));
+ ASYS_TEXT ("C++ exceptions not supported on this platform\n")));
#endif /* ACE_HAS_EXCEPTIONS */
ACE_END_TEST;
diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp
index 4b9ef7db7aa..520fd8fd270 100644
--- a/tests/Reactor_Notify_Test.cpp
+++ b/tests/Reactor_Notify_Test.cpp
@@ -84,8 +84,8 @@ Supplier_Task::open (void *)
// Create the pipe.
if (this->pipe_.open () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) %p\n",
- "open failed"),
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("open failed")),
-1);
// Register the pipe's write handle with the <Reactor> for writing.
// This should mean that it's always "active."
@@ -94,14 +94,14 @@ Supplier_Task::open (void *)
this,
ACE_Event_Handler::WRITE_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) %p\n",
- "register_handler failed"),
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("register_handler failed")),
-1);
// Make this an Active Object.
else if (this->activate (THR_BOUND | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) %p\n",
- "activate failed"),
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("activate failed")),
-1);
else
return 0;
@@ -110,20 +110,20 @@ Supplier_Task::open (void *)
int
Supplier_Task::close (u_long)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) Supplier_Task::close\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) Supplier_Task::close\n")));
if (ACE_Reactor::instance ()->remove_handler
(this->pipe_.write_handle (),
ACE_Event_Handler::WRITE_MASK) == -1)
ACE_ERROR ((LM_ERROR,
- "(%t) %p\n",
- "remove_handler failed"));
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("remove_handler failed")));
return 0;
}
Supplier_Task::~Supplier_Task (void)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) ~Supplier_Task\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) ~Supplier_Task\n")));
this->pipe_.close ();
}
@@ -135,12 +135,12 @@ Supplier_Task::perform_notifications (int notifications)
for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) notifying reactor\n"));
+ ASYS_TEXT ("(%t) notifying reactor\n")));
// Notify the Reactor, which will call <handle_exception>.
if (ACE_Reactor::instance ()->notify (this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) %p\n",
- "notify"),
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("notify")),
-1);
// Wait for our <handle_exception> method to release the
@@ -148,8 +148,8 @@ Supplier_Task::perform_notifications (int notifications)
else if (this->disable_notify_pipe_ == 0
&& this->waiter_.acquire () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) %p\n",
- "acquire"),
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("acquire")),
-1);
}
return 0;
@@ -159,7 +159,7 @@ int
Supplier_Task::svc (void)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) **** starting unlimited notifications test\n"));
+ ASYS_TEXT ("(%t) **** starting unlimited notifications test\n")));
// Allow an unlimited number of iterations per
// <ACE_Reactor::notify>.
@@ -167,7 +167,7 @@ Supplier_Task::svc (void)
return -1;
ACE_DEBUG ((LM_DEBUG,
- "(%t) **** starting limited notifications test\n"));
+ ASYS_TEXT ("(%t) **** starting limited notifications test\n")));
// Only allow 1 iteration per <ACE_Reactor::notify>
@@ -175,7 +175,7 @@ Supplier_Task::svc (void)
return -1;
ACE_DEBUG ((LM_DEBUG,
- "(%t) **** exiting thread test\n"));
+ ASYS_TEXT ("(%t) **** exiting thread test\n")));
return 0;
}
@@ -184,7 +184,7 @@ Supplier_Task::handle_exception (ACE_HANDLE handle)
{
ACE_ASSERT (handle == ACE_INVALID_HANDLE);
ACE_DEBUG ((LM_DEBUG,
- "(%t) handle_exception\n"));
+ ASYS_TEXT ("(%t) handle_exception\n")));
this->waiter_.release ();
return 0;
@@ -195,7 +195,7 @@ Supplier_Task::handle_output (ACE_HANDLE handle)
{
ACE_ASSERT (handle == this->pipe_.write_handle ());
ACE_DEBUG ((LM_DEBUG,
- "(%t) handle_output\n"));
+ ASYS_TEXT ("(%t) handle_output\n")));
// This function is called by the main thread, believe it or not :-)
// That's because the pipe's write handle is always active. So,
@@ -233,7 +233,7 @@ run_test (int disable_notify_pipe)
if (task.open () == -1)
ACE_ERROR ((LM_ERROR,
- "(%t) open failed\n"));
+ ASYS_TEXT ("(%t) open failed\n")));
else
{
int shutdown = 0;
@@ -249,8 +249,8 @@ run_test (int disable_notify_pipe)
{
case -1:
ACE_ERROR ((LM_ERROR,
- "(%t) %p\n",
- "reactor"));
+ ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("reactor")));
shutdown = 1;
break;
/* NOTREACHED */
@@ -272,20 +272,20 @@ run_test (int disable_notify_pipe)
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Reactor_Notify_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reactor_Notify_Test"));
#if defined (ACE_HAS_THREADS)
ACE_DEBUG ((LM_DEBUG,
- "(%t) running tests with notify pipe enabled\n"));
+ ASYS_TEXT ("(%t) running tests with notify pipe enabled\n")));
run_test (0);
ACE_DEBUG ((LM_DEBUG,
- "(%t) running tests with notify pipe disabled\n"));
+ ASYS_TEXT ("(%t) running tests with notify pipe disabled\n")));
run_test (1);
#else
ACE_ERROR ((LM_ERROR,
- "threads not supported on this platform\n"));
+ ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Reactor_Performance_Test.cpp b/tests/Reactor_Performance_Test.cpp
index 854e2ce4d14..f8f0c42ef33 100644
--- a/tests/Reactor_Performance_Test.cpp
+++ b/tests/Reactor_Performance_Test.cpp
@@ -60,13 +60,13 @@ Read_Handler::open (void *)
{
if (this->peer ().enable (ACE_NONBLOCK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) Read_Handler::open, cannot set non blocking mode\n"), -1);
+ ASYS_TEXT ("(%t) Read_Handler::open, cannot set non blocking mode\n")), -1);
if (reactor ()->register_handler (this, READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "(%t) Read_Handler::open, cannot register handler\n"), -1);
+ ASYS_TEXT ("(%t) Read_Handler::open, cannot register handler\n")), -1);
- ACE_DEBUG ((LM_DEBUG, "(%t) created svc_handler for handle %d\n", get_handle ()));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) created svc_handler for handle %d\n"), get_handle ()));
return 0;
}
@@ -85,7 +85,7 @@ Read_Handler::handle_input (ACE_HANDLE handle)
return 0;
if (result != 0)
- ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", "Read_Handler::handle_input"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("Read_Handler::handle_input")));
// This will cause handle_close to get called
return -1;
@@ -112,7 +112,7 @@ Read_Handler::handle_close (ACE_HANDLE handle,
}
ACE_DEBUG ((LM_DEBUG,
- "(%t) Read_Handler::handle_close closing down\n"));
+ ASYS_TEXT ("(%t) Read_Handler::handle_close closing down\n")));
// Shutdown
this->destroy ();
@@ -132,7 +132,7 @@ Write_Handler::send_data (void)
int send_size = sizeof (ACE_ALPHABET) - 1;
if (this->peer ().send_n (ACE_ALPHABET, send_size) != send_size)
- ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "send_n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("send_n")), -1);
return 0;
}
@@ -145,7 +145,7 @@ typedef ACE_Acceptor<Read_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR;
void *
client (void *arg)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) running client\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) running client\n")));
ACE_INET_Addr *connection_addr = (ACE_INET_Addr*) arg;
CONNECTOR connector;
@@ -158,9 +158,9 @@ client (void *arg)
ACE_NEW_RETURN (temp_writers, Write_Handler *[opt_nconnections], 0);
writers = temp_writers;
- ACE_Auto_Basic_Array_Ptr <char> failed_svc_handlers;
- char *temp_failed;
- ACE_NEW_RETURN (temp_failed, char[opt_nconnections], 0);
+ ACE_Auto_Basic_Array_Ptr <ASYS_TCHAR> failed_svc_handlers;
+ ASYS_TCHAR *temp_failed;
+ ACE_NEW_RETURN (temp_failed, ASYS_TCHAR[opt_nconnections], 0);
failed_svc_handlers = temp_failed;
// Automagic memory cleanup
@@ -188,7 +188,7 @@ client (void *arg)
if (failed_svc_handlers.get ()[i])
{
ACE_INET_Addr failed_addr = addresses.get()[i];
- ACE_ERROR ((LM_ERROR, "(%t) connection failed to %s, %d\n",
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) connection failed to %s, %d\n"),
failed_addr.get_host_name (),
failed_addr.get_port_number ()));
}
@@ -201,13 +201,13 @@ client (void *arg)
for (int j = 0; j < opt_nloops; j++)
for (i = 0; i < opt_nconnections; i++)
if (writers[i]->send_data () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "writer::send_data"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("writer::send_data")), 0);
// Cleanup
for (i = 0; i < opt_nconnections; i++)
writers[i]->destroy ();
- ACE_DEBUG ((LM_DEBUG, "(%t) finishing client\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) finishing client\n")));
return 0;
}
@@ -219,7 +219,7 @@ create_reactor (void)
if (opt_wfmo_reactor)
{
-#if defined (ACE_WIN32)
+#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
ACE_NEW (impl, ACE_WFMO_Reactor);
#endif /* ACE_WIN32 */
}
@@ -236,33 +236,33 @@ create_reactor (void)
void
print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et)
{
- const char *reactor_type = 0;
+ const ASYS_TCHAR *reactor_type = 0;
if (opt_wfmo_reactor)
- reactor_type = "WFMO_Reactor";
+ reactor_type = ASYS_TEXT ("WFMO_Reactor");
else if (opt_select_reactor)
- reactor_type = "Select_Reactor";
+ reactor_type = ASYS_TEXT ("Select_Reactor");
else
- reactor_type = "Platform's default Reactor";
+ reactor_type = ASYS_TEXT ("Platform's default Reactor");
- ACE_DEBUG ((LM_DEBUG, "\n\tReactor_Performance Test statistics:\n\n"));
- ACE_DEBUG ((LM_DEBUG, "\tReactor Type: %s\n", reactor_type));
- ACE_DEBUG ((LM_DEBUG, "\tConnections: %d\n", opt_nconnections));
- ACE_DEBUG ((LM_DEBUG, "\tIteration per connection: %d\n", opt_nloops));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\tReactor_Performance Test statistics:\n\n")));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tReactor Type: %s\n"), reactor_type));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tConnections: %d\n"), opt_nconnections));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tIteration per connection: %d\n"), opt_nloops));
- ACE_DEBUG ((LM_DEBUG, "\n\tTiming results:\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\tTiming results:\n")));
ACE_DEBUG ((LM_DEBUG,
- "\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n",
+ ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"),
et.real_time,
et.user_time,
et.system_time));
}
int
-main (int argc, char *argv[])
+main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Reactor_Performance_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test"));
- ACE_Get_Opt getopt (argc, argv, "swc:l:", 1);
+ ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("swc:l:"), 1);
for (int c; (c = getopt ()) != -1; )
switch (c)
{
@@ -273,10 +273,10 @@ main (int argc, char *argv[])
opt_wfmo_reactor = 1;
break;
case 'c':
- opt_nconnections = atoi (getopt.optarg);
+ opt_nconnections = ACE_OS::atoi (getopt.optarg);
break;
case 'l':
- opt_nloops = atoi (getopt.optarg);
+ opt_nloops = ACE_OS::atoi (getopt.optarg);
break;
}
@@ -301,9 +301,9 @@ main (int argc, char *argv[])
// Bind acceptor to any port and then find out what the port was.
if (acceptor.open ((const ACE_INET_Addr &) ACE_Addr::sap_any) == -1
|| acceptor.acceptor ().get_local_addr (server_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "open"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("open")), -1);
- ACE_DEBUG ((LM_DEBUG, "(%t) starting server at port %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) starting server at port %d\n"),
server_addr.get_port_number ()));
ACE_INET_Addr connection_addr (server_addr.get_port_number (),
@@ -313,7 +313,7 @@ main (int argc, char *argv[])
(ACE_THR_FUNC (client),
(void *) &connection_addr,
THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("thread create failed")));
ACE_Profile_Timer timer;
timer.start ();
@@ -326,7 +326,7 @@ main (int argc, char *argv[])
// Print results
print_results (et);
- ACE_DEBUG ((LM_DEBUG, "(%t) waiting for the client thread...\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) waiting for the client thread...\n")));
ACE_Thread_Manager::instance ()->wait ();
@@ -348,7 +348,7 @@ template class ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYN
template class ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>;
template class ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*>;
template class ACE_Svc_Tuple<Write_Handler>;
-template class ACE_Auto_Basic_Array_Ptr <char>;
+template class ACE_Auto_Basic_Array_Ptr <ASYS_TCHAR>;
template class ACE_Auto_Basic_Array_Ptr <Write_Handler *>;
template class ACE_Auto_Basic_Array_Ptr <ACE_INET_Addr>;
template class ACE_Auto_Array_Ptr <ACE_INET_Addr>;
@@ -366,7 +366,7 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>;
#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>
#pragma instantiate ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*>
#pragma instantiate ACE_Svc_Tuple<Write_Handler>
-#pragma instantiate ACE_Auto_Basic_Array_Ptr <char>
+#pragma instantiate ACE_Auto_Basic_Array_Ptr <ASYS_TCHAR>
#pragma instantiate ACE_Auto_Basic_Array_Ptr <Write_Handler *>
#pragma instantiate ACE_Auto_Basic_Array_Ptr <ACE_INET_Addr>
#pragma instantiate ACE_Auto_Array_Ptr <ACE_INET_Addr>
@@ -374,11 +374,11 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>;
#else
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Reactor_Performance_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test"));
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
ACE_END_TEST;
return 0;
diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp
index 54a63e81568..1f96c9f6fe6 100644
--- a/tests/Reactor_Timer_Test.cpp
+++ b/tests/Reactor_Timer_Test.cpp
@@ -36,7 +36,7 @@ public:
long current_count = long (arg);
ACE_ASSERT (current_count == count);
- ACE_DEBUG ((LM_DEBUG, "%d: Timer #%d timed out at %d!\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d: Timer #%d timed out at %d!\n"),
count, current_count, tv.sec ()));
count += (1 + odd);
@@ -49,9 +49,9 @@ public:
};
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Reactor_Timer_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reactor_Timer_Test"));
ACE_Reactor reactor;
diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp
index b9e58cf8bfe..e1c7fa13411 100644
--- a/tests/Reader_Writer_Test.cpp
+++ b/tests/Reader_Writer_Test.cpp
@@ -53,14 +53,14 @@ static void
print_usage_and_die (void)
{
ACE_DEBUG ((LM_DEBUG,
- "usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n"));
+ ASYS_TEXT ("usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n")));
ACE_OS::exit (1);
}
static void
-parse_args (int argc, char *argv[])
+parse_args (int argc, ASYS_TCHAR *argv[])
{
- ACE_Get_Opt get_opt (argc, argv, "r:w:n:");
+ ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("r:w:n:"));
int c;
@@ -74,7 +74,7 @@ parse_args (int argc, char *argv[])
n_writers = ACE_OS::atoi (get_opt.optarg);
break;
case 'n':
- n_iterations = atoi (get_opt.optarg);
+ n_iterations = ACE_OS::atoi (get_opt.optarg);
break;
default:
print_usage_and_die ();
@@ -88,7 +88,7 @@ parse_args (int argc, char *argv[])
static void *
reader (void *)
{
- ACE_DEBUG ((LM_DEBUG, " (%t) reader starting\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) reader starting\n")));
// We use a random pause, around 2msec with 1msec jittering.
int usecs = 1000 + ACE_OS::rand() % 2000;
@@ -99,10 +99,10 @@ reader (void *)
ACE_OS::sleep(pause);
ACE_Read_Guard<ACE_RW_Mutex> g (rw_mutex);
// int n = ++current_readers;
- // ACE_DEBUG ((LM_DEBUG, " (%t) I'm reader number %d\n", n));
+ // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) I'm reader number %d\n"), n));
if (current_writers > 0)
- ACE_DEBUG ((LM_DEBUG, " (%t) writers found!!!\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writers found!!!\n")));
ACE_thread_t data = shared_data;
@@ -112,14 +112,14 @@ reader (void *)
if (!ACE_OS::thr_equal (shared_data, data))
ACE_DEBUG ((LM_DEBUG,
- " (%t) somebody changed %d to %d\n",
+ ASYS_TEXT (" (%t) somebody changed %d to %d\n"),
data, shared_data));
}
--current_readers;
- //ACE_DEBUG ((LM_DEBUG, " (%t) done with reading guarded data\n"));
+ //ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) done with reading guarded data\n")));
- ACE_DEBUG((LM_DEBUG, " (%t) read %d done at %T\n", iterations));
+ ACE_DEBUG((LM_DEBUG, ASYS_TEXT (" (%t) read %d done at %T\n"), iterations));
// ACE_Thread::yield ();
}
return 0;
@@ -131,7 +131,7 @@ reader (void *)
static void *
writer (void *)
{
- ACE_DEBUG ((LM_DEBUG, " (%t) writer starting\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writer starting\n")));
// We use a random pause, around 2msec with 1msec jittering.
int usecs = 1000 + ACE_OS::rand() % 2000;
@@ -144,13 +144,13 @@ writer (void *)
ACE_Write_Guard<ACE_RW_Mutex> g (rw_mutex);
++current_writers;
- //ACE_DEBUG ((LM_DEBUG, " (%t) writing to guarded data\n"));
+ //ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writing to guarded data\n")));
if (current_writers > 1)
- ACE_DEBUG ((LM_DEBUG, " (%t) other writers found!!!\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) other writers found!!!\n")));
if (current_readers > 0)
- ACE_DEBUG ((LM_DEBUG, " (%t) readers found!!!\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) readers found!!!\n")));
ACE_thread_t self = ACE_Thread::self ();
@@ -162,15 +162,15 @@ writer (void *)
if (!ACE_OS::thr_equal (shared_data, self))
ACE_DEBUG ((LM_DEBUG,
- " (%t) somebody wrote on my data %d\n",
+ ASYS_TEXT (" (%t) somebody wrote on my data %d\n"),
shared_data));
}
--current_writers;
- //ACE_DEBUG ((LM_DEBUG, " (%t) done with guarded data\n"));
+ //ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) done with guarded data\n")));
- ACE_DEBUG((LM_DEBUG, " (%t) write %d done at %T\n", iterations));
+ ACE_DEBUG((LM_DEBUG, ASYS_TEXT (" (%t) write %d done at %T\n"), iterations));
// ACE_Thread::yield ();
}
return 0;
@@ -193,9 +193,9 @@ template class ACE_Guard<ACE_RW_Mutex>;
// Spawn off threads.
-int main (int argc, char *argv[])
+int main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Reader_Writer_Test");
+ ACE_START_TEST (ASYS_TEXT ("Reader_Writer_Test"));
#if defined (ACE_HAS_THREADS)
parse_args (argc, argv);
@@ -203,26 +203,26 @@ int main (int argc, char *argv[])
current_readers = 0; // Possibly already done
current_writers = 0; // Possibly already done
- ACE_DEBUG ((LM_DEBUG, " (%t) main thread starting\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) main thread starting\n")));
if (ACE_Thread_Manager::instance ()->spawn_n (n_readers,
ACE_THR_FUNC (reader),
0,
THR_NEW_LWP) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1);
else if (ACE_Thread_Manager::instance ()->spawn_n (n_writers,
ACE_THR_FUNC (writer),
0,
THR_NEW_LWP) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1);
ACE_Thread_Manager::instance ()->wait ();
- ACE_DEBUG ((LM_DEBUG, " (%t) exiting main thread\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) exiting main thread\n")));
#else
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Recursive_Mutex_Test.cpp b/tests/Recursive_Mutex_Test.cpp
index 9ba0ddee93f..6bd3b7577b8 100644
--- a/tests/Recursive_Mutex_Test.cpp
+++ b/tests/Recursive_Mutex_Test.cpp
@@ -43,14 +43,14 @@ recursive_worker (size_t nesting_level,
{
ACE_ASSERT (rm->acquire () == 0);
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) = acquired, nesting = %d, thread id = %u\n",
+ ASYS_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"),
rm->get_nesting_level (), rm->get_thread_id ()));
recursive_worker (nesting_level + 1, rm);
ACE_ASSERT (rm->release () == 0);
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) = released, nesting = %d, thread id = %u\n",
+ ASYS_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"),
rm->get_nesting_level (), rm->get_thread_id ()));
}
}
@@ -66,9 +66,9 @@ worker (void *arg)
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Recursive_Mutex_Test");
+ ACE_START_TEST (ASYS_TEXT ("Recursive_Mutex_Test"));
#if defined (ACE_HAS_THREADS)
ACE_Recursive_Thread_Mutex rm;
@@ -78,7 +78,7 @@ main (int, char *[])
ACE_Thread_Manager::instance ()->wait ();
#else
ACE_ERROR ((LM_ERROR,
- "ACE doesn't support support process mutexes on this platform (yet)\n"));
+ ASYS_TEXT ("ACE doesn't support support process mutexes on this platform (yet)\n")));
#endif /* ACE_WIN32 */
ACE_END_TEST;
return 0;
diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp
index 57f713ef3cf..090bf3a7921 100644
--- a/tests/SOCK_Connector_Test.cpp
+++ b/tests/SOCK_Connector_Test.cpp
@@ -30,7 +30,7 @@
// one will do.
static void
-find_another_host (char other_host[])
+find_another_host (ASYS_TCHAR other_host[])
{
ACE_OS::strcpy (other_host, ACE_DEFAULT_SERVER_HOST); // If all else fails
@@ -44,7 +44,7 @@ find_another_host (char other_host[])
h = ACE_OS::gethostbyname (un.nodename);
// Use me if can't find another
- ACE_OS::strcpy (other_host, h->h_name);
+ ACE_OS::strcpy (other_host, ASYS_WIDE_STRING (h->h_name));
// @@ We really need to add wrappers for these hostent methods.
sethostent (1);
@@ -73,7 +73,7 @@ find_another_host (char other_host[])
static int
fail_no_listener_nonblocking (void)
{
- char test_host[MAXHOSTNAMELEN];
+ ASYS_TCHAR test_host[MAXHOSTNAMELEN];
int status;
ACE_INET_Addr nobody_home;
ACE_SOCK_Connector con;
@@ -81,7 +81,7 @@ fail_no_listener_nonblocking (void)
ACE_Time_Value nonblock (0, 0);
find_another_host (test_host);
- ACE_DEBUG ((LM_DEBUG, "Testing to host %s\n", test_host));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Testing to host %s\n"), test_host));
nobody_home.set ((u_short) 42000, test_host);
status = con.connect (sock, nobody_home, &nonblock);
@@ -100,20 +100,20 @@ fail_no_listener_nonblocking (void)
if (status != -1)
{
ACE_DEBUG ((LM_DEBUG,
- "Connect which should fail didn't\n"));
+ ASYS_TEXT ("Connect which should fail didn't\n")));
status = -1;
}
else
{
- ACE_DEBUG ((LM_DEBUG, "%p\n", "Proper fail"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("Proper fail")));
status = 0;
}
}
else
{
ACE_DEBUG ((LM_DEBUG,
- "Test not executed fully; expected EWOULDBLOCK, %p\n",
- "not"));
+ ASYS_TEXT ("Test not executed fully; expected EWOULDBLOCK, %p\n"),
+ ASYS_TEXT ("not")));
status = -1;
}
@@ -124,9 +124,9 @@ fail_no_listener_nonblocking (void)
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("SOCK_Connector_Test");
+ ACE_START_TEST (ASYS_TEXT ("SOCK_Connector_Test"));
int status = 0;
diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp
index 1d42ac6d805..1f1c3324414 100644
--- a/tests/SOCK_Test.cpp
+++ b/tests/SOCK_Test.cpp
@@ -32,11 +32,11 @@ static void *
client (void *arg)
{
ACE_INET_Addr *remote_addr = (ACE_INET_Addr *) arg;
- ACE_INET_Addr server_addr (remote_addr->get_port_number (), "localhost");
+ ACE_INET_Addr server_addr (remote_addr->get_port_number (), ASYS_TEXT ("localhost"));
ACE_SOCK_Stream cli_stream;
ACE_SOCK_Connector con;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting non-blocking connect\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting non-blocking connect\n")));
// Initiate timed, non-blocking connection with server.
// Attempt a non-blocking connect to the server.
@@ -44,43 +44,43 @@ client (void *arg)
(ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
{
if (errno != EWOULDBLOCK)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "connection failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed")));
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting timed connect\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting timed connect\n")));
// Check if non-blocking connection is in progress,
// and wait up to ACE_DEFAULT_TIMEOUT seconds for it to complete.
ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT);
if (con.complete (cli_stream, &server_addr, &tv) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "connection failed"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed")), 0);
else
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) connected to %s\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) connected to %s\n"),
server_addr.get_host_name ()));
}
if (cli_stream.disable (ACE_NONBLOCK) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "disable"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("disable")));
// Send data to server (correctly handles "incomplete writes").
for (char *c = ACE_ALPHABET; *c != '\0'; c++)
if (cli_stream.send_n (c, 1) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n")));
// Explicitly close the writer-side of the connection.
if (cli_stream.close_writer () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close_writer"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close_writer")));
char buf[1];
// Wait for handshake with server.
if (cli_stream.recv_n (buf, 1) != 1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "recv_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n")));
// Close the connection completely.
if (cli_stream.close () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close")));
return 0;
}
@@ -91,7 +91,7 @@ server (void *arg)
ACE_SOCK_Acceptor *peer_acceptor = (ACE_SOCK_Acceptor *) arg;
if (peer_acceptor->enable (ACE_NONBLOCK) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "enable"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable")));
// Keep these objects out here to prevent excessive constructor
// calls...
@@ -113,10 +113,10 @@ server (void *arg)
ACE_ASSERT (tv == def_timeout);
if (result == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0);
else if (result == 0)
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) select timed out, shutting down\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) select timed out, shutting down\n")));
return 0;
}
@@ -125,12 +125,12 @@ server (void *arg)
while ((result = peer_acceptor->accept (new_stream, &cli_addr)) != -1)
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client %s connected from %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) client %s connected from %d\n"),
cli_addr.get_host_name (), cli_addr.get_port_number ()));
// Enable non-blocking I/O.
if (new_stream.enable (ACE_NONBLOCK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "enable"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable")), 0);
handle_set.reset ();
handle_set.set_bit (new_stream.get_handle ());
@@ -142,7 +142,7 @@ server (void *arg)
if (ACE_OS::select (int (new_stream.get_handle ()) + 1,
handle_set,
0, 0, 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "select"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0);
while ((r_bytes = new_stream.recv (buf, 1)) > 0)
{
@@ -153,23 +153,23 @@ server (void *arg)
if (r_bytes == 0)
{
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) reached end of input, connection closed by client\n"));
+ ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n")));
// Handshake back with client.
if (new_stream.send_n ("", 1) != 1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "send_n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n")));
// Close endpoint.
if (new_stream.close () == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "close"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close")));
return 0;
}
else if (r_bytes == -1)
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) no input available, going back to reading\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no input available, going back to reading\n")));
else
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "recv_n"), 0);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n")), 0);
}
}
}
@@ -177,9 +177,9 @@ server (void *arg)
if (result == -1)
{
if (errno == EWOULDBLOCK)
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) no connections available, shutting down\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no connections available, shutting down\n")));
else
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "accept"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("accept")));
}
return 0;
@@ -197,17 +197,17 @@ spawn (void)
// Bind listener to any port and then find out what the port was.
if (peer_acceptor.open (ACE_Addr::sap_any) == -1
|| peer_acceptor.get_local_addr (server_addr) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n", "open"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("open")));
else
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) starting server at port %d\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting server at port %d\n"),
server_addr.get_port_number ()));
#if !defined (ACE_WIN32) && !defined (VXWORKS)
switch (ACE_OS::fork ("child"))
{
case -1:
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "fork failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("fork failed")));
/* NOTREACHED */
case 0:
client (&server_addr);
@@ -220,16 +220,16 @@ spawn (void)
#elif defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn
(ACE_THR_FUNC (server), (void *) &peer_acceptor, THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed")));
if (ACE_Thread_Manager::instance ()->spawn
(ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed")));
// Wait for the threads to exit.
ACE_Thread_Manager::instance ()->wait ();
#else
- ACE_ERROR ((LM_ERROR, "(%P|%t) only one thread may be run in a process on this platform\n%a", 1));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1));
#endif /* ACE_HAS_THREADS */
peer_acceptor.close ();
@@ -237,9 +237,9 @@ spawn (void)
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("SOCK_Test");
+ ACE_START_TEST (ASYS_TEXT ("SOCK_Test"));
spawn ();
diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp
index 552f44cc8a1..ccc073085eb 100644
--- a/tests/SString_Test.cpp
+++ b/tests/SString_Test.cpp
@@ -22,9 +22,9 @@
#include "ace/SString.h"
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("SString_Test");
+ ACE_START_TEST (ASYS_TEXT ("SString_Test"));
{
ACE_CString s1 ("hello");
diff --git a/tests/Semaphore_Test.cpp b/tests/Semaphore_Test.cpp
index beeef231877..f7a9125c945 100644
--- a/tests/Semaphore_Test.cpp
+++ b/tests/Semaphore_Test.cpp
@@ -51,14 +51,14 @@ static void
print_usage_and_die (void)
{
ACE_DEBUG ((LM_DEBUG,
- "usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n"));
+ ASYS_TEXT ("usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n")));
ACE_OS::exit (1);
}
static void
-parse_args (int argc, char *argv[])
+parse_args (int argc, ASYS_TCHAR *argv[])
{
- ACE_Get_Opt get_opt (argc, argv, "s:w:n:");
+ ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("s:w:n:"));
int c;
@@ -98,8 +98,8 @@ test_timeout (void)
if (diff < wait)
{
- ACE_DEBUG ((LM_DEBUG, "Timed wait fails length test\n"));
- ACE_DEBUG ((LM_DEBUG, "Value: %d us, actual %d us\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Timed wait fails length test\n")));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Value: %d us, actual %d us\n"),
wait.usec (),
diff.usec ()));
return -1;
@@ -140,9 +140,9 @@ worker (void *)
// Test semaphore functionality
-int main (int argc, char *argv[])
+int main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Semaphore_Test");
+ ACE_START_TEST (ASYS_TEXT ("Semaphore_Test"));
#if defined (ACE_HAS_THREADS)
parse_args (argc, argv);
@@ -158,22 +158,22 @@ int main (int argc, char *argv[])
if (ACE_Thread_Manager::instance ()->spawn_n
(n_workers, ACE_THR_FUNC (worker), 0, THR_NEW_LWP) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1);
ACE_Thread_Manager::instance ()->wait ();
size_t percent = (timeouts * 100) / (n_workers * n_iterations);
ACE_DEBUG ((LM_DEBUG,
- "Worker threads timed out %d percent of the time\n", percent));
+ ASYS_TEXT ("Worker threads timed out %d percent of the time\n"), percent));
#else
ACE_ERROR ((LM_ERROR,
- "Timed semaphores are not supported with native Solaris threads\n"));
+ ASYS_TEXT ("Timed semaphores are not supported with native Solaris threads\n")));
#endif /* ACE_HAS_STHREADS */
#else
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
- ACE_ERROR ((LM_ERROR, "Threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Sigset_Ops_Test.cpp b/tests/Sigset_Ops_Test.cpp
index 260b6985f4d..1617c5670fb 100644
--- a/tests/Sigset_Ops_Test.cpp
+++ b/tests/Sigset_Ops_Test.cpp
@@ -27,31 +27,31 @@ siglistset(sigset_t x, int *sigset)
int empty = 1 ;
int retv = 0 ;
- ACE_DEBUG ((LM_DEBUG, "Signal(s) in the set = %08x:\n ", x)) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Signal(s) in the set = %08x:\n "), x)) ;
for (int i = 1; i < ACE_NSIG; i++) {
if ((retv = ACE_OS::sigismember (&x, i)) > 0) {
- ACE_DEBUG ((LM_DEBUG, " %d", i)) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" %d"), i)) ;
empty = 0 ;
}
ACE_ASSERT ((sigset [i] ? retv > 0 : retv <= 0)) ;
}
if (empty) {
- ACE_DEBUG ((LM_DEBUG, "Empty!!\n\n")) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Empty!!\n\n"))) ;
}
else {
- ACE_DEBUG ((LM_DEBUG, "\n\n")) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\n"))) ;
}
}
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Sigset_Ops_Test");
+ ACE_START_TEST (ASYS_TEXT ("Sigset_Ops_Test"));
#if defined (ACE_LACKS_SIGSET)
- ACE_DEBUG ((LM_DEBUG, "%n uses ACE implementation of sigset*() functions.\n\n")) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses ACE implementation of sigset*() functions.\n\n"))) ;
#else
- ACE_DEBUG ((LM_DEBUG, "%n uses platform's native sigset*() functions.\n\n")) ;
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses platform's native sigset*() functions.\n\n"))) ;
#endif
sigset_t x ; // examined sigset
@@ -105,11 +105,11 @@ main (int, char *[])
// Now testing out of bound signal
if (ACE_OS::sigismember (&x, ACE_NSIG) >= 0) {
- ACE_ERROR((LM_ERROR, "Platform doesn't check for valid signal number.\n"));
+ ACE_ERROR((LM_ERROR, ASYS_TEXT ("Platform doesn't check for valid signal number.\n")));
status = 1;
}
else if (ACE_OS::last_error() != EINVAL) {
- ACE_ERROR((LM_ERROR, "%p.\n", "Expected status EINVAL; got"));
+ ACE_ERROR((LM_ERROR, ASYS_TEXT ("%p.\n"), ASYS_TEXT ("Expected status EINVAL; got")));
status = 1;
}
@@ -118,7 +118,7 @@ main (int, char *[])
// Currently, I can only think of passing a NULL ptr
// If you know other situations that fall into this
// catagory, please let me know. Thanks.
- ACE_DEBUG ((LM_ERROR, "Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n")) ;
+ ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n"))) ;
ACE_ASSERT (ACE_OS::sigfillset (NULL) < 0 && ACE_OS::last_error() == EFAULT) ;
*/
diff --git a/tests/Simple_Message_Block_Test.cpp b/tests/Simple_Message_Block_Test.cpp
index c7284ce35a8..e50db7e32ed 100644
--- a/tests/Simple_Message_Block_Test.cpp
+++ b/tests/Simple_Message_Block_Test.cpp
@@ -25,9 +25,9 @@
#include "ace/Synch.h"
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Simple_Message_Block_Test");
+ ACE_START_TEST (ASYS_TEXT ("Simple_Message_Block_Test"));
{
// Checks normal stack deletes.
diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp
index 430bc1fe7da..f825798a514 100644
--- a/tests/TSS_Test.cpp
+++ b/tests/TSS_Test.cpp
@@ -53,7 +53,7 @@ static ACE_Thread_Mutex output_lock;
extern "C" void
cleanup (void *ptr)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) in cleanup, ptr = %x\n", ptr));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in cleanup, ptr = %x\n"), ptr));
operator delete (ptr);
}
@@ -67,7 +67,7 @@ worker (void *c)
// size as a long on all current ACE platforms.
int count = (int) (long) c;
- ACE_DEBUG ((LM_DEBUG, "(%t) worker, iterations = %d\n", count));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) worker, iterations = %d\n"), count));
ACE_thread_key_t key = ACE_OS::NULL_key;
int *ip = 0;
@@ -77,44 +77,49 @@ worker (void *c)
if (ACE_OS::thr_keycreate (&key, cleanup) == -1)
{
- ACE_ERROR ((LM_ERROR, "(%t) %p (no keys available)\n",
- "ACE_OS::thr_keycreate"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no keys available)\n"),
+ ASYS_TEXT ("ACE_OS::thr_keycreate")));
return (void *) -1;
}
ACE_NEW_RETURN (ip, int, 0);
if (ACE_OS::thr_setspecific (key, (void *) ip) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
for (int i = 0; i < count; i++)
{
if (ACE_OS::thr_keycreate (&key, cleanup) == -1)
{
- ACE_ERROR ((LM_ERROR, "(%t) %p (no more keys)\n",
- "ACE_OS::thr_keycreate"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"),
+ ASYS_TEXT ("ACE_OS::thr_keycreate")));
break;
}
ACE_NEW_RETURN (ip, int, 0);
- ACE_DEBUG ((LM_DEBUG, "(%t) in worker at location 1, "
- "key = %d, ip = %x\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 1, ")
+ ASYS_TEXT ("key = %d, ip = %x\n"),
key, ip));
if (ACE_OS::thr_setspecific (key, (void *) ip) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
if (ACE_OS::thr_setspecific (key, (void *) 0) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
delete ip;
if (ACE_OS::thr_keyfree (key) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_keyfree")));
// Cause an error.
ACE_OS::read (ACE_INVALID_HANDLE, 0, 0);
@@ -138,30 +143,34 @@ worker (void *c)
if (ACE_OS::thr_keycreate (&key, cleanup) == -1)
{
- ACE_ERROR ((LM_ERROR, "(%t) %p (no more keys)\n",
- "ACE_OS::thr_keycreate"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"),
+ ASYS_TEXT ("ACE_OS::thr_keycreate")));
break;
}
ACE_NEW_RETURN (ip, int, 0);
- ACE_DEBUG ((LM_DEBUG, "(%t) in worker at location 2, "
- "key = %d, ip = %x\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 2, ")
+ ASYS_TEXT ("key = %d, ip = %x\n"),
key, ip));
if (ACE_OS::thr_setspecific (key, (void *) ip) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
if (ACE_OS::thr_setspecific (key, (void *) 0) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_setspecific")));
delete ip;
if (ACE_OS::thr_keyfree (key) == -1)
- ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"),
+ ASYS_TEXT ("ACE_OS::thr_keyfree")));
#endif /* ! __Lynx__) && ! ACE_HAS_TSS_EMULATION */
}
@@ -171,7 +180,7 @@ worker (void *c)
extern "C" void
handler (int signum)
{
- ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("signal = %S\n"), signum));
ACE_Thread_Manager::instance ()->exit (0);
}
@@ -185,9 +194,9 @@ template class ACE_TSS<Errno>;
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("TSS_Test");
+ ACE_START_TEST (ASYS_TEXT ("TSS_Test"));
#if defined (ACE_HAS_THREADS)
Errno::allocate_lock ();
@@ -215,7 +224,7 @@ main (int, char *[])
ACE_THR_FUNC (worker),
(void *) ITERATIONS,
THR_BOUND) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1);
ACE_Thread_Manager::instance ()->wait ();
@@ -224,7 +233,7 @@ main (int, char *[])
Errno::deallocate_lock ();
#else
ACE_ERROR ((LM_ERROR,
- "threads are not supported on this platform\n"));
+ ASYS_TEXT ("threads are not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp
index de87b270994..9cdb6122a61 100644
--- a/tests/Task_Test.cpp
+++ b/tests/Task_Test.cpp
@@ -52,7 +52,7 @@ Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr,
{
// Create worker threads.
if (this->activate (THR_NEW_LWP, n_threads) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "activate failed"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("activate failed")));
}
// Iterate <n_iterations> time printing off a message and "waiting"
@@ -65,7 +65,7 @@ Barrier_Task::svc (void)
iterations <= this->n_iterations_;
iterations++)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in iteration %d\n"), iterations));
// Block until all other threads have waited, then continue.
this->barrier_.wait ();
@@ -80,9 +80,9 @@ Barrier_Task::svc (void)
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Task_Test");
+ ACE_START_TEST (ASYS_TEXT ("Task_Test"));
#if defined (ACE_HAS_THREADS)
int n_threads = ACE_MAX_THREADS;
@@ -95,7 +95,7 @@ main (int, char *[])
ACE_Thread_Manager::instance ()->wait ();
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index 6c70da76718..740be796728 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -68,7 +68,7 @@ Thread_Pool::~Thread_Pool (void)
int
Thread_Pool::close (u_long)
{
- ACE_DEBUG ((LM_DEBUG, "(%t) close of worker\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) close of worker\n")));
return 0;
}
@@ -105,7 +105,7 @@ Thread_Pool::svc (void)
if (length > 0)
ACE_DEBUG ((LM_DEBUG,
- "(%t) in iteration %d, queue len = %d, length = %d, text = \"%*s\"\n",
+ ASYS_TEXT ("(%t) in iteration %d, queue len = %d, length = %d, text = \"%*s\"\n"),
count, this->msg_queue ()->message_count (),
length, length - 1, mb->rd_ptr ()));
@@ -115,7 +115,7 @@ Thread_Pool::svc (void)
if (length == 0)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) in iteration %d, queue len = %d, got NULL message, exiting\n",
+ ASYS_TEXT ("(%t) in iteration %d, queue len = %d, got NULL message, exiting\n"),
count, this->msg_queue ()->message_count ()));
break;
}
@@ -130,12 +130,12 @@ int
Thread_Pool::open (void *)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) producer start, dumping the Thread_Pool\n"));
+ ASYS_TEXT ("(%t) producer start, dumping the Thread_Pool\n")));
this->dump ();
// Create a pool of worker threads.
if (this->activate (THR_NEW_LWP, this->n_threads_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate failed"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("activate failed")), -1);
for (size_t count = 0; count < n_iterations; count++)
{
@@ -147,24 +147,24 @@ Thread_Pool::open (void *)
0, 0, 0, &this->lock_adapter_),
-1);
- ACE_OS::sprintf (mb->rd_ptr (), "%d\n", count);
- int n = ACE_OS::strlen (mb->rd_ptr ());
+ ACE_OS::sprintf ((ASYS_TCHAR *) mb->rd_ptr (), ASYS_TEXT ("%d\n"), count);
+ int n = ACE_OS::strlen ((ASYS_TCHAR *)mb->rd_ptr ());
if (count == 0 || (count % 20 == 0))
ACE_OS::sleep (1);
// Send a normal message to the waiting threads and continue
// producing.
- mb->wr_ptr (n);
+ mb->wr_ptr (n * sizeof (ASYS_TCHAR));
// Pass the message to the Thread_Pool.
if (this->put (mb) == -1)
- ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT (" (%t) %p\n"), ASYS_TEXT ("put")));
}
// Send a shutdown message to the waiting threads and exit.
ACE_DEBUG ((LM_DEBUG,
- "\n(%t) sending shutdown message to %d threads, dump of task:\n",
+ ASYS_TEXT ("\n(%t) sending shutdown message to %d threads, dump of task:\n"),
this->thr_count ()));
this->dump ();
@@ -178,7 +178,7 @@ Thread_Pool::open (void *)
for (int i = this->thr_count (); i > 0; i--)
{
ACE_DEBUG ((LM_DEBUG,
- "(%t) EOF, enqueueing NULL block for thread = %d\n",
+ ASYS_TEXT ("(%t) EOF, enqueueing NULL block for thread = %d\n"),
i));
// Enqueue an empty message to flag each consumer to shutdown.
@@ -187,12 +187,12 @@ Thread_Pool::open (void *)
ACE_Message_Block *dup = mb->duplicate ();
if (this->put (dup) == -1)
- ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT (" (%t) %p\n"), ASYS_TEXT ("put")));
}
mb->release ();
- ACE_DEBUG ((LM_DEBUG, "\n(%t) end loop, dump of task:\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n(%t) end loop, dump of task:\n")));
this->dump ();
return 0;
@@ -204,18 +204,17 @@ template class ACE_Lock_Adapter<ACE_Thread_Mutex>;
#pragma instantiate ACE_Lock_Adapter<ACE_Thread_Mutex>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
#endif /* ACE_HAS_THREADS */
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
- ACE_START_TEST ("Thread_Pool_Test");
+ ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Test"));
#if defined (ACE_HAS_THREADS)
int n_threads = ACE_MAX_THREADS;
- ACE_DEBUG ((LM_DEBUG, "(%t) threads = %d\n", n_threads));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) threads = %d\n"), n_threads));
// Create the worker tasks.
Thread_Pool thread_pool (n_threads);
@@ -226,15 +225,15 @@ main (int, char *[])
// Wait for all the threads to reach their exit point.
- ACE_DEBUG ((LM_DEBUG, "(%t) waiting for worker tasks to finish...\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n")));
ACE_Thread_Manager::instance ()->wait ();
ACE_ASSERT (thread_pool.msg_queue ()->is_empty ());
- ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) destroying worker tasks and exiting...\n")));
#else
- ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("threads not supported on this platform\n")));
#endif /* ACE_HAS_THREADS */
ACE_END_TEST;
return 0;
diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp
index 508b7768648..0995d500aba 100644
--- a/tests/Time_Value_Test.cpp
+++ b/tests/Time_Value_Test.cpp
@@ -49,7 +49,7 @@
#if defined (ACE_HAS_STHREADS)
static
u_long
-check_ace_u_longlong (const char *const name,
+check_ace_u_longlong (const ASYS_TCHAR *const name,
const ACE_U_LongLong ull,
const u_long hi,
const u_long lo)
@@ -58,8 +58,8 @@ check_ace_u_longlong (const char *const name,
return 0;
else
ACE_ERROR_RETURN ((LM_ERROR,
- "%s; hi: %x, should be %x; "
- "lo: %x, should be %x.\n",
+ ASYS_TEXT ("%s; hi: %x, should be %x; ")
+ ASYS_TEXT ("lo: %x, should be %x.\n"),
name, ull.hi (), hi, ull.lo (), lo),
1);
}
@@ -71,101 +71,101 @@ test_ace_u_longlong (void)
u_long errors = 0;
ACE_U_LongLong ull1 (0x21,1);
- errors += check_ace_u_longlong ("ull1", ull1, 1, 0x21);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull1"), ull1, 1, 0x21);
ACE_U_LongLong ull2 (0x20,2);
- errors += check_ace_u_longlong ("ull2", ull2, 2, 0x20);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20);
ull2 -= ull1;
- errors += check_ace_u_longlong ("ull2", ull2, 0, 0xfffffffful);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 0, 0xfffffffful);
ull2 += ull1;
- errors += check_ace_u_longlong ("ull2", ull2, 2, 0x20);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20);
ACE_U_LongLong ull3 = ull1 + ull1;
- errors += check_ace_u_longlong ("ull3", ull3, 2, 0x42);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull3"), ull3, 2, 0x42);
ACE_U_LongLong ull4 = ACE_U_LongLong (0x1111, 0) -
ACE_U_LongLong (0x1112, 0);
- errors += check_ace_u_longlong ("ull4", ull4, 0xfffffffful, 0xfffffffful);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful);
ACE_U_LongLong ull5 = ACE_U_LongLong (0x1111, 1) -
ACE_U_LongLong (0x1112, 0);
- errors += check_ace_u_longlong ("ull5", ull5, 0, 0xfffffffful);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 0, 0xfffffffful);
++ull5;
- errors += check_ace_u_longlong ("ull5", ull5, 1, 0);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 1, 0);
ACE_U_LongLong ull6 = ull2 + ACE_U_LongLong (0, 1);
- errors += check_ace_u_longlong ("ull6", ull6, 3, 0x20);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 3, 0x20);
ull6 += ACE_U_LongLong (0xffffffff, 0xfff0);
- errors += check_ace_u_longlong ("ull6", ull6, 0xfff4, 0x1f);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x1f);
++ull6;
- errors += check_ace_u_longlong ("ull6", ull6, 0xfff4, 0x20);
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x20);
// The hi part of ull6 will be lost in the following, because
// the quotient has only 32 bits.
- errors += check_ace_u_longlong ("ull6 / 1",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 1"),
(ACE_U_LongLong) (ull6 / 1u),
0, 0x20);
// There's apparently a small loss in precision in
// ACE_U_LongLong::operator/. It calculates
// ull6 / 0xd0000 as 0x13b013b4 instead of 0x13b04ec4.
- errors += check_ace_u_longlong ("ull6 / 0x10000 / 0xd",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 0x10000 / 0xd"),
(ACE_U_LongLong) (ull6 / 0x10000u / 0xd),
0, 0x13b04ec4);
- errors += check_ace_u_longlong ("ull6 % 5",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 5"),
(ACE_U_LongLong) (ull6 % 5),
0, 1);
- errors += check_ace_u_longlong ("ull6 % 0x20007",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 0x20007"),
(ACE_U_LongLong) (ull6 % 0x20007),
0, 0x3f63);
ACE_U_LongLong ull7 (12);
ull7 *= 3125;
- errors += check_ace_u_longlong ("12 * 3125",
+ errors += check_ace_u_longlong (ASYS_TEXT ("12 * 3125"),
ull7,
0, 37500);
ull7 *= 100;
- errors += check_ace_u_longlong ("37500 * 100",
+ errors += check_ace_u_longlong (ASYS_TEXT ("37500 * 100"),
ull7,
0, 3750000);
- errors += check_ace_u_longlong ("3750000 << 16",
+ errors += check_ace_u_longlong (ASYS_TEXT ("3750000 << 16"),
ull7 << 16 ,
0x39, 0x38700000);
- errors += check_ace_u_longlong ("3750000 >> 16",
+ errors += check_ace_u_longlong (ASYS_TEXT ("3750000 >> 16"),
ull7 >> 16,
0, 0x39);
ull7 <<= 32;
- errors += check_ace_u_longlong ("3750000 <<= 32",
+ errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32"),
ull7,
3750000, 0);
ull7 >>= 12;
- errors += check_ace_u_longlong ("3750000 <<= 32 >>= 15",
+ errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32 >>= 15"),
ull7,
0x393, 0x87000000);
ACE_U_LongLong ull8 (0x0f0f, 0xf0f0);
ACE_U_LongLong ull9 (0xf0f0, 0xf0f0);
ull8 |= ull9;
- errors += check_ace_u_longlong ("ull8 |= ull9",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull8 |= ull9"),
ull8,
0xf0f0, 0xffff);
ull9.lo (0x5678);
ull9.hi (0x1234);
ull8 &= ull9;
- errors += check_ace_u_longlong ("ull8 &= 0x12345678",
+ errors += check_ace_u_longlong (ASYS_TEXT ("ull8 &= 0x12345678"),
ull9,
0x1234, 0x5678);
@@ -175,11 +175,11 @@ test_ace_u_longlong (void)
int
-main (int, char *[])
+main (int, ASYS_TCHAR *[])
{
int ret = 0;
- ACE_START_TEST ("Time_Value_Test");
+ ACE_START_TEST (ASYS_TEXT ("Time_Value_Test"));
ACE_Time_Value tv1;
ACE_Time_Value tv2 (2);
diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp
index 26855ea6c1a..6f770e38fe7 100644
--- a/tests/Timer_Queue_Test.cpp
+++ b/tests/Timer_Queue_Test.cpp
@@ -173,7 +173,7 @@ test_functionality (ACE_Timer_Queue *tq)
static void
test_performance (ACE_Timer_Queue *tq,
- const char *test_name)
+ const ASYS_TCHAR *test_name)
{
Example_Handler eh;
ACE_Profile_Timer timer;
@@ -209,13 +209,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to schedule %d timers for %s\n",
+ ASYS_TEXT ("time to schedule %d timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
// Test the amount of time required to cancel all the timers.
@@ -232,13 +232,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to cancel %d timers for %s\n",
+ ASYS_TEXT ("time to cancel %d timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
// Test the amount of time required to schedule and expire all the
@@ -269,13 +269,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to schedule and expire %d timers for %s\n",
+ ASYS_TEXT ("time to schedule and expire %d timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
// Test the amount of time required to randomly cancel all the
@@ -309,13 +309,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to randomly cancel %d timers for %s\n",
+ ASYS_TEXT ("time to randomly cancel %d timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
// Test the amount of time required to randomly schedule all the timers.
@@ -342,13 +342,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to randomly schedule %d timers for %s\n",
+ ASYS_TEXT ("time to randomly schedule %d timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
// Test the amount of time required to cancel all the timers.
@@ -370,13 +370,13 @@ test_performance (ACE_Timer_Queue *tq,
timer.elapsed_time (et);
ACE_DEBUG ((LM_DEBUG,
- "time to expire %d randomly scheduled timers for %s\n",
+ ASYS_TEXT ("time to expire %d randomly scheduled timers for %s\n"),
max_iterations, test_name));
ACE_DEBUG ((LM_DEBUG,
- "real time = %f secs, user time = %f secs, system time = %f secs\n",
+ ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"),
et.real_time, et.user_time, et.system_time));
ACE_DEBUG ((LM_DEBUG,
- "time per call = %f usecs\n",
+ ASYS_TEXT ("time per call = %f usecs\n"),
(et.user_time / double (max_iterations)) * 1000000));
delete [] times;
@@ -384,7 +384,7 @@ test_performance (ACE_Timer_Queue *tq,
struct Timer_Queue_List
{
- Timer_Queue_List (ACE_Timer_Queue *queue, const char *name, Timer_Queue_List *next = NULL)
+ Timer_Queue_List (ACE_Timer_Queue *queue, const ASYS_TCHAR *name, Timer_Queue_List *next = NULL)
: queue_ (queue),
name_ (name),
next_ (next)
@@ -393,7 +393,7 @@ struct Timer_Queue_List
ACE_Timer_Queue *queue_;
// Pointer to the subclass of <ACE_Timer_Queue> that we're testing.
- const char *name_;
+ const ASYS_TCHAR *name_;
// Name of the Queue that we're testing.
Timer_Queue_List *next_;
@@ -401,9 +401,9 @@ struct Timer_Queue_List
};
int
-main (int argc, char *argv[])
+main (int argc, ASYS_TCHAR *argv[])
{
- ACE_START_TEST ("Timer_Queue_Test");
+ ACE_START_TEST (ASYS_TEXT ("Timer_Queue_Test"));
ACE_OS::srand (ACE_OS::time (0L));
@@ -421,7 +421,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_Hash_Heap,
- "ACE_Timer_Hash (Heap)",
+ ASYS_TEXT ("ACE_Timer_Hash (Heap)"),
tq_list),
-1);
@@ -429,7 +429,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_Hash,
- "ACE_Timer_Hash",
+ ASYS_TEXT ("ACE_Timer_Hash"),
tq_list),
-1);
@@ -437,7 +437,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_List,
- "ACE_Timer_List",
+ ASYS_TEXT ("ACE_Timer_List"),
tq_list),
-1);
@@ -445,7 +445,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_Wheel,
- "ACE_Timer_Wheel (non-preallocated)",
+ ASYS_TEXT ("ACE_Timer_Wheel (non-preallocated)"),
tq_list),
-1);
@@ -455,7 +455,7 @@ main (int argc, char *argv[])
Timer_Queue_List (new ACE_Timer_Wheel (ACE_DEFAULT_TIMER_WHEEL_SIZE,
ACE_DEFAULT_TIMER_WHEEL_RESOLUTION,
max_iterations),
- "ACE_Timer_Wheel (preallocated)",
+ ASYS_TEXT ("ACE_Timer_Wheel (preallocated)"),
tq_list),
-1);
@@ -465,7 +465,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_Heap,
- "ACE_Timer_Heap (non-preallocated)",
+ ASYS_TEXT ("ACE_Timer_Heap (non-preallocated)"),
tq_list),
-1);
@@ -473,7 +473,7 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (tq_list,
Timer_Queue_List (new ACE_Timer_Heap (max_iterations, 1),
- "ACE_Timer_Heap (preallocated)",
+ ASYS_TEXT ("ACE_Timer_Heap (preallocated)"),
tq_list),
-1);
@@ -487,7 +487,7 @@ main (int argc, char *argv[])
while (tq_ptr != NULL)
{
- ACE_DEBUG ((LM_DEBUG, "**** starting test of %s\n",
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("**** starting test of %s\n"),
tq_ptr->name_));
test_functionality (tq_ptr->queue_);
test_performance (tq_ptr->queue_,
diff --git a/tests/test_config.h b/tests/test_config.h
index f7f0ee2c29d..0bbad30e82f 100644
--- a/tests/test_config.h
+++ b/tests/test_config.h
@@ -253,7 +253,7 @@ ACE_Test_Output::close (void)
this->output_file_.flush ();
this->output_file_.close ();
}
-#else
+#else /* ACE HAS_WINCE */
#define ACE_START_TEST(NAME) \
const ASYS_TCHAR *program = NAME; \
@@ -262,6 +262,9 @@ ACE_Test_Output::close (void)
#define ACE_END_TEST \
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \
+#undef ACE_DEFAULT_TEST_FILE
+#define ACE_DEFAULT_TEST_FILE L"\\temp\\ace_test_file"
+
#endif /* ACE_HAS_WINCE */
void