summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-16 07:31:00 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-16 07:31:00 +0000
commitf18c619e3fd32fd10bd2094e4a392637a7b28e1b (patch)
treeff00be9a1875bec52f1e1d49930696c081c54eb1 /ace
parent25a0c9ae091fe397acabb4fbb7a9e46dfb846d61 (diff)
downloadATCD-f18c619e3fd32fd10bd2094e4a392637a7b28e1b.tar.gz
CE stuff.
Diffstat (limited to 'ace')
-rw-r--r--ace/ARGV.cpp69
-rw-r--r--ace/ARGV.h28
-rw-r--r--ace/ARGV.i10
-rw-r--r--ace/Activation_Queue.cpp4
-rw-r--r--ace/Get_Opt.cpp18
-rw-r--r--ace/Get_Opt.h12
-rw-r--r--ace/Local_Tokens.cpp106
-rw-r--r--ace/Local_Tokens.h78
-rw-r--r--ace/Local_Tokens.i30
-rw-r--r--ace/Map_Manager.cpp4
-rw-r--r--ace/Message_Queue.cpp14
-rw-r--r--ace/Module.cpp4
-rw-r--r--ace/Module.h10
-rw-r--r--ace/Module.i4
-rw-r--r--ace/OS.cpp19
-rw-r--r--ace/OS.h13
-rw-r--r--ace/OS.i36
-rw-r--r--ace/Parse_Node.cpp40
-rw-r--r--ace/Pipe.cpp5
-rw-r--r--ace/Reactor.cpp20
-rw-r--r--ace/SString.cpp4
-rw-r--r--ace/Service_Config.cpp46
-rw-r--r--ace/Service_Config.h22
-rw-r--r--ace/Service_Config.i2
-rw-r--r--ace/Service_Manager.cpp29
-rw-r--r--ace/Service_Manager.h4
-rw-r--r--ace/Service_Object.cpp4
-rw-r--r--ace/Service_Object.h8
-rw-r--r--ace/Service_Object.i8
-rw-r--r--ace/Service_Repository.cpp10
-rw-r--r--ace/Service_Repository.h10
-rw-r--r--ace/Service_Types.cpp32
-rw-r--r--ace/Service_Types.h32
-rw-r--r--ace/Service_Types.i12
-rw-r--r--ace/Shared_Object.cpp4
-rw-r--r--ace/Shared_Object.h4
-rw-r--r--ace/Stream.cpp4
-rw-r--r--ace/Stream.h4
-rw-r--r--ace/Stream_Modules.cpp20
-rw-r--r--ace/Stream_Modules.h12
-rw-r--r--ace/Svc_Conf.h2
-rw-r--r--ace/Task.cpp2
-rw-r--r--ace/Task_T.cpp2
-rw-r--r--ace/Task_T.h2
-rw-r--r--ace/Token_Manager.cpp10
-rw-r--r--ace/Token_Manager.h4
-rw-r--r--ace/config-WinCE.h5
47 files changed, 445 insertions, 377 deletions
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
index 0f1a68141b0..3e1a1425ede 100644
--- a/ace/ARGV.cpp
+++ b/ace/ARGV.cpp
@@ -44,7 +44,7 @@ ACE_ARGV::string_to_array (void)
if (this->buf_ == 0)
return;
- char *cp = this->buf_;
+ ASYS_TCHAR *cp = this->buf_;
// First pass: count arguments.
@@ -52,7 +52,7 @@ ACE_ARGV::string_to_array (void)
while (*cp != '\0' && *cp != '#')
{
// Skip whitespace..
- while (isspace (*cp))
+ while (ACE_OS::ace_isspace (*cp))
cp++;
// Increment count and move to next whitespace..
@@ -62,7 +62,7 @@ ACE_ARGV::string_to_array (void)
// Grok quotes....
if (*cp == '\'' || *cp == '"')
{
- char quote = *cp;
+ ASYS_TCHAR quote = *cp;
// Scan past the string..
for (cp++; *cp != '\0' && *cp != quote; cp++)
@@ -72,7 +72,7 @@ ACE_ARGV::string_to_array (void)
if (*cp == '\0')
{
ACE_ERROR ((LM_ERROR,
- "unmatched %c detected\n", quote));
+ ASYS_TEXT ("unmatched %c detected\n"), quote));
this->argc_--;
break;
}
@@ -80,28 +80,28 @@ ACE_ARGV::string_to_array (void)
cp++;
}
else // Skip over non-whitespace....
- while (*cp != '\0' && !isspace (*cp))
+ while (*cp != '\0' && !ACE_OS::ace_isspace (*cp))
cp++;
}
// Second pass: copy arguments..
- char arg[BUFSIZ];
+ ASYS_TCHAR arg[BUFSIZ];
// Make a new argv vector of argc + 1 elements.
- ACE_NEW (this->argv_, char *[this->argc_ + 1]);
+ ACE_NEW (this->argv_, ASYS_TCHAR *[this->argc_ + 1]);
- char *ptr = this->buf_;
+ ASYS_TCHAR *ptr = this->buf_;
for (size_t i = 0; i < this->argc_; i++)
{
// Skip whitespace..
- while (isspace (*ptr))
+ while (ACE_OS::ace_isspace (*ptr))
ptr++;
// Copy next argument and move to next whitespace..
if (*ptr == '\'' || *ptr == '"')
{
- char quote = *ptr++;
+ ASYS_TCHAR quote = *ptr++;
for (cp = arg;
*ptr != '\0' && *ptr != quote;
@@ -116,7 +116,7 @@ ACE_ARGV::string_to_array (void)
else
{
for (cp = arg;
- *ptr && !isspace (*ptr);
+ *ptr && !ACE_OS::ace_isspace (*ptr);
ptr++, cp++)
if (unsigned (cp - arg) < sizeof arg)
*cp = *ptr;
@@ -124,10 +124,13 @@ ACE_ARGV::string_to_array (void)
}
// Check for environment variable substitution here.
+#if !defined (ACE_HAS_WINCE)
+ // WinCE doesn't have environment variables so we just skip it.
if (this->substitute_env_args_)
ACE_ALLOCATOR (this->argv_[i],
ACE::strenvdup (arg));
else
+#endif /* !ACE_HAS_WINCE */
ACE_ALLOCATOR (this->argv_[i],
ACE_OS::strdup (arg));
}
@@ -136,7 +139,7 @@ ACE_ARGV::string_to_array (void)
}
-ACE_ARGV::ACE_ARGV (const char buf[],
+ACE_ARGV::ACE_ARGV (const ASYS_TCHAR buf[],
int substitute_env_args)
: substitute_env_args_ (substitute_env_args),
state_ (TO_PTR_ARRAY),
@@ -145,20 +148,20 @@ ACE_ARGV::ACE_ARGV (const char buf[],
buf_ (0),
length_ (0)
{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV char[] to char *[]");
+ ACE_TRACE ("ACE_ARGV::ACE_ARGV ASYS_TCHAR[] to ASYS_TCHAR *[]");
if (buf == 0 || buf[0] == 0)
return;
// Make an internal copy of the string
- ACE_NEW (this->buf_, char[ACE_OS::strlen (buf) + 1]);
+ ACE_NEW (this->buf_, ASYS_TCHAR[ACE_OS::strlen (buf) + 1]);
ACE_OS::strcpy (this->buf_, buf);
// Create this->argv_
this->string_to_array ();
}
-ACE_ARGV::ACE_ARGV (char *argv[],
+ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
int substitute_env_args)
: substitute_env_args_ (substitute_env_args),
state_ (TO_STRING),
@@ -167,7 +170,7 @@ ACE_ARGV::ACE_ARGV (char *argv[],
buf_ (0),
length_ (0)
{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV char*[] to char[]");
+ ACE_TRACE ("ACE_ARGV::ACE_ARGV ASYS_TCHAR*[] to ASYS_TCHAR[]");
if (argv == 0 || argv[0] == 0)
return;
@@ -178,7 +181,7 @@ ACE_ARGV::ACE_ARGV (char *argv[],
for (int i = 0; argv[i] != 0; i++)
{
- char *temp;
+ ASYS_TCHAR *temp;
// Account for environment variables.
if (this->substitute_env_args_
@@ -195,14 +198,14 @@ ACE_ARGV::ACE_ARGV (char *argv[],
// Step through all argv params and copy each one into buf; separate
// each param with white space.
- ACE_NEW (this->buf_, char[buf_len + 1]);
+ ACE_NEW (this->buf_, ASYS_TCHAR[buf_len + 1]);
- char *end = this->buf_;
+ ASYS_TCHAR *end = this->buf_;
int j;
for (j = 0; argv[j] != 0; j++)
{
- char *temp;
+ ASYS_TCHAR *temp;
// Account for environment variables.
if (this->substitute_env_args_
@@ -237,7 +240,7 @@ ACE_ARGV::ACE_ARGV (int substitute_env_args)
}
int
-ACE_ARGV::add (const char *next_arg)
+ACE_ARGV::add (const ASYS_TCHAR *next_arg)
{
// Only allow this to work in the "iterative" verion -- the
// ACE_ARGVs created with the one argument constructor.
@@ -245,8 +248,8 @@ ACE_ARGV::add (const char *next_arg)
return -1;
// Put the new argument at the end of the queue
- if (this->queue_.enqueue_tail ((char *) next_arg) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Can't add more to ARGV queue"), -1);
+ if (this->queue_.enqueue_tail ((ASYS_TCHAR *) next_arg) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Can't add more to ARGV queue")), -1);
this->length_ += ACE_OS::strlen (next_arg);
@@ -297,13 +300,13 @@ ACE_ARGV::create_buf_from_queue (void)
delete [] this->buf_;
- ACE_NEW_RETURN (this->buf_, char[this->length_ + this->argc_], -1);
+ ACE_NEW_RETURN (this->buf_, ASYS_TCHAR[this->length_ + this->argc_], -1);
// Get an iterator over the queue
- ACE_Unbounded_Queue_Iterator<char *> iter (this->queue_);
+ ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *> iter (this->queue_);
- char **arg;
- char *ptr = this->buf_;
+ ASYS_TCHAR **arg;
+ ASYS_TCHAR *ptr = this->buf_;
size_t len;
int more = 0;
@@ -334,11 +337,11 @@ ACE_ARGV::create_buf_from_queue (void)
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Queue<char *>;
-template class ACE_Unbounded_Queue_Iterator<char *>;
-template class ACE_Node<char *>;
+template class ACE_Unbounded_Queue<ASYS_TCHAR *>;
+template class ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *>;
+template class ACE_Node<ASYS_TCHAR *>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Unbounded_Queue<char *>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<char *>
-#pragma instantiate ACE_Node<char *>
+#pragma instantiate ACE_Unbounded_Queue<ASYS_TCHAR *>
+#pragma instantiate ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *>
+#pragma instantiate ACE_Node<ASYS_TCHAR *>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/ARGV.h b/ace/ARGV.h
index d64263ec960..f7b1a854f52 100644
--- a/ace/ARGV.h
+++ b/ace/ARGV.h
@@ -29,14 +29,14 @@ class ACE_Export ACE_ARGV
// environment variable substitutions if necessary.
public:
// = Initialization and termination.
- ACE_ARGV (const char buf[], int substitute_env_args = 1);
+ ACE_ARGV (const ASYS_TCHAR buf[], int substitute_env_args = 1);
// Converts <buf> into an <argv>-style vector of strings. If
// <substitute_env_args> is enabled then we'll substitute the
// environment variables for each $ENV encountered in the string.
// The subscript and argv() operations are not allowed on an
// ACE_ARGV created this way.
- ACE_ARGV (char *argv[], int substitute_env_args = 1);
+ ACE_ARGV (ASYS_TCHAR *argv[], int substitute_env_args = 1);
// Converts <argv> into a linear string. If <substitute_env_args>
// is enabled then we'll substitute the environment variables for
// each $ENV encountered in the string.
@@ -44,7 +44,7 @@ public:
// this way.
ACE_ARGV (int substitute_env_args = 1);
- // Entry point for creating an char *[] command line iteratively
+ // Entry point for creating an ASYS_TCHAR *[] command line iteratively
// via the add() method. The argv() and buf() method calls are
// allowed, and the result is recreated when called multiple times.
// The subscript operator is not allowed.
@@ -53,10 +53,10 @@ public:
// Destructor.
// = Accessor arguments.
- const char *operator[] (size_t index);
+ const ASYS_TCHAR *operator[] (size_t index);
// Returns the <index>th string in the ARGV array.
- char **argv (void);
+ ASYS_TCHAR **argv (void);
// Returns the <argv> array. Caller should not delete this memory
// since the <ARGV> destructor will delete it. If the caller modifies
// the array in the iterative mode, the changes are not saved to the
@@ -65,7 +65,7 @@ public:
size_t argc (void) const;
// Returns <argc>.
- const char *buf (void);
+ const ASYS_TCHAR *buf (void);
// Returns the <buf>. Caller should not delete this memory since
// the <ARGV> destructor will delete it.
@@ -75,7 +75,7 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
- int add (const char *next_arg);
+ int add (const ASYS_TCHAR *next_arg);
// Add another argument. This only works in the ITERATIVE state.
int state (void) const;
@@ -85,11 +85,11 @@ public:
enum States
{
TO_STRING = 1,
- // ACE_ARGV converts buf[] to char *argv[]
+ // ACE_ARGV converts buf[] to ASYS_TCHAR *argv[]
TO_PTR_ARRAY = 2,
- // ACE_ARGV converts char *argv[] to buf[]
+ // ACE_ARGV converts ASYS_TCHAR *argv[] to buf[]
ITERATIVE = 3
- // Builds buf[] or char *argv[] iteratively with add()
+ // Builds buf[] or ASYS_TCHAR *argv[] iteratively with add()
};
private:
@@ -98,7 +98,7 @@ private:
// Creates buf_ from the queue, deletes previous buf_.
void string_to_array (void);
- // Converts buf_ into the char *argv[] format.
+ // Converts buf_ into the ASYS_TCHAR *argv[] format.
int substitute_env_args_;
// Replace args with environment variable values?
@@ -109,17 +109,17 @@ private:
size_t argc_;
// Number of arguments in the ARGV array.
- char **argv_;
+ ASYS_TCHAR **argv_;
// The array of string arguments.
- char *buf_;
+ ASYS_TCHAR *buf_;
// Buffer containing the <argv> contents.
size_t length_;
// Total length of the arguments in the queue, not counting
// separating spaces
- ACE_Unbounded_Queue<char *> queue_;
+ ACE_Unbounded_Queue<ASYS_TCHAR *> queue_;
// Queue which keeps user supplied arguments. This is only
// active in the "iterative" mode.
};
diff --git a/ace/ARGV.i b/ace/ARGV.i
index 0bf928c54b8..6c662efe7ae 100644
--- a/ace/ARGV.i
+++ b/ace/ARGV.i
@@ -20,7 +20,7 @@ ACE_ARGV::state(void) const
}
// Return the arguments in a space-separated string
-ACE_INLINE const char *
+ACE_INLINE const ASYS_TCHAR *
ACE_ARGV::buf (void)
{
ACE_TRACE ("ACE_ARGV::buf");
@@ -28,11 +28,11 @@ ACE_ARGV::buf (void)
if (this->buf_ == 0 && this->state_ == ITERATIVE)
this->create_buf_from_queue();
- return (const char *)this->buf_;
+ return (const ASYS_TCHAR *)this->buf_;
}
// Return the arguments in an entry-per-argument array
-ACE_INLINE char **
+ACE_INLINE ASYS_TCHAR **
ACE_ARGV::argv (void)
{
ACE_TRACE ("ACE_ARGV::argv");
@@ -51,7 +51,7 @@ ACE_ARGV::argv (void)
}
// Subscript operator.
-ACE_INLINE const char *
+ACE_INLINE const ASYS_TCHAR *
ACE_ARGV::operator[] (size_t i)
{
ACE_TRACE ("ACE_ARGV::operator[]");
@@ -60,7 +60,7 @@ ACE_ARGV::operator[] (size_t i)
if (i >= this->argc_)
return 0;
- return (const char *)(this->argv()[i]);
+ return (const ASYS_TCHAR *)(this->argv()[i]);
}
diff --git a/ace/Activation_Queue.cpp b/ace/Activation_Queue.cpp
index 31c6a36aaab..1dac80cdea9 100644
--- a/ace/Activation_Queue.cpp
+++ b/ace/Activation_Queue.cpp
@@ -12,9 +12,9 @@ ACE_Activation_Queue::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- "delete_queue_ = %d\n",
+ ASYS_TEXT ("delete_queue_ = %d\n"),
this->delete_queue_));
- ACE_DEBUG ((LM_INFO,"queue_: \n"));
+ ACE_DEBUG ((LM_INFO, ASYS_TEXT ("queue_: \n")));
if (this->queue_)
this->queue_->dump();
else
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
index 91be671ef0e..cf72d8a5bc4 100644
--- a/ace/Get_Opt.cpp
+++ b/ace/Get_Opt.cpp
@@ -44,8 +44,8 @@
ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt)
ACE_Get_Opt::ACE_Get_Opt (int argc,
- char **argv,
- const char *optstring,
+ ASYS_TCHAR **argv,
+ const ASYS_TCHAR *optstring,
int skip,
int report_errors)
: optarg (0),
@@ -82,7 +82,7 @@ ACE_Get_Opt::operator () (void)
}
int opt; // Character checked for validity.
- const char *oli; // Option letter index.
+ const ASYS_TCHAR *oli; // Option letter index.
if (this->nextchar_ == 0 || *this->nextchar_ == '\0')
{
@@ -91,7 +91,7 @@ ACE_Get_Opt::operator () (void)
if (this->optind >= this->argc_
|| *(this->nextchar_ = this->argv_[this->optind]) != '-')
{
- this->nextchar_ = "";
+ this->nextchar_ = ASYS_TEXT ("");
return EOF;
}
@@ -100,7 +100,7 @@ ACE_Get_Opt::operator () (void)
{
// Found "--".
++this->optind;
- this->nextchar_ = "";
+ this->nextchar_ = ASYS_TEXT ("");
return EOF;
}
}
@@ -120,7 +120,7 @@ ACE_Get_Opt::operator () (void)
++this->optind;
if (this->opterr && *this->optstring_ != ':')
- ACE_ERROR ((LM_ERROR, "%s: illegal option -- %c\n",
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%s: illegal option -- %c\n"),
this->argv_[0], opt));
return '?';
}
@@ -138,20 +138,20 @@ ACE_Get_Opt::operator () (void)
else if (this->argc_ <= ++this->optind)
{
// No arg.
- this->nextchar_ = "";
+ this->nextchar_ = ASYS_TEXT ("");
if (*this->optstring_ == ':')
return ':';
if (this->opterr)
ACE_ERROR ((LM_ERROR,
- "%s: option requires an argument -- %c\n",
+ ASYS_TEXT ("%s: option requires an argument -- %c\n"),
this->argv_[0], opt));
return '?';
}
else // White space.
this->optarg = this->argv_[this->optind];
- this->nextchar_ = "";
+ this->nextchar_ = ASYS_TEXT ("");
++this->optind;
}
diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h
index 56a715ebc87..fe31b26b4e7 100644
--- a/ace/Get_Opt.h
+++ b/ace/Get_Opt.h
@@ -28,8 +28,8 @@ class ACE_Export ACE_Get_Opt
// This is a C++ wrapper for getopt(3c).
public:
ACE_Get_Opt (int argc,
- char **argv,
- const char *optstring,
+ ASYS_TCHAR **argv,
+ const ASYS_TCHAR *optstring,
int skip_argv0 = 1,
int report_errors = 0);
// Initialize the internal data when the first call is made. Start
@@ -74,7 +74,7 @@ public:
// = Public data members (should be hidden...).
- char *optarg;
+ ASYS_TCHAR *optarg;
// For communication from <operator()> to the caller. When
// <operator()> finds an option that takes an argument, the argument
// value is returned here.
@@ -98,7 +98,7 @@ public:
int argc_;
// Holds the <argc> count.
- char **argv_;
+ ASYS_TCHAR **argv_;
// Holds the <argv> pointer.
void dump (void) const;
@@ -109,7 +109,7 @@ public:
private:
- char *nextchar_;
+ ASYS_TCHAR *nextchar_;
// The next char to be scanned in the option-element in which the
// last option character we returned was found. This allows us to
// pick up the scan where we left off.
@@ -117,7 +117,7 @@ private:
// If this is zero, or a null string, it means resume the scan
// by advancing to the next <argv>-element.
- const char *optstring_;
+ const ASYS_TCHAR *optstring_;
// Holds the option string.
};
diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp
index ee17b45ed7a..6b914856949 100644
--- a/ace/Local_Tokens.cpp
+++ b/ace/Local_Tokens.cpp
@@ -16,8 +16,8 @@ ACE_Tokens::dump (void) const
ACE_TRACE ("ACE_Tokens::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Tokens::dump:\n")
- " reference_cont_ = %d\n"
- " token_name_ = %s\n",
+ ASYS_TEXT (" reference_cont_ = %d\n")
+ ASYS_TEXT (" token_name_ = %s\n"),
reference_count_, token_name_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiters_\n")));
this->waiters_.dump ();
@@ -49,9 +49,9 @@ ACE_TPQ_Entry::dump (void) const
ACE_TRACE ("ACE_TPQ_Entry::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- "ACE_TPQ_Entry::dump:\n"
- " nesting_level_ = %d\n"
- " client_id_ = %s\n",
+ ASYS_TEXT ("ACE_TPQ_Entry::dump:\n")
+ ASYS_TEXT (" nesting_level_ = %d\n")
+ ASYS_TEXT (" client_id_ = %s\n"),
nesting_level_,
client_id_));
@@ -66,7 +66,7 @@ ACE_TPQ_Entry::dump (void) const
}
ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
- const char *client_id)
+ const ASYS_TCHAR *client_id)
: cond_var_ (lock_),
next_ (0),
// This const typecast is safe.
@@ -81,12 +81,12 @@ ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
else
{
// Just make sure we have enough space.
- char host_name[MAXHOSTNAMELEN];
- char name[(sizeof host_name / sizeof (char)) + 256];
+ ASYS_TCHAR host_name[MAXHOSTNAMELEN];
+ ASYS_TCHAR name[(sizeof host_name / sizeof (ASYS_TCHAR)) + 256];
ACE_OS::hostname (host_name, sizeof host_name);
ACE_OS::sprintf (name,
- "/%s/%u/%u",
+ ASYS_TEXT ("/%s/%u/%u"),
host_name,
ACE_OS::getpid (),
ACE_Thread::self ());
@@ -129,7 +129,7 @@ ACE_TPQ_Entry::operator= (const ACE_TPQ_Entry& rhs)
}
void
-ACE_TPQ_Entry::client_id (const char *id)
+ACE_TPQ_Entry::client_id (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_TPQ_Entry::client_id");
@@ -141,7 +141,7 @@ ACE_TPQ_Entry::client_id (const char *id)
if (n >= ACE_MAXCLIENTIDLEN)
n = ACE_MAXCLIENTIDLEN - 1;
- ACE_OS::strncpy (this->client_id_, (char *) id, n);
+ ACE_OS::strncpy (this->client_id_, (ASYS_TCHAR *) id, n);
this->client_id_[ACE_MAXCLIENTIDLEN - 1] = '\0';
}
@@ -155,15 +155,15 @@ ACE_TSS_TPQ_Entry::dump (void) const
ACE_TRACE ("ACE_TSS_TPQ_Entry::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TSS_TPQ_Entry::dump:\n")
- " client_id_ = %s\n",
- client_id_ == 0 ? "0" : client_id_));
+ ASYS_TEXT (" client_id_ = %s\n"),
+ client_id_ == 0 ? ASYS_TEXT ("0") : client_id_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
ACE_TPQ_ENTRY::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_TSS_TPQ_Entry::ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const char *client_id)
+ const ASYS_TCHAR *client_id)
: proxy_ (proxy),
client_id_ (client_id)
{
@@ -229,7 +229,7 @@ ACE_TPQ_Iterator::dump (void) const
ACE_TRACE ("ACE_TPQ_Iterator::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TPQ_Iterator::dump:\n")
- " current_ = %d\n",
+ ASYS_TEXT (" current_ = %d\n"),
(long) this->current_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("head_ and tail_\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -245,7 +245,7 @@ ACE_Token_Proxy_Queue::dump (void) const
ACE_TRACE ("ACE_Token_Proxy_Queue::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Proxy_Queue::dump:\n")
- " size_ = %d\n",
+ ASYS_TEXT (" size_ = %d\n"),
size_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("head_ and tail_\n")));
if (this->head_ != 0)
@@ -330,12 +330,12 @@ ACE_Token_Proxy_Queue::dequeue (void)
--this->size_;
if (this->head_ == 0 && this->size_ != 0)
- ACE_ERROR ((LM_ERROR, "incorrect size = %d\n", this->size_));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("incorrect size = %d\n"), this->size_));
}
/*
int
-ACE_Token_Proxy_Queue::member (const char *id)
+ACE_Token_Proxy_Queue::member (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_Token_Proxy_Queue::member");
@@ -413,7 +413,7 @@ ACE_Mutex_Token::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_Mutex_Token::ACE_Mutex_Token (const char *name)
+ACE_Mutex_Token::ACE_Mutex_Token (const ASYS_TCHAR *name)
{
ACE_TRACE ("ACE_Mutex_Token::ACE_Mutex_Token");
@@ -585,7 +585,7 @@ ACE_Mutex_Token::release (ACE_TPQ_Entry *caller)
int
ACE_Mutex_Token::owners (OWNER_STACK &stack,
- const char *id)
+ const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::owners");
if (this->owner () != 0)
@@ -601,7 +601,7 @@ ACE_Mutex_Token::owners (OWNER_STACK &stack,
}
int
-ACE_Mutex_Token::is_waiting_for (const char *id)
+ACE_Mutex_Token::is_waiting_for (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_waiting_for");
// If there is no owner, or <id> is the owner, return false.
@@ -623,7 +623,7 @@ ACE_Mutex_Token::is_waiting_for (const char *id)
}
int
-ACE_Mutex_Token::is_owner (const char *id)
+ACE_Mutex_Token::is_owner (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_owner");
// If there is an owner, return whether it is <id>.
@@ -644,7 +644,7 @@ ACE_RW_Token::dump (void) const
ACE_TRACE ("ACE_RW_Token::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_RW_Token::dump:\n")
- "num_writers_ = %d\n", num_writers_));
+ ASYS_TEXT ("num_writers_ = %d\n"), num_writers_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("lock_\n")));
this->lock_.dump ();
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
@@ -653,7 +653,7 @@ ACE_RW_Token::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_RW_Token::ACE_RW_Token (const char *name)
+ACE_RW_Token::ACE_RW_Token (const ASYS_TCHAR *name)
: num_writers_ (0)
{
ACE_TRACE ("ACE_RW_Token::ACE_RW_Token");
@@ -921,7 +921,7 @@ ACE_RW_Token::notify_new_owner (ACE_TPQ_Entry *old_owner)
int
ACE_RW_Token::owners (OWNER_STACK &stack,
- const char *id)
+ const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_RW_Token::owners");
@@ -965,7 +965,7 @@ ACE_RW_Token::owners (OWNER_STACK &stack,
}
int
-ACE_RW_Token::is_waiting_for (const char *id)
+ACE_RW_Token::is_waiting_for (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_RW_Token::is_waiting_for");
// If there is no owner, or <id> is the owner, return false.
@@ -988,7 +988,7 @@ ACE_RW_Token::is_waiting_for (const char *id)
}
int
-ACE_RW_Token::is_owner (const char *id)
+ACE_RW_Token::is_owner (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_owner");
// If there is no owner, return false.
@@ -1027,9 +1027,9 @@ ACE_Token_Proxy::dump (void) const
ACE_TRACE ("ACE_Token_Proxy::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Proxy::dump:\n")
- " type = %d\n"
- " ignore_deadlock_ = %d\n"
- " debug_ = %d\n",
+ ASYS_TEXT (" type = %d\n")
+ ASYS_TEXT (" ignore_deadlock_ = %d\n")
+ ASYS_TEXT (" debug_ = %d\n"),
(int) this->type (), ignore_deadlock_, debug_));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("mutex_, and waiter_\n")));
@@ -1041,34 +1041,34 @@ ACE_Token_Proxy::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-const char*
+const ASYS_TCHAR*
ACE_Token_Proxy::client_id (void) const
{
ACE_TRACE ("ACE_Token_Proxy::client_id");
// Thread-specific.
- const char *id = this->waiter_->client_id ();
+ const ASYS_TCHAR *id = this->waiter_->client_id ();
if (id == 0)
- return "ERROR NO CLIENT ID";
+ return ASYS_TEXT ("ERROR NO CLIENT ID");
else
return id;
}
void
-ACE_Token_Proxy::client_id (const char *client_id)
+ACE_Token_Proxy::client_id (const ASYS_TCHAR *client_id)
{
ACE_TRACE ("ACE_Token_Proxy::client_id");
this->waiter_->client_id (client_id);
}
-const char *
+const ASYS_TCHAR *
ACE_Token_Proxy::owner_id (void)
{
ACE_TRACE ("ACE_Token_Proxy::owner_id");
return this->token_->owner_id ();
}
-const char *
+const ASYS_TCHAR *
ACE_Token_Proxy::name (void) const
{
ACE_TRACE ("ACE_Token_Proxy::owner_id");
@@ -1105,7 +1105,7 @@ ACE_Token_Proxy::~ACE_Token_Proxy (void)
}
int
-ACE_Token_Proxy::open (const char *token_name,
+ACE_Token_Proxy::open (const ASYS_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -1116,12 +1116,12 @@ ACE_Token_Proxy::open (const char *token_name,
this->debug_ = debug;
// Used in case a name was not specified.
- char name[BUFSIZ];
+ ASYS_TCHAR name[BUFSIZ];
// We must have a name.
if (token_name == 0)
{
- ACE_OS::sprintf (name, "token %d", this);
+ ACE_OS::sprintf (name, ASYS_TEXT ("token %d"), this);
token_name = name;
}
@@ -1133,7 +1133,7 @@ ACE_Token_Proxy::open (const char *token_name,
if (this->token_ == 0)
{
errno = ENOMEM;
- ACE_ERROR_RETURN ((LM_ERROR, "Can't allocate mutex"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Can't allocate mutex")), -1);
}
return 0;
@@ -1148,7 +1148,7 @@ ACE_Token_Proxy::acquire (int notify,
if (this->token_ == 0)
{
errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR, "Not open.\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Not open.\n")), -1);
}
// Make sure no one calls our token_acquired until we have a chance
@@ -1178,8 +1178,8 @@ ACE_Token_Proxy::acquire (int notify,
case EWOULDBLOCK :
if (this->debug_)
ACE_DEBUG ((LM_DEBUG,
- "(%t) waiting for %s, owner is %s, "
- "total waiters == %d\n",
+ ASYS_TEXT ("(%t) waiting for %s, owner is %s, ")
+ ASYS_TEXT ("total waiters == %d\n"),
this->name (),
this->token_->owner_id (),
token_->no_of_waiters ()));
@@ -1199,7 +1199,7 @@ ACE_Token_Proxy::acquire (int notify,
default :
waiter_->cond_var_.mutex ().release ();
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n","Token Proxy acquire."), -1);
+ ASYS_TEXT ("%p\n"),ASYS_TEXT ("Token Proxy acquire.")), -1);
}
}
else
@@ -1221,7 +1221,7 @@ ACE_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
if (this->token_ == 0)
{
errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR, "Not open.\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Not open.\n")), -1);
}
this->waiter_->sleep_hook (sleep_hook);
@@ -1237,7 +1237,7 @@ ACE_Token_Proxy::renew (int requeue_position,
if (this->token_ == 0)
{
errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR, "Not open.\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Not open.\n")), -1);
}
// Make sure no one calls our token_acquired until we have a chance
@@ -1249,7 +1249,7 @@ ACE_Token_Proxy::renew (int requeue_position,
// check for error
if (errno != EWOULDBLOCK)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p renew failed\n", "ACE_Token_Proxy"), -1);
+ ASYS_TEXT ("%p renew failed\n"), ASYS_TEXT ("ACE_Token_Proxy")), -1);
if (this->debug_)
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) renew blocking for %s, owner is %s\n"),
@@ -1301,8 +1301,8 @@ ACE_Token_Proxy::handle_options (ACE_Synch_Options &options,
// We come here if a timeout occurs or some serious
// ACE_Condition object error.
cv.mutex ().release ();
- ACE_ERROR_RETURN ((LM_ERROR, "condition variable wait"
- " bombed."), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("condition variable wait")
+ ASYS_TEXT (" bombed.")), -1);
}
if (this->debug_)
@@ -1331,7 +1331,7 @@ ACE_Token_Proxy::release (ACE_Synch_Options &)
// Release failed.
this->token_->remove (this->waiter_);
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %p.\n"), "release failed"));
+ ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %p.\n"), ASYS_TEXT ("release failed")));
return -1;
}
else
@@ -1377,7 +1377,7 @@ ACE_Token_Proxy::token_acquired (ACE_TPQ_Entry *e)
// ************************************************************
-ACE_Token_Name::ACE_Token_Name (const char *token_name)
+ACE_Token_Name::ACE_Token_Name (const ASYS_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Name::ACE_Token_Name");
this->name (token_name);
@@ -1400,8 +1400,8 @@ ACE_Token_Name::dump (void) const
ACE_TRACE ("ACE_Token_Name::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Name::dump:\n")
- " token_name_ = %s\n",
- token_name_ == 0 ? "no name" : token_name_));
+ ASYS_TEXT (" token_name_ = %s\n"),
+ token_name_ == 0 ? ASYS_TEXT ("no name") : token_name_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
index 40536b09396..704eab630fd 100644
--- a/ace/Local_Tokens.h
+++ b/ace/Local_Tokens.h
@@ -86,7 +86,7 @@ public:
// Null constructor.
ACE_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const char *client_id);
+ const ASYS_TCHAR *client_id);
// Construction.
ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs);
@@ -107,10 +107,10 @@ public:
void nesting_level (int delta);
// = Set/get client_id of the entry.
- const char *client_id (void) const;
- void client_id (const char *);
+ const ASYS_TCHAR *client_id (void) const;
+ void client_id (const ASYS_TCHAR *);
- int equal_client_id (const char *id);
+ int equal_client_id (const ASYS_TCHAR *id);
// Returns 1 if <id> == client id. Does not check for <id> == 0.
void set (void (*sleep_hook)(void *));
@@ -150,7 +150,7 @@ private:
void *arg_;
// Arg.
- char client_id_[ACE_MAXCLIENTIDLEN];
+ ASYS_TCHAR client_id_[ACE_MAXCLIENTIDLEN];
// Client id.
void (*sleep_hook_)(void *);
@@ -175,7 +175,7 @@ class ACE_Export ACE_TSS_TPQ_Entry : public ACE_TPQ_ENTRY
// Not a public interface.
public:
ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const char *client_id);
+ const ASYS_TCHAR *client_id);
// These are passed to the constructor of ACE_TPQ_Entry in
// make_TSS_TYPE
@@ -204,7 +204,7 @@ private:
// make_TSS_TYPE
const ACE_Token_Proxy *proxy_;
// Proxy.
- const char *client_id_;
+ const ASYS_TCHAR *client_id_;
// Client_id.
};
@@ -271,7 +271,7 @@ public:
const ACE_TPQ_Entry* head (void);
// Top of the queue.
-// int member (const char *id);
+// int member (const ASYS_TCHAR *id);
// Is this id in the waiter list?
void dequeue (void);
@@ -348,14 +348,14 @@ public:
typedef ACE_Unbounded_Stack<ACE_TPQ_Entry *> OWNER_STACK;
// Stack of owners.
- virtual int owners (OWNER_STACK &o, const char *id) = 0;
+ virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id) = 0;
// Returns a stack of the current owners. Returns -1 on error, 0 on
// success. If <id> is non-zero, returns 1 if id is an owner.
- virtual int is_waiting_for (const char *id) = 0;
+ virtual int is_waiting_for (const ASYS_TCHAR *id) = 0;
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const char *id) = 0;
+ virtual int is_owner (const ASYS_TCHAR *id) = 0;
// Returns 1 if <id> is an owner of this token. 0 otherwise.
virtual ACE_Token_Proxy_Queue *waiters (void);
@@ -365,10 +365,10 @@ public:
// Return the number of proxies that are currently waiting to get
// the token.
- const char *owner_id (void);
+ const ASYS_TCHAR *owner_id (void);
// The current owner.
- const char* name (void);
+ const ASYS_TCHAR* name (void);
// Token name.
// = Reference counting. These are only called by the
@@ -412,7 +412,7 @@ protected:
ACE_Token_Proxy_Queue waiters_;
// List of client's owning and waiting the token.
- char token_name_[ACE_MAXTOKENNAMELEN];
+ ASYS_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
// Name of token.
};
@@ -436,7 +436,7 @@ class ACE_Export ACE_Mutex_Token : public ACE_Tokens
// order as other threads release the token (SunOS 5.x mutexes
// don't strictly enforce an acquisition order).
public:
- ACE_Mutex_Token (const char* name);
+ ACE_Mutex_Token (const ASYS_TCHAR* name);
// life
virtual ~ACE_Mutex_Token (void);
@@ -491,14 +491,14 @@ public:
virtual int type (void) const;
// Returns ACE_Tokens::MUTEX.
- virtual int owners (OWNER_STACK &o, const char *id);
+ virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id);
// Returns a stack of the current owners. Returns -1 on error, 0 on
// success. If <id> is non-zero, returns 1 if id is an owner.
- virtual int is_waiting_for (const char *id);
+ virtual int is_waiting_for (const ASYS_TCHAR *id);
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const char *id);
+ virtual int is_owner (const ASYS_TCHAR *id);
// Returns 1 if <id> is an owner of this token. 0 otherwise.
private:
@@ -524,7 +524,7 @@ class ACE_Export ACE_RW_Token : public ACE_Tokens
// other threads release the token (SunOS 5.x mutexes don't strictly
// enforce an acquisition order).
public:
- ACE_RW_Token (const char* name);
+ ACE_RW_Token (const ASYS_TCHAR* name);
// Life.
virtual ~ACE_RW_Token (void);
@@ -582,14 +582,14 @@ public:
virtual int type (void) const;
// Returns READER or WRITER.
- virtual int owners (OWNER_STACK &o, const char *id);
+ virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id);
// Returns a stack of the current owners. Returns -1 on error, 0 on
// success. If <id> is non-zero, returns 1 if id is an owner.
- virtual int is_waiting_for (const char *id);
+ virtual int is_waiting_for (const ASYS_TCHAR *id);
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const char *id);
+ virtual int is_owner (const ASYS_TCHAR *id);
// Returns 1 if <id> is an owner of this token. 0 otherwise.
protected:
@@ -616,7 +616,7 @@ class ACE_Token_Name
// needed. For instance, we may choose to identify tokens by
// name and *type* in the future.
public:
- ACE_Token_Name (const char *token_name = 0);
+ ACE_Token_Name (const ASYS_TCHAR *token_name = 0);
// Construction.
ACE_Token_Name (const ACE_Token_Name &rhs);
@@ -631,17 +631,17 @@ public:
int operator== (const ACE_Token_Name &rhs) const;
// Comparison.
- const char *name (void) const;
+ const ASYS_TCHAR *name (void) const;
// Token name.
- void name (const char *new_name);
+ void name (const ASYS_TCHAR *new_name);
// Token name.
void dump (void) const;
// Dump the state of the class.
private:
- char token_name_[ACE_MAXTOKENNAMELEN];
+ ASYS_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
// Name of the token.
};
@@ -684,7 +684,7 @@ public:
virtual ~ACE_Token_Proxy (void);
// Death.
- virtual int open (const char *name,
+ virtual int open (const ASYS_TCHAR *name,
int ignore_deadlock = 0,
int debug = 0);
// <name> is the string uniquely identifying the token.
@@ -746,16 +746,16 @@ public:
// = Utility methods.
- virtual const char *client_id (void) const;
+ virtual const ASYS_TCHAR *client_id (void) const;
// Get the client id of the proxy. This is implemented as
// thread-specific data.
- virtual void client_id (const char *client_id);
+ virtual void client_id (const ASYS_TCHAR *client_id);
// Set the client_id for the calling thread. I strongly recommend
// that this not be used unless you really know what you're doing.
// I use this in the Token Server, and it caused many headaches.
- virtual const char *name (void) const;
+ virtual const ASYS_TCHAR *name (void) const;
// Return the name of the token. This is important for use within
// the token servers (local and remote) as well as with token
// collections. So, all derivations of ACE_Token_Proxy must be able to
@@ -772,7 +772,7 @@ public:
// This is called when a queued (waiting) proxy is removed from the
// waiters list and given the token.
- virtual const char *owner_id (void);
+ virtual const ASYS_TCHAR *owner_id (void);
// the client id of the current token holder
virtual ACE_Token_Proxy *clone (void) const = 0;
@@ -808,7 +808,7 @@ protected:
ACE_TSS_TPQ_Entry waiter_;
// Waiter info used for asynchronous transactions.
- virtual ACE_Tokens *create_token (const char *name) = 0;
+ virtual ACE_Tokens *create_token (const ASYS_TCHAR *name) = 0;
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
};
@@ -850,7 +850,7 @@ public:
void dump (void) const;
// Dump the state of the class.
- virtual ACE_Tokens *create_token (const char *) { return 0; }
+ virtual ACE_Tokens *create_token (const ASYS_TCHAR *) { return 0; }
// Do not allow the Token Manager to create us.
};
@@ -875,7 +875,7 @@ class ACE_Export ACE_Local_Mutex : public ACE_Token_Proxy
// etc. are defined in ACE_Token_Proxy. The semantics for
// ACE_Local_Mutex are that of a mutex.
public:
- ACE_Local_Mutex (const char *token_name = 0,
+ ACE_Local_Mutex (const ASYS_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -889,7 +889,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const char *name);
+ virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
@@ -922,7 +922,7 @@ class ACE_Export ACE_Local_RLock : public ACE_Token_Proxy
public:
// = Initialization and termination.
- ACE_Local_RLock (const char *token_name = 0,
+ ACE_Local_RLock (const ASYS_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -939,7 +939,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const char *name);
+ virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
@@ -972,7 +972,7 @@ class ACE_Export ACE_Local_WLock : public ACE_Token_Proxy
public:
// = Initialization and termination.
- ACE_Local_WLock (const char *token_name = 0,
+ ACE_Local_WLock (const ASYS_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -989,7 +989,7 @@ public:
// Return deep copy.
protected:
- ACE_Tokens *create_token (const char *name);
+ ACE_Tokens *create_token (const ASYS_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
diff --git a/ace/Local_Tokens.i b/ace/Local_Tokens.i
index 09edb613ddc..263d83b5a3e 100644
--- a/ace/Local_Tokens.i
+++ b/ace/Local_Tokens.i
@@ -68,7 +68,7 @@ ACE_TPQ_Entry::waiting (int v)
waiting_ = v;
}
-ACE_INLINE const char *
+ACE_INLINE const ASYS_TCHAR *
ACE_TPQ_Entry::client_id (void) const
{
ACE_TRACE ("ACE_TPQ_Entry::client_id");
@@ -164,17 +164,17 @@ ACE_Tokens::owner (void)
return (ACE_TPQ_Entry *) this->waiters_.head ();
}
-ACE_INLINE const char*
+ACE_INLINE const ASYS_TCHAR*
ACE_Tokens::owner_id ()
{
ACE_TRACE ("ACE_Tokens::owner_id");
if (this->owner () == 0)
- return "no owner";
+ return ASYS_TEXT ("no owner");
else
return this->owner ()->client_id ();
}
-ACE_INLINE const char*
+ACE_INLINE const ASYS_TCHAR*
ACE_Tokens::name (void)
{
ACE_TRACE ("ACE_Tokens::name");
@@ -257,7 +257,7 @@ ACE_TPQ_Entry::call_sleep_hook (void)
}
ACE_INLINE int
-ACE_TPQ_Entry::equal_client_id (const char *id)
+ACE_TPQ_Entry::equal_client_id (const ASYS_TCHAR *id)
{
ACE_TRACE ("ACE_TPQ_Entry::equal_client_id");
return (ACE_OS::strcmp (this->client_id (), id) == 0);
@@ -268,7 +268,7 @@ ACE_TPQ_Entry::equal_client_id (const char *id)
// ************************************************************
ACE_INLINE
-ACE_Local_Mutex::ACE_Local_Mutex (const char *token_name,
+ACE_Local_Mutex::ACE_Local_Mutex (const ASYS_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -277,22 +277,22 @@ ACE_Local_Mutex::ACE_Local_Mutex (const char *token_name,
}
ACE_INLINE void
-ACE_Token_Name::name (const char *new_name)
+ACE_Token_Name::name (const ASYS_TCHAR *new_name)
{
ACE_TRACE ("ACE_Token_Name::name");
if (new_name == 0)
- new_name = "no name";
+ new_name = ASYS_TEXT ("no name");
int n = ACE_OS::strlen (new_name) + 1;
if (n >= ACE_MAXTOKENNAMELEN)
n = ACE_MAXTOKENNAMELEN - 1;
- ACE_OS::strncpy (this->token_name_, (char *) new_name, n);
+ ACE_OS::strncpy (this->token_name_, (ASYS_TCHAR *) new_name, n);
}
-ACE_INLINE const char*
+ACE_INLINE const ASYS_TCHAR*
ACE_Token_Name::name (void) const
{
ACE_TRACE ("ACE_Token_Name::name");
@@ -308,7 +308,7 @@ ACE_Local_Mutex::clone (void) const
}
ACE_INLINE ACE_Tokens *
-ACE_Local_Mutex::create_token (const char *name)
+ACE_Local_Mutex::create_token (const ASYS_TCHAR *name)
{
return new ACE_Mutex_Token (name);
}
@@ -316,7 +316,7 @@ ACE_Local_Mutex::create_token (const char *name)
// ************************************************************
ACE_INLINE
-ACE_Local_RLock::ACE_Local_RLock (const char *token_name,
+ACE_Local_RLock::ACE_Local_RLock (const ASYS_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -325,7 +325,7 @@ ACE_Local_RLock::ACE_Local_RLock (const char *token_name,
}
ACE_INLINE ACE_Tokens *
-ACE_Local_RLock::create_token (const char *name)
+ACE_Local_RLock::create_token (const ASYS_TCHAR *name)
{
return new ACE_RW_Token (name);
}
@@ -347,7 +347,7 @@ ACE_Local_RLock::clone (void) const
// ************************************************************
ACE_INLINE
-ACE_Local_WLock::ACE_Local_WLock (const char *token_name,
+ACE_Local_WLock::ACE_Local_WLock (const ASYS_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -356,7 +356,7 @@ ACE_Local_WLock::ACE_Local_WLock (const char *token_name,
}
ACE_INLINE ACE_Tokens *
-ACE_Local_WLock::create_token (const char *name)
+ACE_Local_WLock::create_token (const ASYS_TCHAR *name)
{
return new ACE_RW_Token (name);
}
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index 35cdf0be0cb..591519e2995 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -57,7 +57,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (size_t size,
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager");
if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_Map_Manager\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Map_Manager\n")));
}
template <class EXT_ID, class INT_ID, class ACE_LOCK>
@@ -69,7 +69,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (ACE_Allocator *alloc
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager");
if (this->open (ACE_DEFAULT_MAP_SIZE, alloc) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_Map_Manager\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Map_Manager\n")));
}
template <class EXT_ID, class INT_ID, class ACE_LOCK> int
diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp
index a694ada59fb..ad7235a982b 100644
--- a/ace/Message_Queue.cpp
+++ b/ace/Message_Queue.cpp
@@ -107,13 +107,13 @@ ACE_Message_Queue<ACE_SYNCH_USE>::dump (void) const
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- "deactivated = %d\n"
- "low_water_mark = %d\n"
- "high_water_mark = %d\n"
- "cur_bytes = %d\n"
- "cur_count = %d\n"
- "head_ = %u\n"
- "tail_ = %u\n",
+ ASYS_TEXT ("deactivated = %d\n")
+ ASYS_TEXT ("low_water_mark = %d\n")
+ ASYS_TEXT ("high_water_mark = %d\n")
+ ASYS_TEXT ("cur_bytes = %d\n")
+ ASYS_TEXT ("cur_count = %d\n")
+ ASYS_TEXT ("head_ = %u\n")
+ ASYS_TEXT ("tail_ = %u\n"),
this->deactivated_,
this->low_water_mark_,
this->high_water_mark_,
diff --git a/ace/Module.cpp b/ace/Module.cpp
index 18a16b7841a..58768ae0197 100644
--- a/ace/Module.cpp
+++ b/ace/Module.cpp
@@ -76,7 +76,7 @@ ACE_Module<ACE_SYNCH_USE>::link (ACE_Module<ACE_SYNCH_USE> *m)
}
template <ACE_SYNCH_DECL> int
-ACE_Module<ACE_SYNCH_USE>::open (const char *mod_name,
+ACE_Module<ACE_SYNCH_USE>::open (const ASYS_TCHAR *mod_name,
ACE_Task<ACE_SYNCH_USE> *writer_q,
ACE_Task<ACE_SYNCH_USE> *reader_q,
void *arg,
@@ -167,7 +167,7 @@ ACE_Module<ACE_SYNCH_USE>::~ACE_Module (void)
}
template <ACE_SYNCH_DECL>
-ACE_Module<ACE_SYNCH_USE>::ACE_Module (const char *mod_name,
+ACE_Module<ACE_SYNCH_USE>::ACE_Module (const ASYS_TCHAR *mod_name,
ACE_Task<ACE_SYNCH_USE> *writer_q,
ACE_Task<ACE_SYNCH_USE> *reader_q,
void *args,
diff --git a/ace/Module.h b/ace/Module.h
index 0bebe00ffba..c9f89e6f24c 100644
--- a/ace/Module.h
+++ b/ace/Module.h
@@ -69,7 +69,7 @@ public:
~ACE_Module (void);
// Shutdown the Module.
- ACE_Module (const char *module_name,
+ ACE_Module (const ASYS_TCHAR *module_name,
ACE_Task<ACE_SYNCH_USE> *writer = 0,
ACE_Task<ACE_SYNCH_USE> *reader = 0,
void *args = 0,
@@ -77,7 +77,7 @@ public:
// Create an initialized module with <module_name> as its identity
// and <reader> and <writer> as its tasks.
- int open (const char *module_name,
+ int open (const ASYS_TCHAR *module_name,
ACE_Task<ACE_SYNCH_USE> *writer = 0,
ACE_Task<ACE_SYNCH_USE> *reader = 0,
void *a = 0,
@@ -120,9 +120,9 @@ public:
// Set and get pointer to sibling <ACE_Task> in an <ACE_Module>
// = Identify the module
- const char *name (void) const;
+ const ASYS_TCHAR *name (void) const;
// Get the module name.
- void name (const char *);
+ void name (const ASYS_TCHAR *);
// Set the module name.
// = Argument to the Tasks.
@@ -156,7 +156,7 @@ private:
// Pair of Tasks that form the "read-side" and "write-side" of the
// ACE_Module partitioning.
- char name_[MAXNAMLEN + 1];
+ ASYS_TCHAR name_[MAXNAMLEN + 1];
// Name of the ACE_Module.
ACE_Module<ACE_SYNCH_USE> *next_;
diff --git a/ace/Module.i b/ace/Module.i
index af675d16870..d13b06feb0c 100644
--- a/ace/Module.i
+++ b/ace/Module.i
@@ -17,7 +17,7 @@ ACE_Module<ACE_SYNCH_USE>::arg (void *a)
this->arg_ = a;
}
-template <ACE_SYNCH_DECL> ACE_INLINE const char *
+template <ACE_SYNCH_DECL> ACE_INLINE const ASYS_TCHAR *
ACE_Module<ACE_SYNCH_USE>::name (void) const
{
ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::name");
@@ -25,7 +25,7 @@ ACE_Module<ACE_SYNCH_USE>::name (void) const
}
template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Module<ACE_SYNCH_USE>::name (const char *n)
+ACE_Module<ACE_SYNCH_USE>::name (const ASYS_TCHAR *n)
{
ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::name");
ACE_OS::strncpy (this->name_, n, MAXNAMLEN);
diff --git a/ace/OS.cpp b/ace/OS.cpp
index b1c13b1dd08..e7175bb50c6 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -2749,7 +2749,7 @@ ACE_OS::thr_key_detach (void *inst)
// separated by spaces.
pid_t
-ACE_OS::fork_exec (char *argv[])
+ACE_OS::fork_exec (ASYS_TCHAR *argv[])
{
#if defined (ACE_WIN32)
ACE_ARGV argv_buf (argv);
@@ -2757,6 +2757,7 @@ ACE_OS::fork_exec (char *argv[])
if (argv_buf.buf () != 0)
{
PROCESS_INFORMATION process_info;
+#if !defined (ACE_HAS_WINCE)
STARTUPINFO startup_info;
ACE_OS::memset ((void *) &startup_info, 0, sizeof startup_info);
startup_info.cb = sizeof startup_info;
@@ -2766,11 +2767,25 @@ ACE_OS::fork_exec (char *argv[])
0, // No process attributes.
0, // No thread attributes.
TRUE, // Allow handle inheritance.
- 0, /* CREATE_NEW_CONSOLE */ // Don't create a new console window.
+ 0, /* CREATE_NEW_CONSOLE */
+ // Don't create a new console window.
0, // No environment.
0, // No current directory.
&startup_info,
&process_info))
+#else
+ if (::CreateProcess (0,
+ (LPTSTR) ACE_WIDE_STRING (argv_buf.buf ()),
+ 0, // No process attributes.
+ 0, // No thread attributes.
+ FALSE, // Can's inherit handles on CE
+ 0, /* CREATE_NEW_CONSOLE */
+ // Don't create a new console window.
+ 0, // No environment.
+ 0, // No current directory.
+ 0, // Can't use startup info on CE
+ &process_info))
+#endif /* ! ACE_HAS_WINCE */
{
// Free resources allocated in kernel.
ACE_OS::close (process_info.hThread);
diff --git a/ace/OS.h b/ace/OS.h
index f7d993f72cf..cfe7d2fdf19 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -3981,10 +3981,10 @@ public:
static int hostname (char *name,
size_t maxnamelen);
- // WinCE only supports UNICODE, so we don't need these functions.
-#if !defined (ACE_HAS_WINCE)
// = A set of wrappers for explicit dynamic linking.
static int dlclose (ACE_SHLIB_HANDLE handle);
+ // WinCE only supports UNICODE, so we don't need these functions.
+#if !defined (ACE_HAS_WINCE)
static char *dlerror (void);
static ACE_SHLIB_HANDLE dlopen (ACE_DL_TYPE filename,
int mode = ACE_DEFAULT_SHLIB_MODE);
@@ -4092,7 +4092,7 @@ public:
static void exit (int status = 0);
static pid_t fork (void);
static pid_t fork (const char *program_name);
- static pid_t fork_exec (char *argv[]);
+ static pid_t fork_exec (ASYS_TCHAR *argv[]);
// Forks and exec's a process in a manner that works on Solaris and
// NT. argv[0] must be the full path name to the executable.
@@ -4659,6 +4659,7 @@ public:
int base);
static double strtod (const char *s,
char **endptr);
+ static int ace_isspace (const char s);
#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
// = These go here since they are needed for TAO.
@@ -4700,7 +4701,7 @@ public:
static long strtol (const wchar_t *s,
wchar_t **ptr,
int base);
- //static int isspace (wint_t c);
+ static int ace_isspace (wchar_t c);
#if defined (ACE_WIN32)
static wchar_t *strstr (const wchar_t *s,
@@ -4745,9 +4746,13 @@ public:
int perms = 0,
LPSECURITY_ATTRIBUTES sa = 0);
static int unlink (const wchar_t *path);
+#if defined (ACE_HAS_WINCE)
+ static wchar_t *dlerror (void);
+#endif /* !ACE_HAS_WINCE */
static ACE_SHLIB_HANDLE dlopen (ACE_WIDE_DL_TYPE filename,
int mode = ACE_DEFAULT_SHLIB_MODE);
+ static void *dlsym (ACE_SHLIB_HANDLE handle, ACE_WIDE_DL_TYPE symbol);
static wchar_t *mktemp (wchar_t *t);
static int mkdir (const wchar_t *path,
mode_t mode = ACE_DEFAULT_DIR_PERMS);
diff --git a/ace/OS.i b/ace/OS.i
index edffefd008d..6ad7b35ad1d 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -1424,6 +1424,17 @@ ACE_OS::strtod (const char *s, char **endptr)
#endif /* ACE_HAS_WINCE */
}
+ACE_INLINE int
+ACE_OS::ace_isspace (const char s)
+{
+#if !defined (ACE_HAS_WINCE)
+ return isspace (s);
+#else
+ ACE_UNUSED_ARG (s);
+ ACE_NOTSUP_RETURN (0);
+#endif /* ACE_HAS_WINCE */
+}
+
ACE_INLINE long
ACE_OS::sysconf (int name)
{
@@ -6322,7 +6333,6 @@ ACE_OS::ualarm (const ACE_Time_Value &tv,
#endif /* ACE_HAS_UALARM */
}
-#if !defined (ACE_HAS_WINCE)
ACE_INLINE int
ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
{
@@ -6353,6 +6363,7 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
}
+#if !defined (ACE_HAS_WINCE)
ACE_INLINE char *
ACE_OS::dlerror (void)
{
@@ -6447,7 +6458,21 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, ACE_DL_TYPE symbolname)
ACE_NOTSUP_RETURN (0);
#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
}
-#endif /* ! ACE_HAS_WINCE */
+#else /* !ACE_HAS_WINCE */
+// UNDER_CE
+ACE_INLINE wchar_t *
+ACE_OS::dlerror (void)
+{
+ ACE_NOTSUP_RETURN (0);
+}
+
+ACE_INLINE void *
+ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, ACE_WIDE_DL_TYPE symbolname)
+{
+ // ACE_TRACE ("ACE_OS::dlsym");
+ ACE_WIN32CALL_RETURN (::GetProcAddress (handle, symbolname), void *, 0);
+}
+#endif /* ACE_HAS_WINCE */
ACE_INLINE void
ACE_OS::exit (int status)
@@ -8394,13 +8419,12 @@ ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base)
return ::wcstol (s, ptr, base);
}
-/*
ACE_INLINE int
-ACE_OS::isspace (wint_t c)
+ACE_OS::ace_isspace (wchar_t c)
{
-ACE_OSCALL_RETURN (::iswspace (c), int, -1);
+ return iswspace (c);
}
-*/
+
#if defined (ACE_WIN32)
ACE_INLINE wchar_t *
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
index c7b3c183203..d8048f5b1ad 100644
--- a/ace/Parse_Node.cpp
+++ b/ace/Parse_Node.cpp
@@ -34,7 +34,7 @@ ACE_Stream_Node::apply (void)
ACE_TRACE ("ACE_Stream_Node::apply");
if (ACE_Service_Config::initialize (this->node_->record (),
- this->node_->parameters ()) == -1)
+ ASYS_WIDE_STRING (this->node_->parameters ())) == -1)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("did stream on %s, error = %d\n"),
@@ -108,7 +108,7 @@ ACE_Parse_Node::print (void) const
ACE_TRACE ("ACE_Parse_Node::print");
ACE_DEBUG ((LM_DEBUG,
- "svc = %s\n",
+ ASYS_TEXT ("svc = %s\n"),
this->name ()));
if (this->next_)
@@ -159,7 +159,7 @@ ACE_Suspend_Node::apply (void)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG,
- "did suspend on %s, error = %d\n",
+ ASYS_TEXT ("did suspend on %s, error = %d\n"),
this->name (), ace_yyerrno));
}
@@ -171,7 +171,7 @@ ACE_Resume_Node::apply (void)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG,
- "did resume on %s, error = %d\n",
+ ASYS_TEXT ("did resume on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -198,7 +198,7 @@ ACE_Remove_Node::apply (void)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG,
- "did remove on %s, error = %d\n",
+ ASYS_TEXT ("did remove on %s, error = %d\n"),
this->name (),
ace_yyerrno));
@@ -229,7 +229,7 @@ ACE_Dynamic_Node::apply (void)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG,
- "did dynamic on %s, error = %d\n",
+ ASYS_TEXT ("did dynamic on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -292,7 +292,7 @@ ACE_Static_Node::apply (void)
ace_yyerrno++;
ACE_DEBUG ((LM_DEBUG,
- "did static on %s, error = %d\n",
+ ASYS_TEXT ("did static on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -386,19 +386,19 @@ ACE_Location_Node::open_handle (void)
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- "dlopen failed for %s",
+ ASYS_TEXT ("dlopen failed for %s"),
dl_pathname));
char *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ": %s\n",
+ ASYS_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- "\n"),
+ ASYS_TEXT ("\n")),
0);
}
else
@@ -437,19 +437,19 @@ ACE_Object_Node::symbol (void)
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- "dlsym failed for object %s\n",
+ ASYS_TEXT ("dlsym failed for object %s\n"),
this->object_name_));
char *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ": %s\n",
+ ASYS_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- "\n"),
+ ASYS_TEXT ("\n")),
0);
}
return this->symbol_;
@@ -505,19 +505,19 @@ ACE_Function_Node::symbol (void)
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- "dlsym failed for function %s\n",
+ ASYS_TEXT ("dlsym failed for function %s\n"),
this->function_name_));
char *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ": %s\n",
+ ASYS_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- "\n"),
+ ASYS_TEXT ("\n")),
0);
}
}
@@ -528,7 +528,7 @@ ACE_Function_Node::symbol (void)
{
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
+ ASYS_TEXT ("%p\n"),
this->function_name_),
0);
}
@@ -563,7 +563,7 @@ ACE_Dummy_Node::apply (void)
{
ACE_TRACE ("ACE_Dummy_Node::apply");
ACE_DEBUG ((LM_DEBUG,
- "did operations on stream %s, error = %d\n",
+ ASYS_TEXT ("did operations on stream %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -624,7 +624,7 @@ ACE_Static_Function_Node::symbol (void)
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- "no static service registered for function %s\n",
+ ASYS_TEXT ("no static service registered for function %s\n"),
this->function_name_),
0);
}
@@ -637,7 +637,7 @@ ACE_Static_Function_Node::symbol (void)
{
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
+ ASYS_TEXT ("%p\n"),
this->function_name_),
0);
}
diff --git a/ace/Pipe.cpp b/ace/Pipe.cpp
index 824ce9290e5..8cb1d2e84d9 100644
--- a/ace/Pipe.cpp
+++ b/ace/Pipe.cpp
@@ -35,7 +35,8 @@ ACE_Pipe::open (void)
result = -1;
else
{
- ACE_INET_Addr sv_addr (my_addr.get_port_number (), "localhost");
+ ACE_INET_Addr sv_addr (my_addr.get_port_number (),
+ ASYS_TEXT ("localhost"));
// Establish a connection within the same process.
if (connector.connect (writer, sv_addr) == -1)
@@ -114,7 +115,7 @@ ACE_Pipe::ACE_Pipe (ACE_HANDLE handles[2])
ACE_TRACE ("ACE_Pipe::ACE_Pipe");
if (this->open (handles) == -1)
- ACE_ERROR ((LM_ERROR, "ACE_Pipe::ACE_Pipe"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Pipe::ACE_Pipe")));
}
ACE_Pipe::ACE_Pipe (ACE_HANDLE read,
diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp
index c91b2b4ef10..356922c31c6 100644
--- a/ace/Reactor.cpp
+++ b/ace/Reactor.cpp
@@ -4,9 +4,11 @@
#include "ace/Reactor.h"
#include "ace/Reactor_Impl.h"
#include "ace/Handle_Set.h"
-#include "ace/Service_Config.h"
+#if !defined (ACE_HAS_WINCE)
+# include "ace/Service_Config.h"
+# include "ace/WFMO_Reactor.h"
+#endif /* !ACE_HAS_WINCE */
#include "ace/Select_Reactor.h"
-#include "ace/WFMO_Reactor.h"
#include "ace/Object_Manager.h"
#if !defined (__ACE_INLINE__)
@@ -112,11 +114,14 @@ ACE_Reactor::run_event_loop (void)
{
int result = ACE_Reactor::instance ()->handle_events ();
+#if !defined (ACE_HAS_WINCE)
if (ACE_Service_Config::reconfig_occurred ())
ACE_Service_Config::reconfigure ();
+ else
+#endif /* !ACE_HAS_WINCE */
- else if (result == -1)
- return -1;
+ if (result == -1)
+ return -1;
}
/* NOTREACHED */
return 0;
@@ -135,10 +140,13 @@ ACE_Reactor::run_event_loop (ACE_Time_Value &tv)
{
int result = ACE_Reactor::instance ()->handle_events (tv);
+#if !defined (ACE_HAS_WINCE)
if (ACE_Service_Config::reconfig_occurred ())
ACE_Service_Config::reconfigure ();
- else if (result <= 0)
- return result;
+ else
+#endif /* !ACE_HAS_WINCE */
+ if (result <= 0)
+ return result;
}
/* NOTREACHED */
diff --git a/ace/SString.cpp b/ace/SString.cpp
index bef5df3cb89..ab5848bbb5b 100644
--- a/ace/SString.cpp
+++ b/ace/SString.cpp
@@ -2,7 +2,9 @@
#define ACE_BUILD_DLL
#include "ace/Malloc.h"
-#include "ace/Service_Config.h"
+#if !defined (ACE_HAS_WINCE)
+# include "ace/Service_Config.h"
+#endif /* !ACE_HAS_WINCE */
#include "ace/SString.h"
#include "ace/streams.h"
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index 8750ac1d27e..38faf6456e0 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -55,7 +55,7 @@ int ACE_Service_Config::signum_ = SIGHUP;
LPCTSTR ACE_Service_Config::logger_key_ = ACE_DEFAULT_LOGGER_KEY;
// Name of the service configuration file.
-const char *ACE_Service_Config::service_config_file_ = ACE_DEFAULT_SVC_CONF;
+const ASYS_TCHAR *ACE_Service_Config::service_config_file_ = ASYS_TEXT (ACE_DEFAULT_SVC_CONF);
// The ACE_Service_Manager static service object is now defined
// by the ACE_Object_Manager, in Object_Manager.cpp.
@@ -133,7 +133,7 @@ ACE_Service_Config::thr_mgr (ACE_Thread_Manager *tm)
// ACE_Reactor, and unlinking it if necessary.
int
-ACE_Service_Config::remove (const char svc_name[])
+ACE_Service_Config::remove (const ASYS_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::remove");
return ACE_Service_Repository::instance ()->remove (svc_name);
@@ -146,7 +146,7 @@ ACE_Service_Config::remove (const char svc_name[])
// resumed later on by calling the RESUME() member function...
int
-ACE_Service_Config::suspend (const char svc_name[])
+ACE_Service_Config::suspend (const ASYS_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::suspend");
return ACE_Service_Repository::instance ()->suspend (svc_name);
@@ -156,7 +156,7 @@ ACE_Service_Config::suspend (const char svc_name[])
// been resumed (e.g., a static service).
int
-ACE_Service_Config::resume (const char svc_name[])
+ACE_Service_Config::resume (const ASYS_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::resume");
return ACE_Service_Repository::instance ()->resume (svc_name);
@@ -189,7 +189,7 @@ ACE_Service_Config::ACE_Service_Config (int ignore_static_svcs,
if (ACE_Reactor::instance ()->register_handler (ACE_Service_Config::signum_,
ACE_Service_Config::signal_handler_) == -1)
- ACE_ERROR ((LM_ERROR, "can't register signal handler\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("can't register signal handler\n")));
#endif /* ACE_LACKS_UNIX_SIGNALS */
}
@@ -197,10 +197,10 @@ ACE_Service_Config::ACE_Service_Config (int ignore_static_svcs,
// ACE_Service_Config.
void
-ACE_Service_Config::parse_args (int argc, char *argv[])
+ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
{
ACE_TRACE ("ACE_Service_Config::parse_args");
- ACE_Get_Opt getopt (argc, argv, "bdf:k:ns:", 1); // Start at argv[1]
+ ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("bdf:k:ns:"), 1); // Start at argv[1]
for (int c; (c = getopt ()) != -1; )
switch (c)
@@ -230,12 +230,12 @@ ACE_Service_Config::parse_args (int argc, char *argv[])
if (ACE_Reactor::instance ()->register_handler
(ACE_Service_Config::signum_,
ACE_Service_Config::signal_handler_) == -1)
- ACE_ERROR ((LM_ERROR, "cannot obtain signal handler\n"));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("cannot obtain signal handler\n")));
#endif /* ACE_LACKS_UNIX_SIGNALS */
break;
}
default:
- ACE_ERROR ((LM_ERROR, "%c is not a ACE_Service_Config option\n", c));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%c is not a ACE_Service_Config option\n"), c));
break;
}
}
@@ -243,8 +243,8 @@ ACE_Service_Config::parse_args (int argc, char *argv[])
// Initialize and activate a statically linked service.
int
-ACE_Service_Config::initialize (const char svc_name[],
- char *parameters)
+ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
+ ASYS_TCHAR *parameters)
{
ACE_TRACE ("ACE_Service_Config::initialize");
ACE_ARGV args (parameters);
@@ -254,10 +254,10 @@ ACE_Service_Config::initialize (const char svc_name[],
if (ACE_Service_Repository::instance ()->find (svc_name,
(const ACE_Service_Type **) &srp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%s not found\n", svc_name), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%s not found\n"), svc_name), -1);
else if (srp->type ()->init (args.argc (), args.argv ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "static initialization failed, %p\n",
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("static initialization failed, %p\n"),
svc_name), -1);
else
{
@@ -271,7 +271,7 @@ ACE_Service_Config::initialize (const char svc_name[],
int
ACE_Service_Config::initialize (const ACE_Service_Type *sr,
- char parameters[])
+ ASYS_TCHAR parameters[])
{
ACE_TRACE ("ACE_Service_Config::initialize");
ACE_ARGV args (parameters);
@@ -279,10 +279,10 @@ ACE_Service_Config::initialize (const ACE_Service_Type *sr,
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("opening dynamic service %s\n"), sr->name ()));
if (ACE_Service_Repository::instance ()->insert (sr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "insertion failed, %p\n", sr->name ()), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("insertion failed, %p\n"), sr->name ()), -1);
else if (sr->type ()->init (args.argc (), args.argv ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "dynamic initialization failed for %s\n",
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("dynamic initialization failed for %s\n"),
sr->name ()), -1);
else
return 0;
@@ -296,7 +296,7 @@ ACE_Service_Config::process_directives (void)
{
ACE_TRACE ("ACE_Service_Config::process_directives");
- FILE *fp = ACE_OS::fopen (ACE_Service_Config::service_config_file_, "r");
+ FILE *fp = ACE_OS::fopen (ACE_Service_Config::service_config_file_, ASYS_TEXT ("r"));
if (fp == 0)
{
@@ -371,7 +371,7 @@ ACE_Service_Config::load_static_svcs (void)
// Performs an open without parsing command-line arguments.
int
-ACE_Service_Config::open (const char program_name[],
+ACE_Service_Config::open (const ASYS_TCHAR program_name[],
LPCTSTR logger_key)
{
ACE_TRACE ("ACE_Service_Config::open");
@@ -399,7 +399,7 @@ ACE_Service_Config::open (const char program_name[],
return -1;
else
{
- ACE_DEBUG ((LM_STARTUP, "starting up daemon %n\n"));
+ ACE_DEBUG ((LM_STARTUP, ASYS_TEXT ("starting up daemon %n\n")));
// Initialize the Service Repository (this will still work if
// user forgets to define an object of type ACE_Service_Config).
@@ -420,7 +420,7 @@ ACE_Service_Config::open (const char program_name[],
}
}
-ACE_Service_Config::ACE_Service_Config (const char program_name[],
+ACE_Service_Config::ACE_Service_Config (const ASYS_TCHAR program_name[],
LPCTSTR logger_key)
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
@@ -429,7 +429,7 @@ ACE_Service_Config::ACE_Service_Config (const char program_name[],
&& errno != ENOENT)
// Only print out an error if it wasn't the svc.conf file that was
// missing.
- ACE_ERROR ((LM_ERROR, "%p\n", program_name));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), program_name));
}
// Signal handling API to trigger dynamic reconfiguration.
@@ -441,7 +441,7 @@ ACE_Service_Config::handle_signal (int sig, siginfo_t *, ucontext_t *)
if (ACE_Service_Config::signum_ != sig)
ACE_ERROR ((LM_ERROR,
- "error, signal %S does match %S\n",
+ ASYS_TEXT ("error, signal %S does match %S\n"),
sig, ACE_Service_Config::signum_));
if (ACE_Service_Config::debug_)
@@ -579,7 +579,7 @@ ACE_Service_Config::reconfig_occurred (int config_occurred)
ACE_Service_Config::reconfig_occurred_ = config_occurred;
}
-// Become a daemon (i.e., run as a "background" process).
+// Become a daemon (i.e., run as a ASYS_TEXT ("background") process).
int
ACE_Service_Config::start_daemon (void)
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
index 9b5b0af7466..c2c87818ed7 100644
--- a/ace/Service_Config.h
+++ b/ace/Service_Config.h
@@ -35,7 +35,7 @@ extern "C"
struct ACE_Static_Svc_Descriptor
{
- char *name_;
+ ASYS_TCHAR *name_;
// Name of the service.
int type_;
@@ -91,17 +91,17 @@ public:
int signum = SIGHUP);
// Initialize the Service Repository.
- ACE_Service_Config (const char program_name[],
+ ACE_Service_Config (const ASYS_TCHAR program_name[],
LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY);
// Performs an open without parsing command-line arguments.
- static int open (const char program_name[],
+ static int open (const ASYS_TCHAR program_name[],
LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY);
// Performs an open without parsing command-line arguments. Returns
// -1 on failure and 0 otherwise.
static int open (int argc,
- char *argv[],
+ ASYS_TCHAR *argv[],
LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY);
// This is the primary entry point into the ACE_Service_Config (the
// constructor just handles simple initializations). It parses
@@ -218,18 +218,18 @@ public:
// = Member functions used by various other parts
// of the Service Configurator class category.
- static int initialize (const ACE_Service_Type *, char parameters[]);
+ static int initialize (const ACE_Service_Type *, ASYS_TCHAR parameters[]);
// Dynamically link the shared object file and retrieve
// a pointer to the designated shared object in this file.
- static int initialize (const char svc_name[], char parameters[]);
+ static int initialize (const ASYS_TCHAR svc_name[], ASYS_TCHAR parameters[]);
// Initialize and activate a statically <svc_name> service.
- static int resume (const char svc_name[]);
+ static int resume (const ASYS_TCHAR svc_name[]);
// Resume a <svc_name> that was previously suspended or has not yet
// been resumed (e.g., a static service).
- static int suspend (const char svc_name[]);
+ static int suspend (const ASYS_TCHAR svc_name[]);
// Suspend <svc_name>. Note that this will not unlink the service
// from the daemon if it was dynamically linked, it will mark it
// as being suspended in the Service Repository and call the
@@ -237,7 +237,7 @@ public:
// A service can be resumed later on by calling the RESUME()
// member function...
- static int remove (const char svc_name[]);
+ static int remove (const ASYS_TCHAR svc_name[]);
// Totally remove <svc_name> from the daemon by removing it
// from the ACE_Reactor, and unlinking it if necessary.
@@ -255,7 +255,7 @@ protected:
// Process service configuration requests as indicated in the
// <service_config_file>. Returns -1 if errors occur, else 0.
- static void parse_args (int, char *argv[]);
+ static void parse_args (int, ASYS_TCHAR *argv[]);
// Handle the command-line options intended for the
// <ACE_Service_Config>. Note that <argv[0]> is assumed to be the
// program name.
@@ -271,7 +271,7 @@ public:
// Handles signals to trigger reconfigurations.
private:
- static const char *service_config_file_;
+ static const ASYS_TCHAR *service_config_file_;
// Name of service configuration file.
static LPCTSTR logger_key_;
diff --git a/ace/Service_Config.i b/ace/Service_Config.i
index 9bc8180373e..1550381c637 100644
--- a/ace/Service_Config.i
+++ b/ace/Service_Config.i
@@ -8,7 +8,7 @@
ACE_INLINE int
ACE_Service_Config::open (int argc,
- char *argv[],
+ ASYS_TCHAR *argv[],
LPCTSTR logger_key)
{
ACE_TRACE ("ACE_Service_Config::open");
diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp
index 199dba96fc7..8baa173a691 100644
--- a/ace/Service_Manager.cpp
+++ b/ace/Service_Manager.cpp
@@ -57,17 +57,18 @@ ACE_Service_Manager::open (const ACE_INET_Addr &sia)
}
int
-ACE_Service_Manager::info (char **strp, size_t length) const
+ACE_Service_Manager::info (ASYS_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Service_Manager::info");
ACE_INET_Addr sa;
- char buf[BUFSIZ];
+ ASYS_TCHAR buf[BUFSIZ];
if (this->acceptor_.get_local_addr (sa) == -1)
return -1;
- ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "tcp",
- "# lists all services in the daemon\n");
+ ACE_OS::sprintf (buf, ASYS_TEXT ("%d/%s %s"), sa.get_port_number (),
+ ASYS_TEXT ("tcp"),
+ ASYS_TEXT ("# lists all services in the daemon\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -77,11 +78,11 @@ ACE_Service_Manager::info (char **strp, size_t length) const
}
int
-ACE_Service_Manager::init (int argc, char *argv[])
+ACE_Service_Manager::init (int argc, ASYS_TCHAR *argv[])
{
ACE_TRACE ("ACE_Service_Manager::init");
ACE_INET_Addr local_addr (ACE_Service_Manager::DEFAULT_PORT_);
- ACE_Get_Opt getopt (argc, argv, "dp:s:", 0); // Start at argv[0]
+ ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dp:s:"), 0); // Start at argv[0]
for (int c; (c = getopt ()) != -1; )
switch (c)
@@ -100,10 +101,11 @@ ACE_Service_Manager::init (int argc, char *argv[])
}
if (this->open (local_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("open")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"),
+ ASYS_TEXT ("open")), -1);
else if (ACE_Reactor::instance ()->register_handler
(this, ACE_Event_Handler::ACCEPT_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("registering service with ACE_Reactor\n")), -1);
return 0;
}
@@ -155,7 +157,7 @@ ACE_Service_Manager::list_services (void)
sri.advance ())
{
int len = ACE_OS::strlen (sr->name ()) + 1;
- char buf[BUFSIZ], *p = buf + len;
+ ASYS_TCHAR buf[BUFSIZ], *p = buf + len;
ACE_OS::strcpy (buf, sr->name ());
p[-1] = ' ';
@@ -165,11 +167,12 @@ ACE_Service_Manager::list_services (void)
if (this->debug_)
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("len = %d, info = %s%s"),
- len, buf, buf[len - 1] == '\n' ? "" : "\n"));
+ len, buf, buf[len - 1] == '\n' ? ASYS_TEXT ("") : ASYS_TEXT ("\n")));
if (len > 0)
{
- ssize_t n = this->client_stream_.send_n (buf, len);
+ ssize_t n = this->client_stream_.send_n (ASYS_MULTIBYTE_STRING (buf),
+ len);
if (n != len || (n == -1 && errno != EPIPE))
ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n")));
@@ -241,7 +244,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
{
case -1:
if (this->debug_)
- ACE_DEBUG ((LM_ERROR, "%p\n", "recv"));
+ ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("recv")));
break;
case 0:
return 0;
@@ -275,7 +278,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
}
}
if (this->client_stream_.close () == -1 && this->debug_)
- ACE_DEBUG ((LM_ERROR, "%p\n", "close"));
+ ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("close")));
return 0;
}
diff --git a/ace/Service_Manager.h b/ace/Service_Manager.h
index f91e225b442..51614221295 100644
--- a/ace/Service_Manager.h
+++ b/ace/Service_Manager.h
@@ -34,8 +34,8 @@ public:
virtual int reconfigure_services (void);
// = Dynamic linking hooks.
- virtual int init (int argc, char *argv[]);
- virtual int info (char **info_string, size_t length) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int info (ASYS_TCHAR **info_string, size_t length) const;
virtual int fini (void);
// = Scheduling hooks.
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index 7484cbf5813..c2a374222c7 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -19,7 +19,7 @@ ACE_Service_Type::dump (void) const
ACE_TRACE ("ACE_Service_Type::dump");
}
-ACE_Service_Type::ACE_Service_Type (const char *n,
+ACE_Service_Type::ACE_Service_Type (const ASYS_TCHAR *n,
ACE_Service_Type_Impl *t,
const ACE_SHLIB_HANDLE h,
int active)
@@ -38,7 +38,7 @@ ACE_Service_Type::~ACE_Service_Type (void)
this->type_->fini ();
if (this->handle_ != 0)
ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_);
- delete [] (char *) this->name_;
+ delete [] (ASYS_TCHAR *) this->name_;
}
void
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
index 7dff02543e6..980017554e1 100644
--- a/ace/Service_Object.h
+++ b/ace/Service_Object.h
@@ -65,14 +65,14 @@ public:
};
// = Initialization and termination methods.
- ACE_Service_Type (const char *n,
+ ACE_Service_Type (const ASYS_TCHAR *n,
ACE_Service_Type_Impl *o,
const ACE_SHLIB_HANDLE handle,
int active);
~ACE_Service_Type (void);
- const char *name (void) const;
- void name (const char *);
+ const ASYS_TCHAR *name (void) const;
+ void name (const ASYS_TCHAR *);
const ACE_Service_Type_Impl *type (void) const;
void type (const ACE_Service_Type_Impl *,
@@ -93,7 +93,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const char *name_;
+ const ASYS_TCHAR *name_;
// Humanly readible name of svc.
const ACE_Service_Type_Impl *type_;
diff --git a/ace/Service_Object.i b/ace/Service_Object.i
index 0f55fa6226d..d58e7fa8dbb 100644
--- a/ace/Service_Object.i
+++ b/ace/Service_Object.i
@@ -19,7 +19,7 @@ ACE_Service_Object_Ptr::operator-> ()
return this->service_object_;
}
-ACE_INLINE const char *
+ACE_INLINE const ASYS_TCHAR *
ACE_Service_Type::name (void) const
{
ACE_TRACE ("ACE_Service_Type::name");
@@ -41,12 +41,12 @@ ACE_Service_Type::handle (void) const
}
ACE_INLINE void
-ACE_Service_Type::name (const char *n)
+ACE_Service_Type::name (const ASYS_TCHAR *n)
{
ACE_TRACE ("ACE_Service_Type::name");
- delete [] (char *) this->name_;
- this->name_ = ACE_OS::strcpy (new char [::strlen (n) + 1], n);
+ delete [] (ASYS_TCHAR *) this->name_;
+ this->name_ = ACE_OS::strcpy (new ASYS_TCHAR [ACE_OS::strlen (n) + 1], n);
}
ACE_INLINE void
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index 70fa22b7198..fd5eb704575 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -152,7 +152,7 @@ ACE_Service_Repository::~ACE_Service_Repository (void)
// -2 is returned. Must be called with locks held.
int
-ACE_Service_Repository::find_i (const char name[],
+ACE_Service_Repository::find_i (const ASYS_TCHAR name[],
const ACE_Service_Type **srp,
int ignore_suspended)
{
@@ -176,7 +176,7 @@ ACE_Service_Repository::find_i (const char name[],
}
int
-ACE_Service_Repository::find (const char name[],
+ACE_Service_Repository::find (const ASYS_TCHAR name[],
const ACE_Service_Type **srp,
int ignore_suspended)
{
@@ -224,7 +224,7 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
// Re-resume a service that was previously suspended.
int
-ACE_Service_Repository::resume (const char name[],
+ACE_Service_Repository::resume (const ASYS_TCHAR name[],
const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::resume");
@@ -243,7 +243,7 @@ ACE_Service_Repository::resume (const char name[],
// most circumstances by other portions of the ACE_Service_Repository.
int
-ACE_Service_Repository::suspend (const char name[],
+ACE_Service_Repository::suspend (const ASYS_TCHAR name[],
const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::suspend");
@@ -264,7 +264,7 @@ ACE_Service_Repository::suspend (const char name[],
// the array and decrement the <service_count> by 1.
int
-ACE_Service_Repository::remove (const char name[])
+ACE_Service_Repository::remove (const ASYS_TCHAR name[])
{
ACE_TRACE ("ACE_Service_Repository::remove");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
diff --git a/ace/Service_Repository.h b/ace/Service_Repository.h
index 91af367e9d3..b732db5afdf 100644
--- a/ace/Service_Repository.h
+++ b/ace/Service_Repository.h
@@ -64,7 +64,7 @@ public:
int insert (const ACE_Service_Type *);
// Insert a new service record.
- int find (const char name[],
+ int find (const ASYS_TCHAR name[],
const ACE_Service_Type **srp = 0,
int ignore_suspended = 1);
// Locate an entry with <name> in the table. If <ignore_suspended>
@@ -74,14 +74,14 @@ public:
// If <name> is found, but it is suspended and the caller wants to
// ignore suspended services a -2 is returned.
- int remove (const char[]);
+ int remove (const ASYS_TCHAR[]);
// Remove an existing service record.
// = Liveness control
- int resume (const char[], const ACE_Service_Type ** = 0);
+ int resume (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);
// Resume a service record.
- int suspend (const char[], const ACE_Service_Type ** = 0);
+ int suspend (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);
// Suspend a service record.
int current_size (void);
@@ -97,7 +97,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- int find_i (const char service_name[],
+ int find_i (const ASYS_TCHAR service_name[],
const ACE_Service_Type ** = 0,
int ignore_suspended = 1);
// Locates <service_name>. Must be called without locks being
diff --git a/ace/Service_Types.cpp b/ace/Service_Types.cpp
index 271ab064197..7d634bdba02 100644
--- a/ace/Service_Types.cpp
+++ b/ace/Service_Types.cpp
@@ -23,7 +23,7 @@ ACE_Service_Type_Impl::dump (void) const
}
ACE_Service_Type_Impl::ACE_Service_Type_Impl (void *so,
- const char *s_name,
+ const ASYS_TCHAR *s_name,
u_int f)
: name_ (0),
obj_ (so),
@@ -39,7 +39,7 @@ ACE_Service_Type_Impl::~ACE_Service_Type_Impl (void)
// It's ok to call this, even though we may have already deleted it
// in the fini() method since it would then be NULL.
- delete [] (char *) this->name_;
+ delete [] (ASYS_TCHAR *) this->name_;
}
int
@@ -49,7 +49,7 @@ ACE_Service_Type_Impl::fini (void) const
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("destroying %s, flags = %d\n"),
this->name_, this->flags_));
- delete [] (char *) this->name_;
+ delete [] (ASYS_TCHAR *) this->name_;
((ACE_Service_Type_Impl *) this)->name_ = 0;
#if 1
@@ -64,7 +64,7 @@ ACE_Service_Type_Impl::fini (void) const
}
ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
- const char *s_name,
+ const ASYS_TCHAR *s_name,
u_int f)
: ACE_Service_Type_Impl (so, s_name, f)
{
@@ -72,7 +72,7 @@ ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
}
int
-ACE_Service_Object_Type::init (int argc, char *argv[]) const
+ACE_Service_Object_Type::init (int argc, ASYS_TCHAR *argv[]) const
{
ACE_TRACE ("ACE_Service_Object_Type::init");
void *obj = this->object ();
@@ -93,7 +93,7 @@ ACE_Module_Type::dump (void) const
}
ACE_Module_Type::ACE_Module_Type (void *m,
- const char *m_name,
+ const ASYS_TCHAR *m_name,
u_int f)
: ACE_Service_Type_Impl (m, m_name, f)
{
@@ -101,7 +101,7 @@ ACE_Module_Type::ACE_Module_Type (void *m,
}
int
-ACE_Module_Type::init (int argc, char *argv[]) const
+ACE_Module_Type::init (int argc, ASYS_TCHAR *argv[]) const
{
ACE_TRACE ("ACE_Module_Type::init");
void *obj = this->object ();
@@ -173,12 +173,12 @@ ACE_Module_Type::fini (void) const
}
int
-ACE_Module_Type::info (char **str, size_t len) const
+ACE_Module_Type::info (ASYS_TCHAR **str, size_t len) const
{
ACE_TRACE ("ACE_Module_Type::info");
- char buf[BUFSIZ];
+ ASYS_TCHAR buf[BUFSIZ];
- ACE_OS::sprintf (buf, "%s\t %s", this->name (), "# ACE_Module\n");
+ ACE_OS::sprintf (buf, ASYS_TEXT ("%s\t %s"), this->name (), ASYS_TEXT ("# ACE_Module\n"));
if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -210,7 +210,7 @@ ACE_Stream_Type::dump (void) const
}
int
-ACE_Stream_Type::init (int, char *[]) const
+ACE_Stream_Type::init (int, ASYS_TCHAR *[]) const
{
ACE_TRACE ("ACE_Stream_Type::init");
return 0;
@@ -237,7 +237,7 @@ ACE_Stream_Type::resume (void) const
}
ACE_Stream_Type::ACE_Stream_Type (void *s,
- const char *s_name,
+ const ASYS_TCHAR *s_name,
u_int f)
: ACE_Service_Type_Impl (s, s_name, f),
head_ (0)
@@ -246,12 +246,12 @@ ACE_Stream_Type::ACE_Stream_Type (void *s,
}
int
-ACE_Stream_Type::info (char **str, size_t len) const
+ACE_Stream_Type::info (ASYS_TCHAR **str, size_t len) const
{
ACE_TRACE ("ACE_Stream_Type::info");
- char buf[BUFSIZ];
+ ASYS_TCHAR buf[BUFSIZ];
- ACE_OS::sprintf (buf, "%s\t %s", this->name (), "# STREAM\n");
+ ACE_OS::sprintf (buf, ASYS_TEXT ("%s\t %s"), this->name (), ASYS_TEXT ("# STREAM\n"));
if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -338,7 +338,7 @@ ACE_Stream_Type::push (ACE_Module_Type *new_module)
}
ACE_Module_Type *
-ACE_Stream_Type::find (const char *mod_name) const
+ACE_Stream_Type::find (const ASYS_TCHAR *mod_name) const
{
ACE_TRACE ("ACE_Stream_Type::find");
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
index b6a8ef1c5e0..34bd9dc2737 100644
--- a/ace/Service_Types.h
+++ b/ace/Service_Types.h
@@ -36,24 +36,24 @@ class ACE_Export ACE_Service_Type_Impl
public:
// = Initialization and termination methods.
ACE_Service_Type_Impl (void *object,
- const char *s_name,
+ const ASYS_TCHAR *s_name,
u_int flags = 0);
virtual ~ACE_Service_Type_Impl (void);
// = Pure virtual interface (must be defined by the subclass).
virtual int suspend (void) const = 0;
virtual int resume (void) const = 0;
- virtual int init (int argc, char *argv[]) const = 0;
+ virtual int init (int argc, ASYS_TCHAR *argv[]) const = 0;
virtual int fini (void) const;
- virtual int info (char **str, size_t len) const = 0;
+ virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
void *object (void) const;
// The pointer to the service.
- const char *name (void) const;
+ const ASYS_TCHAR *name (void) const;
// Get the name of the service.
- void name (const char *);
+ void name (const ASYS_TCHAR *);
// Set the name of the service.
void dump (void) const;
@@ -63,7 +63,7 @@ public:
// Declare the dynamic allocation hooks.
protected:
- const char *name_;
+ const ASYS_TCHAR *name_;
// Name of the service.
void *obj_;
@@ -82,15 +82,15 @@ class ACE_Export ACE_Service_Object_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Service_Object_Type (void *so,
- const char *name,
+ const ASYS_TCHAR *name,
u_int flags = 0);
// = Implement the hooks for <ACE_Service_Objects>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, char *argv[]) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (char **str, size_t len) const;
+ virtual int info (ASYS_TCHAR **str, size_t len) const;
};
class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
@@ -101,15 +101,15 @@ class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Module_Type (void *m, // Really an <ACE_Module> *.
- const char *identifier,
+ const ASYS_TCHAR *identifier,
u_int flags = 0);
// = Implement the hooks for <ACE_Modules>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, char *argv[]) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (char **str, size_t len) const;
+ virtual int info (ASYS_TCHAR **str, size_t len) const;
// Get/set the link pointer.
ACE_Module_Type *link (void) const;
@@ -134,15 +134,15 @@ class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Stream_Type (void *s, // Really an <ACE_Stream> *.
- const char *identifier,
+ const ASYS_TCHAR *identifier,
u_int flags = 0);
// = Implement the hooks for <ACE_Streams>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, char *argv[]) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (char **str, size_t len) const;
+ virtual int info (ASYS_TCHAR **str, size_t len) const;
int push (ACE_Module_Type *new_module);
// Add a new <ACE_Module> to the top of the <ACE_Stream>.
@@ -150,7 +150,7 @@ public:
int remove (ACE_Module_Type *module);
// Search for <module> and remove it from the <ACE_Stream>.
- ACE_Module_Type *find (const char *mod_name) const;
+ ACE_Module_Type *find (const ASYS_TCHAR *mod_name) const;
// Locate the <ACE_Module> with <mod_name>.
void dump (void) const;
diff --git a/ace/Service_Types.i b/ace/Service_Types.i
index e0ee52d1166..0a63fca58c4 100644
--- a/ace/Service_Types.i
+++ b/ace/Service_Types.i
@@ -10,7 +10,7 @@ ACE_Service_Type_Impl::object (void) const
return this->obj_;
}
-ACE_INLINE const char *
+ACE_INLINE const ASYS_TCHAR *
ACE_Service_Type_Impl::name (void) const
{
ACE_TRACE ("ACE_Service_Type_Impl::name");
@@ -18,13 +18,13 @@ ACE_Service_Type_Impl::name (void) const
}
ACE_INLINE void
-ACE_Service_Type_Impl::name (const char *n)
+ACE_Service_Type_Impl::name (const ASYS_TCHAR *n)
{
ACE_TRACE ("ACE_Service_Type_Impl::name");
- delete [] (char *) this->name_;
- ACE_NEW (this->name_, char[::strlen (n) + 1]);
- ACE_OS::strcpy ((char *) this->name_, n);
+ delete [] (ASYS_TCHAR *) this->name_;
+ ACE_NEW (this->name_, ASYS_TCHAR[ACE_OS::strlen (n) + 1]);
+ ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, n);
}
ACE_INLINE int
@@ -42,7 +42,7 @@ ACE_Service_Object_Type::resume (void) const
}
ACE_INLINE int
-ACE_Service_Object_Type::info (char **str, size_t len) const
+ACE_Service_Object_Type::info (ASYS_TCHAR **str, size_t len) const
{
ACE_TRACE ("ACE_Service_Object_Type::info");
return ((ACE_Service_Object *) this->object ())->info (str, len);
diff --git a/ace/Shared_Object.cpp b/ace/Shared_Object.cpp
index a18c728959e..421a6eb1b44 100644
--- a/ace/Shared_Object.cpp
+++ b/ace/Shared_Object.cpp
@@ -14,7 +14,7 @@
// Initializes object when dynamic linking occurs.
int
-ACE_Shared_Object::init (int, char *[])
+ACE_Shared_Object::init (int, ASYS_TCHAR *[])
{
ACE_TRACE ("ACE_Shared_Object::init");
return -1;
@@ -32,7 +32,7 @@ ACE_Shared_Object::fini (void)
// Returns information on active object.
int
-ACE_Shared_Object::info (char **, size_t) const
+ACE_Shared_Object::info (ASYS_TCHAR **, size_t) const
{
ACE_TRACE ("ACE_Shared_Object::info");
return -1;
diff --git a/ace/Shared_Object.h b/ace/Shared_Object.h
index 9e2a58bb8d8..3803fcbd9ca 100644
--- a/ace/Shared_Object.h
+++ b/ace/Shared_Object.h
@@ -26,13 +26,13 @@ class ACE_Export ACE_Shared_Object
// Provide the abstract base class used to access dynamic
// linking facilities.
public:
- virtual int init (int argc, char *argv[]);
+ virtual int init (int argc, ASYS_TCHAR *argv[]);
// Initializes object when dynamic linking occurs.
virtual int fini (void);
// Terminates object when dynamic unlinking occurs.
- virtual int info (char **info_string, size_t length = 0) const;
+ virtual int info (ASYS_TCHAR **info_string, size_t length = 0) const;
// Returns information on active object.
virtual ~ACE_Shared_Object (void);
diff --git a/ace/Stream.cpp b/ace/Stream.cpp
index 71b56bf990d..ae4d1457c5d 100644
--- a/ace/Stream.cpp
+++ b/ace/Stream.cpp
@@ -139,7 +139,7 @@ ACE_Stream<ACE_SYNCH_USE>::pop (int flags)
// ACE_Stream.
template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::remove (const char *name,
+ACE_Stream<ACE_SYNCH_USE>::remove (const ASYS_TCHAR *name,
int flags)
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::remove");
@@ -172,7 +172,7 @@ ACE_Stream<ACE_SYNCH_USE>::remove (const char *name,
}
template <ACE_SYNCH_DECL> ACE_Module<ACE_SYNCH_USE> *
-ACE_Stream<ACE_SYNCH_USE>::find (const char *name)
+ACE_Stream<ACE_SYNCH_USE>::find (const ASYS_TCHAR *name)
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::find");
for (ACE_Module<ACE_SYNCH_USE> *mod = this->stream_head_;
diff --git a/ace/Stream.h b/ace/Stream.h
index cf4e7f3f81a..0a51044dbe8 100644
--- a/ace/Stream.h
+++ b/ace/Stream.h
@@ -84,7 +84,7 @@ public:
// Return the top module on the stream (right below the stream
// head).
- int remove (const char *mod, int flags = M_DELETE);
+ int remove (const ASYS_TCHAR *mod, int flags = M_DELETE);
// Remove the named module <mod> from the stream. This bypasses the
// strict LIFO ordering of push() and pop().
@@ -94,7 +94,7 @@ public:
ACE_Module<ACE_SYNCH_USE> *tail (void);
// Return current stream tail.
- ACE_Module<ACE_SYNCH_USE> *find (const char *mod);
+ ACE_Module<ACE_SYNCH_USE> *find (const ASYS_TCHAR *mod);
// Find a particular ACE_Module.
int link (ACE_Stream<ACE_SYNCH_USE> &);
diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp
index 073293ebb06..416acfeafa2 100644
--- a/ace/Stream_Modules.cpp
+++ b/ace/Stream_Modules.cpp
@@ -123,17 +123,17 @@ ACE_Stream_Head<ACE_SYNCH_USE>::put (ACE_Message_Block *mb,
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::init (int, char *[])
+ACE_Stream_Head<ACE_SYNCH_USE>::init (int, ASYS_TCHAR *[])
{
ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::info (char **strp, size_t length) const
+ACE_Stream_Head<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::info");
- const char *name = this->name ();
+ const ASYS_TCHAR *name = this->name ();
if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
return -1;
@@ -262,17 +262,17 @@ ACE_Stream_Tail<ACE_SYNCH_USE>::put (ACE_Message_Block *mb,
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::init (int, char *[])
+ACE_Stream_Tail<ACE_SYNCH_USE>::init (int, ASYS_TCHAR *[])
{
ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::info (char **strp, size_t length) const
+ACE_Stream_Tail<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::info");
- const char *name = this->name ();
+ const ASYS_TCHAR *name = this->name ();
if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
return -1;
@@ -338,18 +338,18 @@ ACE_Thru_Task<ACE_SYNCH_USE>::put (ACE_Message_Block *msg,
}
template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::init (int, char *[])
+ACE_Thru_Task<ACE_SYNCH_USE>::init (int, ASYS_TCHAR *[])
{
ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::info (char **strp,
- size_t length) const
+ACE_Thru_Task<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp,
+ size_t length) const
{
ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::info");
- const char *name = this->name ();
+ const ASYS_TCHAR *name = this->name ();
if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
return -1;
diff --git a/ace/Stream_Modules.h b/ace/Stream_Modules.h
index 1ad9aaab381..bacbf28e7ef 100644
--- a/ace/Stream_Modules.h
+++ b/ace/Stream_Modules.h
@@ -38,8 +38,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, char *argv[]);
- virtual int info (char **info_string, size_t length) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int info (ASYS_TCHAR **info_string, size_t length) const;
virtual int fini (void);
void dump (void) const;
@@ -73,8 +73,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, char *argv[]);
- virtual int info (char **info_string, size_t length) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int info (ASYS_TCHAR **info_string, size_t length) const;
virtual int fini (void);
void dump (void) const;
@@ -109,8 +109,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, char *argv[]);
- virtual int info (char **info_string, size_t length) const;
+ virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int info (ASYS_TCHAR **info_string, size_t length) const;
virtual int fini (void);
void dump (void) const;
diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h
index f9fb133e73d..ab711cf451d 100644
--- a/ace/Svc_Conf.h
+++ b/ace/Svc_Conf.h
@@ -63,7 +63,7 @@ extern int ace_yyleng;
extern ACE_Obstack *ace_obstack;
// Efficient memory allocation technique
-ACE_Service_Type_Impl *ace_create_service_type (const char *, int, void *, unsigned int);
+ACE_Service_Type_Impl *ace_create_service_type (const ASYS_TCHAR *, int, void *, unsigned int);
// Factory that creates a new ACE_Service_Type_Impl.
typedef union
diff --git a/ace/Task.cpp b/ace/Task.cpp
index 81155c17456..9ef0bfed31c 100644
--- a/ace/Task.cpp
+++ b/ace/Task.cpp
@@ -3,7 +3,9 @@
#define ACE_BUILD_DLL
#include "ace/Task.h"
#include "ace/Module.h"
+#if !defined (ACE_HAS_WINCE)
#include "ace/Service_Config.h"
+#endif /* !ACE_HAS_WINCE */
#if !defined (__ACE_INLINE__)
#include "ace/Task.i"
diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp
index 0b5874cf44c..d48dd6d9a62 100644
--- a/ace/Task_T.cpp
+++ b/ace/Task_T.cpp
@@ -78,7 +78,7 @@ ACE_Task<ACE_SYNCH_USE>::sibling (void)
return this->mod_->sibling (this);
}
-template<ACE_SYNCH_DECL> const char *
+template<ACE_SYNCH_DECL> const ASYS_TCHAR *
ACE_Task<ACE_SYNCH_USE>::name (void) const
{
ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::name");
diff --git a/ace/Task_T.h b/ace/Task_T.h
index 68f92de669d..e3d2aecb5dc 100644
--- a/ace/Task_T.h
+++ b/ace/Task_T.h
@@ -77,7 +77,7 @@ public: // Should be protected:
// Transfer message to the adjacent ACE_Task in a ACE_Stream.
// = ACE_Task utility routines to identify names et al.
- const char *name (void) const;
+ const ASYS_TCHAR *name (void) const;
// Return the name of the enclosing Module if there's one associated
// with the Task, else returns 0.
diff --git a/ace/Token_Manager.cpp b/ace/Token_Manager.cpp
index c49db5f0a25..7536480ef26 100644
--- a/ace/Token_Manager.cpp
+++ b/ace/Token_Manager.cpp
@@ -64,7 +64,7 @@ ACE_Token_Manager::instance (void)
void
ACE_Token_Manager::get_token (ACE_Token_Proxy *proxy,
- const char *token_name)
+ const ASYS_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Manager::get");
// Hmm. I think this makes sense. We perform our own locking here
@@ -171,7 +171,7 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
if (debug_)
{
ACE_DEBUG ((LM_DEBUG,
- "%s owns %s and is waiting for %s.\n",
+ ASYS_TEXT ("%s owns %s and is waiting for %s.\n"),
e->client_id (),
token->name (),
twf->name ()));
@@ -188,7 +188,7 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
ACE_Tokens *
-ACE_Token_Manager::token_waiting_for (const char *client_id)
+ACE_Token_Manager::token_waiting_for (const ASYS_TCHAR *client_id)
{
COLLECTION_ITERATOR iterator (collection_);
for (COLLECTION_ENTRY *temp = 0;
@@ -226,8 +226,8 @@ ACE_Token_Manager::release_token (ACE_Tokens *&token)
// we did not find one in the collection
{
errno = ENOENT;
- ACE_ERROR ((LM_ERROR, "Token Manager could not release %s:%d\n",
- token->name (), token->type ()));
+ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Token Manager could not release %s:%d\n"),
+ ASYS_MULTIBYTE_STRING (token->name ()), token->type ()));
// @@ bad
}
else
diff --git a/ace/Token_Manager.h b/ace/Token_Manager.h
index dd3cb0c30ba..381c47d3f39 100644
--- a/ace/Token_Manager.h
+++ b/ace/Token_Manager.h
@@ -49,7 +49,7 @@ public:
static ACE_Token_Manager *instance (void);
void instance (ACE_Token_Manager *);
- void get_token (ACE_Token_Proxy *, const char *token_name);
+ void get_token (ACE_Token_Proxy *, const ASYS_TCHAR *token_name);
// The Token manager uses ACE_Token_Proxy::token_id_ to look for
// an existing token. If none is found, the Token Manager calls
// ACE_Token_Proxy::create_token to create a new one. When
@@ -88,7 +88,7 @@ private:
static ACE_Token_Manager *token_manager_;
// pointer to singleton token manager.
- ACE_Tokens *token_waiting_for (const char *client_id);
+ ACE_Tokens *token_waiting_for (const ASYS_TCHAR *client_id);
// return the token that the given client_id is waiting for, if any
ACE_TOKEN_CONST::MUTEX lock_;
diff --git a/ace/config-WinCE.h b/ace/config-WinCE.h
index ce2c00291d3..b81930f82ff 100644
--- a/ace/config-WinCE.h
+++ b/ace/config-WinCE.h
@@ -88,6 +88,11 @@
// temporary workspace
#define FILE void // Try to map FILE* to HANDLE
#define ostream FILE // Fake a ostream for now.
+#if !defined (BUFSIZ)
+# define BUFSIZ 1024
+#endif /* BUFSIZ */
+
+#define EOF -1
typedef void (*__sighandler_t)(int); // keep Signal compilation happy
typedef long off_t;