summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/ACE.cpp590
-rw-r--r--ace/ACE.h125
-rw-r--r--ace/ACE.i33
-rw-r--r--ace/ARGV.cpp78
-rw-r--r--ace/ARGV.h36
-rw-r--r--ace/ARGV.i14
-rw-r--r--ace/ATM_Addr.cpp36
-rw-r--r--ace/ATM_Addr.h10
-rw-r--r--ace/ATM_Connector.i4
-rw-r--r--ace/ATM_QoS.cpp4
-rw-r--r--ace/Acceptor.cpp104
-rw-r--r--ace/Acceptor.h26
-rw-r--r--ace/Activation_Queue.cpp6
-rw-r--r--ace/Addr.cpp4
-rw-r--r--ace/Arg_Shifter.cpp18
-rw-r--r--ace/Arg_Shifter.h14
-rw-r--r--ace/Asynch_Acceptor.cpp40
-rw-r--r--ace/Asynch_IO.cpp12
-rw-r--r--ace/Based_Pointer_T.cpp8
-rw-r--r--ace/Basic_Types.h11
-rw-r--r--ace/CLASSIX/CLASSIX_CLD_Connector.cpp2
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Acceptor.cpp4
-rw-r--r--ace/CLASSIX/CLASSIX_Port.cpp4
-rw-r--r--ace/CLASSIX/CLASSIX_Port.h2
-rw-r--r--ace/CLASSIX/CLASSIX_Select_Reactor.cpp4
-rw-r--r--ace/CORBA_Handler.cpp20
-rw-r--r--ace/Cache_Map_Manager_T.cpp4
-rw-r--r--ace/Cached_Connect_Strategy_T.cpp4
-rw-r--r--ace/Caching_Strategies_T.i4
-rw-r--r--ace/Capabilities.cpp171
-rw-r--r--ace/Capabilities.h33
-rw-r--r--ace/Capabilities.i4
-rw-r--r--ace/Configuration.cpp314
-rw-r--r--ace/Configuration.h78
-rw-r--r--ace/Connector.cpp30
-rw-r--r--ace/Connector.h6
-rw-r--r--ace/Containers_T.cpp26
-rw-r--r--ace/DEV_Addr.cpp4
-rw-r--r--ace/DEV_Addr.h15
-rw-r--r--ace/DEV_Addr.i22
-rw-r--r--ace/DEV_Connector.i4
-rw-r--r--ace/DLL.cpp18
-rw-r--r--ace/DLL.h8
-rw-r--r--ace/Dirent.h4
-rw-r--r--ace/Dirent.i8
-rw-r--r--ace/Dynamic_Service.cpp4
-rw-r--r--ace/Dynamic_Service.h2
-rw-r--r--ace/Env_Value_T.h34
-rw-r--r--ace/Env_Value_T.i8
-rw-r--r--ace/FIFO.cpp8
-rw-r--r--ace/FIFO.h8
-rw-r--r--ace/FIFO.i2
-rw-r--r--ace/FIFO_Recv.cpp8
-rw-r--r--ace/FIFO_Recv.h4
-rw-r--r--ace/FIFO_Recv_Msg.cpp6
-rw-r--r--ace/FIFO_Recv_Msg.h4
-rw-r--r--ace/FIFO_Send.cpp8
-rw-r--r--ace/FIFO_Send.h4
-rw-r--r--ace/FIFO_Send_Msg.cpp6
-rw-r--r--ace/FIFO_Send_Msg.h4
-rw-r--r--ace/FILE_Addr.cpp25
-rw-r--r--ace/FILE_Addr.h15
-rw-r--r--ace/FILE_Addr.i2
-rw-r--r--ace/FILE_Connector.cpp2
-rw-r--r--ace/FILE_Connector.i4
-rw-r--r--ace/Filecache.cpp124
-rw-r--r--ace/Filecache.h40
-rw-r--r--ace/Functor.h178
-rw-r--r--ace/Functor.i109
-rw-r--r--ace/Future.cpp6
-rw-r--r--ace/Get_Opt.cpp20
-rw-r--r--ace/Get_Opt.h12
-rw-r--r--ace/Handle_Set.cpp20
-rw-r--r--ace/Hash_Map_Manager_T.cpp12
-rw-r--r--ace/Hash_Map_Manager_T.i4
-rw-r--r--ace/High_Res_Timer.cpp54
-rw-r--r--ace/High_Res_Timer.h9
-rw-r--r--ace/INET_Addr.cpp102
-rw-r--r--ace/INET_Addr.h38
-rw-r--r--ace/INET_Addr.i2
-rw-r--r--ace/IO_SAP.cpp4
-rw-r--r--ace/IPC_SAP.cpp4
-rw-r--r--ace/LSOCK.cpp2
-rw-r--r--ace/LSOCK_CODgram.cpp2
-rw-r--r--ace/LSOCK_Connector.cpp2
-rw-r--r--ace/LSOCK_Dgram.cpp4
-rw-r--r--ace/Local_Name_Space.cpp4
-rw-r--r--ace/Local_Name_Space.h4
-rw-r--r--ace/Local_Name_Space_T.cpp30
-rw-r--r--ace/Local_Name_Space_T.h6
-rw-r--r--ace/Local_Tokens.cpp166
-rw-r--r--ace/Local_Tokens.h78
-rw-r--r--ace/Local_Tokens.i32
-rw-r--r--ace/Log_Msg.cpp233
-rw-r--r--ace/Log_Msg.h48
-rw-r--r--ace/Log_Record.cpp88
-rw-r--r--ace/Log_Record.h20
-rw-r--r--ace/Log_Record.i2
-rw-r--r--ace/MEM_Acceptor.cpp14
-rw-r--r--ace/MEM_Acceptor.h6
-rw-r--r--ace/MEM_Acceptor.i4
-rw-r--r--ace/MEM_Addr.cpp14
-rw-r--r--ace/MEM_Addr.h14
-rw-r--r--ace/MEM_Addr.i4
-rw-r--r--ace/MEM_Connector.cpp8
-rw-r--r--ace/MEM_SAP.cpp4
-rw-r--r--ace/MEM_SAP.h2
-rw-r--r--ace/Malloc.cpp110
-rw-r--r--ace/Malloc_T.cpp61
-rw-r--r--ace/Malloc_T.h26
-rw-r--r--ace/Malloc_T.i10
-rw-r--r--ace/Map_Manager.cpp12
-rw-r--r--ace/Map_Manager.i4
-rw-r--r--ace/Mem_Map.cpp26
-rw-r--r--ace/Mem_Map.h10
-rw-r--r--ace/Mem_Map.i2
-rw-r--r--ace/Memory_Pool.cpp104
-rw-r--r--ace/Memory_Pool.h16
-rw-r--r--ace/Message_Block.cpp66
-rw-r--r--ace/Message_Queue.cpp34
-rw-r--r--ace/Message_Queue_T.cpp56
-rw-r--r--ace/Module.cpp8
-rw-r--r--ace/Module.h10
-rw-r--r--ace/Module.i4
-rw-r--r--ace/NT_Service.cpp75
-rw-r--r--ace/NT_Service.h38
-rw-r--r--ace/NT_Service.i10
-rw-r--r--ace/Name_Proxy.cpp44
-rw-r--r--ace/Name_Request_Reply.cpp46
-rw-r--r--ace/Name_Space.cpp4
-rw-r--r--ace/Name_Space.h4
-rw-r--r--ace/Naming_Context.cpp56
-rw-r--r--ace/Naming_Context.h36
-rw-r--r--ace/OS.cpp547
-rw-r--r--ace/OS.h1147
-rw-r--r--ace/OS.i2010
-rw-r--r--ace/Object_Manager.cpp10
-rw-r--r--ace/Obstack.cpp28
-rw-r--r--ace/Obstack.h10
-rw-r--r--ace/POSIX_Asynch_IO.cpp4
-rw-r--r--ace/Parse_Node.cpp108
-rw-r--r--ace/Parse_Node.h38
-rw-r--r--ace/Pipe.cpp20
-rw-r--r--ace/Proactor.cpp30
-rw-r--r--ace/Process.cpp74
-rw-r--r--ace/Process.h50
-rw-r--r--ace/Process.i20
-rw-r--r--ace/Process_Manager.cpp32
-rw-r--r--ace/QoS_Manager.cpp4
-rw-r--r--ace/QoS_Session_Factory.cpp14
-rw-r--r--ace/QoS_Session_Impl.cpp8
-rw-r--r--ace/RB_Tree.cpp56
-rw-r--r--ace/RB_Tree.i4
-rw-r--r--ace/README11
-rw-r--r--ace/Read_Buffer.cpp10
-rw-r--r--ace/Registry.cpp544
-rw-r--r--ace/Registry.h56
-rw-r--r--ace/Registry_Name_Space.cpp20
-rw-r--r--ace/Remote_Name_Space.cpp34
-rw-r--r--ace/Remote_Name_Space.h8
-rw-r--r--ace/Remote_Tokens.cpp86
-rw-r--r--ace/Remote_Tokens.h16
-rw-r--r--ace/Remote_Tokens.i12
-rw-r--r--ace/SOCK.cpp8
-rw-r--r--ace/SOCK_Acceptor.cpp8
-rw-r--r--ace/SOCK_CODgram.cpp2
-rw-r--r--ace/SOCK_Connector.cpp8
-rw-r--r--ace/SOCK_Dgram.cpp8
-rw-r--r--ace/SOCK_Dgram_Bcast.cpp12
-rw-r--r--ace/SOCK_Dgram_Bcast.h6
-rw-r--r--ace/SOCK_Dgram_Mcast.cpp20
-rw-r--r--ace/SOCK_Dgram_Mcast.h22
-rw-r--r--ace/SOCK_Dgram_Mcast_QoS.cpp8
-rw-r--r--ace/SOCK_Dgram_Mcast_QoS.h4
-rw-r--r--ace/SPIPE_Acceptor.cpp31
-rw-r--r--ace/SPIPE_Addr.cpp20
-rw-r--r--ace/SPIPE_Addr.h20
-rw-r--r--ace/SPIPE_Addr.i17
-rw-r--r--ace/SPIPE_Connector.cpp4
-rw-r--r--ace/SString.cpp138
-rw-r--r--ace/SString.h74
-rw-r--r--ace/SString.i45
-rw-r--r--ace/SV_Message_Queue.cpp4
-rw-r--r--ace/SV_Semaphore_Complex.cpp4
-rw-r--r--ace/SV_Semaphore_Simple.cpp6
-rw-r--r--ace/SV_Shared_Memory.cpp8
-rw-r--r--ace/Select_Reactor_Base.cpp26
-rw-r--r--ace/Select_Reactor_T.cpp48
-rw-r--r--ace/Service_Config.cpp115
-rw-r--r--ace/Service_Config.h40
-rw-r--r--ace/Service_Config.i18
-rw-r--r--ace/Service_Manager.cpp46
-rw-r--r--ace/Service_Manager.h4
-rw-r--r--ace/Service_Object.cpp11
-rw-r--r--ace/Service_Object.h15
-rw-r--r--ace/Service_Object.i20
-rw-r--r--ace/Service_Repository.cpp16
-rw-r--r--ace/Service_Repository.h10
-rw-r--r--ace/Service_Types.cpp38
-rw-r--r--ace/Service_Types.h32
-rw-r--r--ace/Service_Types.i8
-rw-r--r--ace/Shared_Memory_MM.cpp2
-rw-r--r--ace/Shared_Memory_MM.h6
-rw-r--r--ace/Shared_Memory_MM.i4
-rw-r--r--ace/Shared_Object.cpp4
-rw-r--r--ace/Shared_Object.h4
-rw-r--r--ace/Singleton.cpp8
-rw-r--r--ace/Stats.cpp32
-rw-r--r--ace/Stats.h2
-rw-r--r--ace/Stats.i2
-rw-r--r--ace/Strategies_T.cpp18
-rw-r--r--ace/Strategies_T.i26
-rw-r--r--ace/Stream.cpp26
-rw-r--r--ace/Stream.h4
-rw-r--r--ace/Stream_Modules.cpp18
-rw-r--r--ace/Stream_Modules.h12
-rw-r--r--ace/Svc_Conf.h10
-rw-r--r--ace/Svc_Conf.l8
-rw-r--r--ace/Svc_Conf.y54
-rw-r--r--ace/Svc_Conf_l.cpp138
-rw-r--r--ace/Svc_Conf_y.cpp58
-rw-r--r--ace/Svc_Handler.cpp20
-rw-r--r--ace/Svc_Handler.h4
-rw-r--r--ace/Synch.cpp112
-rw-r--r--ace/Synch.h58
-rw-r--r--ace/Synch.i8
-rw-r--r--ace/Synch_T.cpp40
-rw-r--r--ace/Synch_T.h6
-rw-r--r--ace/Synch_T.i2
-rw-r--r--ace/System_Time.cpp8
-rw-r--r--ace/System_Time.h4
-rw-r--r--ace/TLI.cpp2
-rw-r--r--ace/TLI_Acceptor.cpp4
-rw-r--r--ace/TLI_Connector.i2
-rw-r--r--ace/TP_Reactor.cpp2
-rw-r--r--ace/TP_Reactor.i2
-rw-r--r--ace/Task_T.cpp16
-rw-r--r--ace/Task_T.h2
-rw-r--r--ace/Template_Instantiations.cpp32
-rw-r--r--ace/Thread_Manager.cpp16
-rw-r--r--ace/Time_Request_Reply.cpp16
-rw-r--r--ace/Timeprobe_T.cpp2
-rw-r--r--ace/Timer_Hash_T.cpp8
-rw-r--r--ace/Timer_Heap_T.cpp12
-rw-r--r--ace/Timer_List_T.cpp4
-rw-r--r--ace/Timer_Queue_Adapters.cpp12
-rw-r--r--ace/Timer_Queue_T.cpp8
-rw-r--r--ace/Timer_Wheel_T.cpp8
-rw-r--r--ace/Token.cpp12
-rw-r--r--ace/Token.h2
-rw-r--r--ace/Token_Collection.cpp42
-rw-r--r--ace/Token_Collection.h20
-rw-r--r--ace/Token_Collection.i2
-rw-r--r--ace/Token_Invariants.cpp22
-rw-r--r--ace/Token_Invariants.h14
-rw-r--r--ace/Token_Manager.cpp20
-rw-r--r--ace/Token_Manager.h4
-rw-r--r--ace/Token_Request_Reply.cpp35
-rw-r--r--ace/Token_Request_Reply.h16
-rw-r--r--ace/Token_Request_Reply.i19
-rw-r--r--ace/Trace.cpp12
-rw-r--r--ace/Trace.h6
-rw-r--r--ace/UPIPE_Acceptor.cpp16
-rw-r--r--ace/UPIPE_Connector.cpp20
-rw-r--r--ace/UPIPE_Connector.i16
-rw-r--r--ace/WFMO_Reactor.cpp54
-rw-r--r--ace/WFMO_Reactor.i28
-rw-r--r--ace/WIN32_Asynch_IO.cpp24
-rw-r--r--ace/WIN32_Proactor.cpp16
-rw-r--r--ace/XTI_ATM_Mcast.i2
-rw-r--r--ace/ace_wchar.h229
-rw-r--r--ace/config-WinCE.h8
-rw-r--r--ace/config-all.h4
-rw-r--r--ace/config-ghs-common.h1
-rw-r--r--ace/config-tandem.h3
-rw-r--r--ace/config-win32-borland.h7
-rw-r--r--ace/config-win32-common.h38
-rw-r--r--ace/config-win32-msvc.h10
-rw-r--r--ace/config-win32-visualage.h9
279 files changed, 5499 insertions, 6518 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 2401c2dc1b4..63414c06cdc 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -22,7 +22,7 @@ ACE_RCSID(ace, ACE, "$Id$")
char ACE::debug_ = 0;
// Hex characters.
-const char ACE::hex_chars_[] = "0123456789abcdef";
+const ACE_TCHAR ACE::hex_chars_[] = ACE_TEXT ("0123456789abcdef");
// Size of a VM page.
size_t ACE::pagesize_ = 0;
@@ -114,7 +114,7 @@ ACE::beta_version (void)
return ACE_BETA_VERSION;
}
-const char*
+const ACE_TCHAR *
ACE::compiler_name (void)
{
#ifdef ACE_CC_NAME
@@ -264,53 +264,7 @@ ACE::strsplit_r (char *str,
return result;
}
-const char *
-ACE::execname (const char *old_name)
-{
-#if defined (ACE_WIN32)
- if (ACE_OS::strstr (old_name, ".exe") == 0)
- {
- char *new_name;
-
- size_t size =
- ACE_OS::strlen (old_name)
- + ACE_OS::strlen (".exe")
- + 1;
-
- ACE_NEW_RETURN (new_name,
- char[size],
- 0);
- char *end = new_name;
-
- end = ACE_OS::strecpy (new_name, old_name);
-
- // Concatenate the .exe suffix onto the end of the executable.
- ACE_OS::strcpy (end, ".exe");
-
- return new_name;
- }
-#endif /* ACE_WIN32 */
- return old_name;
-}
-
-#if defined (ACE_HAS_UNICODE)
-size_t
-ACE::strrepl (wchar_t *s, wchar_t search, wchar_t replace)
-{
- ACE_TRACE ("ACE::strrepl");
-
- size_t replaced = 0;
-
- for (size_t i = 0; s[i] != '\0'; i++)
- if (s[i] == search)
- {
- s[i] = replace;
- replaced++;
- }
-
- return replaced;
-}
-
+#if defined (ACE_HAS_WCHAR)
wchar_t *
ACE::strsplit_r (wchar_t *str,
const wchar_t *token,
@@ -343,36 +297,36 @@ ACE::strsplit_r (wchar_t *str,
return result;
}
+#endif
-const wchar_t *
-ACE::execname (const wchar_t *old_name)
+const ACE_TCHAR *
+ACE::execname (const ACE_TCHAR *old_name)
{
#if defined (ACE_WIN32)
- if (ACE_OS::strstr (old_name, L".exe") == 0)
+ if (ACE_OS::strstr (old_name, ACE_TEXT (".exe")) == 0)
{
- wchar_t *new_name;
+ ACE_TCHAR *new_name;
size_t size =
ACE_OS::strlen (old_name)
- + ACE_OS::strlen (L".exe")
+ + ACE_OS::strlen (ACE_TEXT (".exe"))
+ 1;
ACE_NEW_RETURN (new_name,
- wchar_t[size],
+ ACE_TCHAR[size],
0);
- wchar_t *end = new_name;
+ ACE_TCHAR *end = new_name;
end = ACE_OS::strecpy (new_name, old_name);
// Concatenate the .exe suffix onto the end of the executable.
- ACE_OS::strcpy (end, L".exe");
+ ACE_OS::strcpy (end, ACE_TEXT (".exe"));
return new_name;
}
#endif /* ACE_WIN32 */
return old_name;
}
-#endif /* ACE_HAS_UNICODE */
u_long
ACE::hash_pjw (const char *str, size_t len)
@@ -402,7 +356,7 @@ ACE::hash_pjw (const char *str)
return ACE::hash_pjw (str, ACE_OS::strlen (str));
}
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
+#if defined (ACE_HAS_WCHAR)
u_long
ACE::hash_pjw (const wchar_t *str, size_t len)
{
@@ -410,6 +364,8 @@ ACE::hash_pjw (const wchar_t *str, size_t len)
for (size_t i = 0; i < len; i++)
{
+ // @@ UNICODE: Does this function do the correct thing with wchar's?
+
const wchar_t temp = str[i];
hash = (hash << 4) + (temp * 13);
@@ -430,37 +386,7 @@ ACE::hash_pjw (const wchar_t *str)
{
return ACE::hash_pjw (str, ACE_OS::strlen (str));
}
-#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-u_long
-ACE::hash_pjw (const ACE_USHORT16 *str, size_t len)
-{
- u_long hash = 0;
-
- for (size_t i = 0; i < len; i++)
- {
- const ACE_USHORT16 temp = str[i];
- hash = (hash << 4) + (temp * 13);
-
- u_long g = hash & 0xf0000000;
-
- if (g)
- {
- hash ^= (g >> 24);
- hash ^= g;
- }
- }
-
- return hash;
-}
-
-u_long
-ACE::hash_pjw (const ACE_USHORT16 *str)
-{
- return ACE::hash_pjw (str, ACE_OS::strlen (str));
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
+#endif /* ACE_HAS_WCHAR */
// The CRC routine was taken from the FreeBSD implementation of cksum,
// that falls under the following license:
@@ -628,9 +554,28 @@ ACE::strrepl (char *s, char search, char replace)
return replaced;
}
+#if defined (ACE_HAS_WCHAR)
+size_t
+ACE::strrepl (wchar_t *s, wchar_t search, wchar_t replace)
+{
+ ACE_TRACE ("ACE::strrepl");
+
+ size_t replaced = 0;
+
+ for (size_t i = 0; s[i] != '\0'; i++)
+ if (s[i] == search)
+ {
+ s[i] = replace;
+ replaced++;
+ }
+
+ return replaced;
+}
+#endif /* ACE_HAS_WCHAR */
+
#if !defined (ACE_HAS_WINCE)
-ASYS_TCHAR *
-ACE::strenvdup (const ASYS_TCHAR *str)
+ACE_TCHAR *
+ACE::strenvdup (const ACE_TCHAR *str)
{
ACE_TRACE ("ACE::strenvdup");
@@ -658,36 +603,29 @@ netsvc.so netsvc.so + warning libnetsvc.so
#if ! defined (ACE_PSOS_DIAB_MIPS)
int
-ACE::ldfind (const ASYS_TCHAR filename[],
- ASYS_TCHAR pathname[],
+ACE::ldfind (const ACE_TCHAR filename[],
+ ACE_TCHAR pathname[],
size_t maxpathnamelen)
{
ACE_TRACE ("ACE::ldfind");
#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && \
!defined (ACE_HAS_PHARLAP)
- ASYS_TCHAR expanded_filename[MAXPATHLEN];
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- if (::ExpandEnvironmentStringsA (filename,
- expanded_filename,
- (sizeof expanded_filename
- / sizeof (ASYS_TCHAR))))
-#else
- if (::ExpandEnvironmentStringsW (filename,
- expanded_filename,
- (sizeof expanded_filename
- / sizeof (ASYS_TCHAR))))
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
- filename = expanded_filename;
+ ACE_TCHAR expanded_filename[MAXPATHLEN];
+ if (ACE_TEXT_ExpandEnvironmentStrings (filename,
+ expanded_filename,
+ sizeof expanded_filename
+ / sizeof (ACE_TCHAR)))
+ filename = expanded_filename;
#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */
- ASYS_TCHAR tempcopy[MAXPATHLEN + 1];
- ASYS_TCHAR searchpathname[MAXPATHLEN + 1];
- ASYS_TCHAR searchfilename[MAXPATHLEN + 2];
+ ACE_TCHAR tempcopy[MAXPATHLEN + 1];
+ ACE_TCHAR searchpathname[MAXPATHLEN + 1];
+ ACE_TCHAR searchfilename[MAXPATHLEN + 2];
// Create a copy of filename to work with.
if (ACE_OS::strlen (filename) + 1
- > (sizeof tempcopy / sizeof (ASYS_TCHAR)))
+ > (sizeof tempcopy / sizeof (ACE_TCHAR)))
{
errno = ENOMEM;
return -1;
@@ -696,10 +634,10 @@ ACE::ldfind (const ASYS_TCHAR filename[],
ACE_OS::strcpy (tempcopy, filename);
// Insert canonical directory separators.
- ASYS_TCHAR *separator_ptr;
+ ACE_TCHAR *separator_ptr;
#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/')
- // Make all the directory separators ``canonical'' to simplify
+ // Make all the directory separators "canonical" to simplify
// subsequent code.
ACE::strrepl (tempcopy, ACE_DIRECTORY_SEPARATOR_CHAR, '/');
#endif /* ACE_DIRECTORY_SEPARATOR_CHAR */
@@ -724,10 +662,9 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// Check to see if this has an appropriate DLL suffix for the OS
// platform.
- ASYS_TCHAR *s = ACE_OS::strrchr (searchfilename, '.');
+ ACE_TCHAR *s = ACE_OS::strrchr (searchfilename, '.');
- const ASYS_TCHAR *dll_suffix =
- ASYS_TEXT (ACE_DLL_SUFFIX);
+ const ACE_TCHAR *dll_suffix = ACE_DLL_SUFFIX;
if (s != 0)
{
@@ -739,8 +676,8 @@ ACE::ldfind (const ASYS_TCHAR filename[],
if (ACE_OS::strcmp (s, dll_suffix) != 0)
{
ACE_ERROR ((LM_WARNING,
- ASYS_TEXT ("Warning: improper suffix for a ")
- ASYS_TEXT ("shared library on this platform: %s\n"),
+ ACE_TEXT ("Warning: improper suffix for a ")
+ ACE_TEXT ("shared library on this platform: %s\n"),
s));
}
}
@@ -749,7 +686,7 @@ ACE::ldfind (const ASYS_TCHAR filename[],
if (ACE_OS::strlen (searchfilename)
+ ACE_OS::strlen (ACE_DLL_PREFIX)
+ got_suffix ? 0 : ACE_OS::strlen (dll_suffix) >= (sizeof searchfilename /
- sizeof (ASYS_TCHAR)))
+ sizeof (ACE_TCHAR)))
{
errno = ENOMEM;
return -1;
@@ -790,19 +727,19 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// prefix.
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%s%s"),
+ ACE_TEXT ("%s%s%s"),
searchpathname,
searchfilename,
- got_suffix ? ACE_static_cast (char *,
- ASYS_TEXT (""))
- : ACE_static_cast (char *,
+ got_suffix ? ACE_static_cast (ACE_TCHAR *,
+ ACE_TEXT (""))
+ : ACE_static_cast (ACE_TCHAR *,
dll_suffix));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%s%s"),
+ ACE_TEXT ("%s%s%s"),
searchpathname,
searchfilename,
- got_suffix ? ASYS_TEXT ("") : dll_suffix);
+ got_suffix ? ACE_TEXT ("") : dll_suffix);
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
if (ACE_OS::access (pathname, F_OK) == 0)
return 0;
@@ -810,21 +747,21 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// Second, try matching the filename *with* adding a prefix.
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%s%s%s"),
+ ACE_TEXT ("%s%s%s%s"),
searchpathname,
ACE_DLL_PREFIX,
searchfilename,
- got_suffix ? ACE_static_cast (char *,
- ASYS_TEXT (""))
- : ACE_static_cast (char *,
+ got_suffix ? ACE_static_cast (ACE_TCHAR *,
+ ACE_TEXT (""))
+ : ACE_static_cast (ACE_TCHAR *,
dll_suffix));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%s%s%s"),
+ ACE_TEXT ("%s%s%s%s"),
searchpathname,
ACE_DLL_PREFIX,
searchfilename,
- got_suffix ? ASYS_TEXT ("") : dll_suffix);
+ got_suffix ? ACE_TEXT ("") : dll_suffix);
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
if (ACE_OS::access (pathname, F_OK) == 0)
return 0;
@@ -843,10 +780,11 @@ ACE::ldfind (const ASYS_TCHAR filename[],
#endif /* ACE_DEFAULT_LD_SEARCH_PATH */
#if defined (ACE_WIN32)
- char *ld_path_temp = 0;
+ ACE_TCHAR *ld_path_temp = 0;
if (ld_path != 0)
{
- ld_path_temp = (char *) ACE_OS::malloc (ACE_OS::strlen (ld_path) + 2);
+ ld_path_temp = (ACE_TCHAR *) ACE_OS::malloc ((ACE_OS::strlen (ld_path) + 2)
+ * sizeof (ACE_TCHAR));
if (ld_path_temp != 0)
{
ACE_OS::strcpy (ld_path_temp, ACE_LD_SEARCH_PATH_SEPARATOR_STR);
@@ -879,8 +817,8 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// Look at each dynamic lib directory in the search path.
- char *nextholder = 0;
- const char *path_entry =
+ ACE_TCHAR *nextholder = 0;
+ const ACE_TCHAR *path_entry =
ACE::strsplit_r (ld_path,
ACE_LD_SEARCH_PATH_SEPARATOR_STR,
nextholder);
@@ -915,21 +853,21 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// prefix.
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%c%s%s"),
+ ACE_TEXT ("%s%c%s%s"),
path_entry,
ACE_DIRECTORY_SEPARATOR_CHAR,
searchfilename,
- got_suffix ? ACE_static_cast (char *,
- ASYS_TEXT (""))
- : ACE_static_cast (char *,
+ got_suffix ? ACE_static_cast (ACE_TCHAR *,
+ ACE_TEXT (""))
+ : ACE_static_cast (ACE_TCHAR *,
dll_suffix));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%c%s%s"),
+ ACE_TEXT ("%s%c%s%s"),
path_entry,
ACE_DIRECTORY_SEPARATOR_CHAR,
searchfilename,
- got_suffix ? ASYS_TEXT ("") : dll_suffix);
+ got_suffix ? ACE_TEXT ("") : dll_suffix);
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
if (ACE_OS::access (pathname, F_OK) == 0)
break;
@@ -938,23 +876,23 @@ ACE::ldfind (const ASYS_TCHAR filename[],
// prefix.
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%c%s%s%s"),
+ ACE_TEXT ("%s%c%s%s%s"),
path_entry,
ACE_DIRECTORY_SEPARATOR_CHAR,
ACE_DLL_PREFIX,
searchfilename,
- got_suffix ? ACE_static_cast (char *,
- ASYS_TEXT (""))
- : ACE_static_cast (char *,
+ got_suffix ? ACE_static_cast (ACE_TCHAR *,
+ ACE_TEXT (""))
+ : ACE_static_cast (ACE_TCHAR *,
dll_suffix));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_OS::sprintf (pathname,
- ASYS_TEXT ("%s%c%s%s%s"),
+ ACE_TEXT ("%s%c%s%s%s"),
path_entry,
ACE_DIRECTORY_SEPARATOR_CHAR,
ACE_DLL_PREFIX,
searchfilename,
- got_suffix ? ASYS_TEXT ("") : dll_suffix);
+ got_suffix ? ACE_TEXT ("") : dll_suffix);
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
if (ACE_OS::access (pathname, F_OK) == 0)
break;
@@ -985,62 +923,40 @@ ACE::ldfind (const ASYS_TCHAR filename[],
}
FILE *
-ACE::ldopen (const ASYS_TCHAR *filename,
- const ASYS_TCHAR *type)
+ACE::ldopen (const ACE_TCHAR *filename,
+ const ACE_TCHAR *type)
{
ACE_TRACE ("ACE::ldopen");
- ASYS_TCHAR buf[MAXPATHLEN + 1];
+ ACE_TCHAR buf[MAXPATHLEN + 1];
if (ACE::ldfind (filename,
buf,
- sizeof (buf) /sizeof (ASYS_TCHAR)) == -1)
+ sizeof (buf) /sizeof (ACE_TCHAR)) == -1)
return 0;
else
return ACE_OS::fopen (buf, type);
}
int
-ACE::get_temp_dir (char *buffer, size_t buffer_len)
+ACE::get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len)
{
int result;
#if defined (ACE_WIN32)
-#if defined (ACE_HAS_WINCE)
- // Use the wchar version and convert it to char when
- // it returns.
-
- wchar_t *wcsBuffer;
- ACE_NEW_RETURN (wcsBuffer, wchar_t[buffer_len], -1);
-
- ACE_Auto_Basic_Array_Ptr<wchar_t> autoBuffer (wcsBuffer);
-
- result = ACE::get_temp_dir (autoBuffer.get (), buffer_len);
-
- if (result != -1) // Convert the string if there is no error
- ::WideCharToMultiByte (CP_ACP,
- 0,
- autoBuffer.get (),
- -1,
- buffer,
- buffer_len,
- NULL,
- NULL);
-#else /* ACE_HAS_WINCE */
- result = ::GetTempPathA (buffer_len, buffer);
+ result = ACE_TEXT_GetTempPath (buffer_len, buffer);
// Make sure to return -1 if there is an error
if (result == 0 && ::GetLastError () != ERROR_SUCCESS
|| result > ACE_static_cast (int, buffer_len))
result = -1;
-#endif /* ACE_HAS_WINCE */
#else /* ACE_WIN32 */
// On non-win32 platforms, check to see what the TMPDIR environment
// variable is defined to be. If it doesn't exist, just use /tmp
- const char *tmpdir = ACE_OS::getenv ("TMPDIR");
+ const ACE_TCHAR *tmpdir = ACE_OS::getenv (ACE_TEXT ("TMPDIR"));
if (tmpdir == NULL)
- tmpdir = "/tmp";
+ tmpdir = ACE_TEXT ("/tmp");
size_t len = ACE_OS::strlen (tmpdir);
@@ -1064,34 +980,8 @@ ACE::get_temp_dir (char *buffer, size_t buffer_len)
return result;
}
-int
-ACE::get_temp_dir (wchar_t *buffer, size_t buffer_len)
-{
-#if defined (ACE_WIN32)
- int result;
-
-#if defined (ACE_HAS_WINCE)
- result = ::CeGetTempPath (buffer_len, buffer);
-# else /* ACE_HAS_WINCE */
- result = ::GetTempPathW (buffer_len, buffer);
-# endif /* ACE_HAS_WINCE */
-
- // Make sure to return -1 if there is an error
- if (result == 0 && ::GetLastError () != ERROR_SUCCESS
- || result > ACE_static_cast (int, buffer_len))
- result = -1;
-
- return result;
-#else /* ACE_WIN32 */
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (buffer_len);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-
ACE_HANDLE
-ACE::open_temp_file (const char *name, int mode, int perm)
+ACE::open_temp_file (const ACE_TCHAR *name, int mode, int perm)
{
#if defined (ACE_WIN32)
return ACE_OS::open (name,
@@ -1114,11 +1004,11 @@ ACE::open_temp_file (const char *name, int mode, int perm)
}
#endif /* ! ACE_PSOS_DIAB_MIPS */
-const char *
-ACE::basename (const char *pathname, char delim)
+const ACE_TCHAR *
+ACE::basename (const ACE_TCHAR *pathname, ACE_TCHAR delim)
{
ACE_TRACE ("ACE::basename");
- const char *temp = ACE_OS::strrchr (pathname, delim);
+ const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim);
if (temp == 0)
return pathname;
@@ -1126,13 +1016,13 @@ ACE::basename (const char *pathname, char delim)
return temp + 1;
}
-const char *
-ACE::dirname (const char *pathname, char delim)
+const ACE_TCHAR *
+ACE::dirname (const ACE_TCHAR *pathname, ACE_TCHAR delim)
{
ACE_TRACE ("ACE::basename");
- static char return_dirname[MAXPATHLEN + 1];
+ static ACE_TCHAR return_dirname[MAXPATHLEN + 1];
- const char *temp = ACE_OS::strrchr (pathname, delim);
+ const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim);
if (temp == 0)
{
@@ -1151,20 +1041,6 @@ ACE::dirname (const char *pathname, char delim)
}
}
-#if defined (ACE_HAS_UNICODE)
-const wchar_t *
-ACE::basename (const wchar_t *pathname, wchar_t delim)
-{
- ACE_TRACE ("ACE::basename");
- const wchar_t *temp = ACE_OS::strrchr (pathname, delim);
-
- if (temp == 0)
- return pathname;
- else
- return temp + 1;
-}
-#endif /* ACE_HAS_UNICODE */
-
ssize_t
ACE::recv (ACE_HANDLE handle,
void *buf,
@@ -2901,13 +2777,13 @@ ACE::restore_non_blocking_mode (ACE_HANDLE handle,
int
ACE::format_hexdump (const char *buffer,
int size,
- ASYS_TCHAR *obuf,
+ ACE_TCHAR *obuf,
int obuf_sz)
{
ACE_TRACE ("ACE::format_hexdump");
u_char c;
- ASYS_TCHAR textver[16 + 1];
+ ACE_TCHAR textver[16 + 1];
int maxlen = (obuf_sz / 68) * 16;
@@ -2924,13 +2800,13 @@ ACE::format_hexdump (const char *buffer,
{
c = (u_char) buffer[(i << 4) + j];
ACE_OS::sprintf (obuf,
- ASYS_TEXT ("%02x "),
+ ACE_TEXT ("%02x "),
c);
obuf += 3;
if (j == 7)
{
ACE_OS::sprintf (obuf,
- ASYS_TEXT (" "));
+ ACE_TEXT (" "));
obuf++;
}
textver[j] = isprint (c) ? c : '.';
@@ -2939,7 +2815,7 @@ ACE::format_hexdump (const char *buffer,
textver[j] = 0;
ACE_OS::sprintf (obuf,
- ASYS_TEXT (" %s\n"),
+ ACE_TEXT (" %s\n"),
textver);
while (*obuf != '\0')
@@ -2952,13 +2828,13 @@ ACE::format_hexdump (const char *buffer,
{
c = (u_char) buffer[size - size % 16 + i];
ACE_OS::sprintf (obuf,
- ASYS_TEXT ("%02x "),
+ ACE_TEXT ("%02x "),
c);
obuf += 3;
if (i == 7)
{
ACE_OS::sprintf (obuf,
- ASYS_TEXT (" "));
+ ACE_TEXT (" "));
obuf++;
}
textver[i] = isprint (c) ? c : '.';
@@ -2967,14 +2843,14 @@ ACE::format_hexdump (const char *buffer,
for (i = size % 16; i < 16; i++)
{
ACE_OS::sprintf (obuf,
- ASYS_TEXT (" "));
+ ACE_TEXT (" "));
obuf += 3;
textver[i] = ' ';
}
textver[i] = 0;
ACE_OS::sprintf (obuf,
- ASYS_TEXT (" %s\n"),
+ ACE_TEXT (" %s\n"),
textver);
}
return size;
@@ -2986,8 +2862,8 @@ ACE::format_hexdump (const char *buffer,
// if unsuccessful, else returns pointer to beginning of the "time"
// portion of <day_and_time>.
-ASYS_TCHAR *
-ACE::timestamp (ASYS_TCHAR date_and_time[],
+ACE_TCHAR *
+ACE::timestamp (ACE_TCHAR date_and_time[],
int date_and_timelen)
{
//ACE_TRACE ("ACE::timestamp");
@@ -3005,7 +2881,7 @@ ACE::timestamp (ASYS_TCHAR date_and_time[],
::GetLocalTime (&local);
ACE_OS::sprintf (date_and_time,
- ASYS_TEXT ("%02d/%02d/%04d %02d.%02d.%02d.%06d"),
+ ACE_TEXT ("%02d/%02d/%04d %02d.%02d.%02d.%06d"),
(int) local.wMonth, // new, also the %02d in sprintf
(int) local.wDay, // new, also the %02d in sprintf
(int) local.wYear, // new, also the %02d in sprintf
@@ -3014,7 +2890,7 @@ ACE::timestamp (ASYS_TCHAR date_and_time[],
(int) local.wSecond,
(int) local.wMilliseconds * 1000);
#else /* UNIX */
- char timebuf[26]; // This magic number is based on the ctime(3c) man page.
+ ACE_TCHAR timebuf[26]; // This magic number is based on the ctime(3c) man page.
ACE_Time_Value cur_time = ACE_OS::gettimeofday ();
time_t secs = cur_time.sec ();
ACE_OS::ctime_r (&secs,
@@ -3182,7 +3058,7 @@ ACE::handle_timed_complete (ACE_HANDLE h,
ACE_HANDLE
ACE::handle_timed_open (ACE_Time_Value *timeout,
- LPCTSTR name,
+ const ACE_TCHAR *name,
int flags,
int perms)
{
@@ -3343,9 +3219,9 @@ ACE::bind_port (ACE_HANDLE handle,
// code from APUE.
int
-ACE::daemonize (const char pathname[],
+ACE::daemonize (const ACE_TCHAR pathname[],
int close_all_handles,
- const char program_name[])
+ const ACE_TCHAR program_name[])
{
ACE_TRACE ("ACE::daemonize");
#if !defined (ACE_LACKS_FORK)
@@ -3390,7 +3266,7 @@ ACE::daemonize (const char pathname[],
}
pid_t
-ACE::fork (const char *program_name,
+ACE::fork (const ACE_TCHAR *program_name,
int avoid_zombies)
{
if (avoid_zombies == 0)
@@ -3693,104 +3569,104 @@ ACE::is_prime (const u_long n,
return 0;
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE::sock_error (int error)
{
#if defined (ACE_WIN32)
- static ASYS_TCHAR unknown_msg[64];
+ static ACE_TCHAR unknown_msg[64];
switch (error)
{
case WSAVERNOTSUPPORTED:
- return ASYS_TEXT ("version of WinSock not supported");
+ return ACE_TEXT ("version of WinSock not supported");
/* NOTREACHED */
case WSASYSNOTREADY:
- return ASYS_TEXT ("WinSock not present or not responding");
+ return ACE_TEXT ("WinSock not present or not responding");
/* NOTREACHED */
case WSAEINVAL:
- return ASYS_TEXT ("app version not supported by DLL");
+ return ACE_TEXT ("app version not supported by DLL");
/* NOTREACHED */
case WSAHOST_NOT_FOUND:
- return ASYS_TEXT ("Authoritive: Host not found");
+ return ACE_TEXT ("Authoritive: Host not found");
/* NOTREACHED */
case WSATRY_AGAIN:
- return ASYS_TEXT ("Non-authoritive: host not found or server failure");
+ return ACE_TEXT ("Non-authoritive: host not found or server failure");
/* NOTREACHED */
case WSANO_RECOVERY:
- return ASYS_TEXT ("Non-recoverable: refused or not implemented");
+ return ACE_TEXT ("Non-recoverable: refused or not implemented");
/* NOTREACHED */
case WSANO_DATA:
- return ASYS_TEXT ("Valid name, no data record for type");
+ return ACE_TEXT ("Valid name, no data record for type");
/* NOTREACHED */
/*
case WSANO_ADDRESS:
return "Valid name, no MX record";
*/
case WSANOTINITIALISED:
- return ASYS_TEXT ("WSA Startup not initialized");
+ return ACE_TEXT ("WSA Startup not initialized");
/* NOTREACHED */
case WSAENETDOWN:
- return ASYS_TEXT ("Network subsystem failed");
+ return ACE_TEXT ("Network subsystem failed");
/* NOTREACHED */
case WSAEINPROGRESS:
- return ASYS_TEXT ("Blocking operation in progress");
+ return ACE_TEXT ("Blocking operation in progress");
/* NOTREACHED */
case WSAEINTR:
- return ASYS_TEXT ("Blocking call cancelled");
+ return ACE_TEXT ("Blocking call cancelled");
/* NOTREACHED */
case WSAEAFNOSUPPORT:
- return ASYS_TEXT ("address family not supported");
+ return ACE_TEXT ("address family not supported");
/* NOTREACHED */
case WSAEMFILE:
- return ASYS_TEXT ("no file handles available");
+ return ACE_TEXT ("no file handles available");
/* NOTREACHED */
case WSAENOBUFS:
- return ASYS_TEXT ("no buffer space available");
+ return ACE_TEXT ("no buffer space available");
/* NOTREACHED */
case WSAEPROTONOSUPPORT:
- return ASYS_TEXT ("specified protocol not supported");
+ return ACE_TEXT ("specified protocol not supported");
/* NOTREACHED */
case WSAEPROTOTYPE:
- return ASYS_TEXT ("protocol wrong type for this socket");
+ return ACE_TEXT ("protocol wrong type for this socket");
/* NOTREACHED */
case WSAESOCKTNOSUPPORT:
- return ASYS_TEXT ("socket type not supported for address family");
+ return ACE_TEXT ("socket type not supported for address family");
/* NOTREACHED */
case WSAENOTSOCK:
- return ASYS_TEXT ("handle is not a socket");
+ return ACE_TEXT ("handle is not a socket");
/* NOTREACHED */
case WSAEWOULDBLOCK:
- return ASYS_TEXT ("socket marked as non-blocking and SO_LINGER set not 0");
+ return ACE_TEXT ("socket marked as non-blocking and SO_LINGER set not 0");
/* NOTREACHED */
case WSAEADDRINUSE:
- return ASYS_TEXT ("address already in use");
+ return ACE_TEXT ("address already in use");
/* NOTREACHED */
case WSAECONNABORTED:
- return ASYS_TEXT ("connection aborted");
+ return ACE_TEXT ("connection aborted");
/* NOTREACHED */
case WSAECONNRESET:
- return ASYS_TEXT ("connection reset");
+ return ACE_TEXT ("connection reset");
/* NOTREACHED */
case WSAENOTCONN:
- return ASYS_TEXT ("not connected");
+ return ACE_TEXT ("not connected");
/* NOTREACHED */
case WSAETIMEDOUT:
- return ASYS_TEXT ("connection timed out");
+ return ACE_TEXT ("connection timed out");
/* NOTREACHED */
case WSAECONNREFUSED:
- return ASYS_TEXT ("connection refused");
+ return ACE_TEXT ("connection refused");
/* NOTREACHED */
case WSAEHOSTDOWN:
- return ASYS_TEXT ("host down");
+ return ACE_TEXT ("host down");
/* NOTREACHED */
case WSAEHOSTUNREACH:
- return ASYS_TEXT ("host unreachable");
+ return ACE_TEXT ("host unreachable");
/* NOTREACHED */
case WSAEADDRNOTAVAIL:
- return ASYS_TEXT ("address not available");
+ return ACE_TEXT ("address not available");
/* NOTREACHED */
default:
- ACE_OS::sprintf (unknown_msg, ASYS_TEXT ("unknown error: %d"), error);
+ ACE_OS::sprintf (unknown_msg, ACE_TEXT ("unknown error: %d"), error);
return unknown_msg;
/* NOTREACHED */
}
@@ -3802,7 +3678,7 @@ ACE::sock_error (int error)
int
ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
- const char *host_name,
+ const ACE_TCHAR *host_name,
ACE_UINT32 host_addr,
ACE_HANDLE handle)
{
@@ -3816,8 +3692,8 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
if (s == ACE_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_OS::socket")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_OS::socket")),
-1);
struct ifconf ifc;
@@ -3835,9 +3711,9 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
#endif /* AIX */
if (ACE_OS::ioctl (s, cmd, (char *) &ifc) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT ("ioctl (get interface configuration)")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT ("ioctl (get interface configuration)")),
-1);
struct ifreq *ifr = ifc.ifc_req;
@@ -3894,9 +3770,9 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
if (ifr->ifr_addr.sa_family != AF_INET)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT ("Not AF_INET")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT ("Not AF_INET")));
continue;
}
@@ -3906,18 +3782,18 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
if (ACE_OS::ioctl (s, SIOCGIFFLAGS, (char *) &flags) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT (" ioctl (get interface flags)")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT (" ioctl (get interface flags)")));
continue;
}
if (ACE_BIT_DISABLED (flags.ifr_flags, IFF_UP))
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT ("Network interface is not up")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT ("Network interface is not up")));
continue;
}
@@ -3930,9 +3806,9 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
SIOCGIFBRDADDR,
(char *) &if_req) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT ("ioctl (get broadaddr)")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT ("ioctl (get broadaddr)")));
else
{
ACE_OS::memcpy (ACE_reinterpret_cast(sockaddr_in *, &ip_addr),
@@ -3952,9 +3828,9 @@ ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
}
else
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_bcast_addr:")
- ASYS_TEXT ("Broadcast is not enable for this interface.")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_bcast_addr:")
+ ACE_TEXT ("Broadcast is not enable for this interface.")));
if (handle == ACE_INVALID_HANDLE)
ACE_OS::close (s);
@@ -3987,8 +3863,8 @@ ACE::count_interfaces (ACE_HANDLE handle,
SIOCGIFNUM,
(caddr_t) &tmp_how_many) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("ACE::get_ip_interfaces:")
- ASYS_TEXT ("ioctl - SIOCGIFNUM failed")),
+ ACE_TEXT ("ACE::get_ip_interfaces:")
+ ACE_TEXT ("ioctl - SIOCGIFNUM failed")),
-1);
how_many = (size_t) tmp_how_many;
return 0;
@@ -4032,8 +3908,8 @@ ACE::count_interfaces (ACE_HANDLE handle,
{
ACE_OS::free (ifcfg.ifc_req);
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("count_interfaces:ioctl:")
- ASYS_TEXT ("SIOCGIFCONF failed")),
+ ACE_TEXT ("count_interfaces:ioctl:")
+ ACE_TEXT ("SIOCGIFCONF failed")),
-1);
}
@@ -4085,29 +3961,29 @@ ACE::get_handle (void)
// Registry up to buf_len size.
static int
-get_reg_value (const TCHAR *key,
- const TCHAR *name,
- TCHAR *buffer,
+get_reg_value (const ACE_TCHAR *key,
+ const ACE_TCHAR *name,
+ ACE_TCHAR *buffer,
DWORD &buf_len)
{
HKEY hk;
DWORD buf_type;
- LONG rc = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- key,
- 0,
- KEY_READ,
- &hk);
+ LONG rc = ACE_TEXT_RegOpenKeyEx (HKEY_LOCAL_MACHINE,
+ key,
+ 0,
+ KEY_READ,
+ &hk);
// 1. open key that defines the interfaces used for TCP/IP?
if (rc != ERROR_SUCCESS)
// print_error_string(TEXT("RegOpenKeyEx"), rc);
return -1;
- rc = ::RegQueryValueEx (hk,
- name,
- 0,
- &buf_type,
- (u_char *) buffer,
- &buf_len);
+ rc = ACE_TEXT_RegQueryValueEx (hk,
+ name,
+ 0,
+ &buf_type,
+ (u_char *) buffer,
+ &buf_len);
if (rc != ERROR_SUCCESS)
{
// print_error_string(TEXT("RegEnumKeyEx"), rc);
@@ -4223,7 +4099,7 @@ ACE::get_ip_interfaces (size_t &count,
DEVHANDLE ip_dev[ACE_MAX_ETS_DEVICES];
EK_TCPIPCFG *devp;
size_t i, j;
- char dev_name[16];
+ ACE_TCHAR dev_name[16];
count = 0;
for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
@@ -4288,18 +4164,18 @@ ACE::get_ip_interfaces (size_t &count,
# else /* ACE_HAS_PHARLAP */
- const TCHAR *SVCS_KEY1 =
+ const ACE_TCHAR *SVCS_KEY1 =
ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\");
- const TCHAR *LINKAGE_KEY1 =
+ const ACE_TCHAR *LINKAGE_KEY1 =
ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage");
- const TCHAR *TCP_PARAM_SUBKEY = ACE_TEXT ("\\Parameters\\Tcpip");
- const TCHAR *BIND_NAME_ID = ACE_TEXT ("Bind");
- const TCHAR *IPADDR_NAME_ID = ACE_TEXT ("IPAddress");
- const TCHAR *INVALID_TCPIP_DEVICE_ADDR = ACE_TEXT ("0.0.0.0");
+ const ACE_TCHAR *TCP_PARAM_SUBKEY = ACE_TEXT ("\\Parameters\\Tcpip");
+ const ACE_TCHAR *BIND_NAME_ID = ACE_TEXT ("Bind");
+ const ACE_TCHAR *IPADDR_NAME_ID = ACE_TEXT ("IPAddress");
+ const ACE_TCHAR *INVALID_TCPIP_DEVICE_ADDR = ACE_TEXT ("0.0.0.0");
- TCHAR raw_buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ ACE_TCHAR raw_buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
DWORD raw_buflen = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
- TCHAR buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
+ ACE_TCHAR buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
DWORD buf_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
if (::get_reg_value (LINKAGE_KEY1,
@@ -4357,7 +4233,7 @@ ACE::get_ip_interfaces (size_t &count,
// c. store in hostinfo object array and up the counter
addrs[count++] =
ACE_INET_Addr ((u_short) 0,
- ASYS_MULTIBYTE_STRING (buffer));
+ ACE_TEXT_CHAR_TO_TCHAR (buffer));
}
}
return 0;
@@ -4374,8 +4250,8 @@ ACE::get_ip_interfaces (size_t &count,
if (handle == ACE_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::get_ip_interfaces:open")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::get_ip_interfaces:open")),
-1);
if (ACE::count_interfaces (handle, num_ifs))
{
@@ -4418,9 +4294,9 @@ ACE::get_ip_interfaces (size_t &count,
{
ACE_OS::close (handle);
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("is_address_local:")
- ASYS_TEXT ("ioctl - SIOCGIFCONF failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("is_address_local:")
+ ACE_TEXT ("ioctl - SIOCGIFCONF failed")),
-1);
}
@@ -4509,6 +4385,30 @@ ACE::strndup (const char *str, size_t n)
return ACE_OS::strncpy (s, str, len);
}
+#if defined (ACE_HAS_WCHAR)
+wchar_t *
+ACE::strndup (const wchar_t *str, size_t n)
+{
+ const wchar_t *t = str;
+ size_t len;
+
+ // Figure out how long this string is (remember, it might not be
+ // NUL-terminated).
+
+ for (len = 0;
+ len < n && *t++ != '\0';
+ len++)
+ continue;
+
+ wchar_t *s;
+ ACE_ALLOCATOR_RETURN (s,
+ (wchar_t *) ACE_OS::malloc ((len + 1) * sizeof wchar_t),
+ 0);
+ s[len] = L'\0';
+ return ACE_OS::strncpy (s, str, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
char *
ACE::strnnew (const char *str, size_t n)
{
@@ -4519,7 +4419,7 @@ ACE::strnnew (const char *str, size_t n)
// NUL-terminated).
for (len = 0;
- len < n && *t++ != '\0';
+ len < n && *t++ != L'\0';
len++)
continue;
@@ -4531,6 +4431,30 @@ ACE::strnnew (const char *str, size_t n)
return ACE_OS::strncpy (s, str, len);
}
+#if defined (ACE_HAS_WCHAR)
+wchar_t *
+ACE::strnnew (const wchar_t *str, size_t n)
+{
+ const wchar_t *t = str;
+ size_t len;
+
+ // Figure out how long this string is (remember, it might not be
+ // NUL-terminated).
+
+ for (len = 0;
+ len < n && *t++ != L'\0';
+ len++)
+ continue;
+
+ wchar_t *s;
+ ACE_NEW_RETURN (s,
+ wchar_t[len + 1],
+ 0);
+ s[len] = L'\0';
+ return ACE_OS::strncpy (s, str, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
const char *
ACE::strend (const char *s)
{
@@ -4540,6 +4464,16 @@ ACE::strend (const char *s)
return s;
}
+#if defined ACE_HAS_WCHAR
+const wchar_t *
+ACE::strend (const wchar_t *s)
+{
+ while (*s++ != L'\0')
+ continue;
+
+ return s;
+}
+#endif
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/ace/ACE.h b/ace/ACE.h
index 9ded60b00c9..80a0b33e92a 100644
--- a/ace/ACE.h
+++ b/ace/ACE.h
@@ -64,7 +64,7 @@ public:
// E.g., the "19" in ACE 4.3.19. Returns 0 for "stable" (non-beta) releases.
// = C++ compiler version information.
- static const char* compiler_name (void);
+ static const ACE_TCHAR * compiler_name (void);
// E.g., the "SunPro C++" in SunPro C++ 4.32.0
static u_int compiler_major_version (void);
@@ -303,7 +303,7 @@ public:
// Bind a new unused port to <handle>.
static int get_bcast_addr (ACE_UINT32 &bcast_addr,
- const char *hostname = 0,
+ const ACE_TCHAR *hostname = 0,
ACE_UINT32 host_addr = 0,
ACE_HANDLE handle = ACE_INVALID_HANDLE);
// Get our broadcast address based on our <host_addr>. If
@@ -347,7 +347,7 @@ public:
// = Operations on HANDLEs.
static ACE_HANDLE handle_timed_open (ACE_Time_Value *timeout,
- LPCTSTR name,
+ const ACE_TCHAR *name,
int flags,
int perms);
// Wait up to <timeout> amount of time to actively open a device.
@@ -378,18 +378,14 @@ public:
// = String functions
#if !defined (ACE_HAS_WINCE)
- static ASYS_TCHAR *strenvdup (const ASYS_TCHAR *str);
+ static ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
// Return a dynamically allocated duplicate of <str>, substituting
// the environment variable if <str[0] == '$'>. Note that the
// pointer is allocated with <ACE_OS::malloc> and must be freed by
// <ACE_OS::free>.
#endif /* ACE_HAS_WINCE */
- static char *strecpy (char *des, const char *src);
- // Copies <src> to <des>, returning a pointer to the end of the
- // copied region, rather than the beginning, as <strcpy> does.
-
- static const char *strend (const char *);
+ static const char *strend (const char *s);
// Returns a pointer to the "end" of the string, i.e., the character
// past the '\0'.
@@ -397,12 +393,6 @@ public:
// This method is just like <strdup>, except that it uses <operator
// new> rather than <malloc>.
-# if defined (ACE_WIN32) && defined (ACE_HAS_UNICODE)
- static wchar_t *strnew (const wchar_t *s);
- // This method is just like <strdup>, except that it uses <operator
- // new> rather than <malloc>.
-#endif /* ACE_WIN32 && ACE_HAS_UNICODE */
-
static char *strndup (const char *str, size_t n);
// Create a fresh new copy of <str>, up to <n> chars long. Uses
// <ACE_OS::malloc> to allocate the new string.
@@ -411,9 +401,7 @@ public:
// Create a fresh new copy of <str>, up to <n> chars long. Uses
// <ACE_OS::malloc> to allocate the new string.
- static char *strsplit_r (char *s,
- const char *token,
- char *&next_start);
+ static char *strsplit_r (char *s, const char *token, char *&next_start);
// Splits string <s> into pieces separated by the string <token>.
// <next_start> is an opaque cookie handed back by the call to store
// its state for the next invocation, thus making it re-entrant.
@@ -424,60 +412,63 @@ public:
// Replace all instances of <search> in <s> with <replace>. Returns
// the number of replacements made.
- static const char *execname (const char *pathname);
+#if defined (ACE_HAS_WCHAR)
+ static const wchar_t *strend (const wchar_t *s);
+
+ static wchar_t *strnew (const wchar_t *s);
+
+ static wchar_t *strndup (const wchar_t *str, size_t n);
+
+ static wchar_t *strnnew (const wchar_t *str, size_t n);
+
+ static wchar_t *strsplit_r (wchar_t *s,
+ const wchar_t *token,
+ wchar_t *&next_start);
+
+ static size_t strrepl (wchar_t *s, wchar_t search, wchar_t replace);
+
+#endif /* ACE_HAS_WCHAR */
+
+ static const ACE_TCHAR *execname (const ACE_TCHAR *pathname);
// On Win32 returns <pathname> if it already ends in ".exe,"
// otherwise returns a dynamically allocated buffer containing
// "<pathname>.exe". Always returns <pathname> on UNIX.
- static const char *basename (const char *pathname,
- char delim = ACE_DIRECTORY_SEPARATOR_CHAR_A);
+ static const ACE_TCHAR *basename (const ACE_TCHAR *pathname,
+ ACE_TCHAR delim =
+ ACE_DIRECTORY_SEPARATOR_CHAR);
// Returns the "basename" of a <pathname> separated by <delim>. For
// instance, the basename of "/tmp/foo.cpp" is "foo.cpp" when
// <delim> is '/'.
- static const char *dirname (const char *pathname,
- char delim = ACE_DIRECTORY_SEPARATOR_CHAR_A);
+ static const ACE_TCHAR *dirname (const ACE_TCHAR *pathname,
+ ACE_TCHAR delim =
+ ACE_DIRECTORY_SEPARATOR_CHAR);
// Returns the "dirname" of a <pathname>. For instance, the dirname
// of "/tmp/foo.cpp" is "/tmp" when <delim> is '/'. If <pathname>
// has no <delim> ".\0" is returned. This method does not modify
// <pathname> and is not reentrant.
-#if defined (ACE_HAS_UNICODE)
- // A collection of wide string functions. See above for details.
-
- static wchar_t *strecpy (wchar_t *s, const wchar_t *t);
-
- static wchar_t *strsplit_r (wchar_t *s,
- const wchar_t *token,
- wchar_t *&next_start);
-
- static size_t strrepl (wchar_t *s, wchar_t search, wchar_t replace);
-
- static const wchar_t *execname (const wchar_t *pathname);
- static const wchar_t *basename (const wchar_t *pathname,
- wchar_t delim = ACE_DIRECTORY_SEPARATOR_CHAR_W);
- // Returns the "basename" of a <pathname>.
-#endif /* ACE_HAS_UNICODE */
- static ASYS_TCHAR *timestamp (ASYS_TCHAR date_and_time[],
- int time_len);
+ static ACE_TCHAR *timestamp (ACE_TCHAR date_and_time[],
+ int time_len);
// Returns the current timestamp in the form
// "hour:minute:second:microsecond." The month, day, and year are
// also stored in the beginning of the date_and_time array. Returns
// 0 if unsuccessful, else returns pointer to beginning of the
// "time" portion of <day_and_time>.
- static pid_t fork (const char *program_name = "<unknown>",
+ static pid_t fork (const ACE_TCHAR *program_name = ACE_TEXT ("<unknown>"),
int avoid_zombies = 0);
// if <avoid_zombies> == 0 call <ACE_OS::fork> directly, else create
// an orphan process that's inherited by the init process; init
// cleans up when the orphan process terminates so we don't create
// zombies.
- static int daemonize (const char pathname[] = "/",
+ static int daemonize (const ACE_TCHAR pathname[] = ACE_TEXT ("/"),
int close_all_handles = ACE_DEFAULT_CLOSE_ALL_HANDLES,
- const char program_name[] = "<unknown>");
+ const ACE_TCHAR program_name[] = ACE_TEXT ("<unknown>"));
// Become a daemon process using the algorithm in Richard Stevens
// "Advanced Programming in the UNIX Environment." If
// <close_all_handles> is non-zero then all open file handles are
@@ -485,8 +476,8 @@ public:
// = Methods for searching and opening shared libraries.
- static int ldfind (const ASYS_TCHAR *filename,
- ASYS_TCHAR *pathname,
+ static int ldfind (const ACE_TCHAR *filename,
+ ACE_TCHAR *pathname,
size_t maxlen);
// Finds the file <filename> either using an absolute path or using
// a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g.,
@@ -496,19 +487,18 @@ public:
// apply the appropriate prefix (e.g., "lib" on UNIX and "" on
// Win32) if the <filename> doesn't match directly.
- static FILE *ldopen (const ASYS_TCHAR *filename,
- const ASYS_TCHAR *type);
+ static FILE *ldopen (const ACE_TCHAR *filename,
+ const ACE_TCHAR *type);
// Uses <ldopen> to locate and open the appropriate <filename> and
// returns a pointer to the file, else it returns a NULL
// pointer. <type> specifies how the file should be open.
- static int get_temp_dir (char *buffer, size_t buffer_len);
- static int get_temp_dir (wchar_t *buffer, size_t buffer_len);
+ static int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len);
// Returns the temporary directory including the trailing slash in
// <buffer>. Returns -1 for an error or if the buffer_len is not
// long enough.
- static ACE_HANDLE open_temp_file (const char *name,
+ static ACE_HANDLE open_temp_file (const ACE_TCHAR *name,
int mode,
int perm = 0);
// Opening the temp file. File is automagically unlinked when it is
@@ -523,32 +513,25 @@ public:
static size_t round_to_allocation_granularity (off_t len);
// Rounds the request to a multiple of the allocation granularity.
+ // @@ UNICODE what about buffer?
static int format_hexdump (const char *buffer, int size,
- ASYS_TCHAR *obuf, int obuf_sz);
+ ACE_TCHAR *obuf, int obuf_sz);
// Format buffer into printable format. This is useful for
// debugging.
static u_long hash_pjw (const char *str);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
+ // Computes the hash value of <str> using the "Hash PJW" routine.
static u_long hash_pjw (const char *str, size_t len);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
+ // Computes the hash value of <str> using the "Hash PJW" routine.
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
+#if defined (ACE_HAS_WCHAR)
static u_long hash_pjw (const wchar_t *str);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
+ // Computes the hash value of <str> using the "Hash PJW" routine.
static u_long hash_pjw (const wchar_t *str, size_t len);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
- static u_long hash_pjw (const ACE_USHORT16 *str);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
-
- static u_long hash_pjw (const ACE_USHORT16 *str, size_t len);
- // Computes the hash value of <str> using the ``Hash PJW'' routine.
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
+ // Computes the hash value of <str> using the "Hash PJW" routine.
+#endif /* ACE_HAS_WCHAR */
static u_long crc32 (const char *str);
// Computes the ISO 8802-3 standard 32 bits CRC for the string
@@ -577,7 +560,7 @@ public:
// Map troublesome win32 errno values to values that standard C
// strerr function understands. Thank you Microsoft.
- static const ASYS_TCHAR *sock_error (int error);
+ static const ACE_TCHAR *sock_error (int error);
// Returns a string containing the error message corresponding to a
// WinSock error. This works around an omission in the Win32 API...
@@ -595,7 +578,7 @@ public:
// cleanup before it shuts down.
static void unique_name (const void *object,
- LPTSTR name,
+ ACE_TCHAR *name,
size_t length);
// This method uses process id and object pointer to come up with a
// machine wide unique name. The process ID will provide uniqueness
@@ -607,10 +590,10 @@ public:
static u_long log2 (u_long num);
// Computes the base 2 logarithm of <num>.
- static char nibble2hex (u_int n);
+ static ACE_TCHAR nibble2hex (u_int n);
// Hex conversion utility.
- static u_char hex2byte (char c);
+ static u_char hex2byte (ACE_TCHAR c);
// Convert a hex character to its byte representation.
// = Set/get the debug level.
@@ -794,7 +777,7 @@ private:
static u_long crc_table_[];
// CRC table.
- static const char hex_chars_[];
+ static const ACE_TCHAR hex_chars_[];
// Hex characters.
static char debug_;
diff --git a/ace/ACE.i b/ace/ACE.i
index a4d7bce3b9c..381a49bebfd 100644
--- a/ace/ACE.i
+++ b/ace/ACE.i
@@ -254,23 +254,9 @@ ACE::handle_exception_ready (ACE_HANDLE handle,
1);
}
-ASYS_INLINE char *
-ACE::strecpy (char *s, const char *t)
-{
- return ACE_OS::strecpy (s, t);
-}
-
-#if defined (ACE_HAS_UNICODE)
-ASYS_INLINE wchar_t *
-ACE::strecpy (wchar_t *s, const wchar_t *t)
-{
- return ACE_OS::strecpy (s, t);
-}
-#endif /* ACE_HAS_UNICODE */
-
ASYS_INLINE void
ACE::unique_name (const void *object,
- LPTSTR name,
+ ACE_TCHAR *name,
size_t length)
{
ACE_OS::unique_name (object, name, length);
@@ -307,21 +293,22 @@ ACE::log2 (u_long num)
return log;
}
-ASYS_INLINE char
+ASYS_INLINE ACE_TCHAR
ACE::nibble2hex (u_int n)
{
+ // @@ UNICODE does this work?
return ACE::hex_chars_[n & 0x0f];
}
ASYS_INLINE u_char
-ACE::hex2byte (char c)
+ACE::hex2byte (ACE_TCHAR c)
{
if (isdigit (c))
- return (u_char) (c - '0');
+ return (u_char) (c - ACE_TEXT ('0'));
else if (islower (c))
- return (u_char) (10 + c - 'a');
+ return (u_char) (10 + c - ACE_TEXT ('a'));
else
- return (u_char) (10 + c - 'A');
+ return (u_char) (10 + c - ACE_TEXT ('A'));
}
ASYS_INLINE char
@@ -339,7 +326,6 @@ ACE::debug (char c)
ASYS_INLINE char *
ACE::strnew (const char *s)
{
- // ACE_TRACE ("ACE::strnew");
char *t = new char [::strlen(s) + 1];
if (t == 0)
return 0;
@@ -347,15 +333,14 @@ ACE::strnew (const char *s)
return ACE_OS::strcpy (t, s);
}
-#if defined (ACE_WIN32) && defined (ACE_HAS_UNICODE)
+#if defined (ACE_HAS_WCHAR)
ASYS_INLINE wchar_t *
ACE::strnew (const wchar_t *s)
{
- // ACE_TRACE ("ACE_OS::strnew");
wchar_t *t = new wchar_t[::wcslen (s) + 1];
if (t == 0)
return 0;
else
return ACE_OS::strcpy (t, s);
}
-#endif /* ACE_WIN32 && ACE_HAS_UNICODE */
+#endif /* ACE_HAS_WCHAR */
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
index 8de5461eda7..4927f760712 100644
--- a/ace/ARGV.cpp
+++ b/ace/ARGV.cpp
@@ -19,13 +19,13 @@ ACE_ARGV::dump (void) const
ACE_TRACE ("ACE_ARGV::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("argc_ = %d"), this->argc_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("argc_ = %d"), this->argc_));
for (size_t i = 0; i < this->argc_; i++)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nargv_[%i] = %s"), i, this->argv_[i]));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nargv_[%i] = %s"), i, this->argv_[i]));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nbuf = %s\n"), this->buf_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nbuf = %s\n"), this->buf_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -46,12 +46,12 @@ ACE_ARGV::string_to_argv (void)
}
int
-ACE_ARGV::argv_to_string (ASYS_TCHAR **argv, ASYS_TCHAR *&buf)
+ACE_ARGV::argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf)
{
return ACE_OS::argv_to_string (argv, buf);
}
-ACE_ARGV::ACE_ARGV (const ASYS_TCHAR buf[],
+ACE_ARGV::ACE_ARGV (const ACE_TCHAR buf[],
int substitute_env_args)
: substitute_env_args_ (substitute_env_args),
state_ (TO_PTR_ARRAY),
@@ -61,24 +61,24 @@ ACE_ARGV::ACE_ARGV (const ASYS_TCHAR buf[],
length_ (0),
queue_ ()
{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ASYS_TCHAR[] to ASYS_TCHAR *[]");
+ ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR[] to ACE_TCHAR *[]");
if (buf == 0 || buf[0] == 0)
return;
// Make an internal copy of the string.
ACE_NEW (this->buf_,
- ASYS_TCHAR[ACE_OS::strlen (buf) + 1]);
+ ACE_TCHAR[ACE_OS::strlen (buf) + 1]);
ACE_OS::strcpy (this->buf_, buf);
// Create this->argv_.
if (this->string_to_argv () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("string_to_argv")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("string_to_argv")));
}
-ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
+ACE_ARGV::ACE_ARGV (ACE_TCHAR *argv[],
int substitute_env_args)
: substitute_env_args_ (substitute_env_args),
state_ (TO_STRING),
@@ -88,7 +88,7 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
length_ (0),
queue_ ()
{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ASYS_TCHAR*[] to ASYS_TCHAR[]");
+ ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR*[] to ACE_TCHAR[]");
if (argv == 0 || argv[0] == 0)
return;
@@ -99,7 +99,7 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
for (int i = 0; argv[i] != 0; i++)
{
- ASYS_TCHAR *temp;
+ ACE_TCHAR *temp;
// Account for environment variables.
if (this->substitute_env_args_
@@ -117,26 +117,26 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
// each param with white space.
ACE_NEW (this->buf_,
- ASYS_TCHAR[buf_len + 1]);
+ ACE_TCHAR[buf_len + 1]);
- ASYS_TCHAR *end = this->buf_;
+ ACE_TCHAR *end = this->buf_;
int j;
for (j = 0; argv[j] != 0; j++)
{
- ASYS_TCHAR *temp;
+ ACE_TCHAR *temp;
// Account for environment variables.
if (this->substitute_env_args_
&& (argv[j][0] == '$'
&& (temp = ACE_OS::getenv (&argv[j][1])) != 0))
- end = ACE::strecpy (end, temp);
+ end = ACE_OS::strecpy (end, temp);
else
- end = ACE::strecpy (end, argv[j]);
+ end = ACE_OS::strecpy (end, argv[j]);
// Replace the null char that strecpy copies with white space as
// a separator.
- *(end-1) = ' ';
+ *(end-1) = ACE_TEXT (' ');
}
// Remember how many arguments there are
@@ -146,8 +146,8 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *argv[],
*end = '\0';
}
-ACE_ARGV::ACE_ARGV (ASYS_TCHAR *first_argv[],
- ASYS_TCHAR *second_argv[],
+ACE_ARGV::ACE_ARGV (ACE_TCHAR *first_argv[],
+ ACE_TCHAR *second_argv[],
int substitute_env_args)
: substitute_env_args_ (substitute_env_args),
state_ (TO_STRING),
@@ -157,13 +157,13 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *first_argv[],
length_ (0),
queue_ ()
{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ASYS_TCHAR*[] + ASYS_TCHAR *[] to ASYS_TCHAR[]");
+ ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR*[] + ACE_TCHAR *[] to ACE_TCHAR[]");
int first_argc;
int second_argc;
- ASYS_TCHAR *first_buf;
- ASYS_TCHAR *second_buf;
+ ACE_TCHAR *first_buf;
+ ACE_TCHAR *second_buf;
// convert the first argv to a string
first_argc = this->argv_to_string (first_argv,first_buf);
@@ -178,7 +178,7 @@ ACE_ARGV::ACE_ARGV (ASYS_TCHAR *first_argv[],
// Allocate memory to the lenght of the combined argv string.
ACE_NEW (this->buf_,
- ASYS_TCHAR[buf_len + 1]);
+ ACE_TCHAR[buf_len + 1]);
// copy the first argv string to the buffer
ACE_OS::strcpy (this->buf_,first_buf);
@@ -209,7 +209,7 @@ ACE_ARGV::ACE_ARGV (int substitute_env_args)
}
int
-ACE_ARGV::add (const ASYS_TCHAR *next_arg)
+ACE_ARGV::add (const ACE_TCHAR *next_arg)
{
// Only allow this to work in the "iterative" verion -- the
// ACE_ARGVs created with the one argument constructor.
@@ -220,9 +220,9 @@ ACE_ARGV::add (const ASYS_TCHAR *next_arg)
}
// Put the new argument at the end of the queue.
- if (this->queue_.enqueue_tail ((ASYS_TCHAR *) next_arg) == -1)
+ if (this->queue_.enqueue_tail ((ACE_TCHAR *) next_arg) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Can't add more to ARGV queue")),
+ ACE_TEXT ("Can't add more to ARGV queue")),
-1);
this->length_ += ACE_OS::strlen (next_arg);
@@ -247,7 +247,7 @@ ACE_ARGV::add (const ASYS_TCHAR *next_arg)
}
int
-ACE_ARGV::add (ASYS_TCHAR *argv[])
+ACE_ARGV::add (ACE_TCHAR *argv[])
{
for (int i = 0; argv[i] != 0; i++)
if (this->add (argv[i]) == -1)
@@ -285,14 +285,14 @@ ACE_ARGV::create_buf_from_queue (void)
delete [] this->buf_;
ACE_NEW_RETURN (this->buf_,
- ASYS_TCHAR[this->length_ + this->argc_],
+ ACE_TCHAR[this->length_ + this->argc_],
-1);
// Get an iterator over the queue
- ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *> iter (this->queue_);
+ ACE_Unbounded_Queue_Iterator<ACE_TCHAR *> iter (this->queue_);
- ASYS_TCHAR **arg;
- ASYS_TCHAR *ptr = this->buf_;
+ ACE_TCHAR **arg;
+ ACE_TCHAR *ptr = this->buf_;
size_t len;
int more = 0;
@@ -324,11 +324,11 @@ ACE_ARGV::create_buf_from_queue (void)
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Queue<ASYS_TCHAR *>;
-template class ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *>;
-template class ACE_Node<ASYS_TCHAR *>;
+template class ACE_Unbounded_Queue<ACE_TCHAR *>;
+template class ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>;
+template class ACE_Node<ACE_TCHAR *>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Unbounded_Queue<ASYS_TCHAR *>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *>
-#pragma instantiate ACE_Node<ASYS_TCHAR *>
+#pragma instantiate ACE_Unbounded_Queue<ACE_TCHAR *>
+#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>
+#pragma instantiate ACE_Node<ACE_TCHAR *>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/ARGV.h b/ace/ARGV.h
index 5585a5150f9..233c818c3b5 100644
--- a/ace/ARGV.h
+++ b/ace/ARGV.h
@@ -34,7 +34,7 @@ class ACE_Export ACE_ARGV
// environment variable substitutions if necessary.
public:
// = Initialization and termination.
- ACE_ARGV (const ASYS_TCHAR buf[],
+ ACE_ARGV (const ACE_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
@@ -42,22 +42,22 @@ public:
// The subscript and <argv> operations are not allowed on an
// ACE_ARGV created this way.
- ACE_ARGV (ASYS_TCHAR *argv[],
+ ACE_ARGV (ACE_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. The <buf> operation is not
// allowed on an ACE_ARGV created this way.
- ACE_ARGV (ASYS_TCHAR *first_argv[],
- ASYS_TCHAR *second_argv[],
+ ACE_ARGV (ACE_TCHAR *first_argv[],
+ ACE_TCHAR *second_argv[],
int substitute_env_args =1);
// Creates an ACE_ARGV which is the concatenation of the first_argv
// and the second argv. The argv arguments should be null pointer
// terminated.
ACE_ARGV (int substitute_env_args = 1);
- // Entry point for creating an ASYS_TCHAR *[] command line
+ // Entry point for creating an ACE_TCHAR *[] command line
// iteratively via the <add> method. When this constructor is used,
// the <ITERATIVE> state is enabled. The <argv> and <buf> methods
// are allowed, and the result is recreated when called multiple
@@ -67,10 +67,10 @@ public:
// Destructor.
// = Accessor arguments.
- const ASYS_TCHAR *operator[] (size_t index);
+ const ACE_TCHAR *operator[] (size_t index);
// Returns the <index>th string in the ARGV array.
- ASYS_TCHAR **argv (void);
+ ACE_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
@@ -79,7 +79,7 @@ public:
size_t argc (void) const;
// Returns <argc>.
- const ASYS_TCHAR *buf (void);
+ const ACE_TCHAR *buf (void);
// Returns the <buf>. Caller should not delete this memory since
// the <ARGV> destructor will delete it.
@@ -89,11 +89,11 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
- int add (const ASYS_TCHAR *next_arg);
+ int add (const ACE_TCHAR *next_arg);
// Add another argument. This only works in the <ITERATIVE> state.
// Returns -1 on failure and 0 on success.
- int add (ASYS_TCHAR *argv[]);
+ int add (ACE_TCHAR *argv[]);
// Add another <argv> array. The <argv> parameter must be NULL
// terminated. This only works in the <ITERATIVE> state. Returns
// -1 on failure and 0 on success.
@@ -105,11 +105,11 @@ public:
enum States
{
TO_STRING = 1,
- // ACE_ARGV converts buf[] to ASYS_TCHAR *argv[]
+ // ACE_ARGV converts buf[] to ACE_TCHAR *argv[]
TO_PTR_ARRAY = 2,
- // ACE_ARGV converts ASYS_TCHAR *argv[] to buf[]
+ // ACE_ARGV converts ACE_TCHAR *argv[] to buf[]
ITERATIVE = 3
- // Builds buf[] or ASYS_TCHAR *argv[] iteratively with <add>.
+ // Builds buf[] or ACE_TCHAR *argv[] iteratively with <add>.
};
private:
@@ -118,9 +118,9 @@ private:
// Creates buf_ from the queue, deletes previous buf_.
int string_to_argv (void);
- // Converts buf_ into the ASYS_TCHAR *argv[] format.
+ // Converts buf_ into the ACE_TCHAR *argv[] format.
- int argv_to_string (ASYS_TCHAR **argv, ASYS_TCHAR *&buf);
+ int argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf);
// Returns the string created from argv in buf and
// returns the number of arguments.
@@ -133,17 +133,17 @@ private:
size_t argc_;
// Number of arguments in the ARGV array.
- ASYS_TCHAR **argv_;
+ ACE_TCHAR **argv_;
// The array of string arguments.
- ASYS_TCHAR *buf_;
+ ACE_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<ASYS_TCHAR *> queue_;
+ ACE_Unbounded_Queue<ACE_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 b14d0963274..f45bdf4b125 100644
--- a/ace/ARGV.i
+++ b/ace/ARGV.i
@@ -18,7 +18,7 @@ ACE_ARGV::state(void) const
}
// Return the arguments in a space-separated string
-ACE_INLINE const ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_ARGV::buf (void)
{
ACE_TRACE ("ACE_ARGV::buf");
@@ -26,12 +26,12 @@ ACE_ARGV::buf (void)
if (this->buf_ == 0 && this->state_ == ITERATIVE)
this->create_buf_from_queue ();
- return (const ASYS_TCHAR *) this->buf_;
+ return (const ACE_TCHAR *) this->buf_;
}
// Return the arguments in an entry-per-argument array
-ACE_INLINE ASYS_TCHAR **
+ACE_INLINE ACE_TCHAR **
ACE_ARGV::argv (void)
{
ACE_TRACE ("ACE_ARGV::argv");
@@ -44,15 +44,15 @@ ACE_ARGV::argv (void)
// Convert buf_ to argv_
if (this->string_to_argv () == -1)
- return (ASYS_TCHAR **) 0;
+ return (ACE_TCHAR **) 0;
}
- return (ASYS_TCHAR **) this->argv_;
+ return (ACE_TCHAR **) this->argv_;
}
// Subscript operator.
-ACE_INLINE const ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_ARGV::operator[] (size_t i)
{
ACE_TRACE ("ACE_ARGV::operator[]");
@@ -61,7 +61,7 @@ ACE_ARGV::operator[] (size_t i)
if (i >= this->argc_)
return 0;
- return (const ASYS_TCHAR *) this->argv ()[i];
+ return (const ACE_TCHAR *) this->argv ()[i];
}
diff --git a/ace/ATM_Addr.cpp b/ace/ATM_Addr.cpp
index 05fdaa5874b..6f921ace15e 100644
--- a/ace/ATM_Addr.cpp
+++ b/ace/ATM_Addr.cpp
@@ -76,7 +76,7 @@ ACE_ATM_Addr::ACE_ATM_Addr (const ATM_Addr *sap,
}
-ACE_ATM_Addr::ACE_ATM_Addr (const ASYS_TCHAR sap[],
+ACE_ATM_Addr::ACE_ATM_Addr (const ACE_TCHAR sap[],
unsigned char selector)
#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
: ACE_Addr (AF_ATM,
@@ -181,7 +181,7 @@ ACE_ATM_Addr::set (const ATM_Addr *sap,
}
int
-ACE_ATM_Addr::set (const ASYS_TCHAR address[],
+ACE_ATM_Addr::set (const ACE_TCHAR address[],
unsigned char selector)
{
ACE_TRACE ("ACE_ATM_Addr::set");
@@ -202,7 +202,7 @@ ACE_ATM_Addr::set (const ASYS_TCHAR address[],
// Transform the string into the current addressing format.
int
-ACE_ATM_Addr::string_to_addr (const ASYS_TCHAR sap[])
+ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
{
ACE_TRACE ("ACE_ATM_Addr::string_to_addr");
@@ -222,7 +222,7 @@ ACE_ATM_Addr::string_to_addr (const ASYS_TCHAR sap[])
errno = EINVAL;
return -1;
}
- else if ((entry = gethostbyname_atmnsap((ASYS_TCHAR *)sap)) != 0)
+ else if ((entry = gethostbyname_atmnsap((ACE_TCHAR *)sap)) != 0)
{
ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
entry->h_addr_list[0],
@@ -305,20 +305,20 @@ ACE_ATM_Addr::string_to_addr (const ASYS_TCHAR sap[])
// Transform the current address into string format.
int
-ACE_ATM_Addr::addr_to_string (ASYS_TCHAR addr[],
+ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
size_t addrlen) const
{
ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
#if defined (ACE_HAS_FORE_ATM_XTI)
- ASYS_TCHAR buffer[MAXNAMELEN + 1];
+ ACE_TCHAR buffer[MAXNAMELEN + 1];
struct atmnsap_addr nsap;
ACE_OS::memcpy (nsap.atmnsap,
atm_addr_.sap.t_atm_sap_addr.address,
ATMNSAP_ADDR_LEN);
ACE_OS::sprintf (buffer,
- ASYS_TEXT ("%s"),
- ASYS_WIDE_STRING (atmnsap_ntoa (nsap)));
+ ACE_TEXT ("%s"),
+ atmnsap_ntoa (nsap));
size_t total_len = ACE_OS::strlen (buffer)
+ sizeof ('\0'); // For trailing '\0'.
@@ -330,7 +330,7 @@ ACE_ATM_Addr::addr_to_string (ASYS_TCHAR addr[],
return 0;
#elif defined (ACE_HAS_FORE_ATM_WS2)
- ASYS_TCHAR buffer[MAXNAMELEN + 1];
+ ACE_TCHAR buffer[MAXNAMELEN + 1];
int i;
if ( addrlen < ATM_ADDR_SIZE + 1 )
@@ -338,7 +338,7 @@ ACE_ATM_Addr::addr_to_string (ASYS_TCHAR addr[],
for ( i = 0; i < ATM_ADDR_SIZE; i++ ) {
buffer[ i * 3 ] = '\0';
- ACE_OS::sprintf( buffer, ASYS_TEXT( "%s%02x." ),
+ ACE_OS::sprintf( buffer, ACE_TEXT( "%s%02x." ),
buffer,
atm_addr_.satm_number.Addr[ i ]);
}
@@ -354,12 +354,12 @@ ACE_ATM_Addr::addr_to_string (ASYS_TCHAR addr[],
#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_ATM_Addr::addr_to_string (void) const
{
ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
- static ASYS_TCHAR addr[MAXHOSTNAMELEN + 1];
+ static ACE_TCHAR addr[MAXHOSTNAMELEN + 1];
this->addr_to_string (addr,
MAXHOSTNAMELEN + 1);
return addr;
@@ -409,11 +409,11 @@ ACE_ATM_Addr::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ASYS_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
+ ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
ACE_OS::sprintf (s,
- ASYS_TEXT ("%s"),
- ASYS_WIDE_STRING (this->addr_to_string ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s"), s));
+ ACE_TEXT ("%s"),
+ this->addr_to_string ());
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -439,7 +439,7 @@ ACE_ATM_Addr::dump (void) const
// if (buf == 0)
// ACE_ERROR_RETURN ((LM_ERROR,
-// ASYS_TEXT ("Unable to allocate %d bytes for options\n"),
+// ACE_TEXT ("Unable to allocate %d bytes for options\n"),
// info.options),
// 0);
@@ -468,7 +468,7 @@ ACE_ATM_Addr::dump (void) const
// //if (get_local_address (fd, source_addr->address))
// // {
// // ACE_ERROR ((LM_ERROR,
-// // ASYS_TEXT ("Can't get local address!\n")));
+// // ACE_TEXT ("Can't get local address!\n")));
// // ACE_OS::free (buf);
// // return 0;
// // }
diff --git a/ace/ATM_Addr.h b/ace/ATM_Addr.h
index 4e78efd4c35..1c24b1088f2 100644
--- a/ace/ATM_Addr.h
+++ b/ace/ATM_Addr.h
@@ -58,7 +58,7 @@ public:
// is vendor specific (FORE systems). May need to change when other
// vendors are supported.
- ACE_ATM_Addr (const ASYS_TCHAR sap[],
+ ACE_ATM_Addr (const ACE_TCHAR sap[],
unsigned char selector = DEFAULT_SELECTOR);
// Initializes an <ACE_ATM_Addr> from the <sap> which can be
// "atm-address" (e.g.,
@@ -83,20 +83,20 @@ public:
// structure. This is vendor specific (FORE systems). May need to
// change when other vendors are supported.
- int set (const ASYS_TCHAR sap[],
+ int set (const ACE_TCHAR sap[],
unsigned char selector = DEFAULT_SELECTOR);
// Initializes an <ACE_ATM_Addr> from the <sap> which can be
// "atm-address" (e.g.,
// "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname"
// (e.g., "frisbee.cs.wustl.edu").
- virtual int string_to_addr (const ASYS_TCHAR sap[]);
+ virtual int string_to_addr (const ACE_TCHAR sap[]);
// Initializes an <ACE_ATM_Addr> from the <sap> which can be
// "atm-address" (e.g.,
// "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname"
// (e.g., "frisbee.cs.wustl.edu").
- virtual int addr_to_string (ASYS_TCHAR addr[],
+ virtual int addr_to_string (ACE_TCHAR addr[],
size_t addrlen) const;
// Return the character representation of the ATM address (e.g.,
// "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") storing it in
@@ -104,7 +104,7 @@ public:
// version is reentrant. Returns -1 if the <addrlen> of the <addr>
// is too small, else 0.
- const ASYS_TCHAR *addr_to_string (void) const;
+ const ACE_TCHAR *addr_to_string (void) const;
// Return the character representation of the ATM address (e.g.,
// "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00"). Returns -1
// if the <size> of the <buffer> is too small, else 0.(This version
diff --git a/ace/ATM_Connector.i b/ace/ATM_Connector.i
index 8f9187f8ac4..c4dafa39496 100644
--- a/ace/ATM_Connector.i
+++ b/ace/ATM_Connector.i
@@ -25,8 +25,8 @@ ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream,
flags,
perms) == ACE_INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream")));
}
// Try to complete a non-blocking connection.
diff --git a/ace/ATM_QoS.cpp b/ace/ATM_QoS.cpp
index d5dc8261e34..b28e5b7e1d7 100644
--- a/ace/ATM_QoS.cpp
+++ b/ace/ATM_QoS.cpp
@@ -404,7 +404,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
if (buf == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Unable to allocate %d bytes for options\n"),
+ ACE_TEXT ("Unable to allocate %d bytes for options\n"),
info.options),
0);
@@ -440,7 +440,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
{
ACE_OS::t_error("t_getname (local_address)");
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("Can't get local address!\n")));
+ ACE_TEXT ("Can't get local address!\n")));
ACE_OS::free (buf);
return 0;
}
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index 6ce83be2583..824c5892191 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -125,8 +125,8 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor
use_select,
reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Acceptor::ACE_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Acceptor::ACE_Acceptor")));
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
@@ -146,19 +146,19 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
// Hook called by the explicit dynamic linking facility.
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ASYS_TCHAR *[])
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
return -1;
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp,
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
size_t length) const
{
ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
- ASYS_TCHAR buf[BUFSIZ];
- ASYS_TCHAR addr_str[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
+ ACE_TCHAR addr_str[BUFSIZ];
ACE_PEER_ACCEPTOR_ADDR addr;
if (this->acceptor ().get_local_addr (addr) == -1)
@@ -167,10 +167,10 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp,
return -1;
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s %s"),
- ASYS_TEXT ("ACE_Acceptor"),
+ ACE_TEXT ("%s\t %s %s"),
+ ACE_TEXT ("ACE_Acceptor"),
addr_str,
- ASYS_TEXT ("# acceptor factory\n"));
+ ACE_TEXT ("# acceptor factory\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -222,7 +222,7 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
// Shut down the listen socket to recycle the handles.
if (this->peer_acceptor_.close () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("close\n")));
+ ACE_TEXT ("close\n")));
// Set the Reactor to 0 so that we don't try to close down
// again.
this->reactor (0);
@@ -367,8 +367,8 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listene
{
if (ACE::debug () > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("make_svc_handler")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("make_svc_handler")));
return 0;
}
// Accept connection into the Svc_Handler.
@@ -377,8 +377,8 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listene
{
if (ACE::debug () > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("accept_svc_handler")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("accept_svc_handler")));
return 0;
}
@@ -390,8 +390,8 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listene
{
if (ACE::debug () > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("activate_svc_handler")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("activate_svc_handler")));
return 0;
}
@@ -443,18 +443,18 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump ();
this->creation_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_creation_strategy_ = %d"), delete_creation_strategy_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_creation_strategy_ = %d"), delete_creation_strategy_));
this->accept_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_accept_strategy_ = %d"), delete_accept_strategy_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_accept_strategy_ = %d"), delete_accept_strategy_));
this->concurrency_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_concurrency_strategy_ = %d"), delete_concurrency_strategy_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_concurrency_strategy_ = %d"), delete_concurrency_strategy_));
this->scheduling_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_scheduling_strategy_ = %d"), delete_scheduling_strategy_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nservice_name_ = %s"),
- this->service_name_ == 0 ? ASYS_TEXT ("<unknown>") : this->service_name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nservice_description_ = %s"),
- this->service_description_ == 0 ? ASYS_TEXT ("<unknown>") : this->service_description_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nservice_port_ = %d"), this->service_port_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_scheduling_strategy_ = %d"), delete_scheduling_strategy_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_name_ = %s"),
+ this->service_name_ == 0 ? ACE_TEXT ("<unknown>") : this->service_name_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_description_ = %s"),
+ this->service_description_ == 0 ? ACE_TEXT ("<unknown>") : this->service_description_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_port_ = %d"), this->service_port_));
this->service_addr_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -495,8 +495,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const ASYS_TCHAR *service_name,
- const ASYS_TCHAR *service_description,
+ const ACE_TCHAR *service_name,
+ const ACE_TCHAR *service_description,
int use_select)
{
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
@@ -576,8 +576,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
- (const ASYS_TCHAR service_name[],
- const ASYS_TCHAR service_description[],
+ (const ACE_TCHAR service_name[],
+ const ACE_TCHAR service_description[],
int use_select)
: creation_strategy_ (0),
delete_creation_strategy_ (0),
@@ -610,8 +610,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const ASYS_TCHAR service_name[],
- const ASYS_TCHAR service_description[],
+ const ACE_TCHAR service_name[],
+ const ACE_TCHAR service_description[],
int use_select)
: creation_strategy_ (0),
delete_creation_strategy_ (0),
@@ -637,8 +637,8 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
service_description,
use_select) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor")));
}
// Perform termination activities when <this> is removed from the
@@ -752,13 +752,13 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_signal (int, sig
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp,
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
size_t length) const
{
ACE_TRACE ("ACE_Strategy_Acceptor::info");
- ASYS_TCHAR buf[BUFSIZ];
- ASYS_TCHAR service_addr_str[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
+ ACE_TCHAR service_addr_str[BUFSIZ];
ACE_PEER_ACCEPTOR_ADDR addr;
if (this->acceptor ().get_local_addr (addr) == -1)
@@ -769,13 +769,13 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp
// @@ Should add the protocol in...
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s #%s\n"),
+ ACE_TEXT ("%s\t %s #%s\n"),
this->service_name_ == 0
- ? ASYS_TEXT ("<unknown>")
+ ? ACE_TEXT ("<unknown>")
: this->service_name_,
service_addr_str,
this->service_description_ == 0
- ? ASYS_TEXT ("<unknown>")
+ ? ACE_TEXT ("<unknown>")
: this->service_description_);
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
@@ -800,10 +800,10 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nsvc_handler_ = %x"), this->svc_handler_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nrestart_ = %d"), this->restart_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsvc_handler_ = %x"), this->svc_handler_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d"), this->restart_));
this->peer_acceptor_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_concurrency_strategy_ = %d"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_concurrency_strategy_ = %d"),
delete_concurrency_strategy_));
this->concurrency_strategy_->dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -851,8 +851,8 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
if (this->open (local_addr, reactor, cs) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor")));
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
@@ -892,7 +892,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE
if (this->peer_acceptor_.close () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("close\n")));
+ ACE_TEXT ("close\n")));
}
return 0;
}
@@ -1092,7 +1092,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE
// Hook called by the explicit dynamic linking facility.
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ASYS_TCHAR *[])
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
return -1;
@@ -1106,12 +1106,12 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp,
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
size_t length) const
{
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
- ASYS_TCHAR buf[BUFSIZ];
- ASYS_TCHAR addr_str[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
+ ACE_TCHAR addr_str[BUFSIZ];
ACE_PEER_ACCEPTOR_ADDR addr;
if (this->peer_acceptor_.get_local_addr (addr) == -1)
@@ -1120,10 +1120,10 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ASYS_TCHAR **strp,
return -1;
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s %s"),
- ASYS_TEXT ("ACE_Oneshot_Acceptor"),
+ ACE_TEXT ("%s\t %s %s"),
+ ACE_TEXT ("ACE_Oneshot_Acceptor"),
addr_str,
- ASYS_TEXT ("#oneshot acceptor factory\n"));
+ ACE_TEXT ("#oneshot acceptor factory\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
diff --git a/ace/Acceptor.h b/ace/Acceptor.h
index fd9003eaab4..cb2caa01717 100644
--- a/ace/Acceptor.h
+++ b/ace/Acceptor.h
@@ -150,14 +150,14 @@ protected:
// activates SVC_HANDLERs.
// = Dynamic linking hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
virtual int fini (void);
// Calls <handle_close>.
- virtual int info (ASYS_TCHAR **buf, size_t) const;
+ virtual int info (ACE_TCHAR **buf, size_t) const;
// Default version returns address info in <buf>.
// = Service management hooks.
@@ -199,8 +199,8 @@ class ACE_Strategy_Acceptor : public ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTO
// particular concurrency mechanism.
public:
// = Initialization and termination methods.
- ACE_Strategy_Acceptor (const ASYS_TCHAR service_name[] = 0,
- const ASYS_TCHAR service_description[] = 0,
+ ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
+ const ACE_TCHAR service_description[] = 0,
int use_select = 1);
// Default constructor.
@@ -210,8 +210,8 @@ public:
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0,
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
- const ASYS_TCHAR service_name[] = 0,
- const ASYS_TCHAR service_description[] = 0,
+ const ACE_TCHAR service_name[] = 0,
+ const ACE_TCHAR service_description[] = 0,
int use_select = 1);
// Initialize the appropriate strategies for creation, passive
// connection acceptance, and concurrency, and then register <this>
@@ -224,8 +224,8 @@ public:
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0,
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
- const ASYS_TCHAR *service_name = 0,
- const ASYS_TCHAR *service_description = 0,
+ const ACE_TCHAR *service_name = 0,
+ const ACE_TCHAR *service_description = 0,
int use_select = 1);
// Initialize the appropriate strategies for creation, passive
// connection acceptance, and concurrency, and then register <this>
@@ -264,7 +264,7 @@ protected:
virtual int fini (void);
// Calls <handle_close> when dynamically unlinked.
- virtual int info (ASYS_TCHAR **buf, size_t) const;
+ virtual int info (ACE_TCHAR **buf, size_t) const;
// Default version returns address info in <buf>.
// = The following three methods define the <Acceptor>'s strategies
@@ -346,10 +346,10 @@ protected:
// = Service information objects.
- ASYS_TCHAR *service_name_;
+ ACE_TCHAR *service_name_;
// Name of the service.
- ASYS_TCHAR *service_description_;
+ ACE_TCHAR *service_description_;
// Description of the service.
u_short service_port_;
@@ -473,7 +473,7 @@ protected:
// Called when an acceptor times out...
// = Dynamic linking hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
@@ -481,7 +481,7 @@ protected:
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
- virtual int info (ASYS_TCHAR **, size_t) const;
+ virtual int info (ACE_TCHAR **, size_t) const;
// Default version returns address info in <buf>.
// = Service management hooks.
diff --git a/ace/Activation_Queue.cpp b/ace/Activation_Queue.cpp
index 9ac971f375b..0072667f561 100644
--- a/ace/Activation_Queue.cpp
+++ b/ace/Activation_Queue.cpp
@@ -17,13 +17,13 @@ ACE_Activation_Queue::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("delete_queue_ = %d\n"),
+ ACE_TEXT ("delete_queue_ = %d\n"),
this->delete_queue_));
- ACE_DEBUG ((LM_INFO, ASYS_TEXT ("queue_: \n")));
+ ACE_DEBUG ((LM_INFO, ACE_TEXT ("queue_: \n")));
if (this->queue_)
this->queue_->dump();
else
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(NULL)\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Addr.cpp b/ace/Addr.cpp
index 01142f51489..460ccc48cb8 100644
--- a/ace/Addr.cpp
+++ b/ace/Addr.cpp
@@ -37,8 +37,8 @@ ACE_Addr::dump (void) const
ACE_TRACE ("ACE_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("addr_type_ = %d"), this->addr_type_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\naddr_size_ = %d"), this->addr_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("addr_type_ = %d"), this->addr_type_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\naddr_size_ = %d"), this->addr_size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Arg_Shifter.cpp b/ace/Arg_Shifter.cpp
index bd94cfbc259..ec7e8127b8c 100644
--- a/ace/Arg_Shifter.cpp
+++ b/ace/Arg_Shifter.cpp
@@ -6,8 +6,8 @@
ACE_RCSID(ace, Arg_Shifter, "$Id$")
ACE_Arg_Shifter::ACE_Arg_Shifter (int& argc,
- char** argv,
- char** temp)
+ ACE_TCHAR** argv,
+ ACE_TCHAR** temp)
: argc_ (argc),
total_size_ (argc),
temp_ (temp),
@@ -19,7 +19,7 @@ ACE_Arg_Shifter::ACE_Arg_Shifter (int& argc,
// If not provided with one, allocate a temporary array.
if (this->temp_ == 0)
ACE_NEW (this->temp_,
- char*[this->total_size_]);
+ ACE_TCHAR*[this->total_size_]);
if (this->temp_ != 0)
{
@@ -45,10 +45,10 @@ ACE_Arg_Shifter::~ACE_Arg_Shifter (void)
delete [] temp_;
}
-char*
+ACE_TCHAR*
ACE_Arg_Shifter::get_current (void) const
{
- char* retval = 0;
+ ACE_TCHAR* retval = 0;
if (this->is_anything_left ())
retval = this->temp_[current_index_];
@@ -56,8 +56,8 @@ ACE_Arg_Shifter::get_current (void) const
return retval;
}
-char*
-ACE_Arg_Shifter::get_the_parameter (const char* flag)
+ACE_TCHAR*
+ACE_Arg_Shifter::get_the_parameter (const ACE_TCHAR *flag)
{
// the return 0's abound because this method
// would otherwise be a deep if { } else { }
@@ -85,7 +85,7 @@ ACE_Arg_Shifter::get_the_parameter (const char* flag)
}
int
-ACE_Arg_Shifter::cur_arg_strncasecmp (const char* flag)
+ACE_Arg_Shifter::cur_arg_strncasecmp (const ACE_TCHAR *flag)
{
// Check for a current argument
if (this->is_anything_left())
@@ -108,7 +108,7 @@ ACE_Arg_Shifter::cur_arg_strncasecmp (const char* flag)
// matches, with more info to boot!
return ACE_OS::strspn
(this->temp_[current_index_] + flag_length,
- " ") + flag_length;
+ ACE_TEXT (" ")) + flag_length;
}
}
}
diff --git a/ace/Arg_Shifter.h b/ace/Arg_Shifter.h
index 4fb697372e2..4ae9b7a1262 100644
--- a/ace/Arg_Shifter.h
+++ b/ace/Arg_Shifter.h
@@ -39,8 +39,8 @@ class ACE_Export ACE_Arg_Shifter
public:
// = Initialization and termination methods.
ACE_Arg_Shifter (int& argc,
- char** argv,
- char** temp = 0);
+ ACE_TCHAR **argv,
+ ACE_TCHAR **temp = 0);
// Initialize the <ACE_Arg_Shifter> to the vector over which to
// iterate, also providing the temporary array if the client doesn't
// want the arg_shifter to dynamically allocate its own. If internal
@@ -52,10 +52,10 @@ public:
~ACE_Arg_Shifter (void);
// Destructor.
- char* get_current (void) const;
+ ACE_TCHAR *get_current (void) const;
// Get the current head of the vector.
- char* get_the_parameter (const char* flag);
+ ACE_TCHAR *get_the_parameter (const ACE_TCHAR* flag);
// If the <flag> matches the current_arg of arg shifter
// this method will attempt to return the associated
// parameter value
@@ -87,7 +87,7 @@ public:
// together '-foobarflagVALUE', the flag is NOT consumed
// and the cur arg is left pointing to the entire flag/value pair
- int cur_arg_strncasecmp (const char* flag);
+ int cur_arg_strncasecmp (const ACE_TCHAR *flag);
// Check if the current argument matches (case insensitive) <flag>
//
// ------------------------------------------------------------
@@ -145,10 +145,10 @@ private:
int total_size_;
// The size of argv_.
- char** temp_;
+ ACE_TCHAR **temp_;
// The temporary array over which we traverse.
- char** argv_;
+ ACE_TCHAR **argv_;
// The array in which the arguments are reordered.
int current_index_;
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
index 386f2cb0509..28ef8f6188f 100644
--- a/ace/Asynch_Acceptor.cpp
+++ b/ace/Asynch_Acceptor.cpp
@@ -60,8 +60,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
this->listen_handle_ = ACE_OS::socket (PF_INET, SOCK_STREAM, 0);
if (this->listen_handle_ == ACE_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_OS::socket")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_OS::socket")),
-1);
// Initialize the ACE_Asynch_Accept
if (this->asynch_accept_.open (*this,
@@ -69,8 +69,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
0,
this->proactor ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Asynch_Accept::open")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Asynch_Accept::open")),
-1);
if (reuse_addr)
{
@@ -82,8 +82,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
(const char*) &one,
sizeof one) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_OS::setsockopt")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_OS::setsockopt")),
-1);
}
@@ -92,8 +92,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
if (address == sa && ACE::bind_port (this->listen_handle_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE::bind_port")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE::bind_port")),
-1);
// Bind to the specified port.
@@ -139,8 +139,8 @@ ACE_Asynch_Acceptor<HANDLER>::set_handle (ACE_HANDLE listen_handle)
0,
this->proactor ()) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Asynch_Accept::open")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Asynch_Accept::open")));
}
template <class HANDLER> ACE_HANDLE
@@ -169,8 +169,8 @@ ACE_Asynch_Acceptor<HANDLER>::accept (size_t bytes_to_read, const void *act)
// Cleanup on error
message_block->release ();
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Asynch_Accept::accept")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Asynch_Accept::accept")),
-1);
}
return 0;
@@ -192,8 +192,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("AcceptEx")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("AcceptEx")));
}
#if !defined (ACE_HAS_AIO_CALLS)
@@ -211,8 +211,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p"),
- ASYS_TEXT ("ACE_OS::setsockopt")));
+ ACE_TEXT ("%p"),
+ ACE_TEXT ("ACE_OS::setsockopt")));
}
#endif /* ACE_HAS_AIO_CALLS */
@@ -233,8 +233,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("Address validation failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Address validation failed")));
}
HANDLER *new_handler = 0;
@@ -246,8 +246,8 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
{
error = 1;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("Making of new handler failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Making of new handler failed")));
}
}
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 4395f57e56a..0aa1c205eb7 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -1004,16 +1004,16 @@ ACE_Service_Handler::addresses (const ACE_INET_Addr &remote_address,
const ACE_INET_Addr &local_address)
{
// Default behavior is to print out the addresses.
- ASYS_TCHAR local_address_buf[BUFSIZ], remote_address_buf[BUFSIZ];
+ ACE_TCHAR local_address_buf[BUFSIZ], remote_address_buf[BUFSIZ];
if (local_address.addr_to_string (local_address_buf, sizeof local_address_buf) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("can't obtain local_address's address string")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("can't obtain local_address's address string")));
if (remote_address.addr_to_string (remote_address_buf, sizeof remote_address_buf) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("can't obtain remote_address's address string")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("can't obtain remote_address's address string")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("On fd %d\n"), this->handle ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("local address %s\n"), local_address_buf));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("remote address %s\n"), remote_address_buf));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("On fd %d\n"), this->handle ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("local address %s\n"), local_address_buf));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("remote address %s\n"), remote_address_buf));
}
void
diff --git a/ace/Based_Pointer_T.cpp b/ace/Based_Pointer_T.cpp
index 5d10b67e11a..e4452fc90a1 100644
--- a/ace/Based_Pointer_T.cpp
+++ b/ace/Based_Pointer_T.cpp
@@ -6,7 +6,7 @@
#include "ace/Based_Pointer_T.h"
#include "ace/Based_Pointer_Repository.h"
-# define ACE_TRACEX(X) ACE_Trace ____ (ASYS_TEXT (X), __LINE__, ASYS_TEXT (__FILE__))
+# define ACE_TRACEX(X) ACE_Trace ____ (ACE_TEXT (X), __LINE__, ACE_TEXT (__FILE__))
#if !defined (__ACE_INLINE__)
#include "ace/Based_Pointer_T.i"
@@ -24,9 +24,9 @@ ACE_Based_Pointer_Basic<CONCRETE>::dump (void) const
ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntarget_ = %d\n"), this->target_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base_offset_ = %d\n"), this->base_offset_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("computed pointer = %x\n"), (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this))));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntarget_ = %d\n"), this->target_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base_offset_ = %d\n"), this->base_offset_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("computed pointer = %x\n"), (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this))));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index 0866c3214e8..005f7ef96fc 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -56,11 +56,10 @@
# define ACE_SIZEOF_CHAR 1
// Unfortunately, there isn't a portable way to determine the size of a wchar.
-# if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-# define ACE_SIZEOF_WCHAR 1
-# else
+// But we do not support the case where wchar == char, so this should work.
+# if defined (ACE_HAS_WCHAR)
# define ACE_SIZEOF_WCHAR sizeof (wchar_t)
-# endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */
+# endif /* ACE_HAS_WCHAR */
// The number of bytes in a short.
# if !defined (ACE_SIZEOF_SHORT)
@@ -422,11 +421,11 @@ typedef ACE_UINT16 ACE_USHORT16;
# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
#if !defined (ACE_UINT64_FORMAT_SPECIFIER)
-# define ACE_UINT64_FORMAT_SPECIFIER "%llu"
+# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%llu")
#endif /* ACE_UINT64_FORMAT_SPECIFIER */
#if !defined (ACE_INT64_FORMAT_SPECIFIER)
-# define ACE_INT64_FORMAT_SPECIFIER "%lld"
+# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%lld")
#endif /* ACE_INT64_FORMAT_SPECIFIER */
// Cast from UINT64 to a double requires an intermediate cast to INT64
diff --git a/ace/CLASSIX/CLASSIX_CLD_Connector.cpp b/ace/CLASSIX/CLASSIX_CLD_Connector.cpp
index a054213561a..1baf897b75b 100644
--- a/ace/CLASSIX/CLASSIX_CLD_Connector.cpp
+++ b/ace/CLASSIX/CLASSIX_CLD_Connector.cpp
@@ -41,7 +41,7 @@ ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector (
reuse_addr, flags, perms,
protocol_family, protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"), ASYS_TEXT
+ ACE_TEXT ("%p\n"), ACE_TEXT
("ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector")));
}
diff --git a/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp b/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp
index 153bed23e49..b46d594c262 100644
--- a/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp
+++ b/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp
@@ -26,8 +26,8 @@ ACE_CLASSIX_CO_Acceptor::ACE_CLASSIX_CO_Acceptor (const ACE_Addr &local_sap,
if (this->open (local_sap, reuse_addr, protocol_family,
backlog, protocol, theReactor) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_CLASSIX_CO_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_CLASSIX_CO_Acceptor")));
}
// General purpose routine for performing server creation.
diff --git a/ace/CLASSIX/CLASSIX_Port.cpp b/ace/CLASSIX/CLASSIX_Port.cpp
index 7beb2a13ae6..9ed92a29fe1 100644
--- a/ace/CLASSIX/CLASSIX_Port.cpp
+++ b/ace/CLASSIX/CLASSIX_Port.cpp
@@ -108,9 +108,9 @@ ACE_CLASSIX_Port::operator =(ACE_Addr const& theAddr)
}
int
-ACE_CLASSIX_Port::addr_to_string (ASYS_TCHAR s[], size_t) const
+ACE_CLASSIX_Port::addr_to_string (ACE_TCHAR s[], size_t) const
{
- ACE_OS::sprintf (s, ASYS_TEXT ("%d:%d"),
+ ACE_OS::sprintf (s, ACE_TEXT ("%d:%d"),
ASYS_WIDE_STRING (::agetId()),
this->get_port_number ());
}
diff --git a/ace/CLASSIX/CLASSIX_Port.h b/ace/CLASSIX/CLASSIX_Port.h
index 65bb1745d18..94402bf16ca 100644
--- a/ace/CLASSIX/CLASSIX_Port.h
+++ b/ace/CLASSIX/CLASSIX_Port.h
@@ -78,7 +78,7 @@ public:
/* -----------------------------------------------------*/
// = ACCESS
- virtual int addr_to_string (ASYS_TCHAR addr[], size_t) const;
+ virtual int addr_to_string (ACE_TCHAR addr[], size_t) const;
// Transform the current <ACE_CLASSIX_Port> address into string format,
// which is in the form "actor-id:port-number"
diff --git a/ace/CLASSIX/CLASSIX_Select_Reactor.cpp b/ace/CLASSIX/CLASSIX_Select_Reactor.cpp
index 035c6219403..13716a5d351 100644
--- a/ace/CLASSIX/CLASSIX_Select_Reactor.cpp
+++ b/ace/CLASSIX/CLASSIX_Select_Reactor.cpp
@@ -165,7 +165,7 @@ ACE_CLASSIX_Select_Reactor_Notify::dump (void) const
ACE_TRACE ("ACE_CLASSIX_Select_Reactor_Notify::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_CLASSIX_select_reactor_ = %x"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_CLASSIX_select_reactor_ = %x"),
this->select_reactor_));
this->notification_sap_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -305,7 +305,7 @@ ACE_CLASSIX_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
break;
default:
// Should we bail out if we get an invalid mask?
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("invalid mask = %d\n"), buffer.mask_));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("invalid mask = %d\n"), buffer.mask_));
}
if (result == -1)
buffer.eh_->handle_close (ACE_INVALID_HANDLE,
diff --git a/ace/CORBA_Handler.cpp b/ace/CORBA_Handler.cpp
index a3d567e97cd..a4d20ae153b 100644
--- a/ace/CORBA_Handler.cpp
+++ b/ace/CORBA_Handler.cpp
@@ -22,7 +22,7 @@ ACE_CORBA_Handler::dump (void) const
ACE_TRACE ("ACE_CORBA_Handler::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nreference_count_ = %d"), this->reference_count_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nreference_count_ = %d"), this->reference_count_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -45,8 +45,8 @@ ACE_ST_CORBA_Handler::dump (void) const
ACE_CORBA_Handler::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"), this->instance_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\niteration_ = %d"), this->iterations_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), this->instance_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\niteration_ = %d"), this->iterations_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -81,7 +81,7 @@ void
ACE_ST_CORBA_Handler::insert_handle (ACE_HANDLE handle)
{
ACE_TRACE ("ACE_ST_CORBA_Handler::insert_handle");
-// ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("+++ inserting %d\n"), handle));
+// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("+++ inserting %d\n"), handle));
#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
if (ACE_ST_CORBA_Handler::previous_orbix_open_callback_ != 0)
@@ -96,7 +96,7 @@ ACE_ST_CORBA_Handler::insert_handle (ACE_HANDLE handle)
(handle, ACE_ST_CORBA_Handler::instance_, ACE_Event_Handler::READ_MASK);
else
;
-// ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("insert_handle: reactor NULL\n")));
+// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("insert_handle: reactor NULL\n")));
}
// Remove a descriptor from the ACE_Reactor that Orbix has just deleted.
@@ -106,7 +106,7 @@ void
ACE_ST_CORBA_Handler::remove_handle (ACE_HANDLE handle)
{
ACE_TRACE ("ACE_ST_CORBA_Handler::remove_handle");
-// ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("--- removing %d\n"), handle));
+// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("--- removing %d\n"), handle));
#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
if (ACE_ST_CORBA_Handler::previous_orbix_close_callback_ != 0)
@@ -121,7 +121,7 @@ ACE_ST_CORBA_Handler::remove_handle (ACE_HANDLE handle)
(handle, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
else
;
-// ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("remove_handle: reactor NULL\n")));
+// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("remove_handle: reactor NULL\n")));
}
/* static */
@@ -329,7 +329,7 @@ ACE_CORBA_Handler::deactivate_service (const char *service_name,
if (ref_count < 0)
;
-// ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("warning, reference count == %d\n"),
+// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("warning, reference count == %d\n"),
// ref_count));
return 0;
}
@@ -408,8 +408,8 @@ ACE_MT_CORBA_Handler::dump (void) const
ACE_TRACE ("ACE_MT_CORBA_Handler::dump");
ACE_CORBA_Handler::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"), this->instance_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), this->instance_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
this->pipe_.dump ();
ACE_MT (ACE_Thread_Mutex *lock =
ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
diff --git a/ace/Cache_Map_Manager_T.cpp b/ace/Cache_Map_Manager_T.cpp
index 08739d7dcf3..b8779796b4e 100644
--- a/ace/Cache_Map_Manager_T.cpp
+++ b/ace/Cache_Map_Manager_T.cpp
@@ -43,8 +43,8 @@ ACE_Cache_Map_Manager<ACE_T2>::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_
{
if (this->open (size, alloc) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Cache_Map_Manager::ACE_Cache_Map_Manager")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Cache_Map_Manager::ACE_Cache_Map_Manager")));
}
diff --git a/ace/Cached_Connect_Strategy_T.cpp b/ace/Cached_Connect_Strategy_T.cpp
index 011fc7950d7..ff660ff20ed 100644
--- a/ace/Cached_Connect_Strategy_T.cpp
+++ b/ace/Cached_Connect_Strategy_T.cpp
@@ -39,8 +39,8 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::ACE_Cached_Connect_Strategy_Ex
{
if (this->open (cre_s, con_s, rec_s) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Cached_Connect_Strategy_Ex<ACE_T2>\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex<ACE_T2>\n")));
}
template <ACE_T1>
diff --git a/ace/Caching_Strategies_T.i b/ace/Caching_Strategies_T.i
index 8a6e2493b9e..30df91a76ed 100644
--- a/ace/Caching_Strategies_T.i
+++ b/ace/Caching_Strategies_T.i
@@ -193,7 +193,7 @@ ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
ACE_TRACE ("ACE_LRU_Caching_Strategy::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("timer_ = %d "), this->timer_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("timer_ = %d "), this->timer_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -361,7 +361,7 @@ ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
ACE_TRACE ("ACE_FIFO_Caching_Strategy::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("order_ = %d "), this->order_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("order_ = %d "), this->order_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Capabilities.cpp b/ace/Capabilities.cpp
index ab164bf28d8..4a056e07940 100644
--- a/ace/Capabilities.cpp
+++ b/ace/Capabilities.cpp
@@ -7,7 +7,7 @@
#include "ace/Capabilities.i"
#endif /* !__ACE_INLINE__ */
-#define ACE_ESC ((char)0x1b)
+#define ACE_ESC ((ACE_TCHAR)0x1b)
ACE_CapEntry::~ACE_CapEntry (void)
{
@@ -22,53 +22,53 @@ ACE_Capabilities::~ACE_Capabilities (void)
this->resetcaps ();
}
-const char *
-ACE_Capabilities::parse (const char *buf,
- ACE_CString &cap)
+const ACE_TCHAR *
+ACE_Capabilities::parse (const ACE_TCHAR *buf, ACE_TString &cap)
{
- while (*buf!='\0' && *buf!=',')
+ while (*buf != ACE_TEXT ('\0') && *buf != ACE_TEXT (','))
{
- if (*buf == '\\')
+ if (*buf == ACE_TEXT ('\\'))
{
buf++;
- if (*buf == 'E' || *buf == 'e')
+ if (*buf == ACE_TEXT ('E') || *buf == ACE_TEXT ('e'))
{
cap += ACE_ESC;
buf++;
continue;
}
- else if (*buf == 'r')
+ else if (*buf == ACE_TEXT ('r'))
{
- cap += '\r';
+ cap += ACE_TEXT ('\r');
buf++;
continue;
}
- else if (*buf == 'n')
+ else if (*buf == ACE_TEXT ('n'))
{
- cap += '\n';
+ cap += ACE_TEXT ('\n');
buf++;
continue;
}
- else if (*buf == 't')
+ else if (*buf == ACE_TEXT ('t'))
{
- cap += '\t';
+ cap += ACE_TEXT ('\t');
buf++;
continue;
}
- else if (*buf == '\\')
+ else if (*buf == ACE_TEXT ('\\'))
{
cap += *buf++;
continue;
}
if (isdigit(*buf))
{
+ // @@ UNICODE Does this work with unicode?
int oc = 0;
for (int i = 0;
i < 3 && *buf && isdigit (*buf);
i++)
- oc = oc * 8 + (*buf++ - '0');
+ oc = oc * 8 + (*buf++ - ACE_TEXT ('0'));
- cap += (char) oc;
+ cap += (ACE_TCHAR) oc;
continue;
}
}
@@ -77,14 +77,13 @@ ACE_Capabilities::parse (const char *buf,
return buf;
}
-const char *
-ACE_Capabilities::parse (const char *buf,
- int &cap)
+const ACE_TCHAR *
+ACE_Capabilities::parse (const ACE_TCHAR *buf, int &cap)
{
int n = 0;
while (*buf && isdigit (*buf))
- n = n * 10 + (*buf++ - '0');
+ n = n * 10 + (*buf++ - ACE_TEXT ('0'));
cap = n;
@@ -94,11 +93,11 @@ ACE_Capabilities::parse (const char *buf,
void
ACE_Capabilities::resetcaps (void)
{
- for (ACE_Hash_Map_Iterator<ACE_CString, ACE_CapEntry *, ACE_Null_Mutex> iter (caps_);
+ for (ACE_Hash_Map_Iterator<ACE_TString, ACE_CapEntry *, ACE_Null_Mutex> iter (caps_);
!iter.done ();
iter.advance ())
{
- ACE_Hash_Map_Entry<ACE_CString,ACE_CapEntry*> *entry;
+ ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*> *entry;
iter.next (entry);
delete entry->int_id_;
}
@@ -108,40 +107,40 @@ ACE_Capabilities::resetcaps (void)
}
int
-ACE_Capabilities::fillent (const char *buf)
+ACE_Capabilities::fillent (const ACE_TCHAR *buf)
{
this->resetcaps ();
while (*buf)
{
- ACE_CString s;
+ ACE_TString s;
int n;
- ACE_CString name;
+ ACE_TString name;
ACE_CapEntry *ce;
// Skip blanks
while (*buf && isspace(*buf)) buf++;
// If we get end of line return
- if (*buf=='\0')
+ if (*buf == ACE_TEXT ('\0'))
break;
- if (*buf=='#')
+ if (*buf == ACE_TEXT ('#'))
{
- while (*buf && *buf!='\n')
+ while (*buf && *buf != ACE_TEXT ('\n'))
buf++;
- if (*buf=='\n')
+ if (*buf == ACE_TEXT ('\n'))
buf++;
continue;
}
- while(*buf && *buf != '='
- && *buf!= '#'
- && *buf != ',')
+ while(*buf && *buf != ACE_TEXT ('=')
+ && *buf!= ACE_TEXT ('#')
+ && *buf != ACE_TEXT (','))
name += *buf++;
// If name is null.
switch (*buf)
{
- case '=':
+ case ACE_TEXT ('='):
// String property
buf = this->parse (buf + 1, s);
ACE_NEW_RETURN (ce,
@@ -153,7 +152,7 @@ ACE_Capabilities::fillent (const char *buf)
return -1;
}
break;
- case '#':
+ case ACE_TEXT ('#'):
// Integer property
buf = this->parse (buf + 1, n);
ACE_NEW_RETURN (ce,
@@ -165,7 +164,7 @@ ACE_Capabilities::fillent (const char *buf)
return -1;
}
break;
- case ',':
+ case ACE_TEXT (','):
// Boolean
ACE_NEW_RETURN (ce,
ACE_BoolCapEntry (1),
@@ -180,7 +179,7 @@ ACE_Capabilities::fillent (const char *buf)
return 0;
}
- if (*buf++!=',')
+ if (*buf++ != ACE_TEXT (','))
return -1;
}
@@ -188,8 +187,7 @@ ACE_Capabilities::fillent (const char *buf)
}
int
-ACE_Capabilities::is_entry (const char *name,
- const char *line)
+ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line)
{
for (;;)
{
@@ -198,12 +196,12 @@ ACE_Capabilities::is_entry (const char *name,
line++;
// End of line reached
- if (*line=='\0')
+ if (*line == ACE_TEXT ('\0'))
break;
// Build the entry name
- ACE_CString nextname;
- while (*line && *line != '|' && *line != ',')
+ ACE_TString nextname;
+ while (*line && *line != ACE_TEXT ('|') && *line != ACE_TEXT (','))
nextname += *line++;
// We have found the required entry?
@@ -211,12 +209,12 @@ ACE_Capabilities::is_entry (const char *name,
return 1;
// Skip puntuaction char if neccesary.
- if (*line=='|' || *line==',')
+ if (*line == ACE_TEXT ('|') || *line == ACE_TEXT (','))
line++;
else
{
ACE_DEBUG ((LM_DEBUG,
- "Invalid entry\n"));
+ ACE_TEXT ("Invalid entry\n")));
break;
}
}
@@ -224,16 +222,14 @@ ACE_Capabilities::is_entry (const char *name,
}
int
-ACE_Capabilities::getline (FILE *fp,
- ACE_CString &line)
-
+ACE_Capabilities::getline (FILE *fp, ACE_TString &line)
{
int ch;
line.set (0, 0);
- while ((ch = fgetc (fp)) != EOF && ch != '\n')
- line += (char) ch;
+ while ((ch = fgetc (fp)) != EOF && ch != ACE_TEXT ('\n'))
+ line += (ACE_TCHAR) ch;
if (ch == EOF && line.length () == 0)
return -1;
@@ -242,16 +238,14 @@ ACE_Capabilities::getline (FILE *fp,
}
int
-ACE_Capabilities::getval (const char *keyname,
- ACE_CString &val)
+ACE_Capabilities::getval (const ACE_TCHAR *keyname, ACE_TString &val)
{
ACE_CapEntry* cap;
if (caps_.find (keyname, cap) == -1)
return -1;
ACE_StringCapEntry *scap =
- ACE_dynamic_cast (ACE_StringCapEntry *,
- cap);
+ ACE_dynamic_cast (ACE_StringCapEntry *, cap);
if (scap == 0)
return -1;
@@ -260,16 +254,14 @@ ACE_Capabilities::getval (const char *keyname,
}
int
-ACE_Capabilities::getval (const char *keyname,
- int &val)
+ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val)
{
ACE_CapEntry *cap;
if (caps_.find (keyname, cap) == -1)
return -1;
ACE_IntCapEntry *icap =
- ACE_dynamic_cast (ACE_IntCapEntry *,
- cap);
+ ACE_dynamic_cast (ACE_IntCapEntry *, cap);
if (icap != 0)
{
val = icap->getval ();
@@ -277,8 +269,7 @@ ACE_Capabilities::getval (const char *keyname,
}
ACE_BoolCapEntry *bcap =
- ACE_dynamic_cast (ACE_BoolCapEntry *,
- cap);
+ ACE_dynamic_cast (ACE_BoolCapEntry *, cap);
if (bcap == 0)
return -1;
@@ -288,38 +279,36 @@ ACE_Capabilities::getval (const char *keyname,
}
static int
-is_empty (const char *line)
+is_empty (const ACE_TCHAR *line)
{
while (*line && isspace (*line))
line++;
- return *line == '\0' || *line == '#';
+ return *line == ACE_TEXT ('\0') || *line == ACE_TEXT ('#');
}
static int
-is_line (const char *line)
+is_line (const ACE_TCHAR *line)
{
while (*line && isspace (*line))
line++;
- return *line != '\0';
+ return *line != ACE_TEXT ('\0');
}
int
-ACE_Capabilities::getent (const char *fname,
- const char *name)
+ACE_Capabilities::getent (const ACE_TCHAR *fname, const ACE_TCHAR *name)
{
- FILE *fp = ACE_OS::fopen (fname,
- "r");
+ FILE *fp = ACE_OS::fopen (fname, ACE_TEXT ("r"));
if (fp == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Can't open %s file\n",
+ ACE_TEXT ("Can't open %s file\n"),
fname),
-1);
int done;
- ACE_CString line;
+ ACE_TString line;
while (!(done = (this->getline (fp, line) == -1))
&& is_empty (line.c_str ()))
@@ -327,10 +316,10 @@ ACE_Capabilities::getent (const char *fname,
while (!done)
{
- ACE_CString newline;
- ACE_CString description;
+ ACE_TString newline;
+ ACE_TString description;
- while (!(done= (this->getline (fp, newline) == -1)))
+ while (!(done = (this->getline (fp, newline) == -1)))
if (is_line (newline.c_str ()))
description += newline;
else
@@ -352,25 +341,25 @@ ACE_Capabilities::getent (const char *fname,
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Hash_Map_Manager<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Entry<ACE_CString,ACE_CapEntry*>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>;
-template class ACE_Hash<ACE_CString>;
-template class ACE_Equal_To<ACE_CString>;
+template class ACE_Hash_Map_Manager<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*>;
+template class ACE_Hash_Map_Manager_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
+template class ACE_Hash<ACE_TString>;
+template class ACE_Equal_To<ACE_TString>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Map_Manager<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Entry<ACE_CString,ACE_CapEntry*>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString,ACE_CapEntry*,ACE_Hash<ACE_CString>,ACE_Equal_To<ACE_CString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash<ACE_CString>
-#pragma instantiate ACE_Equal_To<ACE_CString>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
+#pragma instantiate ACE_Hash<ACE_TString>
+#pragma instantiate ACE_Equal_To<ACE_TString>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Capabilities.h b/ace/Capabilities.h
index f10595deca5..53393da6e19 100644
--- a/ace/Capabilities.h
+++ b/ace/Capabilities.h
@@ -79,11 +79,11 @@ class ACE_Export ACE_StringCapEntry : public ACE_CapEntry
// This is a container class for ACE Capabilities String container
// values.
public:
- ACE_StringCapEntry (const ACE_CString &val);
- ACE_CString getval (void) const;
+ ACE_StringCapEntry (const ACE_TString &val);
+ ACE_TString getval (void) const;
protected:
- ACE_CString val_;
+ ACE_TString val_;
};
class ACE_Export ACE_BoolCapEntry : public ACE_CapEntry
@@ -125,49 +125,42 @@ public:
// The Destructor
public:
- int getval (const char *ent,
- ACE_CString &val);
+ int getval (const ACE_TCHAR *ent, ACE_TString &val);
// Get a string entry.
- int getval (const char *ent,
- int &val);
+ int getval (const ACE_TCHAR *ent, int &val);
// Get an integer entry.
- int getent (const char *fname,
- const char *name);
+ int getent (const ACE_TCHAR *fname, const ACE_TCHAR *name);
// Get the ACE_Capabilities name from FILE fname and load the
// associated capabitily entries in map.
protected:
// Parse an integer property
- const char *parse (const char *buf,
- int &cap);
+ const ACE_TCHAR *parse (const ACE_TCHAR *buf, int &cap);
// Parse a string property
- const char *parse (const char *buf,
- ACE_CString &cap);
+ const ACE_TCHAR *parse (const ACE_TCHAR *buf, ACE_TString &cap);
// Fill the ACE_Capabilities with description in ent.
- int fillent(const char *ent);
+ int fillent(const ACE_TCHAR *ent);
// Parse a cap entry
- int parseent (const char *name,
- char *line);
+ int parseent (const ACE_TCHAR *name, ACE_TCHAR *line);
// Get a line from FILE input stream
int getline (FILE* fp,
- ACE_CString &line);
+ ACE_TString &line);
// Is a valid entry
- int is_entry (const char *name,
- const char *line);
+ int is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line);
// Reset the set of capabilities
void resetcaps (void);
// Atributes.
private:
- ACE_Hash_Map_Manager<ACE_CString, ACE_CapEntry *, ACE_Null_Mutex> caps_;
+ ACE_Hash_Map_Manager<ACE_TString, ACE_CapEntry *, ACE_Null_Mutex> caps_;
// This is the set of ACE_CapEntry.
};
diff --git a/ace/Capabilities.i b/ace/Capabilities.i
index 6f7647ee269..d34d0e08862 100644
--- a/ace/Capabilities.i
+++ b/ace/Capabilities.i
@@ -21,13 +21,13 @@ ACE_IntCapEntry::getval (void) const
}
ACE_INLINE
-ACE_StringCapEntry::ACE_StringCapEntry (const ACE_CString &val)
+ACE_StringCapEntry::ACE_StringCapEntry (const ACE_TString &val)
: ACE_CapEntry (ACE_STRINGCAP),
val_(val)
{
}
-ACE_INLINE ACE_CString
+ACE_INLINE ACE_TString
ACE_StringCapEntry::getval (void) const
{
return val_;
diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp
index c879c856f27..116906caace 100644
--- a/ace/Configuration.cpp
+++ b/ace/Configuration.cpp
@@ -169,8 +169,8 @@ ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key,
ACE_Configuration_Section_Key& key_out,
int create)
{
- const TCHAR* begin = path_in.fast_rep ();
- const TCHAR* end = 0;
+ const ACE_TCHAR* begin = path_in.fast_rep ();
+ const ACE_TCHAR* end = 0;
// Make a copy of key
ACE_Configuration_Section_Key current_section = key;
@@ -179,7 +179,7 @@ ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key,
while (1)
{
// Detmine the begin/ending of the key name
- end = ACE_OS::strchr (begin, '\\');
+ end = ACE_OS::strchr (begin, ACE_TEXT ('\\'));
size_t length = end ? (size_t)(end-begin) : ACE_OS::strlen (begin);
// Make sure length is not 0
@@ -211,9 +211,9 @@ ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key,
}
int
-ACE_Configuration::validate_name (const TCHAR* name)
+ACE_Configuration::validate_name (const ACE_TCHAR* name)
{
- const TCHAR* pos = name;
+ const ACE_TCHAR* pos = name;
// make sure it doesn't contain any invalid characters
while (*pos)
{
@@ -241,9 +241,9 @@ ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
// Write out the section header
ACE_TString header = ACE_TEXT ("[");
header += path;
- header += "]";
- header +="\n";
- if (ACE_OS::fputs (ACE_MULTIBYTE_STRING (header.fast_rep ()), out) < 0)
+ header += ACE_TEXT ("]");
+ header += ACE_TEXT (" \n");
+ if (ACE_OS::fputs (header.fast_rep (), out) < 0)
return -1;
// Write out each value
@@ -251,7 +251,7 @@ ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
ACE_TString name;
VALUETYPE type;
ACE_TString line;
- TCHAR int_value[32];
+ ACE_TCHAR int_value[32];
ACE_TString string_value;
while (!enumerate_values (section, index, name, type))
{
@@ -264,7 +264,7 @@ ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
if (get_integer_value (section, name.fast_rep (), value))
return -2;
- ACE_OS::sprintf (ACE_MULTIBYTE_STRING (int_value), "#%d", value);
+ ACE_OS::sprintf (int_value, ACE_TEXT ("#%d"), value);
line += int_value;
break;
}
@@ -289,7 +289,7 @@ ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
}
line += ACE_TEXT ("\n");
- if (ACE_OS::fputs (ACE_MULTIBYTE_STRING (line.fast_rep ()), out) < 0)
+ if (ACE_OS::fputs (line.fast_rep (), out) < 0)
return -4;
index++;
@@ -322,34 +322,34 @@ ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
}
int
-ACE_Configuration::export_config (const TCHAR* filename)
+ACE_Configuration::export_config (const ACE_TCHAR* filename)
{
- FILE* out = ACE_OS::fopen (ACE_MULTIBYTE_STRING (filename), "w");
+ FILE* out = ACE_OS::fopen (filename, ACE_TEXT ("w"));
if (!out)
return -1;
- int result = export_section (root_, "", out);
+ int result = export_section (root_, ACE_TEXT (""), out);
ACE_OS::fclose (out);
return result;
}
int
-ACE_Configuration::import_config (const TCHAR* filename)
+ACE_Configuration::import_config (const ACE_TCHAR* filename)
{
- FILE* in = ACE_OS::fopen (ACE_MULTIBYTE_STRING (filename), "r");
+ FILE* in = ACE_OS::fopen (filename, ACE_TEXT ("r"));
if (!in)
return -1;
- // XXX - change this to a dynamic buffer
- TCHAR buffer[4096];
+ // @@ XXX - change this to a dynamic buffer
+ ACE_TCHAR buffer[4096];
ACE_Configuration_Section_Key section;
while (ACE_OS::fgets (buffer, 4096, in))
{
// Check for a comment
- if (buffer[0] == ';' || buffer[0] == '#')
+ if (buffer[0] == ACE_TEXT (';') || buffer[0] == ACE_TEXT ('#'))
continue;
- if (buffer[0] == '[')
+ if (buffer[0] == ACE_TEXT ('['))
{
// We have a new section here, strip out the section name
int length = ACE_OS::strlen (buffer);
@@ -362,7 +362,7 @@ ACE_Configuration::import_config (const TCHAR* filename)
}
// assume this is a value, read in the value name
- TCHAR* end = ACE_OS::strchr (buffer, '=');
+ ACE_TCHAR* end = ACE_OS::strchr (buffer, ACE_TEXT ('='));
if (!end) // no =, not a value so just skip it
continue;
@@ -370,16 +370,16 @@ ACE_Configuration::import_config (const TCHAR* filename)
*end = 0;
end++;
// determine the type
- if (*end == '\"')
+ if (*end == ACE_TEXT ('\"'))
{
// string type
if (set_string_value (section, buffer, end + 1))
return -4;
}
- else if (*end == '#')
+ else if (*end == ACE_TEXT ('#'))
{
// number type
- u_int value = atoi (ACE_MULTIBYTE_STRING (end + 1));
+ u_int value = ACE_OS::atoi (end + 1);
if (set_integer_value (section, buffer, value))
return -4;
}
@@ -436,7 +436,7 @@ ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry (void)
int
ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int create,
ACE_Configuration_Section_Key& result)
{
@@ -448,24 +448,24 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
return -1;
HKEY result_key;
- if (::RegOpenKeyEx (base_key,
- sub_section,
- 0,
- KEY_ALL_ACCESS,
- &result_key) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegOpenKeyEx (base_key,
+ sub_section,
+ 0,
+ KEY_ALL_ACCESS,
+ &result_key) != ERROR_SUCCESS)
{
if (!create)
return -2;
- if (::RegCreateKeyEx (base_key,
- sub_section,
- 0,
- NULL,
- REG_OPTION_NON_VOLATILE,
- KEY_ALL_ACCESS,
- NULL,
- &result_key,
- NULL) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegCreateKeyEx (base_key,
+ sub_section,
+ 0,
+ NULL,
+ REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS,
+ NULL,
+ &result_key,
+ NULL) != ERROR_SUCCESS)
return -3;
}
@@ -478,7 +478,7 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
int
ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section_Key& key,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int recursive)
{
if (validate_name (sub_section))
@@ -498,27 +498,27 @@ ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section
if (load_key (section, sub_key))
return -3;
- TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
+ ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
// Note we don't increment the index because the
// enumeration becomes invalid if we change the
// subkey, which we do when we delete it. By leaving
// it 0, we always delete the top entry
- while (::RegEnumKeyEx (sub_key,
- 0,
- name_buffer,
- &buffer_size,
- NULL,
- NULL,
- NULL,
- NULL) == ERROR_SUCCESS)
+ while (ACE_TEXT_RegEnumKeyEx (sub_key,
+ 0,
+ name_buffer,
+ &buffer_size,
+ NULL,
+ NULL,
+ NULL,
+ NULL) == ERROR_SUCCESS)
{
remove_section (section, name_buffer, 1);
buffer_size = ACE_DEFAULT_BUFSIZE;
}
}
- if (::RegDeleteKey (base_key, sub_section) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegDeleteKey (base_key, sub_section) != ERROR_SUCCESS)
return -2;
return 0;
@@ -534,17 +534,17 @@ ACE_Configuration_Win32Registry::enumerate_values (const ACE_Configuration_Secti
if (load_key (key, base_key))
return -1;
- TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
+ ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
DWORD value_type;
- if (::RegEnumValue (base_key,
- Index,
- name_buffer,
- &buffer_size,
- NULL,
- &value_type,
- NULL,
- NULL) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegEnumValue (base_key,
+ Index,
+ name_buffer,
+ &buffer_size,
+ NULL,
+ &value_type,
+ NULL,
+ NULL) != ERROR_SUCCESS)
return -2;
name = name_buffer;
@@ -576,16 +576,16 @@ ACE_Configuration_Win32Registry::enumerate_sections (const ACE_Configuration_Sec
if (load_key (key, base_key))
return -1;
- TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
+ ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
- if (::RegEnumKeyEx (base_key,
- Index,
- name_buffer,
- &buffer_size,
- NULL,
- NULL,
- NULL,
- NULL) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegEnumKeyEx (base_key,
+ Index,
+ name_buffer,
+ &buffer_size,
+ NULL,
+ NULL,
+ NULL,
+ NULL) != ERROR_SUCCESS)
return -2;
name = name_buffer;
@@ -595,7 +595,7 @@ ACE_Configuration_Win32Registry::enumerate_sections (const ACE_Configuration_Sec
int
ACE_Configuration_Win32Registry::set_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const ACE_TString& value)
{
if (validate_name (name))
@@ -605,12 +605,12 @@ ACE_Configuration_Win32Registry::set_string_value (const ACE_Configuration_Secti
if (load_key (key, base_key))
return -1;
- if (::RegSetValueEx (base_key,
- name,
- 0,
- REG_SZ,
- (BYTE *) value.fast_rep (),
- value.length () + 1) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegSetValueEx (base_key,
+ name,
+ 0,
+ REG_SZ,
+ (BYTE *) value.fast_rep (),
+ value.length () + 1) != ERROR_SUCCESS)
return -2;
return 0;
@@ -618,7 +618,7 @@ ACE_Configuration_Win32Registry::set_string_value (const ACE_Configuration_Secti
int
ACE_Configuration_Win32Registry::set_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int value)
{
if (validate_name (name))
@@ -628,12 +628,12 @@ ACE_Configuration_Win32Registry::set_integer_value (const ACE_Configuration_Sect
if (load_key (key, base_key))
return -1;
- if (::RegSetValueEx (base_key,
- name,
- 0,
- REG_DWORD,
- (BYTE *) &value,
- sizeof (value)) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegSetValueEx (base_key,
+ name,
+ 0,
+ REG_DWORD,
+ (BYTE *) &value,
+ sizeof (value)) != ERROR_SUCCESS)
return -2;
return 0;
@@ -641,7 +641,7 @@ ACE_Configuration_Win32Registry::set_integer_value (const ACE_Configuration_Sect
int
ACE_Configuration_Win32Registry::set_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const void* data,
u_int length)
{
@@ -652,12 +652,12 @@ ACE_Configuration_Win32Registry::set_binary_value (const ACE_Configuration_Secti
if (load_key (key, base_key))
return -1;
- if (::RegSetValueEx (base_key,
- name,
- 0,
- REG_BINARY,
- (BYTE*)data,
- length) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegSetValueEx (base_key,
+ name,
+ 0,
+ REG_BINARY,
+ (BYTE*)data,
+ length) != ERROR_SUCCESS)
return -2;
return 0;
@@ -665,7 +665,7 @@ ACE_Configuration_Win32Registry::set_binary_value (const ACE_Configuration_Secti
int
ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
ACE_TString& value)
{
if (validate_name (name))
@@ -675,15 +675,15 @@ ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Secti
if (load_key (key, base_key))
return -1;
- TCHAR buffer[ACE_DEFAULT_BUFSIZE];
+ ACE_TCHAR buffer[ACE_DEFAULT_BUFSIZE];
DWORD length = ACE_DEFAULT_BUFSIZE;
DWORD type;
- if (::RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)buffer,
- &length) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegQueryValueEx (base_key,
+ name,
+ NULL,
+ &type,
+ (BYTE*)buffer,
+ &length) != ERROR_SUCCESS)
return -2;
if (type != REG_SZ)
@@ -695,7 +695,7 @@ ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Secti
int
ACE_Configuration_Win32Registry::get_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int& value)
{
if (validate_name (name))
@@ -707,12 +707,12 @@ ACE_Configuration_Win32Registry::get_integer_value (const ACE_Configuration_Sect
DWORD length = sizeof (value);
DWORD type;
- if (::RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)&value,
- &length) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegQueryValueEx (base_key,
+ name,
+ NULL,
+ &type,
+ (BYTE*)&value,
+ &length) != ERROR_SUCCESS)
return -2;
if (type != REG_DWORD)
@@ -723,7 +723,7 @@ ACE_Configuration_Win32Registry::get_integer_value (const ACE_Configuration_Sect
int
ACE_Configuration_Win32Registry::get_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
void*& data,
u_int& length)
{
@@ -737,12 +737,12 @@ ACE_Configuration_Win32Registry::get_binary_value (const ACE_Configuration_Secti
unsigned char buffer[ACE_DEFAULT_BUFSIZE];
DWORD buffer_length = ACE_DEFAULT_BUFSIZE;
DWORD type;
- if (::RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)&buffer,
- &buffer_length) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegQueryValueEx (base_key,
+ name,
+ NULL,
+ &type,
+ (BYTE*)&buffer,
+ &buffer_length) != ERROR_SUCCESS)
return -2;
if (type != REG_BINARY)
@@ -760,7 +760,7 @@ ACE_Configuration_Win32Registry::get_binary_value (const ACE_Configuration_Secti
int
ACE_Configuration_Win32Registry::remove_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name)
+ const ACE_TCHAR* name)
{
if (validate_name (name))
return -1;
@@ -769,7 +769,7 @@ ACE_Configuration_Win32Registry::remove_value (const ACE_Configuration_Section_K
if (load_key (key, base_key))
return -1;
- if (::RegDeleteValue (base_key, name) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegDeleteValue (base_key, name) != ERROR_SUCCESS)
return -2;
return 0;
@@ -791,11 +791,11 @@ ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key&
HKEY
ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
- const TCHAR* path,
+ const ACE_TCHAR* path,
int create)
{
- const TCHAR* begin = path;
- const TCHAR* end = 0;
+ const ACE_TCHAR* begin = path;
+ const ACE_TCHAR* end = 0;
HKEY result = 0;
// Make a copy of hKey
@@ -806,7 +806,7 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
while (1)
{
// Detmine the begin/ending of the key name
- end = ACE_OS::strchr (begin, '\\');
+ end = ACE_OS::strchr (begin, ACE_TEXT ('\\'));
size_t length = end ? (size_t)(end-begin) : ACE_OS::strlen (begin);
// Make sure length is not 0
@@ -816,20 +816,20 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
// Open the key
ACE_TString key (begin, length);
HKEY subkey;
- if (::RegOpenKey (result,
- key.fast_rep (),
- &subkey) != ERROR_SUCCESS)
+ if (ACE_TEXT_RegOpenKey (result,
+ key.fast_rep (),
+ &subkey) != ERROR_SUCCESS)
{
// try creating it
- if (!create || ::RegCreateKeyEx (result,
- key.fast_rep (),
- NULL,
- NULL,
- NULL,
- KEY_ALL_ACCESS,
- NULL,
- &subkey,
- NULL) != ERROR_SUCCESS)
+ if (!create || ACE_TEXT_RegCreateKeyEx (result,
+ key.fast_rep (),
+ NULL,
+ NULL,
+ NULL,
+ KEY_ALL_ACCESS,
+ NULL,
+ &subkey,
+ NULL) != ERROR_SUCCESS)
{
// error
::RegCloseKey (result);
@@ -866,7 +866,7 @@ ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (void)
{
}
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (TCHAR* string)
+ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (ACE_TCHAR* string)
: type_ (ACE_Configuration::STRING),
data_ (string),
length_ (0)
@@ -935,7 +935,7 @@ ACE_Configuration_ExtId::ACE_Configuration_ExtId (void)
{
}
-ACE_Configuration_ExtId::ACE_Configuration_ExtId (const TCHAR* name)
+ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_TCHAR* name)
: name_ (name)
{
}
@@ -976,7 +976,7 @@ ACE_Configuration_ExtId::hash (void) const
return temp.hash ();
}
-const TCHAR*
+const ACE_TCHAR*
ACE_Configuration_ExtId::name (void)
{
return name_;
@@ -1031,7 +1031,7 @@ ACE_Configuration_Section_IntId::free (ACE_Allocator* allocator)
allocator->free ((void *)(section_hash_map_));
}
-ACE_Configuration_Section_Key_Heap::ACE_Configuration_Section_Key_Heap (const TCHAR* path)
+ACE_Configuration_Section_Key_Heap::ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path)
: path_ (0),
value_iter_ (0),
section_iter_ (0)
@@ -1082,7 +1082,7 @@ ACE_Configuration_Heap::open (int default_map_size)
int
-ACE_Configuration_Heap::open (const TCHAR* file_name,
+ACE_Configuration_Heap::open (const ACE_TCHAR* file_name,
void* base_address,
int default_map_size)
{
@@ -1117,7 +1117,7 @@ ACE_Configuration_Heap::open (const TCHAR* file_name,
// Now check if the backing store has been created successfully.
if (ACE_OS::access (file_name, F_OK) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("create_index\n")),
+ ACE_TEXT ("create_index\n")),
-1);
#endif /* ACE_LACKS_ACCESS */
@@ -1148,7 +1148,7 @@ ACE_Configuration_Heap::create_index (void)
{
// Attempt to clean up.
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT("create_index\n")));
+ ACE_TEXT("create_index\n")));
this->allocator_->remove ();
return -1;
}
@@ -1184,7 +1184,7 @@ ACE_Configuration_Heap::load_key (const ACE_Configuration_Section_Key& key,
int
ACE_Configuration_Heap::add_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
ACE_Configuration_Section_Key& result)
{
@@ -1209,12 +1209,12 @@ ACE_Configuration_Heap::add_section (const ACE_Configuration_Section_Key& base,
// Create the new section name
// only prepend a separater if were not at the root
if (section.length ())
- section += "\\";
+ section += ACE_TEXT ("\\");
section += sub_section;
// Add it to the base section
- TCHAR* pers_name = (TCHAR*)allocator_->malloc ((ACE_OS::strlen (sub_section) + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (sub_section) + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_name, sub_section);
ACE_Configuration_ExtId SSExtId (pers_name);
if (IntId.section_hash_map_->bind (SSExtId, ignored, allocator_))
@@ -1233,7 +1233,7 @@ ACE_Configuration_Heap::new_section (const ACE_TString& section,
// Allocate memory for items to be stored in the table.
size_t section_len = section.length () + 1;
- TCHAR *ptr = (TCHAR*) this->allocator_->malloc (section_len);
+ ACE_TCHAR *ptr = (ACE_TCHAR*) this->allocator_->malloc (section_len);
int return_value = -1;
@@ -1332,7 +1332,7 @@ ACE_Configuration_Heap::section_open_helper (size_t hash_table_size,
int
ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int create,
ACE_Configuration_Section_Key& result)
{
@@ -1370,7 +1370,7 @@ ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
int
ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int recursive)
{
if (validate_name (sub_section))
@@ -1545,7 +1545,7 @@ ACE_Configuration_Heap::enumerate_sections (const ACE_Configuration_Section_Key&
int
ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const ACE_TString& value)
{
if (validate_name (name))
@@ -1566,9 +1566,9 @@ ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& k
if (IntId.value_hash_map_->find (VExtIdFind, VIntIdFind, allocator_))
{
// it doesn't exist, bind it
- TCHAR* pers_name = (TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_name, name);
- TCHAR* pers_value = (TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_value, value.fast_rep ());
ACE_Configuration_ExtId VExtId (pers_name);
ACE_Configuration_Value_IntId VIntId (pers_value);
@@ -1585,7 +1585,7 @@ ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& k
// Free the old value memory
VIntIdFind.free (allocator_);
// Assign a new value
- TCHAR* pers_value = (TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_value, value.fast_rep ());
VIntIdFind = ACE_Configuration_Value_IntId (pers_value);
}
@@ -1595,7 +1595,7 @@ ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& k
int
ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int value)
{
if (validate_name (name))
@@ -1618,7 +1618,7 @@ ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key&
if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_))
{
// it doesn't exist, bind it
- TCHAR* pers_name = (TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_name, name);
ACE_Configuration_ExtId VExtId (pers_name);
ACE_Configuration_Value_IntId VIntId (value);
@@ -1637,7 +1637,7 @@ ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key&
int
ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const void* data,
u_int length)
{
@@ -1661,9 +1661,9 @@ ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& k
if (IntId.value_hash_map_->find (VExtIdFind, VIntIdFind, allocator_))
{
// it doesn't exist, bind it
- TCHAR* pers_name = (TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (TCHAR));
+ ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
ACE_OS::strcpy (pers_name, name);
- TCHAR* pers_value = (TCHAR*)allocator_->malloc (length);
+ ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
ACE_OS::memcpy (pers_value, data, length);
ACE_Configuration_ExtId VExtId (pers_name);
ACE_Configuration_Value_IntId VIntId (pers_value, length);
@@ -1680,7 +1680,7 @@ ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& k
// it does exist, free the old value memory
VIntIdFind.free (allocator_);
// Assign a new value
- TCHAR* pers_value = (TCHAR*)allocator_->malloc (length);
+ ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
ACE_OS::memcpy (pers_value, data, length);
VIntIdFind = ACE_Configuration_Value_IntId (pers_value, length);
}
@@ -1690,7 +1690,7 @@ ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& k
int
ACE_Configuration_Heap::get_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
ACE_TString& value)
{
if (validate_name (name))
@@ -1718,13 +1718,13 @@ ACE_Configuration_Heap::get_string_value (const ACE_Configuration_Section_Key& k
return -4;
// everythings ok, return the data
- value = (TCHAR*)VIntId.data_;
+ value = (ACE_TCHAR*)VIntId.data_;
return 0;
}
int
ACE_Configuration_Heap::get_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int& value)
{
if (validate_name (name))
@@ -1759,7 +1759,7 @@ ACE_Configuration_Heap::get_integer_value (const ACE_Configuration_Section_Key&
int
ACE_Configuration_Heap::get_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
void*& data,
u_int& length)
{
@@ -1796,7 +1796,7 @@ ACE_Configuration_Heap::get_binary_value (const ACE_Configuration_Section_Key& k
int
ACE_Configuration_Heap::remove_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name)
+ const ACE_TCHAR* name)
{
if (validate_name (name))
return -1;
diff --git a/ace/Configuration.h b/ace/Configuration.h
index 7abb890f9da..cdfb5a6d155 100644
--- a/ace/Configuration.h
+++ b/ace/Configuration.h
@@ -135,7 +135,7 @@ public:
// Returns the root section of this configuration.
virtual int open_section (const ACE_Configuration_Section_Key &base,
- const TCHAR *sub_section,
+ const ACE_TCHAR *sub_section,
int create,
ACE_Configuration_Section_Key& result) = 0;
// Finds a <sub_section> in <base> and places the resulting key in
@@ -143,7 +143,7 @@ public:
// if it doesn't exist
virtual int remove_section (const ACE_Configuration_Section_Key &key,
- const TCHAR *sub_section,
+ const ACE_TCHAR *sub_section,
int recursive) = 0;
// Removes the <sub_section> from <key>. If recursive is non zero,
// any subkeys below <sub_section> are remove as well.
@@ -173,36 +173,36 @@ public:
// enumeration over again.
virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const ACE_TString& value) = 0;
// sets the value in <key> with <name> to a string of <value>
virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int value) = 0;
// sets the value in <key> with <name> to an integer of <value>
virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const void* data,
u_int length) = 0;
// sets the value in <key> with <name> to binary data of <data> with
// <length>.
virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
ACE_TString& value) = 0;
// gets the string value of <name> from <key> and places it in
// <value>. Returns non zero on error (if value is not a string).
virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int& value) = 0;
// gets the integer value of <name> from <key> and places it in
// <value>. Returns non zero on error (if value is not an integer).
virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
void*& data,
u_int& length) = 0;
// gets the binary value of <name> from <key> and places a copy in
@@ -211,7 +211,7 @@ public:
// value is not binary).
virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name) = 0;
+ const ACE_TCHAR* name) = 0;
// Removes the the value <name> from <key>. returns non zero on
// error.
@@ -224,11 +224,11 @@ public:
// error The path consists of sections separated by the backslash
// '\'.
- virtual int export_config (const TCHAR* filename);
+ virtual int export_config (const ACE_TCHAR* filename);
// Exports the configuration database to filename. If <filename> is
// alredy present, it is overwritten.
- virtual int import_config (const TCHAR* filename);
+ virtual int import_config (const ACE_TCHAR* filename);
// Imports the configuration database from filename. Any existing
// data is not removed.
@@ -240,7 +240,7 @@ protected:
(const ACE_Configuration_Section_Key& key);
// resolves the internal key from a section key
- int validate_name (const TCHAR* name);
+ int validate_name (const ACE_TCHAR* name);
// tests to see if <name> is valid. <name> must be < 255 characters
// and not contain the path separator '\', brackets [] or = (maybe
// just restrict to alphanumeric?) returns non zero if name is not
@@ -301,12 +301,12 @@ public:
// destructor
virtual int open_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int create,
ACE_Configuration_Section_Key& result);
virtual int remove_section (const ACE_Configuration_Section_Key& key,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int recursive);
virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
@@ -319,37 +319,37 @@ public:
ACE_TString& name);
virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const ACE_TString& value);
virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int value);
virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const void* data,
u_int length);
virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
ACE_TString& value);
virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int& value);
virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
void*& data,
u_int& length);
virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name);
+ const ACE_TCHAR* name);
// Removes the the value <name> from <key>. returns non zero on error
static HKEY resolve_key (HKEY hKey,
- const TCHAR* path,
+ const ACE_TCHAR* path,
int create = 1);
// This method traverses <path> through <hKey>. It is useful when
// you want the HKEY for a specific registry key, especially when
@@ -390,7 +390,7 @@ public:
ACE_Configuration_ExtId (void);
// defeault ctor
- ACE_EXPLICIT ACE_Configuration_ExtId (const TCHAR* name);
+ ACE_EXPLICIT ACE_Configuration_ExtId (const ACE_TCHAR* name);
// named constructor
ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs);
@@ -418,10 +418,10 @@ public:
// = Data members.
- const TCHAR * name_;
+ const ACE_TCHAR * name_;
// Accessors
- const TCHAR *name (void);
+ const ACE_TCHAR *name (void);
};
typedef ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int>
@@ -447,7 +447,7 @@ public:
ACE_Configuration_Value_IntId (void);
// default constructor
- ACE_EXPLICIT ACE_Configuration_Value_IntId (TCHAR* string);
+ ACE_EXPLICIT ACE_Configuration_Value_IntId (ACE_TCHAR* string);
// string constructor, takes ownership of string
ACE_EXPLICIT ACE_Configuration_Value_IntId (u_int integer);
@@ -548,10 +548,10 @@ class ACE_Export ACE_Configuration_Section_Key_Heap
// = DESCRIPTION
// Contains a value iterator and full path name of section.
public:
- ACE_Configuration_Section_Key_Heap (const TCHAR* path);
+ ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path);
// constructor based on the full path of the section
- TCHAR* path_;
+ ACE_TCHAR* path_;
//the path itself
VALUE_HASH::ITERATOR* value_iter_;
@@ -586,7 +586,7 @@ public:
virtual ~ACE_Configuration_Heap (void);
// destructor
- int open (const TCHAR* file_name,
+ int open (const ACE_TCHAR* file_name,
void* base_address = ACE_DEFAULT_BASE_ADDR,
int default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE);
// opens a configuration based on a file name
@@ -595,11 +595,11 @@ public:
// opens a heap based configuration
virtual int open_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int create, ACE_Configuration_Section_Key& result);
virtual int remove_section (const ACE_Configuration_Section_Key& key,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
int recursive);
virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
@@ -612,38 +612,38 @@ public:
ACE_TString& name);
virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const ACE_TString& value);
virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int value);
virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
const void* data,
u_int length);
virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
ACE_TString& value);
virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
u_int& value);
virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name,
+ const ACE_TCHAR* name,
void* &data,
u_int &length);
virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const TCHAR* name);
+ const ACE_TCHAR* name);
// Removes the the value <name> from <key>. returns non zero on error
private:
int add_section (const ACE_Configuration_Section_Key& base,
- const TCHAR* sub_section,
+ const ACE_TCHAR* sub_section,
ACE_Configuration_Section_Key& result);
// adds a new section
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index a1c60b4a1e1..cd728d4a399 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -26,8 +26,8 @@ ACE_Connector<SH, PR_CO_2>::dump (void) const
ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nclosing_ = %d"), this->closing_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nflags_ = %d"), this->flags_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nclosing_ = %d"), this->closing_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %d"), this->flags_));
this->handler_map_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -214,9 +214,9 @@ ACE_Svc_Tuple<SH>::dump (void) const
ACE_TRACE ("ACE_Svc_Tuple<SH>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("svc_handler_ = %x"), this->svc_handler_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\narg_ = %x"), this->arg_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncancellation_id_ = %d"), this->cancellation_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("svc_handler_ = %x"), this->svc_handler_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\narg_ = %x"), this->arg_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncancellation_id_ = %d"), this->cancellation_id_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -267,8 +267,8 @@ ACE_Connector<SH, PR_CO_2>::cleanup_AST (ACE_HANDLE handle,
// Error, entry not found in map.
errno = ENOENT;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p %d not found in map\n"),
- ASYS_TEXT ("find"),
+ ACE_TEXT ("%p %d not found in map\n"),
+ ACE_TEXT ("find"),
handle),
-1);
}
@@ -496,7 +496,7 @@ template <class SH, PR_CO_1> int
ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
SH *sh[],
PR_AD remote_addrs[],
- ASYS_TCHAR *failed_svc_handlers,
+ ACE_TCHAR *failed_svc_handlers,
const ACE_Synch_Options &synch_options)
{
int result = 0;
@@ -670,7 +670,7 @@ ACE_Connector<SH, PR_CO_2>::fini (void)
// Hook called by the explicit dynamic linking facility.
template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::init (int, ASYS_TCHAR *[])
+ACE_Connector<SH, PR_CO_2>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::init");
return -1;
@@ -691,15 +691,15 @@ ACE_Connector<SH, PR_CO_2>::resume (void)
}
template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::info (ASYS_TCHAR **strp, size_t length) const
+ACE_Connector<SH, PR_CO_2>::info (ACE_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::info");
- ASYS_TCHAR buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s"),
- ASYS_TEXT ("ACE_Connector"),
- ASYS_TEXT ("# connector factory\n"));
+ ACE_TEXT ("%s\t %s"),
+ ACE_TEXT ("ACE_Connector"),
+ ACE_TEXT ("# connector factory\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -825,7 +825,7 @@ ACE_Strategy_Connector<SH, PR_CO_2>::ACE_Strategy_Connector
ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::ACE_Connector");
if (this->open (reactor, cre_s, conn_s, con_s, flags) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector")));
}
template <class SH, PR_CO_1>
diff --git a/ace/Connector.h b/ace/Connector.h
index 9dadf19d350..e352d35ebbc 100644
--- a/ace/Connector.h
+++ b/ace/Connector.h
@@ -174,7 +174,7 @@ public:
virtual int connect_n (size_t n,
SVC_HANDLER *svc_handlers[],
ACE_PEER_CONNECTOR_ADDR remote_addrs[],
- ASYS_TCHAR *failed_svc_handlers = 0,
+ ACE_TCHAR *failed_svc_handlers = 0,
const ACE_Synch_Options &synch_options =
ACE_Synch_Options::defaults);
// Initiate connection of <n> <svc_handlers> to peers at
@@ -264,14 +264,14 @@ protected:
// some platforms only).
// = Dynamic linking hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
virtual int fini (void);
// Calls <handle_close> to shutdown the Connector gracefully.
- virtual int info (ASYS_TCHAR **, size_t) const;
+ virtual int info (ACE_TCHAR **, size_t) const;
// Default version returns address info in <buf>.
// = Demultiplexing hooks.
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp
index a8998b0aea1..5cdc6364b86 100644
--- a/ace/Containers_T.cpp
+++ b/ace/Containers_T.cpp
@@ -400,9 +400,9 @@ ACE_Unbounded_Queue<T>::dump (void) const
// ACE_TRACE ("ACE_Unbounded_Queue<T>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_ = %u"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
T *item = 0;
#if !defined (ACE_NLOGGING)
@@ -412,7 +412,7 @@ ACE_Unbounded_Queue<T>::dump (void) const
for (ACE_Unbounded_Queue_Iterator<T> iter (*(ACE_Unbounded_Queue<T> *) this);
iter.next (item) != 0;
iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("count = %d\n"), count++));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -783,7 +783,7 @@ template <class T> void
ACE_Double_Linked_List_Iterator_Base<T>::dump_i (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("current_ = %x"), this->current_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %x"), this->current_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -1759,9 +1759,9 @@ ACE_Unbounded_Set<T>::dump (void) const
ACE_TRACE ("ACE_Unbounded_Set<T>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_ = %u"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
T *item = 0;
#if !defined (ACE_NLOGGING)
@@ -1771,7 +1771,7 @@ ACE_Unbounded_Set<T>::dump (void) const
for (ACE_Unbounded_Set_Iterator<T> iter (*(ACE_Unbounded_Set<T> *) this);
iter.next (item) != 0;
iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("count = %d\n"), count++));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -2243,9 +2243,9 @@ ACE_Ordered_MultiSet<T>::dump (void) const
// ACE_TRACE ("ACE_Ordered_MultiSet<T>::dump");
//
// ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_ = %u"), this->head_));
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
//
// T *item = 0;
// size_t count = 1;
@@ -2253,7 +2253,7 @@ ACE_Ordered_MultiSet<T>::dump (void) const
// for (ACE_Ordered_MultiSet_Iterator<T> iter (*(ACE_Ordered_MultiSet<T> *) this);
// iter.next (item) != 0;
// iter.advance ())
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("count = %d\n"), count++));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
//
// ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/DEV_Addr.cpp b/ace/DEV_Addr.cpp
index f702eedcb45..f7a11c2f07c 100644
--- a/ace/DEV_Addr.cpp
+++ b/ace/DEV_Addr.cpp
@@ -17,7 +17,7 @@ ACE_DEV_Addr::dump (void) const
ACE_TRACE ("ACE_DEV_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("devname_ = %s"), this->devname_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("devname_ = %s"), this->devname_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -58,7 +58,7 @@ ACE_DEV_Addr::ACE_DEV_Addr (const ACE_DEV_Addr &sa)
this->set (sa);
}
-ACE_DEV_Addr::ACE_DEV_Addr (LPCTSTR devname)
+ACE_DEV_Addr::ACE_DEV_Addr (const ACE_TCHAR *devname)
: ACE_Addr (AF_DEV, sizeof this->devname_)
{
ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
diff --git a/ace/DEV_Addr.h b/ace/DEV_Addr.h
index 9a770925410..376587a0699 100644
--- a/ace/DEV_Addr.h
+++ b/ace/DEV_Addr.h
@@ -41,10 +41,10 @@ public:
int set (const ACE_DEV_Addr &sa);
// Acts like a copy constructor.
- ACE_DEV_Addr (LPCTSTR devname);
+ ACE_DEV_Addr (const ACE_TCHAR *devname);
// Create a ACE_DEV_Addr from a device name.
- void set (LPCTSTR devname);
+ void set (const ACE_TCHAR *devname);
// Create a ACE_Addr from a ACE_DEV pathname.
ACE_DEV_Addr &operator= (const ACE_DEV_Addr &);
@@ -53,12 +53,7 @@ public:
virtual void *get_addr (void) const;
// Return a pointer to the address.
-#if defined (UNICODE)
- virtual int addr_to_string (wchar_t *addr, size_t) const;
- // Transform the current address into string format.
-#endif /* UNICODE */
-
- virtual int addr_to_string (char *addr, size_t) const;
+ virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
// Transform the current address into string format.
int operator == (const ACE_DEV_Addr &SAP) const;
@@ -67,7 +62,7 @@ public:
int operator != (const ACE_DEV_Addr &SAP) const;
// Compare two addresses for inequality.
- LPCTSTR get_path_name (void) const;
+ const ACE_TCHAR *get_path_name (void) const;
// Return the path name used for the rendezvous point.
void dump (void) const;
@@ -77,7 +72,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- TCHAR devname_[MAXNAMLEN + 1];
+ ACE_TCHAR devname_[MAXNAMLEN + 1];
// Name of the device.
};
diff --git a/ace/DEV_Addr.i b/ace/DEV_Addr.i
index e76ed184d32..7ada0c3dd18 100644
--- a/ace/DEV_Addr.i
+++ b/ace/DEV_Addr.i
@@ -4,7 +4,7 @@
#include "ace/SString.h"
ACE_INLINE void
-ACE_DEV_Addr::set (LPCTSTR devname)
+ACE_DEV_Addr::set (const ACE_TCHAR *devname)
{
ACE_TRACE ("ACE_DEV_Addr::set");
@@ -13,27 +13,13 @@ ACE_DEV_Addr::set (LPCTSTR devname)
}
// Transform the current address into string format.
-#if defined (UNICODE)
-ACE_INLINE int
-ACE_DEV_Addr::addr_to_string (wchar_t *s, size_t len) const
-{
- ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
-
- ACE_OS::strncpy (s, this->devname_, len);
- return 0;
-}
-#endif /* UNICODE */
-
-// Transform the current address into string format.
ACE_INLINE int
-ACE_DEV_Addr::addr_to_string (char *s, size_t len) const
+ACE_DEV_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
{
ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
- ACE_OS::strncpy (s,
- ACE_MULTIBYTE_STRING (this->devname_),
- len);
+ ACE_OS::strncpy (s, this->devname_, len);
return 0;
}
@@ -69,7 +55,7 @@ ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
// Return the path name used for the rendezvous point.
-ACE_INLINE LPCTSTR
+ACE_INLINE const ACE_TCHAR *
ACE_DEV_Addr::get_path_name (void) const
{
ACE_TRACE ("ACE_DEV_Addr::get_path_name");
diff --git a/ace/DEV_Connector.i b/ace/DEV_Connector.i
index a522ede7f4e..45ed1b0c82c 100644
--- a/ace/DEV_Connector.i
+++ b/ace/DEV_Connector.i
@@ -18,8 +18,8 @@ ACE_DEV_Connector::ACE_DEV_Connector (ACE_DEV_IO &new_io,
if (this->connect (new_io, remote_sap, timeout, local_sap,
reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("address %s, %p\n"),
- remote_sap.get_path_name (), ASYS_TEXT ("ACE_DEV_IO")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("address %s, %p\n"),
+ remote_sap.get_path_name (), ACE_TEXT ("ACE_DEV_IO")));
}
ASYS_INLINE int
diff --git a/ace/DLL.cpp b/ace/DLL.cpp
index 80a1dea3ad5..f186308611d 100644
--- a/ace/DLL.cpp
+++ b/ace/DLL.cpp
@@ -19,7 +19,7 @@ ACE_DLL::ACE_DLL (int close_on_destruction)
// If the library name and the opening mode are specified than on
// object creation the library is implicitly opened.
-ACE_DLL::ACE_DLL (const ASYS_TCHAR *dll_name,
+ACE_DLL::ACE_DLL (const ACE_TCHAR *dll_name,
int open_mode,
int close_on_destruction)
: handle_ (ACE_OS::dlopen (dll_name,
@@ -28,7 +28,7 @@ ACE_DLL::ACE_DLL (const ASYS_TCHAR *dll_name,
{
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%s\n"),
+ ACE_TEXT ("%s\n"),
this->error ()));
}
@@ -54,7 +54,7 @@ ACE_DLL::~ACE_DLL (void)
// relocation processing of any other object.
int
-ACE_DLL::open (const ASYS_TCHAR *dll_filename,
+ACE_DLL::open (const ACE_TCHAR *dll_filename,
int open_mode,
int close_on_destruction)
{
@@ -66,13 +66,13 @@ ACE_DLL::open (const ASYS_TCHAR *dll_filename,
this->close_on_destruction_ = close_on_destruction;
// Find out where the library is
- ASYS_TCHAR dll_pathname[MAXPATHLEN + 1];
+ ACE_TCHAR dll_pathname[MAXPATHLEN + 1];
// Transform the pathname into the appropriate dynamic link library
// by searching the ACE_LD_SEARCH_PATH.
int result = ACE::ldfind (dll_filename,
dll_pathname,
- (sizeof dll_pathname / sizeof (ASYS_TCHAR)));
+ (sizeof dll_pathname / sizeof (ACE_TCHAR)));
// Check for errors
if (result != 0)
return result;
@@ -83,7 +83,7 @@ ACE_DLL::open (const ASYS_TCHAR *dll_filename,
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%s\n"), this->error ()),
+ ACE_TEXT ("%s\n"), this->error ()),
-1);
return 0;
}
@@ -91,7 +91,7 @@ ACE_DLL::open (const ASYS_TCHAR *dll_filename,
// The symbol refernce of the name specified is obtained.
void *
-ACE_DLL::symbol (const char *sym_name)
+ACE_DLL::symbol (const ACE_TCHAR *sym_name)
{
return ACE_OS::dlsym (this->handle_, sym_name);
}
@@ -120,7 +120,7 @@ ACE_DLL::close (void)
// This method is used on error in an library operation.
-ASYS_TCHAR *
+ACE_TCHAR *
ACE_DLL::error (void)
{
return ACE_OS::dlerror ();
@@ -153,7 +153,7 @@ ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle,
// Close the handle in use before accepting the next one.
if (this->close () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%s\n"), this->error ()),
+ ACE_TEXT ("%s\n"), this->error ()),
-1);
this->handle_ = handle;
diff --git a/ace/DLL.h b/ace/DLL.h
index ad615786df7..e1cbe76f70d 100644
--- a/ace/DLL.h
+++ b/ace/DLL.h
@@ -43,7 +43,7 @@ public:
// Default constructor. By default, the <close> operation on the
// object will be invoked before it is destroyed.
- ACE_DLL (const ASYS_TCHAR *dll_name,
+ ACE_DLL (const ACE_TCHAR *dll_name,
int open_mode = ACE_DEFAULT_SHLIB_MODE,
int close_on_destruction = 1);
// This constructor opens and dynamically links <dll_name>. The
@@ -54,7 +54,7 @@ public:
// loaded and <RTLD_GLOBAL>, which makes symbols available for
// relocation processing of any other DLLs.
- int open (const ASYS_TCHAR *dll_name,
+ int open (const ACE_TCHAR *dll_name,
int open_mode = ACE_DEFAULT_SHLIB_MODE,
int close_on_destruction = 1);
// This method opens and dynamically links <dll_name>. The default
@@ -74,11 +74,11 @@ public:
// <close_on_destruction> flag is set in the constructor or <open>
// method.
- void *symbol (const char *symbol_name);
+ void *symbol (const ACE_TCHAR *symbol_name);
// If <symbol_name> is in the symbol table of the DLL a pointer to
// the <symbol_name> is returned. Otherwise, returns 0.
- ASYS_TCHAR *error (void);
+ ACE_TCHAR *error (void);
// Returns a pointer to a string explaining why <symbol> or <open>
// failed.
diff --git a/ace/Dirent.h b/ace/Dirent.h
index a48ada32292..651d475c88e 100644
--- a/ace/Dirent.h
+++ b/ace/Dirent.h
@@ -36,10 +36,10 @@ public:
ACE_Dirent (void);
// Default constructor.
- ACE_Dirent (const char *dirname);
+ ACE_Dirent (const ACE_TCHAR *dirname);
// Constructor calls <opendir>
- int open (const char *filename);
+ int open (const ACE_TCHAR *filename);
// Opens the directory named by filename and associates a directory
// stream with it.
diff --git a/ace/Dirent.i b/ace/Dirent.i
index 5e12d7b6ba7..5c5587923db 100644
--- a/ace/Dirent.i
+++ b/ace/Dirent.i
@@ -2,7 +2,7 @@
// $Id$
ACE_INLINE int
-ACE_Dirent::open (const char *dirname)
+ACE_Dirent::open (const ACE_TCHAR *dirname)
{
// If the directory stream is already open, close it to prevent
// possible resource leaks.
@@ -28,13 +28,13 @@ ACE_Dirent::ACE_Dirent (void)
}
ACE_INLINE
-ACE_Dirent::ACE_Dirent (const char *dirname)
+ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname)
: dirp_ (0)
{
if (this->open (dirname) == -1)
ACE_ERROR ((LM_ERROR,
- "%p\n",
- "Dirent::Dirent"));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Dirent::Dirent")));
}
ACE_INLINE
diff --git a/ace/Dynamic_Service.cpp b/ace/Dynamic_Service.cpp
index 420719c5068..1b8c831103b 100644
--- a/ace/Dynamic_Service.cpp
+++ b/ace/Dynamic_Service.cpp
@@ -21,14 +21,14 @@ ACE_Dynamic_Service<SERVICE>::dump (void) const
ACE_TRACE ("ACE_Dynamic_Service<SERVICE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
// Get the instance using <name>.
template <class SERVICE> SERVICE *
-ACE_Dynamic_Service<SERVICE>::instance (const char *name)
+ACE_Dynamic_Service<SERVICE>::instance (const ACE_TCHAR *name)
{
ACE_TRACE ("ACE_Dynamic_Service::instance");
const ACE_Service_Type *svc_rec;
diff --git a/ace/Dynamic_Service.h b/ace/Dynamic_Service.h
index 0cb9a3e8ca7..b06f73b2ec3 100644
--- a/ace/Dynamic_Service.h
+++ b/ace/Dynamic_Service.h
@@ -31,7 +31,7 @@ class ACE_Dynamic_Service
// Uses "name" for lookup in the ACE service repository. Obtains
// the object and returns it as the appropriate type.
public:
- static SERVICE *instance (const char *name);
+ static SERVICE *instance (const ACE_TCHAR *name);
// Return instance using <name> to search the Service_Repository.
void dump (void) const;
diff --git a/ace/Env_Value_T.h b/ace/Env_Value_T.h
index 7c2f6d59a11..0005d734c1f 100644
--- a/ace/Env_Value_T.h
+++ b/ace/Env_Value_T.h
@@ -43,7 +43,7 @@ public:
// variable name or a default value. Before being useful it must
// <open>'d.
- ACE_Env_Value (const ASYS_TCHAR *varname,
+ ACE_Env_Value (const ACE_TCHAR *varname,
const T &vardefault);
// Constructor that calls <open>.
@@ -53,11 +53,11 @@ public:
operator T (void);
// Returns the value as type T.
- void open (const ASYS_TCHAR *varname, const T &defval);
+ void open (const ACE_TCHAR *varname, const T &defval);
// The constructor, read <varname> from the enviroment, using
// <vardefault> as its value if it is not defined.
- const ASYS_TCHAR *varname (void) const;
+ const ACE_TCHAR *varname (void) const;
// Returns the name of the variable being tracked.
private:
@@ -67,11 +67,11 @@ private:
void fetch_value (void);
- const ASYS_TCHAR *varname_;
+ const ACE_TCHAR *varname_;
T value_;
};
-template <class T> void ACE_Convert (const ASYS_TCHAR *s, T &t);
+template <class T> void ACE_Convert (const ACE_TCHAR *s, T &t);
// Function to convert a string <s> into type <T>.
#if defined (__ACE_INLINE__)
@@ -90,62 +90,62 @@ template <class T> void ACE_Convert (const ASYS_TCHAR *s, T &t);
// conversion will be necessary.
template <class T> inline void
-ACE_Convert (const ASYS_TCHAR *s, T &t)
+ACE_Convert (const ACE_TCHAR *s, T &t)
{
t = T (s);
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, ASYS_TCHAR *&v)
+ACE_Convert (const ACE_TCHAR *s, ACE_TCHAR *&v)
{
- v = (ASYS_TCHAR *) s;
+ v = (ACE_TCHAR *) s;
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, const ASYS_TCHAR *&v)
+ACE_Convert (const ACE_TCHAR *s, const ACE_TCHAR *&v)
{
- v = (const ASYS_TCHAR *) s;
+ v = (const ACE_TCHAR *) s;
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, short &si)
+ACE_Convert (const ACE_TCHAR *s, short &si)
{
si = ACE_static_cast (short, ACE_OS::strtol (s, 0, 10));
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, u_short &us)
+ACE_Convert (const ACE_TCHAR *s, u_short &us)
{
us = ACE_static_cast (u_short, ACE_OS::strtol (s, 0, 10));
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, u_int &i)
+ACE_Convert (const ACE_TCHAR *s, u_int &i)
{
i = ACE_static_cast (u_int,
ACE_OS::strtol (s, 0, 10));
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, long &l)
+ACE_Convert (const ACE_TCHAR *s, long &l)
{
l = ACE_OS::strtol (s, 0, 10);
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, int &i)
+ACE_Convert (const ACE_TCHAR *s, int &i)
{
i = ACE_static_cast (int, ACE_OS::strtol (s, 0, 10));
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, u_long &ul)
+ACE_Convert (const ACE_TCHAR *s, u_long &ul)
{
ul = ACE_OS::strtoul (s, 0, 10);
}
inline void
-ACE_Convert (const ASYS_TCHAR *s, double &d)
+ACE_Convert (const ACE_TCHAR *s, double &d)
{
d = ACE_OS::strtod (s, 0);
}
diff --git a/ace/Env_Value_T.i b/ace/Env_Value_T.i
index 25598c8dad5..9f98f0fdb45 100644
--- a/ace/Env_Value_T.i
+++ b/ace/Env_Value_T.i
@@ -13,7 +13,7 @@ ACE_Env_Value<T>::ACE_Env_Value (void)
}
template <class T> ACE_INLINE
-ACE_Env_Value<T>::ACE_Env_Value (const ASYS_TCHAR *varname,
+ACE_Env_Value<T>::ACE_Env_Value (const ACE_TCHAR *varname,
const T &defval)
: varname_ (varname),
value_(defval)
@@ -22,7 +22,7 @@ ACE_Env_Value<T>::ACE_Env_Value (const ASYS_TCHAR *varname,
}
template <class T> ACE_INLINE void
-ACE_Env_Value<T>::open (const ASYS_TCHAR *varname,
+ACE_Env_Value<T>::open (const ACE_TCHAR *varname,
const T &defval)
{
varname_ = varname;
@@ -33,13 +33,13 @@ ACE_Env_Value<T>::open (const ASYS_TCHAR *varname,
template <class T> ACE_INLINE void
ACE_Env_Value<T>::fetch_value (void)
{
- const ASYS_TCHAR *env = ACE_OS::getenv (varname_);
+ const ACE_TCHAR *env = ACE_OS::getenv (varname_);
if (env != 0)
ACE_Convert (env, value_);
}
-template <class T> ACE_INLINE const ASYS_TCHAR*
+template <class T> ACE_INLINE const ACE_TCHAR*
ACE_Env_Value<T>::varname (void) const
{
return varname_;
diff --git a/ace/FIFO.cpp b/ace/FIFO.cpp
index ff85993b436..588b00b318d 100644
--- a/ace/FIFO.cpp
+++ b/ace/FIFO.cpp
@@ -19,12 +19,12 @@ ACE_FIFO::dump (void) const
ACE_TRACE ("ACE_FIFO::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("rendezvous_ = %s"), this->rendezvous_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rendezvous_ = %s"), this->rendezvous_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
int
-ACE_FIFO::open (const ASYS_TCHAR *r, int flags, int perms,
+ACE_FIFO::open (const ACE_TCHAR *r, int flags, int perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO::open");
@@ -45,14 +45,14 @@ ACE_FIFO::open (const ASYS_TCHAR *r, int flags, int perms,
return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
}
-ACE_FIFO::ACE_FIFO (const ASYS_TCHAR *fifo_name,
+ACE_FIFO::ACE_FIFO (const ACE_TCHAR *fifo_name,
int flags,
int perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO::ACE_FIFO");
if (this->open (fifo_name, flags, perms, sa) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_FIFO")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO")));
}
ACE_FIFO::ACE_FIFO (void)
diff --git a/ace/FIFO.h b/ace/FIFO.h
index fa4941a87f7..8f0f44a9321 100644
--- a/ace/FIFO.h
+++ b/ace/FIFO.h
@@ -35,7 +35,7 @@ class ACE_Export ACE_FIFO : public ACE_IPC_SAP
// IPC mechanism that will be portable to both UNIX and Win32,
// take a look at the <ACE_SPIPE_*> classes.
public:
- int open (const ASYS_TCHAR *rendezvous, int flags, int perms,
+ int open (const ACE_TCHAR *rendezvous, int flags, int perms,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up the named pipe on the <rendezvous> in accordance with the
// flags.
@@ -47,7 +47,7 @@ public:
// Close down the ACE_FIFO and remove the rendezvous point from the
// file system.
- int get_local_addr (const ASYS_TCHAR *&rendezvous) const;
+ int get_local_addr (const ACE_TCHAR *&rendezvous) const;
// Return the local address of this endpoint.
void dump (void) const;
@@ -61,13 +61,13 @@ protected:
ACE_FIFO (void);
// Default constructor.
- ACE_FIFO (const ASYS_TCHAR *rendezvous, int flags, int perms,
+ ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, int perms,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up the named pipe on the <rendezvous> in accordance with the
// flags.
private:
- ASYS_TCHAR rendezvous_[MAXPATHLEN + 1];
+ ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
// Rendezvous point in the file system.
};
diff --git a/ace/FIFO.i b/ace/FIFO.i
index 52f3555495a..d640bb8141f 100644
--- a/ace/FIFO.i
+++ b/ace/FIFO.i
@@ -4,7 +4,7 @@
// FIFO.i
ACE_INLINE int
-ACE_FIFO::get_local_addr (const ASYS_TCHAR *&r) const
+ACE_FIFO::get_local_addr (const ACE_TCHAR *&r) const
{
ACE_TRACE ("ACE_FIFO::get_local_addr");
r = this->rendezvous_;
diff --git a/ace/FIFO_Recv.cpp b/ace/FIFO_Recv.cpp
index 630869b2710..a2240f35b46 100644
--- a/ace/FIFO_Recv.cpp
+++ b/ace/FIFO_Recv.cpp
@@ -19,7 +19,7 @@ ACE_FIFO_Recv::dump (void) const
ACE_TRACE ("ACE_FIFO_Recv::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_FIFO::dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("aux_handle_ = %d"), this->aux_handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -40,7 +40,7 @@ ACE_FIFO_Recv::close (void)
// aren't any writers at the moment!
int
-ACE_FIFO_Recv::open (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name,
int flags,
int perms,
int persistent,
@@ -65,7 +65,7 @@ ACE_FIFO_Recv::ACE_FIFO_Recv (void)
ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv");
}
-ACE_FIFO_Recv::ACE_FIFO_Recv (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Recv::ACE_FIFO_Recv (const ACE_TCHAR *fifo_name,
int flags,
int perms,
int persistent,
@@ -79,5 +79,5 @@ ACE_FIFO_Recv::ACE_FIFO_Recv (const ASYS_TCHAR *fifo_name,
perms,
persistent,
sa) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_FIFO_Recv")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv")));
}
diff --git a/ace/FIFO_Recv.h b/ace/FIFO_Recv.h
index d0ea5b1b4a9..c035343fb60 100644
--- a/ace/FIFO_Recv.h
+++ b/ace/FIFO_Recv.h
@@ -34,14 +34,14 @@ public:
ACE_FIFO_Recv (void);
// Default constructor.
- ACE_FIFO_Recv (const ASYS_TCHAR *rendezvous,
+ ACE_FIFO_Recv (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up a bytestream named pipe for reading.
- int open (const ASYS_TCHAR *rendezvous,
+ int open (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
diff --git a/ace/FIFO_Recv_Msg.cpp b/ace/FIFO_Recv_Msg.cpp
index 9a4b7583fa4..7f086e4b101 100644
--- a/ace/FIFO_Recv_Msg.cpp
+++ b/ace/FIFO_Recv_Msg.cpp
@@ -25,7 +25,7 @@ ACE_FIFO_Recv_Msg::dump (void) const
// aren't any writers at the moment!
int
-ACE_FIFO_Recv_Msg::open (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Recv_Msg::open (const ACE_TCHAR *fifo_name,
int flags,
int perms,
int persistent,
@@ -45,7 +45,7 @@ ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (void)
ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg");
}
-ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ACE_TCHAR *fifo_name,
int flags,
int perms,
int persistent,
@@ -58,5 +58,5 @@ ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ASYS_TCHAR *fifo_name,
perms,
persistent,
sa) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_FIFO_Recv_Msg")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv_Msg")));
}
diff --git a/ace/FIFO_Recv_Msg.h b/ace/FIFO_Recv_Msg.h
index cbffd271450..4cc19ff2675 100644
--- a/ace/FIFO_Recv_Msg.h
+++ b/ace/FIFO_Recv_Msg.h
@@ -33,14 +33,14 @@ public:
ACE_FIFO_Recv_Msg (void);
// Default constructor.
- ACE_FIFO_Recv_Msg (const ASYS_TCHAR *rendezvous,
+ ACE_FIFO_Recv_Msg (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up a record-oriented named pipe for reading.
- int open (const ASYS_TCHAR *rendezvous,
+ int open (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
diff --git a/ace/FIFO_Send.cpp b/ace/FIFO_Send.cpp
index 294bf17ba83..da38a6857b6 100644
--- a/ace/FIFO_Send.cpp
+++ b/ace/FIFO_Send.cpp
@@ -26,7 +26,7 @@ ACE_FIFO_Send::ACE_FIFO_Send (void)
}
int
-ACE_FIFO_Send::open (const ASYS_TCHAR *rendezvous_name,
+ACE_FIFO_Send::open (const ACE_TCHAR *rendezvous_name,
int flags,
int perms,
LPSECURITY_ATTRIBUTES sa)
@@ -38,7 +38,7 @@ ACE_FIFO_Send::open (const ASYS_TCHAR *rendezvous_name,
sa);
}
-ACE_FIFO_Send::ACE_FIFO_Send (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Send::ACE_FIFO_Send (const ACE_TCHAR *fifo_name,
int flags,
int perms,
LPSECURITY_ATTRIBUTES sa)
@@ -49,6 +49,6 @@ ACE_FIFO_Send::ACE_FIFO_Send (const ASYS_TCHAR *fifo_name,
perms,
sa) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_FIFO_Send::ACE_FIFO_Send")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_FIFO_Send::ACE_FIFO_Send")));
}
diff --git a/ace/FIFO_Send.h b/ace/FIFO_Send.h
index fe33b7129db..a9733f8d478 100644
--- a/ace/FIFO_Send.h
+++ b/ace/FIFO_Send.h
@@ -33,13 +33,13 @@ public:
ACE_FIFO_Send (void);
// Default constructor.
- ACE_FIFO_Send (const ASYS_TCHAR *rendezvous,
+ ACE_FIFO_Send (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up a bytestream named pipe for writing.
- int open (const ASYS_TCHAR *rendezvous,
+ int open (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
diff --git a/ace/FIFO_Send_Msg.cpp b/ace/FIFO_Send_Msg.cpp
index e549cb6105f..d1c4455e9b8 100644
--- a/ace/FIFO_Send_Msg.cpp
+++ b/ace/FIFO_Send_Msg.cpp
@@ -48,7 +48,7 @@ ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (void)
}
int
-ACE_FIFO_Send_Msg::open (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name,
int flags,
int perms,
LPSECURITY_ATTRIBUTES sa)
@@ -57,12 +57,12 @@ ACE_FIFO_Send_Msg::open (const ASYS_TCHAR *fifo_name,
return ACE_FIFO_Send::open (fifo_name, flags | O_WRONLY, perms, sa);
}
-ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ASYS_TCHAR *fifo_name,
+ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ACE_TCHAR *fifo_name,
int flags,
int perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg");
if (this->ACE_FIFO_Send_Msg::open (fifo_name, flags, perms, sa) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_FIFO_Send_Msg")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Send_Msg")));
}
diff --git a/ace/FIFO_Send_Msg.h b/ace/FIFO_Send_Msg.h
index 18e297e4f2e..0ed9ce9a707 100644
--- a/ace/FIFO_Send_Msg.h
+++ b/ace/FIFO_Send_Msg.h
@@ -34,13 +34,13 @@ public:
ACE_FIFO_Send_Msg (void);
// Default constructor.
- ACE_FIFO_Send_Msg (const ASYS_TCHAR *rendezvous,
+ ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
// Open up a record-oriented named pipe for writing.
- int open (const ASYS_TCHAR *rendezvous,
+ int open (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
int perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
diff --git a/ace/FILE_Addr.cpp b/ace/FILE_Addr.cpp
index a4d3a8bdbe8..1e27092a4ec 100644
--- a/ace/FILE_Addr.cpp
+++ b/ace/FILE_Addr.cpp
@@ -30,8 +30,8 @@ ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
MAXPATHLEN - 15) == -1) // -15 for ace-file-XXXXXX
{
ACE_ERROR ((LM_ERROR,
- "Temporary path too long, "
- "defaulting to current directory\n"));
+ ACE_TEXT ("Temporary path too long, ")
+ ACE_TEXT ("defaulting to current directory\n")));
this->filename_[0] = 0;
}
@@ -65,7 +65,7 @@ ACE_FILE_Addr::ACE_FILE_Addr (const ACE_FILE_Addr &sa)
}
int
-ACE_FILE_Addr::set (LPCTSTR filename)
+ACE_FILE_Addr::set (const ACE_TCHAR *filename)
{
this->ACE_Addr::base_set (AF_FILE,
ACE_OS::strlen (filename) + 1);
@@ -85,30 +85,17 @@ ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa)
// Create a ACE_Addr from a ACE_FILE pathname.
-ACE_FILE_Addr::ACE_FILE_Addr (LPCTSTR filename)
+ACE_FILE_Addr::ACE_FILE_Addr (const ACE_TCHAR *filename)
{
this->set (filename);
}
int
-ACE_FILE_Addr::addr_to_string (char *s, size_t len) const
-{
- ACE_OS::strncpy (s,
- ACE_MULTIBYTE_STRING (this->filename_),
- len);
- return 0;
-}
-
-#if defined (UNICODE)
-// Transform the current address into string format.
-
-int
-ACE_FILE_Addr::addr_to_string (wchar_t * s, size_t len) const
+ACE_FILE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
{
ACE_OS::strncpy (s, this->filename_, len);
return 0;
}
-#endif /* UNICODE */
void
ACE_FILE_Addr::dump (void) const
@@ -116,6 +103,6 @@ ACE_FILE_Addr::dump (void) const
ACE_TRACE ("ACE_FILE_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("filename_ = %s"), this->filename_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("filename_ = %s"), this->filename_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/FILE_Addr.h b/ace/FILE_Addr.h
index c101c677592..1100c1f23e2 100644
--- a/ace/FILE_Addr.h
+++ b/ace/FILE_Addr.h
@@ -42,10 +42,10 @@ public:
// Acts like a copy constructor. If <sa> == ACE_Addr::sap_any then
// create a temporary filename using <ACE_OS::mktemp>.
- ACE_FILE_Addr (LPCTSTR filename);
+ ACE_FILE_Addr (const ACE_TCHAR *filename);
// Create a ACE_FILE_Addr from a pathname.
- int set (LPCTSTR filename);
+ int set (const ACE_TCHAR *filename);
// Create a ACE_FILE_Addr from a pathname.
ACE_FILE_Addr &operator= (const ACE_FILE_Addr &);
@@ -54,12 +54,7 @@ public:
virtual void *get_addr (void) const;
// Return a pointer to the address.
-#if defined (UNICODE)
- virtual int addr_to_string (wchar_t *addr, size_t) const;
- // Transform the current address into string format.
-#endif /* UNICODE */
-
- virtual int addr_to_string (char *addr, size_t) const;
+ virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
// Transform the current address into string format.
int operator == (const ACE_FILE_Addr &SAP) const;
@@ -68,7 +63,7 @@ public:
int operator != (const ACE_FILE_Addr &SAP) const;
// Compare two addresses for inequality.
- LPCTSTR get_path_name (void) const;
+ const ACE_TCHAR *get_path_name (void) const;
// Return the path name used for the rendezvous point.
void dump (void) const;
@@ -78,7 +73,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- TCHAR filename_[MAXNAMLEN + 1];
+ ACE_TCHAR filename_[MAXNAMLEN + 1];
// Name of the file.
};
diff --git a/ace/FILE_Addr.i b/ace/FILE_Addr.i
index 6d23f13a41b..6acce0515b8 100644
--- a/ace/FILE_Addr.i
+++ b/ace/FILE_Addr.i
@@ -35,7 +35,7 @@ ACE_FILE_Addr::operator != (const ACE_FILE_Addr &sap) const
// Return the path name used for the rendezvous point.
-ACE_INLINE LPCTSTR
+ACE_INLINE const ACE_TCHAR *
ACE_FILE_Addr::get_path_name (void) const
{
return this->filename_;
diff --git a/ace/FILE_Connector.cpp b/ace/FILE_Connector.cpp
index 83e480fd442..7e28fcfe791 100644
--- a/ace/FILE_Connector.cpp
+++ b/ace/FILE_Connector.cpp
@@ -17,7 +17,7 @@ ACE_FILE_Connector::dump (void) const
ACE_TRACE ("ACE_FILE_Connector::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/FILE_Connector.i b/ace/FILE_Connector.i
index 608ce4a9bdc..27c4d94a080 100644
--- a/ace/FILE_Connector.i
+++ b/ace/FILE_Connector.i
@@ -19,9 +19,9 @@ ACE_FILE_Connector::ACE_FILE_Connector (ACE_FILE_IO &new_io,
reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("address %s, %p\n"),
+ ACE_TEXT ("address %s, %p\n"),
remote_sap.get_path_name (),
- ASYS_TEXT ("ACE_FILE_IO")));
+ ACE_TEXT ("ACE_FILE_IO")));
}
ASYS_INLINE int
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
index 744ac605122..1a0c37cdcb0 100644
--- a/ace/Filecache.cpp
+++ b/ace/Filecache.cpp
@@ -49,7 +49,7 @@ ACE_Filecache_Handle::ACE_Filecache_Handle (void)
this->init ();
}
-ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
+ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
ACE_Filecache_Flag mapit)
: file_ (0), handle_ (0), mapit_ (mapit)
{
@@ -62,7 +62,7 @@ ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
this->file_ = ACE_Filecache::instance ()->fetch (filename, mapit);
}
-ACE_Filecache_Handle::ACE_Filecache_Handle (const char *filename,
+ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
int size,
ACE_Filecache_Flag mapit)
: file_ (0), handle_ (0), mapit_ (mapit)
@@ -135,16 +135,16 @@ ACE_Filecache_Handle::size (void) const
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
#define ACE_Filecache_Hash \
- ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
+ ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
#define ACE_Filecache_Hash_Entry \
- ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>
+ ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
ACE_TEMPLATE_SPECIALIZATION
-ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const char *const &ext_id,
+ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const ACE_TCHAR *const &ext_id,
ACE_Filecache_Object *const &int_id,
ACE_Filecache_Hash_Entry *next,
ACE_Filecache_Hash_Entry *prev)
- : ext_id_ (ext_id ? ACE_OS::strdup (ext_id) : ACE_OS::strdup ("")),
+ : ext_id_ (ext_id ? ACE_OS::strdup (ext_id) : ACE_OS::strdup (ACE_TEXT (""))),
int_id_ (int_id),
next_ (next),
prev_ (prev)
@@ -167,18 +167,18 @@ ACE_Filecache_Hash_Entry::~ACE_Hash_Map_Entry (void)
}
// We need these template specializations since KEY is defined as a
-// char*, which doesn't have a hash() or equal() method defined on it.
+// ACE_TCHAR*, which doesn't have a hash() or equal() method defined on it.
ACE_TEMPLATE_SPECIALIZATION
unsigned long
-ACE_Filecache_Hash::hash (const char *const &ext_id)
+ACE_Filecache_Hash::hash (const ACE_TCHAR *const &ext_id)
{
return ACE::hash_pjw (ext_id);
}
ACE_TEMPLATE_SPECIALIZATION
int
-ACE_Filecache_Hash::equal (const char *const &id1, const char *const &id2)
+ACE_Filecache_Hash::equal (const ACE_TCHAR *const &id1, const ACE_TCHAR *const &id2)
{
return ACE_OS::strcmp (id1, id2) == 0;
}
@@ -226,7 +226,7 @@ ACE_Filecache::~ACE_Filecache (void)
}
ACE_Filecache_Object *
-ACE_Filecache::insert_i (const char *filename,
+ACE_Filecache::insert_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit)
{
@@ -238,7 +238,7 @@ ACE_Filecache::insert_i (const char *filename,
ACE_Filecache_Object (filename, filelock, 0, mapit),
0);
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) CVF: creating %s\n"), filename));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: creating %s\n"), filename));
if (this->hash_.bind (filename, handle) == -1)
{
@@ -253,7 +253,7 @@ ACE_Filecache::insert_i (const char *filename,
}
ACE_Filecache_Object *
-ACE_Filecache::remove_i (const char *filename)
+ACE_Filecache::remove_i (const ACE_TCHAR *filename)
{
ACE_Filecache_Object *handle = 0;
@@ -277,7 +277,7 @@ ACE_Filecache::remove_i (const char *filename)
}
ACE_Filecache_Object *
-ACE_Filecache::update_i (const char *filename,
+ACE_Filecache::update_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit)
{
@@ -290,14 +290,14 @@ ACE_Filecache::update_i (const char *filename,
}
int
-ACE_Filecache::find (const char *filename)
+ACE_Filecache::find (const ACE_TCHAR *filename)
{
return this->hash_.find (filename);
}
ACE_Filecache_Object *
-ACE_Filecache::remove (const char *filename)
+ACE_Filecache::remove (const ACE_TCHAR *filename)
{
ACE_Filecache_Object *handle = 0;
@@ -320,7 +320,7 @@ ACE_Filecache::remove (const char *filename)
ACE_Filecache_Object *
-ACE_Filecache::fetch (const char *filename, int mapit)
+ACE_Filecache::fetch (const ACE_TCHAR *filename, int mapit)
{
ACE_Filecache_Object *handle = 0;
@@ -361,14 +361,14 @@ ACE_Filecache::fetch (const char *filename, int mapit)
filelock.release ();
}
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) CVF: found %s\n"), filename));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: found %s\n"), filename));
}
return handle;
}
ACE_Filecache_Object *
-ACE_Filecache::create (const char *filename, int size)
+ACE_Filecache::create (const ACE_TCHAR *filename, int size)
{
ACE_Filecache_Object *handle = 0;
@@ -404,7 +404,7 @@ ACE_Filecache::finish (ACE_Filecache_Object *&file)
file->release ();
- this->remove_i ((char *) file->filename_);
+ this->remove_i (file->filename_);
#if 0
int result = this->hash_.bind (file->filename (), file);
@@ -475,7 +475,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (void)
this->init ();
}
-ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
+ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa,
int mapit)
@@ -513,7 +513,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
}
this->size_ = this->stat_.st_size;
- this->tempname_ = (char *) this->filename_;
+ this->tempname_ = this->filename_;
// Can we open the file?
this->handle_ = ACE_OS::open (this->tempname_,
@@ -521,7 +521,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (this->handle_ == ACE_INVALID_HANDLE)
{
this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- "ACE_Filecache_Object::ctor: open");
+ ACE_TEXT ("ACE_Filecache_Object::ctor: open"));
return;
}
@@ -532,7 +532,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
PROT_READ, ACE_MAP_PRIVATE, 0, 0, this->sa_) != 0)
{
this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- "ACE_Filecache_Object::ctor: map");
+ ACE_TEXT ("ACE_Filecache_Object::ctor: map"));
ACE_OS::close (this->handle_);
this->handle_ = ACE_INVALID_HANDLE;
return;
@@ -543,7 +543,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
this->action_ = ACE_Filecache_Object::ACE_READING;
}
-ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
+ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
int size,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa)
@@ -574,7 +574,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (this->handle_ == ACE_INVALID_HANDLE)
{
this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- "ACE_Filecache_Object::acquire: open");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: open"));
return;
}
@@ -582,7 +582,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
if (ACE_OS::pwrite (this->handle_, "", 1, this->size_ - 1) != 1)
{
this->error_i (ACE_Filecache_Object::ACE_WRITE_FAILED,
- "ACE_Filecache_Object::acquire: write");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: write"));
ACE_OS::close (this->handle_);
return;
}
@@ -592,7 +592,7 @@ ACE_Filecache_Object::ACE_Filecache_Object (const char *filename,
0, 0, this->sa_) != 0)
{
this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- "ACE_Filecache_Object::acquire: map");
+ ACE_TEXT ("ACE_Filecache_Object::acquire: map"));
ACE_OS::close (this->handle_);
}
@@ -678,15 +678,15 @@ ACE_Filecache_Object::error (void) const
}
int
-ACE_Filecache_Object::error_i (int error_value, const char *s)
+ACE_Filecache_Object::error_i (int error_value, const ACE_TCHAR *s)
{
s = s;
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p.\n"), s));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p.\n"), s));
this->error_ = error_value;
return error_value;
}
-const char *
+const ACE_TCHAR *
ACE_Filecache_Object::filename (void) const
{
// The existence of the object means a read lock is being held.
@@ -732,42 +732,42 @@ ACE_Filecache_Object::update (void) const
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-template class ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>;
+template class ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
#else
-template class ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>;
+template class ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-#pragma instantiate ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
+#pragma instantiate ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
#else
-#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Filecache.h b/ace/Filecache.h
index 7c2bafb94d5..7f636f09795 100644
--- a/ace/Filecache.h
+++ b/ace/Filecache.h
@@ -93,12 +93,12 @@ class ACE_Export ACE_Filecache_Handle
//
public:
- ACE_Filecache_Handle (const char *filename,
+ ACE_Filecache_Handle (const ACE_TCHAR *filename,
ACE_Filecache_Flag mapit = ACE_MAPIT);
// Query cache for file, and acquire it. Assumes the file is being
// opened for reading.
- ACE_Filecache_Handle (const char *filename,
+ ACE_Filecache_Handle (const ACE_TCHAR *filename,
int size,
ACE_Filecache_Flag mapit = ACE_MAPIT);
// Create new entry, and acquire it. Presence of SIZE assumes the
@@ -151,16 +151,16 @@ private:
};
#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-typedef ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>
+typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
ACE_Filecache_Hash_Entry;
-typedef ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>
+typedef ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
ACE_Filecache_Hash;
#else
-typedef ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>
+typedef ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>
ACE_Filecache_Hash_Entry;
-typedef ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>
+typedef ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
ACE_Filecache_Hash;
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
@@ -177,18 +177,18 @@ public:
~ACE_Filecache (void);
- int find (const char *filename);
+ int find (const ACE_TCHAR *filename);
// Returns 0 if the file associated with ``filename'' is in the cache,
// or -1 if not.
- ACE_Filecache_Object *fetch (const char *filename, int mapit = 1);
+ ACE_Filecache_Object *fetch (const ACE_TCHAR *filename, int mapit = 1);
// Return the file associated with ``filename'' if it is in the cache,
// or create if not.
- ACE_Filecache_Object *remove (const char *filename);
+ ACE_Filecache_Object *remove (const ACE_TCHAR *filename);
// Remove the file associated with ``filename'' from the cache.
- ACE_Filecache_Object *create (const char *filename, int size);
+ ACE_Filecache_Object *create (const ACE_TCHAR *filename, int size);
// Create a new Filecache_Object, returns it.
ACE_Filecache_Object *finish (ACE_Filecache_Object *&new_file);
@@ -196,11 +196,11 @@ public:
// was deleted.
protected:
- ACE_Filecache_Object *insert_i (const char *filename,
+ ACE_Filecache_Object *insert_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit);
- ACE_Filecache_Object *remove_i (const char *filename);
- ACE_Filecache_Object *update_i (const char *filename,
+ ACE_Filecache_Object *remove_i (const ACE_TCHAR *filename);
+ ACE_Filecache_Object *update_i (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &filelock,
int mapit);
@@ -245,13 +245,13 @@ class ACE_Export ACE_Filecache_Object
public:
friend class ACE_Filecache;
- ACE_Filecache_Object (const char *filename,
+ ACE_Filecache_Object (const ACE_TCHAR *filename,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa = 0,
int mapit = 1);
// Creates a file for reading.
- ACE_Filecache_Object (const char *filename,
+ ACE_Filecache_Object (const ACE_TCHAR *filename,
int size,
ACE_SYNCH_RW_MUTEX &lock,
LPSECURITY_ATTRIBUTES sa = 0);
@@ -269,9 +269,9 @@ public:
// = error_ accessors
int error (void) const;
int error (int error_value,
- const char *s = "ACE_Filecache_Object");
+ const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object"));
- const char *filename (void) const;
+ const ACE_TCHAR *filename (void) const;
// filename_ accessor
ACE_HANDLE handle (void) const;
@@ -295,7 +295,7 @@ protected:
private:
int error_i (int error_value,
- const char *s = "ACE_Filecache_Object");
+ const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object"));
// Internal error logging method, no locking.
public:
@@ -318,8 +318,8 @@ public:
};
private:
- char *tempname_;
- char filename_[MAXPATHLEN + 1];
+ ACE_TCHAR *tempname_;
+ ACE_TCHAR filename_[MAXPATHLEN + 1];
// The temporary file name and the real file name. The real file is
// copied into the temporary file for safety reasons.
diff --git a/ace/Functor.h b/ace/Functor.h
index 15ac688d797..bce51209ff6 100644
--- a/ace/Functor.h
+++ b/ace/Functor.h
@@ -171,217 +171,71 @@ public:
// @@ DONE ADDING HASHES FOR ACE TYPES
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<const char *>
+class ACE_Export ACE_Hash<const ACE_TCHAR *>
{
// = TITLE
// Function object for hashing a const string
public:
- u_long operator () (const char *t) const;
+ u_long operator () (const ACE_TCHAR *t) const;
// Calls ACE::hash_pjw
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<char *>
+class ACE_Export ACE_Hash<ACE_TCHAR *>
{
// = TITLE
// Function object for hashing a string
public:
- u_long operator () (const char *t) const;
+ u_long operator () (const ACE_TCHAR *t) const;
// Calls ACE::hash_pjw
};
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<const wchar_t *>
-{
- // = TITLE
- // Function object for hashing a const wide string
-public:
- u_long operator () (const wchar_t *t) const;
- // Calls ACE::hash_pjw
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<wchar_t *>
-{
- // = TITLE
- // Function object for hashing a wide string
-public:
- u_long operator () (const wchar_t *t) const;
- // Calls ACE::hash_pjw
-};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<const ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for hashing a const wide string
-public:
- u_long operator () (const ACE_USHORT16 *t) const;
- // Calls ACE::hash_pjw
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for hashing a wide string
-public:
- u_long operator () (const ACE_USHORT16 *t) const;
- // Calls ACE::hash_pjw
-};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<const char *>
+class ACE_Export ACE_Equal_To<const ACE_TCHAR *>
{
// = TITLE
// Function object for determining whether two const strings are equal.
public:
- int operator () (const char *lhs,
- const char *rhs) const;
+ int operator () (const ACE_TCHAR *lhs,
+ const ACE_TCHAR *rhs) const;
// Simply calls ACE_OS::strcmp
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<char *>
+class ACE_Export ACE_Equal_To<ACE_TCHAR *>
{
// = TITLE
// Function object for determining whether two non-const
// strings are equal.
public:
- int operator () (const char *lhs,
- const char *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<const wchar_t *>
-{
- // = TITLE
- // Function object for determining whether two const wide
- // strings are equal.
-public:
- int operator () (const wchar_t *lhs,
- const wchar_t *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<wchar_t *>
-{
- // = TITLE
- // Function object for determining whether two wide strings are equal.
-public:
- int operator () (const wchar_t *lhs,
- const wchar_t *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<const ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for determining whether two const wide
- // strings are equal.
-public:
- int operator () (const ACE_USHORT16 *lhs,
- const ACE_USHORT16 *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for determining whether two wide strings are equal.
-public:
- int operator () (const ACE_USHORT16 *lhs,
- const ACE_USHORT16 *rhs) const;
+ int operator () (const ACE_TCHAR *lhs,
+ const ACE_TCHAR *rhs) const;
// Simply calls ACE_OS::strcmp
};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<const char *>
+class ACE_Export ACE_Less_Than<const ACE_TCHAR *>
{
// = TITLE
// Function object for determining whether the first const string
// is less than the second const string.
public:
- int operator () (const char *lhs,
- const char *rhs) const;
+ int operator () (const ACE_TCHAR *lhs,
+ const ACE_TCHAR *rhs) const;
// Simply calls ACE_OS::strcmp
};
ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<char *>
+class ACE_Export ACE_Less_Than<ACE_TCHAR *>
{
// = TITLE
// Function object for determining whether the first string
// is less than the second string.
public:
- int operator () (const char *lhs,
- const char *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<const wchar_t *>
-{
- // = TITLE
- // Function object for determining whether the first const wide string
- // is less than the second const wide string.
-public:
- int operator () (const wchar_t *lhs,
- const wchar_t *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<wchar_t *>
-{
- // = TITLE
- // Function object for determining whether the first wide string
- // is less than the second wide string.
-public:
- int operator () (const wchar_t *lhs,
- const wchar_t *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<const ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for determining whether the first const wide string
- // is less than the second const wide string.
-public:
- int operator () (const ACE_USHORT16 *lhs,
- const ACE_USHORT16 *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<ACE_USHORT16 *>
-{
- // = TITLE
- // Function object for determining whether the first wide string
- // is less than the second wide string.
-public:
- int operator () (const ACE_USHORT16 *lhs,
- const ACE_USHORT16 *rhs) const;
+ int operator () (const ACE_TCHAR *lhs,
+ const ACE_TCHAR *rhs) const;
// Simply calls ACE_OS::strcmp
};
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
#if defined (__ACE_INLINE__)
#include "ace/Functor.i"
diff --git a/ace/Functor.i b/ace/Functor.i
index 93759f5d176..3fe587c8b95 100644
--- a/ace/Functor.i
+++ b/ace/Functor.i
@@ -111,139 +111,42 @@ ACE_Hash<ACE_UINT64>::operator () (ACE_UINT64 t) const
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE u_long
-ACE_Hash<const char *>::operator () (const char *t) const
+ACE_Hash<const ACE_TCHAR *>::operator () (const ACE_TCHAR *t) const
{
return ACE::hash_pjw (t);
}
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE u_long
-ACE_Hash<char *>::operator () (const char *t) const
+ACE_Hash<ACE_TCHAR *>::operator () (const ACE_TCHAR *t) const
{
return ACE::hash_pjw (t);
}
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<const wchar_t *>::operator () (const wchar_t *t) const
-{
- return ACE::hash_pjw (t);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<wchar_t *>::operator () (const wchar_t *t) const
-{
- return ACE::hash_pjw (t);
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<const ACE_USHORT16 *>::operator () (const ACE_USHORT16 *t) const
-{
- return ACE::hash_pjw (t);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_USHORT16 *>::operator () (const ACE_USHORT16 *t) const
-{
- return ACE::hash_pjw (t);
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Equal_To<const char *>::operator () (const char *lhs, const char *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE int
-ACE_Equal_To<char *>::operator () (const char *lhs, const char *rhs) const
+ACE_Equal_To<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
{
return !ACE_OS::strcmp (lhs, rhs);
}
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE int
-ACE_Equal_To<const wchar_t *>::operator () (const wchar_t *lhs, const wchar_t *rhs) const
+ACE_Equal_To<ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
{
return !ACE_OS::strcmp (lhs, rhs);
}
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE int
-ACE_Equal_To<wchar_t *>::operator () (const wchar_t *lhs, const wchar_t *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Equal_To<const ACE_USHORT16 *>::operator () (const ACE_USHORT16 *lhs, const ACE_USHORT16 *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Equal_To<ACE_USHORT16 *>::operator () (const ACE_USHORT16 *lhs, const ACE_USHORT16 *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<const char *>::operator () (const char *lhs, const char *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<char *>::operator () (const char *lhs, const char *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<const wchar_t *>::operator () (const wchar_t *lhs, const wchar_t *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<wchar_t *>::operator () (const wchar_t *lhs, const wchar_t *rhs) const
+ACE_Less_Than<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
{
return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE int
-ACE_Less_Than<const ACE_USHORT16 *>::operator () (const ACE_USHORT16 *lhs, const ACE_USHORT16 *rhs) const
+ACE_Less_Than<ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
{
return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<ACE_USHORT16 *>::operator () (const ACE_USHORT16 *lhs, const ACE_USHORT16 *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
-
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
diff --git a/ace/Future.cpp b/ace/Future.cpp
index 8f3bc993ecd..d46455ef291 100644
--- a/ace/Future.cpp
+++ b/ace/Future.cpp
@@ -50,9 +50,9 @@ ACE_Future_Rep<T>::dump (void) const
(int) this->ref_count_));
ACE_DEBUG ((LM_INFO,"value_: \n"));
if (this->value_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (NON-NULL)\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (NON-NULL)\n")));
else
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (NULL)\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (NULL)\n")));
ACE_DEBUG ((LM_INFO,"value_ready_: \n"));
this->value_ready_.dump ();
@@ -276,7 +276,7 @@ ACE_Future<T>::ACE_Future (const T &r)
: future_rep_ (FUTURE_REP::create ())
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT (" (%t) funny constructor\n")));
+ ACE_TEXT (" (%t) funny constructor\n")));
this->future_rep_->set (r,
*this);
}
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
index b0667aca8f3..b23c3ad2186 100644
--- a/ace/Get_Opt.cpp
+++ b/ace/Get_Opt.cpp
@@ -45,8 +45,8 @@ ACE_RCSID(ace, Get_Opt, "$Id$")
ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt)
ACE_Get_Opt::ACE_Get_Opt (int argc,
- ASYS_TCHAR **argv,
- const ASYS_TCHAR *optstring,
+ ACE_TCHAR **argv,
+ const ACE_TCHAR *optstring,
int skip,
int report_errors)
: optarg (0),
@@ -66,7 +66,7 @@ ACE_Get_Opt::dump (void) const
ACE_TRACE ("ACE_Get_Opt::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -83,7 +83,7 @@ ACE_Get_Opt::operator () (void)
}
int opt; // Character checked for validity.
- const ASYS_TCHAR *oli; // Option letter index.
+ const ACE_TCHAR *oli; // Option letter index.
if (this->nextchar_ == 0 || *this->nextchar_ == '\0')
{
@@ -92,7 +92,7 @@ ACE_Get_Opt::operator () (void)
if (this->optind >= this->argc_
|| *(this->nextchar_ = this->argv_[this->optind]) != '-')
{
- this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
return EOF;
}
@@ -101,7 +101,7 @@ ACE_Get_Opt::operator () (void)
{
// Found "--".
++this->optind;
- this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
return EOF;
}
}
@@ -122,7 +122,7 @@ ACE_Get_Opt::operator () (void)
if (this->opterr && *this->optstring_ != ':')
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%s: illegal option -- %c\n"),
+ ACE_TEXT ("%s: illegal option -- %c\n"),
this->argv_[0],
opt));
return '?';
@@ -141,20 +141,20 @@ ACE_Get_Opt::operator () (void)
else if (this->argc_ <= ++this->optind)
{
// No arg.
- this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
if (*this->optstring_ == ':')
return ':';
if (this->opterr)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%s: option requires an argument -- %c\n"),
+ ACE_TEXT ("%s: option requires an argument -- %c\n"),
this->argv_[0], opt));
return '?';
}
else // White space.
this->optarg = this->argv_[this->optind];
- this->nextchar_ = ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT (""));
+ this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
++this->optind;
}
diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h
index 70005adec98..e645328f0a9 100644
--- a/ace/Get_Opt.h
+++ b/ace/Get_Opt.h
@@ -33,8 +33,8 @@ class ACE_Export ACE_Get_Opt
// This is a C++ wrapper for getopt(3c).
public:
ACE_Get_Opt (int argc,
- ASYS_TCHAR **argv,
- const ASYS_TCHAR *optstring,
+ ACE_TCHAR **argv,
+ const ACE_TCHAR *optstring,
int skip_argv0 = 1,
int report_errors = 0);
// Initialize the internal data when the first call is made. Start
@@ -82,7 +82,7 @@ public:
// = Public data members (should be hidden...).
- ASYS_TCHAR *optarg;
+ ACE_TCHAR *optarg;
// For communication from <operator()> to the caller. When
// <operator()> finds an option that takes an argument, the argument
// value is returned here.
@@ -106,7 +106,7 @@ public:
int argc_;
// Holds the <argc> count.
- ASYS_TCHAR **argv_;
+ ACE_TCHAR **argv_;
// Holds the <argv> pointer.
void dump (void) const;
@@ -117,7 +117,7 @@ public:
private:
- ASYS_TCHAR *nextchar_;
+ ACE_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.
@@ -125,7 +125,7 @@ private:
// If this is zero, or a null string, it means resume the scan
// by advancing to the next <argv>-element.
- const ASYS_TCHAR *optstring_;
+ const ACE_TCHAR *optstring_;
// Holds the option string.
};
diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp
index f72660fe1b9..b7301bd7a7c 100644
--- a/ace/Handle_Set.cpp
+++ b/ace/Handle_Set.cpp
@@ -25,20 +25,20 @@ ACE_Handle_Set::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nsize_ = %d"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nmax_handle_ = %d"), this->max_handle_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n[ ")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nsize_ = %d"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nmax_handle_ = %d"), this->max_handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n[ ")));
#if defined (ACE_WIN32)
for (size_t i = 0; i < (size_t) this->mask_.fd_count + 1; i++)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT(" %x "), this->mask_.fd_array[i]));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" %x "), this->mask_.fd_array[i]));
#else /* !ACE_WIN32 */
for (ACE_HANDLE i = 0; i < this->max_handle_ + 1; i++)
if (this->is_set (i))
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT(" %d "), i));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" %d "), i));
#endif /* ACE_WIN32 */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT(" ]\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" ]\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -243,12 +243,12 @@ ACE_Handle_Set_Iterator::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
#if defined(ACE_WIN32) || !defined(ACE_HAS_BIG_FD_SET)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nhandle_index_ = %d"), this->handle_index_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nhandle_index_ = %d"), this->handle_index_));
#elif defined(ACE_HAS_BIG_FD_SET)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nword_max_ = %d"), this->word_max_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nword_val_ = %d"), this->word_val_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_max_ = %d"), this->word_max_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_val_ = %d"), this->word_val_));
#endif
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nword_num_ = %d"), this->word_num_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_num_ = %d"), this->word_num_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Hash_Map_Manager_T.cpp b/ace/Hash_Map_Manager_T.cpp
index 8d1dc0161d5..af8265ddccd 100644
--- a/ace/Hash_Map_Manager_T.cpp
+++ b/ace/Hash_Map_Manager_T.cpp
@@ -73,8 +73,8 @@ template <class EXT_ID, class INT_ID> void
ACE_Hash_Map_Entry<EXT_ID, INT_ID>::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("next_ = %d"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("prev_ = %d"), this->prev_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -82,8 +82,8 @@ template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class
ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("total_size_ = %d"), this->total_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d"), this->cur_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d"), this->total_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
this->allocator_->dump ();
this->lock_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -356,8 +356,8 @@ ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>:
ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("index_ = %d "), this->index_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("next_ = %x"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Hash_Map_Manager_T.i b/ace/Hash_Map_Manager_T.i
index 8458ef909a9..101caf9389b 100644
--- a/ace/Hash_Map_Manager_T.i
+++ b/ace/Hash_Map_Manager_T.i
@@ -11,7 +11,7 @@ ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_H
cur_size_ (0)
{
if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
}
template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
@@ -22,7 +22,7 @@ ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_H
cur_size_ (0)
{
if (this->open (ACE_DEFAULT_MAP_SIZE, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
}
template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp
index ab02a314a35..de4d38eb77c 100644
--- a/ace/High_Res_Timer.cpp
+++ b/ace/High_Res_Timer.cpp
@@ -64,9 +64,9 @@ ACE_High_Res_Timer::get_cpuinfo (void)
if (cpuinfo != 0)
{
- char buf[128];
+ ACE_TCHAR buf[128];
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nReading /proc/cpuinfo...")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nReading /proc/cpuinfo...")));
while (ACE_OS::fgets (buf, sizeof buf, cpuinfo))
{
@@ -87,7 +87,7 @@ ACE_High_Res_Timer::get_cpuinfo (void)
}
#else
double bmips = 1;
- char arg[128];
+ ACE_TCHAR arg[128];
// CPU type?
if (::sscanf (buf, "cpu : %s\n", arg) == 1)
@@ -99,7 +99,7 @@ ACE_High_Res_Timer::get_cpuinfo (void)
5) == 0)
{
supported = 1;
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" recognized Alpha chip...")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" recognized Alpha chip...")));
}
}
// Pentium CPU model?
@@ -112,7 +112,7 @@ ACE_High_Res_Timer::get_cpuinfo (void)
|| ACE_OS::strcmp (arg, "Pro") == 0)
{
supported = 1;
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" recognized Pentium Pro/II chip...")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" recognized Pentium Pro/II chip...")));
}
}
else if (::sscanf (buf, "bogomips : %lf\n", &bmips) == 1
@@ -121,13 +121,13 @@ ACE_High_Res_Timer::get_cpuinfo (void)
if (supported)
{
scale_factor = (ACE_UINT32) (bmips + 0.5);
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" setting the clock scale factor to %u"), scale_factor));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" setting the clock scale factor to %u"), scale_factor));
}
#if 0
else
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\nThe BogoMIPS metric is not supported on this platform"
+ ACE_TEXT ("\nThe BogoMIPS metric is not supported on this platform"
"\n\tReport the results of the clock calibration and"
"\n\tthe contents of /proc/cpuinfo to the ace-users mailing list")));
}
@@ -137,7 +137,7 @@ ACE_High_Res_Timer::get_cpuinfo (void)
#endif /* __alpha__ */
}
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (done)\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (done)\n")));
ACE_OS::fclose (cpuinfo);
}
@@ -262,24 +262,24 @@ ACE_High_Res_Timer::dump (void) const
ACE_TRACE ("ACE_High_Res_Timer::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nglobal_scale_factor_: %u\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nglobal_scale_factor_: %u\n"),
global_scale_factor ()));
#if defined (ACE_LACKS_LONGLONG_T)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
- ASYS_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
- ASYS_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
- ASYS_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
+ ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
+ ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
+ ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
+ ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
start_.hi (), start_.lo (),
end_.hi (), end_.lo (),
total_.hi (), total_.lo (),
start_incr_.hi (), start_incr_.lo ()));
#else /* ! ACE_LACKS_LONGLONG_T */
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
- ASYS_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
- ASYS_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
- ASYS_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
+ ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
+ ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
+ ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
+ ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
ACE_CU64_TO_CU32 (start_ >> 32),
ACE_CU64_TO_CU32 (start_ & 0xfffffffful),
ACE_CU64_TO_CU32 (end_ >> 32),
@@ -365,7 +365,7 @@ ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const
#if !defined (ACE_HAS_WINCE)
void
-ACE_High_Res_Timer::print_ave (const char *str,
+ACE_High_Res_Timer::print_ave (const ACE_TCHAR *str,
const int count,
ACE_HANDLE handle) const
{
@@ -383,12 +383,12 @@ ACE_High_Res_Timer::print_ave (const char *str,
ACE_static_cast (ACE_UINT32,
total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
- char buf[100];
+ ACE_TCHAR buf[100];
if (count > 1)
{
ACE_hrtime_t avg_nsecs = total_nanoseconds / (ACE_UINT32) count;
ACE_OS::sprintf (buf,
- " count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n",
+ ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"),
count,
total_secs,
(extra_nsecs + 500u) / 1000u,
@@ -396,7 +396,7 @@ ACE_High_Res_Timer::print_ave (const char *str,
}
else
ACE_OS::sprintf (buf,
- " total %3lu.%06lu secs\n",
+ ACE_TEXT (" total %3lu.%06lu secs\n"),
total_secs,
(extra_nsecs + 500lu) / 1000lu);
@@ -409,7 +409,7 @@ ACE_High_Res_Timer::print_ave (const char *str,
}
void
-ACE_High_Res_Timer::print_total (const char *str,
+ACE_High_Res_Timer::print_total (const ACE_TCHAR *str,
const int count,
ACE_HANDLE handle) const
{
@@ -425,13 +425,13 @@ ACE_High_Res_Timer::print_total (const char *str,
ACE_UINT32 extra_nsecs =
(ACE_UINT32) (total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
- char buf[100];
+ ACE_TCHAR buf[100];
if (count > 1)
{
ACE_hrtime_t avg_nsecs = this->total_ / (ACE_UINT32) count;
ACE_OS::sprintf (buf,
- " count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n",
+ ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"),
count,
total_secs,
(extra_nsecs + 500u) / 1000u,
@@ -439,7 +439,7 @@ ACE_High_Res_Timer::print_total (const char *str,
}
else
ACE_OS::sprintf (buf,
- " total %3lu.%06u secs\n",
+ ACE_TEXT (" total %3lu.%06u secs\n"),
total_secs,
(extra_nsecs + 500u) / 1000u);
@@ -453,12 +453,12 @@ ACE_High_Res_Timer::print_total (const char *str,
#endif /* !ACE_HAS_WINCE */
int
-ACE_High_Res_Timer::get_env_global_scale_factor (const char *env)
+ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env)
{
#if !defined (ACE_HAS_WINCE)
if (env != 0)
{
- const char *env_value = ACE_OS::getenv (env);
+ const ACE_TCHAR *env_value = ACE_OS::getenv (env);
if (env_value != 0)
{
int value = ACE_OS::atoi (env_value);
diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h
index 3915e894c04..1045fcb1b3a 100644
--- a/ace/High_Res_Timer.h
+++ b/ace/High_Res_Timer.h
@@ -81,7 +81,8 @@ public:
static ACE_UINT32 global_scale_factor (void);
// Returns the global_scale_factor.
- static int get_env_global_scale_factor (const char *env = "ACE_SCALE_FACTOR");
+ static int get_env_global_scale_factor (const ACE_TCHAR *env
+ = ACE_TEXT ("ACE_SCALE_FACTOR"));
// Sets the global_scale_factor to the value in the <env>
// environment variable. Returns 0 on success, -1 on failure. Note
// if <env> points to string "0" (value zero), this call will fail.
@@ -144,16 +145,16 @@ public:
// to start_incr and stop_incr.
#if !defined (ACE_HAS_WINCE)
- // @@ These two functions are currently not supported on Windows CE.
+ // @@ WINCE These two functions are currently not supported on Windows CE.
// However, we should probably use the handle and ACE_Log_Msg to
// print out the result.
- void print_total (const char *message,
+ void print_total (const ACE_TCHAR *message,
const int iterations = 1,
ACE_HANDLE handle = ACE_STDOUT) const;
// Print total time. NOTE: only use <print_total> if incremental
// timings had been used!
- void print_ave (const char *message,
+ void print_ave (const ACE_TCHAR *message,
const int iterations = 1,
ACE_HANDLE handle = ACE_STDOUT) const;
// Print average time.
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
index f0b86a80d9a..8f85baaced5 100644
--- a/ace/INET_Addr.cpp
+++ b/ace/INET_Addr.cpp
@@ -15,7 +15,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_INET_Addr)
// Transform the current address into string format.
int
-ACE_INET_Addr::addr_to_string (ASYS_TCHAR s[],
+ACE_INET_Addr::addr_to_string (ACE_TCHAR s[],
size_t size,
int ipaddr_format) const
{
@@ -33,10 +33,10 @@ ACE_INET_Addr::addr_to_string (ASYS_TCHAR s[],
else
{
ACE_OS::sprintf (s,
- ASYS_TEXT ("%s:%d"),
+ ACE_TEXT ("%s:%d"),
(ipaddr_format == 0
? this->get_host_name ()
- : ASYS_WIDE_STRING (this->get_host_addr ())),
+ : this->get_host_addr ()),
this->get_port_number ());
return 0;
}
@@ -49,11 +49,11 @@ ACE_INET_Addr::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ASYS_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
- ACE_OS::sprintf (s, ASYS_TEXT ("%s:%d"),
- ASYS_WIDE_STRING (this->get_host_addr ()),
+ ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
+ ACE_OS::sprintf (s, ACE_TEXT ("%s:%d"),
+ this->get_host_addr (),
this->get_port_number ());
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s"), s));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -112,21 +112,21 @@ ACE_INET_Addr::set (const ACE_INET_Addr &sa)
// Transform the string into the current addressing format.
int
-ACE_INET_Addr::string_to_addr (const ASYS_TCHAR s[])
+ACE_INET_Addr::string_to_addr (const ACE_TCHAR s[])
{
ACE_TRACE ("ACE_INET_Addr::string_to_addr");
int result;
- ASYS_TCHAR *t;
+ ACE_TCHAR *t;
// Need to make a duplicate since we'll be overwriting the string.
ACE_ALLOCATOR_RETURN (t,
ACE_OS::strdup (s),
-1);
- ASYS_TCHAR *ip_addr = ACE_OS::strchr (t, ':');
+ ACE_TCHAR *ip_addr = ACE_OS::strchr (t, ':');
if (ip_addr == 0) // Assume it's a port number.
{
- if (ACE_OS::strspn (t, ASYS_TEXT ("1234567890"))
+ if (ACE_OS::strspn (t, ACE_TEXT ("1234567890"))
== ACE_OS::strlen (t))
{ // port number
u_short port = (u_short) ACE_OS::atoi (t);
@@ -142,7 +142,7 @@ ACE_INET_Addr::string_to_addr (const ASYS_TCHAR s[])
*ip_addr = '\0'; ++ip_addr; // skip over ':'
if (ACE_OS::strspn (ip_addr,
- ASYS_TEXT ("1234567890")) ==
+ ACE_TEXT ("1234567890")) ==
ACE_OS::strlen (ip_addr))
{
u_short port =
@@ -158,13 +158,13 @@ ACE_INET_Addr::string_to_addr (const ASYS_TCHAR s[])
}
int
-ACE_INET_Addr::set (const ASYS_TCHAR address[])
+ACE_INET_Addr::set (const ACE_TCHAR address[])
{
ACE_TRACE ("ACE_INET_Addr::set");
return this->string_to_addr (address);
}
-ACE_INET_Addr::ACE_INET_Addr (const ASYS_TCHAR address[])
+ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR address[])
: ACE_Addr (AF_INET, sizeof this->inet_addr_)
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
@@ -216,7 +216,7 @@ ACE_INET_Addr::set (u_short port_number,
int
ACE_INET_Addr::set (u_short port_number,
- const ASYS_TCHAR host_name[],
+ const ACE_TCHAR host_name[],
int encode)
{
ACE_TRACE ("ACE_INET_Addr::set");
@@ -232,7 +232,7 @@ ACE_INET_Addr::set (u_short port_number,
errno = EINVAL;
return -1;
}
- else if (ACE_OS::inet_aton (ASYS_ONLY_MULTIBYTE_STRING (host_name),
+ else if (ACE_OS::inet_aton (host_name,
(struct in_addr *) &addr) == 1)
return this->set (port_number,
encode ? ntohl (addr) : addr,
@@ -246,7 +246,7 @@ ACE_INET_Addr::set (u_short port_number,
ACE_HOSTENT_DATA buf;
int error;
- hostent *hp = ACE_OS::gethostbyname_r (ASYS_ONLY_MULTIBYTE_STRING (host_name), &hentry,
+ hostent *hp = ACE_OS::gethostbyname_r (host_name, &hentry,
buf, &error);
#endif /* VXWORKS */
@@ -271,9 +271,9 @@ ACE_INET_Addr::set (u_short port_number,
// <host_name>.
int
-ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
- const ASYS_TCHAR host_name[],
- const ASYS_TCHAR protocol[])
+ACE_INET_Addr::set (const ACE_TCHAR port_name[],
+ const ACE_TCHAR host_name[],
+ const ACE_TCHAR protocol[])
{
ACE_TRACE ("ACE_INET_Addr::set");
@@ -286,8 +286,8 @@ ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
servent sentry;
ACE_SERVENT_DATA buf;
- servent *sp = ACE_OS::getservbyname_r ((char *) port_name,
- (char *) protocol,
+ servent *sp = ACE_OS::getservbyname_r (port_name,
+ protocol,
&sentry,
buf);
if (sp == 0)
@@ -301,9 +301,9 @@ ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
// address.
int
-ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
+ACE_INET_Addr::set (const ACE_TCHAR port_name[],
ACE_UINT32 inet_address,
- const ASYS_TCHAR protocol[])
+ const ACE_TCHAR protocol[])
{
ACE_TRACE ("ACE_INET_Addr::set");
@@ -316,8 +316,8 @@ ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
servent sentry;
ACE_SERVENT_DATA buf;
- servent *sp = ACE_OS::getservbyname_r ((char *) port_name,
- (char *) protocol,
+ servent *sp = ACE_OS::getservbyname_r (port_name,
+ protocol,
&sentry,
buf);
if (sp == 0)
@@ -332,22 +332,22 @@ ACE_INET_Addr::set (const ASYS_TCHAR port_name[],
ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
- const ASYS_TCHAR host_name[])
+ const ACE_TCHAR host_name[])
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
if (this->set (port_number,
host_name) == -1)
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
ACE_ERROR ((LM_ERROR,
- (char *) "ACE_INET_Addr::ACE_INET_Addr: %p\n",
+ (char *)"ACE_INET_Addr::ACE_INET_Addr: %p\n",
(((char *) host_name == 0) ?
((char *) "<unknown>") :
((char *) (host_name)))));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"),
+ ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"),
((host_name == 0) ?
- (ASYS_TEXT ("<unknown>")) :
+ (ACE_TEXT ("<unknown>")) :
host_name)));
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
}
@@ -393,42 +393,42 @@ ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
if (this->set (port_number, inet_address) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
}
// Creates a ACE_INET_Addr from a PORT_NAME and the remote
// HOST_NAME.
-ACE_INET_Addr::ACE_INET_Addr (const ASYS_TCHAR port_name[],
- const ASYS_TCHAR host_name[],
- const ASYS_TCHAR protocol[])
+ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR port_name[],
+ const ACE_TCHAR host_name[],
+ const ACE_TCHAR protocol[])
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
if (this->set (port_name,
host_name,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
+ ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
}
// Creates a ACE_INET_Addr from a PORT_NAME and an Internet address.
-ACE_INET_Addr::ACE_INET_Addr (const ASYS_TCHAR port_name[],
+ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR port_name[],
ACE_UINT32 inet_address,
- const ASYS_TCHAR protocol[])
+ const ACE_TCHAR protocol[])
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
if (this->set (port_name,
inet_address,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
+ ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
}
int
-ACE_INET_Addr::get_host_name (ASYS_TCHAR hostname[],
+ACE_INET_Addr::get_host_name (ACE_TCHAR hostname[],
size_t len) const
{
ACE_TRACE ("ACE_INET_Addr::get_host_name");
@@ -472,12 +472,13 @@ ACE_INET_Addr::get_host_name (ASYS_TCHAR hostname[],
#else
hostent hentry;
ACE_HOSTENT_DATA buf;
- hostent *hp = ACE_OS::gethostbyaddr_r ((char *) &this->inet_addr_.sin_addr,
- a_len,
- this->addr_type_,
- &hentry,
- buf,
- &error);
+ hostent *hp =
+ ACE_OS::gethostbyaddr_r (ACE_TEXT_CHAR_TO_TCHAR ((char *)&this->inet_addr_.sin_addr),
+ a_len,
+ this->addr_type_,
+ &hentry,
+ buf,
+ &error);
#endif /* CHORUS */
if (hp == 0)
@@ -495,8 +496,7 @@ ACE_INET_Addr::get_host_name (ASYS_TCHAR hostname[],
return -1;
}
- ACE_OS::strcpy (hostname,
- ASYS_WIDE_STRING (hp->h_name));
+ ACE_OS::strcpy (hostname, ACE_TEXT_CHAR_TO_TCHAR (hp->h_name));
return 0;
#endif /* VXWORKS */
}
@@ -504,14 +504,14 @@ ACE_INET_Addr::get_host_name (ASYS_TCHAR hostname[],
// Return the character representation of the hostname.
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_INET_Addr::get_host_name (void) const
{
ACE_TRACE ("ACE_INET_Addr::get_host_name");
- static ASYS_TCHAR name[MAXHOSTNAMELEN + 1];
+ static ACE_TCHAR name[MAXHOSTNAMELEN + 1];
if (this->get_host_name (name, MAXHOSTNAMELEN + 1) == -1)
- ACE_OS::strcpy (name, ASYS_TEXT ("<unknown>"));
+ ACE_OS::strcpy (name, ACE_TEXT ("<unknown>"));
return name;
}
diff --git a/ace/INET_Addr.h b/ace/INET_Addr.h
index 640e66fcceb..1051f54a8d1 100644
--- a/ace/INET_Addr.h
+++ b/ace/INET_Addr.h
@@ -43,11 +43,11 @@ public:
// Creates an <ACE_INET_Addr> from a sockaddr_in structure.
ACE_INET_Addr (u_short port_number,
- const ASYS_TCHAR host_name[]);
+ const ACE_TCHAR host_name[]);
// Creates an <ACE_INET_Addr> from a <port_number> and the remote
// <host_name>.
- ACE_INET_Addr (const ASYS_TCHAR address[]);
+ ACE_INET_Addr (const ACE_TCHAR address[]);
// Initializes an <ACE_INET_Addr> from the <address>, which can be
// "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or
// "128.252.166.57:1234"). If there is no ':' in the <address> it
@@ -60,15 +60,15 @@ public:
// <ip_addr>. This method assumes that <port_number> and <ip_addr>
// are in host byte order.
- ACE_INET_Addr (const ASYS_TCHAR port_name[],
- const ASYS_TCHAR host_name[],
- const ASYS_TCHAR protocol[] = ASYS_TEXT ("tcp"));
+ ACE_INET_Addr (const ACE_TCHAR port_name[],
+ const ACE_TCHAR host_name[],
+ const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
// Uses <getservbyname> to create an <ACE_INET_Addr> from a
// <port_name>, the remote <host_name>, and the <protocol>.
- ACE_INET_Addr (const ASYS_TCHAR port_name[],
+ ACE_INET_Addr (const ACE_TCHAR port_name[],
ACE_UINT32 ip_addr,
- const ASYS_TCHAR protocol[] = ASYS_TEXT ("tcp"));
+ const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
// Uses <getservbyname> to create an <ACE_INET_Addr> from a
// <port_name>, an Internet <ip_addr>, and the <protocol>. This
// method assumes that <ip_addr> is in host byte order.
@@ -84,7 +84,7 @@ public:
// Initializes from another <ACE_INET_Addr>.
int set (u_short port_number,
- const ASYS_TCHAR host_name[],
+ const ACE_TCHAR host_name[],
int encode = 1);
// Initializes an <ACE_INET_Addr> from a <port_number> and the
// remote <host_name>. If <encode> is enabled then <port_number> is
@@ -100,20 +100,20 @@ public:
// they are assumed to be in network byte order already and are
// passed straight through.
- int set (const ASYS_TCHAR port_name[],
- const ASYS_TCHAR host_name[],
- const ASYS_TCHAR protocol[] = ASYS_TEXT ("tcp"));
+ int set (const ACE_TCHAR port_name[],
+ const ACE_TCHAR host_name[],
+ const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
// Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
// <port_name>, the remote <host_name>, and the <protocol>.
- int set (const ASYS_TCHAR port_name[],
+ int set (const ACE_TCHAR port_name[],
ACE_UINT32 ip_addr,
- const ASYS_TCHAR protocol[] = ASYS_TEXT ("tcp"));
+ const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
// Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
// <port_name>, an <ip_addr>, and the <protocol>. This assumes that
// <ip_addr> is already in network byte order.
- int set (const ASYS_TCHAR addr[]);
+ int set (const ACE_TCHAR addr[]);
// Initializes an <ACE_INET_Addr> from the <addr>, which can be
// "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or
// "128.252.166.57:1234"). If there is no ':' in the <address> it
@@ -130,7 +130,7 @@ public:
virtual void set_addr (void *, int len);
// Set a pointer to the address.
- virtual int addr_to_string (ASYS_TCHAR buffer[],
+ virtual int addr_to_string (ACE_TCHAR buffer[],
size_t size,
int ipaddr_format = 1) const;
// Transform the current <ACE_INET_Addr> address into string format.
@@ -140,7 +140,7 @@ public:
// "tango.cs.wustl.edu:1234"). Returns -1 if the <size> of the
// <buffer> is too small, else 0.
- virtual int string_to_addr (const ASYS_TCHAR address[]);
+ virtual int string_to_addr (const ACE_TCHAR address[]);
// Initializes an <ACE_INET_Addr> from the <address>, which can be
// "ip-addr:port-number" (e.g., "tango.cs.wustl.edu:1234"),
// "ip-addr:port-name" (e.g., "tango.cs.wustl.edu:telnet"),
@@ -159,18 +159,18 @@ public:
u_short get_port_number (void) const;
// Return the port number, converting it into host byte order.
- int get_host_name (ASYS_TCHAR hostname[],
+ int get_host_name (ACE_TCHAR hostname[],
size_t hostnamelen) const;
// Return the character representation of the name of the host,
// storing it in the <hostname> (which is assumed to be
// <hostnamelen> bytes long). This version is reentrant.
- const ASYS_TCHAR *get_host_name (void) const;
+ const ACE_TCHAR *get_host_name (void) const;
// Return the character representation of the hostname (this version
// is non-reentrant since it returns a pointer to a static data
// area).
- const char *get_host_addr (void) const;
+ const ACE_TCHAR *get_host_addr (void) const;
// Return the "dotted decimal" Internet address.
ACE_UINT32 get_ip_address (void) const;
diff --git a/ace/INET_Addr.i b/ace/INET_Addr.i
index 6f4b74e830a..cefbd932870 100644
--- a/ace/INET_Addr.i
+++ b/ace/INET_Addr.i
@@ -29,7 +29,7 @@ ACE_INET_Addr::get_addr (void) const
// Return the dotted Internet address.
-ACE_INLINE const char *
+ACE_INLINE const ACE_TCHAR *
ACE_INET_Addr::get_host_addr (void) const
{
ACE_TRACE ("ACE_INET_Addr::get_host_addr");
diff --git a/ace/IO_SAP.cpp b/ace/IO_SAP.cpp
index 22765bc5938..a49f5145444 100644
--- a/ace/IO_SAP.cpp
+++ b/ace/IO_SAP.cpp
@@ -26,8 +26,8 @@ ACE_IO_SAP::dump (void) const
ACE_TRACE ("ACE_IO_SAP::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("handle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\npid_ = %d"), this->pid_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d"), this->pid_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/IPC_SAP.cpp b/ace/IPC_SAP.cpp
index 470bc789537..5ca6c520d85 100644
--- a/ace/IPC_SAP.cpp
+++ b/ace/IPC_SAP.cpp
@@ -16,8 +16,8 @@ ACE_IPC_SAP::dump (void) const
ACE_TRACE ("ACE_IPC_SAP::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("handle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\npid_ = %d"), this->pid_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d"), this->pid_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/LSOCK.cpp b/ace/LSOCK.cpp
index ce2964bc462..a83e7e86a77 100644
--- a/ace/LSOCK.cpp
+++ b/ace/LSOCK.cpp
@@ -18,7 +18,7 @@ ACE_LSOCK::dump (void) const
ACE_TRACE ("ACE_LSOCK::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("aux_handle_ = %d"), this->aux_handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/LSOCK_CODgram.cpp b/ace/LSOCK_CODgram.cpp
index 0cfbf0ee624..b43674eb3af 100644
--- a/ace/LSOCK_CODgram.cpp
+++ b/ace/LSOCK_CODgram.cpp
@@ -50,6 +50,6 @@ ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (const ACE_Addr &remote,
ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram");
if (this->open (remote, local, protocol_family,
protocol) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_LSOCK_CODgram")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_LSOCK_CODgram")));
}
#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_Connector.cpp b/ace/LSOCK_Connector.cpp
index a2598a00919..c329d6e6620 100644
--- a/ace/LSOCK_Connector.cpp
+++ b/ace/LSOCK_Connector.cpp
@@ -19,7 +19,7 @@ ACE_LSOCK_Connector::dump (void) const
ACE_TRACE ("ACE_LSOCK_Connector::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/LSOCK_Dgram.cpp b/ace/LSOCK_Dgram.cpp
index 5db3681ed31..d30a5ab7537 100644
--- a/ace/LSOCK_Dgram.cpp
+++ b/ace/LSOCK_Dgram.cpp
@@ -57,8 +57,8 @@ ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local,
protocol_family,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_LSOCK_Dgram")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_LSOCK_Dgram")));
}
#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp
index 1081904dcb7..6c96d4afece 100644
--- a/ace/Local_Name_Space.cpp
+++ b/ace/Local_Name_Space.cpp
@@ -7,6 +7,8 @@
#include "ace/ACE.h"
#include "ace/Local_Name_Space.h"
+#if defined (ACE_HAS_WCHAR)
+
ACE_RCSID(ace, Local_Name_Space, "$Id$")
ACE_USHORT16 *
@@ -209,4 +211,6 @@ template class ACE_Write_Guard<ACE_RW_Process_Mutex>;
#pragma instantiate ACE_Write_Guard<ACE_RW_Process_Mutex>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#endif /* ACE_HAS_WCHAR */
+
#endif /* ACE_LOCAL_NAME_SPACE_C */
diff --git a/ace/Local_Name_Space.h b/ace/Local_Name_Space.h
index edf83a69771..a8e33d991fe 100644
--- a/ace/Local_Name_Space.h
+++ b/ace/Local_Name_Space.h
@@ -26,6 +26,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if defined (ACE_HAS_WCHAR)
+
#include "ace/Containers.h"
#include "ace/Malloc_T.h"
#include "ace/Synch.h"
@@ -118,5 +120,7 @@ private:
// Include the ACE_Local_Name_Space templates stuff at this point.
#include "ace/Local_Name_Space_T.h"
+#endif /* ACE_HAS_WCHAR */
+
#include "ace/post.h"
#endif /* ACE_LOCAL_NAME_SPACE_H */
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp
index dae65d5e7bd..73ea45d9a03 100644
--- a/ace/Local_Name_Space_T.cpp
+++ b/ace/Local_Name_Space_T.cpp
@@ -346,7 +346,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Local_Name_Space (ACE_Naming
{
ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space");
if (this->open (scope_in) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Local_Name_Space::ACE_Local_Name_Space")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Local_Name_Space::ACE_Local_Name_Space")));
}
template <ACE_MEM_POOL_1, class ACE_LOCK>
@@ -382,8 +382,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
{
ACE_TRACE ("ACE_Local_Name_Space::create_manager");
// Get directory name
- LPCTSTR dir = this->name_options_->namespace_dir ();
- LPCTSTR database = this->name_options_->database ();
+ const ACE_ACE_TCHAR *dir = this->name_options_->namespace_dir ();
+ const ACE_ACE_TCHAR *database = this->name_options_->database ();
// Use process name as the file name.
size_t len = ACE_OS::strlen (dir);
@@ -410,12 +410,12 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
ACE_CHORUS_LOCAL_NAME_SPACE_T_SIZE);
#endif /* CHORUS */
- TCHAR lock_name_for_local_name_space [MAXNAMELEN + MAXPATHLEN];
- TCHAR lock_name_for_backing_store [MAXPATHLEN + MAXNAMELEN];
- LPCTSTR postfix = database;
+ ACE_TCHAR lock_name_for_local_name_space [MAXNAMELEN + MAXPATHLEN];
+ ACE_TCHAR lock_name_for_backing_store [MAXPATHLEN + MAXNAMELEN];
+ const ACE_ACE_TCHAR *postfix = database;
size_t length = 0;
- length = sizeof lock_name_for_local_name_space / sizeof (TCHAR);
+ length = sizeof lock_name_for_local_name_space / sizeof (ACE_TCHAR);
ACE_OS::strncpy (lock_name_for_local_name_space,
ACE_TEXT ("name_space_"),
length);
@@ -423,7 +423,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
postfix,
length - ACE_OS::strlen (ACE_TEXT ("name_space_")));
- length = sizeof lock_name_for_backing_store / sizeof (TCHAR);
+ length = sizeof lock_name_for_backing_store / sizeof (ACE_TCHAR);
ACE_OS::strncpy (lock_name_for_backing_store,
ACE_TEXT ("backing_store_"),
length);
@@ -439,7 +439,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
if (ACE_LOG_MSG->op_status ())
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Allocator::Allocator\n")),
+ ACE_TEXT ("Allocator::Allocator\n")),
-1);
ACE_NEW_RETURN (this->lock_,
@@ -450,7 +450,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
// Now check if the backing store has been created successfully
if (ACE_OS::access (this->context_file_, F_OK) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("create_manager\n")),
+ ACE_TEXT ("create_manager\n")),
-1);
#endif /* ACE_LACKS_ACCESS */
@@ -462,7 +462,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
{
this->name_space_map_ = (ACE_Name_Space_Map <ALLOCATOR> *) ns_map;
if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
this->name_space_map_, ns_map));
}
@@ -478,7 +478,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
{
this->name_space_map_ = (ACE_Name_Space_Map <ALLOCATOR> *) ns_map;
if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
this->name_space_map_, ns_map));
}
else
@@ -493,11 +493,11 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
if (this->allocator_->bind (ACE_NAME_SERVER_MAP, ns_map) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("create_manager\n")), -1);
+ ACE_TEXT ("create_manager\n")), -1);
}
if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
this->name_space_map_, ns_map));
}
@@ -770,7 +770,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::dump_i (void) const
const char *type = map_entry->int_id_.type ();
#endif /* ! ACE_NLOGGING */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("key=%s\nvalue=%s\ntype=%s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key=%s\nvalue=%s\ntype=%s\n"),
key, value, type));
// We need to delete key and value since char_rep allocates memory for them
delete [] key;
diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h
index 8ca7aa10392..bbf6255c461 100644
--- a/ace/Local_Name_Space_T.h
+++ b/ace/Local_Name_Space_T.h
@@ -26,6 +26,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if defined (ACE_HAS_WCHAR)
+
#include "ace/Naming_Context.h"
#include "ace/SString.h"
#include "ace/Local_Name_Space.h"
@@ -235,7 +237,7 @@ private:
ACE_Name_Options *name_options_;
// Keep track of the options such as database name etc
- TCHAR context_file_[MAXPATHLEN + MAXNAMELEN];
+ ACE_TCHAR context_file_[MAXPATHLEN + MAXNAMELEN];
// Name of the file used as the backing store.
ACE_LOCK *lock_;
@@ -250,5 +252,7 @@ private:
#pragma implementation ("Local_Name_Space_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+#endif /* ACE_HAS_WCHAR */
+
#include "ace/post.h"
#endif /* ACE_LOCAL_NAME_SPACE_T_H */
diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp
index c8b3f39efa2..e1f47c3e760 100644
--- a/ace/Local_Tokens.cpp
+++ b/ace/Local_Tokens.cpp
@@ -16,11 +16,11 @@ 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")
- ASYS_TEXT (" reference_cont_ = %d\n")
- ASYS_TEXT (" token_name_ = %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Tokens::dump:\n")
+ ACE_TEXT (" reference_cont_ = %d\n")
+ ACE_TEXT (" token_name_ = %s\n"),
reference_count_, token_name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiters_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiters_\n")));
this->waiters_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -55,24 +55,24 @@ ACE_TPQ_Entry::dump (void) const
ACE_TRACE ("ACE_TPQ_Entry::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("ACE_TPQ_Entry::dump:\n")
- ASYS_TEXT (" nesting_level_ = %d\n")
- ASYS_TEXT (" client_id_ = %s\n"),
+ ACE_TEXT ("ACE_TPQ_Entry::dump:\n")
+ ACE_TEXT (" nesting_level_ = %d\n")
+ ACE_TEXT (" client_id_ = %s\n"),
nesting_level_,
client_id_));
if (next_ != 0)
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("next:.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next:.\n")));
next_->dump ();
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TPQ_Entry::dump end.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Entry::dump end.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
- const ASYS_TCHAR *client_id)
+ const ACE_TCHAR *client_id)
: cond_var_ (lock_),
next_ (0),
// This const typecast is safe.
@@ -87,12 +87,12 @@ ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
else
{
// Just make sure we have enough space.
- ASYS_TCHAR host_name[MAXHOSTNAMELEN];
- ASYS_TCHAR name[(sizeof host_name / sizeof (ASYS_TCHAR)) + 256];
+ ACE_TCHAR host_name[MAXHOSTNAMELEN];
+ ACE_TCHAR name[(sizeof host_name / sizeof (ACE_TCHAR)) + 256];
ACE_OS::hostname (host_name, sizeof host_name);
ACE_OS::sprintf (name,
- ASYS_TEXT ("/%s/%u/%lu"),
+ ACE_TEXT ("/%s/%u/%lu"),
host_name,
ACE_static_cast (unsigned int, ACE_OS::getpid ()),
ACE_Thread::self ());
@@ -135,7 +135,7 @@ ACE_TPQ_Entry::operator= (const ACE_TPQ_Entry& rhs)
}
void
-ACE_TPQ_Entry::client_id (const ASYS_TCHAR *id)
+ACE_TPQ_Entry::client_id (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_TPQ_Entry::client_id");
@@ -147,7 +147,7 @@ ACE_TPQ_Entry::client_id (const ASYS_TCHAR *id)
if (n >= ACE_MAXCLIENTIDLEN)
n = ACE_MAXCLIENTIDLEN - 1;
- ACE_OS::strncpy (this->client_id_, (ASYS_TCHAR *) id, n);
+ ACE_OS::strncpy (this->client_id_, (ACE_TCHAR *) id, n);
this->client_id_[ACE_MAXCLIENTIDLEN - 1] = '\0';
}
@@ -161,17 +161,17 @@ ACE_TSS_TPQ_Entry::dump (void) const
(char *) " client_id_ = %s\n",
(char *) client_id_ == 0 ? (char *) "0" : (char *) client_id_));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TSS_TPQ_Entry::dump:\n")
- ASYS_TEXT (" client_id_ = %s\n"),
- client_id_ == 0 ? ASYS_TEXT ("0") : client_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_TPQ_Entry::dump:\n")
+ ACE_TEXT (" client_id_ = %s\n"),
+ client_id_ == 0 ? ACE_TEXT ("0") : client_id_));
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_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 ASYS_TCHAR *client_id)
+ const ACE_TCHAR *client_id)
: proxy_ (proxy),
client_id_ (client_id)
{
@@ -244,10 +244,10 @@ 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")
- ASYS_TEXT (" current_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Iterator::dump:\n")
+ ACE_TEXT (" current_ = %d\n"),
(long) this->current_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("head_ and tail_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -256,14 +256,14 @@ 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")
- ASYS_TEXT (" size_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump:\n")
+ ACE_TEXT (" size_ = %d\n"),
size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("head_ and tail_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n")));
if (this->head_ != 0)
this->head_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Proxy_Queue::dump end.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump end.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -345,13 +345,13 @@ ACE_Token_Proxy_Queue::dequeue (void)
if (this->head_ == 0 && this->size_ != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("incorrect size = %d\n"),
+ ACE_TEXT ("incorrect size = %d\n"),
this->size_));
}
/*
int
-ACE_Token_Proxy_Queue::member (const ASYS_TCHAR *id)
+ACE_Token_Proxy_Queue::member (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_Token_Proxy_Queue::member");
@@ -418,16 +418,16 @@ ACE_Mutex_Token::dump (void) const
{
ACE_TRACE ("ACE_Mutex_Token::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Mutex_Token::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("lock_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Tokens::dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Mutex_Token::dump end.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump end.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_Mutex_Token::ACE_Mutex_Token (const ASYS_TCHAR *name)
+ACE_Mutex_Token::ACE_Mutex_Token (const ACE_TCHAR *name)
{
ACE_TRACE ("ACE_Mutex_Token::ACE_Mutex_Token");
@@ -599,7 +599,7 @@ ACE_Mutex_Token::release (ACE_TPQ_Entry *caller)
int
ACE_Mutex_Token::owners (OWNER_STACK &stack,
- const ASYS_TCHAR *id)
+ const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::owners");
if (this->owner () != 0)
@@ -615,7 +615,7 @@ ACE_Mutex_Token::owners (OWNER_STACK &stack,
}
int
-ACE_Mutex_Token::is_waiting_for (const ASYS_TCHAR *id)
+ACE_Mutex_Token::is_waiting_for (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_waiting_for");
// If there is no owner, or <id> is the owner, return false.
@@ -637,7 +637,7 @@ ACE_Mutex_Token::is_waiting_for (const ASYS_TCHAR *id)
}
int
-ACE_Mutex_Token::is_owner (const ASYS_TCHAR *id)
+ACE_Mutex_Token::is_owner (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_owner");
// If there is an owner, return whether it is <id>.
@@ -653,17 +653,17 @@ 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")
- ASYS_TEXT ("num_writers_ = %d\n"), num_writers_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("lock_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump:\n")
+ ACE_TEXT ("num_writers_ = %d\n"), num_writers_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Tokens::dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_RW_Token::dump end.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump end.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_RW_Token::ACE_RW_Token (const ASYS_TCHAR *name)
+ACE_RW_Token::ACE_RW_Token (const ACE_TCHAR *name)
: num_writers_ (0)
{
ACE_TRACE ("ACE_RW_Token::ACE_RW_Token");
@@ -931,7 +931,7 @@ ACE_RW_Token::notify_new_owner (ACE_TPQ_Entry *old_owner)
int
ACE_RW_Token::owners (OWNER_STACK &stack,
- const ASYS_TCHAR *id)
+ const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_RW_Token::owners");
@@ -975,7 +975,7 @@ ACE_RW_Token::owners (OWNER_STACK &stack,
}
int
-ACE_RW_Token::is_waiting_for (const ASYS_TCHAR *id)
+ACE_RW_Token::is_waiting_for (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_RW_Token::is_waiting_for");
// If there is no owner, or <id> is the owner, return false.
@@ -998,7 +998,7 @@ ACE_RW_Token::is_waiting_for (const ASYS_TCHAR *id)
}
int
-ACE_RW_Token::is_owner (const ASYS_TCHAR *id)
+ACE_RW_Token::is_owner (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_Mutex_Token::is_owner");
// If there is no owner, return false.
@@ -1031,22 +1031,22 @@ 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")
- ASYS_TEXT (" type = %d\n")
- ASYS_TEXT (" ignore_deadlock_ = %d\n")
- ASYS_TEXT (" debug_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump:\n")
+ ACE_TEXT (" type = %d\n")
+ ACE_TEXT (" ignore_deadlock_ = %d\n")
+ ACE_TEXT (" debug_ = %d\n"),
(int) this->type (), ignore_deadlock_, debug_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("mutex_, and waiter_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_, and waiter_\n")));
if (this->token_ != 0)
this->token_->dump ();
this->waiter_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Proxy::dump end.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump end.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Token_Proxy::client_id (void) const
{
ACE_TRACE ("ACE_Token_Proxy::client_id");
@@ -1055,29 +1055,29 @@ ACE_Token_Proxy::client_id (void) const
ACE_const_cast (ACE_Token_Proxy *, this);
const ACE_TPQ_Entry *temp =
nc_this->waiter_.operator->();
- const ASYS_TCHAR *id = temp->client_id ();
+ const ACE_TCHAR *id = temp->client_id ();
if (id == 0)
- return ASYS_TEXT ("ERROR NO CLIENT ID");
+ return ACE_TEXT ("ERROR NO CLIENT ID");
else
return id;
}
void
-ACE_Token_Proxy::client_id (const ASYS_TCHAR *client_id)
+ACE_Token_Proxy::client_id (const ACE_TCHAR *client_id)
{
ACE_TRACE ("ACE_Token_Proxy::client_id");
this->waiter_->client_id (client_id);
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Token_Proxy::owner_id (void)
{
ACE_TRACE ("ACE_Token_Proxy::owner_id");
return this->token_->owner_id ();
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Token_Proxy::name (void) const
{
ACE_TRACE ("ACE_Token_Proxy::owner_id");
@@ -1114,7 +1114,7 @@ ACE_Token_Proxy::~ACE_Token_Proxy (void)
}
int
-ACE_Token_Proxy::open (const ASYS_TCHAR *token_name,
+ACE_Token_Proxy::open (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -1125,12 +1125,12 @@ ACE_Token_Proxy::open (const ASYS_TCHAR *token_name,
this->debug_ = debug;
// Used in case a name was not specified.
- ASYS_TCHAR name[BUFSIZ];
+ ACE_TCHAR name[BUFSIZ];
// We must have a name.
if (token_name == 0)
{
- ACE_OS::sprintf (name, ASYS_TEXT ("token %lx"),
+ ACE_OS::sprintf (name, ACE_TEXT ("token %lx"),
ACE_reinterpret_cast (long, this));
token_name = name;
}
@@ -1143,7 +1143,7 @@ ACE_Token_Proxy::open (const ASYS_TCHAR *token_name,
if (this->token_ == 0)
{
errno = ENOMEM;
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Can't allocate mutex")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Can't allocate mutex")), -1);
}
return 0;
@@ -1158,7 +1158,7 @@ ACE_Token_Proxy::acquire (int notify,
if (this->token_ == 0)
{
errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Not open.\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Not open.\n")), -1);
}
// Make sure no one calls our token_acquired until we have a chance
@@ -1188,8 +1188,8 @@ ACE_Token_Proxy::acquire (int notify,
case EWOULDBLOCK :
if (this->debug_)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%t) waiting for %s, owner is %s, ")
- ASYS_TEXT ("total waiters == %d\n"),
+ ACE_TEXT ("(%t) waiting for %s, owner is %s, ")
+ ACE_TEXT ("total waiters == %d\n"),
this->name (),
this->token_->owner_id (),
token_->no_of_waiters ()));
@@ -1209,8 +1209,8 @@ ACE_Token_Proxy::acquire (int notify,
default :
waiter_->cond_var_.mutex ().release ();
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("Token Proxy acquire.")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Token Proxy acquire.")),
-1);
}
}
@@ -1219,7 +1219,7 @@ ACE_Token_Proxy::acquire (int notify,
{
if (debug_)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%t) acquired %s\n"),
+ ACE_TEXT ("(%t) acquired %s\n"),
this->name ()));
waiter_->cond_var_.mutex ().release ();
}
@@ -1235,7 +1235,7 @@ ACE_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
{
errno = ENOENT;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Not open.\n")),
+ ACE_TEXT ("Not open.\n")),
-1);
}
@@ -1253,7 +1253,7 @@ ACE_Token_Proxy::renew (int requeue_position,
{
errno = ENOENT;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Not open.\n")),
+ ACE_TEXT ("Not open.\n")),
-1);
}
@@ -1266,10 +1266,10 @@ ACE_Token_Proxy::renew (int requeue_position,
// check for error
if (errno != EWOULDBLOCK)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p renew failed\n"), ASYS_TEXT ("ACE_Token_Proxy")), -1);
+ ACE_TEXT ("%p renew failed\n"), ACE_TEXT ("ACE_Token_Proxy")), -1);
if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) renew blocking for %s, owner is %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renew blocking for %s, owner is %s\n"),
this->name (),
token_->owner_id ()));
@@ -1280,7 +1280,7 @@ ACE_Token_Proxy::renew (int requeue_position,
// we have the token
{
if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) renewed %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renewed %s\n"),
this->name ()));
waiter_->cond_var_.mutex ().release ();
return 0;
@@ -1315,12 +1315,12 @@ 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, ASYS_TEXT ("condition variable wait")
- ASYS_TEXT (" bombed.")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("condition variable wait")
+ ACE_TEXT (" bombed.")), -1);
}
if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) unblocking.\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) unblocking.\n"),
this->client_id ()));
cv.mutex ().release ();
return 0; // operation succeeded
@@ -1336,7 +1336,7 @@ ACE_Token_Proxy::release (ACE_Synch_Options &)
{
errno = ENOENT;
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Must open before releasing.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Must open before releasing.\n")));
ACE_RETURN (-1);
}
@@ -1345,13 +1345,13 @@ 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"), ASYS_TEXT ("release failed")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %p.\n"), ACE_TEXT ("release failed")));
return -1;
}
else
{
if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) released %s, owner is %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) released %s, owner is %s\n"),
this->name (),
token_->owner_id ()));
@@ -1389,7 +1389,7 @@ ACE_Token_Proxy::token_acquired (ACE_TPQ_Entry *e)
return;
}
-ACE_Token_Name::ACE_Token_Name (const ASYS_TCHAR *token_name)
+ACE_Token_Name::ACE_Token_Name (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Name::ACE_Token_Name");
this->name (token_name);
@@ -1416,9 +1416,9 @@ ACE_Token_Name::dump (void) const
(char *) " token_name_ = %s\n",
(char *) token_name_ == 0 ? (char *) "no name" : (char *) token_name_));
#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Name::dump:\n")
- ASYS_TEXT (" token_name_ = %s\n"),
- token_name_ == 0 ? ASYS_TEXT ("no name") : token_name_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Name::dump:\n")
+ ACE_TEXT (" token_name_ = %s\n"),
+ token_name_ == 0 ? ACE_TEXT ("no name") : token_name_));
#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
index 2706f075d73..f63eb1c0794 100644
--- a/ace/Local_Tokens.h
+++ b/ace/Local_Tokens.h
@@ -104,7 +104,7 @@ public:
// Null constructor.
ACE_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ASYS_TCHAR *client_id);
+ const ACE_TCHAR *client_id);
// Construction.
ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs);
@@ -125,10 +125,10 @@ public:
void nesting_level (int delta);
// = Set/get client_id of the entry.
- const ASYS_TCHAR *client_id (void) const;
- void client_id (const ASYS_TCHAR *);
+ const ACE_TCHAR *client_id (void) const;
+ void client_id (const ACE_TCHAR *);
- int equal_client_id (const ASYS_TCHAR *id);
+ int equal_client_id (const ACE_TCHAR *id);
// Returns 1 if <id> == client id. Does not check for <id> == 0.
void set (void (*sleep_hook)(void *));
@@ -168,7 +168,7 @@ private:
void *arg_;
// Arg.
- ASYS_TCHAR client_id_[ACE_MAXCLIENTIDLEN];
+ ACE_TCHAR client_id_[ACE_MAXCLIENTIDLEN];
// Client id.
void (*sleep_hook_)(void *);
@@ -191,7 +191,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 ASYS_TCHAR *client_id);
+ const ACE_TCHAR *client_id);
// These are passed to the constructor of ACE_TPQ_Entry in
// make_TSS_TYPE
@@ -223,7 +223,7 @@ private:
// make_TSS_TYPE
const ACE_Token_Proxy *proxy_;
// Proxy.
- const ASYS_TCHAR *client_id_;
+ const ACE_TCHAR *client_id_;
// Client_id.
};
@@ -294,7 +294,7 @@ public:
const ACE_TPQ_Entry* head (void);
// Top of the queue.
-// int member (const ASYS_TCHAR *id);
+// int member (const ACE_TCHAR *id);
// Is this id in the waiter list?
void dequeue (void);
@@ -374,14 +374,14 @@ public:
typedef ACE_Unbounded_Stack<ACE_TPQ_Entry *> OWNER_STACK;
// Stack of owners.
- virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id) = 0;
+ virtual int owners (OWNER_STACK &o, const ACE_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 ASYS_TCHAR *id) = 0;
+ virtual int is_waiting_for (const ACE_TCHAR *id) = 0;
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const ASYS_TCHAR *id) = 0;
+ virtual int is_owner (const ACE_TCHAR *id) = 0;
// Returns 1 if <id> is an owner of this token. 0 otherwise.
virtual ACE_Token_Proxy_Queue *waiters (void);
@@ -391,10 +391,10 @@ public:
// Return the number of proxies that are currently waiting to get
// the token.
- const ASYS_TCHAR *owner_id (void);
+ const ACE_TCHAR *owner_id (void);
// The current owner.
- const ASYS_TCHAR* name (void);
+ const ACE_TCHAR* name (void);
// Token name.
// = Reference counting. These are only called by the
@@ -438,7 +438,7 @@ protected:
ACE_Token_Proxy_Queue waiters_;
// List of client's owning and waiting the token.
- ASYS_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
+ ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
// Name of token.
};
@@ -462,7 +462,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 ASYS_TCHAR* name);
+ ACE_Mutex_Token (const ACE_TCHAR* name);
// life
virtual ~ACE_Mutex_Token (void);
@@ -517,14 +517,14 @@ public:
virtual int type (void) const;
// Returns ACE_Tokens::MUTEX.
- virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id);
+ virtual int owners (OWNER_STACK &o, const ACE_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 ASYS_TCHAR *id);
+ virtual int is_waiting_for (const ACE_TCHAR *id);
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const ASYS_TCHAR *id);
+ virtual int is_owner (const ACE_TCHAR *id);
// Returns 1 if <id> is an owner of this token. 0 otherwise.
private:
@@ -550,7 +550,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 ASYS_TCHAR* name);
+ ACE_RW_Token (const ACE_TCHAR* name);
// Life.
virtual ~ACE_RW_Token (void);
@@ -608,14 +608,14 @@ public:
virtual int type (void) const;
// Returns READER or WRITER.
- virtual int owners (OWNER_STACK &o, const ASYS_TCHAR *id);
+ virtual int owners (OWNER_STACK &o, const ACE_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 ASYS_TCHAR *id);
+ virtual int is_waiting_for (const ACE_TCHAR *id);
// Returns 1 if <id> is waiting for this token. 0 otherwise.
- virtual int is_owner (const ASYS_TCHAR *id);
+ virtual int is_owner (const ACE_TCHAR *id);
// Returns 1 if <id> is an owner of this token. 0 otherwise.
protected:
@@ -642,7 +642,7 @@ class ACE_Export ACE_Token_Name
// needed. For instance, we may choose to identify tokens by
// name and *type* in the future.
public:
- ACE_Token_Name (const ASYS_TCHAR *token_name = 0);
+ ACE_Token_Name (const ACE_TCHAR *token_name = 0);
// Construction.
ACE_Token_Name (const ACE_Token_Name &rhs);
@@ -657,17 +657,17 @@ public:
int operator== (const ACE_Token_Name &rhs) const;
// Comparison.
- const ASYS_TCHAR *name (void) const;
+ const ACE_TCHAR *name (void) const;
// Token name.
- void name (const ASYS_TCHAR *new_name);
+ void name (const ACE_TCHAR *new_name);
// Token name.
void dump (void) const;
// Dump the state of the class.
private:
- ASYS_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
+ ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
// Name of the token.
};
@@ -710,7 +710,7 @@ public:
virtual ~ACE_Token_Proxy (void);
// Death.
- virtual int open (const ASYS_TCHAR *name,
+ virtual int open (const ACE_TCHAR *name,
int ignore_deadlock = 0,
int debug = 0);
// <name> is the string uniquely identifying the token.
@@ -772,16 +772,16 @@ public:
// = Utility methods.
- virtual const ASYS_TCHAR *client_id (void) const;
+ virtual const ACE_TCHAR *client_id (void) const;
// Get the client id of the proxy. This is implemented as
// thread-specific data.
- virtual void client_id (const ASYS_TCHAR *client_id);
+ virtual void client_id (const ACE_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 ASYS_TCHAR *name (void) const;
+ virtual const ACE_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
@@ -798,7 +798,7 @@ public:
// This is called when a queued (waiting) proxy is removed from the
// waiters list and given the token.
- virtual const ASYS_TCHAR *owner_id (void);
+ virtual const ACE_TCHAR *owner_id (void);
// the client id of the current token holder
virtual ACE_Token_Proxy *clone (void) const = 0;
@@ -834,7 +834,7 @@ protected:
ACE_TSS_TPQ_Entry waiter_;
// Waiter info used for asynchronous transactions.
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name) = 0;
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name) = 0;
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
};
@@ -882,7 +882,7 @@ public:
void dump (void) const;
// Dump the state of the class.
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *) { return 0; }
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *) { return 0; }
// Do not allow the Token Manager to create us.
};
@@ -907,7 +907,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 ASYS_TCHAR *token_name = 0,
+ ACE_Local_Mutex (const ACE_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -924,7 +924,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
@@ -957,7 +957,7 @@ class ACE_Export ACE_Local_RLock : public ACE_Token_Proxy
public:
// = Initialization and termination.
- ACE_Local_RLock (const ASYS_TCHAR *token_name = 0,
+ ACE_Local_RLock (const ACE_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -977,7 +977,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
@@ -1010,7 +1010,7 @@ class ACE_Export ACE_Local_WLock : public ACE_Token_Proxy
public:
// = Initialization and termination.
- ACE_Local_WLock (const ASYS_TCHAR *token_name = 0,
+ ACE_Local_WLock (const ACE_TCHAR *token_name = 0,
int ignore_deadlock = 0,
int debug = 0);
// <token_name> uniquely id's the token.
@@ -1030,7 +1030,7 @@ public:
// Return deep copy.
protected:
- ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ ACE_Tokens *create_token (const ACE_TCHAR *name);
// Return a new ACE_Local_Mutex.
};
diff --git a/ace/Local_Tokens.i b/ace/Local_Tokens.i
index 676b0e58cf3..0434936ab9c 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 ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_TPQ_Entry::client_id (void) const
{
ACE_TRACE ("ACE_TPQ_Entry::client_id");
@@ -121,7 +121,7 @@ ACE_Tokens::dec_reference (void)
ACE_TRACE ("ACE_Tokens::dec_reference");
if (this->reference_count_ == 0)
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("dec_reference already zero")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("dec_reference already zero")));
return 0;
}
@@ -184,17 +184,17 @@ ACE_Tokens::owner (void)
return (ACE_TPQ_Entry *) this->waiters_.head ();
}
-ACE_INLINE const ASYS_TCHAR*
+ACE_INLINE const ACE_TCHAR*
ACE_Tokens::owner_id ()
{
ACE_TRACE ("ACE_Tokens::owner_id");
if (this->owner () == 0)
- return ASYS_TEXT ("no owner");
+ return ACE_TEXT ("no owner");
else
return this->owner ()->client_id ();
}
-ACE_INLINE const ASYS_TCHAR*
+ACE_INLINE const ACE_TCHAR*
ACE_Tokens::name (void)
{
ACE_TRACE ("ACE_Tokens::name");
@@ -277,7 +277,7 @@ ACE_TPQ_Entry::call_sleep_hook (void)
}
ACE_INLINE int
-ACE_TPQ_Entry::equal_client_id (const ASYS_TCHAR *id)
+ACE_TPQ_Entry::equal_client_id (const ACE_TCHAR *id)
{
ACE_TRACE ("ACE_TPQ_Entry::equal_client_id");
return (ACE_OS::strcmp (this->client_id (), id) == 0);
@@ -288,7 +288,7 @@ ACE_TPQ_Entry::equal_client_id (const ASYS_TCHAR *id)
// ************************************************************
ACE_INLINE
-ACE_Local_Mutex::ACE_Local_Mutex (const ASYS_TCHAR *token_name,
+ACE_Local_Mutex::ACE_Local_Mutex (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -297,22 +297,22 @@ ACE_Local_Mutex::ACE_Local_Mutex (const ASYS_TCHAR *token_name,
}
ACE_INLINE void
-ACE_Token_Name::name (const ASYS_TCHAR *new_name)
+ACE_Token_Name::name (const ACE_TCHAR *new_name)
{
ACE_TRACE ("ACE_Token_Name::name");
if (new_name == 0)
- new_name = ASYS_TEXT ("no name");
+ new_name = ACE_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_, (ASYS_TCHAR *) new_name, n);
+ ACE_OS::strncpy (this->token_name_, (ACE_TCHAR *) new_name, n);
}
-ACE_INLINE const ASYS_TCHAR*
+ACE_INLINE const ACE_TCHAR*
ACE_Token_Name::name (void) const
{
ACE_TRACE ("ACE_Token_Name::name");
@@ -328,7 +328,7 @@ ACE_Local_Mutex::clone (void) const
}
ACE_INLINE ACE_Tokens *
-ACE_Local_Mutex::create_token (const ASYS_TCHAR *name)
+ACE_Local_Mutex::create_token (const ACE_TCHAR *name)
{
return new ACE_Mutex_Token (name);
}
@@ -341,7 +341,7 @@ ACE_Local_Mutex::~ACE_Local_Mutex (void)
// ************************************************************
ACE_INLINE
-ACE_Local_RLock::ACE_Local_RLock (const ASYS_TCHAR *token_name,
+ACE_Local_RLock::ACE_Local_RLock (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -355,7 +355,7 @@ ACE_Local_RLock::~ACE_Local_RLock (void)
}
ACE_INLINE ACE_Tokens *
-ACE_Local_RLock::create_token (const ASYS_TCHAR *name)
+ACE_Local_RLock::create_token (const ACE_TCHAR *name)
{
return new ACE_RW_Token (name);
}
@@ -377,7 +377,7 @@ ACE_Local_RLock::clone (void) const
// ************************************************************
ACE_INLINE
-ACE_Local_WLock::ACE_Local_WLock (const ASYS_TCHAR *token_name,
+ACE_Local_WLock::ACE_Local_WLock (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -391,7 +391,7 @@ ACE_Local_WLock::~ACE_Local_WLock (void)
}
ACE_INLINE ACE_Tokens *
-ACE_Local_WLock::create_token (const ASYS_TCHAR *name)
+ACE_Local_WLock::create_token (const ACE_TCHAR *name)
{
return new ACE_RW_Token (name);
}
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 56818bbc48e..35da0deea05 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -325,10 +325,10 @@ ACE_Log_Msg::disable_debug_messages (ACE_Log_Priority priority)
}
// Name of the local host.
-const ASYS_TCHAR *ACE_Log_Msg::local_host_ = 0;
+const ACE_TCHAR *ACE_Log_Msg::local_host_ = 0;
// Records the program name.
-const ASYS_TCHAR *ACE_Log_Msg::program_name_ = 0;
+const ACE_TCHAR *ACE_Log_Msg::program_name_ = 0;
// Default is to use stderr.
u_long ACE_Log_Msg::flags_ = ACE_Log_Msg::STDERR;
@@ -370,7 +370,7 @@ ACE_Log_Msg::close (void)
// Call after a fork to resynchronize the PID and PROGRAM_NAME
// variables.
void
-ACE_Log_Msg::sync (const ASYS_TCHAR *prog_name)
+ACE_Log_Msg::sync (const ACE_TCHAR *prog_name)
{
ACE_TRACE ("ACE_Log_Msg::sync");
@@ -572,9 +572,9 @@ ACE_Log_Msg::~ACE_Log_Msg (void)
// Open the sender-side of the message queue.
int
-ACE_Log_Msg::open (const ASYS_TCHAR *prog_name,
+ACE_Log_Msg::open (const ACE_TCHAR *prog_name,
u_long flags,
- LPCTSTR logger_key)
+ const ACE_TCHAR *logger_key)
{
ACE_TRACE ("ACE_Log_Msg::open");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
@@ -624,7 +624,7 @@ ACE_Log_Msg::open (const ASYS_TCHAR *prog_name,
{
ACE_LOG_MSG_IPC_CONNECTOR con;
status = con.connect (*ACE_Log_Msg_Manager::message_queue_,
- ACE_LOG_MSG_IPC_ADDR (ASYS_MULTIBYTE_STRING (logger_key)));
+ ACE_LOG_MSG_IPC_ADDR (logger_key));
}
if (status == -1)
@@ -708,7 +708,7 @@ ACE_Log_Msg::open (const ASYS_TCHAR *prog_name,
ssize_t
ACE_Log_Msg::log (ACE_Log_Priority log_priority,
- const ASYS_TCHAR *format_str, ...)
+ const ACE_TCHAR *format_str, ...)
{
ACE_TRACE ("ACE_Log_Msg::log");
@@ -726,7 +726,7 @@ ACE_Log_Msg::log (ACE_Log_Priority log_priority,
}
ssize_t
-ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
+ACE_Log_Msg::log (const ACE_TCHAR *format_str,
ACE_Log_Priority log_priority,
va_list argp)
{
@@ -751,12 +751,12 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
ACE_Log_Record log_record (log_priority,
ACE_OS::gettimeofday (),
this->getpid ());
- ASYS_TCHAR *bp = ACE_const_cast (ASYS_TCHAR *, this->msg ());
+ ACE_TCHAR *bp = ACE_const_cast (ACE_TCHAR *, this->msg ());
int abort_prog = 0;
int exit_value = 0;
- ASYS_TCHAR *format;
+ ACE_TCHAR *format;
ACE_ALLOCATOR_RETURN (format, ACE_OS::strdup (format_str), -1);
- ASYS_TCHAR *save_p = format; // Remember pointer for ACE_OS::free()
+ ACE_TCHAR *save_p = format; // Remember pointer for ACE_OS::free()
if (format == 0)
return -1;
@@ -767,7 +767,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
if (ACE_Log_Msg::program_name_ != 0)
{
- for (const ASYS_TCHAR *s = ACE_Log_Msg::program_name_;
+ for (const ACE_TCHAR *s = ACE_Log_Msg::program_name_;
(*bp = *s) != '\0';
s++)
bp++;
@@ -790,8 +790,8 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
}
else
{
- ASYS_TCHAR c = '\0'; // high use character
- ASYS_TCHAR *fp; // local format pointer
+ ACE_TCHAR c = '\0'; // high use character
+ ACE_TCHAR *fp; // local format pointer
int wpc; // width/precision cnt
const int CONTINUE = 0;
const int SKIP_SPRINTF = -1; // We must skip the sprintf phase
@@ -817,10 +817,10 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
{
#if defined (ACE_LACKS_FLOATING_POINT)
ACE_UINT32 value = va_arg (argp, ACE_UINT32);
- ACE_OS::sprintf (bp, ASYS_TEXT ("%ld"), value);
+ ACE_OS::sprintf (bp, ACE_TEXT ("%ld"), value);
#else
double value = va_arg (argp, double);
- ACE_OS::sprintf (bp, ASYS_TEXT ("%f"), value);
+ ACE_OS::sprintf (bp, ACE_TEXT ("%f"), value);
#endif /* ACE_LACKS_FLOATING_POINT */
}
break;
@@ -828,20 +828,20 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
type = SKIP_SPRINTF;
abort_prog = 1;
exit_value = va_arg (argp, int);
- ACE_OS::sprintf (bp, ASYS_TEXT ("Aborting..."));
+ ACE_OS::sprintf (bp, ACE_TEXT ("Aborting..."));
// Make sure to NULL terminate this...
break;
case 'l':
- ACE_OS::sprintf (bp, ASYS_TEXT ("%d"), this->linenum ());
+ ACE_OS::sprintf (bp, ACE_TEXT ("%d"), this->linenum ());
type = SKIP_SPRINTF;
break;
case 'N':
{
// @@ UNICODE
- const ASYS_TCHAR *file = this->file ();
- ACE_OS::sprintf (bp, ASYS_TEXT ("%s"),
+ const ACE_TCHAR *file = this->file ();
+ ACE_OS::sprintf (bp, ACE_TEXT ("%s"),
file ? file
- : ASYS_TEXT ("<unknown file>"));
+ : ACE_TEXT ("<unknown file>"));
type = SKIP_SPRINTF;
break;
}
@@ -850,11 +850,11 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// @@ UNICODE
ACE_OS::strcpy (bp, ACE_Log_Msg::program_name_ ?
ACE_Log_Msg::program_name_ :
- ASYS_TEXT ("<unknown>"));
+ ACE_TEXT ("<unknown>"));
break;
case 'P': // Format the current process id.
type = SKIP_SPRINTF;
- ACE_OS::sprintf (bp, ASYS_TEXT ("%d"),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%d"),
ACE_static_cast (int, this->getpid ()));
break;
case 'p': // Format the string assocated with the errno value.
@@ -862,32 +862,32 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
type = SKIP_SPRINTF;
errno = ACE::map_errno (this->errnum ());
#if !defined (ACE_HAS_WINCE)
- // @@ There is no strerror available on CE.
+ // @@ WINCE There is no strerror available on CE.
// Have to double check if this change is valid.
if (errno >= 0 && errno < sys_nerr)
- ACE_OS::sprintf (bp, ASYS_TEXT ("%s: %s"),
- va_arg (argp, ASYS_TCHAR *),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
+ va_arg (argp, ACE_TCHAR *),
strerror (errno));
else
#endif /* ACE_HAS_WINCE */
{
#if defined (ACE_WIN32)
- LPTSTR lpMsgBuf = 0;
+ ACE_TCHAR *lpMsgBuf = 0;
// PharLap can't do FormatMessage, so try for socket
// error.
# if !defined (ACE_HAS_PHARLAP)
- ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_MAX_WIDTH_MASK
- | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errno,
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL);
+ ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
+ | FORMAT_MESSAGE_MAX_WIDTH_MASK
+ | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ errno,
+ MAKELANGID (LANG_NEUTRAL,
+ SUBLANG_DEFAULT),
+ // Default language
+ (ACE_TCHAR *) &lpMsgBuf,
+ 0,
+ NULL);
# endif /* ACE_HAS_PHARLAP */
// If we don't get a valid response from
@@ -898,25 +898,25 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// our purposes.
if (lpMsgBuf == 0)
{
- const ASYS_TCHAR *message =
+ const ACE_TCHAR *message =
ACE::sock_error (errno);
- ACE_OS::sprintf (bp, ASYS_TEXT ("%s: %s"),
- va_arg (argp, const ASYS_TCHAR *),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
+ va_arg (argp, const ACE_TCHAR *),
message);
}
else
{
- ACE_OS::sprintf (bp, ASYS_TEXT ("%s: %s"),
- va_arg (argp, ASYS_TCHAR *),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
+ va_arg (argp, ACE_TCHAR *),
lpMsgBuf);
// Free the buffer.
::LocalFree (lpMsgBuf);
}
#elif !defined (ACE_HAS_WINCE)
ACE_OS::sprintf (bp,
- ASYS_TEXT (
+ ACE_TEXT (
"%s: <unknown error> = %d"),
- va_arg (argp, ASYS_TCHAR *), errno);
+ va_arg (argp, ACE_TCHAR *), errno);
#endif /* ACE_WIN32 */
}
break;
@@ -930,28 +930,28 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// Have to double check if this change is valid.
if (errno >= 0 && errno < sys_nerr)
ACE_OS::sprintf (bp,
- ASYS_TEXT ("%s"),
+ ACE_TEXT ("%s"),
strerror (errno));
else
#endif /* ACE_HAS_WINCE */
{
#if defined (ACE_WIN32)
- LPTSTR lpMsgBuf = 0;
+ ACE_TCHAR *lpMsgBuf = 0;
// PharLap can't do FormatMessage, so try for socket
// error.
# if !defined (ACE_HAS_PHARLAP)
- ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_MAX_WIDTH_MASK
- | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errno,
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL);
+ ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
+ | FORMAT_MESSAGE_MAX_WIDTH_MASK
+ | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ errno,
+ MAKELANGID (LANG_NEUTRAL,
+ SUBLANG_DEFAULT),
+ // Default language
+ (ACE_TCHAR *) &lpMsgBuf,
+ 0,
+ NULL);
# endif /* ACE_HAS_PHARLAP */
// If we don't get a valid response from
@@ -962,23 +962,23 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// our purposes.
if (lpMsgBuf == 0)
{
- const ASYS_TCHAR *message =
+ const ACE_TCHAR *message =
ACE::sock_error (errno);
ACE_OS::sprintf (bp,
- ASYS_TEXT ("%s"),
+ ACE_TEXT ("%s"),
message);
}
else
{
ACE_OS::sprintf (bp,
- ASYS_TEXT ("%s"),
+ ACE_TEXT ("%s"),
lpMsgBuf);
// Free the buffer.
::LocalFree (lpMsgBuf);
}
#elif !defined (ACE_HAS_WINCE)
ACE_OS::sprintf (bp,
- ASYS_TEXT ("<unknown error> = %d"),
+ ACE_TEXT ("<unknown error> = %d"),
errno);
#endif /* ACE_WIN32 */
}
@@ -986,7 +986,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
}
case 'R': // Format the return status of the operation.
this->op_status (va_arg (argp, int));
- ACE_OS::sprintf (bp, ASYS_TEXT ("%d"), this->op_status ());
+ ACE_OS::sprintf (bp, ACE_TEXT ("%d"), this->op_status ());
break;
case '{': // Increment the trace_depth, then indent
@@ -1045,10 +1045,10 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
if (sig >= 0 && sig < ACE_NSIG)
ACE_OS::strcpy (bp, _sys_siglist[sig]);
else
- ACE_OS::sprintf (bp, ASYS_TEXT ("<unknown signal> %d"),
+ ACE_OS::sprintf (bp, ACE_TEXT ("<unknown signal> %d"),
sig);
#else
- ACE_OS::sprintf (bp, ASYS_TEXT ("signal %d"), sig);
+ ACE_OS::sprintf (bp, ACE_TEXT ("signal %d"), sig);
#endif /* ACE_HAS_SYS_SIGLIST */
break;
}
@@ -1056,19 +1056,19 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// hour:minute:sec:usec format.
{
type = SKIP_SPRINTF;
- ASYS_TCHAR day_and_time[35];
+ ACE_TCHAR day_and_time[35];
ACE::timestamp (day_and_time,
sizeof day_and_time);
- ACE_OS::sprintf (bp, ASYS_TEXT ("%s"), day_and_time);
+ ACE_OS::sprintf (bp, ACE_TEXT ("%s"), day_and_time);
break;
}
case 'T': // Format the timestamp in
// hour:minute:sec:usec format.
{
type = SKIP_SPRINTF;
- ASYS_TCHAR day_and_time[35];
+ ACE_TCHAR day_and_time[35];
ACE_OS::sprintf (bp,
- ASYS_TEXT ("%s"),
+ ACE_TEXT ("%s"),
ACE::timestamp (day_and_time,
sizeof day_and_time));
break;
@@ -1076,7 +1076,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
case 't': // Format thread id.
type = SKIP_SPRINTF;
#if defined (ACE_WIN32)
- ACE_OS::sprintf (bp, ASYS_TEXT ("%u"), ACE_Thread::self ());
+ ACE_OS::sprintf (bp, ACE_TEXT ("%u"), ACE_Thread::self ());
#elif defined (AIX) && (ACE_AIX_MINOR_VERS <= 2)
// AIX's pthread_t (ACE_hthread_t) is a pointer, and it's
// a little ugly to send that through a %u format. So,
@@ -1088,9 +1088,9 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// 2. OSF/1 V3.2 has that def, and I'm not sure what affect
// this would have on that.
// -Steve Huston, 19-Aug-97
- ACE_OS::sprintf (bp, ASYS_TEXT ("%u"), thread_self());
+ ACE_OS::sprintf (bp, ACE_TEXT ("%u"), thread_self());
#elif defined (DIGITAL_UNIX)
- ACE_OS::sprintf (bp, ASYS_TEXT ("%u"),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%u"),
pthread_getselfseq_np());
#else
ACE_hthread_t t_id;
@@ -1100,7 +1100,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// HP-UX 10.x DCE's thread ID is a pointer. Grab the
// more meaningful, readable, thread ID. This will match
// the one seen in the debugger as well.
- ACE_OS::sprintf (bp, ASYS_TEXT ("%u"),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%u"),
pthread_getunique_np(&t_id));
# else
// Yes, this is an ugly C-style cast, but the correct
@@ -1108,7 +1108,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// is an integral type or a pointer type. FreeBSD uses
// a pointer type, but doesn't have a _np function to
// get an integral type, like the OSes above.
- ACE_OS::sprintf (bp, ASYS_TEXT ("%lu"),
+ ACE_OS::sprintf (bp, ACE_TEXT ("%lu"),
(unsigned long)t_id);
# endif /* ACE_HAS_PTHREADS_DRAFT4 && HPUX_10 */
@@ -1150,16 +1150,16 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
switch (type)
{
case 1:
- ACE_OS::sprintf (bp, fp, va_arg (argp, ASYS_TCHAR *));
+ ACE_OS::sprintf (bp, fp, va_arg (argp, ACE_TCHAR *));
break;
case 2:
- ACE_OS::sprintf (bp, fp, w[0], va_arg (argp, ASYS_TCHAR *));
+ ACE_OS::sprintf (bp, fp, w[0], va_arg (argp, ACE_TCHAR *));
bp += w[0];
type = SKIP_NUL_LOCATE;
break;
case 3:
ACE_OS::sprintf (bp, fp, w[0], w[1],
- va_arg (argp, ASYS_TCHAR *));
+ va_arg (argp, ACE_TCHAR *));
bp += w[0];
type = SKIP_NUL_LOCATE;
break;
@@ -1195,7 +1195,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
}
#else /* ! ACE_LACKS_LONGLONG_T */
ACE_OS::sprintf (bp,
- ASYS_TEXT (ACE_UINT64_FORMAT_SPECIFIER),
+ ACE_UINT64_FORMAT_SPECIFIER,
va_arg (argp, ACE_UINT64));
#endif /* ! ACE_LACKS_LONGLONG_T */
break;
@@ -1232,6 +1232,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str,
// something is hosed.
log_record.print (ACE_Log_Msg::local_host_, 0);
#if defined (ACE_HAS_WINCE)
+ // @@ WINCE: Is this what we want to do?
while (1) ;
#else
ACE_OS::abort ();
@@ -1400,47 +1401,47 @@ int
ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority,
const char *buffer,
int size,
- const ASYS_TCHAR *text)
+ const ACE_TCHAR *text)
{
- ASYS_TCHAR buf[ACE_Log_Record::MAXLOGMSGLEN -
+ ACE_TCHAR buf[ACE_Log_Record::MAXLOGMSGLEN -
ACE_Log_Record::VERBOSE_LEN - 58];
// 58 for the HEXDUMP header;
- ASYS_TCHAR msg_buf[80];
+ ACE_TCHAR msg_buf[80];
buf[0] = 0; // in case size = 0
int len = ACE::format_hexdump (buffer,
size,
buf,
- sizeof (buf) / sizeof (ASYS_TCHAR));
+ sizeof (buf) / sizeof (ACE_TCHAR));
int sz = 0;
if (text)
sz = ACE_OS::sprintf (msg_buf,
- ASYS_TEXT ("%s - "),
+ ACE_TEXT ("%s - "),
text);
sz += ACE_OS::sprintf (msg_buf + sz,
- ASYS_TEXT ("HEXDUMP %d bytes"),
+ ACE_TEXT ("HEXDUMP %d bytes"),
size);
if (len < size)
ACE_OS::sprintf (msg_buf + sz,
- ASYS_TEXT (" (showing first %d bytes)"),
+ ACE_TEXT (" (showing first %d bytes)"),
len);
// Now print out the formatted buffer.
this->log (log_priority,
- ASYS_TEXT ("%s\n%s"),
+ ACE_TEXT ("%s\n%s"),
msg_buf,
buf);
return 0;
}
void
-ACE_Log_Msg::set (const ASYS_TCHAR *filename,
+ACE_Log_Msg::set (const ACE_TCHAR *filename,
int line,
int status,
int err,
@@ -1449,7 +1450,7 @@ ACE_Log_Msg::set (const ASYS_TCHAR *filename,
ACE_Log_Msg_Callback *c)
{
ACE_TRACE ("ACE_Log_Msg::set");
- this->file (filename);
+ this->file (filename);
this->linenum (line);
this->op_status (status);
this->errnum (err);
@@ -1464,35 +1465,35 @@ ACE_Log_Msg::dump (void) const
ACE_TRACE ("ACE_Log_Msg::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("status_ = %d\n"), this->status_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nerrnum_ = %d\n"), this->errnum_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nlinenum_ = %d\n"), this->linenum_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nfile_ = %s\n"), this->file_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmsg_ = %s\n"), this->msg_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nrestart_ = %d\n"), this->restart_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nostream_ = %x\n"), this->ostream_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmsg_callback_ = %x\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("status_ = %d\n"), this->status_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nerrnum_ = %d\n"), this->errnum_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlinenum_ = %d\n"), this->linenum_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfile_ = %s\n"), this->file_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_ = %s\n"), this->msg_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d\n"), this->restart_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nostream_ = %x\n"), this->ostream_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_callback_ = %x\n"),
this->msg_callback_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nprogram_name_ = %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nprogram_name_ = %s\n"),
this->program_name_ ? this->program_name_
- : ASYS_TEXT ("<unknown>")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nlocal_host_ = %s\n"),
+ : ACE_TEXT ("<unknown>")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlocal_host_ = %s\n"),
this->local_host_ ? this->local_host_
- : ASYS_TEXT ("<unknown>")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\npid_ = %d\n"), this->getpid ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nflags_ = %x\n"), this->flags_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntrace_depth_ = %d\n"),
+ : ACE_TEXT ("<unknown>")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d\n"), this->getpid ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %x\n"), this->flags_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntrace_depth_ = %d\n"),
this->trace_depth_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\trace_active_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\trace_active_ = %d\n"),
this->trace_active_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\tracing_enabled_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\tracing_enabled_ = %d\n"),
this->tracing_enabled_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\npriority_mask_ = %x\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npriority_mask_ = %x\n"),
this->priority_mask_));
if (this->thr_desc_ != 0 && this->thr_desc_->state () != 0)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\thr_state_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\thr_state_ = %d\n"),
this->thr_desc_->state ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmsg_off_ = %d\n"), this->msg_off_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_off_ = %d\n"), this->msg_off_));
// Be sure that there is a message_queue_, with multiple threads.
ACE_MT (ACE_Log_Msg_Manager::get_lock ());
@@ -1656,30 +1657,30 @@ ACE_Log_Msg::tracing_enabled (void)
return this->tracing_enabled_;
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Log_Msg::file (void)
{
return this->file_;
}
void
-ACE_Log_Msg::file (const ASYS_TCHAR *s)
+ACE_Log_Msg::file (const ACE_TCHAR *s)
{
ACE_OS::strncpy (this->file_, s,
- (sizeof this->file_ / sizeof (ASYS_TCHAR)));
+ (sizeof this->file_ / sizeof (ACE_TCHAR)));
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Log_Msg::msg (void)
{
return this->msg_ + ACE_Log_Msg::msg_off_;
}
void
-ACE_Log_Msg::msg (const ASYS_TCHAR *m)
+ACE_Log_Msg::msg (const ACE_TCHAR *m)
{
ACE_OS::strncpy (this->msg_, m,
- (sizeof this->msg_ / sizeof (ASYS_TCHAR)));
+ (sizeof this->msg_ / sizeof (ACE_TCHAR)));
}
ACE_Log_Msg_Callback *
@@ -1710,7 +1711,7 @@ ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m, int delete_ostream)
}
void
-ACE_Log_Msg::local_host (const ASYS_TCHAR *s)
+ACE_Log_Msg::local_host (const ACE_TCHAR *s)
{
if (s)
{
@@ -1723,7 +1724,7 @@ ACE_Log_Msg::local_host (const ASYS_TCHAR *s)
}
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Log_Msg::local_host (void) const
{
return ACE_Log_Msg::local_host_;
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index d6ae05c35a4..0b8c19e788d 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -30,9 +30,9 @@
do { if(!(X)) { \
int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ASYS_TEXT (__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
+ ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log (LM_ERROR, ASYS_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), ASYS_WIDE_STRING (#X), -1); \
+ ace___->log (LM_ERROR, ACE_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), #X, -1); \
} } while (0)
#endif /* ACE_NDEBUG */
@@ -49,21 +49,21 @@
do { \
int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ASYS_TEXT (__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
+ ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
ace___->msg_ostream (), ace___->msg_callback ()); \
ace___->log_hexdump X; \
} while (0)
#define ACE_RETURN(Y) \
do { \
int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg::instance ()->set (ASYS_TEXT (__FILE__), __LINE__, Y, __ace_error); \
+ ACE_Log_Msg::instance ()->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, Y, __ace_error); \
return Y; \
} while (0)
#define ACE_ERROR_RETURN(X, Y) \
do { \
int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ASYS_TEXT (__FILE__), __LINE__, Y, __ace_error, ace___->restart (), \
+ ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, Y, __ace_error, ace___->restart (), \
ace___->msg_ostream (), ace___->msg_callback ()); \
ace___->log X; \
return Y; \
@@ -72,7 +72,7 @@
do { \
int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ASYS_TEXT (__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
+ ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
ace___->msg_ostream (), ace___->msg_callback ()); \
ace___->log X; \
} while (0)
@@ -80,7 +80,7 @@
do { \
int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ASYS_TEXT (__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
+ ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
ace___->msg_ostream (), ace___->msg_callback ()); \
ace___->log X; \
} while (0)
@@ -205,9 +205,9 @@ public:
~ACE_Log_Msg (void);
// cleanup logger.
- int open (const ASYS_TCHAR *prog_name,
+ int open (const ACE_TCHAR *prog_name,
u_long options_flags = ACE_Log_Msg::STDERR,
- LPCTSTR logger_key = 0);
+ const ACE_TCHAR *logger_key = 0);
// Initialize the ACE error handling facility. <prog_name> is the
// name of the executable program. <flags> are a bitwise-or of
// options flags passed to the Logger (see the enum above for the valid
@@ -234,7 +234,7 @@ public:
int release (void);
// Release the internal lock.
- void sync (const ASYS_TCHAR *program_name);
+ void sync (const ACE_TCHAR *program_name);
// Call after doing a <fork> to resynchronize the process id and
// <program_name> variables.
@@ -263,16 +263,16 @@ public:
int linenum (void);
// Get the line number where an error occurred.
- void file (const ASYS_TCHAR *);
+ void file (const ACE_TCHAR *);
// Set the file name where an error occurred.
- const ASYS_TCHAR *file (void);
+ const ACE_TCHAR *file (void);
// Get the file name where an error occurred.
- void msg (const ASYS_TCHAR *);
+ void msg (const ACE_TCHAR *);
// Set the message that describes what type of error occurred.
- const ASYS_TCHAR *msg (void);
+ const ACE_TCHAR *msg (void);
// Get the message that describes what type of error occurred.
void restart (int);
@@ -357,10 +357,10 @@ public:
// cached...).
// = Set/get the name of the local host.
- const ASYS_TCHAR *local_host (void) const;
- void local_host (const ASYS_TCHAR *);
+ const ACE_TCHAR *local_host (void) const;
+ void local_host (const ACE_TCHAR *);
- void set (const ASYS_TCHAR *file,
+ void set (const ACE_TCHAR *file,
int line,
int op_status = -1,
int errnum = 0,
@@ -371,7 +371,7 @@ public:
// restart flag, ostream, and the callback object. This combines
// all the other set methods into a single method.
- ssize_t log (ACE_Log_Priority priority, const ASYS_TCHAR *format, ...);
+ ssize_t log (ACE_Log_Priority priority, const ACE_TCHAR *format, ...);
// Format a message to the thread-safe ACE logging mechanism. Valid
// options (prefixed by '%', as in printf format strings) include:
// 'A': print an ACE_timer_t value (which could be either double or ACE_UINT32.)
@@ -400,7 +400,7 @@ public:
// 'X', 'x': print as a hex number
// '%': print out a single percent sign, '%'
- ssize_t log (const ASYS_TCHAR *format,
+ ssize_t log (const ACE_TCHAR *format,
ACE_Log_Priority priority,
va_list argp);
// An alternative logging mechanism that makes it possible to
@@ -415,7 +415,7 @@ public:
int log_hexdump (ACE_Log_Priority log_priority,
const char *buffer,
int size,
- const ASYS_TCHAR *text = 0);
+ const ACE_TCHAR *text = 0);
// Method to log hex dump. This is useful for debugging. Calls
// <log> to do the actual print, but formats first to make the chars
// printable.
@@ -436,10 +436,10 @@ private:
int linenum_;
// Line number where the error occurred.
- ASYS_TCHAR file_[MAXPATHLEN + 1];
+ ACE_TCHAR file_[MAXPATHLEN + 1];
// File where the error occurred.
- ASYS_TCHAR msg_[ACE_Log_Record::MAXLOGMSGLEN];
+ ACE_TCHAR msg_[ACE_Log_Record::MAXLOGMSGLEN];
// The error message.
int restart_;
@@ -491,10 +491,10 @@ private:
// are currently enabled. Default is for all logging priorities to
// be enabled.
- static const ASYS_TCHAR *program_name_;
+ static const ACE_TCHAR *program_name_;
// Records the program name.
- static const ASYS_TCHAR *local_host_;
+ static const ACE_TCHAR *local_host_;
// Name of the local host (used when printing messages).
static pid_t pid_;
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
index 53928c20193..b2d8d956db7 100644
--- a/ace/Log_Record.cpp
+++ b/ace/Log_Record.cpp
@@ -14,23 +14,23 @@ ACE_RCSID(ace, Log_Record, "$Id$")
ACE_ALLOC_HOOK_DEFINE(ACE_Log_Record)
-const ASYS_TCHAR *ACE_Log_Record::priority_names_[] =
+const ACE_TCHAR *ACE_Log_Record::priority_names_[] =
{
- ASYS_TEXT ("<none>"),
- ASYS_TEXT ("LM_SHUTDOWN"),
- ASYS_TEXT ("LM_TRACE"),
- ASYS_TEXT ("LM_DEBUG"),
- ASYS_TEXT ("LM_INFO"),
- ASYS_TEXT ("LM_NOTICE"),
- ASYS_TEXT ("LM_WARNING"),
- ASYS_TEXT ("LM_STARTUP"),
- ASYS_TEXT ("LM_ERROR"),
- ASYS_TEXT ("LM_CRITICAL"),
- ASYS_TEXT ("LM_ALERT"),
- ASYS_TEXT ("LM_EMERGENCY")
+ ACE_TEXT ("<none>"),
+ ACE_TEXT ("LM_SHUTDOWN"),
+ ACE_TEXT ("LM_TRACE"),
+ ACE_TEXT ("LM_DEBUG"),
+ ACE_TEXT ("LM_INFO"),
+ ACE_TEXT ("LM_NOTICE"),
+ ACE_TEXT ("LM_WARNING"),
+ ACE_TEXT ("LM_STARTUP"),
+ ACE_TEXT ("LM_ERROR"),
+ ACE_TEXT ("LM_CRITICAL"),
+ ACE_TEXT ("LM_ALERT"),
+ ACE_TEXT ("LM_EMERGENCY")
};
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Log_Record::priority_name (ACE_Log_Priority p)
{
return ACE_Log_Record::priority_names_[ACE::log2 (p)];
@@ -56,16 +56,16 @@ ACE_Log_Record::dump (void) const
// ACE_TRACE ("ACE_Log_Record::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("length_ = %d\n"), this->length_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntype_ = %d\n"), this->type_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntime_stamp_ = (%d, %d)\n"), this->time_stamp_.sec (), this->time_stamp_.usec ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\npid_ = %d\n"), this->pid_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmsg_data_ = %s\n"), this->msg_data_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("length_ = %d\n"), this->length_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntype_ = %d\n"), this->type_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntime_stamp_ = (%d, %d)\n"), this->time_stamp_.sec (), this->time_stamp_.usec ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d\n"), this->pid_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_data_ = %s\n"), this->msg_data_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
void
-ACE_Log_Record::msg_data (const ASYS_TCHAR *data)
+ACE_Log_Record::msg_data (const ACE_TCHAR *data)
{
// ACE_TRACE ("ACE_Log_Record::msg_data");
ACE_OS::strncpy (this->msg_data_, data, ACE_Log_Record::MAXLOGMSGLEN);
@@ -100,7 +100,7 @@ ACE_Log_Record::round_up (void)
// ACE_TRACE ("ACE_Log_Record::round_up");
// Determine the length of the payload.
int len = (sizeof (*this) - sizeof (this->msg_data_))
- + (sizeof (ASYS_TCHAR) * ((ACE_OS::strlen (this->msg_data_) + 1)));
+ + (sizeof (ACE_TCHAR) * ((ACE_OS::strlen (this->msg_data_) + 1)));
// Round up to the alignment.
this->length_ = ((len + ACE_Log_Record::ALIGN_WORDB - 1)
@@ -117,13 +117,13 @@ ACE_Log_Record::ACE_Log_Record (void)
}
int
-ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
+ACE_Log_Record::format_msg (const ACE_TCHAR *host_name,
u_long verbose_flag,
- ASYS_TCHAR *verbose_msg)
+ ACE_TCHAR *verbose_msg)
{
/* 0123456789012345678901234 */
/* Oct 18 14:25:36.000 1989<nul> */
- ASYS_TCHAR timestamp[26]; // Only used by VERBOSE and VERBOSE_LITE.
+ ACE_TCHAR timestamp[26]; // Only used by VERBOSE and VERBOSE_LITE.
if (ACE_BIT_ENABLED (verbose_flag,
ACE_Log_Msg::VERBOSE)
@@ -131,7 +131,7 @@ ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
ACE_Log_Msg::VERBOSE_LITE))
{
time_t now = this->time_stamp_.sec ();
- ASYS_TCHAR ctp[26]; // 26 is a magic number...
+ ACE_TCHAR ctp[26]; // 26 is a magic number...
if (ACE_OS::ctime_r (&now, ctp, sizeof ctp) == 0)
return -1;
@@ -143,7 +143,7 @@ ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
ctp[24] = '\0'; // NUL-terminate after the date.
ACE_OS::sprintf (timestamp,
- ASYS_TEXT ("%s.%03ld %s"),
+ ACE_TEXT ("%s.%03ld %s"),
ctp + 4,
this->time_stamp_.usec () / 1000,
ctp + 20);
@@ -153,16 +153,16 @@ ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
ACE_Log_Msg::VERBOSE))
{
# if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- const ASYS_TCHAR *lhost_name = (const ASYS_TCHAR *) ((host_name == 0)
- ? ((char *) ASYS_TEXT ("<local_host>"))
+ const ACE_TCHAR *lhost_name = (const ACE_TCHAR *) ((host_name == 0)
+ ? ((char *) ACE_TEXT ("<local_host>"))
: ((char *) host_name));
# else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- const ASYS_TCHAR *lhost_name = ((host_name == 0)
- ? ASYS_TEXT ("<local_host>")
+ const ACE_TCHAR *lhost_name = ((host_name == 0)
+ ? ACE_TEXT ("<local_host>")
: host_name);
# endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
ACE_OS::sprintf (verbose_msg,
- ASYS_TEXT ("%s@%s@%ld@%s@%s"),
+ ACE_TEXT ("%s@%s@%ld@%s@%s"),
timestamp,
lhost_name,
this->pid_,
@@ -171,13 +171,13 @@ ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
}
else if (ACE_BIT_ENABLED (verbose_flag, ACE_Log_Msg::VERBOSE_LITE))
ACE_OS::sprintf (verbose_msg,
- ASYS_TEXT ("%s@%s@%s"),
+ ACE_TEXT ("%s@%s@%s"),
timestamp,
ACE_Log_Record::priority_name (ACE_Log_Priority (this->type_)),
this->msg_data_);
else
ACE_OS::sprintf (verbose_msg,
- ASYS_TEXT ("%s"),
+ ACE_TEXT ("%s"),
this->msg_data_);
return 0;
}
@@ -185,11 +185,11 @@ ACE_Log_Record::format_msg (const ASYS_TCHAR *host_name,
#if defined (ACE_HAS_WINCE)
int
-ACE_Log_Record::print (const ASYS_TCHAR *host_name,
+ACE_Log_Record::print (const ACE_TCHAR *host_name,
u_long verbose_flag,
ACE_CE_Bridge *log_window)
{
- ASYS_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
+ ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
int result = this->format_msg (host_name, verbose_flag, verbose_msg);
if (result == 0)
@@ -207,22 +207,19 @@ ACE_Log_Record::print (const ASYS_TCHAR *host_name,
#endif /* defined (ACE_HAS_WINCE) */
int
-ACE_Log_Record::print (const ASYS_TCHAR *host_name,
+ACE_Log_Record::print (const ACE_TCHAR *host_name,
u_long verbose_flag,
FILE *fp)
{
- ASYS_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
+ ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
int result = this->format_msg (host_name, verbose_flag, verbose_msg);
if (result == 0)
{
if (fp != NULL)
{
- size_t verbose_msg_len = ACE_OS::strlen (verbose_msg);
- size_t fwrite_result = ACE_OS::fwrite (verbose_msg,
- 1,
- verbose_msg_len,
- fp);
+ int verbose_msg_len = ACE_OS::strlen (verbose_msg);
+ int fwrite_result = ACE_OS::fprintf (fp, verbose_msg);
// We should have written everything
if (fwrite_result != verbose_msg_len)
@@ -242,16 +239,17 @@ ACE_Log_Record::print (const ASYS_TCHAR *host_name,
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
int
-ACE_Log_Record::print (const ASYS_TCHAR *host_name,
+ACE_Log_Record::print (const ACE_TCHAR *host_name,
u_long verbose_flag,
ostream &s)
{
- ASYS_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
+ ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
int result = this->format_msg (host_name, verbose_flag, verbose_msg);
if (result == 0)
{
- s << verbose_msg;
+ // Since ostream expects only chars, we cannot pass wchar_t's
+ s << ACE_TEXT_ALWAYS_CHAR (verbose_msg);
s.flush ();
}
diff --git a/ace/Log_Record.h b/ace/Log_Record.h
index 3b5460c1f9f..f30c4baa6de 100644
--- a/ace/Log_Record.h
+++ b/ace/Log_Record.h
@@ -68,7 +68,7 @@ public:
// Default dtor.
- int print (const ASYS_TCHAR host_name[],
+ int print (const ACE_TCHAR host_name[],
u_long verbose_flag,
#if !defined (ACE_HAS_WINCE)
FILE *fp = stderr);
@@ -79,26 +79,26 @@ public:
// <FILE>.
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
- int print (const ASYS_TCHAR host_name[],
+ int print (const ACE_TCHAR host_name[],
u_long verbose_flag,
ostream &stream);
// Write the contents of the logging record to the appropriate
// <ostream>.
#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
- int format_msg (const ASYS_TCHAR host_name[],
+ int format_msg (const ACE_TCHAR host_name[],
u_long verbose_flag,
- ASYS_TCHAR *verbose_msg);
+ ACE_TCHAR *verbose_msg);
#if defined (ACE_HAS_WINCE)
- int print (const ASYS_TCHAR host_name[],
+ int print (const ACE_TCHAR host_name[],
u_long verbose_flag,
ACE_CE_Bridge *log_ = 0);
// For Windows CE, the default is to log messages to a preset
// window.
#endif /* defined (ACE_HAS_WINCE) */
- static const ASYS_TCHAR *priority_name (ACE_Log_Priority p);
+ static const ACE_TCHAR *priority_name (ACE_Log_Priority p);
// Returns a character array with the string form of the
// <ACE_Log_Priority> parameter. This is used for the verbose
// printing format.
@@ -145,10 +145,10 @@ public:
void pid (long);
// Set the process id of the <Log_Record>.
- ASYS_TCHAR *msg_data (void);
+ ACE_TCHAR *msg_data (void);
// Get the message data of the <Log_Record>.
- void msg_data (const ASYS_TCHAR *data);
+ void msg_data (const ACE_TCHAR *data);
// Set the message data of the <Log_Record>.
void msg_data_len (size_t len);
@@ -179,10 +179,10 @@ private:
long pid_;
// Id of process that generated the logging record.
- ASYS_TCHAR msg_data_[MAXLOGMSGLEN];
+ ACE_TCHAR msg_data_[MAXLOGMSGLEN];
// Logging record data
- static const ASYS_TCHAR *priority_names_[];
+ static const ACE_TCHAR *priority_names_[];
// Symbolic names for the <ACE_Log_Priority> enums.
};
diff --git a/ace/Log_Record.i b/ace/Log_Record.i
index 7b7c5e1b3be..5d9315dc1d9 100644
--- a/ace/Log_Record.i
+++ b/ace/Log_Record.i
@@ -88,7 +88,7 @@ ACE_Log_Record::pid (long p)
this->pid_ = p;
}
-ASYS_INLINE ASYS_TCHAR *
+ASYS_INLINE ACE_TCHAR *
ACE_Log_Record::msg_data (void)
{
ACE_TRACE ("ACE_Log_Record::msg_data");
diff --git a/ace/MEM_Acceptor.cpp b/ace/MEM_Acceptor.cpp
index 70f9e596857..3812c5a7885 100644
--- a/ace/MEM_Acceptor.cpp
+++ b/ace/MEM_Acceptor.cpp
@@ -45,7 +45,7 @@ ACE_MEM_Acceptor::ACE_MEM_Acceptor (const ACE_MEM_Addr &remote_sap,
backlog,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- "ACE_MEM_Acceptor::ACE_MEM_Acceptor"));
+ ACE_TEXT ("ACE_MEM_Acceptor::ACE_MEM_Acceptor")));
}
int
@@ -107,7 +107,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
// Allocate 2 * MAXPATHLEN so we can accomodate the unique
// name that gets appended later
- TCHAR buf [2 * MAXPATHLEN + 1];
+ ACE_TCHAR buf [2 * MAXPATHLEN + 1];
ACE_INET_Addr local_addr;
if (new_stream.get_local_addr (local_addr) == -1)
@@ -122,13 +122,13 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
}
else
{
- TCHAR name[25];
+ ACE_TCHAR name[25];
// - 24 is so we can append name to the end.
if (ACE::get_temp_dir (buf, MAXPATHLEN - 24) == -1)
{
ACE_ERROR ((LM_ERROR,
- "Temporary path too long, "
- "defaulting to current directory\n"));
+ ACE_TEXT ("Temporary path too long, ")
+ ACE_TEXT ("defaulting to current directory\n")));
buf[0] = 0;
}
@@ -137,7 +137,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
local_addr.get_port_number ());
ACE_OS::strcat (buf, name);
}
- TCHAR unique [MAXPATHLEN];
+ ACE_TCHAR unique [MAXPATHLEN];
ACE_OS::unique_name (&new_stream, unique, MAXPATHLEN);
ACE_OS::strcat (buf, unique);
@@ -150,7 +150,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
return -1;
// @@ Need to handle timeout here.
- ACE_UINT16 buf_len = (ACE_OS::strlen (buf) + 1) * sizeof (TCHAR);
+ ACE_UINT16 buf_len = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR);
ACE_HANDLE new_handle = new_stream.get_handle ();
// No need to worry about byte-order because both parties should always
diff --git a/ace/MEM_Acceptor.h b/ace/MEM_Acceptor.h
index 230aaf4317d..63603fbdbbd 100644
--- a/ace/MEM_Acceptor.h
+++ b/ace/MEM_Acceptor.h
@@ -82,8 +82,8 @@ public:
// Perform operations that must occur after <ACE_OS::accept> is
// called.
- const ASYS_TCHAR *mmap_prefix (void) const;
- void mmap_prefix (ASYS_TCHAR *prefix);
+ const ACE_TCHAR *mmap_prefix (void) const;
+ void mmap_prefix (ACE_TCHAR *prefix);
// Accessor/mutator of mmap filename prefix. By default, the
// <mmap_prefix_> is not set and the mmap filename is
// ${(TMP|TEMP)}//ACE_MEM_Acceptor_(port-number)_(&stream),
@@ -141,7 +141,7 @@ protected:
int reset_new_handle = 0) const;
private:
- ASYS_TCHAR *mmap_prefix_;
+ ACE_TCHAR *mmap_prefix_;
// The filename prefix of the created mmap files. It should
// contains the absolute path name of the file.
diff --git a/ace/MEM_Acceptor.i b/ace/MEM_Acceptor.i
index bdc1c1af7ef..82f9206c9e8 100644
--- a/ace/MEM_Acceptor.i
+++ b/ace/MEM_Acceptor.i
@@ -51,14 +51,14 @@ ACE_MEM_Acceptor::get_local_addr (ACE_MEM_Addr &sap) const
return 0;
}
-ASYS_INLINE const ASYS_TCHAR *
+ASYS_INLINE const ACE_TCHAR *
ACE_MEM_Acceptor::mmap_prefix (void) const
{
return this->mmap_prefix_;
}
ASYS_INLINE void
-ACE_MEM_Acceptor::mmap_prefix (ASYS_TCHAR *prefix)
+ACE_MEM_Acceptor::mmap_prefix (ACE_TCHAR *prefix)
{
this->mmap_prefix_ = ACE::strnew (prefix);
}
diff --git a/ace/MEM_Addr.cpp b/ace/MEM_Addr.cpp
index 587e9a49785..c0e875c9714 100644
--- a/ace/MEM_Addr.cpp
+++ b/ace/MEM_Addr.cpp
@@ -29,7 +29,7 @@ ACE_MEM_Addr::ACE_MEM_Addr (const ACE_MEM_Addr &sa)
this->internal_.set (sa.internal_);
}
-ACE_MEM_Addr::ACE_MEM_Addr (const ASYS_TCHAR port_number[])
+ACE_MEM_Addr::ACE_MEM_Addr (const ACE_TCHAR port_number[])
: ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
{
ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
@@ -51,12 +51,12 @@ ACE_MEM_Addr::ACE_MEM_Addr (u_short port_number)
int
ACE_MEM_Addr::initialize_local (u_short port_number)
{
- ASYS_TCHAR name[MAXHOSTNAMELEN + 1];
+ ACE_TCHAR name[MAXHOSTNAMELEN + 1];
if (ACE_OS::hostname (name, MAXHOSTNAMELEN+1) == -1)
return -1;
this->external_.set (port_number, name);
- this->internal_.set (port_number, ASYS_TEXT ("localhost"));
+ this->internal_.set (port_number, ACE_TEXT ("localhost"));
return 0;
}
@@ -70,7 +70,7 @@ ACE_MEM_Addr::same_host (const ACE_INET_Addr &sap)
}
int
-ACE_MEM_Addr::addr_to_string (ASYS_TCHAR s[],
+ACE_MEM_Addr::addr_to_string (ACE_TCHAR s[],
size_t size,
int ipaddr_format) const
{
@@ -82,7 +82,7 @@ ACE_MEM_Addr::addr_to_string (ASYS_TCHAR s[],
// Transform the string into the current addressing format.
int
-ACE_MEM_Addr::string_to_addr (const ASYS_TCHAR s[])
+ACE_MEM_Addr::string_to_addr (const ACE_TCHAR s[])
{
ACE_TRACE ("ACE_MEM_Addr::string_to_addr");
@@ -114,7 +114,7 @@ ACE_MEM_Addr::set_addr (void *addr, int len)
}
int
-ACE_MEM_Addr::get_host_name (ASYS_TCHAR hostname[],
+ACE_MEM_Addr::get_host_name (ACE_TCHAR hostname[],
size_t len) const
{
ACE_TRACE ("ACE_MEM_Addr::get_host_name");
@@ -123,7 +123,7 @@ ACE_MEM_Addr::get_host_name (ASYS_TCHAR hostname[],
// Return the character representation of the hostname.
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_MEM_Addr::get_host_name (void) const
{
ACE_TRACE ("ACE_MEM_Addr::get_host_name");
diff --git a/ace/MEM_Addr.h b/ace/MEM_Addr.h
index 2f3dbe743ca..a6dd68ede60 100644
--- a/ace/MEM_Addr.h
+++ b/ace/MEM_Addr.h
@@ -43,7 +43,7 @@ public:
// Creates an <ACE_INET_Addr> from a <port_number> and the remote
// <host_name>.
- ACE_MEM_Addr (const ASYS_TCHAR port_name[]);
+ ACE_MEM_Addr (const ACE_TCHAR port_name[]);
// Creates an <ACE_INET_Addr> from a <port_name>.
~ACE_MEM_Addr (void);
@@ -66,7 +66,7 @@ public:
// converted into network byte order, otherwise it is assumed to be
// in network byte order already and are passed straight through.
- int set (const ASYS_TCHAR port_name[]);
+ int set (const ACE_TCHAR port_name[]);
// Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
// <port_name>, the remote <host_name>, and the <protocol>.
@@ -76,13 +76,13 @@ public:
virtual void set_addr (void *, int len);
// Set a pointer to the address.
- virtual int addr_to_string (ASYS_TCHAR buffer[],
+ virtual int addr_to_string (ACE_TCHAR buffer[],
size_t size,
int ipaddr_format = 1) const;
// Transform the external <ACE_INET_Addr> address into string
// format.
- virtual int string_to_addr (const ASYS_TCHAR address[]);
+ virtual int string_to_addr (const ACE_TCHAR address[]);
// Initializes the external <ACE_INET_Addr> from the <address>.
void set_port_number (u_short,
@@ -92,16 +92,16 @@ public:
u_short get_port_number (void) const;
// Return the port number, converting it into host byte order.
- int get_host_name (ASYS_TCHAR hostname[],
+ int get_host_name (ACE_TCHAR hostname[],
size_t hostnamelen) const;
// Return the character representation of the hostname.
- const ASYS_TCHAR *get_host_name (void) const;
+ const ACE_TCHAR *get_host_name (void) const;
// Return the character representation of the hostname (this version
// is non-reentrant since it returns a pointer to a static data
// area).
- const char *get_host_addr (void) const;
+ const ACE_TCHAR *get_host_addr (void) const;
// Return the "dotted decimal" external address.
ACE_UINT32 get_ip_address (void) const;
diff --git a/ace/MEM_Addr.i b/ace/MEM_Addr.i
index 2dd130fca7b..579481e2ce6 100644
--- a/ace/MEM_Addr.i
+++ b/ace/MEM_Addr.i
@@ -30,7 +30,7 @@ ACE_MEM_Addr::set (u_short port_number, int encode)
}
ACE_INLINE int
-ACE_MEM_Addr::set (const ASYS_TCHAR port_number[])
+ACE_MEM_Addr::set (const ACE_TCHAR port_number[])
{
ACE_TRACE ("ACE_MEM_Addr::set");
return this->string_to_addr (port_number);
@@ -47,7 +47,7 @@ ACE_MEM_Addr::get_port_number (void) const
// Return the dotted Internet address.
-ACE_INLINE const char *
+ACE_INLINE const ACE_TCHAR *
ACE_MEM_Addr::get_host_addr (void) const
{
ACE_TRACE ("ACE_MEM_Addr::get_host_addr");
diff --git a/ace/MEM_Connector.cpp b/ace/MEM_Connector.cpp
index 32db3c9da72..9c6ca6ed918 100644
--- a/ace/MEM_Connector.cpp
+++ b/ace/MEM_Connector.cpp
@@ -17,7 +17,7 @@ ACE_MEM_Connector::dump (void) const
ACE_TRACE ("ACE_MEM_Connector::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -63,8 +63,8 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
if (!this->address_.same_host (remote_sap))
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) MEM_Connector can't connect ")
- ASYS_TEXT ("to %s:%d which is not a local endpoint"),
+ ACE_TEXT ("(%P|%t) MEM_Connector can't connect ")
+ ACE_TEXT ("to %s:%d which is not a local endpoint"),
remote_sap.get_host_name (),
remote_sap.get_port_number ()),
-1);
@@ -86,7 +86,7 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
// Do not close the handle.
// now we should setup the mmap malloc.
- TCHAR buf[MAXPATHLEN];
+ ACE_TCHAR buf[MAXPATHLEN];
// @@ Need to handle timeout here.
ACE_INT16 buf_len;
diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp
index 6b5ac5c767c..bbb9a1849b4 100644
--- a/ace/MEM_SAP.cpp
+++ b/ace/MEM_SAP.cpp
@@ -19,7 +19,7 @@ ACE_MEM_SAP::dump (void) const
if (this->shm_malloc_ != 0)
this->shm_malloc_->dump ();
else
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_MEM_SAP uninitialized.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_MEM_SAP uninitialized.\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -30,7 +30,7 @@ ACE_MEM_SAP::ACE_MEM_SAP (void)
}
int
-ACE_MEM_SAP::create_shm_malloc (LPCTSTR name,
+ACE_MEM_SAP::create_shm_malloc (const ACE_TCHAR *name,
MALLOC_OPTIONS *options)
{
ACE_TRACE ("ACE_MEM_SAP::create_shm_malloc");
diff --git a/ace/MEM_SAP.h b/ace/MEM_SAP.h
index 99243173af9..05270a74c8a 100644
--- a/ace/MEM_SAP.h
+++ b/ace/MEM_SAP.h
@@ -75,7 +75,7 @@ public:
protected:
// = Class initializing methods to create/connect to a shared memory pool.
- int create_shm_malloc (LPCTSTR name,
+ int create_shm_malloc (const ACE_TCHAR *name,
MALLOC_OPTIONS *options = 0);
// Create a new shm_malloc object. Return 0 if succeed and -1
// otherwise. This method should only be called from an acceptor
diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp
index 738538f8534..82307dc12ed 100644
--- a/ace/Malloc.cpp
+++ b/ace/Malloc.cpp
@@ -28,8 +28,8 @@ ACE_Control_Block::ACE_Malloc_Header::dump (void) const
ACE_TRACE ("ACE_Malloc_Header::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nsize = %d\n"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize = %d\n"), this->size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -37,20 +37,20 @@ void
ACE_Control_Block::print_alignment_info (void)
{
ACE_TRACE ("ACE_Control_Block::print_alignment_info");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Start ---> ACE_Control_Block::print_alignment_info:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Start ---> ACE_Control_Block::print_alignment_info:\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Sizeof ptr: %d\n")
- ASYS_TEXT ("Sizeof size_t: %d\n")
- ASYS_TEXT ("Sizeof long: %d\n")
- ASYS_TEXT ("Sizeof double: %d\n")
- ASYS_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
- ASYS_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
- ASYS_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_MALLOC_PADDING_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_CONTROL_BLOCK_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
- ASYS_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
- ASYS_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
+ ACE_TEXT ("Sizeof ptr: %d\n")
+ ACE_TEXT ("Sizeof size_t: %d\n")
+ ACE_TEXT ("Sizeof long: %d\n")
+ ACE_TEXT ("Sizeof double: %d\n")
+ ACE_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
+ ACE_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
+ ACE_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_MALLOC_PADDING_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_CONTROL_BLOCK_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
+ ACE_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
+ ACE_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
sizeof (char *),
sizeof (size_t),
sizeof (long),
@@ -64,7 +64,7 @@ ACE_Control_Block::print_alignment_info (void)
sizeof (ACE_Malloc_Header),
sizeof (ACE_Control_Block)
));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("End <--- ACE_Control_Block::print_alignment_info:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End <--- ACE_Control_Block::print_alignment_info:\n")));
}
void
@@ -73,22 +73,22 @@ ACE_Control_Block::dump (void) const
ACE_TRACE ("ACE_Control_Block::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Name Node:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
for (ACE_Name_Node *nextn = this->name_head_;
nextn != 0;
nextn = nextn->next_)
nextn->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
this->base_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nMalloc Header:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
nexth != 0 && nexth != &this->base_;
nexth = nexth->next_block_)
nexth->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -148,13 +148,13 @@ ACE_Control_Block::ACE_Name_Node::dump (void) const
ACE_TRACE ("ACE_Name_Node");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("pointer = %x"), (const char *) this->pointer_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("pointer = %x"), (const char *) this->pointer_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT("\nname_ = (%x, %s)"),
+ ACE_TEXT("\nname_ = (%x, %s)"),
(const char *) this->name_,
(const char *) this->name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -165,8 +165,8 @@ ACE_PI_Control_Block::ACE_Malloc_Header::dump (void) const
ACE_TRACE ("ACE_Malloc_Header::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nsize = %d\n"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize = %d\n"), this->size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -174,20 +174,20 @@ void
ACE_PI_Control_Block::print_alignment_info (void)
{
ACE_TRACE ("ACE_Control_Block::print_alignment_info");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Start ---> ACE_PI_Control_Block::print_alignment_info:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Start ---> ACE_PI_Control_Block::print_alignment_info:\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Sizeof ptr: %d\n")
- ASYS_TEXT ("Sizeof size_t: %d\n")
- ASYS_TEXT ("Sizeof long: %d\n")
- ASYS_TEXT ("Sizeof double: %d\n")
- ASYS_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
- ASYS_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
- ASYS_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_PI_MALLOC_PADDING_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_SIZE: %d\n")
- ASYS_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
- ASYS_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
- ASYS_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
+ ACE_TEXT ("Sizeof ptr: %d\n")
+ ACE_TEXT ("Sizeof size_t: %d\n")
+ ACE_TEXT ("Sizeof long: %d\n")
+ ACE_TEXT ("Sizeof double: %d\n")
+ ACE_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
+ ACE_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
+ ACE_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_PI_MALLOC_PADDING_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_SIZE: %d\n")
+ ACE_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
+ ACE_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
+ ACE_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
sizeof (char *),
sizeof (size_t),
sizeof (long),
@@ -201,7 +201,7 @@ ACE_PI_Control_Block::print_alignment_info (void)
sizeof (ACE_Malloc_Header),
sizeof (ACE_PI_Control_Block)
));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("End <--- ACE_PI_Control_Block::print_alignment_info:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End <--- ACE_PI_Control_Block::print_alignment_info:\n")));
}
void
@@ -210,22 +210,22 @@ ACE_PI_Control_Block::dump (void) const
ACE_TRACE ("ACE_Control_Block::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Name Node:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
for (ACE_Name_Node *nextn = this->name_head_;
nextn != 0;
nextn = nextn->next_)
nextn->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
this->base_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nMalloc Header:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
nexth != 0 && nexth != &this->base_;
nexth = nexth->next_block_)
nexth->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -281,13 +281,13 @@ ACE_PI_Control_Block::ACE_Name_Node::dump (void) const
ACE_TRACE ("ACE_Name_Node");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("pointer = %x"), (const char *) this->pointer_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("pointer = %x"), (const char *) this->pointer_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT("\nname_ = (%x, %s)"),
+ ACE_TEXT("\nname_ = (%x, %s)"),
(const char *) this->name_,
(const char *) this->name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
@@ -398,10 +398,10 @@ ACE_Static_Allocator_Base::dump (void) const
ACE_TRACE ("ACE_Static_Base_Allocator::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\noffset_ = %d"), this->offset_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nsize_ = %d\n"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\noffset_ = %d"), this->offset_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize_ = %d\n"), this->size_));
ACE_HEX_DUMP ((LM_DEBUG, this->buffer_, this->size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -425,10 +425,10 @@ ACE_Malloc_Stats::dump (void) const
int ninuse = this->ninuse_.value ();
int nchunks = this->nchunks_.value ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("nblocks = %d"), nblocks));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nninuse = %d"), ninuse));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\nnchunks = %d"), nchunks));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("nblocks = %d"), nblocks));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nninuse = %d"), ninuse));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnchunks = %d"), nchunks));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index 16f878907d9..2007903d052 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -44,7 +44,7 @@ ACE_Cached_Allocator<T, ACE_LOCK>::~ACE_Cached_Allocator (void)
ACE_ALLOC_HOOK_DEFINE (ACE_Malloc_T)
template <class MALLOC>
-ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (LPCTSTR pool_name)
+ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const ACE_TCHAR *pool_name)
: allocator_ (pool_name)
{
ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
@@ -79,8 +79,8 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->memory_pool_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("cb_ptr_ = %x"), this->cb_ptr_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("cb_ptr_ = %x"), this->cb_ptr_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
this->cb_ptr_->dump ();
#if defined (ACE_HAS_MALLOC_STATS)
if (this->cb_ptr_ != 0)
@@ -101,14 +101,14 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::print_stats (void) const
return;
this->cb_ptr_->malloc_stats_.dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%P|%t) contents of freelist:\n")));
+ ACE_TEXT ("(%P|%t) contents of freelist:\n")));
for (MALLOC_HEADER *currp = this->cb_ptr_->freep_->next_block_;
;
currp = currp->next_block_)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%P|%t) ptr = %u, MALLOC_HEADER units = %d, byte units = %d\n"),
+ ACE_TEXT ("(%P|%t) ptr = %u, MALLOC_HEADER units = %d, byte units = %d\n"),
currp,
currp->size_,
currp->size_ * sizeof (MALLOC_HEADER)));
@@ -151,12 +151,12 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void)
first_time);
if (this->cb_ptr_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("init_acquire failed")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("init_acquire failed")),
-1);
else if (first_time)
{
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) first time in, control block = %u\n"), this->cb_ptr_));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) first time in, control block = %u\n"), this->cb_ptr_));
MALLOC_HEADER::init_ptr (&this->cb_ptr_->freep_,
&this->cb_ptr_->base_,
@@ -209,7 +209,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void)
}
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name)
+ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name)
: memory_pool_ (pool_name),
lock_ (pool_name == 0 ? 0 : ACE::basename (pool_name,
ACE_DIRECTORY_SEPARATOR_CHAR))
@@ -217,13 +217,13 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name)
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
}
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const ACE_MEM_POOL_OPTIONS *options)
: memory_pool_ (pool_name, options),
lock_ (lock_name != 0 ? lock_name : ACE::basename (pool_name,
@@ -232,14 +232,14 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name,
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p"),
- ASYS_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
+ ACE_TEXT ("%p"),
+ ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
}
#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const void *options)
: memory_pool_ (pool_name,
(const ACE_MEM_POOL_OPTIONS *) options),
@@ -248,8 +248,8 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (LPCTSTR pool_name,
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
if (this->open () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p"),
- ASYS_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
+ ACE_TEXT ("%p"),
+ ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
}
#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
@@ -266,7 +266,7 @@ template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove (void)
{
ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove");
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) destroying ACE_Malloc_T\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) destroying ACE_Malloc_T\n")));
int result = 0;
#if defined (ACE_HAS_MALLOC_STATS)
@@ -378,10 +378,15 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes)
currp = this->cb_ptr_->freep_;
}
else
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("malloc")),
- 0);
+ return 0;
+ // Shouldn't do this here because of errors with the wchar ver
+ // This is because ACE_ERROR_RETURN converts the __FILE__ to
+ // wchar before printing out. The compiler will complain
+ // about this since a destructor would present in a SEH block
+ //ACE_ERROR_RETURN ((LM_ERROR,
+ // ACE_TEXT ("(%P|%t) %p\n"),
+ // ACE_TEXT ("malloc")),
+ // 0);
}
prevp = currp;
currp = currp->next_block_;
@@ -691,8 +696,8 @@ ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->curr_->dump ();
this->guard_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("name_ = %s"), this->name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_ = %s"), this->name_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -784,8 +789,8 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->curr_->dump ();
this->guard_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("name_ = %s"), this->name_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_ = %s"), this->name_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
index 75d62e3494c..2a09d9db54e 100644
--- a/ace/Malloc_T.h
+++ b/ace/Malloc_T.h
@@ -113,10 +113,10 @@ public:
#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
// = Initialization.
- ACE_Allocator_Adapter (LPCTSTR pool_name = 0);
+ ACE_Allocator_Adapter (const ACE_TCHAR *pool_name = 0);
- ACE_Allocator_Adapter (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ ACE_Allocator_Adapter (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
MEMORY_POOL_OPTIONS options = 0)
: allocator_ (pool_name, lock_name, options)
{
@@ -269,14 +269,14 @@ public:
typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header MALLOC_HEADER;
// = Initialization and termination methods.
- ACE_Malloc_T (LPCTSTR pool_name = 0);
+ ACE_Malloc_T (const ACE_TCHAR *pool_name = 0);
// Initialize ACE_Malloc. This constructor passes <pool_name> to
// initialize the memory pool, and uses <ACE::basename> to
// automatically extract out the name used for the underlying lock
// name (if necessary).
- ACE_Malloc_T (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ ACE_Malloc_T (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const ACE_MEM_POOL_OPTIONS *options = 0);
// Initialize ACE_Malloc. This constructor passes <pool_name> to
// initialize the memory pool, and uses <lock_name> to automatically
@@ -285,8 +285,8 @@ public:
// initialize the underlying memory pool.
#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
- ACE_Malloc_T (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ ACE_Malloc_T (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const void *options = 0);
// This is necessary to work around template bugs with certain C++
// compilers.
@@ -556,14 +556,14 @@ class ACE_Malloc : public ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Blo
{
public:
// = Initialization and termination methods.
- ACE_Malloc (LPCTSTR pool_name = 0);
+ ACE_Malloc (const ACE_TCHAR *pool_name = 0);
// Initialize ACE_Malloc. This constructor passes <pool_name> to
// initialize the memory pool, and uses <ACE::basename> to
// automatically extract out the name used for the underlying lock
// name (if necessary).
- ACE_Malloc (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ ACE_Malloc (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const ACE_MEM_POOL_OPTIONS *options = 0);
// Initialize ACE_Malloc. This constructor passes <pool_name> to
// initialize the memory pool, and uses <lock_name> to automatically
@@ -572,8 +572,8 @@ public:
// initialize the underlying memory pool.
#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
- ACE_Malloc (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ ACE_Malloc (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const void *options = 0);
// This is necessary to work around template bugs with certain C++
// compilers.
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
index 40bd9db7f6a..fbb168d0859 100644
--- a/ace/Malloc_T.i
+++ b/ace/Malloc_T.i
@@ -200,14 +200,14 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::mutex (void)
}
template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (LPCTSTR pool_name)
+ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name)
: ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name)
{
}
template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const ACE_MEM_POOL_OPTIONS *options)
: ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name, lock_name, options)
{
@@ -215,8 +215,8 @@ ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (LPCTSTR pool_name,
#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (LPCTSTR pool_name,
- LPCTSTR lock_name,
+ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name,
+ const ACE_TCHAR *lock_name,
const void *options)
: ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name, lock_name, options)
{
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index 10b1080dcc5..63cd4983b28 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -554,11 +554,11 @@ template <class EXT_ID, class INT_ID> void
ACE_Map_Entry<EXT_ID, INT_ID>::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("next_ = %d"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("prev_ = %d"), this->prev_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_));
#if defined (ACE_HAS_LAZY_MAP_MANAGER)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("free_ = %d"), this->free_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("free_ = %d"), this->free_));
#endif /* ACE_HAS_LAZY_MAP_MANAGER */
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -568,8 +568,8 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK> void
ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("total_size_ = %d"), this->total_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d"), this->cur_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d"), this->total_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
this->allocator_->dump ();
this->lock_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -579,7 +579,7 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK> void
ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::dump_i (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("next_ = %d"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Map_Manager.i b/ace/Map_Manager.i
index 532eddae6e8..64eaca8af96 100644
--- a/ace/Map_Manager.i
+++ b/ace/Map_Manager.i
@@ -42,7 +42,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (size_t size,
cur_size_ (0)
{
if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Map_Manager\n")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Map_Manager\n")));
}
template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
@@ -53,7 +53,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (ACE_Allocator *alloc
cur_size_ (0)
{
if (this->open (ACE_DEFAULT_MAP_SIZE, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("ACE_Map_Manager\n")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Map_Manager\n")));
}
template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp
index bc6bb01a776..35df95724aa 100644
--- a/ace/Mem_Map.cpp
+++ b/ace/Mem_Map.cpp
@@ -18,12 +18,12 @@ ACE_Mem_Map::dump (void) const
ACE_TRACE ("ACE_Mem_Map::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base_addr_ = %x"), this->base_addr_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nfilename_ = %s"), this->filename_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nlength_ = %d"), this->length_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhandle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nfile_mapping_ = %d"), this->file_mapping_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nclose_handle_ = %d"), this->close_handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base_addr_ = %x"), this->base_addr_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfilename_ = %s"), this->filename_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlength_ = %d"), this->length_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhandle_ = %d"), this->handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfile_mapping_ = %d"), this->file_mapping_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nclose_handle_ = %d"), this->close_handle_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -169,7 +169,7 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
}
int
-ACE_Mem_Map::open (LPCTSTR file_name,
+ACE_Mem_Map::open (const ACE_TCHAR *file_name,
int flags,
int mode,
LPSECURITY_ATTRIBUTES sa)
@@ -196,7 +196,7 @@ ACE_Mem_Map::open (LPCTSTR file_name,
}
int
-ACE_Mem_Map::map (LPCTSTR file_name,
+ACE_Mem_Map::map (const ACE_TCHAR *file_name,
int len,
int flags,
int mode,
@@ -237,7 +237,7 @@ ACE_Mem_Map::ACE_Mem_Map (void)
// Map a file specified by FILE_NAME.
-ACE_Mem_Map::ACE_Mem_Map (LPCTSTR file_name,
+ACE_Mem_Map::ACE_Mem_Map (const ACE_TCHAR *file_name,
int len,
int flags,
int mode,
@@ -263,8 +263,8 @@ ACE_Mem_Map::ACE_Mem_Map (LPCTSTR file_name,
offset,
sa) < 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
}
// Map a file from an open file descriptor HANDLE. This function will
@@ -296,8 +296,8 @@ ACE_Mem_Map::ACE_Mem_Map (ACE_HANDLE handle,
offset,
sa) < 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
}
// Close down and remove the file from the file system.
diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h
index 754bb946f6e..7c6781c8ba6 100644
--- a/ace/Mem_Map.h
+++ b/ace/Mem_Map.h
@@ -48,7 +48,7 @@ public:
// Map a file from an open file descriptor <handle>. This function
// will lookup the length of the file if it is not given.
- ACE_Mem_Map (LPCTSTR filename,
+ ACE_Mem_Map (const ACE_TCHAR *filename,
int len = -1,
int flags = O_RDWR | O_CREAT,
int mode = ACE_DEFAULT_FILE_PERMS,
@@ -77,7 +77,7 @@ public:
LPSECURITY_ATTRIBUTES sa = 0);
// Remap the file associated with <handle_>.
- int map (LPCTSTR filename,
+ int map (const ACE_TCHAR *filename,
int len = -1,
int flags = O_RDWR | O_CREAT,
int mode = ACE_DEFAULT_FILE_PERMS,
@@ -91,7 +91,7 @@ public:
~ACE_Mem_Map (void);
// Destructor.
- int open (LPCTSTR filename,
+ int open (const ACE_TCHAR *filename,
int flags = O_RDWR | O_CREAT,
int mode = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
@@ -152,7 +152,7 @@ public:
ACE_HANDLE handle (void) const;
// Return the underlying <handle_>.
- const TCHAR *filename (void) const;
+ const ACE_TCHAR *filename (void) const;
// Return the name of file that is mapped (if any).
void dump (void) const;
@@ -165,7 +165,7 @@ private:
void *base_addr_;
// Base address of the memory-mapped file.
- TCHAR filename_[MAXPATHLEN + 1];
+ ACE_TCHAR filename_[MAXPATHLEN + 1];
// Name of the file that is mapped.
size_t length_;
diff --git a/ace/Mem_Map.i b/ace/Mem_Map.i
index 4b8069c6138..7448fcb4933 100644
--- a/ace/Mem_Map.i
+++ b/ace/Mem_Map.i
@@ -10,7 +10,7 @@ ACE_Mem_Map::handle (void) const
// Return the name of file that is mapped (if any).
-ACE_INLINE const TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_Mem_Map::filename (void) const
{
return this->filename_;
diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp
index 14381d3c17c..5b1cf7d68bc 100644
--- a/ace/Memory_Pool.cpp
+++ b/ace/Memory_Pool.cpp
@@ -24,7 +24,7 @@ ACE_Local_Memory_Pool::dump (void) const
ACE_TRACE ("ACE_Local_Memory_Pool::dump");
}
-ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (LPCTSTR ,
+ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const ACE_TCHAR *,
const OPTIONS *)
{
ACE_TRACE ("ACE_Local_Memory_Pool::ACE_Local_Memory_Pool");
@@ -46,7 +46,7 @@ ACE_Local_Memory_Pool::acquire (size_t nbytes,
if (this->allocated_chunks_.insert (cp.get ()) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) insertion into set failed\n")),
+ ACE_TEXT ("(%P|%t) insertion into set failed\n")),
0);
return cp.release ();
@@ -149,7 +149,7 @@ ACE_MMAP_Memory_Pool::protect (void *addr, size_t len, int prot)
return ACE_OS::mprotect (addr, len, prot);
}
-ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name,
+ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name,
const OPTIONS *options)
: base_addr_ (0),
flags_ (MAP_SHARED),
@@ -202,8 +202,8 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name,
MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX
{
ACE_ERROR ((LM_ERROR,
- "Temporary path too long, "
- "defaulting to current directory\n"));
+ ACE_TEXT ("Temporary path too long, ")
+ ACE_TEXT ("defaulting to current directory\n")));
this->backing_store_name_[0] = 0;
}
@@ -216,7 +216,7 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name,
else
ACE_OS::strncpy (this->backing_store_name_,
backing_store_name,
- (sizeof this->backing_store_name_ / sizeof (TCHAR)));
+ (sizeof this->backing_store_name_ / sizeof (ACE_TCHAR)));
#if !defined (ACE_WIN32) && !defined (CHORUS)
if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
@@ -263,7 +263,7 @@ ACE_MMAP_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,
"",
1) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("(%P|%t) %p\n"),
this->backing_store_name_),
-1);
}
@@ -295,7 +295,7 @@ ACE_MMAP_Memory_Pool::map_file (off_t map_size)
{
#if 0
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) addr = %u, base_addr = %u, map_size = %u, %p\n"),
+ ACE_TEXT ("(%P|%t) addr = %u, base_addr = %u, map_size = %u, %p\n"),
this->mmap_.addr (),
this->base_addr_,
map_size,
@@ -383,16 +383,16 @@ ACE_MMAP_Memory_Pool::init_acquire (size_t nbytes,
0,
this->sa_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("open")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")),
0);
return this->mmap_.addr ();
}
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("open")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")),
0);
}
@@ -419,7 +419,7 @@ int
ACE_MMAP_Memory_Pool::remap (void *addr)
{
ACE_TRACE ("ACE_MMAP_Memory_Pool::remap");
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Remapping with fault address at: %X\n"), addr));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Remapping with fault address at: %X\n"), addr));
off_t current_map_size = ACE_OS::filesize (this->mmap_.handle ());
// ACE_OS::lseek (this->mmap_.handle (), 0, SEEK_END);
@@ -470,9 +470,9 @@ ACE_MMAP_Memory_Pool::handle_signal (int signum, siginfo_t *siginfo, ucontext_t
if (signum != SIGSEGV)
return -1;
else
- ; // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) received %S\n"), signum));
+ ; // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) received %S\n"), signum));
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) new mapping address = %u\n"), (char *) this->base_addr_ + current_map_size));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) new mapping address = %u\n"), (char *) this->base_addr_ + current_map_size));
#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR)
// Make sure that the pointer causing the problem is within the
@@ -480,7 +480,7 @@ ACE_MMAP_Memory_Pool::handle_signal (int signum, siginfo_t *siginfo, ucontext_t
if (siginfo != 0)
{
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
if (this->remap ((void *) siginfo->si_addr) == -1)
return -1;
// ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) address %u out of range\n",
@@ -520,7 +520,7 @@ ACE_MMAP_Memory_Pool::handle_signal (int signum, siginfo_t *siginfo, ucontext_t
ACE_ALLOC_HOOK_DEFINE(ACE_Lite_MMAP_Memory_Pool)
-ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (LPCTSTR backing_store_name,
+ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name,
const OPTIONS *options)
: ACE_MMAP_Memory_Pool (backing_store_name, options)
{
@@ -552,7 +552,7 @@ ACE_Sbrk_Memory_Pool::acquire (size_t nbytes,
{
ACE_TRACE ("ACE_Sbrk_Memory_Pool::acquire");
rounded_bytes = this->round_up (nbytes);
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
void *cp = ACE_OS::sbrk (rounded_bytes);
if (cp == MAP_FAILED)
@@ -561,7 +561,7 @@ ACE_Sbrk_Memory_Pool::acquire (size_t nbytes,
cp),
0);
else
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d, new break = %u\n"), nbytes, rounded_bytes, cp));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d, new break = %u\n"), nbytes, rounded_bytes, cp));
return cp;
}
@@ -571,7 +571,7 @@ ACE_Sbrk_Memory_Pool::dump (void) const
ACE_TRACE ("ACE_Sbrk_Memory_Pool::dump");
}
-ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (LPCTSTR ,
+ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (const ACE_TCHAR *,
const OPTIONS *)
{
ACE_TRACE ("ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool");
@@ -621,11 +621,11 @@ ACE_Shared_Memory_Pool::in_use (off_t &offset,
{
if (ACE_OS::shmctl (st[counter].shmid_, IPC_STAT, &buf) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("shmctl")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("shmctl")),
-1);
offset += buf.shm_segsz;
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
}
return 0;
@@ -648,8 +648,8 @@ ACE_Shared_Memory_Pool::find_seg (const void* const searchPtr,
{
if (ACE_OS::shmctl (st[counter].shmid_, IPC_STAT, &buf) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("shmctl")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("shmctl")),
-1);
offset += buf.shm_segsz;
@@ -662,7 +662,7 @@ ACE_Shared_Memory_Pool::find_seg (const void* const searchPtr,
offset -= buf.shm_segsz;
return 0;
}
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
}
return 0;
@@ -695,8 +695,8 @@ ACE_Shared_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,
this->file_perms_ | IPC_CREAT | IPC_EXCL);
if (shmid == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("shmget")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("shmget")),
0);
st[counter].shmid_ = shmid;
st[counter].used_ = 1;
@@ -723,7 +723,7 @@ int
ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
{
ACE_TRACE ("ACE_Shared_Memory_Pool::handle_signal");
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("signal %S occurred\n"), signum));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("signal %S occurred\n"), signum));
#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR)
off_t offset;
@@ -732,12 +732,12 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
if (siginfo != 0)
{
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
size_t counter;
if (this->in_use (offset, counter) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("in_use")));
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("in_use")));
#if !defined(_UNICOS)
else if (!(siginfo->si_code == SEGV_MAPERR
&& siginfo->si_addr < (((char *) this->base_addr_) + offset)
@@ -770,8 +770,8 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
if (this->find_seg ((const void *)siginfo->si_addr, offset, counter) == -1)
#endif /* ! _UNICOS */
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("in_use")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("in_use")),
-1);
void *address = (void *) (((char *) this->base_addr_) + offset);
@@ -796,7 +796,7 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
return 0;
}
-ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (LPCTSTR backing_store_name,
+ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const ACE_TCHAR *backing_store_name,
const OPTIONS *options)
: base_addr_ (0),
file_perms_ (ACE_DEFAULT_FILE_PERMS),
@@ -846,8 +846,8 @@ ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (LPCTSTR backing_store_name,
if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Sig_Handler::register_handler")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Sig_Handler::register_handler")));
}
// Ask system for more shared memory.
@@ -860,14 +860,14 @@ ACE_Shared_Memory_Pool::acquire (size_t nbytes,
rounded_bytes = this->round_up (nbytes);
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
off_t offset;
if (this->commit_backing_store_name (rounded_bytes, offset) == -1)
return 0;
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
return ((char *) this->base_addr_) + offset;
}
@@ -895,8 +895,8 @@ ACE_Shared_Memory_Pool::init_acquire (size_t nbytes,
{
if (errno != EEXIST)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("shmget")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("shmget")),
0);
first_time = 0;
@@ -904,8 +904,8 @@ ACE_Shared_Memory_Pool::init_acquire (size_t nbytes,
if (shmid == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%P|%t) %p\n"),
- ASYS_TEXT ("shmget")),
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("shmget")),
0);
// This implementation doesn't care if we don't get the key we
@@ -1002,7 +1002,7 @@ ACE_Pagefile_Memory_Pool::release (void)
return this->unmap ();
}
-ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (LPCTSTR backing_store_name,
+ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_store_name,
const OPTIONS *options)
: shared_cb_ (0),
page_size_ (ACE_Pagefile_Memory_Pool::round_to_page_size (1)),
@@ -1028,7 +1028,7 @@ ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (LPCTSTR backing_store_name,
ACE_OS::strncpy (this->backing_store_name_,
backing_store_name,
- (sizeof this->backing_store_name_ / sizeof (TCHAR)));
+ (sizeof this->backing_store_name_ / sizeof (ACE_TCHAR)));
}
void *
@@ -1170,16 +1170,16 @@ ACE_Pagefile_Memory_Pool::map (int &first_time,
// Get an object handle to the named reserved memory object.
object_handle_ =
- ::CreateFileMapping ((HANDLE) 0xffffffff,
+ ACE_TEXT_CreateFileMapping ((HANDLE) 0xffffffff,
#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- &sa,
+ &sa,
#else
- NULL,
+ NULL,
#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
- PAGE_READWRITE | SEC_RESERVE,
- 0,
- this->local_cb_.sh_.max_size_,
- this->backing_store_name_);
+ PAGE_READWRITE | SEC_RESERVE,
+ 0,
+ this->local_cb_.sh_.max_size_,
+ this->backing_store_name_);
if (object_handle_ == 0)
return -1;
first_time =
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
index 3b1e28cb081..26d19faef84 100644
--- a/ace/Memory_Pool.h
+++ b/ace/Memory_Pool.h
@@ -49,7 +49,7 @@ class ACE_Export ACE_Sbrk_Memory_Pool
public:
typedef ACE_Sbrk_Memory_Pool_Options OPTIONS;
- ACE_Sbrk_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_Sbrk_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -143,7 +143,7 @@ class ACE_Export ACE_Shared_Memory_Pool : public ACE_Event_Handler
public:
typedef ACE_Shared_Memory_Pool_Options OPTIONS;
- ACE_Shared_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_Shared_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -268,7 +268,7 @@ class ACE_Export ACE_Local_Memory_Pool
public:
typedef ACE_Local_Memory_Pool_Options OPTIONS;
- ACE_Local_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_Local_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -387,7 +387,7 @@ public:
// = Initialization and termination methods.
- ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -490,7 +490,7 @@ protected:
off_t minimum_bytes_;
// What the minimum bytes of the initial segment should be.
- TCHAR backing_store_name_[MAXPATHLEN + 1];
+ ACE_TCHAR backing_store_name_[MAXPATHLEN + 1];
// Name of the backing store where the shared memory pool is kept.
int guess_on_fault_;
@@ -518,7 +518,7 @@ class ACE_Export ACE_Lite_MMAP_Memory_Pool : public ACE_MMAP_Memory_Pool
public:
// = Initialization and termination methods.
- ACE_Lite_MMAP_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_Lite_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -561,7 +561,7 @@ class ACE_Export ACE_Pagefile_Memory_Pool
public:
typedef ACE_Pagefile_Memory_Pool_Options OPTIONS;
- ACE_Pagefile_Memory_Pool (LPCTSTR backing_store_name = 0,
+ ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
const OPTIONS *options = 0);
// Initialize the pool.
@@ -661,7 +661,7 @@ private:
size_t page_size_;
// System page size.
- TCHAR backing_store_name_[MAXPATHLEN];
+ ACE_TCHAR backing_store_name_[MAXPATHLEN];
// Name of the backing store where the shared memory pool is kept.
};
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
index ec407943d8c..a26e910e344 100644
--- a/ace/Message_Block.cpp
+++ b/ace/Message_Block.cpp
@@ -128,15 +128,15 @@ ACE_Data_Block::dump (void) const
ACE_TRACE ("ACE_Data_Block::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("-----( Data Block )-----\n")
- ASYS_TEXT ("type_ = %d\n")
- ASYS_TEXT ("cur_size_ = %u\n")
- ASYS_TEXT ("max_size_ = %u\n")
- ASYS_TEXT ("flags_ = %u\n")
- ASYS_TEXT ("base_ = %u\n")
- ASYS_TEXT ("locking_strategy_ = %u\n")
- ASYS_TEXT ("reference_count_ = %u\n")
- ASYS_TEXT ("---------------------------\n"),
+ ACE_TEXT ("-----( Data Block )-----\n")
+ ACE_TEXT ("type_ = %d\n")
+ ACE_TEXT ("cur_size_ = %u\n")
+ ACE_TEXT ("max_size_ = %u\n")
+ ACE_TEXT ("flags_ = %u\n")
+ ACE_TEXT ("base_ = %u\n")
+ ACE_TEXT ("locking_strategy_ = %u\n")
+ ACE_TEXT ("reference_count_ = %u\n")
+ ACE_TEXT ("---------------------------\n"),
this->type_,
this->cur_size_,
this->max_size_,
@@ -154,14 +154,14 @@ ACE_Message_Block::dump (void) const
ACE_TRACE ("ACE_Message_Block::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("-----( Message Block )-----\n")
- ASYS_TEXT ("priority_ = %d\n")
- ASYS_TEXT ("next_ = %u\n")
- ASYS_TEXT ("prev_ = %u\n")
- ASYS_TEXT ("cont_ = %u\n")
- ASYS_TEXT ("rd_ptr_ = %u\n")
- ASYS_TEXT ("wr_ptr_ = %u\n")
- ASYS_TEXT ("---------------------------\n"),
+ ACE_TEXT ("-----( Message Block )-----\n")
+ ACE_TEXT ("priority_ = %d\n")
+ ACE_TEXT ("next_ = %u\n")
+ ACE_TEXT ("prev_ = %u\n")
+ ACE_TEXT ("cont_ = %u\n")
+ ACE_TEXT ("rd_ptr_ = %u\n")
+ ACE_TEXT ("wr_ptr_ = %u\n")
+ ACE_TEXT ("---------------------------\n"),
this->priority_,
this->next_,
this->prev_,
@@ -339,7 +339,7 @@ ACE_Message_Block::ACE_Message_Block (const char *data,
0, // data_block allocator
0) == -1) // message_block allocator
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Message_Block")));
+ ACE_TEXT ("ACE_Message_Block")));
}
ACE_Message_Block::ACE_Message_Block (ACE_Allocator *message_block_allocator)
@@ -361,7 +361,7 @@ ACE_Message_Block::ACE_Message_Block (ACE_Allocator *message_block_allocator)
0, // data_block allocator
message_block_allocator) == -1) // message_block allocator
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Message_Block")));
+ ACE_TEXT ("ACE_Message_Block")));
}
ACE_Message_Block::ACE_Message_Block (size_t size,
@@ -393,7 +393,7 @@ ACE_Message_Block::ACE_Message_Block (size_t size,
data_block_allocator,
message_block_allocator) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Message_Block")));
+ ACE_TEXT ("ACE_Message_Block")));
}
int
@@ -479,7 +479,7 @@ ACE_Message_Block::ACE_Message_Block (size_t size,
data_block_allocator,
message_block_allocator) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Message_Block")));
+ ACE_TEXT ("ACE_Message_Block")));
}
ACE_Message_Block::ACE_Message_Block (ACE_Data_Block *data_block,
@@ -502,7 +502,7 @@ ACE_Message_Block::ACE_Message_Block (ACE_Data_Block *data_block,
data_block->data_block_allocator (),
message_block_allocator) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Message_Block")));
+ ACE_TEXT ("ACE_Message_Block")));
}
int
@@ -1084,13 +1084,13 @@ ACE_Dynamic_Message_Strategy::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("static_bit_field_mask_ = %u\n")
- ASYS_TEXT ("static_bit_field_shift_ = %u\n")
- ASYS_TEXT ("dynamic_priority_max_ = %u\n")
- ASYS_TEXT ("dynamic_priority_offset_ = %u\n")
- ASYS_TEXT ("max_late_ = [%d sec, %d usec]\n")
- ASYS_TEXT ("min_pending_ = [%d sec, %d usec]\n")
- ASYS_TEXT ("pending_shift_ = [%d sec, %d usec]\n"),
+ ACE_TEXT ("static_bit_field_mask_ = %u\n")
+ ACE_TEXT ("static_bit_field_shift_ = %u\n")
+ ACE_TEXT ("dynamic_priority_max_ = %u\n")
+ ACE_TEXT ("dynamic_priority_offset_ = %u\n")
+ ACE_TEXT ("max_late_ = [%d sec, %d usec]\n")
+ ACE_TEXT ("min_pending_ = [%d sec, %d usec]\n")
+ ACE_TEXT ("pending_shift_ = [%d sec, %d usec]\n"),
this->static_bit_field_mask_,
this->static_bit_field_shift_,
this->dynamic_priority_max_,
@@ -1127,10 +1127,10 @@ ACE_Deadline_Message_Strategy::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
this->ACE_Dynamic_Message_Strategy::dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -1157,10 +1157,10 @@ ACE_Laxity_Message_Strategy::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
this->ACE_Dynamic_Message_Strategy::dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nderived class: ACE_Laxity_Message_Strategy\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Laxity_Message_Strategy\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp
index 634f8cd2307..95897147a25 100644
--- a/ace/Message_Queue.cpp
+++ b/ace/Message_Queue.cpp
@@ -23,14 +23,14 @@ ACE_Message_Queue_Vx::dump (void) const
ACE_TRACE ("ACE_Message_Queue_Vx::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- 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_length = %d\n")
- ASYS_TEXT ("cur_count = %d\n")
- ASYS_TEXT ("head_ = %u\n")
- ASYS_TEXT ("MSG_Q_ID = %u\n"),
+ ACE_TEXT ("deactivated = %d\n")
+ ACE_TEXT ("low_water_mark = %d\n")
+ ACE_TEXT ("high_water_mark = %d\n")
+ ACE_TEXT ("cur_bytes = %d\n")
+ ACE_TEXT ("cur_length = %d\n")
+ ACE_TEXT ("cur_count = %d\n")
+ ACE_TEXT ("head_ = %u\n")
+ ACE_TEXT ("MSG_Q_ID = %u\n"),
this->deactivated_,
this->low_water_mark_,
this->high_water_mark_,
@@ -52,7 +52,7 @@ ACE_Message_Queue_Vx::ACE_Message_Queue_Vx (size_t max_messages,
ACE_TRACE ("ACE_Message_Queue_Vx::ACE_Message_Queue_Vx");
if (this->open (max_messages_, max_message_length_, ns) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("open")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("open")));
}
ACE_Message_Queue_Vx::~ACE_Message_Queue_Vx (void)
@@ -60,7 +60,7 @@ ACE_Message_Queue_Vx::~ACE_Message_Queue_Vx (void)
ACE_TRACE ("ACE_Message_Queue_Vx::~ACE_Message_Queue_Vx");
if (this->tail_ != 0 && this->close () == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("close")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("close")));
}
// Don't bother locking since if someone calls this function more than
@@ -420,13 +420,13 @@ ACE_Message_Queue_NT::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("deactivated = %d\n")
- ASYS_TEXT ("max_cthrs_ = %d\n")
- ASYS_TEXT ("cur_thrs_ = %d\n")
- ASYS_TEXT ("cur_bytes = %d\n")
- ASYS_TEXT ("cur_length = %d\n")
- ASYS_TEXT ("cur_count = %d\n")
- ASYS_TEXT ("completion_port_ = %x\n"),
+ ACE_TEXT ("deactivated = %d\n")
+ ACE_TEXT ("max_cthrs_ = %d\n")
+ ACE_TEXT ("cur_thrs_ = %d\n")
+ ACE_TEXT ("cur_bytes = %d\n")
+ ACE_TEXT ("cur_length = %d\n")
+ ACE_TEXT ("cur_count = %d\n")
+ ACE_TEXT ("completion_port_ = %x\n"),
this->deactivated_,
this->max_cthrs_,
this->cur_thrs_,
diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp
index 7fa4e9d7702..7307e181361 100644
--- a/ace/Message_Queue_T.cpp
+++ b/ace/Message_Queue_T.cpp
@@ -119,14 +119,14 @@ 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,
- 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_length = %d\n")
- ASYS_TEXT ("cur_count = %d\n")
- ASYS_TEXT ("head_ = %u\n")
- ASYS_TEXT ("tail_ = %u\n"),
+ ACE_TEXT ("deactivated = %d\n")
+ ACE_TEXT ("low_water_mark = %d\n")
+ ACE_TEXT ("high_water_mark = %d\n")
+ ACE_TEXT ("cur_bytes = %d\n")
+ ACE_TEXT ("cur_length = %d\n")
+ ACE_TEXT ("cur_count = %d\n")
+ ACE_TEXT ("head_ = %u\n")
+ ACE_TEXT ("tail_ = %u\n"),
this->deactivated_,
this->low_water_mark_,
this->high_water_mark_,
@@ -135,9 +135,9 @@ ACE_Message_Queue<ACE_SYNCH_USE>::dump (void) const
this->cur_count_,
this->head_,
this->tail_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("not_full_cond: \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("not_full_cond: \n")));
not_full_cond_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("not_empty_cond: \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("not_empty_cond: \n")));
not_empty_cond_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -178,7 +178,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::ACE_Message_Queue (size_t hwm,
if (this->open (hwm, lwm, ns) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("open")));
+ ACE_TEXT ("open")));
}
template <ACE_SYNCH_DECL>
@@ -187,7 +187,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue (void)
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue");
if (this->head_ != 0 && this->close () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("close")));
+ ACE_TEXT ("close")));
}
// Don't bother locking since if someone calls this function more than
@@ -452,7 +452,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i (ACE_Message_Block *&first_item
{
if (this->head_ ==0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Attempting to dequeue from empty queue")),
+ ACE_TEXT ("Attempting to dequeue from empty queue")),
-1);
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i");
first_item = this->head_;
@@ -941,16 +941,16 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dump (void) const
ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Message_Queue<ACE_SYNCH_USE> (base class): \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Message_Queue<ACE_SYNCH_USE> (base class): \n")));
this->ACE_Message_Queue<ACE_SYNCH_USE>::dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("pending_head_ = %u\n")
- ASYS_TEXT ("pending_tail_ = %u\n")
- ASYS_TEXT ("late_head_ = %u\n")
- ASYS_TEXT ("late_tail_ = %u\n")
- ASYS_TEXT ("beyond_late_head_ = %u\n")
- ASYS_TEXT ("beyond_late_tail_ = %u\n"),
+ ACE_TEXT ("pending_head_ = %u\n")
+ ACE_TEXT ("pending_tail_ = %u\n")
+ ACE_TEXT ("late_head_ = %u\n")
+ ACE_TEXT ("late_tail_ = %u\n")
+ ACE_TEXT ("beyond_late_head_ = %u\n")
+ ACE_TEXT ("beyond_late_tail_ = %u\n"),
this->pending_head_,
this->pending_tail_,
this->late_head_,
@@ -958,7 +958,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dump (void) const
this->beyond_late_head_,
this->beyond_late_tail_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("message_strategy_ : \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("message_strategy_ : \n")));
message_strategy_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -1356,7 +1356,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_pending_queue (const ACE_Time_
{
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
+ ACE_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
(int) current_status),
-1);
}
@@ -1398,7 +1398,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_pending_queue (const ACE_Time_
if (current_status != ACE_Dynamic_Message_Strategy::PENDING)
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN((LM_ERROR,
- ASYS_TEXT ("Unexpected message priority status [%d] (expected PENDING)"),
+ ACE_TEXT ("Unexpected message priority status [%d] (expected PENDING)"),
(int) current_status),
-1);
@@ -1420,7 +1420,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_pending_queue (const ACE_Time_
default:
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN((LM_ERROR,
- ASYS_TEXT ("Unknown message priority status [%d]"),
+ ACE_TEXT ("Unknown message priority status [%d]"),
(int) current_status),
-1);
}
@@ -1476,7 +1476,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_late_queue (const ACE_Time_Val
else if (current_status != ACE_Dynamic_Message_Strategy::LATE)
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
+ ACE_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
(int) current_status),
-1);
}
@@ -1497,14 +1497,14 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_late_queue (const ACE_Time_Val
case ACE_Dynamic_Message_Strategy::PENDING:
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Unexpected message priority status ")
- ASYS_TEXT ("[%d] (expected LATE or BEYOND_LATE)"),
+ ACE_TEXT ("Unexpected message priority status ")
+ ACE_TEXT ("[%d] (expected LATE or BEYOND_LATE)"),
(int) current_status),
-1);
default:
// if we got here, something is *seriously* wrong with the queue
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Unknown message priority status [%d]"),
+ ACE_TEXT ("Unknown message priority status [%d]"),
(int) current_status),
-1);
}
diff --git a/ace/Module.cpp b/ace/Module.cpp
index 39a0ec71ea6..9ac03b7e1cb 100644
--- a/ace/Module.cpp
+++ b/ace/Module.cpp
@@ -82,7 +82,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 ASYS_TCHAR *mod_name,
+ACE_Module<ACE_SYNCH_USE>::open (const ACE_TCHAR *mod_name,
ACE_Task<ACE_SYNCH_USE> *writer_q,
ACE_Task<ACE_SYNCH_USE> *reader_q,
void *arg,
@@ -177,7 +177,7 @@ ACE_Module<ACE_SYNCH_USE>::~ACE_Module (void)
}
template <ACE_SYNCH_DECL>
-ACE_Module<ACE_SYNCH_USE>::ACE_Module (const ASYS_TCHAR *mod_name,
+ACE_Module<ACE_SYNCH_USE>::ACE_Module (const ACE_TCHAR *mod_name,
ACE_Task<ACE_SYNCH_USE> *writer_q,
ACE_Task<ACE_SYNCH_USE> *reader_q,
void *args,
@@ -191,8 +191,8 @@ ACE_Module<ACE_SYNCH_USE>::ACE_Module (const ASYS_TCHAR *mod_name,
if (this->open (mod_name, writer_q, reader_q, args, flags) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Module")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Module")));
}
template <ACE_SYNCH_DECL> int
diff --git a/ace/Module.h b/ace/Module.h
index 0fc5363ae1a..7a28201b83c 100644
--- a/ace/Module.h
+++ b/ace/Module.h
@@ -77,7 +77,7 @@ public:
~ACE_Module (void);
// Shutdown the Module.
- ACE_Module (const ASYS_TCHAR *module_name,
+ ACE_Module (const ACE_TCHAR *module_name,
ACE_Task<ACE_SYNCH_USE> *writer = 0,
ACE_Task<ACE_SYNCH_USE> *reader = 0,
void *args = 0,
@@ -85,7 +85,7 @@ public:
// Create an initialized module with <module_name> as its identity
// and <reader> and <writer> as its tasks.
- int open (const ASYS_TCHAR *module_name,
+ int open (const ACE_TCHAR *module_name,
ACE_Task<ACE_SYNCH_USE> *writer = 0,
ACE_Task<ACE_SYNCH_USE> *reader = 0,
void *a = 0,
@@ -128,9 +128,9 @@ public:
// Set and get pointer to sibling <ACE_Task> in an <ACE_Module>
// = Identify the module
- const ASYS_TCHAR *name (void) const;
+ const ACE_TCHAR *name (void) const;
// Get the module name.
- void name (const ASYS_TCHAR *);
+ void name (const ACE_TCHAR *);
// Set the module name.
// = Argument to the Tasks.
@@ -164,7 +164,7 @@ private:
// Pair of Tasks that form the "read-side" and "write-side" of the
// ACE_Module partitioning.
- ASYS_TCHAR name_[MAXNAMLEN + 1];
+ ACE_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 d13b06feb0c..f1c60bb90eb 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 ASYS_TCHAR *
+template <ACE_SYNCH_DECL> ACE_INLINE const ACE_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 ASYS_TCHAR *n)
+ACE_Module<ACE_SYNCH_USE>::name (const ACE_TCHAR *n)
{
ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::name");
ACE_OS::strncpy (this->name_, n, MAXNAMLEN);
diff --git a/ace/NT_Service.cpp b/ace/NT_Service.cpp
index 13958ad2ccc..b65b24e0ee2 100644
--- a/ace/NT_Service.cpp
+++ b/ace/NT_Service.cpp
@@ -132,7 +132,7 @@ ACE_NT_Service::interrogate_requested (DWORD)
}
void
-ACE_NT_Service::name (LPCTSTR name, LPCTSTR desc)
+ACE_NT_Service::name (const ACE_TCHAR *name, const ACE_TCHAR *desc)
{
delete [] desc_;
delete [] name_;
@@ -145,7 +145,7 @@ ACE_NT_Service::name (LPCTSTR name, LPCTSTR desc)
}
void
-ACE_NT_Service::host (LPCTSTR host)
+ACE_NT_Service::host (const ACE_TCHAR *host)
{
delete [] host_;
@@ -168,38 +168,41 @@ ACE_NT_Service::host (LPCTSTR host)
int
ACE_NT_Service::insert (DWORD start_type,
DWORD error_control,
- LPCTSTR exe_path,
- LPCTSTR group_name,
+ const ACE_TCHAR *exe_path,
+ const ACE_TCHAR *group_name,
LPDWORD tag_id,
- LPCTSTR dependencies,
- LPCTSTR account_name,
- LPCTSTR password)
+ const ACE_TCHAR *dependencies,
+ const ACE_TCHAR *account_name,
+ const ACE_TCHAR *password)
{
- TCHAR this_exe[MAXPATHLEN];
+ ACE_TCHAR this_exe[MAXPATHLEN];
if (exe_path == 0)
{
- if (GetModuleFileName (0, this_exe, sizeof this_exe) == 0)
+ if (ACE_TEXT_GetModuleFileName (0, this_exe, sizeof this_exe) == 0)
return -1;
exe_path = this_exe;
}
- SC_HANDLE sc_mgr = OpenSCManager (this->host (), 0, SC_MANAGER_ALL_ACCESS);
+ SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
+ 0,
+ SC_MANAGER_ALL_ACCESS);
if (sc_mgr == 0)
return -1;
- SC_HANDLE sh = CreateService (sc_mgr,
- this->name (),
- this->desc (),
- SERVICE_ALL_ACCESS,
- svc_status_.dwServiceType,
- start_type,
- error_control,
- exe_path,
- group_name,
- tag_id,
- dependencies,
- account_name, password);
+ SC_HANDLE sh = ACE_TEXT_CreateService (sc_mgr,
+ this->name (),
+ this->desc (),
+ SERVICE_ALL_ACCESS,
+ svc_status_.dwServiceType,
+ start_type,
+ error_control,
+ exe_path,
+ group_name,
+ tag_id,
+ dependencies,
+ account_name,
+ password);
CloseServiceHandle (sc_mgr);
if (sh == 0)
return -1;
@@ -275,13 +278,13 @@ ACE_NT_Service::startup (void)
int
ACE_NT_Service::start_svc (ACE_Time_Value *wait_time,
DWORD *svc_state,
- DWORD argc, LPCTSTR *argv)
+ DWORD argc, const ACE_TCHAR **argv)
{
SC_HANDLE svc = this->svc_sc_handle ();
if (svc == 0)
return -1;
- if (!StartService (svc, argc, argv))
+ if (!ACE_TEXT_StartService (svc, argc, argv))
return -1;
wait_for_service_state (SERVICE_RUNNING, wait_time);
@@ -396,14 +399,14 @@ ACE_NT_Service::test_access (DWORD desired_access)
{
int status = -1; // Guilty until proven innocent
- SC_HANDLE sc_mgr = OpenSCManager (this->host (),
- 0,
- GENERIC_READ);
+ SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
+ 0,
+ GENERIC_READ);
if (sc_mgr != 0)
{
- SC_HANDLE handle = OpenService (sc_mgr,
- this->name (),
- desired_access);
+ SC_HANDLE handle = ACE_TEXT_OpenService (sc_mgr,
+ this->name (),
+ desired_access);
CloseServiceHandle (sc_mgr);
if (handle != 0)
{
@@ -469,14 +472,14 @@ ACE_NT_Service::svc_sc_handle (void)
{
if (svc_sc_handle_ == 0)
{
- SC_HANDLE sc_mgr = OpenSCManager (this->host (),
- 0,
- SC_MANAGER_ALL_ACCESS);
+ SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
+ 0,
+ SC_MANAGER_ALL_ACCESS);
if (sc_mgr != 0)
{
- svc_sc_handle_ = OpenService (sc_mgr,
- this->name (),
- SERVICE_ALL_ACCESS);
+ svc_sc_handle_ = ACE_TEXT_OpenService (sc_mgr,
+ this->name (),
+ SERVICE_ALL_ACCESS);
CloseServiceHandle (sc_mgr);
}
}
diff --git a/ace/NT_Service.h b/ace/NT_Service.h
index 575c7c67096..9f01164c623 100644
--- a/ace/NT_Service.h
+++ b/ace/NT_Service.h
@@ -102,8 +102,8 @@ public:
DWORD controls_mask = SERVICE_ACCEPT_STOP);
// Constructor primarily for use when running the service.
- ACE_NT_Service (LPCTSTR name,
- LPCTSTR desc = 0,
+ ACE_NT_Service (const ACE_TCHAR *name,
+ const ACE_TCHAR *desc = 0,
DWORD start_timeout = ACE_NT_SERVICE_START_TIMEOUT,
DWORD service_type = SERVICE_WIN32_OWN_PROCESS,
DWORD controls_mask = SERVICE_ACCEPT_STOP);
@@ -145,30 +145,30 @@ public:
// are used to register/insert and remove the service's definition in the
// SCM registry.
- void name (LPCTSTR name, LPCTSTR desc = 0);
+ void name (const ACE_TCHAR *name, const ACE_TCHAR *desc = 0);
// Sets the name and description for the service.
// If desc is 0, it takes the same value as name.
- LPCTSTR name (void) const;
+ const ACE_TCHAR *name (void) const;
// Get the service name.
- LPCTSTR desc (void) const;
+ const ACE_TCHAR *desc (void) const;
// Get the service description.
- void host (LPCTSTR host);
+ void host (const ACE_TCHAR *host);
// Sets the host machine
- LPCTSTR host (void) const;
+ const ACE_TCHAR *host (void) const;
// Get the host machine.
int insert (DWORD start_type = SERVICE_DEMAND_START,
DWORD error_control = SERVICE_ERROR_IGNORE,
- LPCTSTR exe_path = 0,
- LPCTSTR group_name = 0,
+ const ACE_TCHAR *exe_path = 0,
+ const ACE_TCHAR *group_name = 0,
LPDWORD tag_id = 0,
- LPCTSTR dependencies = 0,
- LPCTSTR account_name = 0,
- LPCTSTR password = 0);
+ const ACE_TCHAR *dependencies = 0,
+ const ACE_TCHAR *account_name = 0,
+ const ACE_TCHAR *password = 0);
// Insert (create) the service in the NT Service Control Manager,
// with the given creation values. exe_path defaults to the path name
// of the program that calls the function. All other 0-defaulted arguments
@@ -217,7 +217,7 @@ public:
int start_svc (ACE_Time_Value *wait_time = 0,
DWORD *svc_state = 0,
- DWORD argc = 0, LPCTSTR *argv = 0);
+ DWORD argc = 0, const ACE_TCHAR **argv = 0);
// Start the service (must have been inserted before). wait_time is
// the time to wait for the service to reach a steady state before
// returning. If it is 0, the function waits as long as it takes
@@ -307,9 +307,9 @@ protected:
SC_HANDLE svc_sc_handle_;
// Service's SCM handle
- LPTSTR name_;
- LPTSTR desc_;
- LPTSTR host_;
+ ACE_TCHAR *name_;
+ ACE_TCHAR *desc_;
+ ACE_TCHAR *host_;
};
@@ -326,7 +326,8 @@ protected:
VOID WINAPI ace_nt_svc_handler_##SVCNAME (DWORD fdwControl) { \
_ace_nt_svc_obj_##SVCNAME->handle_control(fdwControl); \
} \
- VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, LPTSTR *lpszArgv) { \
+ VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \
+ ACE_TCHAR **lpszArgv) { \
int delete_svc_obj = 0; \
if (_ace_nt_svc_obj_##SVCNAME == 0) { \
ACE_NEW (_ace_nt_svc_obj_##SVCNAME, SVCCLASS); \
@@ -350,7 +351,8 @@ protected:
#define ACE_NT_SERVICE_REFERENCE(SVCNAME) \
extern ACE_NT_Service * _ace_nt_svc_obj_##SVCNAME; \
-extern VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, LPTSTR *lpszArgv);
+extern VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \
+ ACE_TCHAR **lpszArgv);
#define ACE_NT_SERVICE_ENTRY(SVCDESC, SVCNAME) \
{ SVCDESC, &ace_nt_svc_main_##SVCNAME }
diff --git a/ace/NT_Service.i b/ace/NT_Service.i
index 65083170e94..5a465066727 100644
--- a/ace/NT_Service.i
+++ b/ace/NT_Service.i
@@ -22,8 +22,8 @@ ACE_NT_Service::ACE_NT_Service (DWORD start_timeout,
ACE_INLINE
-ACE_NT_Service::ACE_NT_Service (LPCTSTR name,
- LPCTSTR desc,
+ACE_NT_Service::ACE_NT_Service (const ACE_TCHAR *name,
+ const ACE_TCHAR *desc,
DWORD start_timeout,
DWORD service_type,
DWORD controls_mask) :
@@ -51,21 +51,21 @@ ACE_NT_Service::svc (void)
ACE_INLINE
-LPCTSTR
+const ACE_TCHAR *
ACE_NT_Service::name (void) const
{
return name_;
}
ACE_INLINE
-LPCTSTR
+const ACE_TCHAR *
ACE_NT_Service::desc (void) const
{
return desc_;
}
ACE_INLINE
-LPCTSTR
+const ACE_TCHAR *
ACE_NT_Service::host (void) const
{
return host_;
diff --git a/ace/Name_Proxy.cpp b/ace/Name_Proxy.cpp
index c776e9cd50c..1868e56f850 100644
--- a/ace/Name_Proxy.cpp
+++ b/ace/Name_Proxy.cpp
@@ -13,7 +13,7 @@ ACE_Name_Proxy::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->connector_.dump ();
this->peer_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("reactor_ = %x"), this->reactor_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("reactor_ = %x"), this->reactor_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -52,8 +52,8 @@ ACE_Name_Proxy::ACE_Name_Proxy (const ACE_INET_Addr &remote_addr,
if (this->open (remote_addr, options) == -1
&& options[ACE_Synch_Options::USE_TIMEOUT] && errno != EWOULDBLOCK)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Name_Proxy::ACE_Name_Proxy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Name_Proxy::ACE_Name_Proxy")));
}
// Obtain underlying handle.
@@ -74,16 +74,16 @@ ACE_Name_Proxy::request_reply (ACE_Name_Request &request)
if (length == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("encode failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("encode failed")),
-1);
// Transmit request via a blocking send.
if (this->peer_.send_n (buffer, length) != length)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("send_n failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("send_n failed")),
-1);
else
{
@@ -94,13 +94,13 @@ ACE_Name_Proxy::request_reply (ACE_Name_Request &request)
if (this->peer_.recv_n (&reply,
sizeof reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("recv failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("recv failed")),
-1);
else if (reply.decode () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("decode failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("decode failed")),
-1);
errno = int (reply.errnum ());
return reply.status ();
@@ -116,16 +116,16 @@ ACE_Name_Proxy::send_request (ACE_Name_Request &request)
if (length == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("encode failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("encode failed")),
-1);
// Transmit request via a blocking send.
else if (this->peer_.send_n (buffer, length) != length)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("send_n failed")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("send_n failed")),
-1);
return 0;
}
@@ -144,11 +144,11 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
case -1:
// FALLTHROUGH
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("****************** recv_reply returned -1\n")));
+ ACE_TEXT ("****************** recv_reply returned -1\n")));
default:
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p got %d bytes, expected %d bytes\n"),
- ASYS_TEXT ("recv failed"),
+ ACE_TEXT ("%p got %d bytes, expected %d bytes\n"),
+ ACE_TEXT ("recv failed"),
n,
sizeof (ACE_UINT32)));
// FALLTHROUGH
@@ -171,8 +171,8 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
if (n != ssize_t (length - sizeof (ACE_UINT32)))
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p expected %d, got %d\n"),
- ASYS_TEXT ("invalid length"),
+ ACE_TEXT ("%p expected %d, got %d\n"),
+ ACE_TEXT ("invalid length"),
length,
n));
return -1;
@@ -182,8 +182,8 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
if (reply.decode () == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("decode failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("decode failed")));
return -1;
}
}
diff --git a/ace/Name_Request_Reply.cpp b/ace/Name_Request_Reply.cpp
index 3a2fcec9543..511d2632c59 100644
--- a/ace/Name_Request_Reply.cpp
+++ b/ace/Name_Request_Reply.cpp
@@ -318,82 +318,82 @@ ACE_Name_Request::dump (void) const
{
ACE_TRACE ("ACE_Name_Request::dump");
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("*******\nlength = %d\n"),
+ ACE_TEXT ("*******\nlength = %d\n"),
this->length ()));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("message-type = ")));
+ ACE_TEXT ("message-type = ")));
switch (this->msg_type ())
{
case ACE_Name_Request::BIND:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("BIND\n")));
+ ACE_TEXT ("BIND\n")));
break;
case ACE_Name_Request::REBIND:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("REBIND\n")));
+ ACE_TEXT ("REBIND\n")));
break;
case ACE_Name_Request::RESOLVE:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("RESOLVE\n")));
+ ACE_TEXT ("RESOLVE\n")));
break;
case ACE_Name_Request::UNBIND:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("UNBIND\n")));
+ ACE_TEXT ("UNBIND\n")));
break;
case ACE_Name_Request::LIST_NAMES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_NAMES\n")));
+ ACE_TEXT ("LIST_NAMES\n")));
break;
case ACE_Name_Request::LIST_VALUES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_VALUES\n")));
+ ACE_TEXT ("LIST_VALUES\n")));
break;
case ACE_Name_Request::LIST_TYPES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_TYPES\n")));
+ ACE_TEXT ("LIST_TYPES\n")));
break;
case ACE_Name_Request::LIST_NAME_ENTRIES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_NAME_ENTRIES\n")));
+ ACE_TEXT ("LIST_NAME_ENTRIES\n")));
break;
case ACE_Name_Request::LIST_VALUE_ENTRIES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_VALUE_ENTRIES\n")));
+ ACE_TEXT ("LIST_VALUE_ENTRIES\n")));
break;
case ACE_Name_Request::LIST_TYPE_ENTRIES:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("LIST_TYPE_ENTRIES\n")));
+ ACE_TEXT ("LIST_TYPE_ENTRIES\n")));
break;
default:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("<unknown type> = %d\n"),
+ ACE_TEXT ("<unknown type> = %d\n"),
this->msg_type ()));
break;
}
if (this->block_forever ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("blocking forever\n")));
+ ACE_TEXT ("blocking forever\n")));
else
{
#if !defined (ACE_NLOGGING)
ACE_Time_Value tv = this->timeout ();
#endif /* ! ACE_NLOGGING */
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("waiting for %d secs and %d usecs\n"),
+ ACE_TEXT ("waiting for %d secs and %d usecs\n"),
tv.sec (),
tv.usec ()));
}
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("*******\nname_len = %d\n"),
+ ACE_TEXT ("*******\nname_len = %d\n"),
this->name_len ()));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("*******\nvalue_len = %d\n"),
+ ACE_TEXT ("*******\nvalue_len = %d\n"),
this->value_len ()));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("+++++++\n")));
+ ACE_TEXT ("+++++++\n")));
}
// Default constructor.
@@ -531,24 +531,24 @@ ACE_Name_Reply::dump (void) const
{
ACE_TRACE ("ACE_Name_Reply::dump");
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("*******\nlength = %d\nerrnum = %d"),
+ ACE_TEXT ("*******\nlength = %d\nerrnum = %d"),
this->length (),
this->errnum ()));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("type = ")));
+ ACE_TEXT ("type = ")));
switch (this->msg_type ())
{
case 0:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("SUCCESS\n")));
+ ACE_TEXT ("SUCCESS\n")));
break;
case -1:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("FAILURE\n")));
+ ACE_TEXT ("FAILURE\n")));
break;
default:
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("<unknown type> = %d\n"),
+ ACE_TEXT ("<unknown type> = %d\n"),
this->msg_type ()));
break;
}
diff --git a/ace/Name_Space.cpp b/ace/Name_Space.cpp
index 679b12dba7d..1531654ae2b 100644
--- a/ace/Name_Space.cpp
+++ b/ace/Name_Space.cpp
@@ -3,6 +3,8 @@
#include "ace/Name_Space.h"
+#if defined (ACE_HAS_WCHAR)
+
ACE_RCSID(ace, Name_Space, "$Id$")
ACE_Name_Binding::ACE_Name_Binding (void)
@@ -59,3 +61,5 @@ ACE_Name_Space::~ACE_Name_Space (void)
{
ACE_TRACE ("ACE_Name_Space::~ACE_Name_Space");
}
+
+#endif /* ACE_HAS_WCHAR */
diff --git a/ace/Name_Space.h b/ace/Name_Space.h
index 97e7a7b954c..a2efb5c4da1 100644
--- a/ace/Name_Space.h
+++ b/ace/Name_Space.h
@@ -24,6 +24,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if defined (ACE_HAS_WCHAR)
+
#include "ace/SString.h"
#include "ace/Containers.h"
#include "ace/Name_Proxy.h"
@@ -147,5 +149,7 @@ public:
// Dump the state of the object
};
+#endif /* ACE_HAS_WCHAR */
+
#include "ace/post.h"
#endif /* ACE_NAME_SPACE_H */
diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp
index 285dbdad540..03dfaf074ad 100644
--- a/ace/Naming_Context.cpp
+++ b/ace/Naming_Context.cpp
@@ -9,6 +9,8 @@
ACE_RCSID(ace, Naming_Context, "$Id$")
+#if defined (ACE_HAS_WCHAR)
+
// Make life easier later on...
typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
@@ -48,7 +50,7 @@ ACE_Naming_Context::local (void)
{
ACE_TRACE ("ACE_Naming_Context::local");
return ACE_OS::strcmp (this->netnameserver_host_,
- ASYS_TEXT ("localhost")) == 0
+ ACE_TEXT ("localhost")) == 0
|| ACE_OS::strcmp (this->netnameserver_host_,
this->hostname_) == 0;
}
@@ -58,7 +60,7 @@ ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
{
ACE_TRACE ("ACE_Naming_Context::open");
ACE_OS::hostname (this->hostname_,
- (sizeof this->hostname_ / sizeof (ASYS_TCHAR)));
+ (sizeof this->hostname_ / sizeof (ACE_TCHAR)));
this->netnameserver_host_ =
this->name_options_->nameserver_host ();
@@ -102,7 +104,7 @@ ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
if (ACE_LOG_MSG->op_status () != 0 || this->name_space_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("NAME_SPACE::NAME_SPACE\n")),
+ ACE_TEXT ("NAME_SPACE::NAME_SPACE\n")),
-1);
return 0;
}
@@ -152,8 +154,8 @@ ACE_Naming_Context::ACE_Naming_Context (Context_Scope_Type scope_in,
// Initialize.
if (this->open (scope_in, lite) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Naming_Context::ACE_Naming_Context")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Naming_Context::ACE_Naming_Context")));
}
ACE_Name_Options *
@@ -383,11 +385,11 @@ ACE_Naming_Context::dump ()
}
int
-ACE_Naming_Context::init (int argc, ASYS_TCHAR *argv[])
+ACE_Naming_Context::init (int argc, ACE_TCHAR *argv[])
{
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("ACE_Naming_Context::init\n")));
+ ACE_TEXT ("ACE_Naming_Context::init\n")));
this->name_options_->parse_args (argc, argv);
return this->open (this->name_options_->context ());
}
@@ -397,7 +399,7 @@ ACE_Naming_Context::fini (void)
{
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("ACE_Naming_Context::fini\n")));
+ ACE_TEXT ("ACE_Naming_Context::fini\n")));
this->close_down ();
return 0;
}
@@ -417,8 +419,8 @@ ACE_Name_Options::ACE_Name_Options (void)
#if defined (ACE_DEFAULT_NAMESPACE_DIR)
this->namespace_dir_ = ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR);
#else /* ACE_DEFAULT_NAMESPACE_DIR */
- size_t pathsize = (MAXPATHLEN + 1) * sizeof (TCHAR);
- this->namespace_dir_ = ACE_static_cast (TCHAR *, ACE_OS::malloc (pathsize));
+ size_t pathsize = (MAXPATHLEN + 1) * sizeof (ACE_TCHAR);
+ this->namespace_dir_ = ACE_static_cast (ACE_TCHAR *, ACE_OS::malloc (pathsize));
if (ACE::get_temp_dir (this->namespace_dir_, MAXPATHLEN) == -1)
{
@@ -456,7 +458,7 @@ ACE_Name_Options::nameserver_port (void)
}
void
-ACE_Name_Options::namespace_dir (LPCTSTR dir)
+ACE_Name_Options::namespace_dir (const ACE_ACE_TCHAR *dir)
{
ACE_TRACE ("ACE_Name_Options::namespace_dir");
ACE_OS::free ((void *) this->namespace_dir_ );
@@ -464,30 +466,30 @@ ACE_Name_Options::namespace_dir (LPCTSTR dir)
}
void
-ACE_Name_Options::process_name (LPCTSTR pname)
+ACE_Name_Options::process_name (const ACE_ACE_TCHAR *pname)
{
ACE_TRACE ("ACE_Name_Options::process_name");
- LPCTSTR t = ACE::basename (pname, ACE_DIRECTORY_SEPARATOR_CHAR);
+ const ACE_ACE_TCHAR *t = ACE::basename (pname, ACE_DIRECTORY_SEPARATOR_CHAR);
ACE_OS::free ((void *) this->process_name_ );
this->process_name_ = ACE_OS::strdup (t);
}
void
-ACE_Name_Options::nameserver_host (const ASYS_TCHAR *host)
+ACE_Name_Options::nameserver_host (const ACE_TCHAR *host)
{
ACE_TRACE ("ACE_Name_Options::nameserver_host");
ACE_OS::free ((void *) this->nameserver_host_);
this->nameserver_host_ = ACE_OS::strdup (host);
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Name_Options::nameserver_host (void)
{
ACE_TRACE ("ACE_Name_Options::nameserver_host");
return this->nameserver_host_;
}
-LPCTSTR
+const ACE_ACE_TCHAR *
ACE_Name_Options::database (void)
{
ACE_TRACE ("ACE_Name_Options::database");
@@ -495,7 +497,7 @@ ACE_Name_Options::database (void)
}
void
-ACE_Name_Options::database (LPCTSTR db)
+ACE_Name_Options::database (const ACE_ACE_TCHAR *db)
{
ACE_TRACE ("ACE_Name_Options::database");
ACE_OS::free ((void *) this->database_);
@@ -537,14 +539,14 @@ ACE_Name_Options::context (ACE_Naming_Context::Context_Scope_Type context)
this->context_ = context;
}
-LPCTSTR
+const ACE_ACE_TCHAR *
ACE_Name_Options::process_name (void)
{
ACE_TRACE ("ACE_Name_Options::process_name");
return this->process_name_;
}
-LPCTSTR
+const ACE_ACE_TCHAR *
ACE_Name_Options::namespace_dir (void)
{
ACE_TRACE ("ACE_Name_Options::namespace_dir");
@@ -580,7 +582,7 @@ ACE_Name_Options::verbose (void)
}
void
-ACE_Name_Options::parse_args (int argc, ASYS_TCHAR *argv[])
+ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_TRACE ("ACE_Name_Options::parse_args");
ACE_LOG_MSG->open (argv[0]);
@@ -594,18 +596,18 @@ ACE_Name_Options::parse_args (int argc, ASYS_TCHAR *argv[])
// clean it up in the destructor).
this->database (this->process_name ());
- ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("b:c:dh:l:P:p:s:T:vr"));
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("b:c:dh:l:P:p:s:T:vr"));
for (int c; (c = get_opt ()) != -1; )
switch (c)
{
case 'c':
{
- if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("PROC_LOCAL")) == 0)
+ if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("PROC_LOCAL")) == 0)
this->context (ACE_Naming_Context::PROC_LOCAL);
- else if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("NODE_LOCAL")) == 0)
+ else if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("NODE_LOCAL")) == 0)
this->context (ACE_Naming_Context::NODE_LOCAL);
- else if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("NET_LOCAL")) == 0)
+ else if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("NET_LOCAL")) == 0)
this->context (ACE_Naming_Context::NET_LOCAL);
}
break;
@@ -634,9 +636,9 @@ ACE_Name_Options::parse_args (int argc, ASYS_TCHAR *argv[])
this->base_address ((char *) ACE_OS::atoi (get_opt.optarg));
break;
case 'T':
- if (ACE_OS::strcasecmp (get_opt.optarg, ASYS_TEXT ("ON")) == 0)
+ if (ACE_OS::strcasecmp (get_opt.optarg, ACE_TEXT ("ON")) == 0)
ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (get_opt.optarg, ASYS_TEXT ("OFF")) == 0)
+ else if (ACE_OS::strcasecmp (get_opt.optarg, ACE_TEXT ("OFF")) == 0)
ACE_Trace::stop_tracing ();
break;
case 'v':
@@ -682,3 +684,5 @@ template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_M
#pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
#pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+#endif /* ACE_HAS_WCHAR */
diff --git a/ace/Naming_Context.h b/ace/Naming_Context.h
index 723d28ffc61..0cc4e78d157 100644
--- a/ace/Naming_Context.h
+++ b/ace/Naming_Context.h
@@ -24,6 +24,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if defined (ACE_HAS_WCHAR)
+
#include "ace/SString.h"
#include "ace/Containers.h"
#include "ace/Service_Object.h"
@@ -92,7 +94,7 @@ public:
// file
// = Dynamic initialization hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Initialize name options and naming context when dynamically
// linked.
@@ -232,10 +234,10 @@ private:
ACE_Name_Space *name_space_;
// Name space (can be either local or remote) dynamically bound.
- ASYS_TCHAR hostname_[MAXHOSTNAMELEN + 1];
+ ACE_TCHAR hostname_[MAXHOSTNAMELEN + 1];
// Holds the local hostname.
- const ASYS_TCHAR *netnameserver_host_;
+ const ACE_TCHAR *netnameserver_host_;
// Holds name of net name server.
int netnameserver_port_;
@@ -256,7 +258,7 @@ public:
~ACE_Name_Options (void);
void parse_args (int argc,
- ASYS_TCHAR *argv[]);
+ ACE_TCHAR *argv[]);
// Parse arguments.
// = Set/Get port number
@@ -268,20 +270,20 @@ public:
void context (ACE_Naming_Context::Context_Scope_Type);
// = Set/Get host name
- void nameserver_host (const ASYS_TCHAR *host);
- const ASYS_TCHAR *nameserver_host (void);
+ void nameserver_host (const ACE_TCHAR *host);
+ const ACE_TCHAR *nameserver_host (void);
// = Set/Get name space directory
- void namespace_dir (LPCTSTR dir);
- LPCTSTR namespace_dir (void);
+ void namespace_dir (const ACE_TCHAR *dir);
+ const ACE_TCHAR *namespace_dir (void);
// = Set/Get process name
- void process_name (LPCTSTR dir);
- LPCTSTR process_name (void);
+ void process_name (const ACE_TCHAR *dir);
+ const ACE_TCHAR *process_name (void);
// = Set/Get database name
- void database (LPCTSTR);
- LPCTSTR database (void);
+ void database (const ACE_TCHAR *);
+ const ACE_TCHAR *database (void);
// = Set/Get base address of the underlying allocator
void base_address (char *address);
@@ -310,16 +312,16 @@ private:
int nameserver_port_;
// Port to connect to nameserver process.
- const ASYS_TCHAR *nameserver_host_;
+ const ACE_TCHAR *nameserver_host_;
// Hostname of nameserver.
- LPTSTR namespace_dir_;
+ ACE_TCHAR *namespace_dir_;
// Directory to hold name_bindings.
- LPCTSTR process_name_;
+ const ACE_TCHAR *process_name_;
// Name of this process.
- LPCTSTR database_;
+ const ACE_TCHAR *database_;
// Name of the database that stores the name/value/type bindings.
char *base_address_;
@@ -331,5 +333,7 @@ private:
ACE_FACTORY_DECLARE (ACE, ACE_Naming_Context)
+#endif /* ACE_HAS_WCHAR */
+
#include "ace/post.h"
#endif /* ACE_NAMING_CONTEXT_H */
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 2d615d47c0f..f0dcf80e7e9 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -32,7 +32,7 @@ const wchar_t *ACE_OS::month_name[] = {ACE_TEXT ("Jan"), ACE_TEXT ("Feb"),
ACE_TEXT ("Sep"), ACE_TEXT ("Oct"),
ACE_TEXT ("Nov"), ACE_TEXT ("Dec") };
-static const ASYS_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n");
+static const ACE_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n");
# endif /* ACE_HAS_WINCE */
# if defined (ACE_WIN32)
@@ -441,8 +441,8 @@ ACE_Time_Value::dump (void) const
{
ACE_TRACE ("ACE_Time_Value::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntv_sec_ = %d"), this->tv_.tv_sec));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntv_usec_ = %d\n"), this->tv_.tv_usec));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntv_sec_ = %d"), this->tv_.tv_sec));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntv_usec_ = %d\n"), this->tv_.tv_usec));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -596,9 +596,9 @@ ACE_OS::uname (struct utsname *name)
// the space to the processor and half the space to subtype. The
// -1 is necessary for because of the space between processor and
// subtype in the machine name.
- const int bufsize = ((sizeof (name->machine) / sizeof (TCHAR)) / 2) - 1;
- TCHAR processor[bufsize] = ACE_TEXT ("Unknown");
- TCHAR subtype[bufsize] = ACE_TEXT ("Unknown");
+ const int bufsize = ((sizeof (name->machine) / sizeof (ACE_TCHAR)) / 2) - 1;
+ ACE_TCHAR processor[bufsize] = ACE_TEXT ("Unknown");
+ ACE_TCHAR subtype[bufsize] = ACE_TEXT ("Unknown");
WORD arch = sinfo.wProcessorArchitecture;
@@ -867,17 +867,17 @@ ACE_OS::ace_flock_t::dump (void) const
ACE_TRACE ("ACE_OS::ace_flock_t::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("handle_ = %u"), this->handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %u"), this->handle_));
#if defined (ACE_WIN32)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nInternal = %d"), this->overlapped_.Internal));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nInternalHigh = %d"), this->overlapped_.InternalHigh));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nOffsetHigh = %d"), this->overlapped_.OffsetHigh));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhEvent = %d"), this->overlapped_.hEvent));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nInternal = %d"), this->overlapped_.Internal));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nInternalHigh = %d"), this->overlapped_.InternalHigh));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nOffsetHigh = %d"), this->overlapped_.OffsetHigh));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhEvent = %d"), this->overlapped_.hEvent));
#elif !defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nl_whence = %d"), this->lock_.l_whence));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nl_start = %d"), this->lock_.l_start));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nl_len = %d"), this->lock_.l_len));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nl_type = %d"), this->lock_.l_type));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_whence = %d"), this->lock_.l_whence));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_start = %d"), this->lock_.l_start));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_len = %d"), this->lock_.l_len));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_type = %d"), this->lock_.l_type));
#endif /* ACE_WIN32 */
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -900,13 +900,13 @@ ACE_TRACE ("ACE_OS::mutex_lock_cleanup");
#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
FILE *
-ACE_OS::fopen (const char *filename,
- const char *mode)
+ACE_OS::fopen (const ACE_TCHAR *filename,
+ const ACE_TCHAR *mode)
{
ACE_TRACE ("ACE_OS::fopen");
int hmode = _O_TEXT;
- for (const char *mode_ptr = mode; *mode_ptr != 0; mode_ptr++)
+ for (const ACE_TCHAR *mode_ptr = mode; *mode_ptr != 0; mode_ptr++)
ACE_OS::fopen_mode_to_open_mode_converter (*mode_ptr, hmode);
ACE_HANDLE handle = ACE_OS::open (filename, hmode);
@@ -918,7 +918,9 @@ ACE_OS::fopen (const char *filename,
{
# if defined(__BORLANDC__)
FILE *fp = _fdopen (fd, ACE_const_cast (char *, mode));
-# else /* defined(__BORLANDC__) */
+# elif defined (ACE_USES_WCHAR)
+ FILE *fp = _wfdopen (fd, mode);
+# else
FILE *fp = _fdopen (fd, mode);
# endif /* defined(__BORLANDC__) */
if (fp != NULL)
@@ -931,44 +933,6 @@ ACE_OS::fopen (const char *filename,
}
#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
-#if defined (ACE_WIN32) && defined (ACE_HAS_UNICODE)
-FILE *
-ACE_OS::fopen (const wchar_t *filename, const wchar_t *mode)
-{
- ACE_TRACE ("ACE_OS::fopen");
- int hmode = _O_TEXT;
-
- for (const wchar_t *mode_ptr = mode; *mode_ptr != 0; mode_ptr++)
- ACE_OS::fopen_mode_to_open_mode_converter ((char) *mode_ptr, hmode);
-
- ACE_HANDLE handle = ACE_OS::open (filename, hmode);
-# if defined (ACE_HAS_WINCE)
- return (handle == ACE_INVALID_HANDLE ? NULL : handle);
-# else
- if (handle != ACE_INVALID_HANDLE)
- {
- hmode &= _O_TEXT | _O_RDONLY | _O_APPEND;
- int fd = _open_osfhandle ((long) handle, hmode);
- if (fd != -1)
- {
-# if defined(__BORLANDC__)
- FILE *fp = _wfdopen (fd, ACE_const_cast (wchar_t *, mode));
-# else /* defined(__BORLANDC__) */
- FILE *fp = _wfdopen (fd, mode);
-# endif /* defined(__BORLANDC__) */
- if (fp != NULL)
- return fp;
- _close (fd);
- }
- ACE_OS::close (handle);
- }
- return NULL;
-# endif /* !ACE_HAS_WINCE */
-}
-# endif /* ACE_WIN32 && ACE_HAS_UNICODE */
-
-#if !defined (ACE_HAS_WINCE)
-
// The following *printf functions aren't inline because
// they use varargs.
@@ -976,13 +940,37 @@ int
ACE_OS::fprintf (FILE *fp, const char *format, ...)
{
ACE_TRACE ("ACE_OS::fprintf");
+# if defined (ACE_HAS_WINCE)
+ ACE_NOTSUP_RETURN (-1);
+# else /* ACE_HAS_WINCE */
int result = 0;
va_list ap;
va_start (ap, format);
ACE_OSCALL (::vfprintf (fp, format, ap), int, -1, result);
va_end (ap);
return result;
+# endif /* ACE_HAS_WINCE */
+}
+
+#if defined (ACE_HAS_WCHAR)
+int
+ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...)
+{
+ ACE_TRACE ("ACE_OS::fprintf");
+# if defined (ACE_HAS_WINCE)
+ ACE_NOTSUP_RETURN (-1);
+# else /* ACE_HAS_WINCE */
+ int result = 0;
+ va_list ap;
+ va_start (ap, format);
+ ACE_OSCALL (::vfwprintf (fp, format, ap), int, -1, result);
+ va_end (ap);
+ return result;
+# endif /* ACE_HAS_WINCE */
}
+#endif /* ACE_HAS_WCHAR */
+
+#if !defined (ACE_HAS_WINCE)
int
ACE_OS::printf (const char *format, ...)
@@ -1009,6 +997,20 @@ ACE_OS::sprintf (char *buf, const char *format, ...)
return result;
}
+#if defined (ACE_HAS_WCHAR)
+int
+ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...)
+{
+ ACE_TRACE ("ACE_OS::sprintf");
+ int result;
+ va_list ap;
+ va_start (ap, format);
+ ACE_OSCALL (::vswprintf (buf, format, ap), int, -1, result);
+ va_end (ap);
+ return result;
+}
+#endif /* ACE_HAS_WCHAR */
+
char *
ACE_OS::gets (char *str, int n)
{
@@ -1043,106 +1045,11 @@ ACE_OS::gets (char *str, int n)
int
fprintf (FILE *fp, char *format, const char *msg)
{
- ACE_DEBUG ((LM_DEBUG, ASYS_WIDE_STRING (format), ASYS_WIDE_STRING (msg)));
+ ACE_DEBUG ((LM_DEBUG, format, msg));
return 0;
}
#endif /* ! ACE_HAS_WINCE */
-#if defined (ACE_HAS_UNICODE)
-# if defined (ACE_WIN32)
-
-int
-ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...)
-{
- ACE_TRACE ("ACE_OS::fprintf");
-# if defined (ACE_HAS_WINCE)
- ACE_NOTSUP_RETURN (-1);
-# else
- int result = 0;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vfwprintf (fp, format, ap), int, -1, result);
- va_end (ap);
- return result;
-# endif /* ACE_HAS_WINCE */
-}
-
-int
-ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...)
-{
- ACE_TRACE ("ACE_OS::sprintf");
- int result;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vswprintf (buf, format, ap), int, -1, result);
- va_end (ap);
- return result;
-}
-
-# if 0
-int
-ACE_OS::sprintf (wchar_t *buf, const char *format, ...)
-{
- ACE_TRACE ("ACE_OS::sprintf");
- const wchar_t *wide_format = ACE_WString (format).fast_rep ();
- int result;
- va_list ap;
- va_start (ap, wide_format);
- ACE_OSCALL (::vswprintf (buf, wide_format, ap), int, -1, result);
- va_end (ap);
- return result;
-}
-# endif /* 0 */
-
-# endif /* ACE_WIN32 */
-
-# if defined (ACE_LACKS_MKTEMP)
-wchar_t *
-ACE_OS::mktemp (wchar_t *s)
-{
- ACE_TRACE ("ACE_OS::mktemp");
- if (s == 0)
- // check for null template string failed!
- return 0;
- else
- {
- wchar_t *xxxxxx = ACE_OS::strstr (s, ACE_TEXT ("XXXXXX"));
-
- if (xxxxxx == 0)
- // the template string doesn't contain "XXXXXX"!
- return s;
- else
- {
- wchar_t unique_letter = L'a';
- struct stat sb;
-
- // Find an unused filename for this process. It is assumed
- // that the user will open the file immediately after
- // getting this filename back (so, yes, there is a race
- // condition if multiple threads in a process use the same
- // template). This appears to match the behavior of the
- // SunOS 5.5 mktemp().
- ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%05d%c"),
- ACE_OS::getpid (), unique_letter);
- while (ACE_OS::stat (s, &sb) >= 0)
- {
- if (++unique_letter <= L'z')
- ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%05d%c"),
- ACE_OS::getpid (), unique_letter);
- else
- {
- // maximum of 26 unique files per template, per process
- ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%s"), L"");
- return s;
- }
- }
- }
- return s;
- }
-}
-# endif /* ACE_LACKS_MKTEMP */
-#endif /* ACE_HAS_UNICODE */
-
int
ACE_OS::execl (const char * /* path */, const char * /* arg0 */, ...)
{
@@ -1619,9 +1526,9 @@ ACE_TSS_Info::dump (void)
// ACE_TRACE ("ACE_TSS_Info::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("key_ = %u\n"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("destructor_ = %u\n"), this->destructor_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("tss_obj_ = %u\n"), this->tss_obj_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %u\n"), this->key_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("destructor_ = %u\n"), this->destructor_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("tss_obj_ = %u\n"), this->tss_obj_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -2398,7 +2305,7 @@ ACE_Thread_Adapter::inherit_log_msg (void)
//Initialize the task specific logger
ACE_LOG_MSG->open(new_name);
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting %s thread at %D\n"),new_name));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting %s thread at %D\n"),new_name));
# endif /* ACE_PSOS */
#endif /* ! ACE_THREADS_DONT_INHERIT_LOG_MSG && ! ACE_HAS_MINIMAL_ACE_OS */
}
@@ -2616,7 +2523,7 @@ ACE_Thread_Adapter::invoke (void)
int ACE_SEH_Default_Exception_Selector (void *)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%t) Win32 structured exception exiting thread\n")));
+ ACE_TEXT ("(%t) Win32 structured exception exiting thread\n")));
return (DWORD) ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION;
}
@@ -4024,7 +3931,7 @@ ACE_OS::thr_key_detach (void *inst)
void
ACE_OS::unique_name (const void *object,
- LPTSTR name,
+ ACE_TCHAR *name,
size_t length)
{
// The process ID will provide uniqueness between processes on the
@@ -4032,7 +3939,7 @@ ACE_OS::unique_name (const void *object,
// uniqueness between other "live" objects in the same process. The
// uniqueness of this name is therefore only valid for the life of
// <object>.
- TCHAR temp_name[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR temp_name[ACE_UNIQUE_NAME_LEN];
ACE_OS::sprintf (temp_name,
ACE_TEXT ("%lx%d"),
ACE_reinterpret_cast (long, object),
@@ -4043,8 +3950,8 @@ ACE_OS::unique_name (const void *object,
}
int
-ACE_OS::argv_to_string (ASYS_TCHAR **argv,
- ASYS_TCHAR *&buf,
+ACE_OS::argv_to_string (ACE_TCHAR **argv,
+ ACE_TCHAR *&buf,
int substitute_env_args)
{
if (argv == 0 || argv[0] == 0)
@@ -4056,7 +3963,7 @@ ACE_OS::argv_to_string (ASYS_TCHAR **argv,
for (int i = 0; argv[i] != 0; i++)
{
- ASYS_TCHAR *temp = 0;
+ ACE_TCHAR *temp = 0;
// Account for environment variables.
if (substitute_env_args
@@ -4074,17 +3981,17 @@ ACE_OS::argv_to_string (ASYS_TCHAR **argv,
// each param with white space.
ACE_NEW_RETURN (buf,
- ASYS_TCHAR[buf_len + 1],
+ ACE_TCHAR[buf_len + 1],
0);
// Initial null charater to make it a null string.
buf[0] = '\0';
- ASYS_TCHAR *end = buf;
+ ACE_TCHAR *end = buf;
int j;
for (j = 0; argv[j] != 0; j++)
{
- ASYS_TCHAR *temp = 0;
+ ACE_TCHAR *temp = 0;
// Account for environment variables.
if (substitute_env_args
@@ -4106,9 +4013,9 @@ ACE_OS::argv_to_string (ASYS_TCHAR **argv,
}
int
-ACE_OS::string_to_argv (ASYS_TCHAR *buf,
+ACE_OS::string_to_argv (ACE_TCHAR *buf,
size_t &argc,
- ASYS_TCHAR **&argv,
+ ACE_TCHAR **&argv,
int substitute_env_args)
{
// Reset the number of arguments
@@ -4117,7 +4024,7 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
if (buf == 0)
return -1;
- ASYS_TCHAR *cp = buf;
+ ACE_TCHAR *cp = buf;
// First pass: count arguments.
@@ -4135,7 +4042,7 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
// Grok quotes....
if (*cp == '\'' || *cp == '"')
{
- ASYS_TCHAR quote = *cp;
+ ACE_TCHAR quote = *cp;
// Scan past the string..
for (cp++; *cp != '\0' && *cp != quote; cp++)
@@ -4145,7 +4052,7 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
if (*cp == '\0')
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("unmatched %c detected\n"),
+ ACE_TEXT ("unmatched %c detected\n"),
quote));
argc--;
break;
@@ -4159,22 +4066,22 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
}
// Second pass: copy arguments.
- ASYS_TCHAR arg[ACE_DEFAULT_ARGV_BUFSIZ];
- ASYS_TCHAR *argp = arg;
+ ACE_TCHAR arg[ACE_DEFAULT_ARGV_BUFSIZ];
+ ACE_TCHAR *argp = arg;
// Make sure that the buffer we're copying into is always large
// enough.
if (cp - buf >= ACE_DEFAULT_ARGV_BUFSIZ)
ACE_NEW_RETURN (argp,
- ASYS_TCHAR[cp - buf + 1],
+ ACE_TCHAR[cp - buf + 1],
-1);
// Make a new argv vector of argc + 1 elements.
ACE_NEW_RETURN (argv,
- ASYS_TCHAR *[argc + 1],
+ ACE_TCHAR *[argc + 1],
-1);
- ASYS_TCHAR *ptr = buf;
+ ACE_TCHAR *ptr = buf;
for (size_t i = 0; i < argc; i++)
{
@@ -4185,7 +4092,7 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
// Copy next argument and move to next whitespace..
if (*ptr == '\'' || *ptr == '"')
{
- ASYS_TCHAR quote = *ptr++;
+ ACE_TCHAR quote = *ptr++;
for (cp = argp;
*ptr != '\0' && *ptr != quote;
@@ -4217,13 +4124,11 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
}
// Check for environment variable substitution here.
-#if !defined (ACE_HAS_WINCE)
if (substitute_env_args)
ACE_ALLOCATOR_RETURN (argv[i],
ACE_OS::strenvdup (arg),
-1);
else
-#endif /* ACE_HAS_WINCE */
ACE_ALLOCATOR_RETURN (argv[i],
ACE_OS::strdup (arg),
-1);
@@ -4240,42 +4145,42 @@ ACE_OS::string_to_argv (ASYS_TCHAR *buf,
// separated by spaces.
pid_t
-ACE_OS::fork_exec (ASYS_TCHAR *argv[])
+ACE_OS::fork_exec (ACE_TCHAR *argv[])
{
# if defined (ACE_WIN32)
- ASYS_TCHAR *buf;
+ ACE_TCHAR *buf;
if (ACE_OS::argv_to_string (argv, buf) != -1)
{
PROCESS_INFORMATION process_info;
# if !defined (ACE_HAS_WINCE)
- STARTUPINFO startup_info;
+ ACE_TEXT_STARTUPINFO startup_info;
ACE_OS::memset ((void *) &startup_info,
0,
sizeof startup_info);
startup_info.cb = sizeof startup_info;
- if (::CreateProcess (0,
- (LPTSTR) ASYS_ONLY_WIDE_STRING (buf),
- 0, // No process attributes.
- 0, // No thread attributes.
- TRUE, // Allow handle inheritance.
- 0, // Don't create a new console window.
- 0, // No environment.
- 0, // No current directory.
- &startup_info,
- &process_info))
+ if (ACE_TEXT_CreateProcess (0,
+ buf,
+ 0, // No process attributes.
+ 0, // No thread attributes.
+ TRUE, // Allow handle inheritance.
+ 0, // Don't create a new console window.
+ 0, // No environment.
+ 0, // No current directory.
+ &startup_info,
+ &process_info))
# else
- if (::CreateProcess (0,
- (LPTSTR) ASYS_ONLY_WIDE_STRING (buf),
- 0, // No process attributes.
- 0, // No thread attributes.
- FALSE, // Can's inherit handles on CE
- 0, // Don't create a new console window.
- 0, // No environment.
- 0, // No current directory.
- 0, // Can't use startup info on CE
- &process_info))
+ if (ACE_TEXT_CreateProcess (0,
+ buf,
+ 0, // No process attributes.
+ 0, // No thread attributes.
+ FALSE, // Can's inherit handles on CE
+ 0, // 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.
@@ -4503,9 +4408,9 @@ ftruncate (ACE_HANDLE handle, long len)
}
# endif /* ACE_NEEDS_FTRUNCATE */
-# if defined (ACE_LACKS_MKTEMP) && !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-char *
-ACE_OS::mktemp (char *s)
+# if defined (ACE_LACKS_MKTEMP)
+ACE_TCHAR *
+ACE_OS::mktemp (ACE_TCHAR *s)
{
ACE_TRACE ("ACE_OS::mktemp");
if (s == 0)
@@ -4513,14 +4418,14 @@ ACE_OS::mktemp (char *s)
return 0;
else
{
- char *xxxxxx = ACE_OS::strstr (s, "XXXXXX");
+ ACE_TCHAR *xxxxxx = ACE_OS::strstr (s, ACE_TEXT ("XXXXXX");
if (xxxxxx == 0)
// the template string doesn't contain "XXXXXX"!
return s;
else
{
- char unique_letter = 'a';
+ ACE_TCHAR unique_letter = ACE_TEXT ('a');
struct stat sb;
// Find an unused filename for this process. It is assumed
@@ -4529,16 +4434,21 @@ ACE_OS::mktemp (char *s)
// condition if multiple threads in a process use the same
// template). This appears to match the behavior of the
// SunOS 5.5 mktemp().
- ACE_OS::sprintf (xxxxxx, "%05d%c", ACE_OS::getpid (), unique_letter);
+ ACE_OS::sprintf (xxxxxx,
+ ACE_TEXT ("%05d%c"),
+ ACE_OS::getpid (),
+ unique_letter);
while (ACE_OS::stat (s, &sb) >= 0)
{
- if (++unique_letter <= 'z')
- ACE_OS::sprintf (xxxxxx, "%05d%c", ACE_OS::getpid (),
+ if (++unique_letter <= ACE_TEXT ('z'))
+ ACE_OS::sprintf (xxxxxx,
+ ACE_TEXT ("%05d%c"),
+ ACE_OS::getpid (),
unique_letter);
else
{
// maximum of 26 unique files per template, per process
- ACE_OS::sprintf (xxxxxx, "%s", "");
+ ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%s"), ACE_TEXT (""));
return s;
}
}
@@ -4546,7 +4456,7 @@ ACE_OS::mktemp (char *s)
return s;
}
}
-# endif /* ACE_LACKS_MKTEMP && !ACE_HAS_MOSTLY_UNICODE_APIS */
+# endif /* ACE_LACKS_MKTEMP */
int
ACE_OS::socket_init (int version_high, int version_low)
@@ -4698,7 +4608,7 @@ siginfo_t::siginfo_t (ACE_HANDLE *handles)
# endif /* ACE_HAS_SIGINFO_T */
pid_t
-ACE_OS::fork (const char *program_name)
+ACE_OS::fork (const ACE_TCHAR *program_name)
{
ACE_TRACE ("ACE_OS::fork");
# if defined (ACE_LACKS_FORK)
@@ -4786,13 +4696,13 @@ ACE_Thread_ID::operator!= (const ACE_Thread_ID &rhs) const
}
int
-ACE_OS::inet_aton (const char *host_name, struct in_addr *addr)
+ACE_OS::inet_aton (const ACE_TCHAR *host_name, struct in_addr *addr)
{
ACE_UINT32 ip_addr = ACE_OS::inet_addr (host_name);
if (ip_addr == (ACE_UINT32) htonl ((ACE_UINT32) ~0)
// Broadcast addresses are weird...
- && ACE_OS::strcmp (host_name, "255.255.255.255") != 0)
+ && ACE_OS::strcmp (host_name, ACE_TEXT ("255.255.255.255")) != 0)
return 0;
else if (addr == 0)
return 0;
@@ -5088,19 +4998,13 @@ ACE_OS::pwrite (ACE_HANDLE handle,
}
ACE_HANDLE
-ACE_OS::open (const char *filename,
+ACE_OS::open (const ACE_TCHAR *filename,
int mode,
int perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_OS::open");
-#if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (filename);
- ACE_UNUSED_ARG (mode);
- ACE_UNUSED_ARG (perms);
- ACE_UNUSED_ARG (sa);
- return 0;
-#elif defined (ACE_WIN32)
+#if defined (ACE_WIN32)
ACE_UNUSED_ARG (perms);
DWORD access = GENERIC_READ;
@@ -5160,12 +5064,12 @@ ACE_OS::open (const char *filename,
VER_PLATFORM_WIN32_NT)
shared_mode |= FILE_SHARE_DELETE;
- ACE_HANDLE h = ::CreateFileA (filename, access,
- shared_mode,
- ACE_OS::default_win32_security_attributes (sa),
- creation,
- flags,
- 0);
+ ACE_HANDLE h = ACE_TEXT_CreateFile (filename, access,
+ shared_mode,
+ ACE_OS::default_win32_security_attributes (sa),
+ creation,
+ flags,
+ 0);
if (ACE_BIT_ENABLED (mode, _O_APPEND))
{
@@ -5227,99 +5131,6 @@ ACE_OS::open (const char *filename,
#endif /* ACE_WIN32 */
}
-#if defined (ACE_HAS_UNICODE) && defined (ACE_WIN32)
-
-ACE_HANDLE
-ACE_OS::open (const wchar_t *filename,
- int mode,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_UNUSED_ARG (perms);
- ACE_TRACE ("ACE_OS::open");
- // Warning: This function ignores _O_APPEND
- DWORD access = GENERIC_READ;
- if (ACE_BIT_ENABLED (mode, O_WRONLY))
- access = GENERIC_WRITE;
- else if (ACE_BIT_ENABLED (mode, O_RDWR))
- access = GENERIC_READ | GENERIC_WRITE;
-
- DWORD creation = OPEN_EXISTING;
-
- if ((mode & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL))
- creation = CREATE_NEW;
- else if ((mode & (_O_CREAT | _O_TRUNC)) == (_O_CREAT | _O_TRUNC))
- creation = CREATE_ALWAYS;
- else if (ACE_BIT_ENABLED (mode, _O_CREAT))
- creation = OPEN_ALWAYS;
- else if (ACE_BIT_ENABLED (mode, _O_TRUNC))
- creation = TRUNCATE_EXISTING;
-
- DWORD flags = 0;
-
- if (ACE_BIT_ENABLED (mode, _O_TEMPORARY))
- flags |= FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_TEMPORARY;
-
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_WRITE_THROUGH))
- flags |= FILE_FLAG_WRITE_THROUGH;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_OVERLAPPED))
- flags |= FILE_FLAG_OVERLAPPED;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_NO_BUFFERING))
- flags |= FILE_FLAG_NO_BUFFERING;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_RANDOM_ACCESS))
- flags |= FILE_FLAG_RANDOM_ACCESS;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_SEQUENTIAL_SCAN))
- flags |= FILE_FLAG_SEQUENTIAL_SCAN;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_DELETE_ON_CLOSE))
- flags |= FILE_FLAG_DELETE_ON_CLOSE;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_BACKUP_SEMANTICS))
- flags |= FILE_FLAG_BACKUP_SEMANTICS;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_POSIX_SEMANTICS))
- flags |= FILE_FLAG_POSIX_SEMANTICS;
-
- ACE_MT (ACE_thread_mutex_t *ace_os_monitor_lock = 0;)
-
- if (ACE_BIT_ENABLED (mode, _O_APPEND))
- {
- ACE_MT
- (
- ace_os_monitor_lock = (ACE_thread_mutex_t *)
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK];
- ACE_OS::thread_mutex_lock (ace_os_monitor_lock);
- )
- }
-
- DWORD shared_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
- if (ACE_OS::get_win32_versioninfo().dwPlatformId ==
- VER_PLATFORM_WIN32_NT)
- shared_mode |= FILE_SHARE_DELETE;
-
- ACE_HANDLE h = ::CreateFileW (filename, access,
- shared_mode,
- ACE_OS::default_win32_security_attributes (sa),
- creation,
- flags,
- 0);
-
- if (ACE_BIT_ENABLED (mode, _O_APPEND))
- {
- if (h != ACE_INVALID_HANDLE)
- {
- ::SetFilePointer (h, 0, 0, FILE_END);
- }
-
- ACE_MT (ACE_OS::thread_mutex_unlock (ace_os_monitor_lock);)
- }
-
- if (h == ACE_INVALID_HANDLE)
- ACE_FAIL_RETURN (h);
- else
- return h;
-}
-
-#endif /* ACE_HAS_UNICODE && ACE_WIN32 */
-
# if defined (ACE_LACKS_DIFFTIME)
double
ACE_OS::difftime (time_t t1, time_t t0)
@@ -5453,30 +5264,10 @@ ACE_OS::difftime (time_t t1, time_t t0)
}
# endif /* ACE_LACKS_DIFFTIME */
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-wchar_t *
-ACE_OS::ctime (const time_t *t)
-{
-#if defined (ACE_HAS_WINCE)
- wchar_t buf[26]; // 26 is a "magic number" ;)
- return ACE_OS::ctime_r (t, buf, 26);
-#else
- ACE_OSCALL_RETURN (::_wctime (t), wchar_t *, 0);
-#endif /* ACE_HAS_WINCE */
-}
-
-wchar_t *
-ACE_OS::ctime_r (const time_t *clock,
- wchar_t *buf,
- int buflen)
+# if defined (ACE_HAS_WINCE)
+ACE_TCHAR *
+ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen)
{
-#if !defined (ACE_HAS_WINCE)
- wchar_t *result;
- ACE_OSCALL (::_wctime (clock), wchar_t *, 0, result);
- if (result != 0)
- ::wcsncpy (buf, result, buflen);
- return buf;
-#else
// buflen must be at least 26 wchar_t long.
if (buflen < 26) // Again, 26 is a magic number.
return 0;
@@ -5490,15 +5281,10 @@ ACE_OS::ctime_r (const time_t *clock,
file_time.dwLowDateTime = _100ns.LowPart;
file_time.dwHighDateTime = _100ns.HighPart;
-# if 1
FILETIME localtime;
SYSTEMTIME systime;
FileTimeToLocalFileTime (&file_time, &localtime);
FileTimeToSystemTime (&localtime, &systime);
-# else
- SYSTEMTIME systime;
- FileTimeToSystemTime ((FILETIME *) &file_time, &systime);
-# endif /* 0 */
ACE_OS::sprintf (buf, ACE_OS_CTIME_R_FMTSTR,
ACE_OS::day_of_week_name[systime.wDayOfWeek],
ACE_OS::month_name[systime.wMonth - 1],
@@ -5508,9 +5294,8 @@ ACE_OS::ctime_r (const time_t *clock,
systime.wSecond,
systime.wYear);
return buf;
-#endif /* ACE_HAS_WINCE */
}
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+# endif /* ACE_HAS_WINCE */
# if !defined (ACE_HAS_WINCE)
time_t
@@ -5534,7 +5319,7 @@ ACE_OS::mktime (struct tm *t)
int
ACE_OS::rwlock_init (ACE_rwlock_t *rw,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
{
// ACE_TRACE ("ACE_OS::rwlock_init");
@@ -5545,10 +5330,10 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw,
// Since we cannot use the user specified name for all three
// objects, we will create three completely new names.
- TCHAR name1[ACE_UNIQUE_NAME_LEN];
- TCHAR name2[ACE_UNIQUE_NAME_LEN];
- TCHAR name3[ACE_UNIQUE_NAME_LEN];
- TCHAR name4[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR name1[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR name2[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR name3[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR name4[ACE_UNIQUE_NAME_LEN];
ACE_OS::unique_name ((const void *) &rw->lock_,
name1,
@@ -5647,13 +5432,13 @@ ACE_OS::condattr_destroy (ACE_condattr_t &)
int
ACE_OS::cond_init (ACE_cond_t *cv,
ACE_condattr_t &attributes,
- LPCTSTR name, void *arg)
+ const ACE_TCHAR *name, void *arg)
{
return ACE_OS::cond_init (cv, attributes.type, name, arg);
}
int
-ACE_OS::cond_init (ACE_cond_t *cv, short type, LPCTSTR name, void *arg)
+ACE_OS::cond_init (ACE_cond_t *cv, short type, const ACE_TCHAR *name, void *arg)
{
ACE_TRACE ("ACE_OS::cond_init");
# if defined (ACE_HAS_THREADS)
@@ -6427,7 +6212,7 @@ ace_sysconf_dump (void)
if (time == -1)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Cannot get time\n")));
+ ACE_TEXT ("Cannot get time\n")));
else
time.dump ();
@@ -6497,37 +6282,6 @@ ace_sysconf_dump (void)
}
# endif /* CHORUS */
-ACE_OS_WString::ACE_OS_WString (const ACE_USHORT16 *s)
- : rep_ (0)
-{
- size_t len = ACE_OS::strlen (s);
- ACE_NEW (this->rep_,
- char[len+1]);
-
- for (size_t i = 0; i < len; i++)
- {
- ACE_USHORT16 *t = ACE_const_cast (ACE_USHORT16 *, s);
- this->rep_[i] = ACE_static_cast (char, *(t + i));
- }
-
- this->rep_[len] = '\0';
- return;
-}
-
-ACE_OS_CString::ACE_OS_CString (const char *s)
- : rep_ (0)
-{
- size_t len = ACE_OS::strlen (s);
- ACE_NEW (this->rep_,
- ACE_USHORT16[len+1]);
-
- for (size_t i = 0; i < len; i++)
- this->rep_[i] = s[i];
-
- this->rep_[len] = '\0';
- return;
-}
-
# define ACE_OS_PREALLOCATE_OBJECT(TYPE, ID)\
{\
TYPE *obj_p = 0;\
@@ -6870,7 +6624,8 @@ ACE_OS_Object_Manager::at_exit (ACE_EXIT_HOOK func)
}
void
-ACE_OS_Object_Manager::print_error_message (u_int line_number, LPCTSTR message)
+ACE_OS_Object_Manager::print_error_message (u_int line_number,
+ const ACE_TCHAR *message)
{
// To avoid duplication of these const strings in OS.o.
#if !defined (ACE_HAS_WINCE)
@@ -6883,7 +6638,7 @@ ACE_OS_Object_Manager::print_error_message (u_int line_number, LPCTSTR message)
ACE_UNUSED_ARG (line_number);
ACE_UNUSED_ARG (message);
- LPTSTR lpMsgBuf = 0;
+ ACE_TCHAR *lpMsgBuf = 0;
::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
@@ -6891,7 +6646,7 @@ ACE_OS_Object_Manager::print_error_message (u_int line_number, LPCTSTR message)
MAKELANGID (LANG_NEUTRAL,
SUBLANG_DEFAULT),
// Default language
- (LPTSTR) &lpMsgBuf,
+ (ACE_TCHAR *) &lpMsgBuf,
0,
NULL);
::MessageBox (NULL,
@@ -7045,9 +6800,9 @@ ACE_CE_Bridge::get_default_winbridge (void)
}
int
-ACE_CE_Bridge::write_msg (LPCTSTR str)
+ACE_CE_Bridge::write_msg (const ACE_TCHAR *str)
{
- LPTSTR s = ACE_OS::strdup (str);
+ ACE_TCHAR *s = ACE_OS::strdup (str);
return PostMessage (this->text_output_,
WM_COMMAND,
MAKEWORD (this->idc_,
diff --git a/ace/OS.h b/ace/OS.h
index 23802dc9481..00c78f230f5 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -16,7 +16,7 @@
// ============================================================================
#ifndef ACE_OS_H
-# define ACE_OS_H
+#define ACE_OS_H
#include "ace/pre.h"
#include "ace/config-all.h"
@@ -107,10 +107,10 @@ struct dirent {
unsigned short d_ino;
unsigned short d_off;
unsigned short d_reclen;
- const char *d_name;
+ const ACE_TCHAR *d_name;
};
struct DIR {
- char *directory_name_;
+ ACE_TCHAR *directory_name_;
// The name of the directory we are looking into
HANDLE current_handle_;
@@ -119,22 +119,152 @@ struct DIR {
dirent dirent_;
// The struct for the results
- WIN32_FIND_DATA fdata_;
+ ACE_TEXT_WIN32_FIND_DATA fdata_;
// The struct for intermediate results.
int started_reading_;
// A flag to remember if we started reading already.
};
-#endif /* defined (WIN_32) */
+#endif /* defined (ACE_WIN32) */
# if defined (ACE_PSOS_TM)
typedef long long longlong_t;
typedef long id_t;
# endif /* ACE_PSOS_TM */
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS) && !defined (UNICODE)
-# error UNICODE must be defined when using ACE_HAS_MOSTLY_UNICODE_APIS, check your compiler document on how to enable UNICODE.
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS && !UNICODE */
+# if defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE)
+# define ACE_NO_INLINE
+# endif /* defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE) */
+
+# if defined (ACE_HAS_ANSI_CASTS)
+
+# define ACE_sap_any_cast(TYPE) reinterpret_cast<TYPE> (const_cast<ACE_Addr &> (ACE_Addr::sap_any))
+
+# define ACE_static_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
+# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
+# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
+# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
+# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
+# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
+# define ACE_static_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
+# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
+# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
+# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
+# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
+
+# define ACE_const_cast(TYPE, EXPR) const_cast<TYPE> (EXPR)
+# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) const_cast<TYPE<T1> *> (EXPR)
+# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> *> (EXPR)
+# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> *> (EXPR)
+# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
+# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
+# define ACE_const_cast_1_ref(TYPE, T1, EXPR) const_cast<TYPE<T1> &> (EXPR)
+# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> &> (EXPR)
+# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> &> (EXPR)
+# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
+# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
+
+# define ACE_reinterpret_cast(TYPE, EXPR) reinterpret_cast<TYPE> (EXPR)
+# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> *> (EXPR)
+# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> *> (EXPR)
+# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> *> (EXPR)
+# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
+# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
+# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> &> (EXPR)
+# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> &> (EXPR)
+# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> &> (EXPR)
+# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
+# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
+
+# if defined (ACE_LACKS_RTTI)
+# define ACE_dynamic_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
+# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
+# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
+# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
+# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
+# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
+# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
+# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
+# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
+# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
+# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
+# else /* ! ACE_LACKS_RTTI */
+# define ACE_dynamic_cast(TYPE, EXPR) dynamic_cast<TYPE> (EXPR)
+# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> *> (EXPR)
+# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> *> (EXPR)
+# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> *> (EXPR)
+# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
+# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
+# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> &> (EXPR)
+# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> &> (EXPR)
+# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> &> (EXPR)
+# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
+# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
+# endif /* ! ACE_LACKS_RTTI */
+
+# else
+
+# define ACE_sap_any_cast(TYPE) ((TYPE) (ACE_Addr::sap_any))
+
+# define ACE_static_cast(TYPE, EXPR) ((TYPE) (EXPR))
+# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
+# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
+# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
+# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
+# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
+# define ACE_static_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
+# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
+# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
+# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
+# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
+
+# define ACE_const_cast(TYPE, EXPR) ((TYPE) (EXPR))
+# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
+# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
+# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
+# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
+# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
+# define ACE_const_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
+# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
+# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
+# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
+# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
+
+# define ACE_reinterpret_cast(TYPE, EXPR) ((TYPE) (EXPR))
+# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
+# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
+# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
+# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
+# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
+# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
+# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
+# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
+# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
+# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
+
+# define ACE_dynamic_cast(TYPE, EXPR) ((TYPE) (EXPR))
+# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
+# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
+# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
+# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
+# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
+# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
+# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
+# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
+# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
+# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
+# endif /* ACE_HAS_ANSI_CASTS */
+
+# if !defined (ACE_CAST_CONST)
+ // Sun CC 4.2, for example, requires const in reinterpret casts of
+ // data members in const member functions. But, other compilers
+ // complain about the useless const. This keeps everyone happy.
+# if defined (__SUNPRO_CC)
+# define ACE_CAST_CONST const
+# else /* ! __SUNPRO_CC */
+# define ACE_CAST_CONST
+# endif /* ! __SUNPRO_CC */
+# endif /* ! ACE_CAST_CONST */
// Deal with MSVC++ insanity for CORBA...
# if defined (ACE_HAS_BROKEN_NAMESPACES)
@@ -303,25 +433,18 @@ typedef long id_t;
# endif /* ACE_DEFAULT_RENDEZVOUS */
# if !defined (ACE_DEFAULT_LOGGER_KEY)
-# if defined (ACE_HAS_UNICODE) && defined (UNICODE)
-# if defined (ACE_HAS_STREAM_PIPES)
-# define ACE_DEFAULT_LOGGER_KEY L"/tmp/server_daemon"
-# else
-# define ACE_DEFAULT_LOGGER_KEY L"localhost:10012"
-# endif /* ACE_HAS_STREAM_PIPES */
-# else /* ACE_HAS_UNICODE */
+
# if defined (ACE_HAS_STREAM_PIPES)
-# define ACE_DEFAULT_LOGGER_KEY "/tmp/server_daemon"
+# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon")
# else
-# define ACE_DEFAULT_LOGGER_KEY "localhost:10012"
+# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("localhost:10012")
# endif /* ACE_HAS_STREAM_PIPES */
-# endif /* ACE_HAS_UNICODE && UNICODE */
# endif /* ACE_DEFAULT_LOGGER_KEY */
// The way to specify the local host for loopback IP. This is usually
// "localhost" but it may need changing on some platforms.
# if !defined (ACE_LOCALHOST)
-# define ACE_LOCALHOST ASYS_TEXT("localhost")
+# define ACE_LOCALHOST ACE_TEXT ("localhost")
# endif
# if !defined (ACE_DEFAULT_SERVER_HOST)
@@ -418,40 +541,13 @@ typedef long id_t;
# define ACE_DEFAULT_ARGV_BUFSIZ 1024 * 4
# endif /* ACE_DEFAULT_ARGV_BUFSIZ */
-// Because most WinCE APIs use wchar strings, many of ACE functions
-// must adapt to this change also. For backward compatibility (most
-// platforms still use ASCII char APIs even if they support UNICODE,)
-// these new macros are introduced to avoid code bloating.
-//
-// ASYS stands for ACE SYSTEM something.
-
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# define ASYS_TCHAR wchar_t
-# define ASYS_TEXT(STRING) __TEXT (STRING)
-# else
-# define ASYS_TCHAR char
-# define ASYS_TEXT(STRING) STRING
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-
-// Macro to replace __TEXT
-# if !defined (ACE_TEXT)
-# if (defined (ACE_HAS_UNICODE) && (defined (UNICODE)))
-# define ACE_TEXT(STRING) L##STRING
-# else
-# define ACE_TEXT(STRING) STRING
-# endif /* UNICODE && ACE_HAS_UNICODE */
-# endif /* !defined ACE_TEXT */
-
-# if !defined (ACE_HAS_TEXT_MACRO_CONFLICT)
-# define __TEXT(STRING) ACE_TEXT(STRING)
-# endif /* ACE_HAS_TEXT_MACRO_CONFLICT */
// Here are all ACE-specific global declarations needed throughout
// ACE.
// Helpful dump macros.
-# define ACE_BEGIN_DUMP ASYS_TEXT ("\n====\n(%P|%t|%x)")
-# define ACE_END_DUMP ASYS_TEXT ("====\n")
+# define ACE_BEGIN_DUMP ACE_TEXT ("\n====\n(%P|%t|%x)")
+# define ACE_END_DUMP ACE_TEXT ("====\n")
// A free list which create more elements when there aren't enough
// elements.
@@ -691,15 +787,15 @@ typedef int key_t;
# if defined (ACE_PSOS_CANT_USE_SYS_TYPES)
// these are missing from the pSOS types.h file, and the compiler
// supplied types.h file collides with the pSOS version
- typedef unsigned char u_char;
- typedef unsigned short u_short;
- typedef unsigned int u_int;
- typedef unsigned long u_long;
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
- typedef char *caddr_t;
+ typedef unsigned char u_char;
+ typedef unsigned short u_short;
+ typedef unsigned int u_int;
+ typedef unsigned long u_long;
+ typedef unsigned char uchar_t;
+ typedef unsigned short ushort_t;
+ typedef unsigned int uint_t;
+ typedef unsigned long ulong_t;
+ typedef char * caddr_t;
# if defined (ACE_PSOS_DIAB_PPC)
typedef unsigned long pid_t;
@@ -793,35 +889,19 @@ typedef struct
# define ACE_STDOUT 1
# define ACE_STDERR 2
-# define ACE_DIRECTORY_SEPARATOR_STR_A "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
+# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
+# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
-# define ACE_DLL_SUFFIX ".so"
-# define ACE_DLL_PREFIX "lib"
-# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ":"
-# define ACE_LOGGER_KEY "/tmp/server_daemon"
+# define ACE_DLL_SUFFIX ACE_TEXT (".so")
+# define ACE_DLL_PREFIX ACE_TEXT ("lib")
+# define ACE_LD_SEARCH_PATH ACE_TEXT ("LD_LIBRARY_PATH")
+# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (":")
+# define ACE_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon")
-# define ACE_PLATFORM_A "pSOS"
-# define ACE_PLATFORM_EXE_SUFFIX_A ""
-
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# define ASYS_WIDE_STRING(ASCII_STRING) ACE_WString (ASCII_STRING).fast_rep ()
-# else
-# define ASYS_WIDE_STRING(ASCII_STRING) ASCII_STRING
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-
-# if defined (ACE_HAS_UNICODE)
-# define ACE_DIRECTORY_SEPARATOR_STR_W L"/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W L'/'
-# define ACE_PLATFORM_W L"pSOS"
-# define ACE_PLATFORM_EXE_SUFFIX_W L""
-# else
-# define ACE_DIRECTORY_SEPARATOR_STR_W "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W '/'
-# define ACE_PLATFORM_W "pSOS"
-# define ACE_PLATFORM_EXE_SUFFIX_W ""
-# endif /* ACE_HAS_UNICODE */
+# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
+# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
+# define ACE_PLATFORM ACE_TEXT ("pSOS")
+# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT ("")
# define ACE_MAX_DEFAULT_PORT 65535
@@ -845,29 +925,12 @@ typedef struct
# endif /* ACE_LACKS_MMAP */
// The following 2 defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_LOCALNAME_A "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_A */
-
-# if !defined (ACE_DEFAULT_GLOBALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME_A "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_A */
-
-# if defined (ACE_HAS_UNICODE)
-# if !defined (ACE_DEFAULT_LOCALNAME_W)
-# define ACE_DEFAULT_LOCALNAME_W L"localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_W */
-# if !defined (ACE_DEFAULT_GLOBALNAME_W)
-# define ACE_DEFAULT_GLOBALNAME_W L"globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_W */
-# else
-# if !defined (ACE_DEFAULT_LOCALNAME_W)
-# define ACE_DEFAULT_LOCALNAME_W "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_W */
-# if !defined (ACE_DEFAULT_GLOBALNAME_W)
-# define ACE_DEFAULT_GLOBALNAME_W "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_W */
-# endif /* ACE_HAS_UNICODE */
+# if !defined (ACE_DEFAULT_LOCALNAME)
+# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
+# endif /* ACE_DEFAULT_LOCALNAME */
+# if !defined (ACE_DEFAULT_GLOBALNAME)
+# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
+# endif /* ACE_DEFAULT_GLOBALNAME */
typedef int ACE_HANDLE;
typedef ACE_HANDLE ACE_SOCKET;
@@ -896,12 +959,6 @@ struct servent {
char *s_proto; /* protocol to use */
};
-// For Win32 compatibility.
-
-typedef const char *LPCTSTR;
-typedef char *LPTSTR;
-typedef char TCHAR;
-
# define ACE_SEH_TRY if (1)
# define ACE_SEH_EXCEPT(X) while (0)
# define ACE_SEH_FINALLY if (1)
@@ -1068,7 +1125,7 @@ extern "C" pthread_t pthread_self (void);
# if (ACE_NTRACE == 1)
# define ACE_TRACE(X)
# else
-# define ACE_TRACE(X) ACE_Trace ____ (ASYS_TEXT (X), __LINE__, ASYS_TEXT (__FILE__))
+# define ACE_TRACE(X) ACE_Trace ____ (ACE_TEXT (X), __LINE__, ACE_TEXT (__FILE__))
# endif /* ACE_NTRACE */
# if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS_DIAB_MIPS)
@@ -1647,18 +1704,6 @@ struct strrecvfd {};
# include /**/ <sys/procfs.h>
# endif /* ACE_HAS_PROC_FS */
-# if defined (ACE_HAS_UNICODE)
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-# include /**/ <cwchar>
-# elif !defined (__BORLANDC__) && !defined (ACE_HAS_WINCE) /* ACE_HAS_STANDARD_CPP_LIBRARY */
-# include /**/ <wchar.h>
-# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
-# elif defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
-# include /**/ <wchar.h>
-# elif defined (ACE_LACKS_WCHAR_T)
-typedef ACE_UINT32 wchar_t;
-# endif /* ACE_HAS_UNICODE */
-
# if defined (ACE_HAS_BROKEN_WRITEV)
typedef struct iovec ACE_WRITEV_TYPE;
# else
@@ -2979,21 +3024,13 @@ typedef void (*ACE_SignalHandlerV)(...);
# endif /* ACE_HAS_WINCE */
// The following defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_LOCALNAME_A "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_A */
-
-# if !defined (ACE_DEFAULT_LOCALNAME_W)
-# define ACE_DEFAULT_LOCALNAME_W L"localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_W */
-
-# if !defined (ACE_DEFAULT_GLOBALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME_A "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_A */
+# if !defined (ACE_DEFAULT_LOCALNAME)
+# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
+# endif /* ACE_DEFAULT_LOCALNAME */
-# if !defined (ACE_DEFAULT_GLOBALNAME_W)
-# define ACE_DEFAULT_GLOBALNAME_W L"globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_W */
+# if !defined (ACE_DEFAULT_GLOBALNAME)
+# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
+# endif /* ACE_DEFAULT_GLOBALNAME */
// Need to work around odd glitches with NT.
# if !defined (ACE_MAX_DEFAULT_PORT)
@@ -3001,14 +3038,12 @@ typedef void (*ACE_SignalHandlerV)(...);
# endif /* ACE_MAX_DEFAULT_PORT */
// We're on WinNT or Win95
-# define ACE_PLATFORM_A "Win32"
-# define ACE_PLATFORM_EXE_SUFFIX_A ".exe"
-# define ACE_PLATFORM_W L"Win32"
-# define ACE_PLATFORM_EXE_SUFFIX_W L".exe"
+# define ACE_PLATFORM ACE_TEXT ("Win32")
+# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (".exe")
// Used for dynamic linking
# if !defined (ACE_DEFAULT_SVC_CONF)
-# define ACE_DEFAULT_SVC_CONF ".\\svc.conf"
+# define ACE_DEFAULT_SVC_CONF ACE_TEXT (".\\svc.conf")
# endif /* ACE_DEFAULT_SVC_CONF */
// The following are #defines and #includes that are specific to
@@ -3067,14 +3102,12 @@ typedef int (*ACE_SEH_EXCEPT_HANDLER)(void *);
# define ACE_DEV_NULL "nul"
// Define the pathname separator characters for Win32 (ugh).
-# define ACE_DIRECTORY_SEPARATOR_STR_A "\\"
-# define ACE_DIRECTORY_SEPARATOR_STR_W L"\\"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '\\'
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W L'\\'
-# define ACE_LD_SEARCH_PATH "PATH"
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ";"
-# define ACE_DLL_SUFFIX ".dll"
-# define ACE_DLL_PREFIX ""
+# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("\\")
+# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('\\')
+# define ACE_LD_SEARCH_PATH ACE_TEXT ("PATH")
+# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (";")
+# define ACE_DLL_SUFFIX ACE_TEXT (".dll")
+# define ACE_DLL_PREFIX ACE_TEXT ("")
// This will help until we figure out everything:
# define NFDBITS 32 /* only used in unused functions... */
@@ -3311,16 +3344,6 @@ typedef ACE_UINT64 ACE_hrtime_t;
# else /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
-# if (defined (ACE_HAS_UNICODE) && (defined (UNICODE)))
-typedef const wchar_t *LPCTSTR;
-typedef wchar_t *LPTSTR;
-typedef wchar_t TCHAR;
-# else
-typedef const char *LPCTSTR;
-typedef char *LPTSTR;
-typedef char TCHAR;
-# endif /* ACE_HAS_UNICODE && UNICODE */
-
# if defined (m88k)
# define RUSAGE_SELF 1
# endif /* m88k */
@@ -3336,24 +3359,12 @@ typedef char TCHAR;
# define ACE_INVALID_SEM_KEY -1
// Define the pathname separator characters for UNIX.
-# define ACE_DIRECTORY_SEPARATOR_STR_A "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/'
+# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
+# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
// We're some kind of UNIX...
-# define ACE_PLATFORM_A "UNIX"
-# define ACE_PLATFORM_EXE_SUFFIX_A ""
-
-# if defined (ACE_HAS_UNICODE)
-# define ACE_DIRECTORY_SEPARATOR_STR_W L"/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W L'/'
-# define ACE_PLATFORM_W L"UNIX"
-# define ACE_PLATFORM_EXE_SUFFIX_W L""
-# else
-# define ACE_DIRECTORY_SEPARATOR_STR_W "/"
-# define ACE_DIRECTORY_SEPARATOR_CHAR_W '/'
-# define ACE_PLATFORM_W "UNIX"
-# define ACE_PLATFORM_EXE_SUFFIX_W ""
-# endif /* ACE_HAS_UNICODE */
+# define ACE_PLATFORM ACE_TEXT("UNIX")
+# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT("")
# if !defined (ACE_LD_SEARCH_PATH)
# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
@@ -3370,33 +3381,17 @@ typedef char TCHAR;
# endif /* ACE_DLL_PREFIX */
// The following 2 defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME_A)
-# define ACE_DEFAULT_LOCALNAME_A "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_A */
-
-# if !defined (ACE_DEFAULT_GLOBALNAME_A)
-# define ACE_DEFAULT_GLOBALNAME_A "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_A */
-
-# if defined (ACE_HAS_UNICODE)
-# if !defined (ACE_DEFAULT_LOCALNAME_W)
-# define ACE_DEFAULT_LOCALNAME_W L"localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_W */
-# if !defined (ACE_DEFAULT_GLOBALNAME_W)
-# define ACE_DEFAULT_GLOBALNAME_W L"globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_W */
-# else
-# if !defined (ACE_DEFAULT_LOCALNAME_W)
-# define ACE_DEFAULT_LOCALNAME_W "localnames"
-# endif /* ACE_DEFAULT_LOCALNAME_W */
-# if !defined (ACE_DEFAULT_GLOBALNAME_W)
-# define ACE_DEFAULT_GLOBALNAME_W "globalnames"
-# endif /* ACE_DEFAULT_GLOBALNAME_W */
-# endif /* ACE_HAS_UNICODE */
+# if !defined (ACE_DEFAULT_LOCALNAME)
+# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
+# endif /* ACE_DEFAULT_LOCALNAME */
+
+# if !defined (ACE_DEFAULT_GLOBALNAME)
+# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
+# endif /* ACE_DEFAULT_GLOBALNAME */
// Used for dynamic linking.
# if !defined (ACE_DEFAULT_SVC_CONF)
-# define ACE_DEFAULT_SVC_CONF "./svc.conf"
+# define ACE_DEFAULT_SVC_CONF ACE_TEXT ("./svc.conf")
# endif /* ACE_DEFAULT_SVC_CONF */
// The following are #defines and #includes that are specific to UNIX.
@@ -3950,11 +3945,11 @@ extern "C"
# define _SYS_NMLN 257
struct utsname
{
- TCHAR sysname[_SYS_NMLN];
- TCHAR nodename[_SYS_NMLN];
- TCHAR release[_SYS_NMLN];
- TCHAR version[_SYS_NMLN];
- TCHAR machine[_SYS_NMLN];
+ ACE_TCHAR sysname[_SYS_NMLN];
+ ACE_TCHAR nodename[_SYS_NMLN];
+ ACE_TCHAR release[_SYS_NMLN];
+ ACE_TCHAR version[_SYS_NMLN];
+ ACE_TCHAR machine[_SYS_NMLN];
};
# else
# include /**/ <sys/utsname.h>
@@ -4375,19 +4370,11 @@ typedef void *(*ACE_THR_C_FUNC)(void *);
# define MAP_FAILED ((void *) -1L)
# endif /* !MAP_FAILED || ACE_HAS_BROKEN_MAP_FAILED */
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# if defined (ACE_HAS_CHARPTR_DL)
-typedef ASYS_TCHAR * ACE_DL_TYPE;
-# else
-typedef const ASYS_TCHAR * ACE_DL_TYPE;
-# endif /* ACE_HAS_CHARPTR_DL */
+# if defined (ACE_HAS_CHARPTR_DL)
+typedef ACE_TCHAR * ACE_DL_TYPE;
# else
-# if defined (ACE_HAS_CHARPTR_DL)
-typedef char * ACE_DL_TYPE;
-# else
-typedef const char * ACE_DL_TYPE;
-# endif /* ACE_HAS_CHARPTR_DL */
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+typedef const ACE_TCHAR * ACE_DL_TYPE;
+# endif /* ACE_HAS_CHARPTR_DL */
# if !defined (ACE_HAS_SIGINFO_T)
struct ACE_Export siginfo_t
@@ -5321,7 +5308,7 @@ public:
struct flock lock_;
# endif /* ACE_WIN32 */
- LPCTSTR lockname_;
+ const ACE_TCHAR *lockname_;
// Name of this filelock.
ACE_HANDLE handle_;
@@ -5345,18 +5332,20 @@ public:
# endif /* ACE_WIN32 */
// = A set of wrappers for miscellaneous operations.
- static int atoi (const char *s);
- static char *getenv (const char *symbol);
- static int putenv (const char *string);
+ static int atoi (const ACE_TCHAR *s);
+ static ACE_TCHAR *getenv (const ACE_TCHAR *symbol);
+ static int putenv (const ACE_TCHAR *string);
+ static ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
+
static int getopt (int argc,
char *const *argv,
const char *optstring);
- static int argv_to_string (ASYS_TCHAR **argv,
- ASYS_TCHAR *&buf,
+ static int argv_to_string (ACE_TCHAR **argv,
+ ACE_TCHAR *&buf,
int substitute_env_args = 1);
- static int string_to_argv (ASYS_TCHAR *buf,
+ static int string_to_argv (ACE_TCHAR *buf,
size_t &argc,
- ASYS_TCHAR **&argv,
+ ACE_TCHAR **&argv,
int substitute_env_args = 1);
static long sysconf (int);
@@ -5368,11 +5357,11 @@ public:
static int cond_destroy (ACE_cond_t *cv);
static int cond_init (ACE_cond_t *cv,
short type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
static int cond_init (ACE_cond_t *cv,
ACE_condattr_t &attributes,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
static int cond_signal (ACE_cond_t *cv);
static int cond_timedwait (ACE_cond_t *cv,
@@ -5389,26 +5378,26 @@ public:
# endif /* ACE_WIN32 && ACE_HAS_WTHREADS */
// = A set of wrappers for determining config info.
- static LPTSTR cuserid (LPTSTR user,
- size_t maxlen = 32);
+ static ACE_TCHAR *cuserid (ACE_TCHAR *user,
+ size_t maxlen = 32);
static int uname (struct utsname *name);
static long sysinfo (int cmd,
char *buf,
long count);
- static int hostname (char *name,
+ static int hostname (ACE_TCHAR *name,
size_t maxnamelen);
// = A set of wrappers for explicit dynamic linking.
static int dlclose (ACE_SHLIB_HANDLE handle);
- static ASYS_TCHAR *dlerror (void);
- static ACE_SHLIB_HANDLE dlopen (const ASYS_TCHAR *filename,
+ static ACE_TCHAR *dlerror (void);
+ static ACE_SHLIB_HANDLE dlopen (const ACE_TCHAR *filename,
int mode = ACE_DEFAULT_SHLIB_MODE);
static void *dlsym (ACE_SHLIB_HANDLE handle,
- const char *symbol);
+ const ACE_TCHAR *symbol);
// = A set of wrappers for the directory iterator.
- static DIR *opendir (const char *filename);
+ static DIR *opendir (const ACE_TCHAR *filename);
static void closedir (DIR *);
static struct dirent *readdir (DIR *);
static int readdir_r (DIR *dirp,
@@ -5432,35 +5421,27 @@ public:
static int fsync (ACE_HANDLE handle);
-# if !defined (ACE_HAS_WINCE)
- // CE doesn't support these char version functions.
- // However, we should provide UNICODE version of them.
- static FILE *fopen (const char *filename,
- const char *mode);
-# if defined (fdopen)
-# undef fdopen
-# endif /* fdopen */
- static FILE *fdopen (ACE_HANDLE handle,
- const char *mode);
- static char *fgets (char *buf,
- int size,
- FILE *fp);
- static int stat (const char *file,
- struct stat *);
- static int truncate (const char *filename,
- off_t length);
- static int fprintf (FILE *fp,
- const char *format,
- ...);
- static int sprintf (char *buf,
- const char *format,
- ...);
- static int vsprintf (char *buffer,
- const char *format,
- va_list argptr);
- static void perror (const char *s);
-
+ static FILE *fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode);
+# if defined (fdopen)
+# undef fdopen
+# endif /* fdopen */
+ static FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode);
+ static ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp);
+ static int stat (const ACE_TCHAR *file, struct stat *);
+ static int truncate (const ACE_TCHAR *filename, off_t length);
+
+ static int fprintf (FILE *fp, const char *format, ...);
+ static int sprintf (char *buf, const char *format, ...);
+ static int vsprintf (char *buffer, const char *format, va_list argptr);
static int printf (const char *format, ...);
+# if defined (ACE_HAS_WCHAR)
+ static int sprintf (wchar_t *buf, const wchar_t *format, ...);
+ static int fprintf (FILE *fp, const wchar_t *format, ...);
+ static int vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr);
+# endif /* ACE_HAS_WCHAR */
+
+ static void perror (const ACE_TCHAR *s);
+
// The old gets () which directly maps to the evil, unprotected
// gets () has been deprecated. If you really need gets (),
@@ -5472,10 +5453,9 @@ public:
// then swallows rest up to newline
// then swallows newline
static char *gets (char *str, int n = 0);
- static int puts (const char *s);
- static int fputs (const char *s,
+ static int puts (const ACE_TCHAR *s);
+ static int fputs (const ACE_TCHAR *s,
FILE *stream);
-# endif /* ! ACE_HAS_WINCE */
static int fflush (FILE *fp);
static size_t fread (void *ptr,
@@ -5511,7 +5491,7 @@ public:
// = A set of wrappers for file locks.
static int flock_init (ACE_OS::ace_flock_t *lock,
int flags = 0,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
mode_t perms = 0);
static int flock_destroy (ACE_OS::ace_flock_t *lock,
int unlink_file = 1);
@@ -5561,8 +5541,8 @@ public:
static void exit (int status = 0);
static void abort (void);
static pid_t fork (void);
- static pid_t fork (const char *program_name);
- static pid_t fork_exec (ASYS_TCHAR *argv[]);
+ static pid_t fork (const ACE_TCHAR *program_name);
+ static pid_t fork_exec (ACE_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.
@@ -5580,7 +5560,7 @@ public:
static int setpgid (pid_t pid, pid_t pgid);
static int setreuid (uid_t ruid, uid_t euid);
static int setregid (gid_t rgid, gid_t egid);
- static int system (const char *s);
+ static int system (const ACE_TCHAR *s);
static pid_t waitpid (pid_t pid,
ACE_exitcode *status = 0,
int wait_options = 0,
@@ -5664,17 +5644,8 @@ public:
static char *asctime (const struct tm *tm);
static char *asctime_r (const struct tm *tm,
char *buf, int buflen);
- static ASYS_TCHAR *ctime (const time_t *t);
-# if !defined (ACE_HAS_WINCE)
- static char *ctime_r (const time_t *clock,
- char *buf,
- int buflen);
-# endif /* !ACE_HAS_WINCE */
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- static wchar_t *ctime_r (const time_t *clock,
- wchar_t *buf,
- int buflen);
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+ static ACE_TCHAR *ctime (const time_t *t);
+ static ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen);
static size_t strftime (char *s,
size_t maxsize,
const char *format,
@@ -5745,7 +5716,7 @@ public:
// = A set of wrappers for recursive mutex locks.
static int recursive_mutex_init (ACE_recursive_thread_mutex_t *m,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0,
LPSECURITY_ATTRIBUTES sa = 0);
static int recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m);
@@ -5756,7 +5727,7 @@ public:
// = A set of wrappers for mutex locks.
static int mutex_init (ACE_mutex_t *m,
int type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0,
LPSECURITY_ATTRIBUTES sa = 0);
static int mutex_destroy (ACE_mutex_t *m);
@@ -5780,7 +5751,7 @@ public:
// single process.
static int thread_mutex_init (ACE_thread_mutex_t *m,
int type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0);
static int thread_mutex_destroy (ACE_thread_mutex_t *m);
static int thread_mutex_lock (ACE_thread_mutex_t *m);
@@ -5788,10 +5759,9 @@ public:
static int thread_mutex_unlock (ACE_thread_mutex_t *m);
// = A set of wrappers for low-level file operations.
- static int access (const char *path,
- int amode);
+ static int access (const ACE_TCHAR *path, int amode);
static int close (ACE_HANDLE handle);
- static ACE_HANDLE creat (LPCTSTR filename,
+ static ACE_HANDLE creat (const ACE_TCHAR *filename,
mode_t mode);
static ACE_HANDLE dup (ACE_HANDLE handle);
static int dup2 (ACE_HANDLE oldfd,
@@ -5799,7 +5769,7 @@ public:
static int fattach (int handle,
const char *path);
static long filesize (ACE_HANDLE handle);
- static long filesize (LPCTSTR handle);
+ static long filesize (const ACE_TCHAR *handle);
static int getmsg (ACE_HANDLE handle,
struct strbuf *ctl,
struct strbuf
@@ -5845,7 +5815,7 @@ public:
#if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
ACE_LOFF_T llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence);
#endif /* ACE_HAS_LLSEEK */
- static ACE_HANDLE open (const char *filename,
+ static ACE_HANDLE open (const ACE_TCHAR *filename,
int mode,
int perms = 0,
LPSECURITY_ATTRIBUTES sa = 0);
@@ -5942,29 +5912,26 @@ public:
const ACE_Time_Value &tv);
static int pipe (ACE_HANDLE handles[]);
- static ACE_HANDLE shm_open (const char *filename,
+ static ACE_HANDLE shm_open (const ACE_TCHAR *filename,
int mode,
int perms = 0,
LPSECURITY_ATTRIBUTES sa = 0);
- static int shm_unlink (const char *path);
+ static int shm_unlink (const ACE_TCHAR *path);
// = A set of wrappers for directory operations.
static mode_t umask (mode_t cmask);
-# if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- static int chdir (const char *path);
- static int mkdir (const char *path,
+ static int chdir (const ACE_TCHAR *path);
+ static int mkdir (const ACE_TCHAR *path,
mode_t mode = ACE_DEFAULT_DIR_PERMS);
- static int mkfifo (const char *file,
+ static int mkfifo (const ACE_TCHAR *file,
mode_t mode = ACE_DEFAULT_FILE_PERMS);
- static char *mktemp (char *t);
- static char *getcwd (char *,
- size_t);
- static int rename (const char *old_name,
- const char *new_name);
- static int unlink (const char *path);
- static char *tempnam (const char *dir = 0,
- const char *pfx = 0);
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+ static ACE_TCHAR *mktemp (ACE_TCHAR *t);
+ static ACE_TCHAR *getcwd (ACE_TCHAR *, size_t);
+ static int rename (const ACE_TCHAR *old_name,
+ const ACE_TCHAR *new_name);
+ static int unlink (const ACE_TCHAR *path);
+ static ACE_TCHAR *tempnam (const ACE_TCHAR *dir = 0,
+ const ACE_TCHAR *pfx = 0);
// = A set of wrappers for random number operations.
static int rand (void);
@@ -5974,7 +5941,7 @@ public:
// = A set of wrappers for readers/writer locks.
static int rwlock_init (ACE_rwlock_t *rw,
int type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
static int rwlock_destroy (ACE_rwlock_t *rw);
static int rw_rdlock (ACE_rwlock_t *rw);
@@ -5989,7 +5956,7 @@ public:
int manual_reset = 0,
int initial_state = 0,
int type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0,
LPSECURITY_ATTRIBUTES sa = 0);
static int event_destroy (ACE_event_t *event);
@@ -6005,7 +5972,7 @@ public:
static int sema_init (ACE_sema_t *s,
u_int count,
int type = ACE_DEFAULT_SYNCH_TYPE,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0,
int max = 0x7fffffff,
LPSECURITY_ATTRIBUTES sa = 0);
@@ -6099,36 +6066,36 @@ public:
// <qos_params> are ignored and the BSD-style <connect> is called.
static int closesocket (ACE_HANDLE s);
- static struct hostent *gethostbyaddr (const char *addr,
+ static struct hostent *gethostbyaddr (const ACE_TCHAR *addr,
int length,
int type);
- static struct hostent *gethostbyname (const char *name);
- static struct hostent *gethostbyname2 (const char *name, int type);
- static struct hostent *gethostbyaddr_r (const char *addr,
+ static struct hostent *gethostbyname (const ACE_TCHAR *name);
+ static struct hostent *gethostbyname2 (const ACE_TCHAR *name, int type);
+ static struct hostent *gethostbyaddr_r (const ACE_TCHAR *addr,
int length,
int type,
struct hostent *result,
ACE_HOSTENT_DATA buffer,
int *h_errnop);
- static struct hostent *gethostbyname_r (const char *name,
+ static struct hostent *gethostbyname_r (const ACE_TCHAR *name,
struct hostent *result,
ACE_HOSTENT_DATA buffer,
int *h_errnop);
static int getpeername (ACE_HANDLE handle,
struct sockaddr *addr,
int *addrlen);
- static struct protoent *getprotobyname (const char *name);
- static struct protoent *getprotobyname_r (const char *name,
+ static struct protoent *getprotobyname (const ACE_TCHAR *name);
+ static struct protoent *getprotobyname_r (const ACE_TCHAR *name,
struct protoent *result,
ACE_PROTOENT_DATA buffer);
static struct protoent *getprotobynumber (int proto);
static struct protoent *getprotobynumber_r (int proto,
struct protoent *result,
ACE_PROTOENT_DATA buffer);
- static struct servent *getservbyname (const char *svc,
- const char *proto);
- static struct servent *getservbyname_r (const char *svc,
- const char *proto,
+ static struct servent *getservbyname (const ACE_TCHAR *svc,
+ const ACE_TCHAR *proto);
+ static struct servent *getservbyname_r (const ACE_TCHAR *svc,
+ const ACE_TCHAR *proto,
struct servent *result,
ACE_SERVENT_DATA buf);
static int getsockname (ACE_HANDLE handle,
@@ -6139,16 +6106,16 @@ public:
int optname,
char *optval,
int *optlen);
- static long inet_addr (const char *name);
- static char *inet_ntoa (const struct in_addr addr);
- static int inet_aton (const char *strptr,
+ static long inet_addr (const ACE_TCHAR *name);
+ static ACE_TCHAR *inet_ntoa (const struct in_addr addr);
+ static int inet_aton (const ACE_TCHAR *strptr,
struct in_addr *addr);
- static const char *inet_ntop (int family,
- const void *addrptr,
- char *strptr,
- size_t len);
+ static const ACE_TCHAR *inet_ntop (int family,
+ const void *addrptr,
+ ACE_TCHAR *strptr,
+ size_t len);
static int inet_pton (int family,
- const char *strptr,
+ const ACE_TCHAR *strptr,
void *addrptr);
static int enum_protocols (int *protocols,
ACE_Protocol_Info *protocol_buffer,
@@ -6251,105 +6218,120 @@ public:
static int step (const char *str,
char *expbuf);
- // = A set of wrappers for non-UNICODE string operations.
+ // = A set of wrappers for string operations.
+
static int to_lower (int c);
- static int strcasecmp (const char *s,
- const char *t);
- static int strncasecmp (const char *s,
- const char *t,
- size_t len);
- static char *strcat (char *s,
- const char *t);
- static char *strchr (char *s,
- int c);
- static const char *strchr (const char *s,
- int c);
- static char *strrchr (char *s,
- int c);
- static const char *strrchr (const char *s,
- int c);
- static char *strnchr (char *s,
- int c,
- size_t len);
- static const char *strnchr (const char *s,
- int c,
- size_t len);
- static int strcmp (const char *s,
- const char *t);
- static int strncmp (const char *s,
- const char *t,
- size_t len);
- static char *strcpy (char *s,
- const char *t);
+#if defined (ACE_HAS_WCHAR)
+ static wint_t to_lower (wint_t c);
+#endif /* ACE_HAS_WCHAR */
+
+ static char *strcat (char *s, const char *t);
+ static char *strncat (char *s, const char *t, size_t len);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strcat (wchar_t *s, const wchar_t *t);
+ static wchar_t *strncat (wchar_t *s, const wchar_t *t, size_t len);
+#endif /* ACE_HAS_WCHAR */
+
+ static char *strchr (char *s, int c);
+ static const char *strchr (const char *s, int c);
+ static char *strrchr (char *s, int c);
+ static const char *strrchr (const char *s, int c);
+ static char *strnchr (char *s, int c, size_t len);
+ static const char *strnchr (const char *s, int c, size_t len);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strchr (wchar_t *s, wint_t c);
+ static const wchar_t *strchr (const wchar_t *s, wint_t c);
+ static wchar_t *strrchr (wchar_t *s, wint_t c);
+ static const wchar_t *strrchr (const wchar_t *s, wint_t c);
+ static wchar_t *strnchr (wchar_t *s, wint_t c, size_t len);
+ static const wchar_t *strnchr (const wchar_t *s, wint_t c, size_t len);
+#endif /* ACE_HAS_WCHAR */
+
+ static int strcmp (const char *s, const char *t);
+ static int strncmp (const char *s, const char *t, size_t len);
+ static int strcasecmp (const char *s, const char *t);
+ static int strncasecmp (const char *s, const char *t, size_t len);
+#if defined (ACE_HAS_WCHAR)
+ static int strcmp (const wchar_t *s, const wchar_t *t);
+ static int strncmp (const wchar_t *s, const wchar_t *t, size_t len);
+ static int strcasecmp (const wchar_t *s, const wchar_t *t);
+ static int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len);
+#endif /* ACE_HAS_WCHAR */
+
+ static char *strcpy (char *s, const char *t);
static char *strecpy (char *des, const char *src);
// Copies <src> to <des>, returning a pointer to the end of the
// copied region, rather than the beginning, as <strcpy> does.
- static char *strpbrk (char *s1,
- const char *s2);
- static const char *strpbrk (const char *s1,
- const char *s2);
- static size_t strcspn (const char *s,
- const char *reject);
- static size_t strspn(const char *s1,
- const char *s2);
+ static char *strncpy (char *s, const char *t, size_t len);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strcpy (wchar_t *s, const wchar_t *t);
+ static wchar_t *strecpy (wchar_t *s, const wchar_t *t);
+ static wchar_t *strncpy (wchar_t *s, const wchar_t *t, size_t len);
+#endif /* ACE_HAS_WCHAR */
+
+ static char *strpbrk (char *s1, const char *s2);
+ static const char *strpbrk (const char *s1, const char *s2);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
+ static const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
+#endif /* ACE_HAS_WCHAR */
+
+
+ static size_t strcspn (const char *s, const char *reject);
+
+ static size_t strspn (const char *s1, const char *s2);
+#if defined (ACE_HAS_WCHAR)
+ static size_t strspn (const wchar_t *s1, const wchar_t *s2);
+#endif /* ACE_HAS_WCHAR */
+
#if defined (ACE_HAS_STRPTIME)
static char *strptime (char *buf,
const char *format,
struct tm *tm);
#endif /* ACE_HAS_STRPTIME */
- static char *strstr (char *s,
- const char *t);
- static const char *strstr (const char *s,
- const char *t);
- static char *strnstr (char *s,
- const char *t,
- size_t len);
- static const char *strnstr (const char *s,
- const char *t,
- size_t len);
+
+ static char *strstr (char *s, const char *t);
+ static const char *strstr (const char *s, const char *t);
+ static char *strnstr (char *s, const char *t, size_t len);
+ static const char *strnstr (const char *s, const char *t, size_t len);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strstr (wchar_t *s, const wchar_t *t);
+ static const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
+ static wchar_t *strnstr (wchar_t *s, const wchar_t *t, size_t len);
+ static const wchar_t *strnstr (const wchar_t *s, const wchar_t *t, size_t len);
+#endif /* ACE_HAS_WCHAR */
+
static char *strdup (const char *s); // Uses malloc
- static char *strenvdup (const char *str);
- static size_t strlen (const char *s);
- static char *strncpy (char *s,
- const char *t,
- size_t len);
- static char *strncat (char *s,
- const char *t,
- size_t len);
- static char *strtok (char *s,
- const char *tokens);
- static char *strtok_r (char *s,
- const char *tokens,
- char **lasts);
- static long strtol (const char *s,
- char **ptr,
- int base);
- static u_long strtoul (const char *s,
- char **ptr,
- int base);
- static double strtod (const char *s,
- char **endptr);
- static int ace_isspace (const char s);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strdup (const wchar_t *s);
+#endif /* ACE_HAS_WCHAR */
-# if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
+ static size_t strlen (const char *s);
+#if defined (ACE_HAS_WCHAR)
static size_t strlen (const wchar_t *s);
- static wchar_t *strcpy (wchar_t *s,
- const wchar_t *t);
- static int strcmp (const wchar_t *s,
- const wchar_t *t);
- static size_t strspn (const wchar_t *string,
- const wchar_t *charset);
- static wchar_t *strenvdup (const wchar_t *str);
-# endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
- static size_t strlen (const ACE_UINT16 *s);
- static ACE_UINT16 *strcpy (ACE_UINT16 *s,
- const ACE_UINT16 *t);
- static int strcmp (const ACE_USHORT16 *s,
- const ACE_USHORT16 *t);
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
+#endif /* ACE_HAS_WCHAR */
+
+ static char *strtok (char *s, const char *tokens);
+ static char *strtok_r (char *s, const char *tokens, char **lasts);
+#if defined (ACE_HAS_WCHAR)
+ static wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
+#endif /* ACE_HAS_WCHAR */
+
+ static long strtol (const char *s, char **ptr, int base);
+ static u_long strtoul (const char *s, char **ptr, int base);
+ static double strtod (const char *s, char **endptr);
+#if defined (ACE_HAS_WCHAR)
+ static long strtol (const wchar_t *s, wchar_t **ptr, int base);
+ static u_long strtoul (const wchar_t *s, wchar_t **ptr, int base);
+ static double strtod (const wchar_t *s, wchar_t **endptr);
+#endif /* ACE_HAS_WCHAR */
+
+ static int ace_isspace (const char s);
+#if defined (ACE_HAS_WCHAR)
+ static int ace_isspace (wchar_t c);
+#endif /* ACE_HAS_WCHAR */
+ // @@ UNICODE: (brunsch) Can this be handled better?
// The following WChar typedef and functions are used by TAO. TAO
// does not use wchar_t because the size of wchar_t is
// platform-dependent. These are to be used for all
@@ -6364,124 +6346,6 @@ public:
const WChar *,
size_t len);
-# if defined (ACE_HAS_UNICODE)
- // = A set of wrappers for UNICODE string operations.
- static int atoi (const wchar_t *s);
- static wint_t to_lower (wint_t c);
- static wchar_t *strcat (wchar_t *s,
- const wchar_t *t);
- static wchar_t *strchr (wchar_t *s,
- wint_t c);
- static const wchar_t *strchr (const wchar_t *s,
- wint_t c);
- static wchar_t *strecpy (wchar_t *s, const wchar_t *t);
- static wchar_t *strrchr (wchar_t *s,
- wint_t c);
- static const wchar_t *strrchr (const wchar_t *s,
- wint_t c);
- static wchar_t *strnchr (wchar_t *s,
- wint_t c,
- size_t len);
- static const wchar_t *strnchr (const wchar_t *s,
- wint_t c,
- size_t len);
- static int strncmp (const wchar_t *s,
- const wchar_t *t,
- size_t len);
- static int strcasecmp (const wchar_t *s,
- const wchar_t *t);
- static int strncasecmp (const wchar_t *s,
- const wchar_t *t,
- size_t len);
- static wchar_t *strpbrk (wchar_t *s1,
- const wchar_t *s2);
- static const wchar_t *strpbrk (const wchar_t *s1,
- const wchar_t *s2);
- static wchar_t *strncpy (wchar_t *s,
- const wchar_t *t,
- size_t len);
- static wchar_t *strncat (wchar_t *s,
- const wchar_t *t,
- size_t len);
- static wchar_t *strtok (wchar_t *s,
- const wchar_t *tokens);
- static long strtol (const wchar_t *s,
- wchar_t **ptr,
- int base);
- static u_long strtoul (const wchar_t *s,
- wchar_t **ptr,
- int base);
- static double strtod (const wchar_t *s,
- wchar_t **endptr);
- static int ace_isspace (wchar_t c);
-
-# if defined (ACE_WIN32)
- static wchar_t *strstr (wchar_t *s,
- const wchar_t *t);
- static const wchar_t *strstr (const wchar_t *s,
- const wchar_t *t);
- static wchar_t *strnstr (wchar_t *s,
- const wchar_t *t,
- size_t len);
- static const wchar_t *strnstr (const wchar_t *s,
- const wchar_t *t,
- size_t len);
- static wchar_t *strdup (const wchar_t *s); // Uses malloc
- static int sprintf (wchar_t *buf,
- const wchar_t *format,
- ...);
-# if 0
- static int sprintf (wchar_t *buf,
- const char *format,
- ...);
-# endif /* 0 */
- // the following three are newly added for CE.
- // but they can also be use on Win32.
- static wchar_t *fgets (wchar_t *buf,
- int size,
- FILE *fp);
- static int fprintf (FILE *fp,
- const wchar_t *format,
- ...);
- static void perror (const wchar_t *s);
-
- static int vsprintf (wchar_t *buffer,
- const wchar_t *format,
- va_list argptr);
-
- static int access (const wchar_t *path,
- int amode);
- static FILE *fopen (const wchar_t *filename,
- const wchar_t *mode);
- static FILE *fdopen (ACE_HANDLE handle,
- const wchar_t *mode);
- static int stat (const wchar_t *file,
- struct stat *);
- static int truncate (const wchar_t *filename,
- off_t length);
- static int putenv (const wchar_t *str);
- static wchar_t *getenv (const wchar_t *symbol);
- static int system (const wchar_t *s);
- static int hostname (wchar_t *name,
- size_t maxnamelen);
- static ACE_HANDLE open (const wchar_t *filename,
- int mode,
- int perms = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int rename (const wchar_t *oldname,
- const wchar_t *newname);
- static int unlink (const wchar_t *path);
- static wchar_t *mktemp (wchar_t *t);
- static int mkdir (const wchar_t *path,
- mode_t mode = ACE_DEFAULT_DIR_PERMS);
- static int chdir (const wchar_t *path);
- static wchar_t *getcwd (wchar_t *,
- size_t);
- static int mkfifo (const wchar_t *file,
- mode_t mode = ACE_DEFAULT_FILE_PERMS);
-# endif /* ACE_WIN32 */
-# endif /* ACE_HAS_UNICODE */
-
// = A set of wrappers for TLI.
static int t_accept (ACE_HANDLE fildes,
int resfd,
@@ -6683,7 +6547,7 @@ public:
static void thr_yield (void);
static void unique_name (const void *object,
- LPTSTR name,
+ ACE_TCHAR *name,
size_t length);
// This method uses process id and object pointer to come up with a
// machine wide unique name. The process ID will provide uniqueness
@@ -6765,8 +6629,7 @@ private:
// Supporting data for ctime and ctime_r functions on WinCE.
# endif /* ACE_HAS_WINCE */
- static void fopen_mode_to_open_mode_converter (char x,
- int &hmode);
+ static void fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode);
// Translate fopen's mode char to open's mode. This helper function
// is here to avoid maintaining several pieces of identical code.
@@ -6940,7 +6803,7 @@ private:
int at_exit (ACE_EXIT_HOOK func);
// For <ACE_OS::atexit> support.
- static void print_error_message (u_int line_number, LPCTSTR message);
+ static void print_error_message (u_int line_number, const ACE_TCHAR *message);
// For use by init () and fini (), to consolidate error reporting.
friend class ACE_OS;
@@ -6953,32 +6816,6 @@ private:
// This class is for internal use by ACE_OS, etc., only.
};
-# if defined (ACE_HAS_WINCE)
-
-// **** Warning ****
-// You should not use the following functions under CE at all.
-//
-// **** Warning ****
-
-size_t fwrite (void *buf, size_t sz, size_t count, FILE *fp);
-size_t fread (void *buf, size_t sz, size_t count, FILE *fp);
-int getc (FILE *fp);
-int ferror (FILE *fp);
-int isatty (int h);
-int fileno (FILE *fp);
-int fflush (FILE *fp);
-# if defined (UNDER_CE) && (UNDER_CE < 211)
-void exit (int status);
-# endif /* UNDER_CE && UNDER_CE < 211 */
-int fprintf (FILE *fp, char *format, const char *msg); // not a general purpose
- // fprintf at all.
-int printf (const char *format, ...);
-int putchar (int c);
-
-// **** End CE Warning ****
-
-# endif /* ACE_HAS_WINCE */
-
# if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
extern "C" ssize_t recv_timedwait (ACE_HANDLE handle,
char *buf,
@@ -7247,64 +7084,6 @@ private:
# endif /* defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) */
-class ACE_Export ACE_OS_WString
-{
- // = TITLE
- // A lightweight wchar* to char* string conversion class.
- //
- // = DESCRIPTION
- // The purpose of this class is to perform conversion between
- // wchar and char strings. It is not intended for general
- // purpose use.
-public:
- ACE_OS_WString (const ACE_USHORT16 *s);
- // Ctor must take a wchar stirng.
-
- ~ACE_OS_WString (void);
- // Dtor will free up the memory.
-
- char *char_rep (void);
- // Return the internal char* representation.
-
-private:
- char *rep_;
- // Internal pointer to the converted string.
-
- ACE_OS_WString (void);
- ACE_OS_WString (ACE_OS_WString &);
- ACE_OS_WString& operator= (ACE_OS_WString &);
- // Disallow these operation.
-};
-
-class ACE_Export ACE_OS_CString
-{
- // = TITLE
- // A lightweight char* to wchar* string conversion class.
- //
- // = DESCRIPTION
- // The purpose of this class is to perform conversion from
- // char* to wchar* strings. It is not intended for general
- // purpose use.
-public:
- ACE_OS_CString (const char *s);
- // Ctor must take a wchar stirng.
-
- ~ACE_OS_CString (void);
- // Dtor will free up the memory.
-
- ACE_USHORT16 *wchar_rep (void);
- // Return the internal char* representation.
-
-private:
- ACE_USHORT16 *rep_;
- // Internal pointer to the converted string.
-
- ACE_OS_CString (void);
- ACE_OS_CString (ACE_OS_CString &);
- ACE_OS_CString operator= (ACE_OS_CString &);
- // Disallow these operation.
-};
-
// Support non-scalar thread keys, such as with some POSIX
// implementations, e.g., MVS.
# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
@@ -7724,9 +7503,9 @@ extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args);
# define ACE_PTHREAD_CLEANUP_POP(A)
# endif /* ACE_HAS_THR_C_FUNC */
-# if !defined (ACE_DEFAULT_MUTEX_A)
-# define ACE_DEFAULT_MUTEX_A "ACE_MUTEX"
-# endif /* ACE_DEFAULT_MUTEX_A */
+# if !defined (ACE_DEFAULT_MUTEX)
+# define ACE_DEFAULT_MUTEX ACE_TEXT ("ACE_MUTEX")
+# endif /* ACE_DEFAULT_MUTEX */
# if !defined (ACE_MAIN)
# define ACE_MAIN main
@@ -7800,9 +7579,9 @@ int \
ace_main_i
# else
# define main \
-ace_main_i (int, ASYS_TCHAR *[]); /* forward declaration */ \
+ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \
int \
-ACE_MAIN (int argc, ASYS_TCHAR *argv[]) /* user's entry point, e.g., main */ \
+ACE_MAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \
{ \
ACE_MAIN_OBJECT_MANAGER \
return ace_main_i (argc, argv); /* what the user calls "main" */ \
@@ -7811,9 +7590,9 @@ int \
ace_main_i
# if defined (ACE_WIN32) && defined (UNICODE)
# define wmain \
-ace_main_i (int, ASYS_TCHAR *[]); /* forward declaration */ \
+ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \
int \
-wmain (int argc, ASYS_TCHAR *argv[]) /* user's entry point, e.g., main */ \
+wmain (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \
{ \
ACE_MAIN_OBJECT_MANAGER \
return ace_main_i (argc, argv); /* what the user calls "main" */ \
@@ -7889,7 +7668,7 @@ public:
static ACE_CE_Bridge *get_default_winbridge (void);
// Get the reference of default ACE_CE_BRIDGE.
- int write_msg (LPCTSTR str);
+ int write_msg (const ACE_TCHAR *str);
// Write a string to windows.
#if 0
@@ -7912,7 +7691,7 @@ private:
// IDC code of the window that receives WM_COMMAND when
// outputing strings.
- ASYS_TCHAR *cmdline_;
+ ACE_TCHAR *cmdline_;
static ACE_CE_Bridge *default_text_bridge_;
// A pointer to the default ACE_CE_BRIDGE obj.
@@ -8025,110 +7804,26 @@ typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS;
# define ACE_WAIT_TIMEOUT LONG_MAX
# endif /* ACE_WIN32 */
-# if defined (UNICODE)
-
-# if !defined (ACE_DEFAULT_LOCALNAME)
-# define ACE_DEFAULT_LOCALNAME ACE_DEFAULT_LOCALNAME_W
-# endif /* ACE_DEFAULT_LOCALNAME */
-# if !defined (ACE_DEFAULT_GLOBALNAME)
-# define ACE_DEFAULT_GLOBALNAME ACE_DEFAULT_GLOBALNAME_W
-# endif /* ACE_DEFAULT_GLOBALNAME */
-# if !defined (ACE_DIRECTORY_SEPARATOR_STR)
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_DIRECTORY_SEPARATOR_STR_W
-# endif /* ACE_DIRECTORY_SEPARATOR_STR */
-# if !defined (ACE_DIRECTORY_SEPARATOR_CHAR)
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_DIRECTORY_SEPARATOR_CHAR_W
-# endif /* ACE_DIRECTORY_SEPARATOR_CHAR */
-# if !defined (ACE_PLATFORM)
-# define ACE_PLATFORM ACE_PLATFORM_W
-# endif /* ACE_PLATFORM */
-# if !defined (ACE_PLATFORM_EXE_SUFFIX)
-# define ACE_PLATFORM_EXE_SUFFIX ACE_PLATFORM_EXE_SUFFIX_W
-# endif /* ACE_PLATFORM_EXE_SUFFIX */
-# if !defined (ACE_DEFAULT_MUTEX_W)
-# define ACE_DEFAULT_MUTEX_W L"ACE_MUTEX"
-# endif /* ACE_DEFAULT_MUTEX_W */
-# if !defined (ACE_DEFAULT_MUTEX)
-# define ACE_DEFAULT_MUTEX ACE_DEFAULT_MUTEX_W
-# endif /* ACE_DEFAULT_MUTEX */
+// Some ACE classes always use inline functions to maintain high
+// performance, but some platforms have buggy inline function support.
+// In this case, we don't use inline with them.
+# if defined (ACE_LACKS_INLINE_FUNCTIONS)
+# if defined (ASYS_INLINE)
+# undef ASYS_INLINE
+# endif /* ASYS_INLINE */
+# define ASYS_INLINE
+# if defined (ACE_HAS_INLINED_OSCALLS)
+# undef ACE_HAS_INLINED_OSCALLS
+# endif /* ACE_HAS_INLINED_OSCALLS */
# else
-
-# if !defined (ACE_DEFAULT_LOCALNAME)
-# define ACE_DEFAULT_LOCALNAME ACE_DEFAULT_LOCALNAME_A
-# endif /* ACE_DEFAULT_LOCALNAME */
-# if !defined (ACE_DEFAULT_GLOBALNAME)
-# define ACE_DEFAULT_GLOBALNAME ACE_DEFAULT_GLOBALNAME_A
-# endif /* ACE_DEFAULT_GLOBALNAME */
-# if !defined (ACE_DIRECTORY_SEPARATOR_STR)
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_DIRECTORY_SEPARATOR_STR_A
-# endif /* ACE_DIRECTORY_SEPARATOR_STR */
-# if !defined (ACE_DIRECTORY_SEPARATOR_CHAR)
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_DIRECTORY_SEPARATOR_CHAR_A
-# endif /* ACE_DIRECTORY_SEPARATOR_CHAR */
-# if !defined (ACE_PLATFORM)
-# define ACE_PLATFORM ACE_PLATFORM_A
-# endif /* ACE_PLATFORM */
-# if !defined (ACE_PLATFORM_EXE_SUFFIX)
-# define ACE_PLATFORM_EXE_SUFFIX ACE_PLATFORM_EXE_SUFFIX_A
-# endif /* ACE_PLATFORM_EXE_SUFFIX */
-# if !defined (ACE_DEFAULT_MUTEX_W)
-# define ACE_DEFAULT_MUTEX_W "ACE_MUTEX"
-# endif /* ACE_DEFAULT_MUTEX_W */
-# if !defined (ACE_DEFAULT_MUTEX)
-# define ACE_DEFAULT_MUTEX ACE_DEFAULT_MUTEX_A
-# endif /* ACE_DEFAULT_MUTEX */
-# endif /* UNICODE */
+# define ASYS_INLINE inline
+# endif /* ACE_LACKS_INLINE_FUNCTIONS */
# if !defined (ACE_HAS_MINIMAL_ACE_OS)
# include "ace/Trace.h"
# endif /* ! ACE_HAS_MINIMAL_ACE_OS */
-// The following are some insane macros that are useful in cases when
-// one has to have a string in a certain format. Both of these macros
-// allow the user to create a temporary copy. If the user needs to
-// keep this temporary string around, they must do some sort of strdup
-// on the temporary string.
-//
-// The ACE_WIDE_STRING macro allows the user to create a temporary
-// representation of an ASCII string as a WIDE string.
-//
-// The ACE_MULTIBYTE_STRING macro allows the user to create a
-// temporary representation of a WIDE string as an ASCII string. Note
-// that some data may be lost in this conversion.
-
-# if defined (UNICODE)
-# define ACE_WIDE_STRING(ASCII_STRING) \
-ACE_OS_CString (ASCII_STRING).wchar_rep ()
-# define ACE_MULTIBYTE_STRING(WIDE_STRING) \
-ACE_OS_WString (WIDE_STRING).char_rep ()
-# define ACE_TEXT_STRING ACE_WString
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# define ASYS_MULTIBYTE_STRING(WIDE_STRING) WIDE_STRING
-# define ASYS_ONLY_WIDE_STRING(WIDE_STRING) WIDE_STRING
-# define ASYS_ONLY_MULTIBYTE_STRING(WIDE_STRING) \
-ACE_OS_WString (WIDE_STRING).char_rep ()
-# else
-# define ASYS_MULTIBYTE_STRING(WIDE_STRING) \
-ACE_OS_WString (WIDE_STRING).char_rep ()
-# define ASYS_ONLY_WIDE_STRING(ASCII_STRING) \
-ACE_OS_CString (ASCII_STRING).wchar_rep ()
-# define ASYS_ONLY_MULTIBYTE_STRING(WIDE_STRING) WIDE_STRING
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-# else
-# define ACE_WIDE_STRING(ASCII_STRING) ASCII_STRING
-# define ACE_MULTIBYTE_STRING(WIDE_STRING) WIDE_STRING
-# define ACE_TEXT_STRING ACE_CString
-# define ASYS_MULTIBYTE_STRING(WIDE_STRING) WIDE_STRING
-# define ASYS_ONLY_WIDE_STRING(WIDE_STRING) WIDE_STRING
-# define ASYS_ONLY_MULTIBYTE_STRING(WIDE_STRING) WIDE_STRING
-# endif /* UNICODE */
-
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# define ASYS_WIDE_STRING(ASCII_STRING) ACE_OS_CString (ASCII_STRING).wchar_rep ()
-# else
-# define ASYS_WIDE_STRING(ASCII_STRING) ASCII_STRING
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
# if defined (ACE_HAS_INLINED_OSCALLS)
# if defined (ACE_INLINE)
diff --git a/ace/OS.i b/ace/OS.i
index a7b5436b1c6..40a1a5b6c93 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -532,6 +532,60 @@ ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg)
# endif /* ACE_LACKS_FCNTL */
}
+ACE_INLINE int
+ACE_OS::chdir (const ACE_TCHAR *path)
+{
+ ACE_TRACE ("ACE_OS::chdir");
+# if defined (VXWORKS)
+ ACE_OSCALL_RETURN (::chdir (ACE_const_cast (char *, path)), int, -1);
+
+#elif defined (ACE_PSOS_LACKS_PHILE)
+ ACE_UNUSED_ARG (path);
+ ACE_NOTSUP_RETURN (-1);
+
+#elif defined (ACE_PSOS)
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::change_dir ((char *) path), ace_result_),
+ int, -1);
+
+#elif defined (__IBMCPP__) && (__IBMCPP__ >= 400)
+ ACE_OSCALL_RETURN (::_chdir (path), int, -1);
+
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wchdir (path), int, -1);
+
+#else
+ ACE_OSCALL_RETURN (::chdir (path), int, -1);
+
+# endif /* VXWORKS */
+}
+
+#if !defined (ACE_LACKS_MKTEMP)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::mktemp (ACE_TCHAR *s)
+{
+# if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ return ::_wmktemp (s);
+# elif defined (ACE_WIN32)
+ return ::_mktemp (s);
+# else /* ACE_WIN32 */
+ return ::mktemp (s);
+# endif /* ACE_WIN32 */
+}
+#endif /* !ACE_LACKS_MKTEMP */
+
+ACE_INLINE int
+ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode)
+{
+ ACE_TRACE ("ACE_OS::mkfifo");
+#if defined (ACE_LACKS_MKFIFO)
+ ACE_UNUSED_ARG (file);
+ ACE_UNUSED_ARG (mode);
+ ACE_NOTSUP_RETURN (-1);
+#else
+ ACE_OSCALL_RETURN (::mkfifo (file, mode), int, -1);
+# endif /* ACE_LACKS_MKFIFO */
+}
+
#if !defined (ACE_WIN32)
// Matthew Stevens 7-10-95 Fix GNU GCC 2.7 for memchr() problem.
@@ -595,27 +649,6 @@ extern "C" char *mktemp (char *);
# define ACE_ADAPT_RETVAL(OP,RESULT) ((RESULT = (OP)) != 0 ? (errno = RESULT, -1) : 0)
# endif /* VXWORKS */
-# if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE int
-ACE_OS::chdir (const char *path)
-{
- ACE_TRACE ("ACE_OS::chdir");
-# if defined (VXWORKS)
- ACE_OSCALL_RETURN (::chdir (ACE_const_cast (char *, path)), int, -1);
-
-#elif defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (path);
- ACE_NOTSUP_RETURN (-1);
-
-#elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::change_dir ((char *) path), ace_result_),
- int, -1);
-#else
- ACE_OSCALL_RETURN (::chdir (path), int, -1);
-# endif /* VXWORKS */
-}
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-
ACE_INLINE int
ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
{
@@ -688,29 +721,6 @@ ACE_OS::getopt (int argc, char *const *argv, const char *optstring)
# endif /* VXWORKS */
}
-# if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE int
-ACE_OS::mkfifo (const char *file, mode_t mode)
-{
- ACE_TRACE ("ACE_OS::mkfifo");
-#if defined (ACE_LACKS_MKFIFO)
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::mkfifo (file, mode), int, -1);
-# endif /* ACE_LACKS_MKFIFO */
-}
-
-# if !defined (ACE_LACKS_MKTEMP)
-ACE_INLINE char *
-ACE_OS::mktemp (char *s)
-{
- return ::mktemp (s);
-}
-# endif /* !ACE_LACKS_MKTEMP */
-# endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
-
ACE_INLINE int
ACE_OS::pipe (ACE_HANDLE fds[])
{
@@ -830,27 +840,6 @@ ACE_OS::default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa)
#endif /* ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES */
}
-# if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE int
-ACE_OS::chdir (const char *path)
-{
- ACE_TRACE ("ACE_OS::chdir");
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
- ACE_OSCALL_RETURN (::_chdir (path), int, -1);
-#else
- ACE_OSCALL_RETURN (::_chdir ((char *) path), int, -1);
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */
-}
-
-# if !defined (ACE_LACKS_MKTEMP)
-ACE_INLINE char *
-ACE_OS::mktemp (char *s)
-{
- return ::mktemp (s);
-}
-# endif /* !ACE_LACKS_MKTEMP */
-# endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
-
ACE_INLINE int
ACE_OS::getopt (int argc, char *const *argv, const char *optstring)
{
@@ -862,18 +851,6 @@ ACE_OS::getopt (int argc, char *const *argv, const char *optstring)
ACE_NOTSUP_RETURN (-1);
}
-# if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE int
-ACE_OS::mkfifo (const char *file, mode_t mode)
-{
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (mode);
-
- ACE_TRACE ("ACE_OS::mkfifo");
- ACE_NOTSUP_RETURN (-1);
-}
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-
ACE_INLINE int
ACE_OS::pipe (ACE_HANDLE fds[])
{
@@ -1034,12 +1011,11 @@ ACE_OS::gettimeofday (void)
return ACE_Time_Value (tv);
}
-#if !defined (ACE_HAS_WINCE)
ACE_INLINE int
-ACE_OS::stat (const char *file, struct stat *stp)
+ACE_OS::stat (const ACE_TCHAR *file, struct stat *stp)
{
ACE_TRACE ("ACE_OS::stat");
-# if defined (VXWORKS)
+#if defined (VXWORKS)
ACE_OSCALL_RETURN (::stat ((char *) file, stp), int, -1);
#elif defined (ACE_PSOS_LACKS_PHILE)
ACE_UNUSED_ARG (file);
@@ -1047,17 +1023,41 @@ ACE_OS::stat (const char *file, struct stat *stp)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_PSOS)
ACE_OSCALL_RETURN (::stat_f ((char *) file, stp), int, -1);
-#else
-# if defined (ACE_HAS_X86_STAT_MACROS)
+#elif defined (ACE_HAS_WINCE)
+ ACE_TEXT_WIN32_FIND_DATA fdata;
+
+ HANDLE fhandle;
+
+ fhandle = ::FindFirstFile (file, &fdata);
+ if (fhandle == INVALID_HANDLE_VALUE)
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
+ else if (fdata.nFileSizeHigh != 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ {
+ stp->st_size = fdata.nFileSizeLow;
+ stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime);
+ stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime);
+ }
+ return 0;
+#elif defined (ACE_HAS_X86_STAT_MACROS)
// Solaris for intel uses an macro for stat(), this macro is a
// wrapper for _xstat().
ACE_OSCALL_RETURN (::_xstat (_STAT_VER, file, stp), int, -1);
-#else /* !ACE_HAS_X86_STAT_MACROS */
+#elif defined (__BORLANDC__) && (__BORLANDC__ <= 0x540) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wstat (file, stp), int, -1);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wstat (file, (struct _stat *) stp), int, -1);
+#else /* VXWORKS */
ACE_OSCALL_RETURN (::stat (file, stp), int, -1);
-#endif /* !ACE_HAS_X86_STAT_MACROS */
-# endif /* VXWORKS */
+#endif /* VXWORKS */
}
-#endif /* ACE_HAS_WINCE */
ACE_INLINE time_t
ACE_OS::time (time_t *tloc)
@@ -1095,9 +1095,8 @@ ACE_OS::rand (void)
ACE_OSCALL_RETURN (::rand (), int, -1);
}
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
ACE_INLINE int
-ACE_OS::unlink (const char *path)
+ACE_OS::unlink (const ACE_TCHAR *path)
{
ACE_TRACE ("ACE_OS::unlink");
# if defined (VXWORKS)
@@ -1108,31 +1107,41 @@ ACE_OS::unlink (const char *path)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::remove ((char *) path),
ace_result_),
int, -1);
+# elif defined (ACE_HAS_WINCE)
+ // @@ The problem is, DeleteFile is not actually equals to unlink. ;(
+ ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (path), ace_result_),
+ int, -1);
# elif defined (ACE_LACKS_UNLINK)
ACE_UNUSED_ARG (path);
ACE_NOTSUP_RETURN (-1);
+# elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wunlink (path), int, -1);
# else
ACE_OSCALL_RETURN (::unlink (path), int, -1);
# endif /* VXWORKS */
}
ACE_INLINE int
-ACE_OS::rename (const char *old_name, const char *new_name)
+ACE_OS::rename (const ACE_TCHAR *old_name, const ACE_TCHAR *new_name)
{
# if (ACE_LACKS_RENAME)
ACE_UNUSED_ARG (old_name);
ACE_UNUSED_ARG (new_name);
ACE_NOTSUP_RETURN (-1);
-# else
+# elif defined (ACE_HAS_WINCE)
+ ACE_OSCALL_RETURN (::MoveFile (new_name, old_name), int, -1);
+# elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wrename (old_name, new_name), int, -1);
+# else /* ACE_LACKS_RENAME */
ACE_OSCALL_RETURN (::rename (old_name, new_name), int, -1);
# endif /* ACE_LACKS_RENAME */
}
-ACE_INLINE char *
-ACE_OS::tempnam (const char *dir, const char *pfx)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx)
{
ACE_TRACE ("ACE_OS::tempnam");
-# if defined (VXWORKS) || defined (ACE_LACKS_TEMPNAM)
+#if defined (VXWORKS) || defined (ACE_LACKS_TEMPNAM)
ACE_UNUSED_ARG (dir);
ACE_UNUSED_ARG (pfx);
ACE_NOTSUP_RETURN (0);
@@ -1140,21 +1149,17 @@ ACE_OS::tempnam (const char *dir, const char *pfx)
// pSOS only considers the directory prefix
ACE_UNUSED_ARG (pfx);
ACE_OSCALL_RETURN (::tmpnam ((char *) dir), char *, 0);
-#else
-#if defined (ACE_WIN32)
-#if defined (__BORLANDC__) || (__IBMCPP__)
+#elif defined (__BORLANDC__) || (__IBMCPP__)
ACE_OSCALL_RETURN (::_tempnam ((char *) dir, (char *) pfx), char *, 0);
-# else
- ACE_OSCALL_RETURN (::_tempnam (dir, pfx), char *, 0);
-# endif /* __BORLANDC__ || __IBMCPP__ */
-# else
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wtempnam (dir, pfx), wchar_t *, 0);
+#else /* VXWORKS */
ACE_OSCALL_RETURN (::tempnam (dir, pfx), char *, 0);
-# endif /* WIN32 */
-# endif /* VXWORKS */
+#endif /* VXWORKS */
}
ACE_INLINE ACE_HANDLE
-ACE_OS::shm_open (const char *filename,
+ACE_OS::shm_open (const ACE_TCHAR *filename,
int mode,
int perms,
LPSECURITY_ATTRIBUTES sa)
@@ -1165,13 +1170,12 @@ ACE_OS::shm_open (const char *filename,
ACE_OSCALL_RETURN (::shm_open (filename, mode, perms), ACE_HANDLE, -1);
# else /* ! ACE_HAS_SHM_OPEN */
// Just use ::open.
- return ACE_OS::open (filename, mode, perms,
- sa);
+ return ACE_OS::open (filename, mode, perms, sa);
# endif /* ! ACE_HAS_SHM_OPEN */
}
ACE_INLINE int
-ACE_OS::shm_unlink (const char *path)
+ACE_OS::shm_unlink (const ACE_TCHAR *path)
{
ACE_TRACE ("ACE_OS::shm_unlink");
# if defined (ACE_HAS_SHM_OPEN)
@@ -1181,10 +1185,9 @@ ACE_OS::shm_unlink (const char *path)
return ACE_OS::unlink (path);
# endif /* ! ACE_HAS_SHM_OPEN */
}
-#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
-ACE_INLINE LPTSTR
-ACE_OS::cuserid (LPTSTR user, size_t maxlen)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::cuserid (ACE_TCHAR *user, size_t maxlen)
{
ACE_TRACE ("ACE_OS::cuserid");
#if defined (VXWORKS)
@@ -1207,7 +1210,7 @@ ACE_OS::cuserid (LPTSTR user, size_t maxlen)
ACE_UNUSED_ARG (maxlen);
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_WIN32)
- BOOL result = ::GetUserName (user, (u_long *) &maxlen);
+ BOOL result = ACE_TEXT_GetUserName (user, (u_long *) &maxlen);
if (result == FALSE)
ACE_FAIL_RETURN (0);
else
@@ -1377,6 +1380,15 @@ ACE_OS::strcat (char *s, const char *t)
return ::strcat (s, t);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strcat (wchar_t *s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::strcat");
+ return ::wcscat (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE size_t
ACE_OS::strcspn (const char *s, const char *reject)
{
@@ -1415,6 +1427,15 @@ ACE_OS::strspn (const char *s, const char *t)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE size_t
+ACE_OS::strspn (const wchar_t*s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::strspn");
+ return ::wcsspn (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strchr (char *s, int c)
{
@@ -1432,6 +1453,15 @@ ACE_OS::strchr (char *s, int c)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strchr (wchar_t *s, wint_t c)
+{
+ ACE_TRACE ("ACE_OS::strchr");
+ return ::wcschr (s, c);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE const char *
ACE_OS::strchr (const char *s, int c)
{
@@ -1449,6 +1479,15 @@ ACE_OS::strchr (const char *s, int c)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE const wchar_t *
+ACE_OS::strchr (const wchar_t *s, wint_t c)
+{
+ ACE_TRACE ("ACE_OS::strchr");
+ return (const wchar_t *) ::wcschr (s, c);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE const char *
ACE_OS::strnchr (const char *s, int c, size_t len)
{
@@ -1459,6 +1498,18 @@ ACE_OS::strnchr (const char *s, int c, size_t len)
return 0;
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE const wchar_t *
+ACE_OS::strnchr (const wchar_t *s, wint_t c, size_t len)
+{
+ for (size_t i = 0; i < len; i++)
+ if (s[i] == c)
+ return s + i;
+
+ return 0;
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strnchr (char *s, int c, size_t len)
{
@@ -1470,6 +1521,19 @@ ACE_OS::strnchr (char *s, int c, size_t len)
#endif
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strnchr (wchar_t *s, wint_t c, size_t len)
+{
+#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
+ const wchar_t *const_wchar_s=s;
+ return (wchar_t *) ACE_OS::strnchr (const_wchar_s, c, len);
+#else
+ return (wchar_t *) ACE_OS::strnchr ((const wchar_t *) s, c, len);
+#endif
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE const char *
ACE_OS::strstr (const char *s, const char *t)
{
@@ -1477,6 +1541,15 @@ ACE_OS::strstr (const char *s, const char *t)
return (const char *) ::strstr (s, t);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE const wchar_t *
+ACE_OS::strstr (const wchar_t *s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::strstr");
+ return (const wchar_t *) ::wcsstr (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strstr (char *s, const char *t)
{
@@ -1484,13 +1557,29 @@ ACE_OS::strstr (char *s, const char *t)
return ::strstr (s, t);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strstr (wchar_t *s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::strstr");
+ return ::wcsstr (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE size_t
ACE_OS::strlen (const char *s)
{
- // ACE_TRACE ("ACE_OS::strlen");
return ::strlen (s);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE size_t
+ACE_OS::strlen (const wchar_t *s)
+{
+ return ::wcslen (s);
+}
+#endif
+
ACE_INLINE const char *
ACE_OS::strnstr (const char *s1, const char *s2, size_t len2)
{
@@ -1514,6 +1603,31 @@ ACE_OS::strnstr (const char *s1, const char *s2, size_t len2)
return 0;
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE const wchar_t *
+ACE_OS::strnstr (const wchar_t *s1, const wchar_t *s2, size_t len2)
+{
+ // Substring length
+ size_t len1 = ACE_OS::strlen (s1);
+
+ // Check if the substring is longer than the string being searched.
+ if (len2 > len1)
+ return 0;
+
+ // Go upto <len>
+ size_t len = len1 - len2;
+
+ for (size_t i = 0; i <= len; i++)
+ {
+ if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (wchar_t)) == 0)
+ // Found a match! Return the index.
+ return s1 + i;
+ }
+
+ return 0;
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strnstr (char *s, const char *t, size_t len)
{
@@ -1525,6 +1639,14 @@ ACE_OS::strnstr (char *s, const char *t, size_t len)
#endif
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strnstr (wchar_t *s, const wchar_t *t, size_t len)
+{
+ return (wchar_t *) ACE_OS::strnstr ((const wchar_t *) s, t, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strrchr (char *s, int c)
{
@@ -1544,6 +1666,27 @@ ACE_OS::strrchr (char *s, int c)
#endif /* ACE_LACKS_STRRCHR */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE const wchar_t *
+ACE_OS::strrchr (const wchar_t *s, wint_t c)
+{
+ ACE_TRACE ("ACE_OS::strrchr");
+# if !defined (ACE_LACKS_WCSRCHR)
+ return (const wchar_t *) ::wcsrchr (s, c);
+# else
+ const wchar_t *p = s + ::wcslen (s);
+
+ while (*p != c)
+ if (p == s)
+ return 0;
+ else
+ p--;
+
+ return p;
+# endif /* ACE_LACKS_WCSRCHR */
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE const char *
ACE_OS::strrchr (const char *s, int c)
{
@@ -1563,25 +1706,58 @@ ACE_OS::strrchr (const char *s, int c)
#endif /* ACE_LACKS_STRRCHR */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strrchr (wchar_t *s, wint_t c)
+{
+ ACE_TRACE ("ACE_OS::strrchr");
+# if !defined (ACE_LACKS_WCSRCHR)
+ return (wchar_t *) ::wcsrchr (s, c);
+# else
+ wchar_t *p = s + ::wcslen (s);
+
+ while (*p != c)
+ if (p == s)
+ return 0;
+ else
+ p--;
+
+ return p;
+# endif /* ACE_LACKS_WCSRCHR */
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::strcmp (const char *s, const char *t)
{
- ACE_TRACE ("ACE_OS::strcmp");
return ::strcmp (s, t);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::strcmp (const wchar_t *s, const wchar_t *t)
+{
+ return ::wcscmp (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strcpy (char *s, const char *t)
{
- // ACE_TRACE ("ACE_OS::strcpy");
-
return ::strcpy (s, t);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strcpy (wchar_t *s, const wchar_t *t)
+{
+ return ::wcscpy (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strecpy (char *s, const char *t)
{
- // ACE_TRACE ("ACE_OS::strecpy");
register char *dscan = s;
register const char *sscan = t;
@@ -1591,6 +1767,20 @@ ACE_OS::strecpy (char *s, const char *t)
return dscan;
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strecpy (wchar_t *s, const wchar_t *t)
+{
+ register wchar_t *dscan = s;
+ register const wchar_t *sscan = t;
+
+ while ((*dscan++ = *sscan++) != L'\0')
+ continue;
+
+ return dscan;
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::to_lower (int c)
{
@@ -1598,6 +1788,15 @@ ACE_OS::to_lower (int c)
return tolower (c);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wint_t
+ACE_OS::to_lower (wint_t c)
+{
+ ACE_TRACE ("ACE_OS::to_lower");
+ return ::towlower (c);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strpbrk (char *s1, const char *s2)
{
@@ -1610,6 +1809,15 @@ ACE_OS::strpbrk (char *s1, const char *s2)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strpbrk (wchar_t *s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::wcspbrk");
+ return ::wcspbrk (s, t);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE const char *
ACE_OS::strpbrk (const char *s1, const char *s2)
{
@@ -1625,9 +1833,7 @@ ACE_OS::strpbrk (const char *s1, const char *s2)
ACE_INLINE char *
ACE_OS::strdup (const char *s)
{
- // ACE_TRACE ("ACE_OS::strdup");
-
- // @@ Should we provide this function on WinCE?
+ // @@ WINCE Should we provide this function on WinCE?
#if defined (ACE_HAS_STRDUP_EMULATION)
char *t = (char *) ::malloc (::strlen (s) + 1);
if (t == 0)
@@ -1639,6 +1845,19 @@ ACE_OS::strdup (const char *s)
#endif /* ACE_HAS_STRDUP_EMULATION */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strdup (const wchar_t *s)
+{
+# if defined (__BORLANDC__)
+ wchar_t *buffer = (wchar_t *) malloc ((ACE_OS::strlen (s) + 1) * sizeof (wchar_t));
+ return ::wcscpy (buffer, s);
+# else
+ return ::wcsdup (s);
+# endif /* __BORLANDC__ */
+}
+#endif /* ACE_HAS_WCHAR */
+
#if !defined (ACE_HAS_WINCE)
ACE_INLINE int
ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
@@ -1647,6 +1866,14 @@ ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
}
#endif /* ACE_HAS_WINCE */
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr)
+{
+ return ::vswprintf (buffer, format, argptr);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::strcasecmp (const char *s, const char *t)
{
@@ -1683,6 +1910,41 @@ ACE_OS::strcasecmp (const char *s, const char *t)
#endif /* ACE_WIN32 */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::strcasecmp (const wchar_t *s, const wchar_t *t)
+{
+ ACE_TRACE ("ACE_OS::strcasecmp");
+
+# if !defined (ACE_WIN32)
+ const wchar_t *scan1 = s;
+ const wchar_t *scan2 = t;
+
+ while (*scan1 != 0
+ && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
+ {
+ ++scan1;
+ ++scan2;
+ }
+
+ // The following case analysis is necessary so that characters which
+ // look negative collate low against normal characters but high
+ // against the end-of-string NUL.
+
+ if (*scan1 == '\0' && *scan2 == '\0')
+ return 0;
+ else if (*scan1 == '\0')
+ return -1;
+ else if (*scan2 == '\0')
+ return 1;
+ else
+ return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
+# else /* ACE_WIN32 */
+ return ::_wcsicmp (s, t);
+# endif /* ACE_WIN32 */
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::strncasecmp (const char *s,
const char *t,
@@ -1726,6 +1988,48 @@ ACE_OS::strncasecmp (const char *s,
#endif /* ACE_WIN32 */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::strncasecmp (const wchar_t *s,
+ const wchar_t *t,
+ size_t len)
+{
+ ACE_TRACE ("ACE_OS::strcasecmp");
+
+# if !defined (ACE_WIN32)
+ const wchar_t *scan1 = s;
+ const wchar_t *scan2 = t;
+ ssize_t count = ssize_t (n);
+
+ while (--count >= 0
+ && *scan1 != 0
+ && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
+ {
+ ++scan1;
+ ++scan2;
+ }
+
+ if (count < 0)
+ return 0;
+
+ // The following case analysis is necessary so that characters which
+ // look negative collate low against normal characters but high
+ // against the end-of-string NUL.
+
+ if (*scan1 == '\0' && *scan2 == '\0')
+ return 0;
+ else if (*scan1 == '\0')
+ return -1;
+ else if (*scan2 == '\0')
+ return 1;
+ else
+ return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
+# else /* ACE_WIN32 */
+ return ::_wcsnicmp (s, t, len);
+# endif /* ACE_WIN32 */
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::strncmp (const char *s, const char *t, size_t len)
{
@@ -1733,13 +2037,29 @@ ACE_OS::strncmp (const char *s, const char *t, size_t len)
return ::strncmp (s, t, len);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::strncmp (const wchar_t *s, const wchar_t *t, size_t len)
+{
+ ACE_TRACE ("ACE_OS::strncmp");
+ return ::wcsncmp (s, t, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strncpy (char *s, const char *t, size_t len)
{
- // ACE_TRACE ("ACE_OS::strncpy");
return ::strncpy (s, t, len);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strncpy (wchar_t *s, const wchar_t *t, size_t len)
+{
+ return ::wcsncpy (s, t, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strncat (char *s, const char *t, size_t len)
{
@@ -1747,6 +2067,15 @@ ACE_OS::strncat (char *s, const char *t, size_t len)
return ::strncat (s, t, len);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strncat (wchar_t *s, const wchar_t *t, size_t len)
+{
+ ACE_TRACE ("ACE_OS::strncat");
+ return ::wcsncat (s, t, len);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE char *
ACE_OS::strtok (char *s, const char *tokens)
{
@@ -1754,6 +2083,16 @@ ACE_OS::strtok (char *s, const char *tokens)
return ::strtok (s, tokens);
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE wchar_t *
+ACE_OS::strtok (wchar_t *s, const wchar_t *tokens)
+{
+ ACE_TRACE ("ACE_OS::strtok");
+ return ::wcstok (s, tokens);
+}
+#endif /* ACE_HAS_WCHAR */
+
+
ACE_INLINE char *
ACE_OS::strtok_r (char *s, const char *tokens, char **lasts)
{
@@ -1792,10 +2131,19 @@ ACE_OS::strtol (const char *s, char **ptr, int base)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE long
+ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base)
+{
+ ACE_TRACE ("ACE_OS::strtol");
+ return ::wcstol (s, ptr, base);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE unsigned long
ACE_OS::strtoul (const char *s, char **ptr, int base)
{
- // @@ We must implement this function for WinCE also.
+ // @@ WINCE: We must implement this function for WinCE also.
// Notice WinCE support wcstoul.
#if !defined (ACE_HAS_WINCE)
ACE_TRACE ("ACE_OS::strtoul");
@@ -1814,6 +2162,16 @@ ACE_OS::strtoul (const char *s, char **ptr, int base)
#endif /* ACE_HAS_WINCE */
}
+
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE unsigned long
+ACE_OS::strtoul (const wchar_t *s, wchar_t **ptr, int base)
+{
+ ACE_TRACE ("ACE_OS::strtoul");
+ return ::wcstoul (s, ptr, base);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE double
ACE_OS::strtod (const char *s, char **endptr)
{
@@ -1828,6 +2186,15 @@ ACE_OS::strtod (const char *s, char **endptr)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE double
+ACE_OS::strtod (const wchar_t *s, wchar_t **endptr)
+{
+ ACE_TRACE ("ACE_OS::strtod");
+ return ::wcstod (s, endptr);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE int
ACE_OS::ace_isspace (const char s)
{
@@ -1839,6 +2206,14 @@ ACE_OS::ace_isspace (const char s)
#endif /* ACE_HAS_WINCE */
}
+#if defined (ACE_HAS_WCHAR)
+ACE_INLINE int
+ACE_OS::ace_isspace (wchar_t c)
+{
+ return iswspace (c);
+}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE long
ACE_OS::sysconf (int name)
{
@@ -1854,7 +2229,7 @@ ACE_OS::sysconf (int name)
ACE_INLINE int
ACE_OS::mutex_init (ACE_mutex_t *m,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
ACE_mutexattr_t *attributes,
LPSECURITY_ATTRIBUTES sa)
{
@@ -1942,9 +2317,9 @@ ACE_OS::mutex_init (ACE_mutex_t *m,
switch (type)
{
case USYNC_PROCESS:
- m->proc_mutex_ = ::CreateMutex (ACE_OS::default_win32_security_attributes (sa),
- FALSE,
- name);
+ m->proc_mutex_ = ACE_TEXT_CreateMutex (ACE_OS::default_win32_security_attributes (sa),
+ FALSE,
+ name);
if (m->proc_mutex_ == 0)
ACE_FAIL_RETURN (-1);
else
@@ -2330,7 +2705,7 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m)
ACE_INLINE int
ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
ACE_mutexattr_t *arg)
{
// ACE_TRACE ("ACE_OS::thread_mutex_init");
@@ -2544,7 +2919,7 @@ ACE_OS::condattr_destroy (ACE_condattr_t &attributes)
ACE_INLINE int
ACE_OS::cond_init (ACE_cond_t *cv,
ACE_condattr_t &attributes,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
{
// ACE_TRACE ("ACE_OS::cond_init");
@@ -2592,7 +2967,7 @@ ACE_OS::cond_init (ACE_cond_t *cv,
}
ACE_INLINE int
-ACE_OS::cond_init (ACE_cond_t *cv, short type, LPCTSTR name, void *arg)
+ACE_OS::cond_init (ACE_cond_t *cv, short type, const ACE_TCHAR *name, void *arg)
{
ACE_condattr_t attributes;
if (ACE_OS::condattr_init (attributes, type) == 0
@@ -2830,7 +3205,7 @@ ACE_OS::thr_self (void)
ACE_INLINE int
ACE_OS::recursive_mutex_init (ACE_recursive_thread_mutex_t *m,
- LPCTSTR name,
+ const ACE_TCHAR *name,
ACE_mutexattr_t *arg,
LPSECURITY_ATTRIBUTES sa)
{
@@ -3311,7 +3686,7 @@ ACE_INLINE int
ACE_OS::sema_init (ACE_sema_t *s,
u_int count,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg,
int max,
LPSECURITY_ATTRIBUTES sa)
@@ -3437,7 +3812,11 @@ ACE_OS::sema_init (ACE_sema_t *s,
ACE_UNUSED_ARG (arg);
// Create the semaphore with its value initialized to <count> and
// its maximum value initialized to <max>.
- *s = ::CreateSemaphore (ACE_OS::default_win32_security_attributes (sa), count, max, name);
+ *s =
+ ACE_TEXT_CreateSemaphore (ACE_OS::default_win32_security_attributes (sa),
+ count,
+ max,
+ name);
if (*s == 0)
ACE_FAIL_RETURN (-1);
@@ -4324,7 +4703,7 @@ ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw)
ACE_INLINE int
ACE_OS::rwlock_init (ACE_rwlock_t *rw,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
{
// ACE_TRACE ("ACE_OS::rwlock_init");
@@ -4381,17 +4760,17 @@ ACE_OS::event_init (ACE_event_t *event,
int manual_reset,
int initial_state,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg,
LPSECURITY_ATTRIBUTES sa)
{
#if defined (ACE_WIN32)
ACE_UNUSED_ARG (type);
ACE_UNUSED_ARG (arg);
- *event = ::CreateEvent (ACE_OS::default_win32_security_attributes(sa),
- manual_reset,
- initial_state,
- name);
+ *event = ACE_TEXT_CreateEvent (ACE_OS::default_win32_security_attributes(sa),
+ manual_reset,
+ initial_state,
+ name);
if (*event == NULL)
ACE_FAIL_RETURN (-1);
else
@@ -5598,21 +5977,25 @@ ACE_OS::connect (ACE_HANDLE handle,
#if !defined (VXWORKS)
ACE_INLINE struct hostent *
-ACE_OS::gethostbyname (const char *name)
+ACE_OS::gethostbyname (const ACE_TCHAR *name)
{
ACE_TRACE ("ACE_OS::gethostbyname");
# if defined (ACE_PSOS)
ACE_UNUSED_ARG (name);
ACE_NOTSUP_RETURN (0);
# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyname ((char *) name), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname (ACE_const_cast (char *, name),
+ struct hostent *,
+ 0);
# else
- ACE_SOCKCALL_RETURN (::gethostbyname (name), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname (ACE_TEXT_ALWAYS_CHAR (name)),
+ struct hostent *,
+ 0);
# endif /* ACE_HAS_NONCONST_GETBY */
}
ACE_INLINE struct hostent *
-ACE_OS::gethostbyname2 (const char *name, int family)
+ACE_OS::gethostbyname2 (const ACE_TCHAR *name, int family)
{
ACE_TRACE ("ACE_OS::gethostbyname2");
# if defined (ACE_PSOS)
@@ -5621,9 +6004,14 @@ ACE_OS::gethostbyname2 (const char *name, int family)
ACE_NOTSUP_RETURN (0);
# elif defined (ACE_HAS_IP6)
# if defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyname2 (ACE_const_cast (char *, name), family), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname2 (ACE_const_cast (char *, name),
+ family),
+ struct hostent *,
+ 0);
# else
- ACE_SOCKCALL_RETURN (::gethostbyname2 (name, family), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname2 (ACE_TEXT_ALWAYS_CHAR (name), family),
+ struct hostent *,
+ 0);
# endif /* ACE_HAS_NONCONST_GETBY */
# else
// IPv4-only implementation
@@ -5635,7 +6023,7 @@ ACE_OS::gethostbyname2 (const char *name, int family)
}
ACE_INLINE struct hostent *
-ACE_OS::gethostbyaddr (const char *addr, int length, int type)
+ACE_OS::gethostbyaddr (const ACE_TCHAR *addr, int length, int type)
{
ACE_TRACE ("ACE_OS::gethostbyaddr");
# if defined (ACE_PSOS)
@@ -5644,11 +6032,17 @@ ACE_OS::gethostbyaddr (const char *addr, int length, int type)
ACE_UNUSED_ARG (type);
ACE_NOTSUP_RETURN (0);
# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyaddr ((char *) addr, (ACE_SOCKET_LEN) length, type),
- struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_const_cast (char *, addr),
+ (ACE_SOCKET_LEN) length,
+ type),
+ struct hostent *,
+ 0);
# else
- ACE_SOCKCALL_RETURN (::gethostbyaddr (addr, (ACE_SOCKET_LEN) length, type),
- struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_TEXT_ALWAYS_CHAR (addr),
+ (ACE_SOCKET_LEN) length,
+ type),
+ struct hostent *,
+ 0);
# endif /* ACE_HAS_NONCONST_GETBY */
}
#endif /* ! VXWORKS */
@@ -5930,22 +6324,24 @@ ACE_OS::getpeername (ACE_HANDLE handle, struct sockaddr *addr,
}
ACE_INLINE struct protoent *
-ACE_OS::getprotobyname (const char *name)
+ACE_OS::getprotobyname (const ACE_TCHAR *name)
{
#if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS)
ACE_UNUSED_ARG (name);
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::getprotobyname ((char *) name),
- struct protoent *, 0);
+ ACE_SOCKCALL_RETURN (::getprotobyname (ACE_const_cast (char *, name),
+ struct protoent *,
+ 0);
#else
- ACE_SOCKCALL_RETURN (::getprotobyname (name),
- struct protoent *, 0);
+ ACE_SOCKCALL_RETURN (::getprotobyname (ACE_TEXT_ALWAYS_CHAR (name)),
+ struct protoent *,
+ 0);
#endif /* VXWORKS */
}
ACE_INLINE struct protoent *
-ACE_OS::getprotobyname_r (const char *name,
+ACE_OS::getprotobyname_r (const ACE_TCHAR *name,
struct protoent *result,
ACE_PROTOENT_DATA buffer)
{
@@ -5967,21 +6363,25 @@ ACE_OS::getprotobyname_r (const char *name,
struct protoent *, 0,
buffer, sizeof (ACE_PROTOENT_DATA));
# else
- ACE_SOCKCALL_RETURN (::getprotobyname_r (name, result, buffer, sizeof (ACE_PROTOENT_DATA)),
+ ACE_SOCKCALL_RETURN (::getprotobyname_r (name,
+ result,
+ buffer,
+ sizeof (ACE_PROTOENT_DATA)),
struct protoent *, 0);
# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
#elif defined (ACE_HAS_NONCONST_GETBY)
ACE_UNUSED_ARG (result);
ACE_UNUSED_ARG (buffer);
- ACE_SOCKCALL_RETURN (::getprotobyname ((char *) name),
+ ACE_SOCKCALL_RETURN (::getprotobyname (ACE_const_cast (char *, name)),
struct protoent *, 0);
#else
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (result);
- ACE_SOCKCALL_RETURN (::getprotobyname (name),
- struct protoent *, 0);
+ ACE_SOCKCALL_RETURN (::getprotobyname (ACE_TEXT_ALWAYS_CHAR (name)),
+ struct protoent *,
+ 0);
#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) !defined (UNIXWARE) */
}
@@ -6034,7 +6434,7 @@ ACE_OS::getprotobynumber_r (int proto,
}
ACE_INLINE struct servent *
-ACE_OS::getservbyname (const char *svc, const char *proto)
+ACE_OS::getservbyname (const ACE_TCHAR *svc, const ACE_TCHAR *proto)
{
ACE_TRACE ("ACE_OS::getservbyname");
#if defined (ACE_LACKS_GETSERVBYNAME)
@@ -6042,11 +6442,15 @@ ACE_OS::getservbyname (const char *svc, const char *proto)
ACE_UNUSED_ARG (proto);
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::getservbyname ((char *) svc, (char *) proto),
- struct servent *, 0);
+ ACE_SOCKCALL_RETURN (::getservbyname (ACE_const_cast (char *, svc),
+ ACE_const_cast (char *, proto)),
+ struct servent *,
+ 0);
#else
- ACE_SOCKCALL_RETURN (::getservbyname (svc, proto),
- struct servent *, 0);
+ ACE_SOCKCALL_RETURN (::getservbyname (ACE_TEXT_ALWAYS_CHAR (svc),
+ ACE_TEXT_ALWAYS_CHAR (proto)),
+ struct servent *,
+ 0);
#endif /* ACE_HAS_NONCONST_GETBY */
}
@@ -6057,11 +6461,14 @@ ACE_OS::getsockname (ACE_HANDLE handle,
{
ACE_TRACE ("ACE_OS::getsockname");
#if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle, (struct sockaddr_in *) addr,
+ ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle,
+ (struct sockaddr_in *) addr,
(ACE_SOCKET_LEN *) addrlen),
int, -1);
#else
- ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle, addr, (ACE_SOCKET_LEN *) addrlen),
+ ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle,
+ addr,
+ (ACE_SOCKET_LEN *) addrlen),
int, -1);
#endif /* defined (ACE_PSOS) */
}
@@ -6074,8 +6481,13 @@ ACE_OS::getsockopt (ACE_HANDLE handle,
int *optlen)
{
ACE_TRACE ("ACE_OS::getsockopt");
- ACE_SOCKCALL_RETURN (::getsockopt ((ACE_SOCKET) handle, level, optname, optval, (ACE_SOCKET_LEN *) optlen),
- int, -1);
+ ACE_SOCKCALL_RETURN (::getsockopt ((ACE_SOCKET) handle,
+ level,
+ optname,
+ optval,
+ (ACE_SOCKET_LEN *) optlen),
+ int,
+ -1);
}
ACE_INLINE int
@@ -6086,13 +6498,20 @@ ACE_OS::listen (ACE_HANDLE handle, int backlog)
}
ACE_INLINE int
-ACE_OS::setsockopt (ACE_HANDLE handle, int level, int optname,
- const char *optval, int optlen)
+ACE_OS::setsockopt (ACE_HANDLE handle,
+ int level,
+ int optname,
+ const char *optval,
+ int optlen)
{
ACE_TRACE ("ACE_OS::setsockopt");
- ACE_SOCKCALL_RETURN (::setsockopt ((ACE_SOCKET) handle, level, optname,
- (ACE_SOCKOPT_TYPE1) optval, optlen),
- int, -1);
+ ACE_SOCKCALL_RETURN (::setsockopt ((ACE_SOCKET) handle,
+ level,
+ optname,
+ (ACE_SOCKOPT_TYPE1) optval,
+ optlen),
+ int,
+ -1);
}
ACE_INLINE int
@@ -6146,10 +6565,14 @@ ACE_OS::socket (int domain,
}
ACE_INLINE int
-ACE_OS::atoi (const char *s)
+ACE_OS::atoi (const ACE_TCHAR *s)
{
ACE_TRACE ("ACE_OS::atoi");
+#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wtoi (s), int, -1);
+#else /* ACE_WIN32 */
ACE_OSCALL_RETURN (::atoi (s), int, -1);
+#endif /* ACE_WIN32 */
}
ACE_INLINE int
@@ -6242,27 +6665,32 @@ ACE_OS::fclose (FILE *fp)
#endif /* !ACE_HAS_WINCE */
}
-#if !defined (ACE_HAS_WINCE)
-// Here are functions that CE doesn't support at all.
-// Notice that some of them might have UNICODE version.
-ACE_INLINE char *
-ACE_OS::fgets (char *buf, int size, FILE *fp)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::fgets (ACE_TCHAR *buf, int size, FILE *fp)
{
ACE_TRACE ("ACE_OS::fgets");
+#if defined (ACE_HAS_WINCE)
+ ACE_UNUSED_ARG (buf);
+ ACE_UNUSED_ARG (size);
+ ACE_UNUSED_ARG (fp);
+ ACE_NOTSUP_RETURN (0);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::fgetws (buf, size, fp), wchar_t *, 0);
+#else /* ACE_WIN32 */
ACE_OSCALL_RETURN (::fgets (buf, size, fp), char *, 0);
+#endif /* ACE_WIN32 */
}
#if !defined (ACE_WIN32)
-// Win32 implementation of fopen(const char*, const char*)
+// Win32 implementation of fopen(const ACE_TCHAR*, const ACE_TCHAR*)
// is in OS.cpp.
ACE_INLINE FILE *
-ACE_OS::fopen (const char *filename, const char *mode)
+ACE_OS::fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode)
{
ACE_TRACE ("ACE_OS::fopen");
ACE_OSCALL_RETURN (::fopen (filename, mode), FILE *, 0);
}
#endif /* ACE_WIN32 */
-#endif /* ACE_HAS_WINCE */
ACE_INLINE int
ACE_OS::fflush (FILE *fp)
@@ -6333,13 +6761,12 @@ ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp)
#endif /* ACE_LACKS_POSIX_PROTOTYPES */
}
-#if !defined (ACE_HAS_WINCE)
ACE_INLINE int
-ACE_OS::truncate (const char *filename,
+ACE_OS::truncate (const ACE_TCHAR *filename,
off_t offset)
{
ACE_TRACE ("ACE_OS::truncate");
-#if defined (ACE_WIN32)
+#if defined (ACE_WIN32)
ACE_HANDLE handle = ACE_OS::open (filename,
O_WRONLY,
ACE_DEFAULT_FILE_PERMS);
@@ -6365,7 +6792,6 @@ ACE_OS::truncate (const char *filename,
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_WIN32 */
}
-#endif /* ACE_HAS_WINCE */
// Accessors to PWD file.
@@ -6487,8 +6913,11 @@ ACE_OS::getpwnam_r (const char *name, struct passwd *pwent,
#if !defined (VXWORKS)
ACE_INLINE struct hostent *
-ACE_OS::gethostbyaddr_r (const char *addr, int length, int type,
- hostent *result, ACE_HOSTENT_DATA buffer,
+ACE_OS::gethostbyaddr_r (const ACE_TCHAR *addr,
+ int length,
+ int type,
+ hostent *result,
+ ACE_HOSTENT_DATA buffer,
int *h_errnop)
{
ACE_TRACE ("ACE_OS::gethostbyaddr_r");
@@ -6530,20 +6959,27 @@ ACE_OS::gethostbyaddr_r (const char *addr, int length, int type,
ACE_UNUSED_ARG (result);
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (h_errnop);
- ACE_SOCKCALL_RETURN (::gethostbyaddr ((char *) addr, (ACE_SOCKET_LEN) length, type),
- struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_const_cast (char *, addr),
+ (ACE_SOCKET_LEN) length,
+ type),
+ struct hostent *,
+ 0);
# else
ACE_UNUSED_ARG (h_errnop);
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (result);
- ACE_SOCKCALL_RETURN (::gethostbyaddr (addr, (ACE_SOCKET_LEN) length, type),
- struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_TEXT_ALWAYS_CHAR (addr),
+ (ACE_SOCKET_LEN) length,
+ type),
+ struct hostent *,
+ 0);
# endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
}
ACE_INLINE struct hostent *
-ACE_OS::gethostbyname_r (const char *name, hostent *result,
+ACE_OS::gethostbyname_r (const ACE_TCHAR *name,
+ hostent *result,
ACE_HOSTENT_DATA buffer,
int *h_errnop)
{
@@ -6583,21 +7019,27 @@ ACE_OS::gethostbyname_r (const char *name, hostent *result,
buffer, sizeof (ACE_HOSTENT_DATA));
# else
ACE_SOCKCALL_RETURN (::gethostbyname_r (name, result, buffer,
- sizeof (ACE_HOSTENT_DATA), h_errnop),
- struct hostent *, 0);
+ sizeof (ACE_HOSTENT_DATA),
+ h_errnop),
+ struct hostent *,
+ 0);
# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
# elif defined (ACE_HAS_NONCONST_GETBY)
ACE_UNUSED_ARG (result);
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (h_errnop);
- ACE_SOCKCALL_RETURN (::gethostbyname ((char *) name), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname (ACE_const_cast (char *, name)),
+ struct hostent *,
+ 0);
# else
ACE_UNUSED_ARG (result);
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (h_errnop);
- ACE_SOCKCALL_RETURN (::gethostbyname (name), struct hostent *, 0);
+ ACE_SOCKCALL_RETURN (::gethostbyname (ACE_TEXT_ALWAYS_CHAR (name)),
+ struct hostent *,
+ 0);
# endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
}
#endif /* ! VXWORKS */
@@ -6616,8 +7058,10 @@ ACE_OS::gets (char *str)
#endif /* 0 */
ACE_INLINE struct servent *
-ACE_OS::getservbyname_r (const char *svc, const char *proto,
- struct servent *result, ACE_SERVENT_DATA buf)
+ACE_OS::getservbyname_r (const ACE_TCHAR *svc,
+ const ACE_TCHAR *proto,
+ struct servent *result,
+ ACE_SERVENT_DATA buf)
{
ACE_TRACE ("ACE_OS::getservbyname_r");
#if defined (ACE_LACKS_GETSERVBYNAME)
@@ -6649,19 +7093,23 @@ ACE_OS::getservbyname_r (const char *svc, const char *proto,
#elif defined (ACE_HAS_NONCONST_GETBY)
ACE_UNUSED_ARG (buf);
ACE_UNUSED_ARG (result);
- ACE_SOCKCALL_RETURN (::getservbyname ((char *) svc, (char *) proto),
- struct servent *, 0);
+ ACE_SOCKCALL_RETURN (::getservbyname (ACE_const_char (char *, svc),
+ ACE_const_char (char *, proto)),
+ struct servent *,
+ 0);
#else
ACE_UNUSED_ARG (buf);
ACE_UNUSED_ARG (result);
- ACE_SOCKCALL_RETURN (::getservbyname (svc, proto),
- struct servent *, 0);
+ ACE_SOCKCALL_RETURN (::getservbyname (ACE_TEXT_ALWAYS_CHAR (svc),
+ ACE_TEXT_ALWAYS_CHAR (proto)),
+ struct servent *,
+ 0);
#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
}
ACE_INLINE long
-ACE_OS::inet_addr (const char *name)
+ACE_OS::inet_addr (const ACE_TCHAR *name)
{
ACE_TRACE ("ACE_OS::inet_addr");
#if defined (VXWORKS) || defined (ACE_PSOS)
@@ -6700,11 +7148,11 @@ ACE_OS::inet_addr (const char *name)
#elif defined (ACE_HAS_NONCONST_GETBY)
return ::inet_addr ((char *) name);
#else
- return ::inet_addr (name);
+ return ::inet_addr (ACE_TEXT_ALWAYS_CHAR (name));
#endif /* ACE_HAS_NONCONST_GETBY */
}
-ACE_INLINE char *
+ACE_INLINE ACE_TCHAR *
ACE_OS::inet_ntoa (const struct in_addr addr)
{
ACE_TRACE ("ACE_OS::inet_ntoa");
@@ -6712,12 +7160,14 @@ ACE_OS::inet_ntoa (const struct in_addr addr)
ACE_UNUSED_ARG (addr);
ACE_NOTSUP_RETURN (0);
#else
- ACE_OSCALL_RETURN (::inet_ntoa (addr), char *, 0);
+ ACE_OSCALL_RETURN (ACE_TEXT_CHAR_TO_TCHAR (::inet_ntoa (addr)),
+ ACE_TCHAR *,
+ 0);
#endif /* defined (ACE_PSOS) */
}
ACE_INLINE int
-ACE_OS::inet_pton (int family, const char *strptr, void *addrptr)
+ACE_OS::inet_pton (int family, const ACE_TCHAR *strptr, void *addrptr)
{
ACE_TRACE ("ACE_OS::inet_pton");
@@ -6741,8 +7191,8 @@ ACE_OS::inet_pton (int family, const char *strptr, void *addrptr)
#endif /* ACE_HAS_IP6 */
}
-ACE_INLINE const char *
-ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
+ACE_INLINE const ACE_TCHAR *
+ACE_OS::inet_ntop (int family, const void *addrptr, ACE_TCHAR *strptr, size_t len)
{
ACE_TRACE ("ACE_OS::inet_ntop");
@@ -6754,13 +7204,13 @@ ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
if (family == AF_INET)
{
- ASYS_TCHAR temp[INET_ADDRSTRLEN];
+ ACE_TCHAR temp[INET_ADDRSTRLEN];
// Stevens uses snprintf() in his implementation but snprintf()
// doesn't appear to be very portable. For now, hope that using
// sprintf() will not cause any string/memory overrun problems.
ACE_OS::sprintf (temp,
- ASYS_TEXT ("%d.%d.%d.%d"),
+ ACE_TEXT ("%d.%d.%d.%d"),
p[0], p[1], p[2], p[3]);
if (ACE_OS::strlen (temp) >= len)
@@ -6769,7 +7219,7 @@ ACE_OS::inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
return 0; // Failure
}
- ACE_OS::strcpy (strptr, ASYS_ONLY_MULTIBYTE_STRING (temp));
+ ACE_OS::strcpy (strptr, temp);
return strptr;
}
@@ -6840,29 +7290,43 @@ ACE_OS::last_error (int error)
#endif /* ACE_WIN32 */
}
-#if !defined (ACE_HAS_WINCE)
ACE_INLINE void
-ACE_OS::perror (const char *s)
+ACE_OS::perror (const ACE_TCHAR *s)
{
ACE_TRACE ("ACE_OS::perror");
+#if defined (ACE_HAS_WINCE)
+ // @@ WINCE: How should this be handled
+ ACE_UNUSED_ARG (s);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ::_wperror (s);
+#else
::perror (s);
+#endif /* ACE_HAS_WINCE */
}
-#endif /* ! ACE_HAS_WINCE */
-// @@ Do we need to implement puts on WinCE???
+
+// @@ WINCE: Do we need to implement puts on WinCE???
#if !defined (ACE_HAS_WINCE)
ACE_INLINE int
-ACE_OS::puts (const char *s)
+ACE_OS::puts (const ACE_TCHAR *s)
{
ACE_TRACE ("ACE_OS::puts");
+#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_putws (s), int, -1);
+#else /* ACE_WIN32 */
ACE_OSCALL_RETURN (::puts (s), int, -1);
+#endif /* ACE_WIN32 */
}
ACE_INLINE int
-ACE_OS::fputs (const char *s, FILE *stream)
+ACE_OS::fputs (const ACE_TCHAR *s, FILE *stream)
{
- ACE_TRACE ("ACE_OS::puts");
+ ACE_TRACE ("ACE_OS::fputs");
+#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::fputws (s, stream), int, -1);
+#else /* ACE_WIN32 */
ACE_OSCALL_RETURN (::fputs (s, stream), int, -1);
+#endif /* ACE_WIN32 */
}
#endif /* ! ACE_HAS_WINCE */
@@ -6888,7 +7352,7 @@ ACE_OS::signal (int signum, ACE_SignalHandler func)
return (ACE_SignalHandler) ::signal (signum, (void (*)(int)) func);
# endif /* !ACE_HAS_TANDEM_SIGNALS */
#else
- // @@ Don't know how to implement signal on WinCE (yet.)
+ // @@ WINCE: Don't know how to implement signal on WinCE (yet.)
ACE_UNUSED_ARG (signum);
ACE_UNUSED_ARG (func);
ACE_NOTSUP_RETURN (0); // Should return SIG_ERR but it is not defined on WinCE.
@@ -6896,15 +7360,16 @@ ACE_OS::signal (int signum, ACE_SignalHandler func)
}
ACE_INLINE int
-ACE_OS::system (const char *s)
+ACE_OS::system (const ACE_TCHAR *s)
{
// ACE_TRACE ("ACE_OS::system");
-#if !defined (CHORUS) && !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS)
- // ACE_TRACE ("ACE_OS::system");
- ACE_OSCALL_RETURN (::system (s), int, -1);
-#else
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
+#if defined (CHORUS) || defined (ACE_HAS_WINCE) || defined(ACE_PSOS)
+ ACE_UNUSED_ARG (s);
+ ACE_NOTSUP_RETURN (-1);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wsystem (s), int, -1);
+#else
+ ACE_OSCALL_RETURN (::system (s), int, -1);
#endif /* !CHORUS */
}
@@ -8427,7 +8892,7 @@ ACE_OS::compile (const char *instring, char *expbuf, char *endbuf)
}
ACE_INLINE long
-ACE_OS::filesize (LPCTSTR filename)
+ACE_OS::filesize (const ACE_TCHAR *filename)
{
ACE_TRACE ("ACE_OS::filesize");
@@ -8456,15 +8921,23 @@ ACE_OS::closesocket (ACE_HANDLE handle)
}
ACE_INLINE int
-ACE_OS::access (const char *path, int amode)
+ACE_OS::access (const ACE_TCHAR *path, int amode)
{
ACE_TRACE ("ACE_OS::access");
#if defined (ACE_LACKS_ACCESS)
ACE_UNUSED_ARG (path);
ACE_UNUSED_ARG (amode);
ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_WIN32)
- ACE_OSCALL_RETURN (::_access (path, amode), int, -1);
+#elif defined (ACE_HAS_WINCE)
+ // @@ WINCE: There should be a Win32 API that can do this.
+ // Hard coded read access here.
+ FILE* handle = ACE_OS::fopen (path, ACE_TEXT ("r"));
+ ACE_UNUSED_ARG (amode);
+
+ ACE_OS::fclose (handle);
+ return (handle == ACE_INVALID_HANDLE ? -1 : 0);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_waccess (path, amode), int, -1);
#else
ACE_OSCALL_RETURN (::access (path, amode), int, -1);
#endif /* ACE_LACKS_ACCESS */
@@ -8472,7 +8945,7 @@ ACE_OS::access (const char *path, int amode)
ACE_INLINE ACE_HANDLE
-ACE_OS::creat (LPCTSTR filename, mode_t mode)
+ACE_OS::creat (const ACE_TCHAR *filename, mode_t mode)
{
ACE_TRACE ("ACE_OS::creat");
#if defined (ACE_WIN32)
@@ -8508,11 +8981,16 @@ ACE_OS::uname (struct utsname *name)
#endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */
ACE_INLINE int
-ACE_OS::hostname (char name[], size_t maxnamelen)
+ACE_OS::hostname (ACE_TCHAR name[], size_t maxnamelen)
{
ACE_TRACE ("ACE_OS::hostname");
-#if !defined (ACE_HAS_WINCE)
-# if defined (ACE_HAS_PHARLAP)
+#if defined (ACE_HAS_WINCE)
+ // @@ WINCE: Don't know how to implement this (yet.) Can probably get around
+ // this by peeking into the Register set.
+ ACE_UNUSED_ARG (name);
+ ACE_UNUSED_ARG (maxnamelen);
+ ACE_NOTSUP_RETURN (-1);
+#elif defined (ACE_HAS_PHARLAP)
// PharLap only can do net stuff with the RT version.
# if defined (ACE_HAS_PHARLAP_RT)
// @@This is not at all reliable... requires ethernet and BOOTP to be used.
@@ -8524,12 +9002,13 @@ ACE_OS::hostname (char name[], size_t maxnamelen)
ACE_UNUSED_ARG (maxnamelen);
ACE_NOTSUP_RETURN (-1);
# endif /* ACE_HAS_PHARLAP_RT */
-# elif defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetComputerNameA (name, LPDWORD (&maxnamelen)),
+#elif defined (ACE_WIN32)
+ ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (ACE_TEXT_GetComputerName (name,
+ LPDWORD (&maxnamelen)),
ace_result_), int, -1);
-# elif defined (VXWORKS)
+#elif defined (VXWORKS)
ACE_OSCALL_RETURN (::gethostname (name, maxnamelen), int, -1);
-# elif defined (CHORUS)
+#elif defined (CHORUS)
if (::gethostname (name, maxnamelen) == -1)
return -1;
else
@@ -8537,13 +9016,13 @@ ACE_OS::hostname (char name[], size_t maxnamelen)
if (ACE_OS::strlen (name) == 0)
{
// Try the HOST environment variable.
- char *const hostenv = ::getenv ("HOST");
+ ACE_TCHAR *const hostenv = ::getenv (ACE_TEXT ("HOST"));
if (hostenv)
ACE_OS::strncpy (name, hostenv, maxnamelen);
}
return 0;
}
-# else /* !ACE_WIN32 */
+#else /* ACE_HAS_WINCE */
struct utsname host_info;
if (ACE_OS::uname (&host_info) == -1)
@@ -8553,14 +9032,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen)
ACE_OS::strncpy (name, host_info.nodename, maxnamelen);
return 0;
}
-# endif /* ACE_WIN32 */
-#else /* ACE_HAS_WINCE */
- // @@ Don'T know how to implement this (yet.) Can probably get around
- // this by peeking into the Register set.
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (maxnamelen);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_WINCE */
+#endif /* ACE_HAS_WINCE */
}
ACE_INLINE int
@@ -8699,7 +9171,7 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
// SunOS4 does not automatically call _fini()!
void *ptr;
- ACE_OSCALL (::dlsym (handle, "_fini"), void *, 0, ptr);
+ ACE_OSCALL (::dlsym (handle, ACE_TEXT ("_fini")), void *, 0, ptr);
if (ptr != 0)
(*((int (*)(void)) ptr)) (); // Call _fini hook explicitly.
@@ -8737,7 +9209,7 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
}
-ACE_INLINE ASYS_TCHAR *
+ACE_INLINE ACE_TCHAR *
ACE_OS::dlerror (void)
{
ACE_TRACE ("ACE_OS::dlerror");
@@ -8750,27 +9222,17 @@ ACE_OS::dlerror (void)
# elif defined (__hpux)
ACE_OSCALL_RETURN (::strerror(errno), char *, 0);
# elif defined (ACE_WIN32)
- static ASYS_TCHAR buf[128];
+ static ACE_TCHAR buf[128];
# if defined (ACE_HAS_PHARLAP)
ACE_OS::sprintf (buf, "error code %d", GetLastError());
# else
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- ::GetLastError (),
- 0,
- buf,
- sizeof buf,
- NULL);
-#else
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- ::GetLastError (),
- 0,
- buf,
- sizeof buf / sizeof ASYS_TCHAR,
- NULL);
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+ ACE_TEXT_FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ ::GetLastError (),
+ 0,
+ buf,
+ sizeof buf,
+ NULL);
# endif /* ACE_HAS_PHARLAP */
return buf;
# else
@@ -8779,7 +9241,7 @@ ACE_OS::dlerror (void)
}
ACE_INLINE ACE_SHLIB_HANDLE
-ACE_OS::dlopen (const ASYS_TCHAR *fname,
+ACE_OS::dlopen (const ACE_TCHAR *fname,
int mode)
{
ACE_TRACE ("ACE_OS::dlopen");
@@ -8803,7 +9265,7 @@ ACE_OS::dlopen (const ASYS_TCHAR *fname,
// Some systems (e.g., SunOS4) do not automatically call _init(), so
// we'll have to call it manually.
- ACE_OSCALL (::dlsym (handle, "_init"), void *, 0, ptr);
+ ACE_OSCALL (::dlsym (handle, ACE_TEXT ("_init")), void *, 0, ptr);
if (ptr != 0 && (*((int (*)(void)) ptr)) () == -1) // Call _init hook explicitly.
{
@@ -8817,11 +9279,7 @@ ACE_OS::dlopen (const ASYS_TCHAR *fname,
# elif defined (ACE_WIN32)
ACE_UNUSED_ARG (mode);
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- ACE_WIN32CALL_RETURN (::LoadLibrary (filename), ACE_SHLIB_HANDLE, 0);
-# else
- ACE_WIN32CALL_RETURN (::LoadLibraryA (filename), ACE_SHLIB_HANDLE, 0);
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+ ACE_WIN32CALL_RETURN (ACE_TEXT_LoadLibrary (filename), ACE_SHLIB_HANDLE, 0);
# elif defined (__hpux)
# if defined(__GNUC__) || __cplusplus >= 199707L
@@ -8839,7 +9297,7 @@ ACE_OS::dlopen (const ASYS_TCHAR *fname,
ACE_INLINE void *
ACE_OS::dlsym (ACE_SHLIB_HANDLE handle,
- const char *sname)
+ const ACE_TCHAR *sname)
{
ACE_TRACE ("ACE_OS::dlsym");
@@ -8854,7 +9312,7 @@ typedef const char * ACE_DL_SYM_TYPE;
# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
# if defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::dlsym (handle, (char*) symbolname), void *, 0);
+ ACE_OSCALL_RETURN (::dlsym (handle, symbolname), void *, 0);
# elif defined (ACE_USES_ASM_SYMBOL_IN_DLSYM)
int l = ACE_OS::strlen (symbolname) + 2;
char *asm_symbolname = 0;
@@ -8877,12 +9335,10 @@ typedef const char * ACE_DL_SYM_TYPE;
# endif /* ACE_LACKS_POSIX_PROTOTYPES */
# elif defined (ACE_WIN32)
# if !defined (ACE_HAS_WINCE)
- ACE_WIN32CALL_RETURN (::GetProcAddress (handle,
- symbolname),
+ ACE_WIN32CALL_RETURN (::GetProcAddress (handle, symbolname),
void *, 0);
# else /* ACE_HAS_WINCE */
- ACE_WIN32CALL_RETURN (::GetProcAddress (handle,
- ACE_WIDE_STRING (symbolname)),
+ ACE_WIN32CALL_RETURN (::GetProcAddress (handle, symbolname),
void *, 0);
# endif /* ACE_HAS_WINCE */
# elif defined (__hpux)
@@ -9450,58 +9906,66 @@ ACE_OS::difftime (time_t t1, time_t t0)
}
#endif /* ! ACE_LACKS_DIFFTIME */
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE char *
+ACE_INLINE ACE_TCHAR *
ACE_OS::ctime (const time_t *t)
{
ACE_TRACE ("ACE_OS::ctime");
-# if defined (ACE_HAS_BROKEN_CTIME)
+#if defined (ACE_HAS_BROKEN_CTIME)
ACE_OSCALL_RETURN (::asctime (::localtime (t)), char *, 0);
#elif defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
return "ctime-return";
-# else
+#elif defined (ACE_HAS_WINCE)
+ ACE_TCHAR buf[26]; // 26 is a "magic number" ;)
+ return ACE_OS::ctime_r (t, buf, 26);
+#elif defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wctime (t), wchar_t *, 0);
+#else
ACE_OSCALL_RETURN (::ctime (t), char *, 0);
# endif /* ACE_HAS_BROKEN_CTIME) */
}
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-#if !defined (ACE_HAS_WINCE)
-ACE_INLINE char *
-ACE_OS::ctime_r (const time_t *t, char *buf, int buflen)
+#if !defined (ACE_HAS_WINCE) /* CE version in OS.cpp */
+ACE_INLINE ACE_TCHAR *
+ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen)
{
ACE_TRACE ("ACE_OS::ctime_r");
# if defined (ACE_HAS_REENTRANT_FUNCTIONS)
# if defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R)
- char *result;
+ ACE_TCHAR *result;
# if defined (DIGITAL_UNIX)
- ACE_OSCALL (::_Pctime_r (t, buf), char *, 0, result);
-# else
- ACE_OSCALL (::ctime_r (t, buf), char *, 0, result);
+ ACE_OSCALL (::_Pctime_r (t, buf), ACE_TCHAR *, 0, result);
+# else /* DIGITAL_UNIX */
+ ACE_OSCALL (::ctime_r (t, buf), ACE_TCHAR *, 0, result);
# endif /* DIGITAL_UNIX */
if (result != 0)
::strncpy (buf, result, buflen);
return buf;
-# else
+# else /* ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R */
# if defined (ACE_CTIME_R_RETURNS_INT)
return (::ctime_r (t, buf, buflen) == -1 ? 0 : buf);
-# else
- ACE_OSCALL_RETURN (::ctime_r (t, buf, buflen), char *, 0);
+# else /* ACE_CTIME_R_RETURNS_INT */
+ ACE_OSCALL_RETURN (::ctime_r (t, buf, buflen), ACE_TCHAR *, 0);
# endif /* ACE_CTIME_R_RETURNS_INT */
-# endif /* defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) */
-# else
-# if defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
+# endif /* ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R */
+# else /* ACE_HAS_REENTRANT_FUNCTIONS */
+# if defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
::strncpy(buf, "ctime-return",buflen);
return buf;
-# else
- char *result;
+# else /* ACE_PSOS && !ACE_PSOS_HAS_TIME */
+
+ ACE_TCHAR *result;
+# if defined (ACE_USES_WCHAR)
+ ACE_OSCALL (::_wctime (t), wchar_t *, 0, result);
+# else /* ACE_WIN32 */
ACE_OSCALL (::ctime (t), char *, 0, result);
+# endif /* ACE_WIN32 */
if (result != 0)
- ::strncpy (buf, result, buflen);
+ ACE_OS::strncpy (buf, result, buflen);
return buf;
-# endif // ACE_PSOS
-# endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) */
+# endif /* ACE_PSOS && !ACE_PSOS_HAS_TIME */
+# endif /* ACE_HAS_REENTRANT_FUNCTIONS */
}
#endif /* !ACE_HAS_WINCE */
@@ -9626,7 +10090,7 @@ ACE_OS::strftime (char *s, size_t maxsize, const char *format,
ACE_INLINE int
ACE_OS::flock_init (ACE_OS::ace_flock_t *lock,
int flags,
- LPCTSTR name,
+ const ACE_TCHAR *name,
mode_t perms)
{
ACE_TRACE ("ACE_OS::flock_init");
@@ -9998,7 +10462,7 @@ ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock,
if (unlink_file)
ACE_OS::shm_unlink (lock->lockname_);
ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (LPTSTR,
+ ACE_const_cast (ACE_TCHAR *,
lock->lockname_)));
}
else if (lock->process_lock_)
@@ -10011,7 +10475,7 @@ ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock,
if (unlink_file)
ACE_OS::unlink (lock->lockname_);
ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (LPTSTR,
+ ACE_const_cast (ACE_TCHAR *,
lock->lockname_)));
}
#endif /* CHORUS */
@@ -10111,7 +10575,7 @@ ACE_OS::execvp (const char *file,
#if !defined (ACE_HAS_WINCE)
ACE_INLINE FILE *
-ACE_OS::fdopen (ACE_HANDLE handle, const char *mode)
+ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode)
{
ACE_TRACE ("ACE_OS::fdopen");
# if defined (ACE_WIN32)
@@ -10126,6 +10590,8 @@ ACE_OS::fdopen (ACE_HANDLE handle, const char *mode)
{
# if defined(__BORLANDC__) // VSB
file = ::_fdopen (crt_handle, (char *) mode);
+# elif defined (ACE_USES_WCHAR)
+ file = ::_wfdopen (crt_handle, mode);
# else
file = ::_fdopen (crt_handle, mode);
# endif /* __BORLANDC__ */
@@ -10848,18 +11314,15 @@ ACE_OS::sigaction (int signum,
#endif /* ACE_LACKS_POSIX_PROTOTYPES */
}
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-ACE_INLINE char *
-ACE_OS::getcwd (char *buf, size_t size)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::getcwd (ACE_TCHAR *buf, size_t size)
{
ACE_TRACE ("ACE_OS::getcwd");
-# if defined (ACE_WIN32)
- return ::_getcwd (buf, size);
-# elif defined (ACE_PSOS_LACKS_PHILE)
+#if defined (ACE_PSOS_LACKS_PHILE)
ACE_UNUSED_ARG (buf);
ACE_UNUSED_ARG (size);
ACE_NOTSUP_RETURN ( (char*)-1);
-# elif defined (ACE_PSOS)
+#elif defined (ACE_PSOS)
static char pathbuf [BUFSIZ];
@@ -10939,12 +11402,16 @@ ACE_OS::getcwd (char *buf, size_t size)
// return the path, if there is one
return (ACE_OS::strlen (pathbuf) > 0) ? pathbuf : (char *) 0;
-
-# else
+#elif defined (ACE_HAS_WINCE)
+ ACE_UNUSED_ARG (buf);
+ ACE_UNUSED_ARG (size);
+ ACE_NOTSUP_RETURN (0);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ return ::_wgetcwd (buf, size);
+#else
ACE_OSCALL_RETURN (::getcwd (buf, size), char *, 0);
-# endif /* ACE_WIN32 */
+#endif /* ACE_WIN32 */
}
-#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
ACE_INLINE int
ACE_OS::sleep (u_int seconds)
@@ -11060,23 +11527,14 @@ ACE_OS::nanosleep (const struct timespec *requested,
#endif /* ACE_HAS_CLOCK_GETTIME */
}
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
ACE_INLINE int
-ACE_OS::mkdir (const char *path, mode_t mode)
+ACE_OS::mkdir (const ACE_TCHAR *path, mode_t mode)
{
-# if defined (ACE_WIN32)
- ACE_UNUSED_ARG (mode);
-
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
- ACE_OSCALL_RETURN (::_mkdir ((char *) path), int, -1);
-#else
- ACE_OSCALL_RETURN (::_mkdir (path), int, -1);
- #endif /* __IBMCPP__ */
-# elif defined (ACE_PSOS_LACKS_PHILE)
+#if defined (ACE_PSOS_LACKS_PHILE)
ACE_UNUSED_ARG (path);
ACE_UNUSED_ARG (mode);
ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_PSOS)
+#elif defined (ACE_PSOS)
//The pSOS make_dir fails if the last character is a '/'
int location;
char *phile_path;
@@ -11111,39 +11569,53 @@ ACE_OS::mkdir (const char *path, mode_t mode)
ACE_OS::free(phile_path);
return result;
-# elif defined (VXWORKS)
+#elif defined (VXWORKS)
ACE_UNUSED_ARG (mode);
ACE_OSCALL_RETURN (::mkdir ((char *) path), int, -1);
-# else
+#elif defined (ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400)
+ ACE_UNUSED_ARG (mode);
+ ACE_OSCALL_RETURN (::_mkdir ((char *) path), int, -1);
+#elif defined (ACE_HAS_WINCE)
+ ACE_UNUSED_ARG (mode);
+ ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CreateDirectory (path, NULL),
+ ace_result_),
+ int, -1);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wmkdir (path), int, -1);
+#elif defined (ACE_WIN32)
+ ACE_OSCALL_RETURN (::mkdir (path), int, -1);
+#else
ACE_OSCALL_RETURN (::mkdir (path, mode), int, -1);
-# endif /* VXWORKS */
+#endif /* VXWORKS */
}
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-ACE_INLINE char *
-ACE_OS::getenv (const char *symbol)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::getenv (const ACE_TCHAR *symbol)
{
ACE_TRACE ("ACE_OS::getenv");
-#if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS)
- ACE_OSCALL_RETURN (::getenv (symbol), char *, 0);
-#else
- // @@ WinCE doesn't have the concept of environment variables.
+#if defined (ACE_HAS_WINCE) || defined (ACE_PSOS)
ACE_UNUSED_ARG (symbol);
ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_HAS_WINCE */
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wgetenv (symbol), ACE_TCHAR *, 0);
+#else /* ACE_HAS_WINCE || ACE_PSOS */
+ ACE_OSCALL_RETURN (::getenv (symbol), char *, 0);
+#endif /* ACE_HAS_WINCE || ACE_PSOS */
}
ACE_INLINE int
-ACE_OS::putenv (const char *string)
+ACE_OS::putenv (const ACE_TCHAR *string)
{
ACE_TRACE ("ACE_OS::putenv");
- // VxWorks declares ::putenv with a non-const arg.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::putenv ((char *) string), int, -1);
-#else
- // @@ WinCE and pSOS don't have the concept of environment variables.
+#if defined (ACE_HAS_WINCE) || defined (ACE_PSOS)
+ // WinCE and pSOS don't have the concept of environment variables.
ACE_UNUSED_ARG (string);
ACE_NOTSUP_RETURN (-1);
+#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
+ ACE_OSCALL_RETURN (::_wputenv (string), int, -1);
+#else /* ! ACE_HAS_WINCE && ! ACE_PSOS */
+ // VxWorks declares ::putenv with a non-const arg.
+ ACE_OSCALL_RETURN (::putenv ((char *) string), int, -1);
#endif /* ! ACE_HAS_WINCE && ! ACE_PSOS */
}
@@ -11163,140 +11635,6 @@ ACE_Str_Buf::ACE_Str_Buf (strbuf &sb)
this->buf = sb.buf;
}
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR)
-ACE_INLINE size_t
-ACE_OS::strlen (const wchar_t *s)
-{
- // ACE_TRACE ("ACE_OS::strlen");
-# if defined (ACE_HAS_UNICODE)
- return ::wcslen (s);
-# else
-# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
- return wcslen (s);
-# else
- u_int len = 0;
-
- while (*s++ != 0)
- len++;
-
- return len;
-# endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */
-# endif /* ACE_HAS_UNICODE */
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strcpy (wchar_t *s, const wchar_t *t)
-{
- // ACE_TRACE ("ACE_OS::strcpy");
-
-# if defined (ACE_HAS_UNICODE)
- return ::wcscpy (s, t);
-# else
-# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
- return wcscpy (s, t);
-# else
- wchar_t *result = s;
-
- while ((*s++ = *t++) != 0)
- continue;
-
- return result;
-# endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */
-# endif /* ACE_HAS_UNICODE */
-}
-
-ACE_INLINE size_t
-ACE_OS::strspn (const wchar_t *s, const wchar_t *t)
-{
-#if !defined (ACE_HAS_WINCE) && defined (ACE_HAS_UNICODE)
- ACE_TRACE ("ACE_OS::strspn");
- return ::wcsspn (s, t);
-#else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::strcmp (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strcmp");
-# if defined (ACE_HAS_UNICODE)
- return ::wcscmp (s, t);
-# else
-# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
- return wcscmp (s, t);
-# else
- const wchar_t *scan1 = s;
- const wchar_t *scan2 = t;
-
- while (*scan1 != 0 && *scan1 == *scan2)
- {
- ++scan1;
- ++scan2;
- }
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return *scan1 - *scan2;
-# endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */
-# endif /* ACE_HAS_UNICODE */
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_USHORT)
-ACE_INLINE size_t
-ACE_OS::strlen (const ACE_USHORT16 *s)
-{
- // ACE_TRACE ("ACE_OS::strlen");
- u_int len = 0;
-
- while (*s++ != 0)
- len++;
-
- return len;
-}
-
-ACE_INLINE ACE_USHORT16 *
-ACE_OS::strcpy (ACE_USHORT16 *s, const ACE_USHORT16 *t)
-{
- // ACE_TRACE ("ACE_OS::strcpy");
-
- ACE_USHORT16 *result = s;
-
- while ((*s++ = *t++) != 0)
- continue;
-
- return result;
-}
-
-ACE_INLINE int
-ACE_OS::strcmp (const ACE_USHORT16 *s, const ACE_USHORT16 *t)
-{
- ACE_TRACE ("ACE_OS::strcmp");
-
- while (*s != 0
- && *t != 0
- && *s == *t)
- {
- ++s;
- ++t;
- }
-
- return *s - *t;
-}
-#endif /* ! ACE_HAS_WCHAR_TYPEDEFS_USHORT */
-
ACE_INLINE u_int
ACE_OS::wslen (const WChar *s)
{
@@ -11350,594 +11688,6 @@ ACE_OS::wsncmp (const WChar *s, const WChar *t, size_t len)
return len == 0 ? 0 : *scan1 - *scan2;
}
-#if defined (ACE_HAS_UNICODE)
-
-ACE_INLINE int
-ACE_OS::atoi (const wchar_t *s)
-{
- return ::_wtoi (s);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strecpy (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strecpy");
- register wchar_t *dscan = s;
- register const wchar_t *sscan = t;
-
- while ((*dscan++ = *sscan++) != '\0')
- continue;
-
- return dscan;
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strpbrk (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::wcspbrk");
- return ::wcspbrk (s, t);
-}
-
-ACE_INLINE const wchar_t *
-ACE_OS::strpbrk (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::wcspbrk");
- return ::wcspbrk (s, t);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strcat (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strcat");
- return ::wcscat (s, t);
-}
-
-ACE_INLINE const wchar_t *
-ACE_OS::strchr (const wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strchr");
- return (const wchar_t *) ::wcschr (s, c);
-}
-
-ACE_INLINE const wchar_t *
-ACE_OS::strnchr (const wchar_t *s, wint_t c, size_t len)
-{
- for (size_t i = 0; i < len; i++)
- if (s[i] == c)
- return s + i;
-
- return 0;
-}
-
-ACE_INLINE const wchar_t *
-ACE_OS::strrchr (const wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-# if !defined (ACE_HAS_WINCE)
- return (const wchar_t *) ::wcsrchr (s, c);
-# else
- const wchar_t *p = s + ::wcslen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strchr (wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strchr");
- return ::wcschr (s, c);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strnchr (wchar_t *s, wint_t c, size_t len)
-{
-#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
- const wchar_t *const_wchar_s=s;
- return (wchar_t *) ACE_OS::strnchr (const_wchar_s, c, len);
-#else
- return (wchar_t *) ACE_OS::strnchr ((const wchar_t *) s, c, len);
-#endif
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strrchr (wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-# if !defined (ACE_HAS_WINCE)
- return (wchar_t *) ::wcsrchr (s, c);
-# else
- wchar_t *p = s + ::wcslen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE wint_t
-ACE_OS::to_lower (wint_t c)
-{
- ACE_TRACE ("ACE_OS::to_lower");
- return ::towlower (c);
-}
-
-ACE_INLINE int
-ACE_OS::strcasecmp (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strcasecmp");
-
-# if !defined (ACE_WIN32)
- const wchar_t *scan1 = s;
- const wchar_t *scan2 = t;
-
- while (*scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else /* ACE_WIN32 */
- return ::_wcsicmp (s, t);
-# endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::strncasecmp (const wchar_t *s,
- const wchar_t *t,
- size_t len)
-{
- ACE_TRACE ("ACE_OS::strcasecmp");
-
-# if !defined (ACE_WIN32)
- const wchar_t *scan1 = s;
- const wchar_t *scan2 = t;
- ssize_t count = ssize_t (n);
-
- while (--count >= 0
- && *scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- if (count < 0)
- return 0;
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else /* ACE_WIN32 */
- return ::_wcsnicmp (s, t, len);
-# endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::strncmp (const wchar_t *s, const wchar_t *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncmp");
- return ::wcsncmp (s, t, len);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strncpy (wchar_t *s, const wchar_t *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncpy");
- return ::wcsncpy (s, t, len);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strncat (wchar_t *s, const wchar_t *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncat");
- return ::wcsncat (s, t, len);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strtok (wchar_t *s, const wchar_t *tokens)
-{
- ACE_TRACE ("ACE_OS::strtok");
- return ::wcstok (s, tokens);
-}
-
-ACE_INLINE long
-ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base)
-{
- ACE_TRACE ("ACE_OS::strtol");
- return ::wcstol (s, ptr, base);
-}
-
-ACE_INLINE unsigned long
-ACE_OS::strtoul (const wchar_t *s, wchar_t **ptr, int base)
-{
- ACE_TRACE ("ACE_OS::strtoul");
- return ::wcstoul (s, ptr, base);
-}
-
-ACE_INLINE double
-ACE_OS::strtod (const wchar_t *s, wchar_t **endptr)
-{
- ACE_TRACE ("ACE_OS::strtod");
- return ::wcstod (s, endptr);
-}
-
-ACE_INLINE int
-ACE_OS::ace_isspace (wchar_t c)
-{
- return iswspace (c);
-}
-
-# if defined (ACE_WIN32)
-
-ACE_INLINE const wchar_t *
-ACE_OS::strstr (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return (const wchar_t *) ::wcsstr (s, t);
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strstr (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return ::wcsstr (s, t);
-}
-
-ACE_INLINE const wchar_t *
-ACE_OS::strnstr (const wchar_t *s1, const wchar_t *s2, size_t len2)
-{
- // Substring length
- size_t len1 = ACE_OS::strlen (s1);
-
- // Check if the substring is longer than the string being searched.
- if (len2 > len1)
- return 0;
-
- // Go upto <len>
- size_t len = len1 - len2;
-
- for (size_t i = 0; i <= len; i++)
- {
- if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (wchar_t)) == 0)
- // Found a match! Return the index.
- return s1 + i;
- }
-
- return 0;
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strnstr (wchar_t *s, const wchar_t *t, size_t len)
-{
-#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
- const wchar_t *const_wchar_s=s;
- return (wchar_t *) ACE_OS::strnstr (const_wchar_s, t, len);
-#else
- return (wchar_t *) ACE_OS::strnstr ((const wchar_t *) s, t, len);
-#endif
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::strdup (const wchar_t *s)
-{
- // ACE_TRACE ("ACE_OS::strdup");
-
-# if defined (__BORLANDC__)
- wchar_t *buffer = (wchar_t *) malloc ((ACE_OS::strlen (s) + 1) * sizeof (wchar_t));
- return ::wcscpy (buffer, s);
-# else
- return ::wcsdup (s);
-# endif /* __BORLANDC__ */
-}
-
-ACE_INLINE int
-ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr)
-{
- return ::vswprintf (buffer, format, argptr);
-}
-
-ACE_INLINE int
-ACE_OS::hostname (wchar_t *name, size_t maxnamelen)
-{
-# if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
- ACE_TRACE ("ACE_OS::hostname");
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetComputerNameW (name, LPDWORD (&maxnamelen)),
- ace_result_), int, -1);
-# else
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (maxnamelen);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::unlink (const wchar_t *path)
-{
- ACE_TRACE ("ACE_OS::unlink");
-# if !defined (ACE_HAS_WINCE)
- ACE_OSCALL_RETURN (::_wunlink (path), int, -1);
-# else
- // @@ The problem is, DeleteFile is not actually equals to unlink. ;(
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (path), ace_result_),
- int, -1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::getenv (const wchar_t *symbol)
-{
-# if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::getenv");
- ACE_OSCALL_RETURN (::_wgetenv (symbol), wchar_t *, 0);
-# else
- ACE_UNUSED_ARG (symbol);
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::putenv (const wchar_t *string)
-{
- ACE_TRACE ("ACE_OS::putenv");
- // VxWorks declares ::putenv with a non-const arg.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::_wputenv ((wchar_t *) string), int, -1);
-#else
- // @@ WinCE and pSOS don't have the concept of environment variables.
- ACE_UNUSED_ARG (string);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_WINCE && ! ACE_PSOS */
-}
-
-ACE_INLINE int
-ACE_OS::rename (const wchar_t *old_name, const wchar_t *new_name)
-{
-# if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::rename");
- ACE_OSCALL_RETURN (::_wrename (old_name, new_name), int, -1);
-# else
- // @@ There should be a Win32 API that can do this.
- ACE_UNUSED_ARG (old_name);
- ACE_UNUSED_ARG (new_name);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::access (const wchar_t *path, int amode)
-{
-# if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::access");
- ACE_OSCALL_RETURN (::_waccess (path, amode), int, -1);
-# else
- // @@ There should be a Win32 API that can do this.
- // Hard coded read access here.
- FILE* handle = ACE_OS::fopen (path, ASYS_TEXT ("r"));
- ACE_UNUSED_ARG (amode);
-
- ACE_OS::fclose (handle);
- return (handle == ACE_INVALID_HANDLE ? -1 : 0);
-# endif /* ACE_HAS_WINCE */
-}
-
-# if !defined (ACE_WIN32)
-// Win32 implementation of fopen(const wchar_t*, const wchar_t*)
-// is in OS.cpp.
-ACE_INLINE FILE *
-ACE_OS::fopen (const wchar_t *filename, const wchar_t *mode)
-{
- ACE_OSCALL_RETURN (::_wfopen (filename, mode), FILE *, 0);
-}
-# endif /* ACE_WIN32 */
-
-ACE_INLINE FILE *
-ACE_OS::fdopen (ACE_HANDLE handle, const wchar_t *mode)
-{
- ACE_TRACE ("ACE_OS::fdopen");
-# if !defined (ACE_HAS_WINCE)
- // kernel file handle -> FILE* conversion...
- // Options: _O_APPEND, _O_RDONLY and _O_TEXT are lost
-
- FILE *file = 0;
-
- int crt_handle = ::_open_osfhandle ((long) handle, 0);
-
- if (crt_handle != -1)
- {
-# if defined(__BORLANDC__)
- file = ::_wfdopen (crt_handle, ACE_const_cast (wchar_t *, mode));
-# else
- file = ::_wfdopen (crt_handle, mode);
-# endif /* defined(__BORLANDC__) */
-
- if (!file)
- {
-# if (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530)
- ::_rtl_close (crt_handle);
-# else
- ::_close (crt_handle);
-# endif /* (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530) */
- }
- }
-
- return file;
-# else /* ! ACE_HAS_WINCE */
- // @@ this function has to be implemented???
- // Okey, don't know how to implement it on CE.
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (0);
-# endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::stat (const wchar_t *file, struct stat *stp)
-{
- ACE_TRACE ("ACE_OS::stat");
-# if defined (ACE_HAS_WINCE)
- WIN32_FIND_DATA fdata;
- HANDLE fhandle;
-
- fhandle = ::FindFirstFile (file, &fdata);
- if (fhandle == INVALID_HANDLE_VALUE)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else if (fdata.nFileSizeHigh != 0)
- {
- errno = EINVAL;
- return -1;
- }
- else
- {
- stp->st_size = fdata.nFileSizeLow;
- stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime);
- stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime);
- }
- return 0;
-# elif defined (__BORLANDC__) && (__BORLANDC__ <= 0x540)
- ACE_OSCALL_RETURN (::_wstat (file, stp), int, -1);
-# else
- ACE_OSCALL_RETURN (::_wstat (file, (struct _stat *) stp), int, -1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE void
-ACE_OS::perror (const wchar_t *s)
-{
- ACE_TRACE ("ACE_OS::perror");
-# if !defined (ACE_HAS_WINCE)
- ::_wperror (s);
-# else
- // @@ Let's leave this to some later point.
- ACE_UNUSED_ARG (s);
- //@@??@@ ACE_NOTSUP_RETURN ();
-# endif /* ! ACE_HAS_WINCE */
-}
-
-
-// Here are functions that CE doesn't support at all.
-// Notice that some of them might have UNICODE version.
-ACE_INLINE wchar_t *
-ACE_OS::fgets (wchar_t *buf, int size, FILE *fp)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::fgets");
- ACE_OSCALL_RETURN (::fgetws (buf, size, fp), wchar_t *, 0);
-#else
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (size);
- ACE_UNUSED_ARG (fp);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::system (const wchar_t *command)
-{
-# if !defined (ACE_HAS_WINCE)
- ACE_OSCALL_RETURN (::_wsystem (command), int, -1);
-# else
- // @@ Should be able to emulate this using Win32 APIS.
- ACE_UNUSED_ARG (command);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINCE */
-}
-
-# if !defined (ACE_LACKS_MKTEMP)
-ACE_INLINE wchar_t *
-ACE_OS::mktemp (wchar_t *s)
-{
- ACE_TRACE ("ACE_OS::mktemp");
- return ::_wmktemp (s);
-}
-# endif /* !ACE_LACKS_MKTEMP */
-
-ACE_INLINE int
-ACE_OS::mkdir (const wchar_t *path, mode_t mode)
-{
- ACE_TRACE ("ACE_OS::mkdir");
-# if !defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (mode);
-
- ACE_OSCALL_RETURN (::_wmkdir (path), int, -1);
-# else
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CreateDirectory (path, NULL),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::chdir (const wchar_t *path)
-{
- ACE_TRACE ("ACE_OS::chdir");
-# if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (path);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::_wchdir (path), int, -1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE wchar_t *
-ACE_OS::getcwd (wchar_t *buf, size_t size)
-{
- ACE_TRACE ("ACE_OS::getcwd");
-# if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (size);
- ACE_NOTSUP_RETURN (0);
-# else
- return ::_wgetcwd (buf, size);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::mkfifo (const wchar_t *file, mode_t mode)
-{
- // ACE_TRACE ("ACE_OS::mkfifo");
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-}
-# endif /* ACE_WIN32 */
-#endif /* ACE_HAS_UNICODE */
-
#if defined (ACE_LACKS_COND_T) && defined (ACE_HAS_THREADS)
ACE_INLINE long
ACE_cond_t::waiters (void) const
@@ -12384,7 +12134,7 @@ ACE_Cleanup::~ACE_Cleanup (void)
}
ACE_INLINE DIR *
-ACE_OS::opendir (const char *filename)
+ACE_OS::opendir (const ACE_TCHAR *filename)
{
#if defined (ACE_HAS_DIRENT)
# if defined (ACE_PSOS)
@@ -12412,8 +12162,8 @@ ACE_OS::opendir (const char *filename)
DIR *dir;
ACE_NEW_RETURN (dir, DIR, 0);
ACE_NEW_RETURN (dir->directory_name_,
- char[ACE_OS::strlen (filename)],
- 0);
+ ACE_TCHAR[ACE_OS::strlen (filename)],
+ 0);
ACE_OS::strcpy (dir->directory_name_, filename);
dir->current_handle_ = INVALID_HANDLE_VALUE;
dir->started_reading_ = 0;
@@ -12489,36 +12239,37 @@ ACE_OS::readdir (DIR *d)
# if defined (ACE_WIN32)
if (!d->started_reading_)
{
- d->current_handle_ = ::FindFirstFile (d->directory_name_,
- &(d->fdata_));
+ d->current_handle_ = ACE_TEXT_FindFirstFile (d->directory_name_,
+ &(d->fdata_));
if (d->current_handle_ != INVALID_HANDLE_VALUE
&& d->fdata_.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
- {
+ {
::FindClose (d->current_handle_);
d->current_handle_ = INVALID_HANDLE_VALUE;
- }
- else // Skip "." and ".."
- {
- int retval = 1;
- while (*(d->fdata_.cFileName) == '.'
- && retval
- && d->current_handle_ != INVALID_HANDLE_VALUE)
- {
- retval = ::FindNextFile (d->current_handle_, &(d->fdata_));
- }
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
- }
-
- d->started_reading_ = 1;
- }
+ }
+ else // Skip "." and ".."
+ {
+ int retval = 1;
+ while (*(d->fdata_.cFileName) == '.'
+ && retval
+ && d->current_handle_ != INVALID_HANDLE_VALUE)
+ {
+ retval = ACE_TEXT_FindNextFile (d->current_handle_,
+ &(d->fdata_));
+ }
+ if (retval == 0)
+ d->current_handle_ = INVALID_HANDLE_VALUE;
+ }
+
+ d->started_reading_ = 1;
+ }
else
{
- int retval = ::FindNextFile (d->current_handle_,
- &(d->fdata_));
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
+ int retval = ACE_TEXT_FindNextFile (d->current_handle_,
+ &(d->fdata_));
+ if (retval == 0)
+ d->current_handle_ = INVALID_HANDLE_VALUE;
}
if (d->current_handle_ != INVALID_HANDLE_VALUE)
@@ -12745,18 +12496,18 @@ ACE_OS::isatty (ACE_HANDLE handle)
# endif /* !ACE_HAS_WINCE */
ACE_INLINE void
-ACE_OS::fopen_mode_to_open_mode_converter (char x, int &hmode)
+ACE_OS::fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode)
{
switch (x)
{
- case 'r':
+ case ACE_TEXT ('r'):
if (ACE_BIT_DISABLED (hmode, _O_RDWR))
{
ACE_CLR_BITS (hmode, _O_WRONLY);
ACE_SET_BITS (hmode, _O_RDONLY);
}
break;
- case 'w':
+ case ACE_TEXT ('w'):
if (ACE_BIT_DISABLED (hmode, _O_RDWR))
{
ACE_CLR_BITS (hmode, _O_RDONLY);
@@ -12764,7 +12515,7 @@ ACE_OS::fopen_mode_to_open_mode_converter (char x, int &hmode)
}
ACE_SET_BITS (hmode, _O_CREAT | _O_TRUNC);
break;
- case 'a':
+ case ACE_TEXT ('a'):
if (ACE_BIT_DISABLED (hmode, _O_RDWR))
{
ACE_CLR_BITS (hmode, _O_RDONLY);
@@ -12772,15 +12523,15 @@ ACE_OS::fopen_mode_to_open_mode_converter (char x, int &hmode)
}
ACE_SET_BITS (hmode, _O_CREAT | _O_APPEND);
break;
- case '+':
+ case ACE_TEXT ('+'):
ACE_CLR_BITS (hmode, _O_RDONLY | _O_WRONLY);
ACE_SET_BITS (hmode, _O_RDWR);
break;
- case 't':
+ case ACE_TEXT ('t'):
ACE_CLR_BITS (hmode, _O_BINARY);
ACE_SET_BITS (hmode, _O_TEXT);
break;
- case 'b':
+ case ACE_TEXT ('b'):
ACE_CLR_BITS (hmode, _O_TEXT);
ACE_SET_BITS (hmode, _O_BINARY);
break;
@@ -12793,65 +12544,22 @@ ACE_OS::fopen_mode_to_open_mode_converter (char x, int &hmode)
// allocated with <ACE_OS::malloc> and must be freed by
// <ACE_OS::free>.
-ACE_INLINE char *
-ACE_OS::strenvdup (const char *str)
-{
-#if defined (ACE_HAS_WINCE)
- // WinCE doesn't have environment variables so we just skip it.
- return ACE_OS::strdup (str);
-#else
- char *temp = 0;
-
- if (str[0] == '$'
- && (temp = ACE_OS::getenv (&str[1])) != 0)
- return ACE_OS::strdup (temp);
- else
- return ACE_OS::strdup (str);
-#endif /* ACE_HAS_WINCE */
-}
-
-#if !defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) && defined (ACE_WIN32)
-ACE_INLINE wchar_t *
-ACE_OS::strenvdup (const wchar_t *str)
+ACE_INLINE ACE_TCHAR *
+ACE_OS::strenvdup (const ACE_TCHAR *str)
{
#if defined (ACE_HAS_WINCE)
- // WinCE doesn't have environment variables so we just skip it.
+ // WinCE doesn't have environment variables so we just skip it.
return ACE_OS::strdup (str);
#else
- wchar_t *temp = 0;
+ ACE_TCHAR *temp = 0;
- if (str[0] == '$'
+ if (str[0] == ACE_TEXT ('$')
&& (temp = ACE_OS::getenv (&str[1])) != 0)
return ACE_OS::strdup (temp);
else
return ACE_OS::strdup (str);
#endif /* ACE_HAS_WINCE */
}
-#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */
-
-ACE_INLINE
-ACE_OS_WString::~ACE_OS_WString (void)
-{
- delete[] this->rep_;
-}
-
-ACE_INLINE char *
-ACE_OS_WString::char_rep (void)
-{
- return this->rep_;
-}
-
-ACE_INLINE
-ACE_OS_CString::~ACE_OS_CString (void)
-{
- delete[] this->rep_;
-}
-
-ACE_INLINE ACE_USHORT16 *
-ACE_OS_CString::wchar_rep (void)
-{
- return this->rep_;
-}
ACE_INLINE int
ACE_Countdown_Time::start (void)
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
index 9066143fdca..e18a7c307ee 100644
--- a/ace/Object_Manager.cpp
+++ b/ace/Object_Manager.cpp
@@ -120,9 +120,10 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void)
{
// Define the static services. This macro call creates static
// service descriptors that are used for initialization below.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
+#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER) && \
+ defined (ACE_HAS_WCHAR)
ACE_STATIC_SVC_DEFINE (ACE_Naming_Context_initializer,
- ASYS_TEXT ("ACE_Naming_Context"),
+ ACE_TEXT ("ACE_Naming_Context"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (ACE_Naming_Context),
ACE_Service_Type::DELETE_THIS |
@@ -132,7 +133,7 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void)
#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
ACE_STATIC_SVC_DEFINE (ACE_Service_Manager_initializer,
- ASYS_TEXT ("ACE_Service_Manager"),
+ ACE_TEXT ("ACE_Service_Manager"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (ACE_Service_Manager),
ACE_Service_Type::DELETE_THIS |
@@ -141,7 +142,8 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void)
// Initialize the static service objects using the descriptors created
// above.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
+#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER) && \
+ defined (ACE_HAS_WCHAR)
ace_svc_desc_ACE_Naming_Context =
ace_svc_desc_ACE_Naming_Context_initializer;
#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
diff --git a/ace/Obstack.cpp b/ace/Obstack.cpp
index 66408f121ab..5a92c271359 100644
--- a/ace/Obstack.cpp
+++ b/ace/Obstack.cpp
@@ -16,9 +16,9 @@ ACE_Obstack::dump (void) const
ACE_TRACE ("ACE_Obstack::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("size_ = %d\n"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("head_ = %x\n"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("curr_ = %x\n"), this->curr_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("size_ = %d\n"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ = %x\n"), this->head_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("curr_ = %x\n"), this->curr_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -30,8 +30,8 @@ ACE_Obchunk::dump (void) const
ACE_TRACE ("ACE_Obchunk::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("end_ = %x\n"), this->end_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("cur_ = %x\n"), this->cur_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("end_ = %x\n"), this->end_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("cur_ = %x\n"), this->cur_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -47,11 +47,15 @@ ACE_Obstack::new_chunk (void)
{
ACE_TRACE ("ACE_Obstack::new_chunk");
- char *temp;
+ ACE_TCHAR *temp;
- ACE_ALLOCATOR_RETURN (temp,
- (char *) this->allocator_strategy_->malloc (sizeof (class ACE_Obchunk) + this->size_),
- 0);
+ ACE_ALLOCATOR_RETURN
+ (temp,
+ ACE_static_cast (ACE_TCHAR *,
+ this->allocator_strategy_->malloc
+ (sizeof (class ACE_Obchunk)
+ + this->size_ * sizeof (ACE_TCHAR))),
+ 0);
return new (temp) ACE_Obchunk (this->size_);
}
@@ -86,12 +90,12 @@ ACE_Obstack::~ACE_Obstack (void)
}
}
-char *
-ACE_Obstack::copy (const char *s,
+ACE_TCHAR *
+ACE_Obstack::copy (const ACE_TCHAR *s,
size_t len)
{
ACE_TRACE ("ACE_Obstack::copy");
- char *result;
+ ACE_TCHAR *result;
ACE_ASSERT (this->size_ >= len + 1);
diff --git a/ace/Obstack.h b/ace/Obstack.h
index 28e9461c2ea..815307984d6 100644
--- a/ace/Obstack.h
+++ b/ace/Obstack.h
@@ -44,16 +44,16 @@ public:
// Declare the dynamic allocation hooks.
private:
- char *end_;
+ ACE_TCHAR *end_;
// Pointer to the end of the chunk.
- char *cur_;
+ ACE_TCHAR *cur_;
// Pointer to the current location in the chunk.
ACE_Obchunk *next_;
// Next chunk in the chain.
- char contents_[4];
+ ACE_TCHAR contents_[4];
// Pointer to the beginning contents of this chunk. This field is
// actually overlayed by the memory allocated by
// <ACE_Obstack::new_chunk>. Therefore, it *must* come last.
@@ -73,8 +73,8 @@ public:
ACE_Allocator *allocator_strategy = 0);
~ACE_Obstack (void);
- char *copy (const char *data,
- size_t len);
+ ACE_TCHAR *copy (const ACE_TCHAR *data,
+ size_t len);
// Copy the data into the current Obchunk.
void release (void);
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp
index cec534b1ca1..a82e7ac2026 100644
--- a/ace/POSIX_Asynch_IO.cpp
+++ b/ace/POSIX_Asynch_IO.cpp
@@ -2075,7 +2075,7 @@ ACE_POSIX_AIOCB_Asynch_Accept::accept (ACE_Message_Block &message_block,
size_t available_space = total_size - space_in_use;
size_t space_needed = bytes_to_read + 2 * address_size;
if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Buffer too small\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
// Common code for both WIN and POSIX.
ACE_POSIX_Asynch_Accept_Result *result = 0;
@@ -2219,7 +2219,7 @@ ACE_POSIX_SIG_Asynch_Accept::accept (ACE_Message_Block &message_block,
size_t available_space = total_size - space_in_use;
size_t space_needed = bytes_to_read + 2 * address_size;
if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Buffer too small\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
// Common code for both WIN and POSIX.
ACE_POSIX_Asynch_Accept_Result *result = 0;
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
index 7c2251b6955..18d9ebec285 100644
--- a/ace/Parse_Node.cpp
+++ b/ace/Parse_Node.cpp
@@ -40,7 +40,7 @@ ACE_Stream_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did stream on %s, error = %d\n"),
+ ACE_TEXT ("did stream on %s, error = %d\n"),
this->node_->name (),
ace_yyerrno));
}
@@ -53,7 +53,7 @@ ACE_Parse_Node::dump (void) const
ACE_TRACE ("ACE_Parse_Node::dump");
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Parse_Node::name (void) const
{
ACE_TRACE ("ACE_Parse_Node::name");
@@ -77,12 +77,12 @@ ACE_Parse_Node::link (ACE_Parse_Node *n)
ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
const ACE_Parse_Node *str_mods)
#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- : ACE_Parse_Node (str_ops == 0 ? ACE_static_cast (ASYS_TCHAR *,
- ASYS_TEXT ("<unknown>"))
- : ACE_static_cast (ASYS_TCHAR *,
+ : ACE_Parse_Node (str_ops == 0 ? ACE_static_cast (ACE_TCHAR *,
+ ACE_TEXT ("<unknown>"))
+ : ACE_static_cast (ACE_TCHAR *,
str_ops->name ())),
#else
- : ACE_Parse_Node ((str_ops == 0 ? ASYS_TEXT ("<unknown>") : str_ops->name ())),
+ : ACE_Parse_Node ((str_ops == 0 ? ACE_TEXT ("<unknown>") : str_ops->name ())),
#endif /* defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
node_ (str_ops),
mods_ (str_mods)
@@ -110,7 +110,7 @@ ACE_Parse_Node::ACE_Parse_Node (void)
}
-ACE_Parse_Node::ACE_Parse_Node (const ASYS_TCHAR *nm)
+ACE_Parse_Node::ACE_Parse_Node (const ACE_TCHAR *nm)
: name_ (nm ? ACE::strnew (nm) : 0),
next_ (0)
{
@@ -123,7 +123,7 @@ ACE_Parse_Node::print (void) const
ACE_TRACE ("ACE_Parse_Node::print");
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("svc = %s\n"),
+ ACE_TEXT ("svc = %s\n"),
this->name ()));
if (this->next_)
@@ -134,7 +134,7 @@ ACE_Parse_Node::print (void) const
ACE_Parse_Node::~ACE_Parse_Node (void)
{
ACE_TRACE ("ACE_Parse_Node::~ACE_Parse_Node");
- delete[] ACE_const_cast (ASYS_TCHAR*, this->name_);
+ delete[] ACE_const_cast (ACE_TCHAR*, this->name_);
delete this->next_;
}
@@ -146,7 +146,7 @@ ACE_Suspend_Node::dump (void) const
ACE_TRACE ("ACE_Suspend_Node::dump");
}
-ACE_Suspend_Node::ACE_Suspend_Node (const ASYS_TCHAR *name)
+ACE_Suspend_Node::ACE_Suspend_Node (const ACE_TCHAR *name)
: ACE_Parse_Node (name)
{
ACE_TRACE ("ACE_Suspend_Node::ACE_Suspend_Node");
@@ -160,7 +160,7 @@ ACE_Resume_Node::dump (void) const
ACE_TRACE ("ACE_Resume_Node::dump");
}
-ACE_Resume_Node::ACE_Resume_Node (const ASYS_TCHAR *name)
+ACE_Resume_Node::ACE_Resume_Node (const ACE_TCHAR *name)
: ACE_Parse_Node (name)
{
ACE_TRACE ("ACE_Resume_Node::ACE_Resume_Node");
@@ -176,7 +176,7 @@ ACE_Suspend_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did suspend on %s, error = %d\n"),
+ ACE_TEXT ("did suspend on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -190,7 +190,7 @@ ACE_Resume_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did resume on %s, error = %d\n"),
+ ACE_TEXT ("did resume on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -203,7 +203,7 @@ ACE_Remove_Node::dump (void) const
ACE_TRACE ("ACE_Remove_Node::dump");
}
-ACE_Remove_Node::ACE_Remove_Node (const ASYS_TCHAR *name)
+ACE_Remove_Node::ACE_Remove_Node (const ACE_TCHAR *name)
: ACE_Parse_Node (name)
{
ACE_TRACE ("ACE_Remove_Node::ACE_Remove_Node");
@@ -218,13 +218,13 @@ ACE_Remove_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did remove on %s, error = %d\n"),
+ ACE_TEXT ("did remove on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Type *sr,
- ASYS_TCHAR *parms)
+ ACE_TCHAR *parms)
: ACE_Static_Node (sr->name (), parms),
record_ (sr)
{
@@ -249,7 +249,7 @@ ACE_Dynamic_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did dynamic on %s, error = %d\n"),
+ ACE_TEXT ("did dynamic on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -275,8 +275,8 @@ ACE_Static_Node::dump (void) const
ACE_TRACE ("ACE_Static_Node::dump");
}
-ACE_Static_Node::ACE_Static_Node (const ASYS_TCHAR *nm,
- ASYS_TCHAR *params)
+ACE_Static_Node::ACE_Static_Node (const ACE_TCHAR *nm,
+ ACE_TCHAR *params)
: ACE_Parse_Node (nm),
parameters_ (params ? ACE::strnew (params) : 0)
{
@@ -297,7 +297,7 @@ ACE_Static_Node::record (void) const
return sr;
}
-ASYS_TCHAR *
+ACE_TCHAR *
ACE_Static_Node::parameters (void) const
{
ACE_TRACE ("ACE_Static_Node::parameters");
@@ -314,7 +314,7 @@ ACE_Static_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did static on %s, error = %d\n"),
+ ACE_TEXT ("did static on %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -346,7 +346,7 @@ ACE_Location_Node::~ACE_Location_Node (void)
ACE_TRACE ("ACE_Location_Node::~ACE_Location_Node");
}
-const ASYS_TCHAR *
+const ACE_TCHAR *
ACE_Location_Node::pathname (void) const
{
ACE_TRACE ("ACE_Location_Node::pathname");
@@ -354,7 +354,7 @@ ACE_Location_Node::pathname (void) const
}
void
-ACE_Location_Node::pathname (const ASYS_TCHAR *p)
+ACE_Location_Node::pathname (const ACE_TCHAR *p)
{
ACE_TRACE ("ACE_Location_Node::pathname");
this->pathname_ = p;
@@ -393,13 +393,13 @@ ACE_Location_Node::open_handle (void)
{
ACE_TRACE ("ACE_Location_Node::open_handle");
- ASYS_TCHAR dl_pathname[MAXPATHLEN + 1];
+ ACE_TCHAR dl_pathname[MAXPATHLEN + 1];
// Transform the pathname into the appropriate dynamic link library
// by searching the ACE_LD_SEARCH_PATH.
int result = ACE::ldfind (this->pathname (),
dl_pathname,
- (sizeof dl_pathname / sizeof (ASYS_TCHAR)));
+ (sizeof dl_pathname / sizeof (ACE_TCHAR)));
// Check for errors
if (result != 0)
@@ -413,19 +413,19 @@ ACE_Location_Node::open_handle (void)
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dlopen failed for %s"),
+ ACE_TEXT ("dlopen failed for %s"),
dl_pathname));
- ASYS_TCHAR *errmsg = ACE_OS::dlerror ();
+ ACE_TCHAR *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT (": %s\n"),
+ ACE_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("\n")),
+ ACE_TEXT ("\n")),
0);
}
else
@@ -440,8 +440,8 @@ ACE_Object_Node::dump (void) const
ACE_TRACE ("ACE_Object_Node::dump");
}
-ACE_Object_Node::ACE_Object_Node (const ASYS_TCHAR *path,
- const ASYS_TCHAR *obj_name)
+ACE_Object_Node::ACE_Object_Node (const ACE_TCHAR *path,
+ const ACE_TCHAR *obj_name)
: object_name_ (obj_name ? ACE::strnew (obj_name) : 0)
{
ACE_TRACE ("ACE_Object_Node::ACE_Object_Node");
@@ -455,30 +455,30 @@ ACE_Object_Node::symbol (ACE_Service_Object_Exterminator *)
ACE_TRACE ("ACE_Object_Node::symbol");
if (this->open_handle () != 0)
{
- ASYS_TCHAR *object_name = ACE_const_cast (ASYS_TCHAR *, this->object_name_);
+ ACE_TCHAR *object_name = ACE_const_cast (ACE_TCHAR *, this->object_name_);
this->symbol_ = (void *)
ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
- ASYS_ONLY_MULTIBYTE_STRING (object_name));
+ object_name);
if (this->symbol_ == 0)
{
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dlsym failed for object %s\n"),
+ ACE_TEXT ("dlsym failed for object %s\n"),
object_name));
- ASYS_TCHAR *errmsg = ACE_OS::dlerror ();
+ ACE_TCHAR *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT (": %s\n"),
+ ACE_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("\n")),
+ ACE_TEXT ("\n")),
0);
}
return this->symbol_;
@@ -490,7 +490,7 @@ ACE_Object_Node::symbol (ACE_Service_Object_Exterminator *)
ACE_Object_Node::~ACE_Object_Node (void)
{
ACE_TRACE ("ACE_Object_Node::~ACE_Object_Node");
- delete[] ACE_const_cast (ASYS_TCHAR *, this->object_name_);
+ delete[] ACE_const_cast (ACE_TCHAR *, this->object_name_);
}
ACE_ALLOC_HOOK_DEFINE(ACE_Function_Node)
@@ -501,8 +501,8 @@ ACE_Function_Node::dump (void) const
ACE_TRACE ("ACE_Function_Node::dump");
}
-ACE_Function_Node::ACE_Function_Node (const ASYS_TCHAR *path,
- const ASYS_TCHAR *func_name)
+ACE_Function_Node::ACE_Function_Node (const ACE_TCHAR *path,
+ const ACE_TCHAR *func_name)
: function_name_ (func_name ? ACE::strnew (func_name) : 0)
{
ACE_TRACE ("ACE_Function_Node::ACE_Function_Node");
@@ -522,7 +522,7 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
// Locate the factory function <function_name> in the shared
// object.
- ASYS_TCHAR *function_name = ACE_const_cast (ASYS_TCHAR *,
+ ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *,
this->function_name_);
// According to the new ANSI C++ specification, casting a void*
@@ -539,7 +539,7 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
long temp_ptr =
ACE_reinterpret_cast(long,
ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
- ASYS_ONLY_MULTIBYTE_STRING (function_name)));
+ function_name));
func = ACE_reinterpret_cast(void *(*)(ACE_Service_Object_Exterminator *),
temp_ptr);
@@ -552,19 +552,19 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
ace_yyerrno++;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dlsym failed for function %s\n"),
+ ACE_TEXT ("dlsym failed for function %s\n"),
function_name));
- ASYS_TCHAR *errmsg = ACE_OS::dlerror ();
+ ACE_TCHAR *errmsg = ACE_OS::dlerror ();
if (errmsg != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT (": %s\n"),
+ ACE_TEXT (": %s\n"),
errmsg),
0);
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("\n")),
+ ACE_TEXT ("\n")),
0);
}
}
@@ -575,7 +575,7 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
{
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
this->function_name_),
0);
}
@@ -586,7 +586,7 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
ACE_Function_Node::~ACE_Function_Node (void)
{
ACE_TRACE ("ACE_Function_Node::~ACE_Function_Node");
- delete[] ACE_const_cast (ASYS_TCHAR *, function_name_);
+ delete[] ACE_const_cast (ACE_TCHAR *, function_name_);
}
ACE_ALLOC_HOOK_DEFINE(ACE_Dummy_Node)
@@ -613,7 +613,7 @@ ACE_Dummy_Node::apply (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("did operations on stream %s, error = %d\n"),
+ ACE_TEXT ("did operations on stream %s, error = %d\n"),
this->name (),
ace_yyerrno));
}
@@ -637,7 +637,7 @@ ACE_Static_Function_Node::dump (void) const
ACE_TRACE ("ACE_Static_Function_Node::dump");
}
-ACE_Static_Function_Node::ACE_Static_Function_Node (const ASYS_TCHAR *func_name)
+ACE_Static_Function_Node::ACE_Static_Function_Node (const ACE_TCHAR *func_name)
: function_name_ (func_name ? ACE::strnew (func_name) : 0)
{
ACE_TRACE ("ACE_Static_Function_Node::ACE_Static_Function_Node");
@@ -657,7 +657,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
ACE_Static_Svc_Descriptor **ssdp = 0;
ACE_STATIC_SVCS &svcs = *ACE_Service_Config::static_svcs ();
- ASYS_TCHAR *function_name = ACE_const_cast (ASYS_TCHAR *, this->function_name_);
+ ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *, this->function_name_);
for (ACE_STATIC_SVCS_ITERATOR iter (svcs);
iter.next (ssdp) != 0;
@@ -678,7 +678,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("no static service registered for function %s\n"),
+ ACE_TEXT ("no static service registered for function %s\n"),
function_name),
0);
}
@@ -691,7 +691,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
{
ace_yyerrno++;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
this->function_name_),
0);
}
@@ -702,7 +702,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
ACE_Static_Function_Node::~ACE_Static_Function_Node (void)
{
ACE_TRACE ("ACE_Static_Function_Node::~ACE_Static_Function_Node");
- delete[] ACE_const_cast (ASYS_TCHAR *, this->function_name_);
+ delete[] ACE_const_cast (ACE_TCHAR *, this->function_name_);
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h
index 8e9c0867eb6..81678c46f40 100644
--- a/ace/Parse_Node.h
+++ b/ace/Parse_Node.h
@@ -31,14 +31,14 @@ class ACE_Export ACE_Parse_Node
// tree of Service Nodes.
public:
ACE_Parse_Node (void);
- ACE_Parse_Node (const ASYS_TCHAR *name);
+ ACE_Parse_Node (const ACE_TCHAR *name);
virtual ~ACE_Parse_Node (void);
ACE_Parse_Node *link (void) const;
void link (ACE_Parse_Node *);
virtual void apply (void) = 0;
- const ASYS_TCHAR *name (void) const;
+ const ACE_TCHAR *name (void) const;
void print (void) const;
void dump (void) const;
@@ -48,7 +48,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ASYS_TCHAR *name_;
+ const ACE_TCHAR *name_;
ACE_Parse_Node *next_;
};
@@ -57,7 +57,7 @@ class ACE_Export ACE_Suspend_Node : public ACE_Parse_Node
// = TITLE
// Suspend a Service Node.
public:
- ACE_Suspend_Node (const ASYS_TCHAR *name);
+ ACE_Suspend_Node (const ACE_TCHAR *name);
~ACE_Suspend_Node (void);
virtual void apply (void);
@@ -74,7 +74,7 @@ class ACE_Export ACE_Resume_Node : public ACE_Parse_Node
// = TITLE
// Resume a Service Node.
public:
- ACE_Resume_Node (const ASYS_TCHAR *name);
+ ACE_Resume_Node (const ACE_TCHAR *name);
~ACE_Resume_Node (void);
virtual void apply (void);
@@ -91,7 +91,7 @@ class ACE_Export ACE_Remove_Node : public ACE_Parse_Node
// = TITLE
// Remove a Service Node.
public:
- ACE_Remove_Node (const ASYS_TCHAR *name);
+ ACE_Remove_Node (const ACE_TCHAR *name);
~ACE_Remove_Node (void);
virtual void apply (void);
@@ -108,12 +108,12 @@ class ACE_Export ACE_Static_Node : public ACE_Parse_Node
// = TITLE
// Handle a statically linked node.
public:
- ACE_Static_Node (const ASYS_TCHAR *name, ASYS_TCHAR *params = 0);
+ ACE_Static_Node (const ACE_TCHAR *name, ACE_TCHAR *params = 0);
virtual ~ACE_Static_Node (void);
virtual void apply (void);
virtual const ACE_Service_Type *record (void) const;
- ASYS_TCHAR *parameters (void) const;
+ ACE_TCHAR *parameters (void) const;
void dump (void) const;
// Dump the state of an object.
@@ -122,7 +122,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- ASYS_TCHAR *parameters_;
+ ACE_TCHAR *parameters_;
// "Command-line" parameters.
};
@@ -131,7 +131,7 @@ class ACE_Export ACE_Dynamic_Node : public ACE_Static_Node
// = TITLE
// Handle a dynamically linked node.
public:
- ACE_Dynamic_Node (const ACE_Service_Type *, ASYS_TCHAR *params);
+ ACE_Dynamic_Node (const ACE_Service_Type *, ACE_TCHAR *params);
virtual ~ACE_Dynamic_Node (void);
virtual const ACE_Service_Type *record (void) const;
@@ -180,8 +180,8 @@ public:
virtual void set_symbol (void *h);
ACE_SHLIB_HANDLE handle (void) const;
void handle (const ACE_SHLIB_HANDLE h);
- const ASYS_TCHAR *pathname (void) const;
- void pathname (const ASYS_TCHAR *h);
+ const ACE_TCHAR *pathname (void) const;
+ void pathname (const ACE_TCHAR *h);
int dispose (void) const;
virtual ~ACE_Location_Node (void);
@@ -195,7 +195,7 @@ public:
protected:
ACE_SHLIB_HANDLE open_handle (void);
- const ASYS_TCHAR *pathname_;
+ const ACE_TCHAR *pathname_;
// Pathname to the shared library we are working on.
int must_delete_;
@@ -215,7 +215,7 @@ class ACE_Export ACE_Object_Node : public ACE_Location_Node
// = TITLE
// Keeps track of the symbol name for a shared object.
public:
- ACE_Object_Node (const ASYS_TCHAR *pathname, const ASYS_TCHAR *obj_name);
+ ACE_Object_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *obj_name);
virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
virtual ~ACE_Object_Node (void);
@@ -226,7 +226,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ASYS_TCHAR *object_name_;
+ const ACE_TCHAR *object_name_;
// Name of the object that we're parsing.
};
@@ -235,7 +235,7 @@ class ACE_Export ACE_Function_Node : public ACE_Location_Node
// = TITLE
// Keeps track of the symbol name of for a shared function.
public:
- ACE_Function_Node (const ASYS_TCHAR *pathname, const ASYS_TCHAR *func_name);
+ ACE_Function_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *func_name);
virtual void *symbol (ACE_Service_Object_Exterminator *gobbler = 0);
virtual ~ACE_Function_Node (void);
@@ -246,7 +246,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ASYS_TCHAR *function_name_;
+ const ACE_TCHAR *function_name_;
// Name of the function that we're parsing.
};
@@ -278,7 +278,7 @@ class ACE_Export ACE_Static_Function_Node : public ACE_Location_Node
// linked in from a DLL, but is statically linked with the
// application.
public:
- ACE_Static_Function_Node (const ASYS_TCHAR *func_name);
+ ACE_Static_Function_Node (const ACE_TCHAR *func_name);
virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
virtual ~ACE_Static_Function_Node (void);
@@ -289,7 +289,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ASYS_TCHAR *function_name_;
+ const ACE_TCHAR *function_name_;
// Name of the function that we're parsing.
};
diff --git a/ace/Pipe.cpp b/ace/Pipe.cpp
index 023577698a4..33c8f47ea6f 100644
--- a/ace/Pipe.cpp
+++ b/ace/Pipe.cpp
@@ -15,9 +15,9 @@ ACE_Pipe::dump (void) const
{
ACE_TRACE ("ACE_Pipe::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("handles_[0] = %d"), this->handles_[0]));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhandles_[1] = %d"), this->handles_[1]));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handles_[0] = %d"), this->handles_[0]));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhandles_[1] = %d"), this->handles_[1]));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -96,8 +96,8 @@ ACE_Pipe::open (int buffer_size)
ACE_UNUSED_ARG (buffer_size);
if (ACE_OS::pipe (this->handles_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("pipe")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("pipe")),
-1);
int arg = RMSGN;
@@ -110,16 +110,16 @@ ACE_Pipe::open (int buffer_size)
I_SRDOPT,
(void *) arg) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ioctl")), -1);
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ioctl")), -1);
#else /* ! ACE_WIN32 && ! ACE_LACKS_SOCKETPAIR && ! ACE_HAS_STREAM_PIPES */
if (ACE_OS::socketpair (AF_UNIX,
SOCK_STREAM,
0,
this->handles_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("socketpair")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("socketpair")),
-1);
# if defined (ACE_LACKS_SOCKET_BUFSIZ)
ACE_UNUSED_ARG (buffer_size);
@@ -178,7 +178,7 @@ ACE_Pipe::ACE_Pipe (ACE_HANDLE handles[2])
if (this->open (handles) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Pipe::ACE_Pipe")));
+ ACE_TEXT ("ACE_Pipe::ACE_Pipe")));
}
ACE_Pipe::ACE_Pipe (ACE_HANDLE read,
diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp
index 47ef40d6182..f3c28679192 100644
--- a/ace/Proactor.cpp
+++ b/ace/Proactor.cpp
@@ -139,8 +139,8 @@ ACE_Proactor_Timer_Handler::svc (void)
default:
// Error.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%N:%l:(%P | %t):%p\n"),
- ASYS_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
+ ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
+ ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
-1);
}
}
@@ -165,8 +165,8 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE &timer_queue,
if (this->proactor_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
- ASYS_TEXT (" no completion port to post timeout to?!@\n")),
+ ACE_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
+ ACE_TEXT (" no completion port to post timeout to?!@\n")),
-1);
// Create the Asynch_Timer.
@@ -178,16 +178,16 @@ ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE &timer_queue,
-1);
if (asynch_timer == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%N:%l:(%P | %t):%p\n"),
- ASYS_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
- ASYS_TEXT ("create_asynch_timer failed")),
+ ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
+ ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
+ ACE_TEXT ("create_asynch_timer failed")),
-1);
// Post a completion.
if (asynch_timer->post_completion (this->proactor_->implementation ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Failure in dealing with timers: ")
- ASYS_TEXT ("PostQueuedCompletionStatus failed\n")),
+ ACE_TEXT ("Failure in dealing with timers: ")
+ ACE_TEXT ("PostQueuedCompletionStatus failed\n")),
-1);
return 0;
}
@@ -226,8 +226,8 @@ ACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor &proactor)
}
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
- ASYS_TEXT (" to be used with ONE (and only one) Proactor\n")),
+ ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
+ ACE_TEXT (" to be used with ONE (and only one) Proactor\n")),
-1);
}
@@ -277,8 +277,8 @@ ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl *implementation,
// Activate <timer_handler>.
if (this->timer_handler_->activate (THR_NEW_LWP | THR_DETACHED) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%N:%l:(%P | %t):%p\n"),
- ASYS_TEXT ("Task::activate:could not create thread\n")));
+ ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
+ ACE_TEXT ("Task::activate:could not create thread\n")));
}
ACE_Proactor::~ACE_Proactor (void)
@@ -510,8 +510,8 @@ ACE_Proactor::close (void)
// Close the implementation.
if (this->implementation ()->close () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%N:%l:(%P | %t):%p\n"),
- ASYS_TEXT ("ACE_Proactor::close:implementation couldnt be closed")),
+ ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
+ ACE_TEXT ("ACE_Proactor::close:implementation couldnt be closed")),
-1);
// Delete the implementation.
diff --git a/ace/Process.cpp b/ace/Process.cpp
index 960d58d2d09..0d862577f15 100644
--- a/ace/Process.cpp
+++ b/ace/Process.cpp
@@ -49,16 +49,16 @@ ACE_Process::spawn (ACE_Process_Options &options)
return ACE_INVALID_PID;
BOOL fork_result =
- ::CreateProcess (0,
- options.command_line_buf (), // command-line options
- options.get_process_attributes (),
- options.get_thread_attributes (),
- options.handle_inheritence (),
- options.creation_flags (),
- options.env_buf (), // environment variables
- options.working_directory (),
- options.startup_info (),
- &this->process_info_);
+ ACE_TEXT_CreateProcess (0,
+ options.command_line_buf (),
+ options.get_process_attributes (),
+ options.get_thread_attributes (),
+ options.handle_inheritence (),
+ options.creation_flags (),
+ options.env_buf (), // environment variables
+ options.working_directory (),
+ options.startup_info (),
+ &this->process_info_);
if (fork_result) {
parent (this->getpid ());
@@ -121,8 +121,8 @@ ACE_Process::spawn (ACE_Process_Options &options)
&& ACE_OS::setpgid (0,
options.getgroup ()) < 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p.\n"),
- ASYS_TEXT ("ACE_Process::spawn: setpgid failed.")));
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("ACE_Process::spawn: setpgid failed.")));
#if !defined (ACE_LACKS_SETREUID)
// Set user and group id's.
@@ -131,8 +131,8 @@ ACE_Process::spawn (ACE_Process_Options &options)
if (ACE_OS::setreuid (options.getruid (),
options.geteuid ()) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p.\n"),
- ASYS_TEXT ("ACE_Process::spawn: setreuid failed.")));
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("ACE_Process::spawn: setreuid failed.")));
#endif /* ACE_LACKS_SETREUID */
#if !defined (ACE_LACKS_SETREGID)
@@ -141,8 +141,8 @@ ACE_Process::spawn (ACE_Process_Options &options)
if (ACE_OS::setregid (options.getrgid (),
options.getegid ()) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p.\n"),
- ASYS_TEXT ("ACE_Process::spawn: setregid failed.")));
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("ACE_Process::spawn: setregid failed.")));
#endif /* ACE_LACKS_SETREGID */
this->child (ACE_OS::getppid ());
@@ -370,15 +370,15 @@ ACE_Process_Options::ACE_Process_Options (int ie,
process_group_ (ACE_INVALID_PID)
{
ACE_NEW (command_line_buf_,
- TCHAR[cobl]);
+ ACE_TCHAR[cobl]);
command_line_buf_[0] = '\0';
#if !defined (ACE_HAS_WINCE)
working_directory_[0] = '\0';
ACE_NEW (environment_buf_,
- TCHAR[ebl]);
+ ACE_TCHAR[ebl]);
ACE_NEW (environment_argv_,
- LPTSTR[mea]);
+ ACE_TCHAR *[mea]);
environment_buf_[0] = '\0';
environment_argv_[0] = 0;
process_name_[0] = '\0';
@@ -404,7 +404,7 @@ ACE_Process_Options::inherit_environment (void)
environment_inherited_ = 1;
// Get the existing environment.
- LPTSTR existing_environment = ::GetEnvironmentStrings ();
+ ACE_TCHAR *existing_environment = ACE_TEXT_GetEnvironmentStrings ();
int slot = 0;
@@ -416,8 +416,8 @@ ACE_Process_Options::inherit_environment (void)
if (this->setenv_i (existing_environment + slot, len) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p.\n"),
- ASYS_TEXT ("ACE_Process_Options::ACE_Process_Options")));
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("ACE_Process_Options::ACE_Process_Options")));
break;
}
@@ -425,12 +425,12 @@ ACE_Process_Options::inherit_environment (void)
slot += len + 1;
}
- ::FreeEnvironmentStrings (existing_environment);
+ ACE_TEXT_FreeEnvironmentStrings (existing_environment);
}
#else /* defined ACE_WIN32 */
-char * const *
+ACE_TCHAR * const *
ACE_Process_Options::env_argv (void)
{
return environment_argv_;
@@ -439,7 +439,7 @@ ACE_Process_Options::env_argv (void)
#endif /* ACE_WIN32 */
int
-ACE_Process_Options::setenv (LPTSTR envp[])
+ACE_Process_Options::setenv (ACE_TCHAR *envp[])
{
int i = 0;
while (envp[i])
@@ -459,9 +459,9 @@ ACE_Process_Options::setenv (LPTSTR envp[])
}
int
-ACE_Process_Options::setenv (LPCTSTR format, ...)
+ACE_Process_Options::setenv (const ACE_TCHAR *format, ...)
{
- TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
+ ACE_TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
// Start varargs.
va_list argp;
@@ -488,10 +488,10 @@ ACE_Process_Options::setenv (LPCTSTR format, ...)
}
int
-ACE_Process_Options::setenv (LPCTSTR variable_name,
- LPCTSTR format, ...)
+ACE_Process_Options::setenv (const ACE_TCHAR *variable_name,
+ const ACE_TCHAR *format, ...)
{
- TCHAR newformat[DEFAULT_COMMAND_LINE_BUF_LEN];
+ ACE_TCHAR newformat[DEFAULT_COMMAND_LINE_BUF_LEN];
// Add in the variable name.
ACE_OS::sprintf (newformat,
@@ -499,7 +499,7 @@ ACE_Process_Options::setenv (LPCTSTR variable_name,
variable_name,
format);
- TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
+ ACE_TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
// Start varargs.
va_list argp;
@@ -525,7 +525,7 @@ ACE_Process_Options::setenv (LPCTSTR variable_name,
}
int
-ACE_Process_Options::setenv_i (LPTSTR assignment,
+ACE_Process_Options::setenv_i (ACE_TCHAR *assignment,
int len)
{
// Add one for the null char.
@@ -540,7 +540,7 @@ ACE_Process_Options::setenv_i (LPTSTR assignment,
// Copy the new environment string.
ACE_OS::memcpy (environment_buf_ + environment_buf_index_,
assignment,
- len * sizeof (TCHAR));
+ len * sizeof (ACE_TCHAR));
// Update the argv array.
environment_argv_[environment_argv_index_++] =
@@ -632,7 +632,7 @@ ACE_Process_Options::~ACE_Process_Options (void)
}
int
-ACE_Process_Options::command_line (LPCTSTR const argv[])
+ACE_Process_Options::command_line (const ACE_TCHAR *const argv[])
{
// @@ Factor out the code between this
int i = 0;
@@ -653,7 +653,7 @@ ACE_Process_Options::command_line (LPCTSTR const argv[])
}
int
-ACE_Process_Options::command_line (LPCTSTR format, ...)
+ACE_Process_Options::command_line (const ACE_TCHAR *format, ...)
{
// Store all ... args in argp.
va_list argp;
@@ -670,7 +670,7 @@ ACE_Process_Options::command_line (LPCTSTR format, ...)
return 0;
}
-LPTSTR
+ACE_TCHAR *
ACE_Process_Options::env_buf (void)
{
#if !defined (ACE_HAS_WINCE)
@@ -683,7 +683,7 @@ ACE_Process_Options::env_buf (void)
#endif /* !ACE_HAS_WINCE */
}
-LPTSTR const *
+ACE_TCHAR * const *
ACE_Process_Options::command_line_argv (void)
{
if (command_line_argv_calculated_ == 0)
diff --git a/ace/Process.h b/ace/Process.h
index d5d4325d4e1..5e848ec5441 100644
--- a/ace/Process.h
+++ b/ace/Process.h
@@ -90,13 +90,13 @@ public:
// sure to set the others to ACE_INVALID_HANDLE. Returns 0 on
// success, -1 on failure.
- int setenv (LPCTSTR format,
+ int setenv (const ACE_TCHAR *format,
...);
// <format> must be of the form "VARIABLE=VALUE". There can not be
// any spaces between VARIABLE and the equal sign.
- int setenv (LPCTSTR variable_name,
- LPCTSTR format,
+ int setenv (const ACE_TCHAR *variable_name,
+ const ACE_TCHAR *format,
...);
// Set a single environment variable, <variable_name>. Since
// different platforms separate each environment variable
@@ -105,14 +105,14 @@ public:
// ("FOO","one + two = %s", "three") will result in "FOO=one + two =
// three".
- int setenv (LPTSTR envp[]);
+ int setenv (ACE_TCHAR *envp[]);
// Same as above with argv format. <envp> must be null terminated.
- void working_directory (LPCTSTR wd);
+ void working_directory (const ACE_TCHAR *wd);
// Set the working directory for the process. strlen of <wd> must
// be <= MAXPATHLEN.
- int command_line (LPCTSTR format, ...);
+ int command_line (const ACE_TCHAR *format, ...);
// Set the command-line arguments. <format> can use any printf
// formats. The first token in <format> should be the path to the
// application. This can either be a full path, relative path, or
@@ -121,19 +121,19 @@ public:
// path to run a process, this method *must* be called! Returns 0
// on success, -1 on failure.
- int command_line (LPCTSTR const argv[]);
+ int command_line (const ACE_TCHAR * const argv[]);
// Same as above in argv format. <argv> must be null terminated.
// = Set/get the pathname used to name the process.
- void process_name (LPCTSTR name);
+ void process_name (const ACE_TCHAR *name);
// Specify the full path or relative path, or just the executable
// name for the process. If this is set, then <name> will be used to
// create the process instead of argv[0] set in the command
// line. This is here so that you can supply something other than
// executable name as argv[0].
- LPCTSTR process_name (void);
- // Return the process_name. If the <process_name(LPCTSTR name)> set
+ const ACE_TCHAR *process_name (void);
+ // Return the process_name. If the <process_name(name)> set
// method is not called, this method will return argv[0].
// = Set/get creation flags.
@@ -144,21 +144,21 @@ public:
// = <ACE_Process> uses these operations to retrieve option values.
- LPTSTR working_directory (void);
+ ACE_TCHAR *working_directory (void);
// Current working directory. Returns "" if nothing has been set.
- LPTSTR command_line_buf (void);
+ ACE_TCHAR *command_line_buf (void);
// Buffer of command-line options. Returns exactly what was passed
// to this->command_line.
- LPTSTR const *command_line_argv (void);
+ ACE_TCHAR * const *command_line_argv (void);
// argv-style command-line options. Parses and modifies the string
// created from <command_line_>. All spaces not in quotes ("" or
// '') are replaced with null (\0) bytes. An argv array is built
// and returned with each entry pointing to the start of
// null-terminated string. Returns { 0 } if nothing has been set.
- LPTSTR env_buf (void);
+ ACE_TCHAR *env_buf (void);
// Null-terminated buffer of null terminated strings. Each string
// is an environment assignment "VARIABLE=value". This buffer
// should end with two null characters.
@@ -172,7 +172,7 @@ public:
#if defined (ACE_WIN32)
// = Non-portable accessors for when you "just have to use them."
- STARTUPINFO *startup_info (void);
+ ACE_TEXT_STARTUPINFO *startup_info (void);
// Used for setting and getting.
LPSECURITY_ATTRIBUTES get_process_attributes (void) const;
@@ -197,7 +197,7 @@ public:
// Allows disabling of handle inheritence.
#else /* All things not WIN32 */
- char *const *env_argv (void);
+ ACE_TCHAR *const *env_argv (void);
// argv-style array of environment settings.
// = Accessors for the standard handles.
@@ -211,7 +211,7 @@ public:
// Get current value for avoid_zombies.
// = Set/get real & effective user & group id associated with user.
- int setreugid (const char* user);
+ int setreugid (const ACE_TCHAR* user);
void setruid (uid_t id);
void seteuid (uid_t id);
void setrgid (uid_t id);
@@ -224,7 +224,7 @@ public:
protected:
#if !defined (ACE_HAS_WINCE)
- int setenv_i (LPTSTR assignment, int len);
+ int setenv_i (ACE_TCHAR *assignment, int len);
// Add <assignment> to environment_buf_ and adjust
// environment_argv_. <len> is the strlen of <assignment>.
@@ -244,7 +244,7 @@ protected:
int environment_inherited_;
// Ensures once only call to inherit environment.
- STARTUPINFO startup_info_;
+ ACE_TEXT_STARTUPINFO startup_info_;
BOOL handle_inheritence_;
// Default TRUE.
@@ -287,13 +287,13 @@ protected:
int environment_argv_index_;
// Pointer to environment_argv_.
- LPTSTR environment_buf_;
+ ACE_TCHAR *environment_buf_;
// Pointer to buffer of the environment settings.
int environment_buf_len_;
// Size of the environment buffer. Configurable
- LPTSTR* environment_argv_;
+ ACE_TCHAR **environment_argv_;
// Pointers into environment_buf_.
int max_environment_args_;
@@ -302,23 +302,23 @@ protected:
int max_environ_argv_index_;
// Maximum index of environment_argv_ buffer
- TCHAR working_directory_[MAXPATHLEN + 1];
+ ACE_TCHAR working_directory_[MAXPATHLEN + 1];
// The current working directory.
#endif /* !ACE_HAS_WINCE */
int command_line_argv_calculated_;
// Ensures command_line_argv is only calculated once.
- LPTSTR command_line_buf_;
+ ACE_TCHAR *command_line_buf_;
// Pointer to buffer of command-line arguments. E.g., "-f foo -b bar".
- LPTSTR command_line_argv_[MAX_COMMAND_LINE_OPTIONS];
+ ACE_TCHAR *command_line_argv_[MAX_COMMAND_LINE_OPTIONS];
// Argv-style command-line arguments.
pid_t process_group_;
// Process-group on Unix; unused on Win32.
- TCHAR process_name_[MAXPATHLEN + 1];
+ ACE_TCHAR process_name_[MAXPATHLEN + 1];
// Pathname for the process. Relative path or absolute path or just
// the program name.
};
diff --git a/ace/Process.i b/ace/Process.i
index 5948847109c..c4208b73298 100644
--- a/ace/Process.i
+++ b/ace/Process.i
@@ -101,7 +101,7 @@ ACE_Process_Options::setgroup (pid_t pgrp)
#if defined (ACE_WIN32)
-ACE_INLINE STARTUPINFO *
+ACE_INLINE ACE_TEXT_STARTUPINFO *
ACE_Process_Options::startup_info (void)
{
#if !defined (ACE_HAS_WINCE)
@@ -276,13 +276,13 @@ ACE_Process_Options::getegid (void)
}
#endif /* ACE_WIN32 */
-ACE_INLINE LPTSTR
+ACE_INLINE ACE_TCHAR *
ACE_Process_Options::command_line_buf (void)
{
return command_line_buf_;
}
-ACE_INLINE LPTSTR
+ACE_INLINE ACE_TCHAR *
ACE_Process_Options::working_directory (void)
{
#if !defined (ACE_HAS_WINCE)
@@ -296,7 +296,7 @@ ACE_Process_Options::working_directory (void)
}
ACE_INLINE void
-ACE_Process_Options::working_directory (LPCTSTR wd)
+ACE_Process_Options::working_directory (const ACE_TCHAR *wd)
{
#if !defined(ACE_HAS_WINCE)
ACE_OS::strcpy (working_directory_, wd);
@@ -306,12 +306,12 @@ ACE_Process_Options::working_directory (LPCTSTR wd)
}
ACE_INLINE void
-ACE_Process_Options::process_name (LPCTSTR p)
+ACE_Process_Options::process_name (const ACE_TCHAR *p)
{
ACE_OS::strcpy (this->process_name_, p);
}
-ACE_INLINE LPCTSTR
+ACE_INLINE const ACE_TCHAR *
ACE_Process_Options::process_name (void)
{
if (process_name_[0] == '\0')
@@ -325,21 +325,21 @@ ACE_Process_Options::process_name (void)
// under CE. They are not empty on most other platforms.
ACE_INLINE int
-ACE_Process_Options::setenv (LPTSTR envp[])
+ACE_Process_Options::setenv (ACE_TCHAR *envp[])
{
ACE_UNUSED_ARG (envp);
return -1;
}
ACE_INLINE int
-ACE_Process_Options::setenv (LPCTSTR format, ...)
+ACE_Process_Options::setenv (const ACE_TCHAR *format, ...)
{
return -1;
}
ACE_INLINE int
-ACE_Process_Options::setenv (LPCTSTR variable_name,
- LPCTSTR format,
+ACE_Process_Options::setenv (const ACE_TCHAR *variable_name,
+ const ACE_TCHAR *format,
...)
{
return -1;
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp
index 5c78aef42e0..acfbb3b38a2 100644
--- a/ace/Process_Manager.cpp
+++ b/ace/Process_Manager.cpp
@@ -67,7 +67,7 @@ ACE_Process_Descriptor::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nproc_id_ = %d"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nproc_id_ = %d"),
this->process_->getpid( )));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -80,8 +80,8 @@ ACE_Process_Manager::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmax_process_table_size_ = %d"), this->max_process_table_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncurrent_count_ = %d"), this->current_count_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmax_process_table_size_ = %d"), this->max_process_table_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_count_ = %d"), this->current_count_));
for (size_t i = 0; i < this->current_count_; i++)
this->process_table_[i].dump ();
@@ -173,9 +173,9 @@ ACE_Process_Manager::open (size_t size,
// for them.
if (ACE_OS::setpgid (0, 0) == -1)
ACE_ERROR ((LM_WARNING,
- ASYS_TEXT ("%p.\n"),
- ASYS_TEXT ("ACE_Process_Manager::open: can't create a ")
- ASYS_TEXT ("process group; some wait functions may fail")));
+ ACE_TEXT ("%p.\n"),
+ ACE_TEXT ("ACE_Process_Manager::open: can't create a ")
+ ACE_TEXT ("process group; some wait functions may fail")));
#endif /* ACE_LACKS_SETPGID */
if (r)
@@ -242,8 +242,8 @@ ACE_Process_Manager::ACE_Process_Manager (size_t size,
if (this->open (size,
r) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Process_Manager")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Process_Manager")));
}
// Close up and release all resources.
@@ -353,15 +353,15 @@ ACE_Process_Manager::handle_signal (int,
}
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Process still active")
- ASYS_TEXT (" -- shouldn't have been called yet!\n")),
+ ACE_TEXT ("Process still active")
+ ACE_TEXT (" -- shouldn't have been called yet!\n")),
0); // return 0 : stay registered
}
else
{
// <GetExitCodeProcess> failed.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("GetExitCodeProcess failed")),
+ ACE_TEXT ("GetExitCodeProcess failed")),
-1); // return -1: unregister
}
#else /* !ACE_WIN32 */
@@ -818,8 +818,8 @@ ACE_Process_Manager::wait (pid_t pid,
// we're holding a lock!
delete [] handles;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Process removed")
- ASYS_TEXT (" -- somebody's ignoring the lock!\n")),
+ ACE_TEXT ("Process removed")
+ ACE_TEXT (" -- somebody's ignoring the lock!\n")),
-1);
}
}
@@ -880,7 +880,7 @@ ACE_Process_Manager::wait (pid_t pid,
{
// oops, reaped an unmanaged process!
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%P|%t) oops, reaped unmanaged %d\n"),
+ ACE_TEXT ("(%P|%t) oops, reaped unmanaged %d\n"),
pid));
return pid;
}
@@ -944,8 +944,8 @@ ACE_Process_Manager::notify_proc_handler (size_t i,
else
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%P:%t|%T) ACE_Process_Manager::notify_proc_handler:"),
- ASYS_TEXT (" unknown/unmanaged process reaped\n")));
+ ACE_TEXT ("(%P:%t|%T) ACE_Process_Manager::notify_proc_handler:"),
+ ACE_TEXT (" unknown/unmanaged process reaped\n")));
return 0;
}
}
diff --git a/ace/QoS_Manager.cpp b/ace/QoS_Manager.cpp
index f240e676a30..0928c76842d 100644
--- a/ace/QoS_Manager.cpp
+++ b/ace/QoS_Manager.cpp
@@ -21,8 +21,8 @@ ACE_QoS_Manager::join_qos_session (ACE_QoS_Session *qos_session)
{
if (this->qos_session_set ().insert (qos_session) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in adding a new session to the "
- "socket session set\n"),
+ ACE_TEXT ("Error in adding a new session to the ")
+ ACE_TEXT ("socket session set\n")),
-1);
return 0;
}
diff --git a/ace/QoS_Session_Factory.cpp b/ace/QoS_Session_Factory.cpp
index 501833b77e5..4913b800050 100644
--- a/ace/QoS_Session_Factory.cpp
+++ b/ace/QoS_Session_Factory.cpp
@@ -41,7 +41,7 @@ ACE_QoS_Session_Factory::create_session (ACE_QoS_Session_Type qos_session_type)
{
delete qos_session;
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in adding session\n"),
+ ACE_TEXT ("Error in adding session\n")),
0);
}
@@ -55,7 +55,7 @@ ACE_QoS_Session_Factory::destroy_session (ACE_QoS_Session *qos_session)
if ((qos_session != 0) && (this->remove_session (qos_session) == -1))
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in destroying session\n"),
+ ACE_TEXT ("Error in destroying session\n")),
-1);
return 0;
@@ -68,20 +68,22 @@ ACE_QoS_Session_Factory::add_session (ACE_QoS_Session *qos_session)
{
if (this->qos_session_set_.insert (qos_session) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in adding a new session to the session set\n"),
+ ACE_TEXT ("Error in adding a new session")
+ ACE_TEXT ("to the session set\n")),
-1);
return 0;
}
-// Remove a session from the set of sessions created by this factory. This is a
-// private method called by the destroy_session ().
+// Remove a session from the set of sessions created by this factory. This is
+// a private method called by the destroy_session ().
int
ACE_QoS_Session_Factory::remove_session (ACE_QoS_Session *qos_session)
{
if (this->qos_session_set_.remove (qos_session) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in removing a session from the session set\n"),
+ ACE_TEXT ("Error in removing a session")
+ ACE_TEXT ("from the session set\n")),
-1);
return 0;
diff --git a/ace/QoS_Session_Impl.cpp b/ace/QoS_Session_Impl.cpp
index cd4bbbe8c64..849c16b6cc4 100644
--- a/ace/QoS_Session_Impl.cpp
+++ b/ace/QoS_Session_Impl.cpp
@@ -506,8 +506,8 @@ ACE_GQoS_Session::qos (ACE_SOCK *socket,
if (qos_manager->qos_session_set ().find (this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "This QoS session was not subscribed to"
- " by the socket\n"),
+ ACE_TEXT ("This QoS session was not subscribed to")
+ ACE_TEXT (" by the socket\n")),
-1);
// Set the QOS according to the supplied ACE_QoS. The I/O control
@@ -521,12 +521,12 @@ ACE_GQoS_Session::qos (ACE_SOCK *socket,
qos,
&ret_bytes) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "Error in Qos set ACE_OS::ioctl() %d\n",
+ ACE_TEXT ("Error in Qos set ACE_OS::ioctl() %d\n"),
ret_bytes),
-1);
else
ACE_DEBUG ((LM_DEBUG,
- "Setting QoS with ACE_OS::ioctl () succeeds \n"));
+ ACE_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds \n")));
return 0;
}
diff --git a/ace/RB_Tree.cpp b/ace/RB_Tree.cpp
index 96a895de393..7a95a277662 100644
--- a/ace/RB_Tree.cpp
+++ b/ace/RB_Tree.cpp
@@ -58,7 +58,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (ACE_Allocator
"ACE_RB_Tree (ACE_Allocator *alloc)");
if (this->open (alloc) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_RB_Tree::ACE_RB_Tree\n")));
+ ACE_TEXT ("ACE_RB_Tree::ACE_RB_Tree\n")));
}
// Copy constructor.
@@ -138,14 +138,14 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_right (ACE_RB_Tre
if (! x)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nerror: x is a null pointer in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nerror: x is a null pointer in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
else if (! (x->left()))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nerror: x->left () is a null pointer in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nerror: x->left () is a null pointer in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
else
{
ACE_RB_Tree_Node<EXT_ID, INT_ID> * y;
@@ -177,14 +177,14 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_left (ACE_RB_Tree
if (! x)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nerror: x is a null pointer in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nerror: x is a null pointer in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
else if (! (x->right()))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nerror: x->right () is a null pointer ")
- ASYS_TEXT ("in ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nerror: x->right () is a null pointer ")
+ ACE_TEXT ("in ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
else
{
ACE_RB_Tree_Node<EXT_ID, INT_ID> * y;
@@ -383,9 +383,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rebalance (ACE_RB_Tree_N
{
// If we got here, something is drastically wrong!
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nerror: parent's parent is null in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rebalance\n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nerror: parent's parent is null in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rebalance\n")));
return;
}
@@ -581,9 +581,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
if (current->right ())
// If there is already a right subtree, complain.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nright subtree already present in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nright subtree already present in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
0);
else
{
@@ -613,9 +613,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
if (current->left ())
// If there is already a left subtree, complain.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nleft subtree already present in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nleft subtree already present in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
0);
else
{
@@ -692,9 +692,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
{
// If there is already a right subtree, complain.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nright subtree already present in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nright subtree already present in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
-1);
}
else
@@ -724,9 +724,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
if (current->left ())
// If there is already a left subtree, complain.
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("\nleft subtree already present in ")
- ASYS_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("\nleft subtree already present in ")
+ ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
-1);
else
{
diff --git a/ace/RB_Tree.i b/ace/RB_Tree.i
index 02e93543d81..23014a4ffc3 100644
--- a/ace/RB_Tree.i
+++ b/ace/RB_Tree.i
@@ -584,7 +584,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
{
ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncurrent_size_ = %d"), this->current_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_size_ = %d"), this->current_size_));
this->allocator_->dump ();
this->lock_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -827,7 +827,7 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump_i (void)
ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump_i");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("node_ = %x"), this->node_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("node_ = %x"), this->node_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/README b/ace/README
index ee6ca5aa0ef..11e2296c691 100644
--- a/ace/README
+++ b/ace/README
@@ -137,7 +137,6 @@ ACE_HAS_RUSAGE_WHO_ENUM Platform has enum instead of
definition, e.g., enum
__rusage_who, for Linux glibc
2.0.
-ACE_HAS_TEXT_MACRO_CONFLICT Platform also has __TEXT defined.
ACE_HAS_SEND_TIMEDWAIT
ACE_HAS_SENDTO_TIMEDWAIT
ACE_HAS_SENDMSG_TIMEDWAIT
@@ -459,9 +458,6 @@ ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse
ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant
functions (i.e., all the POSIX
*_r functions).
-ACE_HAS_WCHAR_TYPEDEFS_CHAR Compiler typedefs wchar with char.
-ACE_HAS_WCHAR_TYPEDEFS_USHORT Compiler typedefs wchar with ushort.
- char.
ACE_HAS_XPG4_MULTIBYTE_CHAR Platform has support for
multi-byte character support
compliant with the XPG4
@@ -624,11 +620,6 @@ ACE_HAS_UNION_WAIT The wait() system call takes a
ACE_HAS_UNIXWARE_SVR4_SIGNAL_T Has inconsistent SVR4 signal
stuff, but not the same as the
other platforms
-ACE_HAS_UNICODE Platform/compiler supports
- UNICODE
-ACE_HAS_MOSTLY_UNICODE_APIS Most APIs in platform/compiler
- supports UNICODE. (No char
- version available.)
ACE_HAS_USING_KEYWORD Compiler supports the new
using keyword for C++
namespaces.
@@ -837,6 +828,8 @@ ACE_LACKS_NATIVE_STRPTIME Platform/compiler lacks the strptime()
function.
ACE_LACKS_STRRCHR Platform/compiler lacks
strrchr () function.
+ACE_LACKS_WCSRCHR Platform/compiler lacks wcsrchr ()
+ function
ACE_LACKS_SYS_NERR Platforms/compiler lacks the
sys_nerr variable (e.g.,
VxWorks and MVS).
diff --git a/ace/Read_Buffer.cpp b/ace/Read_Buffer.cpp
index cf02ce118c6..1c599c31404 100644
--- a/ace/Read_Buffer.cpp
+++ b/ace/Read_Buffer.cpp
@@ -14,10 +14,10 @@ ACE_Read_Buffer::dump (void) const
{
ACE_TRACE ("ACE_Read_Buffer::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("size_ = %d"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\noccurrences_ = %d"), this->occurrences_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nstream_ = %x"), this->stream_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nallocator_ = %x"), this->allocator_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("size_ = %d"), this->size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\noccurrences_ = %d"), this->occurrences_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nstream_ = %x"), this->stream_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nallocator_ = %x"), this->allocator_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -36,7 +36,7 @@ ACE_Read_Buffer::ACE_Read_Buffer (FILE *fp,
ACE_Read_Buffer::ACE_Read_Buffer (ACE_HANDLE handle,
int close_on_delete,
ACE_Allocator *alloc)
- : stream_ (ACE_OS::fdopen (handle, "r")),
+ : stream_ (ACE_OS::fdopen (handle, ACE_TEXT ("r"))),
close_on_delete_ (close_on_delete),
allocator_ (alloc)
{
diff --git a/ace/Registry.cpp b/ace/Registry.cpp
index 31c2816e34f..aa8e79ec7e7 100644
--- a/ace/Registry.cpp
+++ b/ace/Registry.cpp
@@ -22,7 +22,7 @@ ACE_RCSID(ace, Registry, "$Id$")
// Separator for components in a name
/* static */
-LPCTSTR ACE_Registry::STRING_SEPARATOR = ACE_TEXT ("\\");
+const ACE_TCHAR *ACE_Registry::STRING_SEPARATOR = ACE_TEXT ("\\");
int
ACE_Registry::Name_Component::operator== (const Name_Component &rhs) const
@@ -49,7 +49,7 @@ ACE_Registry::Binding::Binding ()
// Binding constructor
// (Name version)
ACE_Registry::Binding::Binding (const Name &name,
- Binding_Type type)
+ Binding_Type type)
: name_ (ACE_Registry::make_string (name)),
type_ (type)
{
@@ -58,8 +58,8 @@ ACE_Registry::Binding::Binding (const Name &name,
// Binding constructor
// (String version)
-ACE_Registry::Binding::Binding (const Istring &name,
- Binding_Type type)
+ACE_Registry::Binding::Binding (const ACE_TString &name,
+ Binding_Type type)
: name_ (name),
type_ (type)
{
@@ -92,7 +92,7 @@ ACE_Registry::Binding::name (Name &name)
// Name accessors
// (String version)
void
-ACE_Registry::Binding::name (Istring &name)
+ACE_Registry::Binding::name (ACE_TString &name)
{
name = this->name_;
}
@@ -100,7 +100,7 @@ ACE_Registry::Binding::name (Istring &name)
// Name accessors
// (String version)
-ACE_Registry::Istring
+ACE_TString
ACE_Registry::Binding::name (void)
{
return this->name_;
@@ -117,8 +117,8 @@ ACE_Registry::Binding::type (void)
// Simple object constructor
ACE_Registry::Object::Object (void *data,
- u_long size,
- u_long type)
+ u_long size,
+ u_long type)
: data_ (data),
size_ (size),
type_ (type)
@@ -200,10 +200,10 @@ ACE_Registry::Naming_Context::Naming_Context (const Naming_Context &rhs)
const ACE_Registry::Naming_Context &
ACE_Registry::Naming_Context::operator= (const Naming_Context &rhs)
{
- ACE_UNUSED_ARG(rhs);
+ ACE_UNUSED_ARG(rhs);
- // Not implemented
- return *this;
+ // Not implemented
+ return *this;
}
@@ -218,7 +218,7 @@ ACE_Registry::Naming_Context::~Naming_Context ()
// (Name version)
int
ACE_Registry::Naming_Context::bind_new (const Name &name,
- const Object &object)
+ const Object &object)
{
return this->bind_new (ACE_Registry::make_string (name), object);
}
@@ -227,8 +227,8 @@ ACE_Registry::Naming_Context::bind_new (const Name &name,
// Insert <object> with <name> into <this> context
// (String version)
int
-ACE_Registry::Naming_Context::bind_new (const Istring &name,
- const Object &object)
+ACE_Registry::Naming_Context::bind_new (const ACE_TString &name,
+ const Object &object)
{
// temporary object
Object temp;
@@ -247,7 +247,7 @@ ACE_Registry::Naming_Context::bind_new (const Istring &name,
// (Name version)
int
ACE_Registry::Naming_Context::bind (const Name &name,
- const Object &object)
+ const Object &object)
{
return this->bind (ACE_Registry::make_string (name), object);
}
@@ -256,15 +256,15 @@ ACE_Registry::Naming_Context::bind (const Name &name,
// Insert or update <object> with <name> into <this> context
// (String version)
int
-ACE_Registry::Naming_Context::bind (const Istring &name,
- const Object &object)
-{
- long result = ::RegSetValueEx (this->key_,
- name.c_str (),
- 0,
- object.type (),
- (const BYTE *) object.data (),
- object.size ());
+ACE_Registry::Naming_Context::bind (const ACE_TString &name,
+ const Object &object)
+{
+ long result = ACE_TEXT_RegSetValueEx (this->key_,
+ name.c_str (),
+ 0,
+ object.type (),
+ (const BYTE *) object.data (),
+ object.size ());
ACE_REGISTRY_CALL_RETURN (result);
}
@@ -273,7 +273,7 @@ ACE_Registry::Naming_Context::bind (const Istring &name,
// (Name version)
int
ACE_Registry::Naming_Context::rebind (const Name &name,
- const Object &new_object)
+ const Object &new_object)
{
return this->rebind (ACE_Registry::make_string (name), new_object);
}
@@ -282,8 +282,8 @@ ACE_Registry::Naming_Context::rebind (const Name &name,
// Update <object> with <name> in <this> context
// (String version)
int
-ACE_Registry::Naming_Context::rebind (const Istring &name,
- const Object &new_object)
+ACE_Registry::Naming_Context::rebind (const ACE_TString &name,
+ const Object &new_object)
{
Object old_object;
// find the old one first
@@ -299,7 +299,7 @@ ACE_Registry::Naming_Context::rebind (const Istring &name,
// (Name version)
int
ACE_Registry::Naming_Context::resolve (const Name &name,
- Object &object)
+ Object &object)
{
return this->resolve (ACE_Registry::make_string (name), object);
}
@@ -308,20 +308,20 @@ ACE_Registry::Naming_Context::resolve (const Name &name,
// Find <object> with <name> in <this> context
// (String version)
int
-ACE_Registry::Naming_Context::resolve (const Istring &name,
- Object &object)
+ACE_Registry::Naming_Context::resolve (const ACE_TString &name,
+ Object &object)
{
// Get object state
u_long type;
void *data = object.data ();
u_long size = object.size ();
- long result = ::RegQueryValueEx (this->key_,
- name.c_str (),
- 0,
- &type,
- (BYTE *)data,
- &size);
+ long result = ACE_TEXT_RegQueryValueEx (this->key_,
+ name.c_str (),
+ 0,
+ &type,
+ (BYTE *)data,
+ &size);
if (result == ERROR_SUCCESS)
{
// Reset object state
@@ -346,10 +346,10 @@ ACE_Registry::Naming_Context::unbind (const Name &name)
// Remove object with <name> in <this> context
// (String version)
int
-ACE_Registry::Naming_Context::unbind (const Istring &name)
+ACE_Registry::Naming_Context::unbind (const ACE_TString &name)
{
- long result = ::RegDeleteValue (this->key_,
- name.c_str ());
+ long result = ACE_TEXT_RegDeleteValue (this->key_,
+ name.c_str ());
ACE_REGISTRY_CALL_RETURN (result);
}
@@ -369,61 +369,61 @@ ACE_Registry::Naming_Context::new_context (Naming_Context &naming_context)
// (Name version)
int
ACE_Registry::Naming_Context::bind_new_context (const Name &name,
- Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
+ Naming_Context &naming_context,
+ u_long persistence,
+ u_long security_access,
+ LPSECURITY_ATTRIBUTES security_attributes)
{
return this->bind_new_context (ACE_Registry::make_string (name),
- naming_context,
- persistence,
- security_access,
- security_attributes);
+ naming_context,
+ persistence,
+ security_access,
+ security_attributes);
}
// Insert <naming_context> with <name> relative to <this> context
// (String version)
int
-ACE_Registry::Naming_Context::bind_new_context (const Istring &name,
- Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
+ACE_Registry::Naming_Context::bind_new_context (const ACE_TString &name,
+ Naming_Context &naming_context,
+ u_long persistence,
+ u_long security_access,
+ LPSECURITY_ATTRIBUTES security_attributes)
{
u_long reason;
- long result = ::RegCreateKeyEx (this->key_,
- name.c_str (),
- 0,
- 0,
- persistence,
- security_access,
- security_attributes,
- &naming_context.key_,
- &reason);
+ long result = ACE_TEXT_RegCreateKeyEx (this->key_,
+ name.c_str (),
+ 0,
+ 0,
+ persistence,
+ security_access,
+ security_attributes,
+ &naming_context.key_,
+ &reason);
if (result == ERROR_SUCCESS)
// If create succeeds
{
if (reason == REG_CREATED_NEW_KEY)
- // If new key: success
- {
- // Set the correct parent
- naming_context.parent (this->key_);
- // Set the correct name
- naming_context.name (name);
- }
+ // If new key: success
+ {
+ // Set the correct parent
+ naming_context.parent (this->key_);
+ // Set the correct name
+ naming_context.name (name);
+ }
else
- // reason == REG_OPENED_EXISTING_KEY
- // Failed to make new key
- {
- // reset result to failure
- result = -1;
- // Close the key first
- ::RegCloseKey (naming_context.key_);
- // Reset key
- naming_context.key_ = (HKEY) 0;
- }
+ // reason == REG_OPENED_EXISTING_KEY
+ // Failed to make new key
+ {
+ // reset result to failure
+ result = -1;
+ // Close the key first
+ ::RegCloseKey (naming_context.key_);
+ // Reset key
+ naming_context.key_ = (HKEY) 0;
+ }
}
ACE_REGISTRY_CALL_RETURN (result);
@@ -434,39 +434,39 @@ ACE_Registry::Naming_Context::bind_new_context (const Istring &name,
// (Name version)
int
ACE_Registry::Naming_Context::bind_context (const Name &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
+ /* const */ Naming_Context &naming_context,
+ u_long persistence,
+ u_long security_access,
+ LPSECURITY_ATTRIBUTES security_attributes)
{
return this->bind_context (ACE_Registry::make_string (name),
- naming_context,
- persistence,
- security_access,
- security_attributes);
+ naming_context,
+ persistence,
+ security_access,
+ security_attributes);
}
// Insert or update <naming_context> with <name> relative to <this> context
// (String version)
int
-ACE_Registry::Naming_Context::bind_context (const Istring &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
+ACE_Registry::Naming_Context::bind_context (const ACE_TString &name,
+ /* const */ Naming_Context &naming_context,
+ u_long persistence,
+ u_long security_access,
+ LPSECURITY_ATTRIBUTES security_attributes)
{
u_long reason;
- long result = ::RegCreateKeyEx (this->key_,
- name.c_str (),
- 0,
- 0,
- persistence,
- security_access,
- security_attributes,
- &naming_context.key_,
- &reason);
+ long result = ACE_TEXT_RegCreateKeyEx (this->key_,
+ name.c_str (),
+ 0,
+ 0,
+ persistence,
+ security_access,
+ security_attributes,
+ &naming_context.key_,
+ &reason);
if (result == ERROR_SUCCESS)
{
// Set the correct parent
@@ -483,34 +483,34 @@ ACE_Registry::Naming_Context::bind_context (const Istring &name,
// (Name version)
int
ACE_Registry::Naming_Context::rebind_context (const Name &name,
- /* const */ Naming_Context &new_naming_context)
+ /* const */ Naming_Context &new_naming_context)
{
return this->rebind_context (ACE_Registry::make_string (name),
- new_naming_context);
+ new_naming_context);
}
// Rename <naming_context> to <name>
// (String version)
int
-ACE_Registry::Naming_Context::rebind_context (const Istring &name,
- /* const */ Naming_Context &new_naming_context)
+ACE_Registry::Naming_Context::rebind_context (const ACE_TString &name,
+ /* const */ Naming_Context &new_naming_context)
{
Naming_Context old_naming_context;
// find the old one first
long result = this->resolve_context (name,
- old_naming_context);
+ old_naming_context);
if (result == 0)
{
// naming_context is found: delete entry
result = this->unbind_context (name);
if (result == 0)
- {
- // successful deletion; rebind
- // beware of race conditions here
- // (lets resolve this later)
- result = this->bind_new_context (name, new_naming_context);
- }
+ {
+ // successful deletion; rebind
+ // beware of race conditions here
+ // (lets resolve this later)
+ result = this->bind_new_context (name, new_naming_context);
+ }
}
return result;
}
@@ -528,10 +528,10 @@ ACE_Registry::Naming_Context::unbind_context (const Name &name)
// Remove naming_context with <name> from <this> context
// (String version)
int
-ACE_Registry::Naming_Context::unbind_context (const Istring &name)
+ACE_Registry::Naming_Context::unbind_context (const ACE_TString &name)
{
- long result = ::RegDeleteKey (this->key_,
- name.c_str ());
+ long result = ACE_TEXT_RegDeleteKey (this->key_,
+ name.c_str ());
ACE_REGISTRY_CALL_RETURN (result);
}
@@ -541,27 +541,27 @@ ACE_Registry::Naming_Context::unbind_context (const Istring &name)
// (Name version)
int
ACE_Registry::Naming_Context::resolve_context (const Name &name,
- Naming_Context &naming_context,
- u_long security_access)
+ Naming_Context &naming_context,
+ u_long security_access)
{
return this->resolve_context (ACE_Registry::make_string (name),
- naming_context,
- security_access);
+ naming_context,
+ security_access);
}
// Find <naming_context> with <name> in <this> context
// (String version)
int
-ACE_Registry::Naming_Context::resolve_context (const Istring &name,
- Naming_Context &naming_context,
- u_long security_access)
-{
- long result = ::RegOpenKeyEx (this->key_,
- name.c_str (),
- 0,
- security_access,
- &naming_context.key_);
+ACE_Registry::Naming_Context::resolve_context (const ACE_TString &name,
+ Naming_Context &naming_context,
+ u_long security_access)
+{
+ long result = ACE_TEXT_RegOpenKeyEx (this->key_,
+ name.c_str (),
+ 0,
+ security_access,
+ &naming_context.key_);
if (result == ERROR_SUCCESS)
{
// set the correct parent
@@ -579,8 +579,8 @@ int
ACE_Registry::Naming_Context::destroy (void)
{
// hopefully the parent_key_ is still open
- long result = ::RegDeleteKey (this->parent_key_,
- this->name_.c_str ());
+ long result = ACE_TEXT_RegDeleteKey (this->parent_key_,
+ this->name_.c_str ());
ACE_REGISTRY_CALL_RETURN (result);
}
@@ -605,10 +605,10 @@ ACE_Registry::Naming_Context::close (void)
// Convert a <name> to a <string>
-ACE_Registry::Istring
+ACE_TString
ACE_Registry::make_string (const Name &const_name)
{
- Istring string;
+ ACE_TString string;
Name &name = ACE_const_cast (Name &, const_name);
// Iterator through the components of name
@@ -617,8 +617,8 @@ ACE_Registry::make_string (const Name &const_name)
iterator++)
{
if (iterator != name.begin ())
- // If this is not the first component, we will add separators
- string += ACE_Registry::STRING_SEPARATOR;
+ // If this is not the first component, we will add separators
+ string += ACE_Registry::STRING_SEPARATOR;
const Name_Component &component = *iterator;
// Add to string
string += component.id_;
@@ -630,32 +630,32 @@ ACE_Registry::make_string (const Name &const_name)
// Convert a <string> to a <name>
ACE_Registry::Name
-ACE_Registry::make_name (const Istring &string)
+ACE_Registry::make_name (const ACE_TString &string)
{
int new_position = 0;
int last_position = 0;
Name name;
// Rememeber: NPOS is -1
- while (new_position != Istring::npos)
+ while (new_position != ACE_TString::npos)
{
Name_Component component;
// Find the separator
new_position = string.find (ACE_Registry::STRING_SEPARATOR, new_position);
- if (new_position != Istring::npos)
- // If we have not gone past the end
- {
- // Get the substring
- component.id_ = string.substr (last_position,
- new_position - last_position);
- // Skip past the seperator
- new_position += ACE_OS::strlen (ACE_Registry::STRING_SEPARATOR);
- }
+ if (new_position != ACE_TString::npos)
+ // If we have not gone past the end
+ {
+ // Get the substring
+ component.id_ = string.substr (last_position,
+ new_position - last_position);
+ // Skip past the seperator
+ new_position += ACE_OS::strlen (ACE_Registry::STRING_SEPARATOR);
+ }
else
- {
- // Get the last substring
- component.id_ = string.substr (last_position);
- }
+ {
+ // Get the last substring
+ component.id_ = string.substr (last_position);
+ }
// Update positions
last_position = new_position;
// Insert component into name
@@ -719,7 +719,7 @@ ACE_Registry::Naming_Context::name (Name &name)
// Set name
// (String version)
void
-ACE_Registry::Naming_Context::name (const Istring &name)
+ACE_Registry::Naming_Context::name (const ACE_TString &name)
{
this->name_ = name;
}
@@ -727,7 +727,7 @@ ACE_Registry::Naming_Context::name (const Istring &name)
// Get name
// (String version)
-ACE_Registry::Istring
+ACE_TString
ACE_Registry::Naming_Context::name (void)
{
return this->name_;
@@ -737,7 +737,7 @@ ACE_Registry::Naming_Context::name (void)
// Get name
// (String version)
void
-ACE_Registry::Naming_Context::name (Istring &name)
+ACE_Registry::Naming_Context::name (ACE_TString &name)
{
name = this->name_;
}
@@ -749,8 +749,8 @@ ACE_Registry::Naming_Context::name (Istring &name)
// at a time
int
ACE_Registry::Naming_Context::list (u_long how_many,
- Binding_List &list,
- Binding_Iterator &iter)
+ Binding_List &list,
+ Binding_Iterator &iter)
{
// Empty list
static const ACE_Registry::Binding_List empty_list;
@@ -768,7 +768,7 @@ ACE_Registry::Naming_Context::list (u_long how_many,
// Get the next <how_many> values
long result = iter.next_n (how_many,
- list);
+ list);
return result;
}
@@ -798,9 +798,9 @@ ACE_Registry::Naming_Context::list (Binding_List &list)
ACE_Registry::Binding binding;
result = iterator.next_one (binding);
if (result == 0)
- list.insert (binding);
+ list.insert (binding);
else
- break;
+ break;
}
return 0;
}
@@ -879,7 +879,7 @@ ACE_Registry::Binding_Iterator::next_one (Binding &binding)
// Next <how_many> entries
int
ACE_Registry::Binding_Iterator::next_n (u_long how_many,
- Binding_List &list)
+ Binding_List &list)
{
// Empty list
static const ACE_Registry::Binding_List empty_list;
@@ -931,7 +931,7 @@ ACE_Registry::Binding_Iterator::current_enumeration (void)
int
ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
- Binding_List &list)
+ Binding_List &list)
{
// Make a copy
u_long requested = how_many;
@@ -939,58 +939,58 @@ ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
// While there are more entries to be added to the list
while (how_many > 0)
{
- TCHAR string [ACE_Registry::Naming_Context::MAX_OBJECT_NAME_SIZE];
- u_long size = sizeof string / sizeof (TCHAR);
- long result = ::RegEnumValue (this->parent_->naming_context (). key(),
- this->index_,
- string,
- &size,
- 0,
- 0,
- 0,
- 0);
+ ACE_TCHAR string [ACE_Registry::Naming_Context::MAX_OBJECT_NAME_SIZE];
+ u_long size = sizeof string / sizeof (ACE_TCHAR);
+ long result = ACE_TEXT_RegEnumValue (this->parent_->naming_context ().key (),
+ this->index_,
+ string,
+ &size,
+ 0,
+ 0,
+ 0,
+ 0);
switch (result)
- {
- case ERROR_SUCCESS:
- // Object found
- {
- // Readjust counters
- this->index_++;
- how_many--;
-
- // Add to list
- // Create binding
- Binding binding (string, OBJECT);
- // Add to binding list
- list.insert (binding);
- }
- // Continue to add to list
- break;
-
- case ERROR_NO_MORE_ITEMS:
- // Enumeration of objects complete
- // Reset index
- this->index_ = 0;
-
- // Current enumeration will become CONTEXTS
- this->parent_->current_enumeration (this->parent_->context_iteration_);
- result = this->parent_->current_enumeration ().next_n (how_many,
- list);
- // If we were able to add objects
- if (requested != how_many)
- return 0;
- else
- return result;
-
- default:
- // Strange error
- // Reset index
- this->index_ = 0;
- // Current enumeration will become COMPLETE
- this->parent_->current_enumeration (this->parent_->iteration_complete_);
- // strange error
- return -1;
- }
+ {
+ case ERROR_SUCCESS:
+ // Object found
+ {
+ // Readjust counters
+ this->index_++;
+ how_many--;
+
+ // Add to list
+ // Create binding
+ Binding binding (string, OBJECT);
+ // Add to binding list
+ list.insert (binding);
+ }
+ // Continue to add to list
+ break;
+
+ case ERROR_NO_MORE_ITEMS:
+ // Enumeration of objects complete
+ // Reset index
+ this->index_ = 0;
+
+ // Current enumeration will become CONTEXTS
+ this->parent_->current_enumeration (this->parent_->context_iteration_);
+ result = this->parent_->current_enumeration ().next_n (how_many,
+ list);
+ // If we were able to add objects
+ if (requested != how_many)
+ return 0;
+ else
+ return result;
+
+ default:
+ // Strange error
+ // Reset index
+ this->index_ = 0;
+ // Current enumeration will become COMPLETE
+ this->parent_->current_enumeration (this->parent_->iteration_complete_);
+ // strange error
+ return -1;
+ }
}
// If we reach here, all of <how_many> pairs were added to the list
// Since more entries may be available
@@ -1001,7 +1001,7 @@ ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
int
ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
- Binding_List &list)
+ Binding_List &list)
{
// Make a copy
u_long requested = how_many;
@@ -1009,53 +1009,53 @@ ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
// While there are more entries to be added to the list
while (how_many > 0)
{
- TCHAR string [ACE_Registry::Naming_Context::MAX_CONTEXT_NAME_SIZE];
- u_long size = sizeof string / sizeof (TCHAR);
- long result = ::RegEnumKeyEx (this->parent_->naming_context (). key (),
- this->index_,
- string,
- &size,
- 0,
- 0,
- 0,
- 0);
+ ACE_TCHAR string [ACE_Registry::Naming_Context::MAX_CONTEXT_NAME_SIZE];
+ u_long size = sizeof string / sizeof (ACE_TCHAR);
+ long result = ACE_TEXT_RegEnumKeyEx (this->parent_->naming_context (). key (),
+ this->index_,
+ string,
+ &size,
+ 0,
+ 0,
+ 0,
+ 0);
switch (result)
- {
- case ERROR_SUCCESS:
- // Object found
- {
- // Readjust counters
- this->index_++;
- how_many--;
-
- // Add to list
- // Create binding
- Binding binding (string, CONTEXT);
- // Add to binding list
- list.insert (binding);
- }
- // Continue to add to list
- break;
-
- case ERROR_NO_MORE_ITEMS:
- // Enumeration of objects complete
-
- /* FALL THROUGH */
-
- default:
- // Strange error
-
- // Reset index
- this->index_ = 0;
- // Current enumeration will become CONTEXTS
- this->parent_->current_enumeration (this->parent_->iteration_complete_);
-
- // If we were able to add contexts
- if (requested != how_many)
- return 0;
- else
- return -1;
- }
+ {
+ case ERROR_SUCCESS:
+ // Object found
+ {
+ // Readjust counters
+ this->index_++;
+ how_many--;
+
+ // Add to list
+ // Create binding
+ Binding binding (string, CONTEXT);
+ // Add to binding list
+ list.insert (binding);
+ }
+ // Continue to add to list
+ break;
+
+ case ERROR_NO_MORE_ITEMS:
+ // Enumeration of objects complete
+
+ /* FALL THROUGH */
+
+ default:
+ // Strange error
+
+ // Reset index
+ this->index_ = 0;
+ // Current enumeration will become CONTEXTS
+ this->parent_->current_enumeration (this->parent_->iteration_complete_);
+
+ // If we were able to add contexts
+ if (requested != how_many)
+ return 0;
+ else
+ return -1;
+ }
}
// If we reach here, all of <how_many> pairs were added to the list
// Since more entries may be available
@@ -1066,13 +1066,13 @@ ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
int
ACE_Registry::Binding_Iterator::Iteration_Complete::next_n (u_long how_many,
- Binding_List &list)
+ Binding_List &list)
{
- ACE_UNUSED_ARG(list);
- ACE_UNUSED_ARG(how_many);
+ ACE_UNUSED_ARG(list);
+ ACE_UNUSED_ARG(how_many);
- // No more values
- return -1;
+ // No more values
+ return -1;
}
@@ -1083,8 +1083,8 @@ ACE_Registry::Binding_Iterator::Iteration_Complete::next_n (u_long how_many,
/* static */
int
ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_context,
- HKEY predefined,
- LPCTSTR machine_name)
+ HKEY predefined,
+ const ACE_TCHAR *machine_name)
{
long result = -1;
@@ -1092,16 +1092,16 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co
machine_name = 0;
if (predefined == HKEY_LOCAL_MACHINE || predefined == HKEY_USERS)
- result = ::RegConnectRegistry ((LPTSTR) machine_name,
- predefined,
- &naming_context.key_);
+ result = ACE_TEXT_RegConnectRegistry (machine_name,
+ predefined,
+ &naming_context.key_);
if (predefined == HKEY_CURRENT_USER || predefined == HKEY_CLASSES_ROOT)
// Make sure that for these types, the machine is local
if (machine_name == 0 ||
- ACE_Predefined_Naming_Contexts::is_local_host (machine_name))
+ ACE_Predefined_Naming_Contexts::is_local_host (machine_name))
{
- naming_context.key_ = predefined;
- result = 0;
+ naming_context.key_ = predefined;
+ result = 0;
}
else
result = -1;
@@ -1112,10 +1112,10 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co
// Check if <machine_name> is the local host
/* static */
int
-ACE_Predefined_Naming_Contexts::is_local_host (LPCTSTR machine_name)
+ACE_Predefined_Naming_Contexts::is_local_host (const ACE_TCHAR *machine_name)
{
- TCHAR local_host[MAXHOSTNAMELEN];
- int result = ACE_OS::hostname (local_host, sizeof local_host / sizeof (TCHAR));
+ ACE_TCHAR local_host[MAXHOSTNAMELEN];
+ int result = ACE_OS::hostname (local_host, sizeof local_host / sizeof (ACE_TCHAR));
if (result == 0)
result = !ACE_OS::strcmp (local_host, machine_name);
else
diff --git a/ace/Registry.h b/ace/Registry.h
index b5c072b9678..8bb0aa4cab8 100644
--- a/ace/Registry.h
+++ b/ace/Registry.h
@@ -45,16 +45,10 @@ class ACE_Export ACE_Registry
public:
// International string
-#if defined (UNICODE)
- typedef ACE_WString Istring;
-#else
- typedef ACE_CString Istring;
-#endif /* UNICODE */
-
struct ACE_Export Name_Component
{
- Istring id_;
- Istring kind_;
+ ACE_TString id_;
+ ACE_TString kind_;
int operator== (const Name_Component &rhs) const;
int operator!= (const Name_Component &rhs) const;
@@ -66,13 +60,13 @@ public:
// A Name is an ordered collections of components (ids)
typedef ACE_Unbounded_Set<Name_Component> Name;
- static LPCTSTR STRING_SEPARATOR;
+ static const ACE_TCHAR *STRING_SEPARATOR;
// Separator for components in a name
- static Istring make_string (const Name &name);
+ static ACE_TString make_string (const Name &name);
// Convert a <name> to a <string>
- static Name make_name (const Istring &string);
+ static Name make_name (const ACE_TString &string);
// Convert a <string> to a <name>
enum Binding_Type {INVALID, OBJECT, CONTEXT};
@@ -88,7 +82,7 @@ public:
// Constructor
// (Name version)
- Binding (const Istring &binding_name,
+ Binding (const ACE_TString &binding_name,
Binding_Type binding_type);
// Constructor
// (String version)
@@ -101,8 +95,8 @@ public:
// Name accessor
// (Name version)
- void name (Istring &name);
- Istring name (void);
+ void name (ACE_TString &name);
+ ACE_TString name (void);
// Name accessors
// (String version)
@@ -110,7 +104,7 @@ public:
// Type accessor
private:
- Istring name_;
+ ACE_TString name_;
Binding_Type type_;
// A binding has a name and a type
};
@@ -195,7 +189,7 @@ public:
// This will fail if <name> already exists
// (Name version)
- int bind_new (const Istring &name,
+ int bind_new (const ACE_TString &name,
const Object &object);
// Insert <object> with <name> into <this> context
// This will fail if <name> already exists
@@ -207,7 +201,7 @@ public:
// This will not fail if <name> already exists
// (Name version)
- int bind (const Istring &name,
+ int bind (const ACE_TString &name,
const Object &object);
// Insert or update <object> with <name> into <this> context
// This will not fail if <name> already exists
@@ -218,7 +212,7 @@ public:
// Update <object> with <name> in <this> context
// (Name version)
- int rebind (const Istring &name,
+ int rebind (const ACE_TString &name,
const Object &object);
// Update <object> with <name> in <this> context
@@ -227,7 +221,7 @@ public:
// Find <object> with <name> in <this> context
// (Name version)
- int resolve (const Istring &name,
+ int resolve (const ACE_TString &name,
Object &object);
// Find <object> with <name> in <this> context
@@ -235,7 +229,7 @@ public:
// Delete object with <name> in <this> context
// (Name version)
- int unbind (const Istring &name);
+ int unbind (const ACE_TString &name);
// Delete object with <name> in <this> context
@@ -253,7 +247,7 @@ public:
// This will fail if <name> already exists
// (Name version)
- int bind_new_context (const Istring &name,
+ int bind_new_context (const ACE_TString &name,
Naming_Context &naming_context,
u_long persistence = REG_OPTION_NON_VOLATILE,
u_long security_access = KEY_ALL_ACCESS,
@@ -270,7 +264,7 @@ public:
// This will not fail if <name> already exists
// (Name version)
- int bind_context (const Istring &name,
+ int bind_context (const ACE_TString &name,
/* const */ Naming_Context &naming_context,
u_long persistence = REG_OPTION_NON_VOLATILE,
u_long security_access = KEY_ALL_ACCESS,
@@ -283,7 +277,7 @@ public:
// Rename <naming_context> to <name>
// (Name version)
- int rebind_context (const Istring &name,
+ int rebind_context (const ACE_TString &name,
/* const */ Naming_Context &naming_context);
// Rename <naming_context> to <name>
@@ -293,7 +287,7 @@ public:
// Find <naming_context> with <name> in <this> context
// (Name version)
- int resolve_context (const Istring &name,
+ int resolve_context (const ACE_TString &name,
Naming_Context &naming_context,
u_long security_access = KEY_ALL_ACCESS);
// Find <naming_context> with <name> in <this> context
@@ -302,7 +296,7 @@ public:
// Remove naming_context with <name> from <this> context
// (Name version)
- int unbind_context (const Istring &name);
+ int unbind_context (const ACE_TString &name);
// Remove naming_context with <name> from <this> context
int destroy (void);
@@ -345,8 +339,8 @@ public:
// Get name
// (Name version)
- void name (Istring &name);
- Istring name (void);
+ void name (ACE_TString &name);
+ ACE_TString name (void);
// Get name
// (String version)
@@ -361,7 +355,7 @@ public:
// Set name
// (Name version)
- void name (const Istring &name);
+ void name (const ACE_TString &name);
// Set name
// (String version)
@@ -378,7 +372,7 @@ public:
HKEY parent_key_;
// Key for parent
- Istring name_;
+ ACE_TString name_;
// Name of self
};
@@ -507,14 +501,14 @@ class ACE_Export ACE_Predefined_Naming_Contexts
public:
static int connect (ACE_Registry::Naming_Context &naming_context,
HKEY predefined = HKEY_LOCAL_MACHINE,
- LPCTSTR machine_name = 0);
+ const ACE_TCHAR *machine_name = 0);
// Factory method for connecting to predefined registries. This
// method works for both remote and local machines. However, for
// remote machines, HKEY_CLASSES_ROOT and HKEY_CURRENT_USER types
// are not allowed
private:
- static int is_local_host (LPCTSTR machine_name);
+ static int is_local_host (const ACE_TCHAR *machine_name);
// Check if <machine_name> is the local host
};
diff --git a/ace/Registry_Name_Space.cpp b/ace/Registry_Name_Space.cpp
index bfdc9d45bd7..a16c972691b 100644
--- a/ace/Registry_Name_Space.cpp
+++ b/ace/Registry_Name_Space.cpp
@@ -14,8 +14,8 @@ ACE_Registry_Name_Space::ACE_Registry_Name_Space (void)
ACE_Registry_Name_Space::ACE_Registry_Name_Space (ACE_Name_Options *name_options)
{
if (this->open (name_options) != 0)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Registry_Name_Space::open")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Registry_Name_Space::open")));
}
@@ -27,20 +27,20 @@ ACE_Registry_Name_Space::~ACE_Registry_Name_Space (void)
int
ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
{
- const ASYS_TCHAR *host = name_options->nameserver_host ();
+ const ACE_TCHAR *host = name_options->nameserver_host ();
ACE_Registry::Naming_Context predefined;
int result = ACE_Predefined_Naming_Contexts::connect (predefined,
HKEY_LOCAL_MACHINE,
- ASYS_ONLY_WIDE_STRING (host));
+ host);
if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Predefined_Naming_Context::connect")),
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Predefined_Naming_Context::connect")),
result);
else
{
// Directory
- ACE_Registry::Istring name = name_options->namespace_dir ();
+ ACE_TString name = name_options->namespace_dir ();
// Separator
name += ACE_Registry::STRING_SEPARATOR;
// Filename
@@ -50,7 +50,7 @@ ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
result = predefined.bind_context (name,
this->context_);
if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Registry::Naming_Context::bind_context")), result);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Registry::Naming_Context::bind_context")), result);
}
return 0;
}
@@ -208,7 +208,7 @@ ACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,
if (binding.type () == ACE_Registry::OBJECT)
{
// Key
- ACE_Registry::Istring string = binding.name ();
+ ACE_TString string = binding.name ();
ACE_WString key (string.c_str ());
// Value
@@ -218,7 +218,7 @@ ACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,
value,
type);
if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Registry::Naming_Context::resolve")), result);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Registry::Naming_Context::resolve")), result);
// Complete binding
ACE_Name_Binding binding (key, value, type);
diff --git a/ace/Remote_Name_Space.cpp b/ace/Remote_Name_Space.cpp
index cdc3c3a0174..21d02dd53d2 100644
--- a/ace/Remote_Name_Space.cpp
+++ b/ace/Remote_Name_Space.cpp
@@ -3,10 +3,12 @@
#include "ace/Remote_Name_Space.h"
+#if defined (ACE_HAS_WCHAR)
+
ACE_RCSID(ace, Remote_Name_Space, "$Id$")
int
-ACE_Remote_Name_Space::open (const ASYS_TCHAR *servername, u_short port)
+ACE_Remote_Name_Space::open (const ACE_TCHAR *servername, u_short port)
{
ACE_TRACE ("ACE_Remote_Name_Space::open");
ACE_INET_Addr servaddr;
@@ -27,12 +29,12 @@ ACE_Remote_Name_Space::ACE_Remote_Name_Space (void)
ACE_TRACE ("ACE_Remote_Name_Space::ACE_Remote_Name_Space");
}
-ACE_Remote_Name_Space::ACE_Remote_Name_Space (const ASYS_TCHAR *hostname,
+ACE_Remote_Name_Space::ACE_Remote_Name_Space (const ACE_TCHAR *hostname,
u_short port)
{
ACE_TRACE ("ACE_Remote_Name_Space::ACE_Remote_Name_Space");
if (this->open (hostname, port) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Remote_Name_Space::ACE_Remote_Name_Space")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Remote_Name_Space::ACE_Remote_Name_Space")));
}
int
@@ -124,8 +126,8 @@ ACE_Remote_Name_Space::list_names (ACE_WSTRING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_names")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_names")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -155,8 +157,8 @@ ACE_Remote_Name_Space::list_values (ACE_WSTRING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -188,8 +190,8 @@ ACE_Remote_Name_Space::list_types (ACE_WSTRING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -220,8 +222,8 @@ ACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_names")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_names")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -258,8 +260,8 @@ ACE_Remote_Name_Space::list_value_entries (ACE_BINDING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -296,8 +298,8 @@ ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
{
if (this->ns_proxy_.recv_reply (reply) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Remote_Name_Space::list_values")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
-1);
if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
{
@@ -329,3 +331,5 @@ ACE_Remote_Name_Space::dump (void) const
this->ns_proxy_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
+
+#endif /* ACE_HAS_WCHAR */
diff --git a/ace/Remote_Name_Space.h b/ace/Remote_Name_Space.h
index ef8cd125237..8d5c81dd0b2 100644
--- a/ace/Remote_Name_Space.h
+++ b/ace/Remote_Name_Space.h
@@ -24,6 +24,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#if defined (ACE_HAS_WCHAR)
+
#include "ace/SString.h"
#include "ace/Containers.h"
#include "ace/Name_Proxy.h"
@@ -49,12 +51,12 @@ public:
ACE_Remote_Name_Space (void);
// "Do-nothing" constructor.
- ACE_Remote_Name_Space (const ASYS_TCHAR *hostname, u_short port);
+ ACE_Remote_Name_Space (const ACE_TCHAR *hostname, u_short port);
// Specifies the scope of this namespace, opens and memory-maps the
// associated file (if accessible) or contacts the dedicated name
// server process for NET_LOCAL namespace.
- int open (const ASYS_TCHAR *servername, u_short port);
+ int open (const ACE_TCHAR *servername, u_short port);
// Specifies the scope of this namespace, opens and memory-maps the
// associated file (if accessible) or contacts the dedicated name
// server process for NET_LOCAL namespace.
@@ -126,5 +128,7 @@ private:
// Interface to Name server process for NET_LOCAL namespace.
};
+#endif /* ACE_HAS_WCHAR */
+
#include "ace/post.h"
#endif /* ACE_REMOTE_NAME_SPACE_H */
diff --git a/ace/Remote_Tokens.cpp b/ace/Remote_Tokens.cpp
index 39e9b3bcab6..e5e53cd62a5 100644
--- a/ace/Remote_Tokens.cpp
+++ b/ace/Remote_Tokens.cpp
@@ -68,7 +68,7 @@ ACE_TSS_Connection::make_TSS_TYPE (void) const
return 0;
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TSS_Connection new connection\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_Connection new connection\n")));
return stream;
}
@@ -82,10 +82,10 @@ ACE_TSS_Connection::dump (void) const
{
ACE_TRACE ("ACE_TSS_Connection::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TSS_Connection::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("server_address_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_Connection::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("server_address_\n")));
server_address_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_TSS<ACE_SOCK_Stream>::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -101,7 +101,7 @@ ACE_Remote_Token_Proxy::~ACE_Remote_Token_Proxy (void)
}
int
-ACE_Remote_Token_Proxy::open (const ASYS_TCHAR *name,
+ACE_Remote_Token_Proxy::open (const ACE_TCHAR *name,
int ignore_deadlock,
int debug)
{
@@ -125,7 +125,7 @@ ACE_Remote_Token_Proxy::initiate_connection (void)
{
errno = ENOENT;
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("ACE_Remote_Token_Proxy not open.\n")), -1);
+ ACE_TEXT ("ACE_Remote_Token_Proxy not open.\n")), -1);
}
ACE_SOCK_Stream *peer = ACE_Token_Connections::instance ()->get_connection ();
@@ -143,7 +143,7 @@ ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request,
ssize_t length;
if ((length = request.encode (buffer)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("encode failed")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("encode failed")), -1);
ACE_SOCK_Stream *peer = ACE_Token_Connections::instance ()->get_connection ();
@@ -153,7 +153,7 @@ ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request,
// Transmit request via a blocking send.
if (peer->send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n failed")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("send_n failed")), -1);
else
{
ACE_Token_Reply reply;
@@ -161,10 +161,10 @@ ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request,
// Receive reply via blocking read.
if (peer->recv (&reply, sizeof reply) != sizeof reply)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("recv failed")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("recv failed")), -1);
if (reply.decode () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("decode failed")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("decode failed")), -1);
errno = int (reply.errnum ());
if (errno != 0)
@@ -192,14 +192,14 @@ ACE_Remote_Token_Proxy::acquire (int notify,
case EWOULDBLOCK :
// Whoah, we detected wouldblock via the shadow mutex!
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) shadow: acquire will block, owner is %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow: acquire will block, owner is %s\n"),
this->token_->owner_id ()));
// No error, but would block,
break;
case EDEADLK :
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) shadow: deadlock detected\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow: deadlock detected\n")));
if (ignore_shadow_deadlock_)
break;
@@ -211,8 +211,8 @@ ACE_Remote_Token_Proxy::acquire (int notify,
default :
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%t) %p shadow acquire failed\n"),
- ASYS_TEXT ("ACE_Remote_Token_Proxy")),
+ ACE_TEXT ("(%t) %p shadow acquire failed\n"),
+ ACE_TEXT ("ACE_Remote_Token_Proxy")),
-1);
}
}
@@ -220,8 +220,8 @@ ACE_Remote_Token_Proxy::acquire (int notify,
ACE_Token_Request request (token_->type (),
this->type (),
ACE_Token_Request::ACQUIRE,
- ASYS_ONLY_MULTIBYTE_STRING (this->name ()),
- ASYS_ONLY_MULTIBYTE_STRING (this->client_id ()),
+ this->name (),
+ this->client_id (),
options);
request.notify (notify);
@@ -231,12 +231,12 @@ ACE_Remote_Token_Proxy::acquire (int notify,
if (result == -1)
{
// Update the local shadow copy.
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("error on remote acquire, releasing shadow mutex.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("error on remote acquire, releasing shadow mutex.\n")));
ACE_Token_Proxy::release ();
}
else
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acquired %s remotely.\n"), this->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acquired %s remotely.\n"), this->name ()));
// Our shadow call may have failed. However, it's still a race
// to the remote server. If we beat the client which holds the
// local token, we need to fix things locally to reflect the
@@ -262,7 +262,7 @@ ACE_Remote_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
// Save/restore errno.
ACE_Errno_Guard error (errno);
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("shadow try acquire failed\n")));
+ ACE_TEXT ("shadow try acquire failed\n")));
}
return -1;
@@ -271,8 +271,8 @@ ACE_Remote_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
ACE_Token_Request request (token_->type (),
this->type (),
ACE_Token_Request::TRY_ACQUIRE,
- ASYS_ONLY_MULTIBYTE_STRING (this->name ()),
- ASYS_ONLY_MULTIBYTE_STRING (this->client_id ()),
+ this->name (),
+ this->client_id (),
ACE_Synch_Options::synch);
return this->request_reply (request,
@@ -293,15 +293,15 @@ ACE_Remote_Token_Proxy::renew (int requeue_position,
return -1;
else if (debug_)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%t) shadow: renew would block. owner %s.\n"),
+ ACE_TEXT ("(%t) shadow: renew would block. owner %s.\n"),
this->token_->owner_id ()));
}
ACE_Token_Request request (token_->type (),
this->type (),
ACE_Token_Request::RENEW,
- ASYS_ONLY_MULTIBYTE_STRING (this->name ()),
- ASYS_ONLY_MULTIBYTE_STRING (this->client_id ()),
+ this->name (),
+ this->client_id (),
options);
request.requeue_position (requeue_position);
@@ -316,13 +316,13 @@ ACE_Remote_Token_Proxy::renew (int requeue_position,
ACE_Token_Proxy::release ();
}
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p error on remote renew, releasing shadow mutex.\n"),
- ASYS_TEXT ("ACE_Remote_Token_Proxy")), -1);
+ ACE_TEXT ("%p error on remote renew, releasing shadow mutex.\n"),
+ ACE_TEXT ("ACE_Remote_Token_Proxy")), -1);
}
else
{
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) renewed %s remotely.\n"), this->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renewed %s remotely.\n"), this->name ()));
// Make sure that the local shadow reflects our new ownership.
token_->make_owner (waiter_);
return result;
@@ -337,19 +337,19 @@ ACE_Remote_Token_Proxy::release (ACE_Synch_Options &options)
ACE_Token_Request request (token_->type (),
this->type (),
ACE_Token_Request::RELEASE,
- ASYS_ONLY_MULTIBYTE_STRING (this->name ()),
- ASYS_ONLY_MULTIBYTE_STRING (this->client_id ()),
+ this->name (),
+ this->client_id (),
options);
int result = this->request_reply (request, options);
if (result == 0)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) released %s remotely.\n"), this->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) released %s remotely.\n"), this->name ()));
// whether success or failure, we're going to release the shadow.
// If race conditions exist such that we are no longer the owner,
// this release will perform a remove.
if (ACE_Token_Proxy::release () == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) shadow: release failed\n")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) shadow: release failed\n")));
return result;
}
@@ -365,17 +365,17 @@ void
ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *)
{
ACE_TRACE ("ACE_Remote_Token_Proxy::token_acquired");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) shadow token %s acquired\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow token %s acquired\n"),
this->client_id (),
this->name ()));
// ACE_Token_Proxy::token_acquired (vp);
}
-const ASYS_TCHAR*
+const ACE_TCHAR*
ACE_Remote_Token_Proxy::owner_id (void)
{
ACE_TRACE ("ACE_Remote_Token_Proxy::owner_id");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("owner_id called\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owner_id called\n")));
// @@ special operation
return 0;
}
@@ -385,10 +385,10 @@ ACE_Remote_Token_Proxy::dump (void) const
{
ACE_TRACE ("ACE_Remote_Token_Proxy::owner_id");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Tokens::dump:\n")
- ASYS_TEXT (" ignore_shadow_deadlock_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Tokens::dump:\n")
+ ACE_TEXT (" ignore_shadow_deadlock_ = %d\n"),
ignore_shadow_deadlock_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Token_Proxy::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -398,8 +398,8 @@ ACE_Remote_Mutex::dump (void) const
{
ACE_TRACE ("ACE_Remote_Mutex::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Remote_Mutex::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_Mutex::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Remote_Token_Proxy::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -409,8 +409,8 @@ ACE_Remote_RLock::dump (void) const
{
ACE_TRACE ("ACE_Remote_RLock::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Remote_RLock::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_RLock::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Remote_Token_Proxy::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -420,8 +420,8 @@ ACE_Remote_WLock::dump (void) const
{
ACE_TRACE ("ACE_Remote_WLock::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Remote_WLock::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_WLock::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Remote_Token_Proxy::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Remote_Tokens.h b/ace/Remote_Tokens.h
index 9ed159ecd0c..c0e2fb041f8 100644
--- a/ace/Remote_Tokens.h
+++ b/ace/Remote_Tokens.h
@@ -52,7 +52,7 @@ public:
virtual ~ACE_Remote_Token_Proxy (void);
// Death.
- int open (const ASYS_TCHAR *name,
+ int open (const ACE_TCHAR *name,
int ignore_deadlock = 0,
int debug = 0);
// Same as Token_Proxy. <name> is the string uniquely identifying
@@ -114,7 +114,7 @@ public:
virtual void token_acquired (ACE_TPQ_Entry *);
// Override the default to do nothing.
- virtual const ASYS_TCHAR* owner_id (void);
+ virtual const ACE_TCHAR* owner_id (void);
// the client id of the current token holder
static void set_server_address (const ACE_INET_Addr &server_address);
@@ -154,7 +154,7 @@ public:
ACE_Remote_Mutex (void);
// Null creation. Remote_Token_Proxy::open must be called.
- ACE_Remote_Mutex (const ASYS_TCHAR *token_name,
+ ACE_Remote_Mutex (const ACE_TCHAR *token_name,
int ignore_deadlock = 0,
int debug = 0);
// Calls Remote_Token_Proxy::open for you.
@@ -166,7 +166,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
};
@@ -187,7 +187,7 @@ class ACE_Export ACE_Remote_RLock : public ACE_Remote_Token_Proxy
public:
ACE_Remote_RLock (void);
- ACE_Remote_RLock (const ASYS_TCHAR *token_name,
+ ACE_Remote_RLock (const ACE_TCHAR *token_name,
int ignore_deadlock = 0,
int debug = 0);
@@ -203,7 +203,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
};
@@ -223,7 +223,7 @@ class ACE_Export ACE_Remote_WLock : public ACE_Remote_Token_Proxy
public:
ACE_Remote_WLock (void);
- ACE_Remote_WLock (const ASYS_TCHAR *token_name,
+ ACE_Remote_WLock (const ACE_TCHAR *token_name,
int ignore_deadlock = 0,
int debug = 0);
@@ -239,7 +239,7 @@ public:
// Return deep copy.
protected:
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
// Make the correct type of ACE_Tokens. This is called by the Token
// Manager.
};
diff --git a/ace/Remote_Tokens.i b/ace/Remote_Tokens.i
index 5392280cbe0..bbd2b2613e7 100644
--- a/ace/Remote_Tokens.i
+++ b/ace/Remote_Tokens.i
@@ -10,7 +10,7 @@ ACE_Remote_Mutex::ACE_Remote_Mutex (void)
}
ACE_INLINE
-ACE_Remote_Mutex::ACE_Remote_Mutex (const ASYS_TCHAR *token_name,
+ACE_Remote_Mutex::ACE_Remote_Mutex (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -27,7 +27,7 @@ ACE_Remote_Mutex::clone (void) const
}
ACE_INLINE ACE_Tokens *
-ACE_Remote_Mutex::create_token (const ASYS_TCHAR *name)
+ACE_Remote_Mutex::create_token (const ACE_TCHAR *name)
{
return new ACE_Mutex_Token (name);
}
@@ -35,7 +35,7 @@ ACE_Remote_Mutex::create_token (const ASYS_TCHAR *name)
// ************************************************************
ACE_INLINE
-ACE_Remote_RLock::ACE_Remote_RLock (const ASYS_TCHAR *token_name,
+ACE_Remote_RLock::ACE_Remote_RLock (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -44,7 +44,7 @@ ACE_Remote_RLock::ACE_Remote_RLock (const ASYS_TCHAR *token_name,
}
ACE_INLINE ACE_Tokens *
-ACE_Remote_RLock::create_token (const ASYS_TCHAR *name)
+ACE_Remote_RLock::create_token (const ACE_TCHAR *name)
{
return new ACE_RW_Token (name);
}
@@ -66,7 +66,7 @@ ACE_Remote_RLock::clone (void) const
// ************************************************************
ACE_INLINE
-ACE_Remote_WLock::ACE_Remote_WLock (const ASYS_TCHAR *token_name,
+ACE_Remote_WLock::ACE_Remote_WLock (const ACE_TCHAR *token_name,
int ignore_deadlock,
int debug)
{
@@ -76,7 +76,7 @@ ACE_Remote_WLock::ACE_Remote_WLock (const ASYS_TCHAR *token_name,
ACE_INLINE ACE_Tokens *
-ACE_Remote_WLock::create_token (const ASYS_TCHAR *name)
+ACE_Remote_WLock::create_token (const ACE_TCHAR *name)
{
return new ACE_RW_Token (name);
}
diff --git a/ace/SOCK.cpp b/ace/SOCK.cpp
index f8a7b52d3dd..00f5be3f259 100644
--- a/ace/SOCK.cpp
+++ b/ace/SOCK.cpp
@@ -119,8 +119,8 @@ ACE_SOCK::ACE_SOCK (int type,
protocol,
reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK::ACE_SOCK")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK::ACE_SOCK")));
}
int
@@ -174,6 +174,6 @@ ACE_SOCK::ACE_SOCK (int type,
flags,
reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK::ACE_SOCK")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK::ACE_SOCK")));
}
diff --git a/ace/SOCK_Acceptor.cpp b/ace/SOCK_Acceptor.cpp
index 02bb8acddcb..4587e17a687 100644
--- a/ace/SOCK_Acceptor.cpp
+++ b/ace/SOCK_Acceptor.cpp
@@ -297,8 +297,8 @@ ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
backlog,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Acceptor")));
}
// General purpose routine for performing server ACE_SOCK creation.
@@ -338,6 +338,6 @@ ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
backlog,
protocol) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Acceptor")));
}
diff --git a/ace/SOCK_CODgram.cpp b/ace/SOCK_CODgram.cpp
index 5138e97b3ad..a0b21dc0694 100644
--- a/ace/SOCK_CODgram.cpp
+++ b/ace/SOCK_CODgram.cpp
@@ -26,7 +26,7 @@ ACE_SOCK_CODgram::ACE_SOCK_CODgram (const ACE_Addr &remote, const ACE_Addr &loca
ACE_TRACE ("ACE_SOCK_CODgram::ACE_SOCK_CODgram");
if (this->open (remote, local,
protocol_family, protocol, reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_SOCK_CODgram")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SOCK_CODgram")));
}
/* This is the general-purpose open routine. Note that it performs
diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp
index 1c8bb30bc0c..68e03648bd0 100644
--- a/ace/SOCK_Connector.cpp
+++ b/ace/SOCK_Connector.cpp
@@ -276,8 +276,8 @@ ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
&& timeout != 0
&& !(errno == EWOULDBLOCK || errno == ETIME))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
}
ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
@@ -310,6 +310,6 @@ ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
&& timeout != 0
&& !(errno == EWOULDBLOCK || errno == ETIME))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
}
diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp
index 265ee2e5dde..7a53f45ae97 100644
--- a/ace/SOCK_Dgram.cpp
+++ b/ace/SOCK_Dgram.cpp
@@ -175,8 +175,8 @@ ACE_SOCK_Dgram::ACE_SOCK_Dgram (const ACE_Addr &local,
protocol,
reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Dgram")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Dgram")));
}
ACE_SOCK_Dgram::ACE_SOCK_Dgram (const ACE_Addr &local,
@@ -196,8 +196,8 @@ ACE_SOCK_Dgram::ACE_SOCK_Dgram (const ACE_Addr &local,
flags,
reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Dgram")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Dgram")));
}
#if defined (ACE_HAS_MSG)
diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp
index fa4a230ca7e..eb1f3fb49f8 100644
--- a/ace/SOCK_Dgram_Bcast.cpp
+++ b/ace/SOCK_Dgram_Bcast.cpp
@@ -61,7 +61,7 @@ ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast (const ACE_Addr &local,
int protocol_family,
int protocol,
int reuse_addr,
- const ASYS_TCHAR *host_name)
+ const ACE_TCHAR *host_name)
: ACE_SOCK_Dgram (local, protocol_family, protocol, reuse_addr),
if_list_ (0)
{
@@ -69,8 +69,8 @@ ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast (const ACE_Addr &local,
if (this->mk_broadcast (host_name) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SOCK_Dgram_Bcast")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SOCK_Dgram_Bcast")));
}
// Here's the general-purpose open routine.
@@ -80,7 +80,7 @@ ACE_SOCK_Dgram_Bcast::open (const ACE_Addr &local,
int protocol_family,
int protocol,
int reuse_addr,
- const ASYS_TCHAR *host_name)
+ const ACE_TCHAR *host_name)
{
ACE_TRACE ("ACE_SOCK_Dgram_Bcast::open");
@@ -94,7 +94,7 @@ ACE_SOCK_Dgram_Bcast::open (const ACE_Addr &local,
// Make broadcast available for Datagram socket.
int
-ACE_SOCK_Dgram_Bcast::mk_broadcast (const ASYS_TCHAR *host_name)
+ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name)
{
ACE_TRACE ("ACE_SOCK_Dgram_Bcast::mk_broadcast");
@@ -132,7 +132,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ASYS_TCHAR *host_name)
//Get host ip address
if (host_name)
{
- hostent *hp = ACE_OS::gethostbyname (ASYS_MULTIBYTE_STRING (host_name));
+ hostent *hp = ACE_OS::gethostbyname (host_name);
if (hp == 0)
return -1;
diff --git a/ace/SOCK_Dgram_Bcast.h b/ace/SOCK_Dgram_Bcast.h
index 577081cfb09..e509a7bf712 100644
--- a/ace/SOCK_Dgram_Bcast.h
+++ b/ace/SOCK_Dgram_Bcast.h
@@ -56,7 +56,7 @@ public:
int protocol_family = PF_INET,
int protocol = 0,
int reuse_addr = 0,
- const ASYS_TCHAR *host_name = 0);
+ const ACE_TCHAR *host_name = 0);
~ACE_SOCK_Dgram_Bcast (void);
// Default dtor.
@@ -67,7 +67,7 @@ public:
int protocol_family = PF_INET,
int protocol = 0,
int reuse_addr = 0,
- const ASYS_TCHAR *host_name = 0);
+ const ACE_TCHAR *host_name = 0);
// Initiate a connectionless datagram broadcast endpoint.
int close (void);
@@ -109,7 +109,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- int mk_broadcast (const ASYS_TCHAR *host_name);
+ int mk_broadcast (const ACE_TCHAR *host_name);
// Make broadcast available for Datagram socket.
ACE_Bcast_Node *if_list_;
diff --git a/ace/SOCK_Dgram_Mcast.cpp b/ace/SOCK_Dgram_Mcast.cpp
index b6d87b298ab..b0ab087cc30 100644
--- a/ace/SOCK_Dgram_Mcast.cpp
+++ b/ace/SOCK_Dgram_Mcast.cpp
@@ -84,7 +84,7 @@ ACE_SOCK_Dgram_Mcast::open (const ACE_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol,
int reuse_addr)
@@ -125,7 +125,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
{
if (this->subscribe (mcast_addr,
reuse_addr,
- ASYS_TEXT ("0.0.0.0"),
+ ACE_TEXT ("0.0.0.0"),
protocol_family,
protocol) == 0)
++nr_subscribed;
@@ -142,7 +142,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
continue;
if (this->subscribe (mcast_addr,
reuse_addr,
- ASYS_WIDE_STRING (if_addrs[if_cnt].get_host_addr()),
+ if_addrs[if_cnt].get_host_addr(),
protocol_family,
protocol) == 0)
++nr_subscribed;
@@ -180,7 +180,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast::subscribe (const ACE_INET_Addr &mcast_addr,
int reuse_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol)
{
@@ -221,7 +221,7 @@ ACE_SOCK_Dgram_Mcast::subscribe (const ACE_INET_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol)
{
@@ -260,7 +260,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
if (if_cnt < 2)
{
if (this->unsubscribe (mcast_addr,
- ASYS_WIDE_STRING ("0.0.0.0"),
+ ACE_TEXT ("0.0.0.0"),
protocol_family,
protocol) == 0)
++nr_unsubscribed;
@@ -273,7 +273,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
if (if_addrs[if_cnt].get_ip_address() == INADDR_LOOPBACK)
continue;
if (this->unsubscribe (mcast_addr,
- ASYS_WIDE_STRING (if_addrs[if_cnt].get_host_addr()),
+ if_addrs[if_cnt].get_host_addr(),
protocol_family,
protocol) == 0)
++nr_unsubscribed;
@@ -308,7 +308,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast::unsubscribe (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol)
{
@@ -346,7 +346,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe (void)
int
ACE_SOCK_Dgram_Mcast::make_multicast_address_i (const ACE_INET_Addr &mcast_addr,
ip_mreq &multicast_address ,
- const ASYS_TCHAR *net_if)
+ const ACE_TCHAR *net_if)
{
if (net_if != 0)
{
@@ -388,7 +388,7 @@ ACE_SOCK_Dgram_Mcast::make_multicast_address_i (const ACE_INET_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast::make_multicast_address (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if)
+ const ACE_TCHAR *net_if)
{
ACE_TRACE ("ACE_SOCK_Dgram_Mcast::make_multicast_address");
diff --git a/ace/SOCK_Dgram_Mcast.h b/ace/SOCK_Dgram_Mcast.h
index 722c998ad5d..a9a824e84ea 100644
--- a/ace/SOCK_Dgram_Mcast.h
+++ b/ace/SOCK_Dgram_Mcast.h
@@ -48,7 +48,7 @@ public:
int subscribe (const ACE_INET_Addr &mcast_addr,
int reuse_addr = 1,
- const ASYS_TCHAR *net_if = 0,
+ const ACE_TCHAR *net_if = 0,
int protocol_family = PF_INET,
int protocol = 0);
// This is a BSD-style method (i.e., no QoS) for joining a multicast
@@ -68,7 +68,7 @@ public:
// them into numbers via <ACE_OS::atoi>.
int unsubscribe (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if = 0,
+ const ACE_TCHAR *net_if = 0,
int protocol_family = PF_INET,
int protocol = 0);
// Leave a multicast group identified by <mcast_addr>. The <net_if>
@@ -121,8 +121,18 @@ private:
int reuse_addr = 0);
// Not publically visible.
+ int open (const ACE_Addr &mcast_addr,
+ const ACE_QoS_Params &qos_params,
+ int protocol_family = PF_INET,
+ int protocol = 0,
+ ACE_Protocol_Info *protocolinfo = 0,
+ ACE_SOCK_GROUP g = 0,
+ u_long flags = 0,
+ int reuse_addr = 0);
+ // Not publically visible.
+
int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol,
int reuse_addr);
@@ -130,7 +140,7 @@ private:
// (no QoS).
int unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if = 0,
+ const ACE_TCHAR *net_if = 0,
int protocol_family = PF_INET,
int protocol = 0);
// Unsubscribe to multicast interfaces subscribed to previously by
@@ -150,12 +160,12 @@ private:
protected:
int make_multicast_address (const ACE_INET_Addr &mcast_addr,
- const ASYS_TCHAR *net_if = ASYS_TEXT ("le0"));
+ const ACE_TCHAR *net_if = ACE_TEXT ("le0"));
// Initialize the <multicast_address_> IP address.
int make_multicast_address_i (const ACE_INET_Addr &mcast_addr,
ip_mreq& multicast_address,
- const ASYS_TCHAR *net_if = ASYS_TEXT ("le0"));
+ const ACE_TCHAR *net_if = ACE_TEXT ("le0"));
// Initialize a multicast address. This method factors out common
// code called by <make_multicast_address> and <subscribe>.
diff --git a/ace/SOCK_Dgram_Mcast_QoS.cpp b/ace/SOCK_Dgram_Mcast_QoS.cpp
index c1a6e620563..c11c622d560 100644
--- a/ace/SOCK_Dgram_Mcast_QoS.cpp
+++ b/ace/SOCK_Dgram_Mcast_QoS.cpp
@@ -88,7 +88,7 @@ ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &mcast_addr,
int
ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
const ACE_QoS_Params &qos_params,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol,
int reuse_addr,
@@ -131,7 +131,7 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
if (this->subscribe (mcast_addr,
qos_params,
reuse_addr,
- ASYS_TEXT ("0.0.0.0"),
+ ACE_TEXT ("0.0.0.0"),
protocol_family,
protocol,
protocolinfo) == 0)
@@ -150,7 +150,7 @@ ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
if (this->subscribe (mcast_addr,
qos_params,
reuse_addr,
- ASYS_WIDE_STRING (if_addrs[if_cnt].get_host_addr()),
+ ACE_TEXT_ALWAYS_CHAR (if_addrs[if_cnt].get_host_addr()),
protocol_family,
protocol,
protocolinfo) == 0)
@@ -192,7 +192,7 @@ int
ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
const ACE_QoS_Params &qos_params,
int reuse_addr,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol,
ACE_Protocol_Info *protocolinfo,
diff --git a/ace/SOCK_Dgram_Mcast_QoS.h b/ace/SOCK_Dgram_Mcast_QoS.h
index 26fb334a8e6..9ed2d63ea87 100644
--- a/ace/SOCK_Dgram_Mcast_QoS.h
+++ b/ace/SOCK_Dgram_Mcast_QoS.h
@@ -46,7 +46,7 @@ public:
int subscribe (const ACE_INET_Addr &mcast_addr,
const ACE_QoS_Params &qos_params,
int reuse_addr = 1,
- const ASYS_TCHAR *net_if = 0,
+ const ACE_TCHAR *net_if = 0,
int protocol_family = PF_INET,
int protocol = 0,
ACE_Protocol_Info *protocolinfo = 0,
@@ -112,7 +112,7 @@ private:
int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
const ACE_QoS_Params &qos_params,
- const ASYS_TCHAR *net_if,
+ const ACE_TCHAR *net_if,
int protocol_family,
int protocol,
int reuse_addr,
diff --git a/ace/SPIPE_Acceptor.cpp b/ace/SPIPE_Acceptor.cpp
index 80194013f2a..a87510de58b 100644
--- a/ace/SPIPE_Acceptor.cpp
+++ b/ace/SPIPE_Acceptor.cpp
@@ -88,15 +88,24 @@ ACE_SPIPE_Acceptor::create_new_instance (int perms)
int status;
// Create a new instance of the named pipe
- ACE_HANDLE handle = ::CreateNamedPipe (this->local_addr_.get_path_name (),
- PIPE_ACCESS_DUPLEX |
- FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE,
- PIPE_UNLIMITED_INSTANCES,
- 1024 * 10,
- 1024 * 10,
- ACE_DEFAULT_TIMEOUT,
- NULL);
+ ACE_HANDLE handle =
+#if defined (ACE_USES_WCHAR)
+ ::CreateNamedPipeW (
+#else /* ACE_USES_WCHAR */
+ ::CreateNamedPipeA (
+#endif /* ACE_USES_WCHAR */
+ this->local_addr_.get_path_name (),
+ PIPE_ACCESS_DUPLEX
+ | FILE_FLAG_OVERLAPPED,
+ PIPE_TYPE_MESSAGE
+ | PIPE_READMODE_MESSAGE,
+ PIPE_UNLIMITED_INSTANCES,
+ 1024 * 10,
+ 1024 * 10,
+ ACE_DEFAULT_TIMEOUT,
+ NULL);
+
+
if (handle == ACE_INVALID_HANDLE)
{
return -1;
@@ -155,8 +164,8 @@ ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor (const ACE_SPIPE_Addr &local_sap,
if (this->open (local_sap, reuse_addr, perms) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SPIPE_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SPIPE_Acceptor")));
}
// General purpose routine for accepting new connections.
diff --git a/ace/SPIPE_Addr.cpp b/ace/SPIPE_Addr.cpp
index 4e31baa4b8a..566597a7d9e 100644
--- a/ace/SPIPE_Addr.cpp
+++ b/ace/SPIPE_Addr.cpp
@@ -40,19 +40,11 @@ ACE_SPIPE_Addr::ACE_SPIPE_Addr (void)
// Transform the string into the current addressing format.
-#if defined (UNICODE)
int
-ACE_SPIPE_Addr::string_to_addr (const wchar_t *addr)
+ACE_SPIPE_Addr::string_to_addr (const ACE_TCHAR *addr)
{
return this->set (addr);
}
-#endif /* UNICODE */
-
-int
-ACE_SPIPE_Addr::string_to_addr (const char *addr)
-{
- return this->set (ACE_WIDE_STRING (addr));
-}
int
ACE_SPIPE_Addr::set (const ACE_SPIPE_Addr &sa)
@@ -79,7 +71,7 @@ ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa)
}
int
-ACE_SPIPE_Addr::set (LPCTSTR addr,
+ACE_SPIPE_Addr::set (const ACE_TCHAR *addr,
gid_t gid,
uid_t uid)
{
@@ -87,8 +79,8 @@ ACE_SPIPE_Addr::set (LPCTSTR addr,
len += sizeof (this->SPIPE_addr_.gid_);
#if defined (ACE_WIN32)
- const TCHAR *colonp = ACE_OS::strchr (addr, ':');
- TCHAR temp[BUFSIZ];
+ const ACE_TCHAR *colonp = ACE_OS::strchr (addr, ':');
+ ACE_TCHAR temp[BUFSIZ];
if (colonp == 0) // Assume it's a local name.
{
@@ -107,7 +99,7 @@ ACE_SPIPE_Addr::set (LPCTSTR addr,
{
ACE_OS::strcpy (temp, ACE_TEXT ("\\\\"));
- TCHAR *t;
+ ACE_TCHAR *t;
// We need to allocate a duplicate so that we can write a
// NUL character into it.
@@ -140,7 +132,7 @@ ACE_SPIPE_Addr::set (LPCTSTR addr,
// Create a ACE_Addr from a ACE_SPIPE pathname.
-ACE_SPIPE_Addr::ACE_SPIPE_Addr (LPCTSTR addr,
+ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_TCHAR *addr,
gid_t gid,
uid_t uid)
: ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_)
diff --git a/ace/SPIPE_Addr.h b/ace/SPIPE_Addr.h
index 33769a9b494..063c2382315 100644
--- a/ace/SPIPE_Addr.h
+++ b/ace/SPIPE_Addr.h
@@ -38,14 +38,14 @@ public:
ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
// Copy constructor.
- ACE_SPIPE_Addr (LPCTSTR rendezvous_point, gid_t = 0, uid_t = 0);
+ ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
// Create a ACE_SPIPE_Addr from a rendezvous point in the file
// system.
int set (const ACE_SPIPE_Addr &sa);
// Acts like a copy constructor...
- int set (LPCTSTR rendezvous_point, gid_t = 0, uid_t = 0);
+ int set (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
// Create a ACE_SPIPE_Addr from a rendezvous point in the file
// system.
@@ -55,18 +55,10 @@ public:
virtual void set_addr (void *addr, int len);
// Set a pointer to the underlying network address.
-#if defined (UNICODE)
- virtual int addr_to_string (wchar_t *addr, size_t) const;
+ virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
// Transform the current address into string format.
- virtual int string_to_addr (const wchar_t *addr);
- // Transform the string into the current addressing format.
-#endif /* UNICODE */
-
- virtual int addr_to_string (char *addr, size_t) const;
- // Transform the current address into string format.
-
- virtual int string_to_addr (const char *addr);
+ virtual int string_to_addr (const ACE_TCHAR *addr);
// Transform the string into the current addressing format.
// = Equality/inequality tests
@@ -77,7 +69,7 @@ public:
// Check for inequality
// = SPIPE-specific address operations
- LPCTSTR get_path_name (void) const;
+ const ACE_TCHAR *get_path_name (void) const;
// Pathname of rendezvous point in file system.
uid_t user_id (void) const;
@@ -108,7 +100,7 @@ private:
uid_t uid_;
// User id.
- TCHAR rendezvous_[MAXNAMLEN + 1];
+ ACE_TCHAR rendezvous_[MAXNAMLEN + 1];
// Pathname in the file system.
} SPIPE_addr_;
diff --git a/ace/SPIPE_Addr.i b/ace/SPIPE_Addr.i
index 944c762483f..d7947515c24 100644
--- a/ace/SPIPE_Addr.i
+++ b/ace/SPIPE_Addr.i
@@ -7,21 +7,12 @@
// Transform the current address into string format.
-#if defined (UNICODE)
ACE_INLINE int
-ACE_SPIPE_Addr::addr_to_string (wchar_t *s, size_t len) const
-{
- ACE_OS::strncpy (s, this->SPIPE_addr_.rendezvous_, len);
- return 0;
-}
-#endif /* UNICODE */
-
-ACE_INLINE int
-ACE_SPIPE_Addr::addr_to_string (char *s, size_t len) const
+ACE_SPIPE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
{
ACE_OS::strncpy (s,
- ACE_MULTIBYTE_STRING (this->SPIPE_addr_.rendezvous_),
- len);
+ this->SPIPE_addr_.rendezvous_,
+ len);
return 0;
}
@@ -52,7 +43,7 @@ ACE_SPIPE_Addr::operator != (const ACE_SPIPE_Addr &sap) const
// Return the path name used for the rendezvous point.
-ACE_INLINE LPCTSTR
+ACE_INLINE const ACE_TCHAR *
ACE_SPIPE_Addr::get_path_name (void) const
{
return this->SPIPE_addr_.rendezvous_;
diff --git a/ace/SPIPE_Connector.cpp b/ace/SPIPE_Connector.cpp
index 7dbead39e4e..3ea8f5aa617 100644
--- a/ace/SPIPE_Connector.cpp
+++ b/ace/SPIPE_Connector.cpp
@@ -25,8 +25,8 @@ ACE_SPIPE_Connector::ACE_SPIPE_Connector (ACE_SPIPE_Stream &new_io,
if (this->connect (new_io, remote_sap, timeout, local_sap,
reuse_addr, flags, perms) == -1
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("address %s, %p\n"),
- remote_sap.get_path_name (), ASYS_TEXT ("ACE_SPIPE_Connector")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("address %s, %p\n"),
+ remote_sap.get_path_name (), ACE_TEXT ("ACE_SPIPE_Connector")));
}
void
diff --git a/ace/SString.cpp b/ace/SString.cpp
index f30257e33b4..677a1f38289 100644
--- a/ace/SString.cpp
+++ b/ace/SString.cpp
@@ -17,7 +17,7 @@
ACE_RCSID(ace, SString, "$Id$")
-ACE_Tokenizer::ACE_Tokenizer (LPTSTR buffer)
+ACE_Tokenizer::ACE_Tokenizer (ACE_TCHAR *buffer)
: buffer_ (buffer),
index_ (0),
preserves_index_ (0),
@@ -26,7 +26,7 @@ ACE_Tokenizer::ACE_Tokenizer (LPTSTR buffer)
}
int
-ACE_Tokenizer::delimiter (TCHAR d)
+ACE_Tokenizer::delimiter (ACE_TCHAR d)
{
if (delimiter_index_ == MAX_DELIMITERS)
return -1;
@@ -38,8 +38,8 @@ ACE_Tokenizer::delimiter (TCHAR d)
}
int
-ACE_Tokenizer::delimiter_replace (TCHAR d,
- TCHAR replacement)
+ACE_Tokenizer::delimiter_replace (ACE_TCHAR d,
+ ACE_TCHAR replacement)
{
if (delimiter_index_ == MAX_DELIMITERS)
return -1;
@@ -52,8 +52,8 @@ ACE_Tokenizer::delimiter_replace (TCHAR d,
}
int
-ACE_Tokenizer::preserve_designators (TCHAR start,
- TCHAR stop,
+ACE_Tokenizer::preserve_designators (ACE_TCHAR start,
+ ACE_TCHAR stop,
int strip)
{
if (preserves_index_ == MAX_PRESERVES)
@@ -67,9 +67,9 @@ ACE_Tokenizer::preserve_designators (TCHAR start,
}
int
-ACE_Tokenizer::is_delimiter (TCHAR d,
+ACE_Tokenizer::is_delimiter (ACE_TCHAR d,
int &replace,
- TCHAR &r)
+ ACE_TCHAR &r)
{
replace = 0;
@@ -88,8 +88,8 @@ ACE_Tokenizer::is_delimiter (TCHAR d,
}
int
-ACE_Tokenizer::is_preserve_designator (TCHAR start,
- TCHAR &stop,
+ACE_Tokenizer::is_preserve_designator (ACE_TCHAR start,
+ ACE_TCHAR &stop,
int &strip)
{
for (int x = 0; x < preserves_index_; x++)
@@ -103,7 +103,7 @@ ACE_Tokenizer::is_preserve_designator (TCHAR start,
return 0;
}
-LPTSTR
+ACE_TCHAR *
ACE_Tokenizer::next (void)
{
// Check if the previous pass was the last one in the buffer.
@@ -113,9 +113,9 @@ ACE_Tokenizer::next (void)
return 0;
}
- TCHAR replacement;
+ ACE_TCHAR replacement;
int replace;
- LPTSTR next_token;
+ ACE_TCHAR *next_token;
// Skip all leading delimiters.
for (;;)
@@ -141,7 +141,7 @@ ACE_Tokenizer::next (void)
next_token = buffer_ + index_;
// A preserved region is it's own token.
- TCHAR stop;
+ ACE_TCHAR stop;
int strip;
if (this->is_preserve_designator (buffer_[index_],
stop,
@@ -217,7 +217,10 @@ ACE_ALLOC_HOOK_DEFINE(ACE_CString)
char ACE_CString::NULL_CString_ = '\0';
const int ACE_CString::npos = -1;
const int ACE_SString::npos = -1;
+
+#if defined (ACE_HAS_WCHAR)
const int ACE_WString::npos = -1;
+#endif /* ACE_HAS_WCHAR */
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
ostream &
@@ -228,6 +231,7 @@ operator<< (ostream &os, const ACE_CString &cs)
return os;
}
+#if defined (ACE_HAS_WCHAR)
ostream &
operator<< (ostream &os, const ACE_WString &ws)
{
@@ -238,6 +242,7 @@ operator<< (ostream &os, const ACE_WString &ws)
}
return os;
}
+#endif /* ACE_HAS_WCHAR */
ostream &
operator<< (ostream &os, const ACE_SString &ss)
@@ -251,7 +256,8 @@ operator<< (ostream &os, const ACE_SString &ss)
// Constructor that copies <s> into dynamically allocated memory.
// Probable loss of data. Please use with care.
-ACE_CString::ACE_CString (const ACE_USHORT16 *s,
+#if defined (ACE_HAS_WCHAR)
+ACE_CString::ACE_CString (const wchar_t *s,
ACE_Allocator *alloc)
: allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
len_ (0),
@@ -261,7 +267,7 @@ ACE_CString::ACE_CString (const ACE_USHORT16 *s,
{
ACE_TRACE ("ACE_CString::ACE_CString");
- if (s == 0 || s[0] == (ACE_USHORT16) '\0')
+ if (s == 0 || s[0] == (wchar_t) '\0')
{
this->release_ = 0;
this->len_ = 0;
@@ -277,7 +283,7 @@ ACE_CString::ACE_CString (const ACE_USHORT16 *s,
this->len_ = len;
this->buf_len_ = len + 1;
- // Copy the ACE_USHORT16 * string byte-by-byte into the char *
+ // Copy the wchar_t * string byte-by-byte into the char *
// string.
for (size_t i = 0; i < this->len_; i++)
this->rep_[i] = char (s[i]);
@@ -285,6 +291,7 @@ ACE_CString::ACE_CString (const ACE_USHORT16 *s,
this->rep_[this->len_] = '\0';
}
}
+#endif /* ACE_HAS_WCHAR */
// this method might benefit from a little restructuring.
void
@@ -528,8 +535,8 @@ ACE_SString::ACE_SString (char c,
// Constructor that actually copies memory.
ACE_SString::ACE_SString (const char *s,
- size_t len,
- ACE_Allocator *alloc)
+ size_t len,
+ ACE_Allocator *alloc)
: allocator_ (alloc)
{
ACE_TRACE ("ACE_SString::ACE_SString");
@@ -598,6 +605,7 @@ ACE_SString::substring (size_t offset,
return ACE_SString (&rep_[offset], count, this->allocator_);
}
+#if defined (ACE_HAS_WCHAR)
ACE_ALLOC_HOOK_DEFINE(ACE_WString)
void
@@ -619,14 +627,14 @@ ACE_WString::ACE_WString (ACE_Allocator *alloc)
this->allocator_ = ACE_Allocator::instance ();
this->len_ = 0;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
/* static */
size_t
-ACE_WString::strlen (const ACE_USHORT16 *s)
+ACE_WString::strlen (const wchar_t *s)
{
ACE_TRACE ("ACE_WString::strlen");
@@ -673,17 +681,17 @@ ACE_WString::ACE_WString (const char *s,
if (s == 0)
{
this->len_ = 0;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
else
{
this->len_ = ACE_OS::strlen (s);
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
- // Copy the char * string byte-by-byte into the ACE_USHORT16 *
+ // Copy the char * string byte-by-byte into the wchar_t *
// string.
for (size_t i = 0; i < this->len_; i++)
this->rep_[i] = s[i];
@@ -695,7 +703,7 @@ ACE_WString::ACE_WString (const char *s,
// Constructor that actually copies memory.
-ACE_WString::ACE_WString (const ACE_USHORT16 *s,
+ACE_WString::ACE_WString (const wchar_t *s,
ACE_Allocator *alloc)
: allocator_ (alloc)
{
@@ -707,26 +715,26 @@ ACE_WString::ACE_WString (const ACE_USHORT16 *s,
if (s == 0)
{
this->len_ = 0;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
else
{
this->len_ = ACE_WString::strlen (s);
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
ACE_OS::memcpy (this->rep_,
s,
- this->len_ * sizeof (ACE_USHORT16));
+ this->len_ * sizeof (wchar_t));
// null terminate
this->rep_[this->len_] = 0;
}
}
-ACE_WString::ACE_WString (ACE_USHORT16 c,
+ACE_WString::ACE_WString (wchar_t c,
ACE_Allocator *alloc)
: allocator_ (alloc)
{
@@ -736,15 +744,15 @@ ACE_WString::ACE_WString (ACE_USHORT16 c,
this->allocator_ = ACE_Allocator::instance ();
this->len_ = 1;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
this->rep_[0] = c;
this->rep_[this->len_] = 0;
}
// Constructor that actually copies memory.
-ACE_WString::ACE_WString (const ACE_USHORT16 *s,
+ACE_WString::ACE_WString (const wchar_t *s,
size_t len,
ACE_Allocator *alloc)
: allocator_ (alloc)
@@ -757,19 +765,19 @@ ACE_WString::ACE_WString (const ACE_USHORT16 *s,
if (s == 0)
{
this->len_ = 0;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
else
{
this->len_ = len;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
ACE_OS::memcpy (this->rep_,
s,
- len * sizeof (ACE_USHORT16));
+ len * sizeof (wchar_t));
// null terminate
this->rep_[this->len_] = 0;
@@ -788,12 +796,12 @@ ACE_WString::ACE_WString (size_t len,
this->allocator_ = ACE_Allocator::instance ();
this->len_ = len;
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + 1) * sizeof (wchar_t));
ACE_OS::memset (this->rep_,
0,
- len * sizeof (ACE_USHORT16));
+ len * sizeof (wchar_t));
// NUL terminate.
this->rep_[this->len_] = 0;
}
@@ -809,11 +817,11 @@ ACE_WString::ACE_WString (const ACE_WString &s)
if (this->allocator_ == 0)
this->allocator_ = ACE_Allocator::instance ();
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((s.len_ + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((s.len_ + 1) * sizeof (wchar_t));
ACE_OS::memcpy ((void *) this->rep_,
(const void *) s.rep_,
- this->len_ * sizeof (ACE_USHORT16));
+ this->len_ * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
@@ -832,26 +840,26 @@ ACE_WString::operator= (const ACE_WString &s)
}
void
-ACE_WString::set (const ACE_USHORT16 *s)
+ACE_WString::set (const wchar_t *s)
{
this->set (s, ACE_WString::strlen (s));
}
void
-ACE_WString::set (const ACE_USHORT16 *s, size_t len)
+ACE_WString::set (const wchar_t *s, size_t len)
{
// Only reallocate if we don't have enough space...
if (this->len_ < len)
{
this->allocator_->free (this->rep_);
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((len + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((len + 1) * sizeof (wchar_t));
}
this->len_ = len;
ACE_OS::memcpy (this->rep_,
s,
- len * sizeof (ACE_USHORT16));
+ len * sizeof (wchar_t));
// NUL terminate.
this->rep_[len] = 0;
}
@@ -890,14 +898,14 @@ ACE_WString::resize (size_t len)
if (this->len_ < len)
{
this->allocator_->free (this->rep_);
- this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc
- ((len + 1) * sizeof (ACE_USHORT16));
+ this->rep_ = (wchar_t *) this->allocator_->malloc
+ ((len + 1) * sizeof (wchar_t));
}
this->len_ = len;
ACE_OS::memset (this->rep_,
0,
- this->len_ * sizeof (ACE_USHORT16));
+ this->len_ * sizeof (wchar_t));
this->rep_[this->len_] = 0;
}
@@ -907,15 +915,15 @@ ACE_WString &
ACE_WString::operator+= (const ACE_WString &s)
{
ACE_TRACE ("ACE_WString::operator+=");
- ACE_USHORT16 *t = (ACE_USHORT16 *) this->allocator_->malloc
- ((this->len_ + s.len_ + 1) * sizeof (ACE_USHORT16));
+ wchar_t *t = (wchar_t *) this->allocator_->malloc
+ ((this->len_ + s.len_ + 1) * sizeof (wchar_t));
ACE_OS::memcpy ((void *) t,
(const void *) this->rep_,
- this->len_ * sizeof (ACE_USHORT16));
+ this->len_ * sizeof (wchar_t));
ACE_OS::memcpy ((void *) (t + this->len_),
(const void *) s.rep_,
- s.len_ * sizeof (ACE_USHORT16));
+ s.len_ * sizeof (wchar_t));
this->len_ += s.len_;
// NUL terminate.
@@ -934,9 +942,9 @@ ACE_WString::~ACE_WString (void)
}
/* static */
-const ACE_USHORT16 *
-ACE_WString::strstr (const ACE_USHORT16 *s1,
- const ACE_USHORT16 *s2)
+const wchar_t *
+ACE_WString::strstr (const wchar_t *s1,
+ const wchar_t *s2)
{
ACE_TRACE ("ACE_WString::strstr");
@@ -954,10 +962,12 @@ ACE_WString::strstr (const ACE_USHORT16 *s1,
for (size_t i = 0; i <= len; i++)
{
- if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (ACE_USHORT16)) == 0)
+ if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (wchar_t)) == 0)
// Found a match! Return the index.
return s1 + i;
}
return 0;
}
+
+#endif /* ACE_HAS_WCHAR */
diff --git a/ace/SString.h b/ace/SString.h
index 650c480c02f..3c88b0aa61c 100644
--- a/ace/SString.h
+++ b/ace/SString.h
@@ -75,10 +75,12 @@ public:
ACE_CString (const ACE_CString &);
// Copy constructor.
- ACE_CString (const ACE_USHORT16 *s,
+#if defined (ACE_HAS_WCHAR)
+ ACE_CString (const wchar_t *s,
ACE_Allocator *alloc = 0);
// Constructor that copies <s> into dynamically allocated memory.
// Probable loss of data. Please use with care.
+#endif /* ACE_HAS_WCHAR */
ACE_CString (char c, ACE_Allocator *alloc = 0);
// Constructor that copies <c> into dynamically allocated memory.
@@ -202,6 +204,7 @@ ACE_Export ACE_INLINE ACE_CString operator + (const ACE_CString &, const ACE_CSt
ACE_Export ostream &operator << (ostream &, const ACE_CString &);
#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+#if defined (ACE_HAS_WCHAR)
class ACE_Export ACE_WString
{
// = TITLE
@@ -224,44 +227,44 @@ public:
ACE_Allocator *alloc = 0);
// Constructor that copies <s> into dynamically allocated memory.
- ACE_WString (const ACE_USHORT16 *s,
+ ACE_WString (const wchar_t *s,
ACE_Allocator *alloc = 0);
// Constructor that copies <s> into dynamically allocated memory.
- ACE_WString (const ACE_USHORT16 *s,
+ ACE_WString (const wchar_t *s,
size_t len,
ACE_Allocator *alloc = 0);
- // Constructor that copies <len> ACE_USHORT16's of <s> into dynamically
+ // Constructor that copies <len> wchar_t's of <s> into dynamically
// allocated memory (will NUL terminate the result).
ACE_WString (size_t len, ACE_Allocator *alloc = 0);
// Constructor that dynamically allocates memory for <len> + 1
- // ACE_USHORT16 characters. The newly created memory is set memset to 0.
+ // wchar_t characters. The newly created memory is set memset to 0.
ACE_WString (const ACE_WString &s);
// Copy constructor.
- ACE_WString (ACE_USHORT16 c, ACE_Allocator *alloc = 0);
+ ACE_WString (wchar_t c, ACE_Allocator *alloc = 0);
// Constructor that copies <c> into dynamically allocated memory.
~ACE_WString (void);
// Deletes the memory...
- ACE_USHORT16 operator [] (size_t slot) const;
+ wchar_t operator [] (size_t slot) const;
// Return the <slot'th> character in the string (doesn't perform
// bounds checking).
- ACE_USHORT16 &operator [] (size_t slot);
+ wchar_t &operator [] (size_t slot);
// Return the <slot'th> character by reference in the string
// (doesn't perform bounds checking).
ACE_WString &operator = (const ACE_WString &);
// Assignment operator (does copy memory).
- void set (const ACE_USHORT16 *s);
+ void set (const wchar_t *s);
// Copy <s>
- void set (const ACE_USHORT16 *s,
+ void set (const wchar_t *s,
size_t len);
// Copy <len> bytes of <s> (will NUL terminate the result)
@@ -282,16 +285,16 @@ public:
size_t length (void) const;
// Return the length of the string.
- ACE_USHORT16 *rep (void) const;
+ wchar_t *rep (void) const;
// Gets a copy of the underlying pointer.
char *char_rep (void) const;
// Transform into a copy of the ASCII character representation.
- const ACE_USHORT16 *fast_rep (void) const;
+ const wchar_t *fast_rep (void) const;
// Get at the underlying representation directly!
- const ACE_USHORT16 *c_str (void) const;
+ const wchar_t *c_str (void) const;
// Same as STL String's <c_str> and <fast_rep>.
int strstr (const ACE_WString &s) const;
@@ -302,15 +305,15 @@ public:
// Find <str> starting at pos. Returns the slot of the first
// location that matches, else npos.
- int find (const ACE_USHORT16 *s, int pos = 0) const;
+ int find (const wchar_t *s, int pos = 0) const;
// Find <s> starting at pos. Returns the slot of the first
// location that matches, else npos.
- int find (ACE_USHORT16 c, int pos = 0) const;
+ int find (wchar_t c, int pos = 0) const;
// Find <c> starting at pos. Returns the slot of the first
// location that matches, else npos.
- int rfind (ACE_USHORT16 c, int pos = npos) const;
+ int rfind (wchar_t c, int pos = npos) const;
// Find <c> starting at pos (counting from the end). Returns the
// slot of the first location that matches, else npos.
@@ -335,10 +338,10 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
- static size_t strlen (const ACE_USHORT16 *);
- // Computes the length of a "0" terminated ACE_USHORT16 *.
+ static size_t strlen (const wchar_t *);
+ // Computes the length of a "0" terminated wchar_t *.
- static const ACE_USHORT16 *strstr (const ACE_USHORT16 *s1, const ACE_USHORT16 *s2);
+ static const wchar_t *strstr (const wchar_t *s1, const wchar_t *s2);
// Traditional style strstr
void resize (size_t len);
@@ -354,7 +357,7 @@ private:
size_t len_;
// Length of the ACE_WString.
- ACE_USHORT16 *rep_;
+ wchar_t *rep_;
// Pointer to data.
};
@@ -363,6 +366,7 @@ ACE_Export ACE_INLINE ACE_WString operator+ (const ACE_WString &,
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
ACE_Export ostream &operator << (ostream &, const ACE_WString &);
#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
+#endif /* ACE_HAS_WCHAR */
class ACE_Export ACE_SString
{
@@ -503,11 +507,11 @@ ACE_Export ostream &operator << (ostream &, const ACE_SString &);
// This allows one to use W or C String based on the Unicode
// setting
-#if defined (UNICODE)
+#if defined (ACE_USES_WCHAR)
typedef ACE_WString ACE_TString;
-#else /* UNICODE */
+#else /* ACE_USES_WCHAR */
typedef ACE_CString ACE_TString;
-#endif /* UNICODE */
+#endif /* ACE_USES_WCHAR */
// ************************************************************
@@ -522,24 +526,24 @@ class ACE_Export ACE_Tokenizer
// preserve designators. Does not allow special characters, yet
// (e.g., printf ("\"like a quoted string\"")).
public:
- ACE_Tokenizer (LPTSTR buffer);
+ ACE_Tokenizer (ACE_TCHAR *buffer);
// <buffer> will be parsed.
- int delimiter (TCHAR d);
+ int delimiter (ACE_TCHAR d);
// <d> is a delimiter. Returns 0 on success, -1 if there is no
// memory left.
- int delimiter_replace (TCHAR d, TCHAR replacement);
+ int delimiter_replace (ACE_TCHAR d, ACE_TCHAR replacement);
// <d> is a delimiter and, when found, will be replaced by
// <replacement>. Returns 0 on success, -1 if there is no memory
// left.
- int preserve_designators (TCHAR start, TCHAR stop, int strip=1);
+ int preserve_designators (ACE_TCHAR start, ACE_TCHAR stop, int strip=1);
// For instance, quotes, or '(' and ')'. Returns 0 on success, -1
// if there is no memory left. If <strip> == 1, then the preserve
// designators will be stripped from the tokens returned by next.
- LPTSTR next (void);
+ ACE_TCHAR *next (void);
// Returns the next token.
enum {
@@ -548,17 +552,17 @@ public:
};
protected:
- int is_delimiter (TCHAR d, int &replace, TCHAR &r);
+ int is_delimiter (ACE_TCHAR d, int &replace, ACE_TCHAR &r);
// Returns 1 if <d> is a delimiter, 0 otherwise. If <d> should be
// replaced with <r>, <replace> is set to 1, otherwise 0.
- int is_preserve_designator (TCHAR start, TCHAR &stop, int &strip);
+ int is_preserve_designator (ACE_TCHAR start, ACE_TCHAR &stop, int &strip);
// If <start> is a start preserve designator, returns 1 and sets
// <stop> to the stop designator. Returns 0 if <start> is not a
// preserve designator.
private:
- LPTSTR buffer_;
+ ACE_TCHAR *buffer_;
int index_;
class Preserve_Entry
@@ -574,9 +578,9 @@ private:
// -)-. The strip determines whether the designators should be
// removed from the token.
public:
- TCHAR start_;
+ ACE_TCHAR start_;
// E.g., "(".
- TCHAR stop_;
+ ACE_TCHAR stop_;
// E.g., ")".
int strip_;
// Whether the designators should be removed from the token.
@@ -596,9 +600,9 @@ private:
// = DESCRIPTION
// Describes a delimiter for the tokenizer.
public:
- TCHAR delimiter_;
+ ACE_TCHAR delimiter_;
// Most commonly a space ' '.
- TCHAR replacement_;
+ ACE_TCHAR replacement_;
// What occurrences of delimiter_ should be replaced with.
int replace_;
// Whether replacement_ should be used. This should be replaced
diff --git a/ace/SString.i b/ace/SString.i
index 0b886f7d8a2..93f7c4ec8f8 100644
--- a/ace/SString.i
+++ b/ace/SString.i
@@ -312,6 +312,7 @@ ACE_CString::hash (void) const
return ACE::hash_pjw (this->rep_, this->len_);
}
+#if defined (ACE_HAS_WCHAR)
ACE_INLINE ACE_WString
operator+ (const ACE_WString &s,
const ACE_WString &t)
@@ -320,6 +321,7 @@ operator+ (const ACE_WString &s,
temp += t;
return temp;
}
+#endif /* ACE_HAS_WCHAR */
ACE_INLINE ACE_CString
operator+ (const ACE_CString &s, const ACE_CString &t)
@@ -500,6 +502,9 @@ ACE_SString::length (void) const
return this->len_;
}
+
+#if defined (ACE_HAS_WCHAR)
+
ACE_INLINE ACE_WString
ACE_WString::substr (size_t offset,
ssize_t length) const
@@ -509,7 +514,7 @@ ACE_WString::substr (size_t offset,
// Get a copy of the underlying representation.
-ACE_INLINE ACE_USHORT16 *
+ACE_INLINE wchar_t *
ACE_WString::rep (void) const
{
ACE_TRACE ("ACE_WString::rep");
@@ -517,9 +522,9 @@ ACE_WString::rep (void) const
return 0;
else
{
- ACE_USHORT16 *t;
- ACE_NEW_RETURN (t, ACE_USHORT16[this->len_ + 1], 0);
- ACE_OS::memcpy (t, this->rep_, this->len_ * sizeof (ACE_USHORT16));
+ wchar_t *t;
+ ACE_NEW_RETURN (t, wchar_t[this->len_ + 1], 0);
+ ACE_OS::memcpy (t, this->rep_, this->len_ * sizeof (wchar_t));
// 0 terminate
t[this->len_] = 0;
@@ -530,13 +535,13 @@ ACE_WString::rep (void) const
// Get at the underlying representation directly!
-ACE_INLINE const ACE_USHORT16 *
+ACE_INLINE const wchar_t *
ACE_WString::fast_rep (void) const
{
return this->rep_;
}
-ACE_INLINE const ACE_USHORT16 *
+ACE_INLINE const wchar_t *
ACE_WString::c_str (void) const
{
return this->rep_;
@@ -551,7 +556,7 @@ ACE_WString::operator== (const ACE_WString &s) const
return this->len_ == s.len_
&& ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- this->len_ * sizeof (ACE_USHORT16)) == 0;
+ this->len_ * sizeof (wchar_t)) == 0;
}
// Less than comparison operator.
@@ -563,10 +568,10 @@ ACE_WString::operator < (const ACE_WString &s) const
return (this->len_ < s.len_)
? (ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- this->len_ * sizeof (ACE_USHORT16)) <= 0)
+ this->len_ * sizeof (wchar_t)) <= 0)
: (ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- s.len_ * sizeof (ACE_USHORT16)) < 0);
+ s.len_ * sizeof (wchar_t)) < 0);
}
// Greater than comparison operator.
@@ -578,10 +583,10 @@ ACE_WString::operator > (const ACE_WString &s) const
return (this->len_ <= s.len_)
? (ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- this->len_ * sizeof (ACE_USHORT16)) > 0)
+ this->len_ * sizeof (wchar_t)) > 0)
: (ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- s.len_ * sizeof (ACE_USHORT16)) >= 0);
+ s.len_ * sizeof (wchar_t)) >= 0);
}
@@ -601,12 +606,12 @@ ACE_WString::compare (const ACE_WString &s) const
return ACE_OS::memcmp ((const void *) this->rep_,
(const void *) s.rep_,
- this->len_ * sizeof (ACE_USHORT16));
+ this->len_ * sizeof (wchar_t));
}
// Return the <slot'th> character in the string.
-ACE_INLINE ACE_USHORT16
+ACE_INLINE wchar_t
ACE_WString::operator[] (size_t slot) const
{
ACE_TRACE ("ACE_WString::operator[]");
@@ -615,7 +620,7 @@ ACE_WString::operator[] (size_t slot) const
// Return the <slot'th> character in the string.
-ACE_INLINE ACE_USHORT16 &
+ACE_INLINE wchar_t &
ACE_WString::operator[] (size_t slot)
{
ACE_TRACE ("ACE_WString::operator[]");
@@ -623,10 +628,10 @@ ACE_WString::operator[] (size_t slot)
}
ACE_INLINE int
-ACE_WString::find (const ACE_USHORT16 *s, int pos) const
+ACE_WString::find (const wchar_t *s, int pos) const
{
- ACE_USHORT16 *substr = this->rep_ + pos;
- const ACE_USHORT16 *pointer = ACE_WString::strstr (substr, s);
+ wchar_t *substr = this->rep_ + pos;
+ const wchar_t *pointer = ACE_WString::strstr (substr, s);
if (pointer == 0)
return ACE_WString::npos;
else
@@ -634,7 +639,7 @@ ACE_WString::find (const ACE_USHORT16 *s, int pos) const
}
ACE_INLINE int
-ACE_WString::find (ACE_USHORT16 c, int pos) const
+ACE_WString::find (wchar_t c, int pos) const
{
if (pos == ACE_WString::npos)
pos = this->len_;
@@ -661,7 +666,7 @@ ACE_WString::find (const ACE_WString &str, int pos) const
}
ACE_INLINE int
-ACE_WString::rfind (ACE_USHORT16 c, int pos) const
+ACE_WString::rfind (wchar_t c, int pos) const
{
if (pos == ACE_WString::npos)
pos = this->len_;
@@ -686,6 +691,8 @@ ACE_WString::hash (void) const
return ACE::hash_pjw (this->rep_);
}
+#endif /* ACE_HAS_WCHAR */
+
ACE_INLINE
ACE_Auto_String_Free::ACE_Auto_String_Free (char* p)
: p_ (p)
diff --git a/ace/SV_Message_Queue.cpp b/ace/SV_Message_Queue.cpp
index d771ab4395e..b1090c1c3f8 100644
--- a/ace/SV_Message_Queue.cpp
+++ b/ace/SV_Message_Queue.cpp
@@ -33,6 +33,6 @@ ACE_SV_Message_Queue::ACE_SV_Message_Queue (key_t external_id,
{
ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue");
if (this->open (external_id, create, perms) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue")));
}
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp
index df8742bf388..401157b20f0 100644
--- a/ace/SV_Semaphore_Complex.cpp
+++ b/ace/SV_Semaphore_Complex.cpp
@@ -217,7 +217,7 @@ ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k,
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
if (this->open (k, flags, initial_value, nsems, perms) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_SV_Semaphore_Complex")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore_Complex")));
}
ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (const char *name,
@@ -236,7 +236,7 @@ ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (const char *name,
key = this->name_2_key (name);
if (this->open (key, flags, initial_value, nsems, perms) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_SV_Semaphore_Complex")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore_Complex")));
}
ACE_SV_Semaphore_Complex::~ACE_SV_Semaphore_Complex (void)
diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp
index 4076d36a247..176c06d2bb8 100644
--- a/ace/SV_Semaphore_Simple.cpp
+++ b/ace/SV_Semaphore_Simple.cpp
@@ -109,7 +109,7 @@ ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (key_t k,
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
if (this->open (k, flags, initial_value, n, perms) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_SV_Semaphore::ACE_SV_Semaphore")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore::ACE_SV_Semaphore")));
}
// Convert name to key. This function is used internally to create keys
@@ -171,8 +171,8 @@ ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (const char *name,
n,
perms) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple")));
}
ACE_SV_Semaphore_Simple::~ACE_SV_Semaphore_Simple (void)
diff --git a/ace/SV_Shared_Memory.cpp b/ace/SV_Shared_Memory.cpp
index 1cf666b0d69..a0b0ebedca5 100644
--- a/ace/SV_Shared_Memory.cpp
+++ b/ace/SV_Shared_Memory.cpp
@@ -49,8 +49,8 @@ ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (key_t external_id,
ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
if (this->open_and_attach (external_id, sz, create,
perms, virtual_addr, flags) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
}
// The "do nothing" constructor.
@@ -77,6 +77,6 @@ ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (ACE_HANDLE int_id,
{
ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
if (this->attach (0, flags) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
}
diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp
index 4575d87adb8..e88dc89fb24 100644
--- a/ace/Select_Reactor_Base.cpp
+++ b/ace/Select_Reactor_Base.cpp
@@ -432,8 +432,8 @@ ACE_Select_Reactor_Handler_Repository_Iterator::dump (void) const
ACE_TRACE ("ACE_Select_Reactor_Handler_Repository_Iterator::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("rep_ = %u"), this->rep_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("current_ = %d"), this->current_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rep_ = %u"), this->rep_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %d"), this->current_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -444,19 +444,19 @@ ACE_Select_Reactor_Handler_Repository::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%t) max_handlep1_ = %d, max_size_ = %d\n"),
+ ACE_TEXT ("(%t) max_handlep1_ = %d, max_size_ = %d\n"),
this->max_handlep1_, this->max_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("[")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("[")));
ACE_Event_Handler *eh = 0;
for (ACE_Select_Reactor_Handler_Repository_Iterator iter (this);
iter.next (eh) != 0;
iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (eh = %x, eh->handle_ = %d)"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (eh = %x, eh->handle_ = %d)"),
eh, eh->get_handle ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" ]")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" ]")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -489,7 +489,7 @@ ACE_Select_Reactor_Notify::dump (void) const
ACE_TRACE ("ACE_Select_Reactor_Notify::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("select_reactor_ = %x"), this->select_reactor_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("select_reactor_ = %x"), this->select_reactor_));
this->notification_pipe_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -724,14 +724,14 @@ ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
break;
else if (notify_queue_.dequeue_head (temp) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("dequeue_head")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("dequeue_head")),
-1);
buffer = *temp;
if (free_queue_.enqueue_head (temp) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("enqueue_head")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("enqueue_head")),
-1);
}
@@ -758,7 +758,7 @@ ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
break;
default:
// Should we bail out if we get an invalid mask?
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("invalid mask = %d\n"), buffer.mask_));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("invalid mask = %d\n"), buffer.mask_));
}
if (result == -1)
buffer.eh_->handle_close (ACE_INVALID_HANDLE,
@@ -796,7 +796,7 @@ ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
default:
// Should we bail out if we get an invalid mask?
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("invalid mask = %d\n"),
+ ACE_TEXT ("invalid mask = %d\n"),
buffer.mask_));
}
if (result == -1)
diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp
index 1fc9877db26..a643a325cbc 100644
--- a/ace/Select_Reactor_T.cpp
+++ b/ace/Select_Reactor_T.cpp
@@ -189,7 +189,7 @@ ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::dump (void) const
ACE_TRACE ("ACE_Select_Reactor_Token::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -235,8 +235,8 @@ ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::sleep_hook (void)
ACE_TRACE ("ACE_Select_Reactor_Token::sleep_hook");
if (this->select_reactor_->notify () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("sleep_hook failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("sleep_hook failed")));
}
template <class ACE_SELECT_REACTOR_TOKEN> int
@@ -516,9 +516,9 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ACE_Select_Reactor_T
disable_notify_pipe,
notify) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Select_Reactor_T::open ")
- ASYS_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Select_Reactor_T::open ")
+ ACE_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
}
// Initialize ACE_Select_Reactor_T.
@@ -546,9 +546,9 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ACE_Select_Reactor_T
disable_notify_pipe,
notify) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Select_Reactor_T::open ")
- ASYS_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Select_Reactor_T::open ")
+ ACE_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
}
// Close down the ACE_Select_Reactor_T instance, detaching any
@@ -1024,7 +1024,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_set
&& number_of_handlers_dispatched < number_of_active_handles
&& this->state_changed_ == 0)
{
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Select_Reactor_T::dispatching\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatching\n")));
number_of_handlers_dispatched++;
this->notify_handle (handle,
mask,
@@ -1049,7 +1049,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_handlers
// obscure case of piggy-backed data coming along with the final
// handshake message of a nonblocking connection).
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Select_Reactor_T::dispatch - WRITE\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - WRITE\n")));
if (this->dispatch_io_set (number_of_active_handles,
number_of_handlers_dispatched,
ACE_Event_Handler::WRITE_MASK,
@@ -1061,7 +1061,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_handlers
return -1;
}
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Select_Reactor_T::dispatch - EXCEPT\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - EXCEPT\n")));
if (this->dispatch_io_set (number_of_active_handles,
number_of_handlers_dispatched,
ACE_Event_Handler::EXCEPT_MASK,
@@ -1073,7 +1073,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_handlers
return -1;
}
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Select_Reactor_T::dispatch - READ\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - READ\n")));
if (this->dispatch_io_set (number_of_active_handles,
number_of_handlers_dispatched,
ACE_Event_Handler::READ_MASK,
@@ -1315,7 +1315,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dump (void) const
this->handler_rep_.dump ();
this->signal_handler_->dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("delete_signal_handler_ = %d\n"),
+ ACE_TEXT ("delete_signal_handler_ = %d\n"),
this->delete_signal_handler_));
ACE_HANDLE h;
@@ -1323,37 +1323,37 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dump (void) const
for (ACE_Handle_Set_Iterator handle_iter_wr (this->wait_set_.wr_mask_);
(h = handle_iter_wr ()) != ACE_INVALID_HANDLE;
++handle_iter_wr)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("write_handle = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("write_handle = %d\n"), h));
for (ACE_Handle_Set_Iterator handle_iter_rd (this->wait_set_.rd_mask_);
(h = handle_iter_rd ()) != ACE_INVALID_HANDLE;
++handle_iter_rd)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("read_handle = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("read_handle = %d\n"), h));
for (ACE_Handle_Set_Iterator handle_iter_ex (this->wait_set_.ex_mask_);
(h = handle_iter_ex ()) != ACE_INVALID_HANDLE;
++handle_iter_ex)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("except_handle = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("except_handle = %d\n"), h));
for (ACE_Handle_Set_Iterator handle_iter_wr_ready (this->ready_set_.wr_mask_);
(h = handle_iter_wr_ready ()) != ACE_INVALID_HANDLE;
++handle_iter_wr_ready)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("write_handle_ready = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("write_handle_ready = %d\n"), h));
for (ACE_Handle_Set_Iterator handle_iter_rd_ready (this->ready_set_.rd_mask_);
(h = handle_iter_rd_ready ()) != ACE_INVALID_HANDLE;
++handle_iter_rd_ready)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("read_handle_ready = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("read_handle_ready = %d\n"), h));
for (ACE_Handle_Set_Iterator handle_iter_ex_ready (this->ready_set_.ex_mask_);
(h = handle_iter_ex_ready ()) != ACE_INVALID_HANDLE;
++handle_iter_ex_ready)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("except_handle_ready = %d\n"), h));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("except_handle_ready = %d\n"), h));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("restart_ = %d\n"), this->restart_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nrequeue_position_ = %d\n"), this->requeue_position_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ninitialized_ = %d\n"), this->initialized_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nowner_ = %d\n"), this->owner_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("restart_ = %d\n"), this->restart_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrequeue_position_ = %d\n"), this->requeue_position_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ninitialized_ = %d\n"), this->initialized_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nowner_ = %d\n"), this->owner_));
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
this->notify_handler_->dump ();
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index e754e0b312b..bbbe1a51d4f 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -55,7 +55,7 @@ int ACE_Service_Config::signum_ = SIGHUP;
// Indicates where to write the logging output. This is typically
// either a STREAM pipe or a socket address.
-LPCTSTR ACE_Service_Config::logger_key_ = ACE_DEFAULT_LOGGER_KEY;
+const ACE_TCHAR *ACE_Service_Config::logger_key_ = ACE_DEFAULT_LOGGER_KEY;
// The ACE_Service_Manager static service object is now defined by the
// ACE_Object_Manager, in Object_Manager.cpp.
@@ -146,7 +146,7 @@ ACE_Service_Config::thr_mgr (ACE_Thread_Manager *tm)
// ACE_Reactor, and unlinking it if necessary.
int
-ACE_Service_Config::remove (const ASYS_TCHAR svc_name[])
+ACE_Service_Config::remove (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::remove");
return ACE_Service_Repository::instance ()->remove (svc_name);
@@ -159,7 +159,7 @@ ACE_Service_Config::remove (const ASYS_TCHAR svc_name[])
// can be resumed later on by calling the <resume> method...
int
-ACE_Service_Config::suspend (const ASYS_TCHAR svc_name[])
+ACE_Service_Config::suspend (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::suspend");
return ACE_Service_Repository::instance ()->suspend (svc_name);
@@ -169,7 +169,7 @@ ACE_Service_Config::suspend (const ASYS_TCHAR svc_name[])
// been resumed (e.g., a static service).
int
-ACE_Service_Config::resume (const ASYS_TCHAR svc_name[])
+ACE_Service_Config::resume (const ACE_TCHAR svc_name[])
{
ACE_TRACE ("ACE_Service_Config::resume");
return ACE_Service_Repository::instance ()->resume (svc_name);
@@ -210,12 +210,12 @@ ACE_Service_Config::init_svc_conf_file_queue (void)
// ACE_Service_Config.
int
-ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
+ACE_Service_Config::parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_TRACE ("ACE_Service_Config::parse_args");
ACE_Get_Opt getopt (argc,
argv,
- ASYS_TEXT ("bdf:k:nys:S:"),
+ ACE_TEXT ("bdf:k:nys:S:"),
1); // Start at argv[1].
if (ACE_Service_Config::init_svc_conf_file_queue () == -1)
@@ -232,15 +232,14 @@ ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
break;
case 'f':
if (ACE_Service_Config::svc_conf_file_queue_->enqueue_tail
- (ACE_CString (getopt.optarg)) == -1)
+ (ACE_TString (getopt.optarg)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
"enqueue_tail"),
-1);
break;
case 'k':
- ACE_Service_Config::logger_key_ =
- ASYS_ONLY_WIDE_STRING (getopt.optarg);
+ ACE_Service_Config::logger_key_ = getopt.optarg;
break;
case 'n':
ACE_Service_Config::no_static_svcs_ = 1;
@@ -260,7 +259,7 @@ ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
(ACE_Service_Config::signum_,
ACE_Service_Config::signal_handler_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("cannot obtain signal handler\n")),
+ ACE_TEXT ("cannot obtain signal handler\n")),
-1);
#endif /* ACE_LACKS_UNIX_SIGNALS */
break;
@@ -271,16 +270,16 @@ ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
ACE_SVC_QUEUE,
-1);
if (ACE_Service_Config::svc_queue_->enqueue_tail
- (ACE_CString (getopt.optarg)) == -1)
+ (ACE_TString (getopt.optarg)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
"enqueue_tail"),
-1);
break;
default:
if (ACE::debug () > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%c is not a ACE_Service_Config option\n"),
+ ACE_TEXT ("%c is not a ACE_Service_Config option\n"),
c));
}
@@ -290,8 +289,8 @@ ACE_Service_Config::parse_args (int argc, ASYS_TCHAR *argv[])
// Initialize and activate a statically linked service.
int
-ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
- ASYS_TCHAR *parameters)
+ACE_Service_Config::initialize (const ACE_TCHAR svc_name[],
+ ACE_TCHAR *parameters)
{
ACE_TRACE ("ACE_Service_Config::initialize");
ACE_ARGV args (parameters);
@@ -299,14 +298,14 @@ ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("opening static service %s\n"),
+ ACE_TEXT ("opening static service %s\n"),
svc_name));
if (ACE_Service_Repository::instance ()->find
(svc_name,
(const ACE_Service_Type **) &srp) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%s not found\n"),
+ ACE_TEXT ("%s not found\n"),
svc_name),
-1);
else if (srp->type ()->init (args.argc (),
@@ -314,7 +313,7 @@ ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
{
// Remove this entry.
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("static initialization failed, %p\n"),
+ ACE_TEXT ("static initialization failed, %p\n"),
svc_name));
ACE_Service_Repository::instance ()->remove (svc_name);
return -1;
@@ -331,26 +330,26 @@ ACE_Service_Config::initialize (const ASYS_TCHAR svc_name[],
int
ACE_Service_Config::initialize (const ACE_Service_Type *sr,
- ASYS_TCHAR parameters[])
+ ACE_TCHAR parameters[])
{
ACE_TRACE ("ACE_Service_Config::initialize");
ACE_ARGV args (parameters);
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("opening dynamic service %s\n"),
+ ACE_TEXT ("opening dynamic service %s\n"),
sr->name ()));
if (ACE_Service_Repository::instance ()->insert (sr) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("insertion failed, %p\n"),
+ ACE_TEXT ("insertion failed, %p\n"),
sr->name ()),
-1);
else if (sr->type ()->init (args.argc (),
args.argv ()) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dynamic initialization failed for %s\n"),
+ ACE_TEXT ("dynamic initialization failed for %s\n"),
sr->name ()));
ACE_Service_Repository::instance ()->remove (sr->name ());
return -1;
@@ -394,7 +393,7 @@ ACE_Service_Config::process_directives_i (void)
}
int
-ACE_Service_Config::process_directive (const ASYS_TCHAR directive[])
+ACE_Service_Config::process_directive (const ACE_TCHAR directive[])
{
ACE_TRACE ("ACE_Service_Config::process_directives");
ACE_UNUSED_ARG (directive);
@@ -425,7 +424,7 @@ ACE_Service_Config::process_directives (void)
if (ACE_Service_Config::svc_conf_file_queue_ != 0)
{
- ACE_CString *sptr = 0;
+ ACE_TString *sptr = 0;
ACE_SVC_QUEUE &queue = *ACE_Service_Config::svc_conf_file_queue_;
// Iterate through all the svc.conf files.
@@ -433,20 +432,16 @@ ACE_Service_Config::process_directives (void)
iter.next (sptr) != 0;
iter.advance ())
{
- // @@ We can remove the ASYS_WIDE_STRING stuff when this is
- // defined as an ACE_WString...
- FILE *fp = ACE_OS::fopen (ASYS_WIDE_STRING (sptr->fast_rep ()),
- ASYS_TEXT ("r"));
+ FILE *fp = ACE_OS::fopen (sptr->fast_rep (),
+ ACE_TEXT ("r"));
if (fp == 0)
{
// Invalid svc.conf file. We'll report it here and
// break out of the method.
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%p\n"),
- // @@ Beware of the WString here... Not
- // sure how to fix this with %p...
- ASYS_WIDE_STRING (sptr->fast_rep ())));
+ ACE_TEXT ("%p\n"),
+ sptr->fast_rep ()));
errno = ENOENT;
result = -1;
break;
@@ -471,7 +466,7 @@ ACE_Service_Config::process_commandline_directives (void)
if (ACE_Service_Config::svc_queue_ != 0)
{
- ACE_CString *sptr = 0;
+ ACE_TString *sptr = 0;
ACE_SVC_QUEUE &queue = *ACE_Service_Config::svc_queue_;
for (ACE_SVC_QUEUE_ITERATOR iter (queue);
@@ -480,11 +475,11 @@ ACE_Service_Config::process_commandline_directives (void)
{
// Process just a single directive.
if (ACE_Service_Config::process_directive
- (ASYS_WIDE_STRING (sptr->fast_rep ())) == -1)
+ (sptr->fast_rep ()) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("process_directive")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("process_directive")));
result = -1;
}
}
@@ -542,8 +537,8 @@ ACE_Service_Config::load_static_svcs (void)
// Performs an open without parsing command-line arguments.
int
-ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key,
+ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key,
int ignore_default_svc_conf_file,
int ignore_debug_flag)
{
@@ -568,9 +563,9 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
// Load the default "svc.conf" entry here if there weren't
// overriding -f arguments in <parse_args>.
&& ACE_Service_Config::svc_conf_file_queue_->enqueue_tail
- (ACE_CString (ACE_DEFAULT_SVC_CONF)) == -1)
+ (ACE_TString (ACE_DEFAULT_SVC_CONF)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
"enqueue_tail"),
-1);
@@ -595,7 +590,7 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
// Only use STDERR if the caller hasn't already set the flags.
flags = (u_long) ACE_Log_Msg::STDERR;
- LPCTSTR key = logger_key;
+ const ACE_TCHAR *key = logger_key;
if (key == 0 || ACE_OS::strcmp (key, ACE_DEFAULT_LOGGER_KEY) == 0)
// Only use the static <logger_key_> if the caller doesn't
@@ -611,7 +606,7 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
{
if (ACE::debug ())
ACE_DEBUG ((LM_STARTUP,
- ASYS_TEXT ("starting up daemon %n\n")));
+ ACE_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).
@@ -629,7 +624,7 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
(ACE_Service_Config::signum_,
ACE_Service_Config::signal_handler_) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("can't register signal handler\n")));
+ ACE_TEXT ("can't register signal handler\n")));
#endif /* ACE_LACKS_UNIX_SIGNALS */
// See if we need to load the static services.
@@ -666,8 +661,8 @@ ACE_Service_Config::open_i (const ASYS_TCHAR program_name[],
return result;
}
-ACE_Service_Config::ACE_Service_Config (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key)
+ACE_Service_Config::ACE_Service_Config (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key)
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
@@ -677,7 +672,7 @@ ACE_Service_Config::ACE_Service_Config (const ASYS_TCHAR program_name[],
// Only print out an error if it wasn't the svc.conf file that was
// missing.
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
+ ACE_TEXT ("%p\n"),
program_name));
}
@@ -713,13 +708,13 @@ ACE_Service_Config::reconfigure (void)
#endif /* ! ACE_NLOGGING */
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("beginning reconfiguration at %s"),
+ ACE_TEXT ("beginning reconfiguration at %s"),
ACE_OS::ctime (&t)));
}
if (ACE_Service_Config::process_directives () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("process_directives")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("process_directives")));
}
// Run the event loop until the <ACE_Reactor::handle_events>
@@ -878,22 +873,22 @@ ACE_Service_Config::start_daemon (void)
template class ACE_Node<ACE_Static_Svc_Descriptor *>;
template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>;
template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>;
-template class ACE_Node<ACE_CString>;
-template class ACE_Unbounded_Queue<ACE_CString>;
-template class ACE_Unbounded_Queue_Iterator<ACE_CString>;
-template class ACE_Unbounded_Set<ACE_CString>;
-template class ACE_Unbounded_Set_Iterator<ACE_CString>;
+template class ACE_Node<ACE_TString>;
+template class ACE_Unbounded_Queue<ACE_TString>;
+template class ACE_Unbounded_Queue_Iterator<ACE_TString>;
+template class ACE_Unbounded_Set<ACE_TString>;
+template class ACE_Unbounded_Set_Iterator<ACE_TString>;
template class auto_ptr<ACE_Obstack>;
template class ACE_Auto_Basic_Ptr<ACE_Obstack>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Node<ACE_Static_Svc_Descriptor *>
#pragma instantiate ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>
#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>
-#pragma instantiate ACE_Node<ACE_CString>
-#pragma instantiate ACE_Unbounded_Queue<ACE_CString>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_CString>
-#pragma instantiate ACE_Unbounded_Set<ACE_CString>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_CString>
+#pragma instantiate ACE_Node<ACE_TString>
+#pragma instantiate ACE_Unbounded_Queue<ACE_TString>
+#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_TString>
+#pragma instantiate ACE_Unbounded_Set<ACE_TString>
+#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_TString>
#pragma instantiate auto_ptr<ACE_Obstack>
#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Obstack>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
index 299c07eb4de..372c677ff06 100644
--- a/ace/Service_Config.h
+++ b/ace/Service_Config.h
@@ -46,7 +46,7 @@ class ACE_Static_Svc_Descriptor
// Holds the information necessary to describe a statically linked
// Svc.
public:
- const ASYS_TCHAR *name_;
+ const ACE_TCHAR *name_;
// Name of the service.
int type_;
@@ -80,9 +80,9 @@ typedef ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>
// Maintain a queue of services to be configured from the
// command-line.
-typedef ACE_Unbounded_Queue<ACE_CString>
+typedef ACE_Unbounded_Queue<ACE_TString>
ACE_SVC_QUEUE;
-typedef ACE_Unbounded_Queue_Iterator<ACE_CString>
+typedef ACE_Unbounded_Queue_Iterator<ACE_TString>
ACE_SVC_QUEUE_ITERATOR;
class ACE_Export ACE_Service_Config
@@ -115,14 +115,14 @@ public:
int signum = SIGHUP);
// Initialize the Service Repository.
- ACE_Service_Config (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY);
+ ACE_Service_Config (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY);
// Performs an open without parsing command-line arguments. The
// <logger_key> indicates where to write the logging output, which
// is typically either a STREAM pipe or a socket address.
- static int open_i (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY,
+ static int open_i (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
int ignore_default_svc_conf_file = 0,
int ignore_debug_flag = 0);
// Performs an open without parsing command-line arguments. The
@@ -134,8 +134,8 @@ public:
// <ACE_Log_Msg::priority_mask> appropriately. Returns number of
// errors that occurred on failure and 0 otherwise.
- static int open (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY,
+ static int open (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
int ignore_static_svcs = 1,
int ignore_default_svc_conf_file = 0,
int ignore_debug_flag = 0);
@@ -153,8 +153,8 @@ public:
// <ACE_Log_Msg::priority_mask> appropriately.
static int open (int argc,
- ASYS_TCHAR *argv[],
- LPCTSTR logger_key = ACE_DEFAULT_LOGGER_KEY,
+ ACE_TCHAR *argv[],
+ const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
int ignore_static_svcs = 1,
int ignore_default_svc_conf = 0,
int ignore_debug_flag = 0);
@@ -308,19 +308,19 @@ public:
// = Utility methods.
static int initialize (const ACE_Service_Type *,
- ASYS_TCHAR parameters[]);
+ ACE_TCHAR parameters[]);
// Dynamically link the shared object file and retrieve a pointer to
// the designated shared object in this file.
- static int initialize (const ASYS_TCHAR svc_name[],
- ASYS_TCHAR parameters[]);
+ static int initialize (const ACE_TCHAR svc_name[],
+ ACE_TCHAR parameters[]);
// Initialize and activate a statically <svc_name> service.
- static int resume (const ASYS_TCHAR svc_name[]);
+ static int resume (const ACE_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 ASYS_TCHAR svc_name[]);
+ static int suspend (const ACE_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 <suspend>
@@ -328,7 +328,7 @@ public:
// service can be resumed later on by calling the <RESUME> member
// function...
- static int remove (const ASYS_TCHAR svc_name[]);
+ static int remove (const ACE_TCHAR svc_name[]);
// Totally remove <svc_name> from the daemon by removing it
// from the ACE_Reactor, and unlinking it if necessary.
@@ -351,7 +351,7 @@ public:
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
- static int process_directive (const ASYS_TCHAR directive[]);
+ static int process_directive (const ACE_TCHAR directive[]);
// Process one service configuration <directive>, which is passed as
// a string. Returns the number of errors that occurred.
@@ -373,7 +373,7 @@ protected:
// <process_directive> both call. Returns the number of errors that
// occurred.
- static int parse_args (int, ASYS_TCHAR *argv[]);
+ static int parse_args (int, ACE_TCHAR *argv[]);
// Handle the command-line options intended for the
// <ACE_Service_Config>. Note that <argv[0]> is assumed to be the
// program name.
@@ -398,7 +398,7 @@ protected:
// <ACE_Service_Repository>.
private:
- static LPCTSTR logger_key_;
+ static const ACE_TCHAR *logger_key_;
// Indicates where to write the logging output. This is typically
// either a STREAM pipe or a socket address.
diff --git a/ace/Service_Config.i b/ace/Service_Config.i
index f4129aae6d0..aab1230c0d7 100644
--- a/ace/Service_Config.i
+++ b/ace/Service_Config.i
@@ -7,8 +7,8 @@
// constructor just handles simple initializations).
ACE_INLINE int
-ACE_Service_Config::open (const ASYS_TCHAR program_name[],
- LPCTSTR logger_key,
+ACE_Service_Config::open (const ACE_TCHAR program_name[],
+ const ACE_TCHAR *logger_key,
int ignore_static_svcs,
int ignore_default_svc_conf,
int ignore_debug_flag)
@@ -24,8 +24,8 @@ ACE_Service_Config::open (const ASYS_TCHAR program_name[],
ACE_INLINE int
ACE_Service_Config::open (int argc,
- ASYS_TCHAR *argv[],
- LPCTSTR logger_key,
+ ACE_TCHAR *argv[],
+ const ACE_TCHAR *logger_key,
int ignore_static_svcs,
int ignore_default_svc_conf,
int ignore_debug_flag)
@@ -63,30 +63,30 @@ ACE_Service_Config::signal_handler (ACE_Sig_Adapter *signal_handler)
ACE_INLINE int
ACE_Service_Config::initialize (const ACE_Service_Type *sp, char parameters[])
{
- return ACE_Service_Config::initialize (sp, ACE_WIDE_STRING (parameters));
+ return ACE_Service_Config::initialize (sp, parameters);
}
ACE_INLINE int
ACE_Service_Config::initialize (const char svc_name[], char parameters[])
{
- return ACE_Service_Config::initialize (ACE_WIDE_STRING (svc_name), ACE_WIDE_STRING (parameters));
+ return ACE_Service_Config::initialize (svc_name, ACE_WIDE_STRING (parameters));
}
ACE_INLINE int
ACE_Service_Config::resume (const char svc_name[])
{
- return ACE_Service_Config::resume (ACE_WIDE_STRING (svc_name));
+ return ACE_Service_Config::resume (svc_name);
}
ACE_INLINE int
ACE_Service_Config::suspend (const char svc_name[])
{
- return ACE_Service_Config::suspend (ACE_WIDE_STRING (svc_name));
+ return ACE_Service_Config::suspend (svc_name);
}
ACE_INLINE int
ACE_Service_Config::remove (const char svc_name[])
{
- return ACE_Service_Config::remove (ACE_WIDE_STRING (svc_name));
+ return ACE_Service_Config::remove (svc_name);
}
#endif /* ACE_HAS_WINCE */
diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp
index 2a99deec0ea..40425194e9c 100644
--- a/ace/Service_Manager.cpp
+++ b/ace/Service_Manager.cpp
@@ -58,20 +58,20 @@ ACE_Service_Manager::open (const ACE_INET_Addr &sia)
}
int
-ACE_Service_Manager::info (ASYS_TCHAR **strp, size_t length) const
+ACE_Service_Manager::info (ACE_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Service_Manager::info");
ACE_INET_Addr sa;
- ASYS_TCHAR buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
if (this->acceptor_.get_local_addr (sa) == -1)
return -1;
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%d/%s %s"),
+ ACE_TEXT ("%d/%s %s"),
sa.get_port_number (),
- ASYS_TEXT ("tcp"),
- ASYS_TEXT ("# lists all services in the daemon\n"));
+ ACE_TEXT ("tcp"),
+ ACE_TEXT ("# lists all services in the daemon\n"));
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
else
@@ -80,11 +80,11 @@ ACE_Service_Manager::info (ASYS_TCHAR **strp, size_t length) const
}
int
-ACE_Service_Manager::init (int argc, ASYS_TCHAR *argv[])
+ACE_Service_Manager::init (int argc, ACE_TCHAR *argv[])
{
ACE_TRACE ("ACE_Service_Manager::init");
ACE_INET_Addr local_addr (ACE_Service_Manager::DEFAULT_PORT_);
- ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dp:s:"), 0); // Start at argv[0]
+ ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dp:s:"), 0); // Start at argv[0]
for (int c; (c = getopt ()) != -1; )
switch (c)
@@ -105,13 +105,13 @@ ACE_Service_Manager::init (int argc, ASYS_TCHAR *argv[])
if (this->get_handle () == ACE_INVALID_HANDLE &&
this->open (local_addr) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("open")), -1);
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")), -1);
else if (ACE_Reactor::instance ()->register_handler
(this,
ACE_Event_Handler::ACCEPT_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("registering service with ACE_Reactor\n")),
+ ACE_TEXT ("registering service with ACE_Reactor\n")),
-1);
return 0;
}
@@ -168,8 +168,8 @@ ACE_Service_Manager::list_services (void)
sri.advance ())
{
int len = ACE_OS::strlen (sr->name ()) + 1;
- ASYS_TCHAR buf[BUFSIZ];
- ASYS_TCHAR *p = buf + len;
+ ACE_TCHAR buf[BUFSIZ];
+ ACE_TCHAR *p = buf + len;
ACE_OS::strcpy (buf, sr->name ());
@@ -180,20 +180,20 @@ ACE_Service_Manager::list_services (void)
if (this->debug_)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("len = %d, info = %s%s"),
+ ACE_TEXT ("len = %d, info = %s%s"),
len,
buf,
- buf[len - 1] == '\n' ? ASYS_TEXT ("") : ASYS_TEXT ("\n")));
+ buf[len - 1] == '\n' ? ACE_TEXT ("") : ACE_TEXT ("\n")));
if (len > 0)
{
- ssize_t n = this->client_stream_.send_n (ASYS_ONLY_MULTIBYTE_STRING (buf),
+ ssize_t n = this->client_stream_.send_n (buf,
len);
if (n != len || (n == -1 && errno != EPIPE))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("send_n")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("send_n")));
}
}
@@ -250,14 +250,14 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
if (this->debug_)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("client_stream fd = %d\n"),
+ ACE_TEXT ("client_stream fd = %d\n"),
this->client_stream_.get_handle ()));
ACE_INET_Addr sa;
if (this->client_stream_.get_remote_addr (sa) == -1)
return -1;
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("accepted from host %s at port %d\n"),
+ ACE_TEXT ("accepted from host %s at port %d\n"),
sa.get_host_name (),
sa.get_port_number ()));
}
@@ -271,8 +271,8 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
case -1:
if (this->debug_)
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("recv")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("recv")));
break;
case 0:
return 0;
@@ -309,7 +309,7 @@ ACE_Service_Manager::handle_input (ACE_HANDLE)
if (this->client_stream_.close () == -1 && this->debug_)
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("close")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("close")));
return 0;
}
diff --git a/ace/Service_Manager.h b/ace/Service_Manager.h
index ac03ec0237c..f628b65c413 100644
--- a/ace/Service_Manager.h
+++ b/ace/Service_Manager.h
@@ -60,8 +60,8 @@ protected:
// information back to the client.
// = Dynamic linking hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
- virtual int info (ASYS_TCHAR **info_string, size_t length) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int info (ACE_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 1243ffc9481..e768ebee113 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -20,14 +20,11 @@ ACE_Service_Type::dump (void) const
ACE_TRACE ("ACE_Service_Type::dump");
}
-ACE_Service_Type::ACE_Service_Type (const ASYS_TCHAR *n,
+ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n,
ACE_Service_Type_Impl *t,
const ACE_SHLIB_HANDLE h,
int active)
: name_ (0),
-#if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- chname_ (0),
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
type_ (t),
handle_ (h),
active_ (active),
@@ -46,11 +43,7 @@ ACE_Service_Type::~ACE_Service_Type (void)
if (this->handle_ != 0)
ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_);
- delete [] (ASYS_TCHAR *) this->name_;
-
-#if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- delete [] (char *) this->chname_;
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
+ delete [] (ACE_TCHAR *) this->name_;
}
void
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
index 21ea527b311..edafff19e47 100644
--- a/ace/Service_Object.h
+++ b/ace/Service_Object.h
@@ -74,15 +74,14 @@ public:
};
// = Initialization and termination methods.
- ACE_Service_Type (const ASYS_TCHAR *n,
+ ACE_Service_Type (const ACE_TCHAR *n,
ACE_Service_Type_Impl *o,
const ACE_SHLIB_HANDLE handle,
int active);
~ACE_Service_Type (void);
- const ASYS_TCHAR *name (void) const;
- void name (const ASYS_TCHAR *);
- const char *chname (void) const;
+ const ACE_TCHAR *name (void) const;
+ void name (const ACE_TCHAR *);
const ACE_Service_Type_Impl *type (void) const;
void type (const ACE_Service_Type_Impl *,
@@ -109,15 +108,9 @@ public:
// Declare the dynamic allocation hooks.
private:
- const ASYS_TCHAR *name_;
+ const ACE_TCHAR *name_;
// Humanly readible name of svc.
-#if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- char *chname_;
- // This interface is used to pass char name when instantiate
- // ACE_Parse_Node.
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-
const ACE_Service_Type_Impl *type_;
// Pointer to C++ object that implements the svc.
diff --git a/ace/Service_Object.i b/ace/Service_Object.i
index 184b48a7da2..85e4d64278f 100644
--- a/ace/Service_Object.i
+++ b/ace/Service_Object.i
@@ -20,23 +20,13 @@ ACE_Service_Object_Ptr::operator-> ()
return this->service_object_;
}
-ACE_INLINE const ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_Service_Type::name (void) const
{
ACE_TRACE ("ACE_Service_Type::name");
return this->name_;
}
-ACE_INLINE const char *
-ACE_Service_Type::chname (void) const
-{
-#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- return this->name ();
-#else
- return this->chname_;
-#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
-}
-
ACE_INLINE const ACE_Service_Type_Impl *
ACE_Service_Type::type (void) const
{
@@ -52,16 +42,12 @@ ACE_Service_Type::handle (void) const
}
ACE_INLINE void
-ACE_Service_Type::name (const ASYS_TCHAR *n)
+ACE_Service_Type::name (const ACE_TCHAR *n)
{
ACE_TRACE ("ACE_Service_Type::name");
- delete [] (ASYS_TCHAR *) this->name_;
+ delete [] (ACE_TCHAR *) this->name_;
this->name_ = ACE::strnew (n);
-#if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
- delete [] (char *) this->chname_;
- this->chname_ = ACE_OS_WString (this->name_).char_rep ();
-#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
}
ACE_INLINE void
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index 0af3b415fa1..fe2a3db9c01 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -113,8 +113,8 @@ ACE_Service_Repository::ACE_Service_Repository (int size)
if (this->open (size) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Service_Repository")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Service_Repository")));
}
// Finalize (call <fini> and possibly delete) all the services.
@@ -138,7 +138,7 @@ ACE_Service_Repository::fini (void)
{
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("finalizing %s\n"),
+ ACE_TEXT ("finalizing %s\n"),
this->service_vector_[i]->name ()));
ACE_Service_Type *s =
ACE_const_cast (ACE_Service_Type *,
@@ -195,7 +195,7 @@ ACE_Service_Repository::~ACE_Service_Repository (void)
// services a -2 is returned. Must be called with locks held.
int
-ACE_Service_Repository::find_i (const ASYS_TCHAR name[],
+ACE_Service_Repository::find_i (const ACE_TCHAR name[],
const ACE_Service_Type **srp,
int ignore_suspended)
{
@@ -228,7 +228,7 @@ ACE_Service_Repository::find_i (const ASYS_TCHAR name[],
}
int
-ACE_Service_Repository::find (const ASYS_TCHAR name[],
+ACE_Service_Repository::find (const ACE_TCHAR name[],
const ACE_Service_Type **srp,
int ignore_suspended)
{
@@ -281,7 +281,7 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
// Re-resume a service that was previously suspended.
int
-ACE_Service_Repository::resume (const ASYS_TCHAR name[],
+ACE_Service_Repository::resume (const ACE_TCHAR name[],
const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::resume");
@@ -300,7 +300,7 @@ ACE_Service_Repository::resume (const ASYS_TCHAR name[],
// most circumstances by other portions of the ACE_Service_Repository.
int
-ACE_Service_Repository::suspend (const ASYS_TCHAR name[],
+ACE_Service_Repository::suspend (const ACE_TCHAR name[],
const ACE_Service_Type **srp)
{
ACE_TRACE ("ACE_Service_Repository::suspend");
@@ -321,7 +321,7 @@ ACE_Service_Repository::suspend (const ASYS_TCHAR name[],
// the array and decrement the <current_size> by 1.
int
-ACE_Service_Repository::remove (const ASYS_TCHAR name[])
+ACE_Service_Repository::remove (const ACE_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 04e46defc01..26ba6b3fbd0 100644
--- a/ace/Service_Repository.h
+++ b/ace/Service_Repository.h
@@ -84,7 +84,7 @@ public:
int insert (const ACE_Service_Type *);
// Insert a new service record.
- int find (const ASYS_TCHAR name[],
+ int find (const ACE_TCHAR name[],
const ACE_Service_Type **srp = 0,
int ignore_suspended = 1);
// Locate an entry with <name> in the table. If <ignore_suspended>
@@ -94,14 +94,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 ASYS_TCHAR[]);
+ int remove (const ACE_TCHAR[]);
// Remove an existing service record.
// = Liveness control
- int resume (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);
+ int resume (const ACE_TCHAR[], const ACE_Service_Type ** = 0);
// Resume a service record.
- int suspend (const ASYS_TCHAR[], const ACE_Service_Type ** = 0);
+ int suspend (const ACE_TCHAR[], const ACE_Service_Type ** = 0);
// Suspend a service record.
int current_size (void);
@@ -117,7 +117,7 @@ public:
// Declare the dynamic allocation hooks.
private:
- int find_i (const ASYS_TCHAR service_name[],
+ int find_i (const ACE_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 9d1c7300b17..d5f7fdfe36d 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 ASYS_TCHAR *s_name,
+ const ACE_TCHAR *s_name,
u_int f,
ACE_Service_Object_Exterminator gobbler)
: name_ (0),
@@ -41,7 +41,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 [] (ASYS_TCHAR *) this->name_;
+ delete [] (ACE_TCHAR *) this->name_;
}
int
@@ -50,11 +50,11 @@ ACE_Service_Type_Impl::fini (void) const
ACE_TRACE ("ACE_Service_Type_Impl::fini");
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("destroying %s, flags = %d\n"),
+ ACE_TEXT ("destroying %s, flags = %d\n"),
this->name_,
this->flags_));
- delete [] (ASYS_TCHAR *) this->name_;
+ delete [] (ACE_TCHAR *) this->name_;
((ACE_Service_Type_Impl *) this)->name_ = 0;
if (ACE_BIT_ENABLED (this->flags_,
@@ -75,7 +75,7 @@ ACE_Service_Type_Impl::fini (void) const
}
ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
- const ASYS_TCHAR *s_name,
+ const ACE_TCHAR *s_name,
u_int f,
ACE_Service_Object_Exterminator gobbler)
: ACE_Service_Type_Impl (so, s_name, f, gobbler)
@@ -84,7 +84,7 @@ ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
}
int
-ACE_Service_Object_Type::init (int argc, ASYS_TCHAR *argv[]) const
+ACE_Service_Object_Type::init (int argc, ACE_TCHAR *argv[]) const
{
ACE_TRACE ("ACE_Service_Object_Type::init");
@@ -106,7 +106,7 @@ ACE_Module_Type::dump (void) const
}
ACE_Module_Type::ACE_Module_Type (void *m,
- const ASYS_TCHAR *m_name,
+ const ACE_TCHAR *m_name,
u_int f)
: ACE_Service_Type_Impl (m, m_name, f)
{
@@ -114,7 +114,7 @@ ACE_Module_Type::ACE_Module_Type (void *m,
}
int
-ACE_Module_Type::init (int argc, ASYS_TCHAR *argv[]) const
+ACE_Module_Type::init (int argc, ACE_TCHAR *argv[]) const
{
ACE_TRACE ("ACE_Module_Type::init");
void *obj = this->object ();
@@ -186,15 +186,15 @@ ACE_Module_Type::fini (void) const
}
int
-ACE_Module_Type::info (ASYS_TCHAR **str, size_t len) const
+ACE_Module_Type::info (ACE_TCHAR **str, size_t len) const
{
ACE_TRACE ("ACE_Module_Type::info");
- ASYS_TCHAR buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s"),
+ ACE_TEXT ("%s\t %s"),
this->name (),
- ASYS_TEXT ("# ACE_Module\n"));
+ ACE_TEXT ("# ACE_Module\n"));
if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -226,7 +226,7 @@ ACE_Stream_Type::dump (void) const
}
int
-ACE_Stream_Type::init (int, ASYS_TCHAR *[]) const
+ACE_Stream_Type::init (int, ACE_TCHAR *[]) const
{
ACE_TRACE ("ACE_Stream_Type::init");
return 0;
@@ -259,7 +259,7 @@ ACE_Stream_Type::resume (void) const
}
ACE_Stream_Type::ACE_Stream_Type (void *s,
- const ASYS_TCHAR *s_name,
+ const ACE_TCHAR *s_name,
u_int f)
: ACE_Service_Type_Impl (s, s_name, f),
head_ (0)
@@ -268,15 +268,15 @@ ACE_Stream_Type::ACE_Stream_Type (void *s,
}
int
-ACE_Stream_Type::info (ASYS_TCHAR **str, size_t len) const
+ACE_Stream_Type::info (ACE_TCHAR **str, size_t len) const
{
ACE_TRACE ("ACE_Stream_Type::info");
- ASYS_TCHAR buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
ACE_OS::sprintf (buf,
- ASYS_TEXT ("%s\t %s"),
+ ACE_TEXT ("%s\t %s"),
this->name (),
- ASYS_TEXT ("# STREAM\n"));
+ ACE_TEXT ("# STREAM\n"));
if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -366,7 +366,7 @@ ACE_Stream_Type::push (ACE_Module_Type *new_module)
}
ACE_Module_Type *
-ACE_Stream_Type::find (const ASYS_TCHAR *mod_name) const
+ACE_Stream_Type::find (const ACE_TCHAR *mod_name) const
{
ACE_TRACE ("ACE_Stream_Type::find");
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
index 9c20d0c9f32..c70a8ffdd3e 100644
--- a/ace/Service_Types.h
+++ b/ace/Service_Types.h
@@ -42,7 +42,7 @@ class ACE_Export ACE_Service_Type_Impl
public:
// = Initialization and termination methods.
ACE_Service_Type_Impl (void *object,
- const ASYS_TCHAR *s_name,
+ const ACE_TCHAR *s_name,
u_int flags = 0,
ACE_Service_Object_Exterminator gobbler = 0);
virtual ~ACE_Service_Type_Impl (void);
@@ -50,17 +50,17 @@ public:
// = 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, ASYS_TCHAR *argv[]) const = 0;
+ virtual int init (int argc, ACE_TCHAR *argv[]) const = 0;
virtual int fini (void) const;
- virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
+ virtual int info (ACE_TCHAR **str, size_t len) const = 0;
void *object (void) const;
// The pointer to the service.
- const ASYS_TCHAR *name (void) const;
+ const ACE_TCHAR *name (void) const;
// Get the name of the service.
- void name (const ASYS_TCHAR *);
+ void name (const ACE_TCHAR *);
// Set the name of the service.
void dump (void) const;
@@ -70,7 +70,7 @@ public:
// Declare the dynamic allocation hooks.
protected:
- const ASYS_TCHAR *name_;
+ const ACE_TCHAR *name_;
// Name of the service.
void *obj_;
@@ -92,7 +92,7 @@ class ACE_Export ACE_Service_Object_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Service_Object_Type (void *so,
- const ASYS_TCHAR *name,
+ const ACE_TCHAR *name,
u_int flags = 0,
ACE_Service_Object_Exterminator gobbler = 0);
@@ -101,9 +101,9 @@ public:
// = Implement the hooks for <ACE_Service_Objects>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, ASYS_TCHAR *argv[]) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (ASYS_TCHAR **str, size_t len) const;
+ virtual int info (ACE_TCHAR **str, size_t len) const;
};
class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
@@ -114,7 +114,7 @@ class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Module_Type (void *m, // Really an <ACE_Module> *.
- const ASYS_TCHAR *identifier,
+ const ACE_TCHAR *identifier,
u_int flags = 0);
~ACE_Module_Type (void);
@@ -122,9 +122,9 @@ public:
// = Implement the hooks for <ACE_Modules>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, ASYS_TCHAR *argv[]) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (ASYS_TCHAR **str, size_t len) const;
+ virtual int info (ACE_TCHAR **str, size_t len) const;
// Get/set the link pointer.
ACE_Module_Type *link (void) const;
@@ -149,7 +149,7 @@ class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl
public:
// = Initialization method.
ACE_Stream_Type (void *s, // Really an <ACE_Stream> *.
- const ASYS_TCHAR *identifier,
+ const ACE_TCHAR *identifier,
u_int flags = 0);
~ACE_Stream_Type (void);
@@ -157,9 +157,9 @@ public:
// = Implement the hooks for <ACE_Streams>.
virtual int suspend (void) const;
virtual int resume (void) const;
- virtual int init (int argc, ASYS_TCHAR *argv[]) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]) const;
virtual int fini (void) const;
- virtual int info (ASYS_TCHAR **str, size_t len) const;
+ virtual int info (ACE_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>.
@@ -167,7 +167,7 @@ public:
int remove (ACE_Module_Type *module);
// Search for <module> and remove it from the <ACE_Stream>.
- ACE_Module_Type *find (const ASYS_TCHAR *mod_name) const;
+ ACE_Module_Type *find (const ACE_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 84dd39ab8e8..78eb127cbfc 100644
--- a/ace/Service_Types.i
+++ b/ace/Service_Types.i
@@ -8,7 +8,7 @@ ACE_Service_Type_Impl::object (void) const
return this->obj_;
}
-ACE_INLINE const ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_Service_Type_Impl::name (void) const
{
ACE_TRACE ("ACE_Service_Type_Impl::name");
@@ -16,11 +16,11 @@ ACE_Service_Type_Impl::name (void) const
}
ACE_INLINE void
-ACE_Service_Type_Impl::name (const ASYS_TCHAR *n)
+ACE_Service_Type_Impl::name (const ACE_TCHAR *n)
{
ACE_TRACE ("ACE_Service_Type_Impl::name");
- delete [] (ASYS_TCHAR *) this->name_;
+ delete [] (ACE_TCHAR *) this->name_;
this->name_ = ACE::strnew (n);
}
@@ -45,7 +45,7 @@ ACE_Service_Object_Type::resume (void) const
}
ACE_INLINE int
-ACE_Service_Object_Type::info (ASYS_TCHAR **str, size_t len) const
+ACE_Service_Object_Type::info (ACE_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_Memory_MM.cpp b/ace/Shared_Memory_MM.cpp
index f31e1cd2aff..85778fbdf07 100644
--- a/ace/Shared_Memory_MM.cpp
+++ b/ace/Shared_Memory_MM.cpp
@@ -30,7 +30,7 @@ ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (ACE_HANDLE handle,
ACE_TRACE ("ACE_Shared_Memory_MM::ACE_Shared_Memory_MM");
}
-ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (LPCTSTR file_name,
+ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (const ACE_TCHAR *file_name,
int len,
int flags,
int mode,
diff --git a/ace/Shared_Memory_MM.h b/ace/Shared_Memory_MM.h
index e1049681b2e..85062dbc3e6 100644
--- a/ace/Shared_Memory_MM.h
+++ b/ace/Shared_Memory_MM.h
@@ -48,7 +48,7 @@ public:
off_t pos = 0);
// Constructor.
- ACE_Shared_Memory_MM (LPCTSTR file_name,
+ ACE_Shared_Memory_MM (const ACE_TCHAR *file_name,
int len = -1,
int flags = O_RDWR | O_CREAT,
int mode = ACE_DEFAULT_FILE_PERMS,
@@ -65,7 +65,7 @@ public:
off_t pos = 0);
// Open method.
- int open (LPCTSTR file_name,
+ int open (const ACE_TCHAR *file_name,
int len = -1,
int flags = O_RDWR | O_CREAT,
int mode = ACE_DEFAULT_FILE_PERMS,
@@ -75,7 +75,7 @@ public:
off_t pos = 0);
// Open method.
- const TCHAR *filename (void) const;
+ const ACE_TCHAR *filename (void) const;
// Return the name of file that is mapped (if any).
virtual int close (void);
diff --git a/ace/Shared_Memory_MM.i b/ace/Shared_Memory_MM.i
index 721b56be3dc..6a92d7677c8 100644
--- a/ace/Shared_Memory_MM.i
+++ b/ace/Shared_Memory_MM.i
@@ -5,7 +5,7 @@
// Return the name of file that is mapped (if any).
-ACE_INLINE const TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_Shared_Memory_MM::filename (void) const
{
return this->shared_memory_.filename ();
@@ -24,7 +24,7 @@ ACE_Shared_Memory_MM::open (ACE_HANDLE handle,
}
ACE_INLINE int
-ACE_Shared_Memory_MM::open (LPCTSTR file_name,
+ACE_Shared_Memory_MM::open (const ACE_TCHAR *file_name,
int len,
int flags,
int mode,
diff --git a/ace/Shared_Object.cpp b/ace/Shared_Object.cpp
index ef7173128aa..b7237bfb1a3 100644
--- a/ace/Shared_Object.cpp
+++ b/ace/Shared_Object.cpp
@@ -14,7 +14,7 @@ ACE_RCSID(ace, Shared_Object, "$Id$")
// Initializes object when dynamic linking occurs.
int
-ACE_Shared_Object::init (int, ASYS_TCHAR *[])
+ACE_Shared_Object::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Shared_Object::init");
return 0;
@@ -32,7 +32,7 @@ ACE_Shared_Object::fini (void)
// Returns information on active object.
int
-ACE_Shared_Object::info (ASYS_TCHAR **, size_t) const
+ACE_Shared_Object::info (ACE_TCHAR **, size_t) const
{
ACE_TRACE ("ACE_Shared_Object::info");
return 0;
diff --git a/ace/Shared_Object.h b/ace/Shared_Object.h
index 87c01462db3..e4082203255 100644
--- a/ace/Shared_Object.h
+++ b/ace/Shared_Object.h
@@ -33,13 +33,13 @@ class ACE_Export ACE_Shared_Object
public:
ACE_Shared_Object (void);
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Initializes object when dynamic linking occurs.
virtual int fini (void);
// Terminates object when dynamic unlinking occurs.
- virtual int info (ASYS_TCHAR **info_string, size_t length = 0) const;
+ virtual int info (ACE_TCHAR **info_string, size_t length = 0) const;
// Returns information on active object.
virtual ~ACE_Shared_Object (void);
diff --git a/ace/Singleton.cpp b/ace/Singleton.cpp
index 25385da8cbe..f977f02400c 100644
--- a/ace/Singleton.cpp
+++ b/ace/Singleton.cpp
@@ -24,7 +24,7 @@ ACE_Singleton<TYPE, ACE_LOCK>::dump (void)
ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
ACE_Singleton<TYPE, ACE_LOCK>::instance_i ()));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
@@ -118,7 +118,7 @@ ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump (void)
ACE_TRACE ("ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i ()));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
@@ -205,7 +205,7 @@ ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
@@ -290,7 +290,7 @@ ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
ACE_TRACE ("ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("instance_ = %x"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
diff --git a/ace/Stats.cpp b/ace/Stats.cpp
index 5223dc143cf..8cd4e6b46ca 100644
--- a/ace/Stats.cpp
+++ b/ace/Stats.cpp
@@ -208,10 +208,10 @@ ACE_Stats::print_summary (const u_int precision,
const ACE_UINT32 scale_factor,
FILE *file) const
{
- ASYS_TCHAR mean_string [128];
- ASYS_TCHAR std_dev_string [128];
- ASYS_TCHAR min_string [128];
- ASYS_TCHAR max_string [128];
+ ACE_TCHAR mean_string [128];
+ ACE_TCHAR std_dev_string [128];
+ ACE_TCHAR min_string [128];
+ ACE_TCHAR max_string [128];
int success = 0;
for (int tmp_precision = precision;
@@ -219,11 +219,11 @@ ACE_Stats::print_summary (const u_int precision,
--tmp_precision)
{
// Build a format string, in case the C library doesn't support %*u.
- ASYS_TCHAR format[32];
+ ACE_TCHAR format[32];
if (tmp_precision == 0)
- ACE_OS::sprintf (format, ASYS_TEXT ("%%%d"), tmp_precision);
+ ACE_OS::sprintf (format, ACE_TEXT ("%%%d"), tmp_precision);
else
- ACE_OS::sprintf (format, ASYS_TEXT ("%%d.%%0%du"), tmp_precision);
+ ACE_OS::sprintf (format, ACE_TEXT ("%%d.%%0%du"), tmp_precision);
ACE_Stats_Value u (tmp_precision);
((ACE_Stats *) this)->mean (u, scale_factor);
@@ -260,8 +260,8 @@ ACE_Stats::print_summary (const u_int precision,
if (success == 1)
{
- ACE_OS::fprintf (file, ASYS_TEXT ("samples: %u (%s - %s); mean: ")
- ASYS_TEXT ("%s; std dev: %s\n"),
+ ACE_OS::fprintf (file, ACE_TEXT ("samples: %u (%s - %s); mean: ")
+ ACE_TEXT ("%s; std dev: %s\n"),
samples (), min_string, max_string,
mean_string, std_dev_string);
return 0;
@@ -270,12 +270,12 @@ ACE_Stats::print_summary (const u_int precision,
{
#if !defined (ACE_HAS_WINCE)
ACE_OS::fprintf (file,
- ASYS_TEXT ("ACE_Stats::print_summary: OVERFLOW: %s\n"),
- ASYS_WIDE_STRING (strerror (overflow_)));
+ ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW: %s\n"),
+ strerror (overflow_));
#else
// WinCE doesn't have strerror ;(
ACE_OS::fprintf (file,
- ASYS_TEXT ("ACE_Stats::print_summary: OVERFLOW\n"));
+ ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW\n"));
#endif /* ACE_HAS_WINCE */
return -1;
}
@@ -551,13 +551,13 @@ ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs)
}
void
-ACE_Throughput_Stats::dump_results (const ASYS_TCHAR* msg,
+ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg,
ACE_UINT32 sf)
{
if (this->samples_count_ == 0u)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%s : no data collected\n"), msg));
+ ACE_TEXT ("%s : no data collected\n"), msg));
return;
}
@@ -582,7 +582,7 @@ ACE_Throughput_Stats::dump_results (const ASYS_TCHAR* msg,
double l_dev = ACE_CU64_TO_CU32 (latency_dev) / (sf * sf);
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%s latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"),
+ ACE_TEXT ("%s latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"),
msg,
l_min, this->latency_min_at_,
l_avg,
@@ -600,7 +600,7 @@ ACE_Throughput_Stats::dump_results (const ASYS_TCHAR* msg,
double t_avg = ACE_CU64_TO_CU32 (this->samples_count_) / seconds;
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%s throughput: %.2f (events/second)\n"),
+ ACE_TEXT ("%s throughput: %.2f (events/second)\n"),
msg, t_avg));
#if 0
diff --git a/ace/Stats.h b/ace/Stats.h
index 099b62be7c9..59ee3a54799 100644
--- a/ace/Stats.h
+++ b/ace/Stats.h
@@ -213,7 +213,7 @@ public:
void accumulate (const ACE_Throughput_Stats &throughput);
// Update the values to reflect the stats in <throughput>
- void dump_results (const ASYS_TCHAR* msg, ACE_UINT32 scale_factor);
+ void dump_results (const ACE_TCHAR* msg, ACE_UINT32 scale_factor);
// Print down the stats
private:
diff --git a/ace/Stats.i b/ace/Stats.i
index 42d9e5f51ba..bbac9fd33f3 100644
--- a/ace/Stats.i
+++ b/ace/Stats.i
@@ -56,7 +56,7 @@ void
ACE_Stats_Value::dump (void) const
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("precision: %u digits; whole: %u, fractional: %u\n"),
+ ACE_TEXT ("precision: %u digits; whole: %u, fractional: %u\n"),
precision_, whole_, fractional_));
}
diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp
index a2e9617bd28..033de722d0d 100644
--- a/ace/Strategies_T.cpp
+++ b/ace/Strategies_T.cpp
@@ -219,7 +219,7 @@ ACE_Thread_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr,
// Must have a thread manager!
if (this->thr_mgr_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("error: must have a non-NULL thread manager\n")),
+ ACE_TEXT ("error: must have a non-NULL thread manager\n")),
-1);
else
return 0;
@@ -252,8 +252,8 @@ ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy
if (this->open (local_addr, restart) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("open")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")));
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
@@ -352,12 +352,12 @@ ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handle
ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler");
// If <flags_> is non-0 then we won't create zombies.
- switch (ACE::fork ("child", this->flags_))
+ switch (ACE::fork (ACE_TEXT ("child"), this->flags_))
{
case -1:
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("fork")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("fork")),
-1);
/* NOTREACHED */
case 0: // In child process.
@@ -414,8 +414,8 @@ ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::ACE_Cache
con_s,
rec_s) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Cached_Connect_Strategy::ACE_Cached_Connect_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Cached_Connect_Strategy::ACE_Cached_Connect_Strategy")));
}
template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX>
@@ -1181,7 +1181,7 @@ ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::dump (void) const
ACE_Scheduling_Strategy<SVC_HANDLER>::dump ();
}
-template <class SVC_HANDLER> ASYS_INLINE void
+template <class SVC_HANDLER> ACE_INLINE void
ACE_Singleton_Strategy<SVC_HANDLER>::dump (void) const
{
ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::dump");
diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i
index 096a1e046c4..4816e2565bc 100644
--- a/ace/Strategies_T.i
+++ b/ace/Strategies_T.i
@@ -30,8 +30,8 @@ ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy (SVC_HANDLER *sh,
ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy");
if (this->open (sh, tm) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Singleton_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Singleton_Strategy")));
}
template <class SVC_HANDLER> ASYS_INLINE
@@ -68,8 +68,8 @@ ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy (ACE_Thread_Manager *t
ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy");
if (this->open (thr_mgr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Creation_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Creation_Strategy")));
}
// Default behavior is to make a new SVC_HANDLER, passing in the
@@ -105,8 +105,8 @@ ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (const char dll_name[],
svc_rep,
thr_mgr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("open")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")));
}
template <class SVC_HANDLER> ASYS_INLINE
@@ -139,8 +139,8 @@ ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy (ACE_Reactor *reactor,
mask,
flags) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy")));
}
template <class SVC_HANDLER> ASYS_INLINE
@@ -171,8 +171,8 @@ ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_m
n_threads,
flags) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy")));
}
template <class SVC_HANDLER> ASYS_INLINE
@@ -225,7 +225,7 @@ ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy (voi
ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy");
if (this->acceptor_.close () == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close")));
}
template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> ASYS_INLINE ACE_PEER_CONNECTOR &
@@ -259,8 +259,8 @@ ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy (size_t n_processes,
reactor,
avoid_zombies) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Process_Strategy")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Process_Strategy")));
}
template <class SVC_HANDLER> ASYS_INLINE
diff --git a/ace/Stream.cpp b/ace/Stream.cpp
index 8280169697a..3e5b138a98a 100644
--- a/ace/Stream.cpp
+++ b/ace/Stream.cpp
@@ -27,18 +27,18 @@ template <ACE_SYNCH_DECL> void
ACE_Stream<ACE_SYNCH_USE>::dump (void) const
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::dump");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("-------- module links --------\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- module links --------\n")));
for (ACE_Module<ACE_SYNCH_USE> *mp = this->stream_head_;
;
mp = mp->next ())
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("module name = %s\n"), mp->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("module name = %s\n"), mp->name ()));
if (mp == this->stream_tail_)
break;
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("-------- writer links --------\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- writer links --------\n")));
ACE_Task<ACE_SYNCH_USE> *tp;
@@ -46,21 +46,21 @@ ACE_Stream<ACE_SYNCH_USE>::dump (void) const
;
tp = tp->next ())
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("writer queue name = %s\n"), tp->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("writer queue name = %s\n"), tp->name ()));
tp->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("-------\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------\n")));
if (tp == this->stream_tail_->writer ()
|| (this->linked_us_
&& tp == this->linked_us_->stream_head_->reader ()))
break;
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("-------- reader links --------\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- reader links --------\n")));
for (tp = this->stream_tail_->reader (); ; tp = tp->next ())
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("reader queue name = %s\n"), tp->name ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("reader queue name = %s\n"), tp->name ()));
tp->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("-------\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------\n")));
if (tp == this->stream_head_->reader ()
|| (this->linked_us_
&& tp == this->linked_us_->stream_head_->writer ()))
@@ -145,7 +145,7 @@ ACE_Stream<ACE_SYNCH_USE>::pop (int flags)
// ACE_Stream.
template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::remove (const ASYS_TCHAR *name,
+ACE_Stream<ACE_SYNCH_USE>::remove (const ACE_TCHAR *name,
int flags)
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::remove");
@@ -178,7 +178,7 @@ ACE_Stream<ACE_SYNCH_USE>::remove (const ASYS_TCHAR *name,
}
template <ACE_SYNCH_DECL> ACE_Module<ACE_SYNCH_USE> *
-ACE_Stream<ACE_SYNCH_USE>::find (const ASYS_TCHAR *name)
+ACE_Stream<ACE_SYNCH_USE>::find (const ACE_TCHAR *name)
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::find");
for (ACE_Module<ACE_SYNCH_USE> *mod = this->stream_head_;
@@ -245,7 +245,7 @@ ACE_Stream<ACE_SYNCH_USE>::open (void *a,
{
h1 = new ACE_Stream_Head<ACE_SYNCH_USE>;
h2 = new ACE_Stream_Head<ACE_SYNCH_USE>;
- head = new ACE_Module<ACE_SYNCH_USE> (ASYS_TEXT ("ACE_Stream_Head"),
+ head = new ACE_Module<ACE_SYNCH_USE> (ACE_TEXT ("ACE_Stream_Head"),
h1, h2,
a,
M_DELETE);
@@ -255,7 +255,7 @@ ACE_Stream<ACE_SYNCH_USE>::open (void *a,
{
t1 = new ACE_Stream_Tail<ACE_SYNCH_USE>;
t2 = new ACE_Stream_Tail<ACE_SYNCH_USE>;
- tail = new ACE_Module<ACE_SYNCH_USE> (ASYS_TEXT ("ACE_Stream_Tail"),
+ tail = new ACE_Module<ACE_SYNCH_USE> (ACE_TEXT ("ACE_Stream_Tail"),
t1, t2,
a,
M_DELETE);
@@ -489,7 +489,7 @@ ACE_Stream<ACE_SYNCH_USE>::ACE_Stream (void * a,
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::ACE_Stream");
if (this->open (a, head, tail) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n"),
+ ACE_TEXT ("ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n"),
head->name (), tail->name ()));
}
diff --git a/ace/Stream.h b/ace/Stream.h
index 498b220d11b..a2839fb11be 100644
--- a/ace/Stream.h
+++ b/ace/Stream.h
@@ -92,7 +92,7 @@ public:
// Return the top module on the stream (right below the stream
// head).
- virtual int remove (const ASYS_TCHAR *mod,
+ virtual int remove (const ACE_TCHAR *mod,
int flags = M_DELETE);
// Remove the named module <mod> from the stream. This bypasses the
// strict LIFO ordering of <push> and <pop>.
@@ -103,7 +103,7 @@ public:
virtual ACE_Module<ACE_SYNCH_USE> *tail (void);
// Return current stream tail.
- virtual ACE_Module<ACE_SYNCH_USE> *find (const ASYS_TCHAR *mod);
+ virtual ACE_Module<ACE_SYNCH_USE> *find (const ACE_TCHAR *mod);
// Find a particular ACE_Module.
virtual int link (ACE_Stream<ACE_SYNCH_USE> &);
diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp
index b649122ef50..b39a9427046 100644
--- a/ace/Stream_Modules.cpp
+++ b/ace/Stream_Modules.cpp
@@ -128,17 +128,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, ASYS_TCHAR *[])
+ACE_Stream_Head<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp, size_t length) const
+ACE_Stream_Head<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::info");
- const ASYS_TCHAR *name = this->name ();
+ const ACE_TCHAR *name = this->name ();
if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
return -1;
@@ -267,17 +267,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, ASYS_TCHAR *[])
+ACE_Stream_Tail<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp, size_t length) const
+ACE_Stream_Tail<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
{
ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::info");
- const ASYS_TCHAR *name = this->name ();
+ const ACE_TCHAR *name = this->name ();
if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
return -1;
@@ -343,18 +343,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, ASYS_TCHAR *[])
+ACE_Thru_Task<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
{
ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::init");
return 0;
}
template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::info (ASYS_TCHAR **strp,
+ACE_Thru_Task<ACE_SYNCH_USE>::info (ACE_TCHAR **strp,
size_t length) const
{
ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::info");
- const ASYS_TCHAR *name = this->name ();
+ const ACE_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 2617b6ecddd..5a02d97862d 100644
--- a/ace/Stream_Modules.h
+++ b/ace/Stream_Modules.h
@@ -44,8 +44,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, ASYS_TCHAR *argv[]);
- virtual int info (ASYS_TCHAR **info_string, size_t length) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int info (ACE_TCHAR **info_string, size_t length) const;
virtual int fini (void);
void dump (void) const;
@@ -79,8 +79,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, ASYS_TCHAR *argv[]);
- virtual int info (ASYS_TCHAR **info_string, size_t length) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int info (ACE_TCHAR **info_string, size_t length) const;
virtual int fini (void);
void dump (void) const;
@@ -115,8 +115,8 @@ public:
virtual int svc (void);
// = Dynamic linking hooks
- virtual int init (int argc, ASYS_TCHAR *argv[]);
- virtual int info (ASYS_TCHAR **info_string, size_t length) const;
+ virtual int init (int argc, ACE_TCHAR *argv[]);
+ virtual int info (ACE_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 ada552ffd28..bde55d39e1b 100644
--- a/ace/Svc_Conf.h
+++ b/ace/Svc_Conf.h
@@ -69,7 +69,7 @@ extern FILE *ace_yyin;
} \
else if ( ((result = fread( buf, 1, max_size, ace_yyin )) == 0) \
&& ferror( ace_yyin ) ) \
- ACE_YY_FATAL_ERROR( "input in flex scanner failed" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("input in flex scanner failed") );
void ace_yyerror (const char *);
// Error handling routine required by YACC or BISON
@@ -80,11 +80,11 @@ extern int ace_yylineno;
extern int ace_yyerrno;
// Keeps track of the number of errors encountered so far
-extern const ASYS_TCHAR *ace_yydirective;
+extern const ACE_TCHAR *ace_yydirective;
// Used to parse service configurator directives from a string rather
// than from a svc.conf file.
-extern char *ace_yytext;
+extern ACE_TCHAR *ace_yytext;
// Holds the lexeme for the current token
extern int ace_yyleng;
@@ -93,7 +93,7 @@ extern int ace_yyleng;
extern ACE_Obstack *ace_obstack;
// Efficient memory allocation technique
-ACE_Service_Type_Impl *ace_create_service_type (const ASYS_TCHAR *, int,
+ACE_Service_Type_Impl *ace_create_service_type (const ACE_TCHAR *, int,
void *, unsigned int,
ACE_Service_Object_Exterminator = 0);
// Factory that creates a new ACE_Service_Type_Impl.
@@ -105,7 +105,7 @@ typedef union
ACE_Parse_Node *parse_node_;
ACE_Static_Node *static_node_;
ACE_Service_Type *svc_record_;
- char *ident_;
+ ACE_TCHAR *ident_;
} ACE_YYSTYPE;
extern ACE_YYSTYPE ace_yylval;
#include "ace/post.h"
diff --git a/ace/Svc_Conf.l b/ace/Svc_Conf.l
index 5197676144f..17b4f1d03ea 100644
--- a/ace/Svc_Conf.l
+++ b/ace/Svc_Conf.l
@@ -17,7 +17,7 @@ int yyerrno = 0;
// Used to parse service configurator directives from a string rather
// than from a svc.conf file.
-const ASYS_TCHAR *yydirective = 0;
+const ACE_TCHAR *yydirective = 0;
#define token(x) x
%}
@@ -81,10 +81,10 @@ inactive { return token (ACE_INACTIVE); }
}
{white_space}+ ; /* EMPTY */
{newline} { yylineno++; }
-{other} { ACE_ERROR ((LM_ERROR, "unknown character = (%d", *yytext));
+{other} { ACE_ERROR ((LM_ERROR, ACE_TEXT ("unknown character = (%d"), *yytext));
if (isprint (*yytext))
- ACE_ERROR ((LM_ERROR, "|%c", *yytext));
- ACE_ERROR ((LM_ERROR, ")\n"));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("|%c"), *yytext));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (")\n")));
}
<<EOF>> { YY_NEW_FILE; yyterminate(); }
%%
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y
index 19be52a42b2..9573de5f930 100644
--- a/ace/Svc_Conf.y
+++ b/ace/Svc_Conf.y
@@ -11,7 +11,7 @@ ACE_RCSID(ace, Svc_Conf_y, "$Id$")
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
ACE_Static_Node *svc_type);
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- const ASYS_TCHAR *svc_name);
+ const ACE_TCHAR *svc_name);
#define YYDEBUG_LEXER_TEXT (yytext[yyleng] = '\0', yytext)
@@ -68,7 +68,7 @@ dynamic
: ACE_DYNAMIC svc_location parameters_opt
{
if ($2 != 0)
- $$ = new ACE_Dynamic_Node ($2, ASYS_WIDE_STRING ($3));
+ $$ = new ACE_Dynamic_Node ($2, $3);
else
$$ = 0;
}
@@ -77,28 +77,28 @@ dynamic
static
: ACE_STATIC ACE_IDENT parameters_opt
{
- $$ = new ACE_Static_Node (ASYS_WIDE_STRING ($2), ASYS_WIDE_STRING ($3));
+ $$ = new ACE_Static_Node ($2, $3);
}
;
suspend
: ACE_SUSPEND ACE_IDENT
{
- $$ = new ACE_Suspend_Node (ASYS_WIDE_STRING ($2));
+ $$ = new ACE_Suspend_Node ($2);
}
;
resume
: ACE_RESUME ACE_IDENT
{
- $$ = new ACE_Resume_Node (ASYS_WIDE_STRING ($2));
+ $$ = new ACE_Resume_Node ($2);
}
;
remove
: ACE_REMOVE ACE_IDENT
{
- $$ = new ACE_Remove_Node (ASYS_WIDE_STRING ($2));
+ $$ = new ACE_Remove_Node ($2);
}
;
@@ -107,7 +107,7 @@ stream
{
$$ = new ACE_Stream_Node ($2, $3);
}
- | ACE_USTREAM ACE_IDENT { $<static_node_>$ = new ACE_Static_Node (ASYS_WIDE_STRING ($2)); } stream_modules
+ | ACE_USTREAM ACE_IDENT { $<static_node_>$ = new ACE_Static_Node ($2); } stream_modules
{
$$ = new ACE_Dummy_Node ($<static_node_>3, $4);
}
@@ -168,7 +168,7 @@ module
|| st->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dynamic initialization failed for Module %s\n"),
+ ACE_TEXT ("dynamic initialization failed for Module %s\n"),
svc_type->name ()));
yyerrno++;
}
@@ -181,7 +181,7 @@ module
if (((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("Problem with static\n")));
+ ACE_TEXT ("Problem with static\n")));
yyerrno++;
}
}
@@ -213,7 +213,7 @@ module
if (mt != 0 && st->remove (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
+ ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
module->name (),
stream->name ()));
yyerrno++;
@@ -233,12 +233,12 @@ svc_location
if (sym != 0)
{
ACE_Service_Type_Impl *stp
- = ace_create_service_type (ASYS_WIDE_STRING ($1),
+ = ace_create_service_type ($1,
$2,
sym,
flags,
gobbler);
- $$ = new ACE_Service_Type (ASYS_WIDE_STRING ($1),
+ $$ = new ACE_Service_Type ($1,
stp,
$3->handle (),
$4);
@@ -246,8 +246,8 @@ svc_location
else
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("Unable to find service: %s\n"),
- ASYS_WIDE_STRING ($1)));
+ ACE_TEXT ("Unable to find service: %s\n"),
+ $1));
++yyerrno;
$$ = 0;
}
@@ -273,15 +273,15 @@ status
svc_initializer
: pathname ACE_COLON ACE_IDENT
{
- $$ = new ACE_Object_Node (ASYS_WIDE_STRING ($1), ASYS_WIDE_STRING($3));
+ $$ = new ACE_Object_Node ($1, $3);
}
| pathname ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN
{
- $$ = new ACE_Function_Node (ASYS_WIDE_STRING ($1), ASYS_WIDE_STRING ($3));
+ $$ = new ACE_Function_Node ($1, $3);
}
| ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN
{
- $$ = new ACE_Static_Function_Node (ASYS_WIDE_STRING ($2));
+ $$ = new ACE_Static_Function_Node ($2);
}
;
@@ -322,10 +322,10 @@ yyerror (const char *s)
#endif /* ACE_NLOGGING */
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("[error %d] on line %d: %s\n"),
+ ACE_TEXT ("[error %d] on line %d: %s\n"),
++yyerrno,
yylineno,
- ASYS_WIDE_STRING (s)));
+ s));
}
// Note that SRC_REC represents left context, which is the STREAM *
@@ -333,7 +333,7 @@ yyerror (const char *s)
static ACE_Module_Type *
ace_get_module (ACE_Static_Node *str_rec,
- const ASYS_TCHAR *svc_name)
+ const ACE_TCHAR *svc_name)
{
const ACE_Service_Type *sr = str_rec->record ();
const ACE_Service_Type_Impl *type = sr->type ();
@@ -347,7 +347,7 @@ ace_get_module (ACE_Static_Node *str_rec,
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
+ ACE_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
svc_name,
str_rec->name ()));
yyerrno++;
@@ -366,12 +366,12 @@ ace_get_module (ACE_Static_Node *str_rec,
const ACE_Service_Type *sv = svc_type->record ();
type = sv->type ();
ACE_Module_Type *mt = (ACE_Module_Type *) type;
- const ASYS_TCHAR *module_type_name = svc_type->name ();
+ const ACE_TCHAR *module_type_name = svc_type->name ();
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
+ ACE_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
module_type_name,
str_rec->name ()));
yyerrno++;
@@ -384,7 +384,7 @@ ace_get_module (ACE_Static_Node *str_rec,
if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
+ ACE_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
module_type_name,
mp->name ()));
mp->name (module_type_name);
@@ -394,7 +394,7 @@ ace_get_module (ACE_Static_Node *str_rec,
}
ACE_Service_Type_Impl *
-ace_create_service_type (const ASYS_TCHAR *name,
+ace_create_service_type (const ACE_TCHAR *name,
int type,
void *symbol,
u_int flags,
@@ -427,7 +427,7 @@ ace_create_service_type (const ASYS_TCHAR *name,
break;
default:
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("unknown case\n")));
+ ACE_TEXT ("unknown case\n")));
yyerrno++;
break;
}
@@ -439,7 +439,7 @@ ace_create_service_type (const ASYS_TCHAR *name,
int yylineno = 1;
// Name given on the command-line to envoke the program.
-ASYS_TCHAR *program_name;
+ACE_TCHAR *program_name;
// Main driver program.
diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp
index cbeffcffe94..70bec4f92e5 100644
--- a/ace/Svc_Conf_l.cpp
+++ b/ace/Svc_Conf_l.cpp
@@ -66,9 +66,9 @@
/* Returned upon end-of-file. */
#define ACE_YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
+/* Promotes a possibly negative, possibly signed ACE_TCHAR to an unsigned
+ * integer for use as an array index. If the signed ACE_TCHAR is negative,
+ * we want to instead treat it as an 8-bit unsigned ACE_TCHAR, hence the
* double cast.
*/
#define ACE_YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
@@ -148,8 +148,8 @@ struct ace_yy_buffer_state
{
FILE *ace_yy_input_file;
- char *ace_yy_ch_buf; /* input buffer */
- char *ace_yy_buf_pos; /* current position in input buffer */
+ ACE_TCHAR *ace_yy_ch_buf; /* input buffer */
+ ACE_TCHAR *ace_yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
@@ -211,7 +211,7 @@ static ACE_YY_BUFFER_STATE ace_yy_current_buffer = 0;
/* ace_yy_hold_char holds the character lost when ace_yytext is formed. */
-static char ace_yy_hold_char;
+static ACE_TCHAR ace_yy_hold_char;
static int ace_yy_n_chars; /* number of characters read into ace_yy_ch_buf */
@@ -219,7 +219,7 @@ static int ace_yy_n_chars; /* number of characters read into ace_yy_ch_buf */
int ace_yyleng;
/* Points to current character in buffer. */
-static char *ace_yy_c_buf_p = (char *) 0;
+static ACE_TCHAR *ace_yy_c_buf_p = (ACE_TCHAR *) 0;
static int ace_yy_init = 1; /* whether we need to initialize */
static int ace_yy_start = 0; /* start state number */
@@ -238,9 +238,9 @@ void ace_yy_init_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b, FILE *file ));
void ace_yy_flush_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b ));
#define ACE_YY_FLUSH_BUFFER ace_yy_flush_buffer( ace_yy_current_buffer )
-ACE_YY_BUFFER_STATE ace_yy_scan_buffer ACE_YY_PROTO(( char *base, ace_yy_size_t size ));
-ACE_YY_BUFFER_STATE ace_yy_scan_string ACE_YY_PROTO(( ace_yyconst char *ace_yy_str ));
-ACE_YY_BUFFER_STATE ace_yy_scan_bytes ACE_YY_PROTO(( ace_yyconst char *bytes, int len ));
+ACE_YY_BUFFER_STATE ace_yy_scan_buffer ACE_YY_PROTO(( ACE_TCHAR *base, ace_yy_size_t size ));
+ACE_YY_BUFFER_STATE ace_yy_scan_string ACE_YY_PROTO(( ace_yyconst ACE_TCHAR *ace_yy_str ));
+ACE_YY_BUFFER_STATE ace_yy_scan_bytes ACE_YY_PROTO(( ace_yyconst ACE_TCHAR *bytes, int len ));
static void *ace_yy_flex_alloc ACE_YY_PROTO(( ace_yy_size_t ));
static void *ace_yy_flex_realloc ACE_YY_PROTO(( void *, ace_yy_size_t ));
@@ -264,16 +264,16 @@ static void ace_yy_flex_free ACE_YY_PROTO(( void * ));
#define ACE_YY_AT_BOL() (ace_yy_current_buffer->ace_yy_at_bol)
-typedef unsigned char ACE_YY_CHAR;
+typedef ACE_TCHAR ACE_YY_CHAR;
FILE *ace_yyin = (FILE *) 0, *ace_yyout = (FILE *) 0;
typedef int ace_yy_state_type;
-extern char *ace_yytext;
+extern ACE_TCHAR *ace_yytext;
#define ace_yytext_ptr ace_yytext
static ace_yy_state_type ace_yy_get_previous_state ACE_YY_PROTO(( void ));
static ace_yy_state_type ace_yy_try_NUL_trans ACE_YY_PROTO(( ace_yy_state_type current_state ));
static int ace_yy_get_next_buffer ACE_YY_PROTO(( void ));
-static void ace_yy_fatal_error ACE_YY_PROTO(( ace_yyconst char msg[] ));
+static void ace_yy_fatal_error ACE_YY_PROTO(( ace_yyconst ACE_TCHAR msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up ace_yytext.
@@ -493,7 +493,7 @@ static ace_yyconst short int ace_yy_chk[482] =
} ;
static ace_yy_state_type ace_yy_last_accepting_state;
-static char *ace_yy_last_accepting_cpos;
+static ACE_TCHAR *ace_yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -502,7 +502,7 @@ static char *ace_yy_last_accepting_cpos;
#define ace_yymore() ace_yymore_used_but_not_detected
#define ACE_YY_MORE_ADJ 0
#define ACE_YY_RESTORE_ACE_YY_MORE_OFFSET
-char *ace_yytext;
+ACE_TCHAR *ace_yytext;
#line 1 "Svc_Conf.l"
#define INITIAL 0
#line 2 "Svc_Conf.l"
@@ -524,7 +524,7 @@ int ace_yyerrno = 0;
// Used to parse service configurator directives from a string rather
// than from a svc.conf file.
-const ASYS_TCHAR *ace_yydirective = 0;
+const ACE_TCHAR *ace_yydirective = 0;
#define token(x) x
#define PARAMETERS 1
@@ -545,15 +545,15 @@ extern int ace_yywrap ACE_YY_PROTO(( void ));
#endif
#ifndef ACE_YY_NO_UNPUT
-static void ace_yyunput ACE_YY_PROTO(( int c, char *buf_ptr ));
+static void ace_yyunput ACE_YY_PROTO(( int c, ACE_TCHAR *buf_ptr ));
#endif
#ifndef ace_yytext_ptr
-static void ace_yy_flex_strncpy ACE_YY_PROTO(( char *, ace_yyconst char *, int ));
+static void ace_yy_flex_strncpy ACE_YY_PROTO(( ACE_TCHAR *, ace_yyconst ACE_TCHAR *, int ));
#endif
#ifdef ACE_YY_NEED_STRLEN
-static int ace_yy_flex_strlen ACE_YY_PROTO(( ace_yyconst char * ));
+static int ace_yy_flex_strlen ACE_YY_PROTO(( ace_yyconst ACE_TCHAR * ));
#endif
#ifndef ACE_YY_NO_INPUT
@@ -623,9 +623,9 @@ ACE_YY_MALLOC_DECL
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( ace_yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
+ buf[n] = (ACE_TCHAR) c; \
if ( c == '\n' ) \
- buf[n++] = (char) c; \
+ buf[n++] = (ACE_TCHAR) c; \
if ( c == EOF && ferror( ace_yyin ) ) \
ACE_YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
@@ -681,7 +681,7 @@ ACE_YY_MALLOC_DECL
ACE_YY_DECL
{
register ace_yy_state_type ace_yy_current_state;
- register char *ace_yy_cp = 0, *ace_yy_bp = 0;
+ register ACE_TCHAR *ace_yy_cp = 0, *ace_yy_bp = 0;
register int ace_yy_act;
#line 39 "Svc_Conf.l"
@@ -868,11 +868,11 @@ ACE_YY_RULE_SETUP
#line 59 "Svc_Conf.l"
{ // Check for first type of string, i.e.,
// "double quotes" delimited.
- char *s = strrchr (ace_yytext, '"');
+ ACE_TCHAR *s = ACE_OS::strrchr (ace_yytext, '"');
if (s == 0)
// Check for second type of string, i.e.,
// 'single quotes' delimited.
- s = strrchr (ace_yytext, '\'');
+ s = ACE_OS::strrchr (ace_yytext, '\'');
ACE_ASSERT (s != 0);
// Eliminate the opening and closing double or
@@ -911,10 +911,10 @@ ACE_YY_RULE_SETUP
case 24:
ACE_YY_RULE_SETUP
#line 84 "Svc_Conf.l"
-{ ACE_ERROR ((LM_ERROR, "unknown character = (%d", *ace_yytext));
+{ ACE_ERROR ((LM_ERROR, ACE_TEXT ("unknown character = (%d"), *ace_yytext));
if (isprint (*ace_yytext))
- ACE_ERROR ((LM_ERROR, "|%c", *ace_yytext));
- ACE_ERROR ((LM_ERROR, ")\n"));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("|%c"), *ace_yytext));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (")\n")));
}
ACE_YY_BREAK
case ACE_YY_STATE_EOF(INITIAL):
@@ -931,7 +931,7 @@ ACE_SVC_CONF_ECHO;
case ACE_YY_END_OF_BUFFER:
{
- /* Amount of text matched not including the EOB char. */
+ /* Amount of text matched not including the EOB ACE_TCHAR. */
int ace_yy_amount_of_matched_text = (int) (ace_yy_cp - ace_yytext_ptr) - 1;
/* Undo the effects of ACE_YY_DO_BEFORE_ACTION. */
@@ -1053,7 +1053,7 @@ ACE_SVC_CONF_ECHO;
default:
ACE_YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
+ ACE_TEXT ("fatal flex scanner internal error--no action found" ));
} /* end of action switch */
} /* end of scanning one token */
} /* end of ace_yylex */
@@ -1069,14 +1069,14 @@ ACE_SVC_CONF_ECHO;
static int ace_yy_get_next_buffer()
{
- register char *dest = ace_yy_current_buffer->ace_yy_ch_buf;
- register char *source = ace_yytext_ptr;
+ register ACE_TCHAR *dest = ace_yy_current_buffer->ace_yy_ch_buf;
+ register ACE_TCHAR *source = ace_yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( ace_yy_c_buf_p > &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] )
ACE_YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
+ ACE_TEXT ("fatal flex scanner internal error--end of buffer missed" ));
if ( ace_yy_current_buffer->ace_yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
@@ -1138,7 +1138,7 @@ static int ace_yy_get_next_buffer()
else
b->ace_yy_buf_size *= 2;
- b->ace_yy_ch_buf = (char *)
+ b->ace_yy_ch_buf = (ACE_TCHAR *)
/* Include room in for 2 EOB chars. */
ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf,
b->ace_yy_buf_size + 2 );
@@ -1149,7 +1149,7 @@ static int ace_yy_get_next_buffer()
if ( ! b->ace_yy_ch_buf )
ACE_YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
+ ACE_TEXT ("fatal error - scanner input buffer overflow") );
ace_yy_c_buf_p = &b->ace_yy_ch_buf[ace_yy_c_buf_p_offset];
@@ -1197,12 +1197,12 @@ static int ace_yy_get_next_buffer()
}
-/* ace_yy_get_previous_state - get the state just before the EOB char was reached */
+/* ace_yy_get_previous_state - get the state just before the EOB ACE_TCHAR was reached */
static ace_yy_state_type ace_yy_get_previous_state()
{
register ace_yy_state_type ace_yy_current_state;
- register char *ace_yy_cp;
+ register ACE_TCHAR *ace_yy_cp;
ace_yy_current_state = ace_yy_start;
ace_yy_current_state += ACE_YY_AT_BOL();
@@ -1242,7 +1242,7 @@ ace_yy_state_type ace_yy_current_state;
#endif
{
register int ace_yy_is_jam;
- register char *ace_yy_cp = ace_yy_c_buf_p;
+ register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p;
register ACE_YY_CHAR ace_yy_c = 1;
if ( ace_yy_accept[ace_yy_current_state] )
@@ -1265,14 +1265,14 @@ ace_yy_state_type ace_yy_current_state;
#ifndef ACE_YY_NO_UNPUT
#ifdef ACE_YY_USE_PROTOS
-static void ace_yyunput( int c, register char *ace_yy_bp )
+static void ace_yyunput( int c, register ACE_TCHAR *ace_yy_bp )
#else
static void ace_yyunput( c, ace_yy_bp )
int c;
-register char *ace_yy_bp;
+register ACE_TCHAR *ace_yy_bp;
#endif
{
- register char *ace_yy_cp = ace_yy_c_buf_p;
+ register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p;
/* undo effects of setting up ace_yytext */
*ace_yy_cp = ace_yy_hold_char;
@@ -1281,9 +1281,9 @@ register char *ace_yy_bp;
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = ace_yy_n_chars + 2;
- register char *dest = &ace_yy_current_buffer->ace_yy_ch_buf[
+ register ACE_TCHAR *dest = &ace_yy_current_buffer->ace_yy_ch_buf[
ace_yy_current_buffer->ace_yy_buf_size + 2];
- register char *source =
+ register ACE_TCHAR *source =
&ace_yy_current_buffer->ace_yy_ch_buf[number_to_move];
while ( source > ace_yy_current_buffer->ace_yy_ch_buf )
@@ -1298,7 +1298,7 @@ register char *ace_yy_bp;
ACE_YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
- *--ace_yy_cp = (char) c;
+ *--ace_yy_cp = (ACE_TCHAR) c;
ace_yytext_ptr = ace_yy_bp;
@@ -1452,16 +1452,16 @@ int size;
b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) );
if ( ! b )
- ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_create_buffer()" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_create_buffer()") );
b->ace_yy_buf_size = size;
/* ace_yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->ace_yy_ch_buf = (char *) ace_yy_flex_alloc( b->ace_yy_buf_size + 2 );
+ b->ace_yy_ch_buf = (ACE_TCHAR *) ace_yy_flex_alloc( b->ace_yy_buf_size + 2 );
if ( ! b->ace_yy_ch_buf )
- ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_create_buffer()" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_create_buffer()") );
b->ace_yy_is_our_buffer = 1;
@@ -1556,10 +1556,10 @@ ACE_YY_BUFFER_STATE b;
#ifndef ACE_YY_NO_SCAN_BUFFER
#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_buffer( char *base, ace_yy_size_t size )
+ACE_YY_BUFFER_STATE ace_yy_scan_buffer( ACE_TCHAR *base, ace_yy_size_t size )
#else
ACE_YY_BUFFER_STATE ace_yy_scan_buffer( base, size )
-char *base;
+ACE_TCHAR *base;
ace_yy_size_t size;
#endif
{
@@ -1573,7 +1573,7 @@ ace_yy_size_t size;
b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) );
if ( ! b )
- ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_scan_buffer()" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_scan_buffer()") );
b->ace_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->ace_yy_buf_pos = b->ace_yy_ch_buf = base;
@@ -1594,10 +1594,10 @@ ace_yy_size_t size;
#ifndef ACE_YY_NO_SCAN_STRING
#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yyconst char *ace_yy_str )
+ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yyconst ACE_TCHAR *ace_yy_str )
#else
ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yy_str )
-ace_yyconst char *ace_yy_str;
+ace_yyconst ACE_TCHAR *ace_yy_str;
#endif
{
int len;
@@ -1611,23 +1611,23 @@ ace_yyconst char *ace_yy_str;
#ifndef ACE_YY_NO_SCAN_BYTES
#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_bytes( ace_yyconst char *bytes, int len )
+ACE_YY_BUFFER_STATE ace_yy_scan_bytes( ace_yyconst ACE_TCHAR *bytes, int len )
#else
ACE_YY_BUFFER_STATE ace_yy_scan_bytes( bytes, len )
-ace_yyconst char *bytes;
+ace_yyconst ACE_TCHAR *bytes;
int len;
#endif
{
ACE_YY_BUFFER_STATE b;
- char *buf;
+ ACE_TCHAR *buf;
ace_yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
- buf = (char *) ace_yy_flex_alloc( n );
+ buf = (ACE_TCHAR *) ace_yy_flex_alloc( n );
if ( ! buf )
- ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_scan_bytes()" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_scan_bytes()") );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
@@ -1636,7 +1636,7 @@ int len;
b = ace_yy_scan_buffer( buf, n );
if ( ! b )
- ACE_YY_FATAL_ERROR( "bad buffer in ace_yy_scan_bytes()" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("bad buffer in ace_yy_scan_bytes()") );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1672,7 +1672,7 @@ int new_state;
if ( ! ace_yy_start_stack )
ACE_YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
+ ACE_TEXT ("out of memory expanding start-condition stack") );
}
ace_yy_start_stack[ace_yy_start_stack_ptr++] = ACE_YY_START;
@@ -1686,7 +1686,7 @@ int new_state;
static void ace_yy_pop_state()
{
if ( --ace_yy_start_stack_ptr < 0 )
- ACE_YY_FATAL_ERROR( "start-condition stack underflow" );
+ ACE_YY_FATAL_ERROR( ACE_TEXT ("start-condition stack underflow") );
BEGIN(ace_yy_start_stack[ace_yy_start_stack_ptr]);
}
@@ -1705,10 +1705,10 @@ static int ace_yy_top_state()
#endif
#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_fatal_error( ace_yyconst char msg[] )
+static void ace_yy_fatal_error( ace_yyconst ACE_TCHAR msg[] )
#else
static void ace_yy_fatal_error( msg )
-char msg[];
+ACE_TCHAR msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
@@ -1737,11 +1737,11 @@ char msg[];
#ifndef ace_yytext_ptr
#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_flex_strncpy( char *s1, ace_yyconst char *s2, int n )
+static void ace_yy_flex_strncpy( ACE_TCHAR *s1, ace_yyconst ACE_TCHAR *s2, int n )
#else
static void ace_yy_flex_strncpy( s1, s2, n )
-char *s1;
-ace_yyconst char *s2;
+ACE_TCHAR *s1;
+ace_yyconst ACE_TCHAR *s2;
int n;
#endif
{
@@ -1753,10 +1753,10 @@ int n;
#ifdef ACE_YY_NEED_STRLEN
#ifdef ACE_YY_USE_PROTOS
-static int ace_yy_flex_strlen( ace_yyconst char *s )
+static int ace_yy_flex_strlen( ace_yyconst ACE_TCHAR *s )
#else
static int ace_yy_flex_strlen( s )
-ace_yyconst char *s;
+ace_yyconst ACE_TCHAR *s;
#endif
{
register int n;
@@ -1786,14 +1786,14 @@ void *ptr;
ace_yy_size_t size;
#endif
{
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
+ /* The cast to (ACE_TCHAR *) in the following accommodates both
+ * implementations that use ACE_TCHAR* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return (void *) realloc( (ACE_TCHAR *) ptr, size );
}
#ifdef ACE_YY_USE_PROTOS
diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp
index adc83e36520..0054186ab20 100644
--- a/ace/Svc_Conf_y.cpp
+++ b/ace/Svc_Conf_y.cpp
@@ -15,9 +15,9 @@ ACE_RCSID(ace, Svc_Conf_y, "$Id$")
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
ACE_Static_Node *svc_type);
static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- const ASYS_TCHAR *svc_name);
+ const ACE_TCHAR *svc_name);
-#define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = '\0', ace_yytext)
+#define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = ACE_TEXT ('\0'), ace_yytext)
/* Force the pretty debugging code to compile.*/
/* #define ACE_YYDEBUG 1*/
@@ -261,10 +261,10 @@ ace_yyerror (const char *s)
#endif /* ACE_NLOGGING */
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("[error %d] on line %d: %s\n"),
+ ACE_TEXT ("[error %d] on line %d: %s\n"),
++ace_yyerrno,
ace_yylineno,
- ASYS_WIDE_STRING (s)));
+ s));
}
// Note that SRC_REC represents left context, which is the STREAM *
@@ -272,7 +272,7 @@ ace_yyerror (const char *s)
static ACE_Module_Type *
ace_get_module (ACE_Static_Node *str_rec,
- const ASYS_TCHAR *svc_name)
+ const ACE_TCHAR *svc_name)
{
const ACE_Service_Type *sr = str_rec->record ();
const ACE_Service_Type_Impl *type = sr->type ();
@@ -286,7 +286,7 @@ ace_get_module (ACE_Static_Node *str_rec,
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
+ ACE_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
svc_name,
str_rec->name ()));
ace_yyerrno++;
@@ -305,12 +305,12 @@ ace_get_module (ACE_Static_Node *str_rec,
const ACE_Service_Type *sv = svc_type->record ();
type = sv->type ();
ACE_Module_Type *mt = (ACE_Module_Type *) type;
- const ASYS_TCHAR *module_type_name = svc_type->name ();
+ const ACE_TCHAR *module_type_name = svc_type->name ();
if (sr == 0 || st == 0 || mt == 0)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
+ ACE_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
module_type_name,
str_rec->name ()));
ace_yyerrno++;
@@ -323,7 +323,7 @@ ace_get_module (ACE_Static_Node *str_rec,
if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
+ ACE_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
module_type_name,
mp->name ()));
mp->name (module_type_name);
@@ -333,7 +333,7 @@ ace_get_module (ACE_Static_Node *str_rec,
}
ACE_Service_Type_Impl *
-ace_create_service_type (const ASYS_TCHAR *name,
+ace_create_service_type (const ACE_TCHAR *name,
int type,
void *symbol,
u_int flags,
@@ -366,7 +366,7 @@ ace_create_service_type (const ASYS_TCHAR *name,
break;
default:
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("unknown case\n")));
+ ACE_TEXT ("unknown case\n")));
ace_yyerrno++;
break;
}
@@ -378,7 +378,7 @@ ace_create_service_type (const ASYS_TCHAR *name,
int ace_yylineno = 1;
// Name given on the command-line to envoke the program.
-ASYS_TCHAR *program_name;
+ACE_TCHAR *program_name;
// Main driver program.
@@ -480,7 +480,7 @@ int ace_yyindent;
ACE_YYDEBUG_INDENT(ace_yyindent);
printf(" .... look ahead at %s `%s'\n",
ace_yytoken_string,
- (0 == ace_yytoken_num)? "\0": ACE_YYDEBUG_LEXER_TEXT);
+ (0 == ace_yytoken_num) ? ACE_TEXT ("\0") : ACE_YYDEBUG_LEXER_TEXT);
}
#endif /* ACE_YYDEBUG_LOOK_AHEAD */
#ifndef ACE_YYDEBUG_DISCARD_STATE
@@ -721,7 +721,7 @@ case 10:
#line 70 "Svc_Conf.y"
{
if (ace_yyvsp[-1].svc_record_ != 0)
- ace_yyval.parse_node_ = new ACE_Dynamic_Node (ace_yyvsp[-1].svc_record_, ASYS_WIDE_STRING (ace_yyvsp[0].ident_));
+ ace_yyval.parse_node_ = new ACE_Dynamic_Node (ace_yyvsp[-1].svc_record_, ace_yyvsp[0].ident_);
else
ace_yyval.parse_node_ = 0;
}
@@ -729,25 +729,25 @@ break;
case 11:
#line 80 "Svc_Conf.y"
{
- ace_yyval.parse_node_ = new ACE_Static_Node (ASYS_WIDE_STRING (ace_yyvsp[-1].ident_), ASYS_WIDE_STRING (ace_yyvsp[0].ident_));
+ ace_yyval.parse_node_ = new ACE_Static_Node (ace_yyvsp[-1].ident_, ace_yyvsp[0].ident_);
}
break;
case 12:
#line 87 "Svc_Conf.y"
{
- ace_yyval.parse_node_ = new ACE_Suspend_Node (ASYS_WIDE_STRING (ace_yyvsp[0].ident_));
+ ace_yyval.parse_node_ = new ACE_Suspend_Node (ace_yyvsp[0].ident_);
}
break;
case 13:
#line 94 "Svc_Conf.y"
{
- ace_yyval.parse_node_ = new ACE_Resume_Node (ASYS_WIDE_STRING (ace_yyvsp[0].ident_));
+ ace_yyval.parse_node_ = new ACE_Resume_Node (ace_yyvsp[0].ident_);
}
break;
case 14:
#line 101 "Svc_Conf.y"
{
- ace_yyval.parse_node_ = new ACE_Remove_Node (ASYS_WIDE_STRING (ace_yyvsp[0].ident_));
+ ace_yyval.parse_node_ = new ACE_Remove_Node (ace_yyvsp[0].ident_);
}
break;
case 15:
@@ -758,7 +758,7 @@ case 15:
break;
case 16:
#line 111 "Svc_Conf.y"
-{ ace_yyval.static_node_ = new ACE_Static_Node (ASYS_WIDE_STRING (ace_yyvsp[0].ident_)); }
+{ ace_yyval.static_node_ = new ACE_Static_Node (ace_yyvsp[0].ident_); }
break;
case 17:
#line 112 "Svc_Conf.y"
@@ -828,7 +828,7 @@ case 25:
|| st->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("dynamic initialization failed for Module %s\n"),
+ ACE_TEXT ("dynamic initialization failed for Module %s\n"),
svc_type->name ()));
ace_yyerrno++;
}
@@ -843,7 +843,7 @@ case 26:
if (((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("Problem with static\n")));
+ ACE_TEXT ("Problem with static\n")));
ace_yyerrno++;
}
}
@@ -881,7 +881,7 @@ case 29:
if (mt != 0 && st->remove (mt) == -1)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
+ ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
module->name (),
stream->name ()));
ace_yyerrno++;
@@ -900,12 +900,12 @@ case 30:
if (sym != 0)
{
ACE_Service_Type_Impl *stp
- = ace_create_service_type (ASYS_WIDE_STRING (ace_yyvsp[-3].ident_),
+ = ace_create_service_type (ace_yyvsp[-3].ident_,
ace_yyvsp[-2].type_,
sym,
flags,
gobbler);
- ace_yyval.svc_record_ = new ACE_Service_Type (ASYS_WIDE_STRING (ace_yyvsp[-3].ident_),
+ ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_,
stp,
ace_yyvsp[-1].location_node_->handle (),
ace_yyvsp[0].type_);
@@ -913,8 +913,8 @@ case 30:
else
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("Unable to find service: %s\n"),
- ASYS_WIDE_STRING (ace_yyvsp[-3].ident_)));
+ ACE_TEXT ("Unable to find service: %s\n"),
+ ace_yyvsp[-3].ident_));
++ace_yyerrno;
ace_yyval.svc_record_ = 0;
}
@@ -942,19 +942,19 @@ break;
case 34:
#line 276 "Svc_Conf.y"
{
- ace_yyval.location_node_ = new ACE_Object_Node (ASYS_WIDE_STRING (ace_yyvsp[-2].ident_), ASYS_WIDE_STRING(ace_yyvsp[0].ident_));
+ ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_);
}
break;
case 35:
#line 280 "Svc_Conf.y"
{
- ace_yyval.location_node_ = new ACE_Function_Node (ASYS_WIDE_STRING (ace_yyvsp[-4].ident_), ASYS_WIDE_STRING (ace_yyvsp[-2].ident_));
+ ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_);
}
break;
case 36:
#line 284 "Svc_Conf.y"
{
- ace_yyval.location_node_ = new ACE_Static_Function_Node (ASYS_WIDE_STRING (ace_yyvsp[-2].ident_));
+ ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_);
}
break;
case 37:
diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp
index 0f4c3ebe617..e48100a7b1c 100644
--- a/ace/Svc_Handler.cpp
+++ b/ace/Svc_Handler.cpp
@@ -130,21 +130,21 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open (void *)
{
ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open");
#if defined (ACE_DEBUGGING)
- ASYS_TCHAR buf[BUFSIZ];
+ ACE_TCHAR buf[BUFSIZ];
ACE_PEER_STREAM_ADDR client_addr;
if (this->peer_.get_remote_addr (client_addr) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("get_remote_addr")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("get_remote_addr")),
-1);
else if (client_addr.addr_to_string (buf, sizeof buf) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("can't obtain peer's address")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("can't obtain peer's address")),
-1);
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("connected to %s on fd %d\n"),
+ ACE_TEXT ("connected to %s on fd %d\n"),
buf,
this->peer_.get_handle ()));
#endif /* ACE_DEBUGGING */
@@ -153,8 +153,8 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open (void *)
(this,
ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("unable to register client handler")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("unable to register client handler")),
-1);
return 0;
}
@@ -285,7 +285,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::close (unsigned long)
}
template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init (int argc, ASYS_TCHAR *argv[])
+ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init (int argc, ACE_TCHAR *argv[])
{
ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init");
ACE_UNUSED_ARG (argc);
@@ -301,7 +301,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::fini (void)
}
template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info (ASYS_TCHAR **, size_t) const
+ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info (ACE_TCHAR **, size_t) const
{
ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info");
return -1;
diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h
index 4907e066f03..a665bfa537a 100644
--- a/ace/Svc_Handler.h
+++ b/ace/Svc_Handler.h
@@ -85,7 +85,7 @@ public:
// <act_holder != 0>.
// = Dynamic linking hooks.
- virtual int init (int argc, ASYS_TCHAR *argv[]);
+ virtual int init (int argc, ACE_TCHAR *argv[]);
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
@@ -93,7 +93,7 @@ public:
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
- virtual int info (ASYS_TCHAR **info_string, size_t length) const;
+ virtual int info (ACE_TCHAR **info_string, size_t length) const;
// Default version does no work and returns -1. Must be overloaded
// by application developer to do anything meaningful.
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
index e2d1bf165ff..33d5710acb0 100644
--- a/ace/Synch.cpp
+++ b/ace/Synch.cpp
@@ -128,7 +128,7 @@ ACE_Process_Mutex::dump (void) const
}
#if !defined (ACE_WIN32) && !defined (ACE_HAS_POSIX_SEM)
-LPCTSTR
+const ACE_TCHAR *
ACE_Process_Mutex::unique_name (void)
{
// For all platforms other than Win32, we are going to create a
@@ -139,7 +139,7 @@ ACE_Process_Mutex::unique_name (void)
}
#endif /* !ACE_WIN32 && !ACE_HAS_POSIX_SEM */
-ACE_Process_Mutex::ACE_Process_Mutex (LPCTSTR name, void *arg)
+ACE_Process_Mutex::ACE_Process_Mutex (const ACE_TCHAR *name, void *arg)
#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
: lock_ (USYNC_PROCESS, name, (ACE_mutexattr_t *) arg)
#else
@@ -155,7 +155,7 @@ ACE_Process_Mutex::~ACE_Process_Mutex (void)
{
}
-ACE_RW_Process_Mutex::ACE_RW_Process_Mutex (LPCTSTR name,
+ACE_RW_Process_Mutex::ACE_RW_Process_Mutex (const ACE_TCHAR *name,
int flags)
: lock_ (name, flags
#if defined (ACE_WIN32)
@@ -187,16 +187,18 @@ ACE_RW_Mutex::dump (void) const
// ACE_TRACE ("ACE_RW_Mutex::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_RW_Mutex::ACE_RW_Mutex (int type, LPCTSTR name, void *arg)
+ACE_RW_Mutex::ACE_RW_Mutex (int type, const ACE_TCHAR *name, void *arg)
: removed_ (0)
{
// ACE_TRACE ("ACE_RW_Mutex::ACE_RW_Mutex");
if (ACE_OS::rwlock_init (&this->lock_, type, name, arg) != 0)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT("%p\n"), ASYS_TEXT("ACE_RW_Mutex::ACE_RW_Mutex")));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT("%p\n"),
+ ACE_TEXT("ACE_RW_Mutex::ACE_RW_Mutex")));
}
ACE_RW_Mutex::~ACE_RW_Mutex (void)
@@ -213,13 +215,13 @@ ACE_Semaphore::dump (void) const
// ACE_TRACE ("ACE_Semaphore::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_Semaphore::ACE_Semaphore (u_int count,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg,
int max)
: removed_ (0)
@@ -228,8 +230,8 @@ ACE_Semaphore::ACE_Semaphore (u_int count,
if (ACE_OS::sema_init (&this->semaphore_, count, type,
name, arg, max) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT("%p\n"),
- ASYS_TEXT("ACE_Semaphore::ACE_Semaphore")));
+ ACE_TEXT("%p\n"),
+ ACE_TEXT("ACE_Semaphore::ACE_Semaphore")));
}
ACE_Semaphore::~ACE_Semaphore (void)
@@ -255,12 +257,12 @@ ACE_File_Lock::ACE_File_Lock (ACE_HANDLE h)
// ACE_TRACE ("ACE_File_Lock::ACE_File_Lock");
if (ACE_OS::flock_init (&this->lock_) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_File_Lock::ACE_File_Lock")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_File_Lock::ACE_File_Lock")));
this->set_handle (h);
}
-ACE_File_Lock::ACE_File_Lock (LPCTSTR name,
+ACE_File_Lock::ACE_File_Lock (const ACE_TCHAR *name,
int flags,
mode_t perms)
{
@@ -268,13 +270,13 @@ ACE_File_Lock::ACE_File_Lock (LPCTSTR name,
if (this->open (name, flags, perms) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p %s\n"),
- ASYS_TEXT ("ACE_File_Lock::ACE_File_Lock"),
+ ACE_TEXT ("%p %s\n"),
+ ACE_TEXT ("ACE_File_Lock::ACE_File_Lock"),
name));
}
int
-ACE_File_Lock::open (LPCTSTR name,
+ACE_File_Lock::open (const ACE_TCHAR *name,
int flags,
mode_t perms)
{
@@ -299,7 +301,7 @@ ACE_Process_Semaphore::dump (void) const
}
ACE_Process_Semaphore::ACE_Process_Semaphore (u_int count,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg,
int max)
#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
@@ -366,14 +368,14 @@ ACE_Mutex::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
#if defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("lockname_ = %s\n"), this->lockname_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("process_lock_ = %x\n"), this->process_lock_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lockname_ = %s\n"), this->lockname_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("process_lock_ = %x\n"), this->process_lock_));
#endif /* CHORUS */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-ACE_Mutex::ACE_Mutex (int type, LPCTSTR name, ACE_mutexattr_t *arg)
+ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name, ACE_mutexattr_t *arg)
:
#if defined (CHORUS)
process_lock_ (0),
@@ -442,8 +444,8 @@ ACE_Mutex::ACE_Mutex (int type, LPCTSTR name, ACE_mutexattr_t *arg)
name,
arg) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Mutex::ACE_Mutex")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
}
ACE_Mutex::~ACE_Mutex (void)
@@ -455,7 +457,7 @@ ACE_Mutex::~ACE_Mutex (void)
ACE_Event::ACE_Event (int manual_reset,
int initial_state,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: removed_ (0)
{
@@ -466,8 +468,8 @@ ACE_Event::ACE_Event (int manual_reset,
name,
arg) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT("%p\n"),
- ASYS_TEXT("ACE_Event::ACE_Event")));
+ ACE_TEXT("%p\n"),
+ ACE_TEXT("ACE_Event::ACE_Event")));
}
ACE_Event::~ACE_Event (void)
@@ -539,7 +541,7 @@ ACE_Event::dump (void) const
ACE_Manual_Event::ACE_Manual_Event (int initial_state,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: ACE_Event (1,
initial_state,
@@ -557,7 +559,7 @@ ACE_Manual_Event::dump (void) const
ACE_Auto_Event::ACE_Auto_Event (int initial_state,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: ACE_Event (0,
initial_state,
@@ -586,7 +588,7 @@ ACE_Thread_Semaphore::dump (void) const
}
ACE_Thread_Semaphore::ACE_Thread_Semaphore (u_int count,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg,
int max)
: ACE_Semaphore (count, USYNC_THREAD, name, arg, max)
@@ -601,12 +603,12 @@ ACE_Thread_Mutex_Guard::dump (void) const
// ACE_TRACE ("ACE_Thread_Mutex_Guard::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (LPCTSTR name,
+ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (const ACE_TCHAR *name,
ACE_mutexattr_t *arg)
: removed_ (0)
{
@@ -620,8 +622,8 @@ ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (LPCTSTR name,
name,
arg) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("recursive_mutex_init")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("recursive_mutex_init")));
}
ACE_ALLOC_HOOK_DEFINE(ACE_Recursive_Thread_Mutex)
@@ -724,17 +726,17 @@ ACE_Condition_Thread_Mutex::dump (void) const
// ACE_TRACE ("ACE_Condition_Thread_Mutex::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
#if defined (ACE_WIN32)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("waiters = %d\n"),
+ ACE_TEXT ("waiters = %d\n"),
this->cond_.waiters ()));
#endif /* ACE_WIN32 */
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: mutex_ ((ACE_Thread_Mutex &) m),
removed_ (0)
@@ -752,14 +754,14 @@ ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &
name,
arg) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
}
ACE_Condition_Thread_Mutex::
ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
ACE_Condition_Attributes &attributes,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: mutex_ ((ACE_Thread_Mutex &) m),
removed_ (0)
@@ -774,8 +776,8 @@ ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
// ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex");
if (ACE_OS::cond_init (&this->cond_, attributes.attributes_,
name, arg) != 0)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
}
ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (void)
@@ -835,14 +837,14 @@ ACE_Sub_Barrier::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->barrier_finished_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("running_threads_ = %d"), this->running_threads_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("running_threads_ = %d"), this->running_threads_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_Sub_Barrier::ACE_Sub_Barrier (u_int count,
ACE_Thread_Mutex &lock,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: barrier_finished_ (lock, name, arg),
running_threads_ (count)
@@ -861,15 +863,15 @@ ACE_Barrier::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("current_generation_ = %d"), this->current_generation_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\ncount_ = %d"), this->count_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("current_generation_ = %d"), this->current_generation_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\ncount_ = %d"), this->count_));
this->sub_barrier_1_.dump ();
this->sub_barrier_2_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
ACE_Barrier::ACE_Barrier (u_int count,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: lock_ (name, (ACE_mutexattr_t *) arg),
current_generation_ (0),
@@ -918,7 +920,7 @@ ACE_Barrier::wait (void)
return 0;
}
-ACE_Thread_Barrier::ACE_Thread_Barrier (u_int count, LPCTSTR name)
+ACE_Thread_Barrier::ACE_Thread_Barrier (u_int count, const ACE_TCHAR *name)
: ACE_Barrier (count, name)
{
// ACE_TRACE ("ACE_Thread_Barrier::ACE_Thread_Barrier");
@@ -932,7 +934,7 @@ ACE_Thread_Barrier::dump (void) const
}
#if 0
-ACE_Process_Barrier::ACE_Process_Barrier (u_int count, LPCTSTR name)
+ACE_Process_Barrier::ACE_Process_Barrier (u_int count, const ACE_TCHAR *name)
: ACE_Barrier (count, USYNC_PROCESS, name)
{
// ACE_TRACE ("ACE_Process_Barrier::ACE_Process_Barrier");
@@ -955,7 +957,7 @@ ACE_Process_Condition<MUTEX>::dump (void) const
template <class MUTEX>
ACE_Process_Condition<MUTEX>::ACE_Process_Condition (MUTEX &m,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: ACE_Condition<MUTEX> (m, USYNC_PROCESS, name, arg)
{
@@ -971,7 +973,7 @@ ACE_Thread_Mutex::dump (void) const
// ACE_TRACE ("ACE_Thread_Mutex::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -981,7 +983,7 @@ ACE_Thread_Mutex::~ACE_Thread_Mutex (void)
this->remove ();
}
-ACE_Thread_Mutex::ACE_Thread_Mutex (LPCTSTR name, ACE_mutexattr_t *arg)
+ACE_Thread_Mutex::ACE_Thread_Mutex (const ACE_TCHAR *name, ACE_mutexattr_t *arg)
: removed_ (0)
{
// ACE_TRACE ("ACE_Thread_Mutex::ACE_Thread_Mutex");
@@ -991,13 +993,13 @@ ACE_Thread_Mutex::ACE_Thread_Mutex (LPCTSTR name, ACE_mutexattr_t *arg)
name,
arg) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Thread_Mutex::ACE_Thread_Mutex")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Thread_Mutex::ACE_Thread_Mutex")));
}
ACE_ALLOC_HOOK_DEFINE(ACE_RW_Thread_Mutex)
-ACE_RW_Thread_Mutex::ACE_RW_Thread_Mutex (LPCTSTR name,
+ACE_RW_Thread_Mutex::ACE_RW_Thread_Mutex (const ACE_TCHAR *name,
void *arg)
: ACE_RW_Mutex (USYNC_THREAD, name, arg)
{
diff --git a/ace/Synch.h b/ace/Synch.h
index 91bc87620da..1257575285f 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -152,11 +152,11 @@ public:
// <remove> is called make sure to call <dup> on the <handle> before
// closing it.
- ACE_File_Lock (LPCTSTR filename, int flags, mode_t mode = 0);
+ ACE_File_Lock (const ACE_TCHAR *filename, int flags, mode_t mode = 0);
// Open the <filename> with <flags> and <mode> and set the result to
// <handle_>.
- int open (LPCTSTR filename, int flags, mode_t mode = 0);
+ int open (const ACE_TCHAR *filename, int flags, mode_t mode = 0);
// Open the <filename> with <flags> and <mode> and set the result to
// <handle_>.
@@ -243,7 +243,7 @@ public:
// = Initialization and termination.
ACE_Semaphore (u_int count = 1, // By default make this unlocked.
int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void * = 0,
int max = 0x7fffffff);
// Initialize the semaphore, with initial value of "count".
@@ -343,7 +343,7 @@ class ACE_Export ACE_Process_Semaphore
// across processes.
public:
ACE_Process_Semaphore (u_int count = 1, // By default make this unlocked.
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void * = 0,
int max = 0x7FFFFFFF);
// Initialize the semaphore, with an initial value of <count> and a
@@ -424,7 +424,7 @@ class ACE_Export ACE_Null_Semaphore
public:
ACE_Null_Semaphore (u_int count = 1, // By default make this unlocked.
int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void * = 0,
int max = 0x7fffffff);
~ACE_Null_Semaphore (void);
@@ -457,7 +457,7 @@ class ACE_Export ACE_RW_Mutex
// parallel readers than writers...
public:
ACE_RW_Mutex (int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// Initialize a readers/writer lock.
@@ -531,7 +531,7 @@ class ACE_Export ACE_Mutex
// processes (depending on TYPE flag)).
public:
ACE_Mutex (int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0);
// Initialize the mutex.
@@ -593,7 +593,7 @@ public:
ACE_mutex_t *process_lock_;
// This lock resides in shared memory.
- LPCTSTR lockname_;
+ const ACE_TCHAR *lockname_;
// Remember the name of the mutex if we created it so we can unlink
// it when we go away (only the actor that initialized the memory
// can destroy it).
@@ -622,7 +622,7 @@ class ACE_Export ACE_Process_Mutex
// the same host machine, as well as within a process, of
// course.
public:
- ACE_Process_Mutex (LPCTSTR name = 0,
+ ACE_Process_Mutex (const ACE_TCHAR *name = 0,
void *arg = 0);
// Create a Process_Mutex, passing in the optional <name>.
@@ -675,11 +675,11 @@ private:
#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
ACE_Mutex lock_;
#else
- TCHAR name_[ACE_UNIQUE_NAME_LEN];
+ ACE_TCHAR name_[ACE_UNIQUE_NAME_LEN];
// If the user does not provide a name we generate a unique name in
// this buffer.
- LPCTSTR unique_name (void);
+ const ACE_TCHAR *unique_name (void);
// Create and return the unique name.
ACE_SV_Semaphore_Complex lock_;
@@ -699,7 +699,7 @@ class ACE_Export ACE_RW_Process_Mutex
// same process. This isn't a limitation of ACE, it's simply
// the file lock semantics on UNIX and Win32.
public:
- ACE_RW_Process_Mutex (LPCTSTR name = 0,
+ ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0,
int flags = O_CREAT|O_RDWR);
// Create a readers/writer <Process_Mutex>, passing in the optional
// <name>.
@@ -787,7 +787,7 @@ class ACE_Export ACE_Null_Mutex
// Implement a do nothing <ACE_Mutex>, i.e., all the methods are
// no ops.
public:
- ACE_Null_Mutex (LPCTSTR = 0);
+ ACE_Null_Mutex (const ACE_TCHAR * = 0);
~ACE_Null_Mutex (void);
int remove (void);
@@ -826,7 +826,7 @@ class ACE_Export ACE_Null_Condition
// some C++ compilers are *very* lame...
public:
ACE_Null_Condition (const ACE_Null_Mutex &m,
- LPCTSTR = 0,
+ const ACE_TCHAR * = 0,
void * = 0);
~ACE_Null_Condition (void);
int remove (void);
@@ -923,7 +923,7 @@ public:
ACE_Event (int manual_reset = 0,
int initial_state = 0,
int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// Constructor which will create event.
@@ -1012,7 +1012,7 @@ class ACE_Export ACE_Manual_Event : public ACE_Event
public:
ACE_Manual_Event (int initial_state = 0,
int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// constructor which will create manual event
@@ -1037,7 +1037,7 @@ class ACE_Export ACE_Auto_Event : public ACE_Event
public:
ACE_Auto_Event (int initial_state = 0,
int type = USYNC_THREAD,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// constructor which will create auto event
@@ -1058,7 +1058,7 @@ class ACE_Barrier
// = TITLE
// This is a no-op to make ACE "syntactically consistent."
public:
- ACE_Barrier (u_int, LPCTSTR = 0, void * = 0) {}
+ ACE_Barrier (u_int, const ACE_TCHAR * = 0, void * = 0) {}
~ACE_Barrier (void) {}
int wait (void) { ACE_NOTSUP_RETURN (-1); }
void dump (void) const {}
@@ -1082,7 +1082,7 @@ class ACE_Export ACE_Thread_Mutex
// recursive mutex.
friend class ACE_Condition_Thread_Mutex;
public:
- ACE_Thread_Mutex (LPCTSTR name = 0,
+ ACE_Thread_Mutex (const ACE_TCHAR *name = 0,
ACE_mutexattr_t *attributes = 0);
// Constructor.
@@ -1257,13 +1257,13 @@ class ACE_Export ACE_Condition_Thread_Mutex
// with compilers precludes this...
public:
ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// Initialize the condition variable.
ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
ACE_Condition_Attributes &attributes,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// Initialize the condition variable.
@@ -1333,7 +1333,7 @@ class ACE_Export ACE_Recursive_Thread_Mutex
// Implement a C++ wrapper that allows nested acquisition and
// release of a mutex that occurs in the same thread.
public:
- ACE_Recursive_Thread_Mutex (LPCTSTR name = 0,
+ ACE_Recursive_Thread_Mutex (const ACE_TCHAR *name = 0,
ACE_mutexattr_t *arg = 0);
// Initialize a recursive mutex.
@@ -1426,7 +1426,7 @@ class ACE_Export ACE_RW_Thread_Mutex : public ACE_RW_Mutex
// = TITLE
// Wrapper for readers/writer locks that exist within a process.
public:
- ACE_RW_Thread_Mutex (LPCTSTR name = 0,
+ ACE_RW_Thread_Mutex (const ACE_TCHAR *name = 0,
void *arg = 0);
~ACE_RW_Thread_Mutex (void);
@@ -1454,7 +1454,7 @@ class ACE_Export ACE_Thread_Semaphore : public ACE_Semaphore
// only within one process.
public:
ACE_Thread_Semaphore (u_int count = 1, // By default make this unlocked.
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void * = 0,
int max = 0x7FFFFFFF);
// Initialize the semaphore, with an initial value of <count>,
@@ -1475,7 +1475,7 @@ struct ACE_Export ACE_Sub_Barrier
// = Initialization.
ACE_Sub_Barrier (u_int count,
ACE_Thread_Mutex &lock,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
~ACE_Sub_Barrier (void);
@@ -1509,7 +1509,7 @@ class ACE_Export ACE_Barrier
// (Richard.Marejka@canada.sun.com).
public:
ACE_Barrier (u_int count,
- LPCTSTR name = 0,
+ const ACE_TCHAR *name = 0,
void *arg = 0);
// Initialize the barrier to synchronize <count> threads.
@@ -1564,7 +1564,7 @@ class ACE_Export ACE_Process_Condition
// = TITLE
// ACE_Condition variable wrapper that works across processes.
public:
- ACE_Process_Condition (MUTEX &m, LPCTSTR name = 0, void *arg = 0);
+ ACE_Process_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0);
void dump (void) const;
// Dump the state of an object.
@@ -1584,7 +1584,7 @@ class ACE_Export ACE_Process_Barrier : public ACE_Barrier
// This class is just a simple wrapper for ACE_Barrier that
// selects the USYNC_PROCESS variant for the locks.
public:
- ACE_Process_Barrier (u_int count, LPCTSTR name = 0);
+ ACE_Process_Barrier (u_int count, const ACE_TCHAR *name = 0);
// Create a Process_Barrier, passing in the optional <name>.
void dump (void) const;
@@ -1604,7 +1604,7 @@ class ACE_Export ACE_Thread_Barrier : public ACE_Barrier
// This class is just a simple wrapper for ACE_Barrier that
// selects the USYNC_THREAD variant for the locks.
public:
- ACE_Thread_Barrier (u_int count, LPCTSTR name = 0);
+ ACE_Thread_Barrier (u_int count, const ACE_TCHAR *name = 0);
// Create a Thread_Barrier, passing in the optional <name>.
~ACE_Thread_Barrier (void);
diff --git a/ace/Synch.i b/ace/Synch.i
index 655edaad9ba..9bfe502ccae 100644
--- a/ace/Synch.i
+++ b/ace/Synch.i
@@ -272,7 +272,7 @@ ACE_Mutex::remove (void)
sizeof (ACE_mutex_t));
ACE_OS::shm_unlink (this->lockname_);
ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (LPTSTR,
+ ACE_const_cast (ACE_TCHAR *,
this->lockname_)));
}
}
@@ -450,7 +450,7 @@ ACE_Process_Semaphore::tryacquire_write (void)
ACE_INLINE
ACE_Null_Semaphore::ACE_Null_Semaphore (u_int,
int,
- LPCTSTR,
+ const ACE_TCHAR *,
void *,
int)
{
@@ -898,7 +898,7 @@ ACE_Null_Barrier::dump (void) const
}
ACE_INLINE
-ACE_Null_Mutex::ACE_Null_Mutex (LPCTSTR)
+ACE_Null_Mutex::ACE_Null_Mutex (const ACE_TCHAR *)
{
}
@@ -974,7 +974,7 @@ ACE_Noop_Token::dump (void) const
ACE_INLINE
ACE_Null_Condition::ACE_Null_Condition (const ACE_Null_Mutex &m,
- LPCTSTR,
+ const ACE_TCHAR *,
void*)
: mutex_ ((ACE_Null_Mutex &) m)
{
diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp
index 3c0832195f2..86f97cb6cea 100644
--- a/ace/Synch_T.cpp
+++ b/ace/Synch_T.cpp
@@ -114,8 +114,8 @@ ACE_Guard<ACE_LOCK>::dump (void) const
// ACE_TRACE ("ACE_Guard<ACE_LOCK>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("mutex_ = %x\n"), this->lock_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("owner_ = %d\n"), this->owner_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_ = %x\n"), this->lock_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owner_ = %d\n"), this->owner_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -148,16 +148,16 @@ ACE_Condition<MUTEX>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
#if defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("condname_ = %s\n"), this->condname_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("process_cond_ = %x\n"), this->process_cond_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("condname_ = %s\n"), this->condname_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("process_cond_ = %x\n"), this->process_cond_));
#endif /* CHORUS */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
template <class MUTEX>
ACE_Thread_Condition<MUTEX>::ACE_Thread_Condition (MUTEX &m,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
: ACE_Condition<MUTEX> (m, USYNC_THREAD, name, arg)
{
@@ -175,7 +175,7 @@ ACE_Thread_Condition<MUTEX>::dump (void) const
template <class MUTEX>
ACE_Condition<MUTEX>::ACE_Condition (MUTEX &m,
int type,
- LPCTSTR name,
+ const ACE_TCHAR *name,
void *arg)
:
#if defined (CHORUS)
@@ -247,8 +247,8 @@ ACE_Condition<MUTEX>::ACE_Condition (MUTEX &m,
name,
arg) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Condition::ACE_Condition")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Condition::ACE_Condition")));
}
template <class MUTEX>
@@ -258,8 +258,8 @@ ACE_Condition<MUTEX>::~ACE_Condition (void)
if (this->remove () == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Condition::~ACE_Condition")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Condition::~ACE_Condition")));
}
template <class MUTEX> int
@@ -344,9 +344,9 @@ ACE_TSS<TYPE>::dump (void) const
#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->keylock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("key_ = %d\n"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nonce_ = %d"), this->once_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %d\n"), this->key_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nonce_ = %d"), this->once_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */
}
@@ -437,15 +437,15 @@ ACE_TSS<TYPE>::ACE_TSS (TYPE *ts_obj)
{
delete tss_adapter;
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Thread::setspecific() failed!")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Thread::setspecific() failed!")));
}
#else
if (ACE_Thread::setspecific (this->key_,
(void *) ts_obj) != 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_Thread::setspecific() failed!")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Thread::setspecific() failed!")));
#endif /* ACE_HAS_THR_C_DEST */
}
}
@@ -616,8 +616,8 @@ ACE_TSS_Guard<ACE_LOCK>::dump (void) const
// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("key_ = %d"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %d"), this->key_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Synch_T.h b/ace/Synch_T.h
index 55914136c08..edd88feddf4 100644
--- a/ace/Synch_T.h
+++ b/ace/Synch_T.h
@@ -740,7 +740,7 @@ class ACE_Condition
public:
// = Initialiation and termination methods.
ACE_Condition (MUTEX &m, int type = USYNC_THREAD,
- LPCTSTR name = 0, void *arg = 0);
+ const ACE_TCHAR *name = 0, void *arg = 0);
// Initialize the condition variable.
~ACE_Condition (void);
@@ -788,7 +788,7 @@ protected:
ACE_cond_t *process_cond_;
// This condition resides in shared memory.
- LPCTSTR condname_;
+ const ACE_TCHAR *condname_;
// Remember the name of the condition if we created it so we can
// unlink it when we go away (only the actor that initialized the
// memory can destroy it).
@@ -826,7 +826,7 @@ class ACE_Thread_Condition : public ACE_Condition<MUTEX>
// mutex and re-evaluate the condition.
public:
// = Initialization method.
- ACE_Thread_Condition (MUTEX &m, LPCTSTR name = 0, void *arg = 0);
+ ACE_Thread_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0);
void dump (void) const;
// Dump the state of an object.
diff --git a/ace/Synch_T.i b/ace/Synch_T.i
index d20aa2fac6c..e7c55c500e0 100644
--- a/ace/Synch_T.i
+++ b/ace/Synch_T.i
@@ -326,7 +326,7 @@ ACE_Condition<MUTEX>::remove (void)
sizeof (ACE_cond_t));
ACE_OS::shm_unlink (this->condname_);
ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (LPTSTR,
+ ACE_const_cast (ACE_TCHAR *,
this->condname_)));
}
else if (this->process_cond_)
diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp
index c7e8a5e9e85..192fe6cdcfb 100644
--- a/ace/System_Time.cpp
+++ b/ace/System_Time.cpp
@@ -5,7 +5,7 @@
ACE_RCSID(ace, System_Time, "$Id$")
-ACE_System_Time::ACE_System_Time (LPCTSTR poolname)
+ACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname)
: delta_time_ (0)
{
ACE_TRACE ("ACE_System_Time::ACE_System_Time");
@@ -23,8 +23,8 @@ ACE_System_Time::ACE_System_Time (LPCTSTR poolname)
MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX
{
ACE_ERROR ((LM_ERROR,
- "Temporary path too long, "
- "defaulting to current directory\n"));
+ ACE_TEXT ("Temporary path too long, ")
+ ACE_TEXT ("defaulting to current directory\n")));
this->poolname_[0] = 0;
}
@@ -36,7 +36,7 @@ ACE_System_Time::ACE_System_Time (LPCTSTR poolname)
else
ACE_OS::strncpy (this->poolname_,
poolname,
- (sizeof this->poolname_ / sizeof (TCHAR)));
+ (sizeof this->poolname_ / sizeof (ACE_TCHAR)));
ACE_NEW (this->shmem_,
diff --git a/ace/System_Time.h b/ace/System_Time.h
index 488aea7eaeb..ca3afa1a7a7 100644
--- a/ace/System_Time.h
+++ b/ace/System_Time.h
@@ -42,7 +42,7 @@ public:
// smoothly slow down or speed up the local system clock to reach
// the system time of the master clock.
- ACE_System_Time (LPCTSTR poolname = 0);
+ ACE_System_Time (const ACE_TCHAR *poolname = 0);
// Default constructor.
~ACE_System_Time (void);
@@ -73,7 +73,7 @@ private:
ALLOCATOR *shmem_;
// Our allocator (used for obtaining system time from shared memory).
- TCHAR poolname_[MAXPATHLEN + 1];
+ ACE_TCHAR poolname_[MAXPATHLEN + 1];
// The name of the pool used by the allocator.
long *delta_time_;
diff --git a/ace/TLI.cpp b/ace/TLI.cpp
index 8c09b559612..4441ef666ca 100644
--- a/ace/TLI.cpp
+++ b/ace/TLI.cpp
@@ -70,7 +70,7 @@ ACE_TLI::ACE_TLI (const char device[], int oflag, struct t_info *info)
{
ACE_TRACE ("ACE_TLI::ACE_TLI");
if (this->open (device, oflag, info) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_TLI::ACE_TLI")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI::ACE_TLI")));
}
int
diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp
index da9f3f6dba1..92dd0c930ea 100644
--- a/ace/TLI_Acceptor.cpp
+++ b/ace/TLI_Acceptor.cpp
@@ -384,8 +384,8 @@ ACE_TLI_Acceptor::ACE_TLI_Acceptor (const ACE_Addr &remote_sap,
back,
dev) == ACE_INVALID_HANDLE)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_TLI_Acceptor::ACE_TLI_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_TLI_Acceptor::ACE_TLI_Acceptor")));
}
int
diff --git a/ace/TLI_Connector.i b/ace/TLI_Connector.i
index 9e6c3b4749b..3d56fada2c2 100644
--- a/ace/TLI_Connector.i
+++ b/ace/TLI_Connector.i
@@ -31,7 +31,7 @@ ACE_TLI_Connector::ACE_TLI_Connector (ACE_TLI_Stream &new_stream,
udata,
opt) == ACE_INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
}
inline int
diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp
index e1c5fedd40c..202c4cd845a 100644
--- a/ace/TP_Reactor.cpp
+++ b/ace/TP_Reactor.cpp
@@ -85,7 +85,7 @@ ACE_TP_Reactor::dispatch_io_set (int number_of_active_handles,
&& number_dispatched < number_of_active_handles
&& this->state_changed_ == 0)
{
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_TP_Reactor::dispatching\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TP_Reactor::dispatching\n")));
number_dispatched++;
// Remember this info
diff --git a/ace/TP_Reactor.i b/ace/TP_Reactor.i
index 03640c98ce9..969a7fdaf02 100644
--- a/ace/TP_Reactor.i
+++ b/ace/TP_Reactor.i
@@ -35,5 +35,5 @@ ACE_TP_Reactor::notify_handle (ACE_HANDLE,
ACE_EH_PTMF)
{
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_TP_Reactor::notify_handle: Wrong version of notify_handle() gets called")));
+ ACE_TEXT ("ACE_TP_Reactor::notify_handle: Wrong version of notify_handle() gets called")));
}
diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp
index bd1798150a5..0d2be69edbd 100644
--- a/ace/Task_T.cpp
+++ b/ace/Task_T.cpp
@@ -24,14 +24,14 @@ ACE_Task<ACE_SYNCH_USE>::dump (void) const
{
ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
this->msg_queue_->dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("delete_msg_queue_ = %d\n"), this->delete_msg_queue_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nflags = %x"), this->flags_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmod_ = %x"), this->mod_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nnext_ = %x"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_count_ = %d"), this->thr_count_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_msg_queue_ = %d\n"), this->delete_msg_queue_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags = %x"), this->flags_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmod_ = %x"), this->mod_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %x"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_count_ = %d"), this->thr_count_));
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
this->lock_.dump ();
#endif /* ACE_MT_SAFE */
@@ -85,7 +85,7 @@ ACE_Task<ACE_SYNCH_USE>::sibling (void)
return this->mod_->sibling (this);
}
-template<ACE_SYNCH_DECL> const ASYS_TCHAR *
+template<ACE_SYNCH_DECL> const ACE_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 5620af26d96..3374fb6d42a 100644
--- a/ace/Task_T.h
+++ b/ace/Task_T.h
@@ -99,7 +99,7 @@ public: // Should be protected:
// Tests whether we can enqueue a message without blocking.
// = ACE_Task utility routines to identify names et al.
- const ASYS_TCHAR *name (void) const;
+ const ACE_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/Template_Instantiations.cpp b/ace/Template_Instantiations.cpp
index 975922177e6..0aa01515cc5 100644
--- a/ace/Template_Instantiations.cpp
+++ b/ace/Template_Instantiations.cpp
@@ -128,8 +128,8 @@ template class ACE_Node<ACE_Thread_Descriptor>;
template class ACE_Node<ACE_WString>;
-// ASYS_TCHAR is defined in OS.h
-template class ACE_Node<ASYS_TCHAR *>;
+// ACE_TCHAR is defined in OS.h
+template class ACE_Node<ACE_TCHAR *>;
template class ACE_Read_Guard<ACE_Null_Mutex>;
template class ACE_Read_Guard<ACE_RW_Process_Mutex>;
@@ -164,16 +164,16 @@ template class ACE_Unbounded_Queue<ACE_Event_Tuple>;
template class ACE_Unbounded_Queue<ACE_Thread_Descriptor*>;
template class ACE_Unbounded_Queue<ACE_Thread_Descriptor>;
-// ASYS_TCHAR is defined in OS.h
-template class ACE_Unbounded_Queue<ASYS_TCHAR *>;
+// ACE_TCHAR is defined in OS.h
+template class ACE_Unbounded_Queue<ACE_TCHAR *>;
template class ACE_Unbounded_Queue_Iterator<ACE_Cleanup_Info>;
template class ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple>;
template class ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor*>;
template class ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor>;
-// ASYS_TCHAR is defined in OS.h
-template class ACE_Unbounded_Queue_Iterator<ASYS_TCHAR *>;
+// ACE_TCHAR is defined in OS.h
+template class ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>;
template class ACE_Unbounded_Set<ACE_Name_Binding>;
template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>;
@@ -253,16 +253,16 @@ template class ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object
template class ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
#else
-template class ACE_Hash_Map_Entry<ACE_CString, ACE_Filecache_Object *>;
-template class ACE_Hash<ACE_CString>;
-template class ACE_Equal_To<ACE_CString>;
-template class ACE_Hash_Map_Manager<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_Filecache_Object *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>;
+template class ACE_Hash<ACE_TString>;
+template class ACE_Equal_To<ACE_TString>;
+template class ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
template class ACE_Map_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index 517e3d01dd2..a243c754f01 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -35,8 +35,8 @@ ACE_Thread_Manager::dump (void)
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncurrent_count_ = %d"), this->thr_list_.size ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_count_ = %d"), this->thr_list_.size ()));
for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
!iter.done ();
@@ -221,12 +221,12 @@ ACE_Thread_Descriptor::dump (void) const
ACE_TRACE ("ACE_Thread_Descriptor::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_id_ = %d"), this->thr_id_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_handle_ = %d"), this->thr_handle_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthr_state_ = %d"), this->thr_state_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncleanup_info_.cleanup_hook_ = %x"), this->cleanup_info_.cleanup_hook_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nflags_ = %x\n"), this->flags_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_id_ = %d"), this->thr_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_handle_ = %d"), this->thr_handle_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_state_ = %d"), this->thr_state_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncleanup_info_.cleanup_hook_ = %x"), this->cleanup_info_.cleanup_hook_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %x\n"), this->flags_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Time_Request_Reply.cpp b/ace/Time_Request_Reply.cpp
index a1affb754a3..e9d63a58ad3 100644
--- a/ace/Time_Request_Reply.cpp
+++ b/ace/Time_Request_Reply.cpp
@@ -157,31 +157,31 @@ void
ACE_Time_Request::dump (void) const
{
ACE_TRACE ("ACE_Time_Request::dump");
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("*******\nlength = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\n"),
this->size ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("message-type = ")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("message-type = ")));
switch (this->msg_type ())
{
case ACE_Time_Request::TIME_UPDATE:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("TIME_UPDATE\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TIME_UPDATE\n")));
break;
default:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("<unknown type> = %d\n"), this->msg_type ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("<unknown type> = %d\n"), this->msg_type ()));
break;
}
if (this->block_forever ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("blocking forever\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("blocking forever\n")));
else
{
#if !defined (ACE_NLOGGING)
ACE_Time_Value tv = this->timeout ();
#endif /* ! ACE_NLOGGING */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiting for %d secs and %d usecs\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for %d secs and %d usecs\n"),
tv.sec (), tv.usec ()));
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("*******\ntime = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\ntime = %d\n"),
this->time ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("+++++++\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("+++++++\n")));
}
diff --git a/ace/Timeprobe_T.cpp b/ace/Timeprobe_T.cpp
index f0e7c5ed52f..395ebbceb3f 100644
--- a/ace/Timeprobe_T.cpp
+++ b/ace/Timeprobe_T.cpp
@@ -42,7 +42,7 @@ ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (const ACE_Timeprobe<ACE_LOCK> &)
//
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__));
+ ACE_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__));
errno = ENOTSUP;
}
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp
index 786bec7a78a..85134f9f779 100644
--- a/ace/Timer_Hash_T.cpp
+++ b/ace/Timer_Hash_T.cpp
@@ -298,14 +298,14 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::dump (void) const
{
ACE_TRACE ("ACE_Timer_Hash_T::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntable_size_ = %d"), this->table_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nearliest_position_ = %d"), this->earliest_position_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntable_size_ = %d"), this->table_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nearliest_position_ = %d"), this->earliest_position_));
for (size_t i = 0; i < this->table_size_; i++)
if (!this->table_[i]->is_empty ())
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nBucket %d contains nodes"), i));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nBucket %d contains nodes"), i));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp
index 41e01fefb9a..199fcef1cab 100644
--- a/ace/Timer_Heap_T.cpp
+++ b/ace/Timer_Heap_T.cpp
@@ -257,23 +257,23 @@ ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
ACE_TRACE ("ACE_Timer_Heap::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nmax_size_ = %d"), this->max_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ncur_size_ = %d"), this->cur_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nheap_ = \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmax_size_ = %d"), this->max_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nheap_ = \n")));
for (size_t i = 0; i < this->cur_size_; i++)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%d\n"),
+ ACE_TEXT ("%d\n"),
i));
this->heap_[i]->dump ();
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntimer_ids_ = \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_ids_ = \n")));
for (size_t j = 0; j < this->cur_size_; j++)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%d\t%d\n"),
+ ACE_TEXT ("%d\t%d\n"),
j,
this->timer_ids_[j]));
diff --git a/ace/Timer_List_T.cpp b/ace/Timer_List_T.cpp
index 729e972d64f..8902d1fcb1f 100644
--- a/ace/Timer_List_T.cpp
+++ b/ace/Timer_List_T.cpp
@@ -149,8 +149,8 @@ ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
curr = curr->get_next ())
count++;
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nsize_ = %d"), count));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntimer_id_ = %d"), this->timer_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize_ = %d"), count));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_id_ = %d"), this->timer_id_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Timer_Queue_Adapters.cpp b/ace/Timer_Queue_Adapters.cpp
index a1b77e2ffa7..d37466219e7 100644
--- a/ace/Timer_Queue_Adapters.cpp
+++ b/ace/Timer_Queue_Adapters.cpp
@@ -78,8 +78,8 @@ ACE_Async_Timer_Queue_Adapter<TQ>::schedule (ACE_Event_Handler *eh,
if (tid == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("schedule_timer")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("schedule_timer")),
-1);
if (this->schedule_ualarm () == -1)
@@ -104,8 +104,8 @@ ACE_Async_Timer_Queue_Adapter<TQ>::ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *m
if (this->sig_handler_.register_handler (SIGALRM, this, &sa) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("register_handler")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register_handler")));
}
// This is the signal handler function for the asynchronous timer
@@ -236,7 +236,7 @@ ACE_Thread_Timer_Queue_Adapter<TQ>::svc (void)
// for "negative" amounts of time.
ACE_Time_Value tv = this->timer_queue_.earliest_time ();
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiting until %u.%3.3u secs\n"),
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting until %u.%3.3u secs\n"),
// tv.sec(), tv.msec()));
this->condition_.wait (&tv);
}
@@ -250,7 +250,7 @@ ACE_Thread_Timer_Queue_Adapter<TQ>::svc (void)
ACE_PTHREAD_CLEANUP_POP (0);
# endif /* ACE_LACKS_PTHREAD_CANCEL */
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("terminating dispatching thread\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("terminating dispatching thread\n")));
return 0;
}
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp
index 2603141e398..002319070d8 100644
--- a/ace/Timer_Queue_T.cpp
+++ b/ace/Timer_Queue_T.cpp
@@ -23,12 +23,12 @@ ACE_Timer_Node_T<TYPE>::dump (void) const
{
ACE_TRACE ("ACE_Timer_Node_T::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nact_ = %x"), this->act_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nact_ = %x"), this->act_));
this->timer_value_.dump ();
this->interval_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nprev_ = %x"), this->prev_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nnext_ = %x"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\ntimer_id_ = %d\n"), this->timer_id_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nprev_ = %x"), this->prev_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %x"), this->next_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_id_ = %d\n"), this->timer_id_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
index 2245a4cf389..77acdbd7b42 100644
--- a/ace/Timer_Wheel_T.cpp
+++ b/ace/Timer_Wheel_T.cpp
@@ -446,13 +446,13 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
ACE_TRACE ("ACE_Timer_Wheel_T::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nwheel_size_ = %d"), this->wheel_size_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nresolution_ = %d"), this->resolution_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nwheel_ = \n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwheel_size_ = %d"), this->wheel_size_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nresolution_ = %d"), this->resolution_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwheel_ = \n")));
for (size_t i = 0; i < this->wheel_size_; i++)
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), i));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), i));
ACE_Timer_Node_T<TYPE> *temp = this->wheel_[i]->get_next ();
while (temp != this->wheel_[i])
{
diff --git a/ace/Token.cpp b/ace/Token.cpp
index 9073ba0eb8d..80234f0491d 100644
--- a/ace/Token.cpp
+++ b/ace/Token.cpp
@@ -26,13 +26,13 @@ ACE_Token::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nthread = %d"), ACE_Thread::self ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthread = %d"), ACE_Thread::self ()));
// @@ Is there a portable way to do this?
// ACE_DEBUG ((LM_DEBUG, "\nowner_ = %l", (long) this->owner_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nowner_ addr = %x"), &this->owner_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nwaiters_ = %d"), this->waiters_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nin_use_ = %d"), this->in_use_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nnesting level = %d"), this->nesting_level_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nowner_ addr = %x"), &this->owner_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwaiters_ = %d"), this->waiters_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nin_use_ = %d"), this->in_use_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnesting level = %d"), this->nesting_level_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -158,7 +158,7 @@ ACE_Token::ACE_Token_Queue::insert_entry (ACE_Token::ACE_Token_Queue_Entry &entr
}
}
-ACE_Token::ACE_Token (LPCTSTR name, void *any)
+ACE_Token::ACE_Token (const ACE_TCHAR *name, void *any)
: lock_ (name, (ACE_mutexattr_t *) any),
owner_ (ACE_OS::NULL_thread),
in_use_ (0),
diff --git a/ace/Token.h b/ace/Token.h
index 4e8e9537bcc..23fe558cade 100644
--- a/ace/Token.h
+++ b/ace/Token.h
@@ -64,7 +64,7 @@ class ACE_Export ACE_Token
public:
// = Initialization and termination.
- ACE_Token (LPCTSTR name = 0, void * = 0);
+ ACE_Token (const ACE_TCHAR *name = 0, void * = 0);
virtual ~ACE_Token (void);
// = Synchronization operations.
diff --git a/ace/Token_Collection.cpp b/ace/Token_Collection.cpp
index c952f703680..56eab4f134d 100644
--- a/ace/Token_Collection.cpp
+++ b/ace/Token_Collection.cpp
@@ -10,20 +10,20 @@
ACE_RCSID(ace, Token_Collection, "$Id$")
ACE_Token_Collection::ACE_Token_Collection (int debug,
- const ASYS_TCHAR *name)
+ const ACE_TCHAR *name)
: debug_ (debug)
{
ACE_TRACE ("ACE_Token_Collection::ACE_Token_Collection");
if (name == 0)
- name = ASYS_TEXT ("no name");
+ name = ACE_TEXT ("no name");
int n = ACE_OS::strlen (name) + 1;
if (n >= ACE_MAXTOKENNAMELEN)
n = ACE_MAXTOKENNAMELEN - 1;
- ACE_OS::strncpy (this->name_, ACE_const_cast (ASYS_TCHAR*, name), n);
+ ACE_OS::strncpy (this->name_, ACE_const_cast (ACE_TCHAR*, name), n);
this->name_[ACE_MAXTOKENNAMELEN - 1] = '\0';
}
@@ -43,12 +43,12 @@ ACE_Token_Collection::insert (ACE_Token_Proxy &new_token)
ACE_Token_Proxy *temp = new_token.clone ();
if (collection_.bind (name, temp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("bind failed\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("bind failed\n")), -1);
return 0;
}
int
-ACE_Token_Collection::extract (const ASYS_TCHAR *token_name, ACE_Token_Proxy *&proxy)
+ACE_Token_Collection::extract (const ACE_TCHAR *token_name, ACE_Token_Proxy *&proxy)
{
ACE_TRACE ("ACE_Token_Collection::extract");
TOKEN_NAME name (token_name);
@@ -56,7 +56,7 @@ ACE_Token_Collection::extract (const ASYS_TCHAR *token_name, ACE_Token_Proxy *&p
}
ACE_Token_Proxy *
-ACE_Token_Collection::is_member (const ASYS_TCHAR *token_name)
+ACE_Token_Collection::is_member (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Collection::is_member");
TOKEN_NAME name (token_name);
@@ -88,7 +88,7 @@ ACE_Token_Collection::acquire (int notify,
{
if (debug_)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("collection acquiring %s\n"),
+ ACE_TEXT ("collection acquiring %s\n"),
temp->int_id_->name ()));
if (temp->int_id_->acquire (notify,
sleep_hook,
@@ -105,7 +105,7 @@ ACE_Token_Collection::acquire (int notify,
}
int
-ACE_Token_Collection::acquire (const ASYS_TCHAR *token_name,
+ACE_Token_Collection::acquire (const ACE_TCHAR *token_name,
int notify,
void (*sleep_hook)(void *),
ACE_Synch_Options &options)
@@ -124,7 +124,7 @@ ACE_Token_Collection::acquire (const ASYS_TCHAR *token_name,
int
-ACE_Token_Collection::tryacquire (const ASYS_TCHAR *token_name,
+ACE_Token_Collection::tryacquire (const ACE_TCHAR *token_name,
void (*sleep_hook)(void *))
{
ACE_TRACE ("ACE_Token_Collection::tryacquire");
@@ -152,7 +152,7 @@ ACE_Token_Collection::tryacquire (void (*sleep_hook)(void *))
iterator.advance ())
{
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("collection acquiring %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection acquiring %s\n"),
temp->int_id_->name ()));
// We will fail if _any_ token is not free.
if (temp->int_id_->tryacquire (sleep_hook) == -1)
@@ -175,7 +175,7 @@ ACE_Token_Collection::renew (int requeue_position,
iterator.advance ())
{
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("collection renewing %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection renewing %s\n"),
temp->int_id_->name ()));
if (temp->int_id_->renew (requeue_position, options) == -1)
return -1;
@@ -185,7 +185,7 @@ ACE_Token_Collection::renew (int requeue_position,
}
int
-ACE_Token_Collection::renew (const ASYS_TCHAR *token_name,
+ACE_Token_Collection::renew (const ACE_TCHAR *token_name,
int requeue_position,
ACE_Synch_Options &options)
{
@@ -198,8 +198,8 @@ ACE_Token_Collection::renew (const ASYS_TCHAR *token_name,
// Did we find it?
if (result == -1)
- ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p %s\n"),
- ASYS_TEXT ("not in collection "),
+ ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p %s\n"),
+ ACE_TEXT ("not in collection "),
token_name), -1);
// perform the operation
return temp->renew (requeue_position, options);
@@ -217,7 +217,7 @@ ACE_Token_Collection::release (ACE_Synch_Options &)
iterator.advance ())
{
if (debug_)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("collection releasing %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection releasing %s\n"),
temp->int_id_->name ()));
temp->int_id_->release ();
}
@@ -226,7 +226,7 @@ ACE_Token_Collection::release (ACE_Synch_Options &)
}
int
-ACE_Token_Collection::release (const ASYS_TCHAR *token_name,
+ACE_Token_Collection::release (const ACE_TCHAR *token_name,
ACE_Synch_Options &options)
{
ACE_TRACE ("ACE_Token_Collection::release");
@@ -267,7 +267,7 @@ ACE_Token_Collection::clone (void) const
// This method doesn't mean anything for a collection.
ACE_Tokens *
-ACE_Token_Collection::create_token (const ASYS_TCHAR *)
+ACE_Token_Collection::create_token (const ACE_TCHAR *)
{
ACE_TRACE ("ACE_Token_Collection::create_token");
return (ACE_Tokens *) 0;
@@ -278,11 +278,11 @@ ACE_Token_Collection::dump (void) const
{
ACE_TRACE ("ACE_Token_Collection::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Collection::dump:\n")
- ASYS_TEXT (" debug_ = %d\n"), debug_));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("collection_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Collection::dump:\n")
+ ACE_TEXT (" debug_ = %d\n"), debug_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection_\n")));
collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("base:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
ACE_Token_Proxy::dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Token_Collection.h b/ace/Token_Collection.h
index 4e97bf152f6..247dec47cd1 100644
--- a/ace/Token_Collection.h
+++ b/ace/Token_Collection.h
@@ -60,7 +60,7 @@ class ACE_Export ACE_Token_Collection : public ACE_Token_Proxy
// returns zero for now.
public:
ACE_Token_Collection (int debug = 0,
- const ASYS_TCHAR *name = 0);
+ const ACE_TCHAR *name = 0);
// <debug> print out verbose debugging messages. <name> will give a
// name to the collection. Collections don't really need names, but
// are sometimes useful for debugging.
@@ -80,14 +80,14 @@ public:
// thread using the collection will be used. Client ID's can be
// changed explicity on each proxy using is_member.
- int extract (const ASYS_TCHAR *token_name, ACE_Token_Proxy *&proxy);
+ int extract (const ACE_TCHAR *token_name, ACE_Token_Proxy *&proxy);
// removes the ACE_Token matching the given token_name from the
// collection. On success, extract returns 0. On failure
// (token_name was not in the collection,) extract returns -1. On
// success, the state of the token found is copied into proxy.
// The returned ACE_Token_Proxy* must be deleted by the user.
- ACE_Token_Proxy *is_member (const ASYS_TCHAR *token_name);
+ ACE_Token_Proxy *is_member (const ACE_TCHAR *token_name);
// returns the proxy if true. 0 otherwise.
int is_member (const ACE_Token_Proxy &token);
@@ -125,7 +125,7 @@ public:
// words, once the collection reports deadlock, it is out of our
// hands.
- virtual int acquire (const ASYS_TCHAR *token_name,
+ virtual int acquire (const ACE_TCHAR *token_name,
int notify = 0,
void (*sleep_hook)(void *) = 0,
ACE_Synch_Options &options =
@@ -136,7 +136,7 @@ public:
virtual int tryacquire (void (*sleep_hook)(void *) = 0);
// Try to acquire all tokens in collection.
- virtual int tryacquire (const ASYS_TCHAR *token_name,
+ virtual int tryacquire (const ACE_TCHAR *token_name,
void (*sleep_hook)(void *) = 0);
// Try to acquire <token_name>.
@@ -150,7 +150,7 @@ public:
// problem.
- virtual int renew (const ASYS_TCHAR *token_name,
+ virtual int renew (const ACE_TCHAR *token_name,
int requeue_position = 0,
ACE_Synch_Options &options =
ACE_Synch_Options::defaults);
@@ -166,7 +166,7 @@ public:
// problem.
- virtual int release (const ASYS_TCHAR *token_name,
+ virtual int release (const ACE_TCHAR *token_name,
ACE_Synch_Options &options =
ACE_Synch_Options::defaults);
// Release the token corresponding to <token_name>. The other
@@ -177,7 +177,7 @@ public:
void dump (void) const;
// Dump the state of the class.
- virtual const ASYS_TCHAR *name (void) const;
+ virtual const ACE_TCHAR *name (void) const;
// Return the name of the collection. Not very functionally
// important, but sometimes a useful debugging tool.
@@ -203,13 +203,13 @@ protected:
int debug_;
// Whether to print out debug messages or not.
- ASYS_TCHAR name_[ACE_MAXTOKENNAMELEN];
+ ACE_TCHAR name_[ACE_MAXTOKENNAMELEN];
// Name of the collection.
// = I'm not sure what these mean, but they have to be defined since they're
// pure virtual in ACE_Token_Proxy.
virtual ACE_Token_Proxy *clone (void) const;
- virtual ACE_Tokens *create_token (const ASYS_TCHAR *name);
+ virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
};
#if defined (__ACE_INLINE__)
diff --git a/ace/Token_Collection.i b/ace/Token_Collection.i
index b10735660bc..e5f83852713 100644
--- a/ace/Token_Collection.i
+++ b/ace/Token_Collection.i
@@ -3,7 +3,7 @@
// Token_Collection.i
-ACE_INLINE const ASYS_TCHAR *
+ACE_INLINE const ACE_TCHAR *
ACE_Token_Collection::name (void) const
{
return name_;
diff --git a/ace/Token_Invariants.cpp b/ace/Token_Invariants.cpp
index dbc4af999ad..e6d61f7342c 100644
--- a/ace/Token_Invariants.cpp
+++ b/ace/Token_Invariants.cpp
@@ -44,7 +44,7 @@ ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager (void)
}
int
-ACE_Token_Invariant_Manager::mutex_acquired (const ASYS_TCHAR *token_name)
+ACE_Token_Invariant_Manager::mutex_acquired (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::mutex_acquired");
@@ -87,7 +87,7 @@ ACE_Token_Invariant_Manager::releasing (const ACE_Token_Proxy *proxy)
}
void
-ACE_Token_Invariant_Manager::mutex_releasing (const ASYS_TCHAR *token_name)
+ACE_Token_Invariant_Manager::mutex_releasing (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::mutex_releasing");
ACE_GUARD (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_);
@@ -98,7 +98,7 @@ ACE_Token_Invariant_Manager::mutex_releasing (const ASYS_TCHAR *token_name)
}
int
-ACE_Token_Invariant_Manager::reader_acquired (const ASYS_TCHAR *token_name)
+ACE_Token_Invariant_Manager::reader_acquired (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::reader_acquired");
ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
@@ -111,7 +111,7 @@ ACE_Token_Invariant_Manager::reader_acquired (const ASYS_TCHAR *token_name)
}
int
-ACE_Token_Invariant_Manager::writer_acquired (const ASYS_TCHAR *token_name)
+ACE_Token_Invariant_Manager::writer_acquired (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::writer_acquired");
@@ -125,7 +125,7 @@ ACE_Token_Invariant_Manager::writer_acquired (const ASYS_TCHAR *token_name)
}
void
-ACE_Token_Invariant_Manager::rwlock_releasing (const ASYS_TCHAR *token_name)
+ACE_Token_Invariant_Manager::rwlock_releasing (const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::rwlock_releasing");
@@ -141,16 +141,16 @@ ACE_Token_Invariant_Manager::dump (void) const
{
ACE_TRACE ("ACE_Token_Invariant_Manager::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("mutex_collection_:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_collection_:\n")));
mutex_collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("rwlock_collection_:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rwlock_collection_:\n")));
rwlock_collection_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
int
-ACE_Token_Invariant_Manager::get_mutex (const ASYS_TCHAR *token_name,
+ACE_Token_Invariant_Manager::get_mutex (const ACE_TCHAR *token_name,
ACE_Mutex_Invariants *&inv)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::get_mutex");
@@ -178,7 +178,7 @@ ACE_Token_Invariant_Manager::get_mutex (const ASYS_TCHAR *token_name,
}
int
-ACE_Token_Invariant_Manager::get_rwlock (const ASYS_TCHAR *token_name,
+ACE_Token_Invariant_Manager::get_rwlock (const ACE_TCHAR *token_name,
ACE_RWLock_Invariants *&inv)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::get_rwlock");
@@ -265,7 +265,7 @@ ACE_Mutex_Invariants::dump (void) const
{
ACE_TRACE ("ACE_Mutex_Invariants::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("owners_ = %d\n"), owners_));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owners_ = %d\n"), owners_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -338,7 +338,7 @@ ACE_RWLock_Invariants::dump (void) const
{
ACE_TRACE ("ACE_RWLock_Invariants::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("writers_ = %d\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("writers_ = %d\n"),
"readers_ = %d\n",
writers_, readers_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
diff --git a/ace/Token_Invariants.h b/ace/Token_Invariants.h
index c3aea5fb3f6..9151c3606b1 100644
--- a/ace/Token_Invariants.h
+++ b/ace/Token_Invariants.h
@@ -139,22 +139,22 @@ public:
// = Explicit methods. These to not require actual proxies in order
// to test a scenario.
- int mutex_acquired (const ASYS_TCHAR *token_name);
+ int mutex_acquired (const ACE_TCHAR *token_name);
// Returns 1 on success, 0 when an invariant has been violated and
// -1 on error.
- void mutex_releasing (const ASYS_TCHAR *token_name);
+ void mutex_releasing (const ACE_TCHAR *token_name);
// Updates internal database.
- int reader_acquired (const ASYS_TCHAR *token_name);
+ int reader_acquired (const ACE_TCHAR *token_name);
// Returns 1 on success, 0 when an invariant has been violated and
// -1 on error.
- int writer_acquired (const ASYS_TCHAR *token_name);
+ int writer_acquired (const ACE_TCHAR *token_name);
// Returns 1 on success, 0 when an invariant has been violated and
// -1 on error.
- void rwlock_releasing (const ASYS_TCHAR *token_name);
+ void rwlock_releasing (const ACE_TCHAR *token_name);
// Updates internal database.
void dump (void) const;
@@ -169,11 +169,11 @@ public:
// Destruction.
protected:
- int get_mutex (const ASYS_TCHAR *token_name,
+ int get_mutex (const ACE_TCHAR *token_name,
ACE_Mutex_Invariants *&inv);
// Return or create.
- int get_rwlock (const ASYS_TCHAR *token_name,
+ int get_rwlock (const ACE_TCHAR *token_name,
ACE_RWLock_Invariants *&inv);
// Return or create.
diff --git a/ace/Token_Manager.cpp b/ace/Token_Manager.cpp
index 9d6aa9e1d2d..019dcb2e921 100644
--- a/ace/Token_Manager.cpp
+++ b/ace/Token_Manager.cpp
@@ -66,7 +66,7 @@ ACE_Token_Manager::instance (void)
void
ACE_Token_Manager::get_token (ACE_Token_Proxy *proxy,
- const ASYS_TCHAR *token_name)
+ const ACE_TCHAR *token_name)
{
ACE_TRACE ("ACE_Token_Manager::get");
// Hmm. I think this makes sense. We perform our own locking here
@@ -150,8 +150,8 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
// The caller is an owner, so we have a deadlock situation.
if (debug_)
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) Deadlock detected.\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%s owns %s and is waiting for %s.\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) Deadlock detected.\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s owns %s and is waiting for %s.\n"),
proxy->client_id (),
token->name (),
proxy->token_->name ()));
@@ -173,7 +173,7 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
if (debug_)
{
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("%s owns %s and is waiting for %s.\n"),
+ ACE_TEXT ("%s owns %s and is waiting for %s.\n"),
e->client_id (),
token->name (),
twf->name ()));
@@ -190,7 +190,7 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
ACE_Tokens *
-ACE_Token_Manager::token_waiting_for (const ASYS_TCHAR *client_id)
+ACE_Token_Manager::token_waiting_for (const ACE_TCHAR *client_id)
{
COLLECTION_ITERATOR iterator (collection_);
for (COLLECTION_ENTRY *temp = 0;
@@ -228,8 +228,8 @@ ACE_Token_Manager::release_token (ACE_Tokens *&token)
// we did not find one in the collection
{
errno = ENOENT;
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Token Manager could not release %s:%d\n"),
- ASYS_ONLY_MULTIBYTE_STRING (token->name ()), token->type ()));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Token Manager could not release %s:%d\n"),
+ token->name (), token->type ()));
// @@ bad
}
else
@@ -254,10 +254,10 @@ ACE_Token_Manager::dump (void) const
{
ACE_TRACE ("ACE_Token_Manager::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACE_Token_Manager::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("lock_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Manager::dump:\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("collection_\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection_\n")));
collection_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/Token_Manager.h b/ace/Token_Manager.h
index bd829dd4476..79e37935d95 100644
--- a/ace/Token_Manager.h
+++ b/ace/Token_Manager.h
@@ -55,7 +55,7 @@ public:
static ACE_Token_Manager *instance (void);
void instance (ACE_Token_Manager *);
- void get_token (ACE_Token_Proxy *, const ASYS_TCHAR *token_name);
+ void get_token (ACE_Token_Proxy *, const ACE_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
@@ -94,7 +94,7 @@ private:
static ACE_Token_Manager *token_manager_;
// pointer to singleton token manager.
- ACE_Tokens *token_waiting_for (const ASYS_TCHAR *client_id);
+ ACE_Tokens *token_waiting_for (const ACE_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/Token_Request_Reply.cpp b/ace/Token_Request_Reply.cpp
index 14d4a1e6625..3333f88bf28 100644
--- a/ace/Token_Request_Reply.cpp
+++ b/ace/Token_Request_Reply.cpp
@@ -22,8 +22,8 @@ ACE_Token_Request::ACE_Token_Request (void)
ACE_Token_Request::ACE_Token_Request (int token_type,
int proxy_type,
ACE_UINT32 operation_type,
- const char token_name[],
- const char client_id[],
+ const ACE_TCHAR token_name[],
+ const ACE_TCHAR client_id[],
const ACE_Synch_Options &options)
{
this->token_type (token_type);
@@ -69,7 +69,8 @@ ACE_Token_Request::decode (void)
return -1;
}
else // Skip this->tokenName_ + '\0' + ':'.
- this->client_id_ = &this->token_name_[token_len + 2];
+ this->client_id_ =
+ &this->token_name_[(token_len + 2) * sizeof (ACE_TCHAR)];
// Fixed size header
// token_name_ plus '\0'
@@ -90,42 +91,42 @@ void
ACE_Token_Request::dump (void) const
{
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("*******\nlength = %d\ntoken name = %s\nclient id = %s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\ntoken name = %s\nclient id = %s\n"),
this->length (), this->token_name (), this->client_id ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("type = ")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("type = ")));
if (this->token_type () == ACE_Tokens::MUTEX)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("MUTEX\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("MUTEX\n")));
else // == ACE_Tokens::RWLOCK
{
if (this->proxy_type () == ACE_RW_Token::READER)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("RLOCK\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RLOCK\n")));
else // == WRITER
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("WLOCK\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("WLOCK\n")));
}
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("operation = ")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("operation = ")));
switch (this->operation_type ())
{
case ACE_Token_Request::ACQUIRE:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("ACQUIRE\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACQUIRE\n")));
break;
case ACE_Token_Request::RELEASE:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("RELEASE\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RELEASE\n")));
break;
case ACE_Token_Request::RENEW:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("RENEW\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RENEW\n")));
break;
default:
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("<unknown operation type> = %d\n"), this->operation_type ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("<unknown operation type> = %d\n"), this->operation_type ()));
break;
}
if (this->options ()[ACE_Synch_Options::USE_TIMEOUT] == 0)
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("blocking forever\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("blocking forever\n")));
else
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiting for %d secs and %d usecs\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for %d secs and %d usecs\n"),
this->options ().timeout ().sec (), this->options ().timeout ().usec ()));
}
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -168,7 +169,7 @@ ACE_Token_Reply::decode (void)
void
ACE_Token_Reply::dump (void) const
{
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("*******\nlength = %d\nerrnum = %d"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\nerrnum = %d"),
this->length (), this->errnum ()));
- ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("arg = %d"), this->arg ()));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("arg = %d"), this->arg ()));
}
diff --git a/ace/Token_Request_Reply.h b/ace/Token_Request_Reply.h
index a5904b45416..3391df69f53 100644
--- a/ace/Token_Request_Reply.h
+++ b/ace/Token_Request_Reply.h
@@ -60,8 +60,8 @@ public:
ACE_Token_Request (int token_type,
int proxy_type,
ACE_UINT32 operation,
- const char token_name[],
- const char client_id[],
+ const ACE_TCHAR token_name[],
+ const ACE_TCHAR client_id[],
const ACE_Synch_Options &options);
// token_type - MUTEX, RWLOCK
// proxy_type - MUTEX, RLOCK, WLOCK (acquires mean different things)
@@ -102,9 +102,9 @@ public:
// = Set/get the name of the token and the client id. The set
// method is combined to make it easier on us. We're copying the
// names as a contiguous buffer.
- char *token_name (void) const;
- char *client_id (void) const;
- void token_name (const char *token_name, const char* client_id);
+ ACE_TCHAR *token_name (void) const;
+ ACE_TCHAR *client_id (void) const;
+ void token_name (const ACE_TCHAR *token_name, const ACE_TCHAR *client_id);
int encode (void *&);
// Encode the message before transmission.
@@ -157,15 +157,15 @@ private:
ACE_UINT32 arg_;
// value returned in <Token_Reply::arg>;
- char data_[ACE_MAXTOKENNAMELEN + ACE_MAXCLIENTIDLEN + 3];
+ ACE_TCHAR data_[ACE_MAXTOKENNAMELEN + ACE_MAXCLIENTIDLEN + 3];
// The data portion contains the <tokenName_> including a 0 terminator,
// a ':', then the <clientId> including a 0 terminator
} transfer_;
- char *token_name_;
+ ACE_TCHAR *token_name_;
// Pointer to the beginning of the token name in this->data_.
- char *client_id_;
+ ACE_TCHAR *client_id_;
// Pointer to the beginning of the client id in this->data_;
ACE_Synch_Options options_;
diff --git a/ace/Token_Request_Reply.i b/ace/Token_Request_Reply.i
index b58f0b89d3a..506068a3106 100644
--- a/ace/Token_Request_Reply.i
+++ b/ace/Token_Request_Reply.i
@@ -109,25 +109,30 @@ ACE_Token_Request::options (const ACE_Synch_Options &opt)
}
// = Set/get the name of the token.
-ACE_INLINE char *
+ACE_INLINE ACE_TCHAR *
ACE_Token_Request::token_name (void) const
{
return token_name_;
}
ACE_INLINE void
-ACE_Token_Request::token_name (const char *token_name, const char *client_id)
+ACE_Token_Request::token_name (const ACE_TCHAR *token_name,
+ const ACE_TCHAR *client_id)
{
size_t token_name_length = ACE_OS::strlen (token_name) + 1; // Add 1 for '\0'.
- size_t client_id_length = ACE_OS::strlen (client_id) + 1; // Add 1 for '\0'.
+ size_t client_id_length = ACE_OS::strlen (client_id) + 1; // Add 1 for '\0'.
// Set up pointers and copy token_name and client_id into request.
token_name_ = this->transfer_.data_;
client_id_ = &this->token_name_[token_name_length + 1]; // Add 1 for ':';
- client_id_[-1] = ':'; // Insert the ':' before this->clientId_.
+ client_id_[-1] = ACE_TEXT (':'); // Insert the ':' before this->clientId_.
- (void) ACE_OS::memcpy (token_name_, token_name, token_name_length);
- (void) ACE_OS::memcpy (client_id_, client_id, client_id_length);
+ (void) ACE_OS::memcpy (this->token_name_,
+ token_name,
+ token_name_length * sizeof (ACE_TCHAR));
+ (void) ACE_OS::memcpy (this->client_id_,
+ client_id,
+ client_id_length * sizeof (ACE_TCHAR));
// Fixed length header size
size_t len = ACE_TOKEN_REQUEST_HEADER_SIZE;
@@ -139,7 +144,7 @@ ACE_Token_Request::token_name (const char *token_name, const char *client_id)
}
// = Set/get the id of the client.
-ACE_INLINE char *
+ACE_INLINE ACE_TCHAR *
ACE_Token_Request::client_id (void) const
{
return this->client_id_;
diff --git a/ace/Trace.cpp b/ace/Trace.cpp
index 60f0577b97e..caa54c15d4a 100644
--- a/ace/Trace.cpp
+++ b/ace/Trace.cpp
@@ -68,9 +68,9 @@ ACE_Trace::set_nesting_indent (int indent)
// Perform the first part of the trace, which prints out the string N,
// the LINE, and the ACE_FILE as the function is entered.
-ACE_Trace::ACE_Trace (const ASYS_TCHAR *n,
+ACE_Trace::ACE_Trace (const ACE_TCHAR *n,
int line,
- const ASYS_TCHAR *file)
+ const ACE_TCHAR *file)
{
#if defined (ACE_NLOGGING)
ACE_UNUSED_ARG (line);
@@ -87,9 +87,9 @@ ACE_Trace::ACE_Trace (const ASYS_TCHAR *n,
{
lm->trace_active (1);
ACE_DEBUG ((LM_TRACE,
- ASYS_TEXT ("%*s(%t) calling %s in file `%s' on line %d\n"),
+ ACE_TEXT ("%*s(%t) calling %s in file `%s' on line %d\n"),
ACE_Trace::nesting_indent_ * lm->inc (),
- ASYS_TEXT (""),
+ ACE_TEXT (""),
this->name_,
file,
line));
@@ -111,9 +111,9 @@ ACE_Trace::~ACE_Trace (void)
{
lm->trace_active (1);
ACE_DEBUG ((LM_TRACE,
- ASYS_TEXT ("%*s(%t) leaving %s\n"),
+ ACE_TEXT ("%*s(%t) leaving %s\n"),
ACE_Trace::nesting_indent_ * lm->dec (),
- ASYS_TEXT (""),
+ ACE_TEXT (""),
this->name_));
lm->trace_active (0);
}
diff --git a/ace/Trace.h b/ace/Trace.h
index b002ccf4f00..8cfc8abb627 100644
--- a/ace/Trace.h
+++ b/ace/Trace.h
@@ -34,9 +34,9 @@ class ACE_Export ACE_Trace
public:
// = Initialization and termination methods.
- ACE_Trace (const ASYS_TCHAR *n,
+ ACE_Trace (const ACE_TCHAR *n,
int line = 0,
- const ASYS_TCHAR *file = ASYS_TEXT (""));
+ const ACE_TCHAR *file = ACE_TEXT (""));
// Perform the first part of the trace, which prints out the string
// N, the LINE, and the ACE_FILE as the function is entered.
@@ -65,7 +65,7 @@ private:
// maintained in thread-specific storage to ensure correctness in
// multiple threads of control.
- const ASYS_TCHAR *name_;
+ const ACE_TCHAR *name_;
// Name of the method we are in.
static int nesting_indent_;
diff --git a/ace/UPIPE_Acceptor.cpp b/ace/UPIPE_Acceptor.cpp
index 5bb467e6ad6..63a217d56c0 100644
--- a/ace/UPIPE_Acceptor.cpp
+++ b/ace/UPIPE_Acceptor.cpp
@@ -59,8 +59,8 @@ ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (const ACE_UPIPE_Addr &local_addr,
if (this->open (local_addr, reuse_addr) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_UPIPE_Acceptor")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_UPIPE_Acceptor")));
}
int
@@ -99,17 +99,17 @@ ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream,
(char *) &remote_stream,
sizeof remote_stream) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ASYS_TEXT ("read stream address failed")));
+ ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
+ ACE_TEXT ("read stream address failed")));
else if (new_stream.stream_.link (remote_stream->stream_) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ASYS_TEXT ("link streams failed")));
+ ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
+ ACE_TEXT ("link streams failed")));
// Send a message over the new streampipe to confirm acceptance.
else if (new_stream.send (&mb_, 0) == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ASYS_TEXT ("linked stream.put failed")));
+ ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
+ ACE_TEXT ("linked stream.put failed")));
// Close down the new_stream at this point in order to conserve
// handles. Note that we don't need the SPIPE connection
diff --git a/ace/UPIPE_Connector.cpp b/ace/UPIPE_Connector.cpp
index a58f5f43b8a..51db226f879 100644
--- a/ace/UPIPE_Connector.cpp
+++ b/ace/UPIPE_Connector.cpp
@@ -26,12 +26,12 @@ ACE_UPIPE_Connector::ACE_UPIPE_Connector (void)
int
ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout,
- const ACE_Addr & /* local_sap */,
- int /* reuse_addr */,
- int flags,
- int perms)
+ const ACE_UPIPE_Addr &addr,
+ ACE_Time_Value *timeout,
+ const ACE_Addr & /* local_sap */,
+ int /* reuse_addr */,
+ int flags,
+ int perms)
{
ACE_TRACE ("ACE_UPIPE_Connector::connect");
ACE_ASSERT (new_stream.get_handle () == ACE_INVALID_HANDLE);
@@ -64,8 +64,8 @@ ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
sizeof ustream);
if (result == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_UPIPE_Connector %p\n"),
- ASYS_TEXT ("write to pipe failed")));
+ ACE_TEXT ("ACE_UPIPE_Connector %p\n"),
+ ACE_TEXT ("write to pipe failed")));
// Wait for confirmation of stream linking.
ACE_Message_Block *mb_p = 0;
@@ -77,8 +77,8 @@ ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
// They perform different checks and cannot be merged.
if (result == -1)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("ACE_UPIPE_Connector %p\n"),
- ASYS_TEXT ("no confirmation from server")));
+ ACE_TEXT ("ACE_UPIPE_Connector %p\n"),
+ ACE_TEXT ("no confirmation from server")));
else
// Close down the new_stream at this point in order to
// conserve handles. Note that we don't need the SPIPE
diff --git a/ace/UPIPE_Connector.i b/ace/UPIPE_Connector.i
index 339a0b36f81..cc7c580b8f8 100644
--- a/ace/UPIPE_Connector.i
+++ b/ace/UPIPE_Connector.i
@@ -7,21 +7,21 @@
ASYS_INLINE
ACE_UPIPE_Connector::ACE_UPIPE_Connector (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
+ const ACE_UPIPE_Addr &addr,
+ ACE_Time_Value *timeout,
+ const ACE_Addr &local_sap,
+ int reuse_addr,
+ int flags,
+ int perms)
{
ACE_TRACE ("ACE_UPIPE_Connector::ACE_UPIPE_Connector");
if (this->connect (new_stream, addr, timeout, local_sap,
reuse_addr, flags, perms) == -1
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("address %s, %p\n"),
+ ACE_TEXT ("address %s, %p\n"),
addr.get_path_name (),
- ASYS_TEXT ("ACE_UPIPE_Connector")));
+ ACE_TEXT ("ACE_UPIPE_Connector")));
}
ASYS_INLINE int
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
index 7c492df7351..e806b1d65d2 100644
--- a/ace/WFMO_Reactor.cpp
+++ b/ace/WFMO_Reactor.cpp
@@ -26,7 +26,7 @@ ACE_WFMO_Reactor_Handler_Repository::open (size_t size)
{
if (size > MAXIMUM_WAIT_OBJECTS)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%d exceeds MAXIMUM_WAIT_OBJECTS (%d)\n"),
+ ACE_TEXT ("%d exceeds MAXIMUM_WAIT_OBJECTS (%d)\n"),
size,
MAXIMUM_WAIT_OBJECTS),
-1);
@@ -925,53 +925,53 @@ ACE_WFMO_Reactor_Handler_Repository::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Max size = %d\n"),
+ ACE_TEXT ("Max size = %d\n"),
this->max_size_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Current info table\n\n")));
+ ACE_TEXT ("Current info table\n\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\tSize = %d\n"),
+ ACE_TEXT ("\tSize = %d\n"),
this->max_handlep1_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\tHandles to be suspended = %d\n"),
+ ACE_TEXT ("\tHandles to be suspended = %d\n"),
this->handles_to_be_suspended_));
for (i = 0; i < this->max_handlep1_; i++)
this->current_info_[i].dump (this->current_handles_[i]);
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\n")));
+ ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("To-be-added info table\n\n")));
+ ACE_TEXT ("To-be-added info table\n\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\tSize = %d\n"),
+ ACE_TEXT ("\tSize = %d\n"),
this->handles_to_be_added_));
for (i = 0; i < this->handles_to_be_added_; i++)
this->to_be_added_info_[i].dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\n")));
+ ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Suspended info table\n\n")));
+ ACE_TEXT ("Suspended info table\n\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\tSize = %d\n"),
+ ACE_TEXT ("\tSize = %d\n"),
this->suspended_handles_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\tHandles to be resumed = %d\n"),
+ ACE_TEXT ("\tHandles to be resumed = %d\n"),
this->handles_to_be_resumed_));
for (i = 0; i < this->suspended_handles_; i++)
this->current_suspended_info_[i].dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("\n")));
+ ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Total handles to be deleted = %d\n"),
+ ACE_TEXT ("Total handles to be deleted = %d\n"),
this->handles_to_be_deleted_));
ACE_DEBUG ((LM_DEBUG,
@@ -1010,7 +1010,7 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (ACE_Sig_Handler *sh,
deactivated_ (0)
{
if (this->open (ACE_WFMO_Reactor::DEFAULT_SIZE, 0, sh, tq) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("WFMO_Reactor")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("WFMO_Reactor")));
}
ACE_WFMO_Reactor::ACE_WFMO_Reactor (size_t size,
@@ -1041,7 +1041,7 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (size_t size,
ACE_UNUSED_ARG (unused);
if (this->open (size, 0, sh, tq) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("WFMO_Reactor")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("WFMO_Reactor")));
}
int
@@ -1113,8 +1113,8 @@ ACE_WFMO_Reactor::open (size_t size,
// Open the handle repository. Two additional handles for internal
// purposes
if (this->handler_rep_.open (size + 2) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("opening handler repository")),
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
+ ACE_TEXT ("opening handler repository")),
-1);
else
this->delete_handler_rep_ = 1;
@@ -1139,16 +1139,16 @@ ACE_WFMO_Reactor::open (size_t size,
// Open the notification handler
if (this->notify_handler_->open (this, this->timer_queue_) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("opening notify handler ")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("opening notify handler ")),
-1);
// Register for <wakeup_all_threads> event
if (this->register_handler (&this->wakeup_all_threads_handler_,
this->wakeup_all_threads_.handle ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("registering thread wakeup handler")),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("registering thread wakeup handler")),
-1);
// Since we have added two handles into the handler repository,
@@ -1987,11 +1987,11 @@ ACE_WFMO_Reactor::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Count of currently active threads = %d\n"),
+ ACE_TEXT ("Count of currently active threads = %d\n"),
this->active_threads_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("ID of owner thread = %d\n"),
+ ACE_TEXT ("ID of owner thread = %d\n"),
this->owner_));
this->handler_rep_.dump ();
@@ -2051,7 +2051,7 @@ ACE_WFMO_Reactor_Notify::handle_signal (int signum,
// This will get called when <WFMO_Reactor->wakeup_one_thread_> event
// is signaled.
// ACE_DEBUG ((LM_DEBUG,
- // ASYS_TEXT ("(%t) waking up to handle internal notifications\n")));
+ // ACE_TEXT ("(%t) waking up to handle internal notifications\n")));
for (int i = 1; ; i++)
{
@@ -2100,7 +2100,7 @@ ACE_WFMO_Reactor_Notify::handle_signal (int signum,
break;
default:
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("invalid mask = %d\n"),
+ ACE_TEXT ("invalid mask = %d\n"),
buffer->mask_));
break;
}
@@ -2193,7 +2193,7 @@ ACE_WFMO_Reactor_Notify::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->timer_queue_->dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Max. iteration: %d\n"),
+ ACE_TEXT ("Max. iteration: %d\n"),
this->max_notify_iterations_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
diff --git a/ace/WFMO_Reactor.i b/ace/WFMO_Reactor.i
index c20100446c8..2aa56f2c08d 100644
--- a/ace/WFMO_Reactor.i
+++ b/ace/WFMO_Reactor.i
@@ -15,7 +15,7 @@ ACE_Wakeup_All_Threads_Handler::handle_signal (int signum,
// This will get called when <WFMO_Reactor->wakeup_all_threads_> event
// is signaled. There is nothing to be done here.
- // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) waking up to get updated handle set info\n")));
+ // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) waking up to get updated handle set info\n")));
return 0;
}
@@ -79,31 +79,31 @@ ACE_WFMO_Reactor_Handler_Repository::Common_Info::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("I/O Entry = %d\n"),
+ ACE_TEXT ("I/O Entry = %d\n"),
this->io_entry_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Event Handler = %d\n"),
+ ACE_TEXT ("Event Handler = %d\n"),
this->event_handler_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("I/O Handle = %d\n"),
+ ACE_TEXT ("I/O Handle = %d\n"),
this->io_handle_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Network Events = %d\n"),
+ ACE_TEXT ("Network Events = %d\n"),
this->network_events_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Delete Event = %d\n"),
+ ACE_TEXT ("Delete Event = %d\n"),
this->delete_event_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Delete Entry = %d\n"),
+ ACE_TEXT ("Delete Entry = %d\n"),
this->delete_entry_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Close Masks = %d\n"),
+ ACE_TEXT ("Close Masks = %d\n"),
this->close_masks_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -162,11 +162,11 @@ ACE_WFMO_Reactor_Handler_Repository::Current_Info::dump (ACE_HANDLE event_handle
Common_Info::dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Event Handle = %d\n"),
+ ACE_TEXT ("Event Handle = %d\n"),
event_handle));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Suspend Entry = %d\n"),
+ ACE_TEXT ("Suspend Entry = %d\n"),
this->suspend_entry_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -231,11 +231,11 @@ ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::dump (void) const
Common_Info::dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Event Handle = %d\n"),
+ ACE_TEXT ("Event Handle = %d\n"),
this->event_handle_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Suspend Entry = %d\n"),
+ ACE_TEXT ("Suspend Entry = %d\n"),
this->suspend_entry_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -300,11 +300,11 @@ ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::dump (void) const
Common_Info::dump ();
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Event Handle = %d\n"),
+ ACE_TEXT ("Event Handle = %d\n"),
this->event_handle_));
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("Resume Entry = %d\n"),
+ ACE_TEXT ("Resume Entry = %d\n"),
this->resume_entry_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
index 93d72d818ee..1314c294625 100644
--- a/ace/WIN32_Asynch_IO.cpp
+++ b/ace/WIN32_Asynch_IO.cpp
@@ -85,7 +85,7 @@ ACE_WIN32_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor)
if (win32_proactor == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("Dynamic cast to WIN32 Proactor failed\n")),
+ ACE_TEXT ("Dynamic cast to WIN32 Proactor failed\n")),
-1);
// Post myself.
@@ -394,8 +394,8 @@ ACE_WIN32_Asynch_Read_Stream::shared_read (ACE_WIN32_Asynch_Read_Stream_Result *
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ReadFile")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ReadFile")));
}
return -1;
@@ -631,8 +631,8 @@ ACE_WIN32_Asynch_Write_Stream::shared_write (ACE_WIN32_Asynch_Write_Stream_Resul
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("WriteFile")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("WriteFile")));
}
return -1;
}
@@ -1293,7 +1293,7 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
size_t available_space = total_size - space_in_use;
size_t space_needed = bytes_to_read + 2 * address_size;
if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Buffer too small\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
// WIN Specific.
@@ -1309,8 +1309,8 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ACE_OS::socket")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_OS::socket")));
}
return -1;
}
@@ -1371,8 +1371,8 @@ ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("ReadFile")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ReadFile")));
}
return -1;
}
@@ -1654,8 +1654,8 @@ ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("TransmitFile")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("TransmitFile")));
}
return -1;
}
diff --git a/ace/WIN32_Proactor.cpp b/ace/WIN32_Proactor.cpp
index 0bcf95a2644..d762223271e 100644
--- a/ace/WIN32_Proactor.cpp
+++ b/ace/WIN32_Proactor.cpp
@@ -54,8 +54,8 @@ ACE_WIN32_Proactor::ACE_WIN32_Proactor (size_t number_of_threads,
this->number_of_threads_);
if (this->completion_port_ == 0)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("CreateIoCompletionPort")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("CreateIoCompletionPort")));
}
ACE_WIN32_Proactor::~ACE_WIN32_Proactor (void)
@@ -96,8 +96,8 @@ ACE_WIN32_Proactor::register_handle (ACE_HANDLE handle,
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("CreateIoCompletionPort")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("CreateIoCompletionPort")));
}
return -1;
}
@@ -432,8 +432,8 @@ ACE_WIN32_Proactor::handle_events (unsigned long milli_seconds)
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("GetQueuedCompletionStatus")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("GetQueuedCompletionStatus")));
}
return -1;
}
@@ -503,8 +503,8 @@ ACE_WIN32_Proactor::post_completion (ACE_WIN32_Asynch_Result *result)
if (ACE::debug ())
{
ACE_DEBUG ((LM_ERROR,
- ASYS_TEXT ("%p\n"),
- ASYS_TEXT ("PostQueuedCompletionStatus failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("PostQueuedCompletionStatus failed")));
}
return -1;
}
diff --git a/ace/XTI_ATM_Mcast.i b/ace/XTI_ATM_Mcast.i
index 95345033760..93c22ac15c9 100644
--- a/ace/XTI_ATM_Mcast.i
+++ b/ace/XTI_ATM_Mcast.i
@@ -23,7 +23,7 @@ ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream,
info, rwf,
udata, opt) == ACE_INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
}
// Connect the <new_stream> to the <remote_sap>, waiting up to
diff --git a/ace/ace_wchar.h b/ace/ace_wchar.h
new file mode 100644
index 00000000000..2f38402e22a
--- /dev/null
+++ b/ace/ace_wchar.h
@@ -0,0 +1,229 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// unicode.h
+//
+// = AUTHOR
+// Darrell Brunsch
+//
+// ============================================================================
+
+#ifndef ACE_WCHAR_H
+#define ACE_WCHAR_H
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#if defined (ACE_HAS_WCHAR) && defined (ACE_WIN32)
+# include /**/ <tchar.h>
+#endif /* ACE_HAS_WCHAR && ACE_WIN32 */
+
+
+#if defined (ACE_HAS_WCHAR)
+# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
+ (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
+# include /**/ <cwchar>
+# elif !defined (__BORLANDC__) && !defined (ACE_HAS_WINCE)
+# include /**/ <wchar.h>
+# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
+#elif defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
+# include /**/ <wchar.h>
+#endif
+
+
+// Define the unicode/wchar related macros correctly
+
+#if defined (ACE_USES_WCHAR)
+typedef wchar_t ACE_TCHAR;
+# define ACE_TEXT(STRING) L##STRING
+# define ACE_TEXT_ALWAYS_CHAR(STRING) ACE_Wide_To_Ascii (STRING).char_rep ()
+# define ACE_TEXT_CHAR_TO_TCHAR(STRING) ACE_Ascii_To_Wide (STRING).wchar_rep ()
+#else /* ACE_USES_WCHAR */
+typedef char ACE_TCHAR;
+# define ACE_TEXT(STRING) STRING
+# define ACE_TEXT_ALWAYS_CHAR(STRING) STRING
+# define ACE_TEXT_CHAR_TO_TCHAR(STRING) STRING
+#endif /* ACE_USES_WCHAR */
+
+// Because we use the CharToOem and OemToChar functions, we need user32.lib
+# if defined (_MSC_VER)
+# pragma comment(lib, "user32.lib")
+# endif /* _MSC_VER */
+
+#if defined ACE_HAS_WCHAR
+class ACE_Wide_To_Ascii
+{
+ // = TITLE
+ // A lightweight wchar* to char* string conversion class.
+ //
+ // = DESCRIPTION
+ // The purpose of this class is to perform conversion from
+ // wchar* to char* strings. It is not intended for general
+ // purpose use.
+public:
+ ACE_Wide_To_Ascii (const wchar_t *s) : s_ (ACE_Wide_To_Ascii::convert (s)) {}
+ // Ctor must take a wchar string.
+
+ ~ACE_Wide_To_Ascii (void) { delete [] this->s_; }
+ // Dtor will free up the memory.
+
+ char *char_rep (void) { return this->s_; }
+ // Return the internal char* representation.
+
+ static char *convert (const wchar_t *wstr)
+ // Converts an wchar_t string to ascii and returns a new string.
+ {
+ size_t len = wcslen (wstr);
+ char *str = new char[len + 1];
+# if defined (ACE_WIN32)
+ ::CharToOemW (wstr, str);
+# else /* ACE_WIN32 */
+ for (size_t i = 0; i < len; i++)
+ {
+ wchar_t *t = ACE_const_cast (wchar_t *, wstr);
+ str[i] = ACE_static_cast (char, *(t + i));
+ }
+# endif /* ACE_WIN32 */
+ return str;
+ }
+
+private:
+ char *s_;
+ // Internal pointer to the converted string.
+
+ ACE_Wide_To_Ascii (void);
+ ACE_Wide_To_Ascii (ACE_Wide_To_Ascii &);
+ ACE_Wide_To_Ascii& operator= (ACE_Wide_To_Ascii &);
+ // Disallow these operation.
+};
+
+class ACE_Ascii_To_Wide
+{
+ // = TITLE
+ // A lightweight char* to wchar* string conversion class.
+ //
+ // = DESCRIPTION
+ // The purpose of this class is to perform conversion from
+ // char* to wchar* strings. It is not intended for general
+ // purpose use.
+public:
+ ACE_Ascii_To_Wide (const char *s) : s_ (ACE_Ascii_To_Wide::convert (s)) {}
+ // Ctor must take a wchar string.
+
+ ~ACE_Ascii_To_Wide (void) { delete [] this->s_; }
+ // Dtor will free up the memory.
+
+ wchar_t *wchar_rep (void) { return this->s_; }
+ // Return the internal wchar* representation.
+
+ static wchar_t *convert (const char *str)
+ // Converts an char string to unicode/wide and returns a new string.
+ {
+ size_t len = strlen (str);
+ wchar_t *wstr = new wchar_t[len + 1];
+# if defined (ACE_WIN32)
+ ::OemToCharW (str, wstr);
+# else /* ACE_WIN32 */
+ for (size_t i = 0; i < len; i++)
+ {
+ char *t = ACE_const_cast (char *, str);
+ wstr[i] = ACE_static_cast (wchar_t, *(t + i));
+ }
+# endif /* ACE_WIN32 */
+ return wstr;
+ }
+private:
+ wchar_t *s_;
+ // Internal pointer to the converted string.
+
+ ACE_Ascii_To_Wide (void);
+ ACE_Ascii_To_Wide (ACE_Ascii_To_Wide &);
+ ACE_Ascii_To_Wide operator= (ACE_Ascii_To_Wide &);
+ // Disallow these operation.
+};
+
+#endif /* ACE_HAS_WCHAR */
+
+#if defined (ACE_WIN32)
+#if defined (ACE_USES_WCHAR)
+#define ACE_TEXT_STARTUPINFO STARTUPINFOW
+#define ACE_TEXT_WIN32_FIND_DATA WIN32_FIND_DATAW
+
+#define ACE_TEXT_CreateEvent ::CreateEventW
+#define ACE_TEXT_CreateFile ::CreateFileW
+#define ACE_TEXT_CreateFileMapping ::CreateFileMappingW
+#define ACE_TEXT_CreateMutex ::CreateMutexW
+#define ACE_TEXT_CreateProcess ::CreateProcessW
+#define ACE_TEXT_CreateSemaphore ::CreateSemaphoreW
+#define ACE_TEXT_CreateService ::CreateServiceW
+#define ACE_TEXT_ExpandEnvironmentStrings ::ExpandEnvironmentStringsW
+#define ACE_TEXT_FindFirstFile ::FindFirstFileW
+#define ACE_TEXT_FindNextFile ::FindNextFileW
+#define ACE_TEXT_FormatMessage ::FormatMessageW
+#define ACE_TEXT_FreeEnvironmentStrings ::FreeEnvironmentStringsW
+#define ACE_TEXT_GetComputerName ::GetComputerNameW
+#define ACE_TEXT_GetEnvironmentStrings ::GetEnvironmentStringsW
+#define ACE_TEXT_GetModuleFileName ::GetModuleFileNameW
+#define ACE_TEXT_GetTempPath ::GetTempPathW
+#define ACE_TEXT_GetUserName ::GetUserNameW
+#define ACE_TEXT_LoadLibrary ::LoadLibraryW
+#define ACE_TEXT_OpenSCManager ::OpenSCManagerW
+#define ACE_TEXT_OpenService ::OpenServiceW
+#define ACE_TEXT_RegConnectRegistry ::RegConnectRegistryW
+#define ACE_TEXT_RegCreateKeyEx ::RegCreateKeyExW
+#define ACE_TEXT_RegDeleteKey ::RegDeleteKeyW
+#define ACE_TEXT_RegDeleteValue ::RegDeleteValueW
+#define ACE_TEXT_RegEnumKeyEx ::RegEnumKeyExW
+#define ACE_TEXT_RegEnumValue ::RegEnumValueW
+#define ACE_TEXT_RegOpenKey ::RegOpenKeyW
+#define ACE_TEXT_RegOpenKeyEx ::RegOpenKeyExW
+#define ACE_TEXT_RegQueryValueEx ::RegQueryValueExW
+#define ACE_TEXT_RegSetValueEx ::RegSetValueExW
+#define ACE_TEXT_StartService ::StartServiceW
+
+#else /* ACE_USES_WCHAR */
+#define ACE_TEXT_STARTUPINFO STARTUPINFOA
+#define ACE_TEXT_WIN32_FIND_DATA WIN32_FIND_DATAA
+
+#define ACE_TEXT_CreateEvent ::CreateEventA
+#define ACE_TEXT_CreateFile ::CreateFileA
+#define ACE_TEXT_CreateFileMapping ::CreateFileMappingA
+#define ACE_TEXT_CreateMutex ::CreateMutexA
+#define ACE_TEXT_CreateProcess ::CreateProcessA
+#define ACE_TEXT_CreateSemaphore ::CreateSemaphoreA
+#define ACE_TEXT_CreateService ::CreateServiceA
+#define ACE_TEXT_ExpandEnvironmentStrings ::ExpandEnvironmentStringsA
+#define ACE_TEXT_FindFirstFile ::FindFirstFileA
+#define ACE_TEXT_FindNextFile ::FindNextFileA
+#define ACE_TEXT_FormatMessage ::FormatMessageA
+#define ACE_TEXT_FreeEnvironmentStrings ::FreeEnvironmentStringsA
+#define ACE_TEXT_GetComputerName ::GetComputerNameA
+#define ACE_TEXT_GetEnvironmentStrings ::GetEnvironmentStringsA
+#define ACE_TEXT_GetModuleFileName ::GetModuleFileNameA
+#define ACE_TEXT_GetTempPath ::GetTempPathA
+#define ACE_TEXT_GetUserName ::GetUserNameA
+#define ACE_TEXT_LoadLibrary ::LoadLibraryA
+#define ACE_TEXT_OpenSCManager ::OpenSCManagerA
+#define ACE_TEXT_OpenService ::OpenServiceA
+#define ACE_TEXT_RegConnectRegistry ::RegConnectRegistryA
+#define ACE_TEXT_RegCreateKeyEx ::RegCreateKeyExA
+#define ACE_TEXT_RegDeleteKey ::RegDeleteKeyA
+#define ACE_TEXT_RegDeleteValue ::RegDeleteValueA
+#define ACE_TEXT_RegEnumKeyEx ::RegEnumKeyExA
+#define ACE_TEXT_RegEnumValue ::RegEnumValueA
+#define ACE_TEXT_RegOpenKey ::RegOpenKeyA
+#define ACE_TEXT_RegOpenKeyEx ::RegOpenKeyExA
+#define ACE_TEXT_RegQueryValueEx ::RegQueryValueExA
+#define ACE_TEXT_RegSetValueEx ::RegSetValueExA
+#define ACE_TEXT_StartService ::StartServiceA
+#endif /* ACE_USES_WCHAR */
+#endif /* ACE_WIN32 */
+
+#endif /* ACE_WCHAR_H */
diff --git a/ace/config-WinCE.h b/ace/config-WinCE.h
index a39d508a614..bf2e8066d90 100644
--- a/ace/config-WinCE.h
+++ b/ace/config-WinCE.h
@@ -35,11 +35,9 @@
#define ACE_HAS_MFC 1
// So is UNICODE.
-#if defined (ACE_HAS_UNICODE)
-# undef ACE_HAS_UNICODE
-#endif /* ACE_HAS_UNICODE */
-#define ACE_HAS_UNICODE
-#define ACE_HAS_MOSTLY_UNICODE_APIS
+#if !defined (ACE_HAS_WCHAR)
+# error Only Unicode ACE is supported on Windows CE
+#endif /* ACE_HAS_WCHAR */
#define ACE_USES_WINCE_SEMA_SIMULATION
diff --git a/ace/config-all.h b/ace/config-all.h
index dad168dd6b2..4b281526220 100644
--- a/ace/config-all.h
+++ b/ace/config-all.h
@@ -115,6 +115,10 @@
// UNICODE macros (to be added later)
// ============================================================================
+// Get the unicode (i.e. ACE_TCHAR) defines
+# include "ace/ace_wchar.h"
+
+
// ============================================================================
// EXPORT macros
//
diff --git a/ace/config-ghs-common.h b/ace/config-ghs-common.h
index 8e0b61f5666..673a7c5ec15 100644
--- a/ace/config-ghs-common.h
+++ b/ace/config-ghs-common.h
@@ -32,7 +32,6 @@
# define ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA
# endif /* __STANDARD_CXX */
-# define ACE_HAS_WCHAR_TYPEDEFS_CHAR
# define ACE_LACKS_LINEBUFFERED_STREAMBUF
# define ACE_LACKS_LONGLONG_T
# define ACE_LACKS_SIGNED_CHAR
diff --git a/ace/config-tandem.h b/ace/config-tandem.h
index 86625f19e21..e1a3f96578e 100644
--- a/ace/config-tandem.h
+++ b/ace/config-tandem.h
@@ -33,9 +33,6 @@
// Tandem has a function to set t_errno (set_t_errno)
#define ACE_HAS_SET_T_ERRNO // jjpp
-// It does but problems with wcstok
-// ACE_HAS_UNICODE Platform/compiler supports UNICODE
-
//Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC
diff --git a/ace/config-win32-borland.h b/ace/config-win32-borland.h
index 5e05c7055f3..1229400bc5c 100644
--- a/ace/config-win32-borland.h
+++ b/ace/config-win32-borland.h
@@ -21,7 +21,7 @@
# include "ace/config-win32-common.h"
-# define ACE_CC_NAME "Borland C++ Builder"
+# define ACE_CC_NAME ACE_TEXT ("Borland C++ Builder")
# define ACE_CC_MAJOR_VERSION (__BORLANDC__ / 0x100)
# define ACE_CC_MINOR_VERSION (__BORLANDC__ % 0x100)
# define ACE_CC_BETA_VERSION (0)
@@ -50,7 +50,6 @@
# define ACE_HAS_STRPTIME 1
# define ACE_HAS_TEMPLATE_SPECIALIZATION 1
# define ACE_HAS_TEMPLATE_TYPEDEFS 1
-# define ACE_HAS_TEXT_MACRO_CONFLICT 1
# define ACE_HAS_TYPENAME_KEYWORD 1
# define ACE_HAS_USER_MODE_MASKS 1
# define ACE_HAS_USING_KEYWORD 1
@@ -64,8 +63,8 @@
# define ACE_NEW_THROWS_EXCEPTIONS 1
# define ACE_SIZEOF_LONG_DOUBLE 10
# define ACE_TEMPLATES_REQUIRE_SOURCE 1
-# define ACE_UINT64_FORMAT_SPECIFIER "%Lu"
-# define ACE_INT64_FORMAT_SPECIFIER "%Ld"
+# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%Lu")
+# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%Ld")
# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
/* need to ensure these are included before <iomanip> */
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index d3c9c8d3c21..ed9ca89f320 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -14,6 +14,8 @@
# error Please define WIN32 in your project settings.
#endif
+#define ACE_WIN32
+
// Define this if you're running NT 4.x
// Setting applies to : building ACE
// Runtime restrictions: System must be Windows NT => 4.0
@@ -195,20 +197,20 @@
#define ACE_LACKS_SYSV_SHMEM
#define ACE_LACKS_UNISTD_H
#define ACE_LACKS_RLIMIT
+#define ACE_LACKS_MKFIFO
#define ACE_LACKS_TELLDIR
#define ACE_LACKS_SEEKDIR
#define ACE_LACKS_REWINDDIR
#define ACE_LACKS_READDIR_R
-
#define ACE_SIZEOF_LONG_LONG 8
typedef unsigned __int64 ACE_UINT64;
// Optimize ACE_Handle_Set for select().
#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-// Win32 has UNICODE support
-#define ACE_HAS_UNICODE
+// Win32 has wchar_t support
+#define ACE_HAS_WCHAR
// Compiler/platform correctly calls init()/fini() for shared
// libraries. - applied for DLLs ?
@@ -240,8 +242,6 @@ typedef unsigned __int64 ACE_UINT64;
// Compiler/platform supports sys_siglist array.
//define ACE_HAS_SYS_SIGLIST
-#define ACE_WIN32
-
// Platform supports ACE_TLI timod STREAMS module.
//define ACE_HAS_TIMOD_H
@@ -325,22 +325,6 @@ typedef unsigned __int64 ACE_UINT64;
# define NOMINMAX
#endif /* NOMINMAX */
-#if defined (ACE_HAS_MOSTLY_UNICODE_APIS) && !defined (UNICODE)
-# define UNICODE
-#endif /* ACE_HAS_MOSTLY_UNICODE_APIS && !UNICODE */
-
-#if defined (_UNICODE)
-# if !defined (UNICODE)
-# define UNICODE /* UNICODE is used by Windows headers */
-# endif /* UNICODE */
-#endif /* _UNICODE */
-
-#if defined (UNICODE)
-# if !defined (_UNICODE)
-# define _UNICODE /* _UNICODE is used by C-runtime/MFC headers */
-# endif /* _UNICODE */
-#endif /* UNICODE */
-
#if !defined(_DEBUG)
// If we are making a release, and the user has not specified
// inline directives, we will default to inline
@@ -408,18 +392,6 @@ typedef unsigned __int64 ACE_UINT64;
# define WIN32_LEAN_AND_MEAN
# endif /* WIN32_LEAN_AND_MEAN */
-# if defined (_UNICODE)
-# if !defined (UNICODE)
-# define UNICODE /* UNICODE is used by Windows headers */
-# endif /* UNICODE */
-# endif /* _UNICODE */
-
-# if defined (UNICODE)
-# if !defined (_UNICODE)
-# define _UNICODE /* _UNICODE is used by C-runtime/MFC headers */
-# endif /* _UNICODE */
-# endif /* UNICODE */
-
#endif /* !defined (_INC_WINDOWS) */
// Always use WS2 when available
diff --git a/ace/config-win32-msvc.h b/ace/config-win32-msvc.h
index ed0fe0f6404..734f34857cc 100644
--- a/ace/config-win32-msvc.h
+++ b/ace/config-win32-msvc.h
@@ -12,7 +12,7 @@
# include "ace/config-win32-common.h"
-# define ACE_CC_NAME "Visual C++"
+# define ACE_CC_NAME ACE_TEXT ("Visual C++")
# define ACE_CC_PREPROCESSOR "CL.EXE"
# define ACE_CC_PREPROCESSOR_ARGS "-nologo -E"
@@ -61,9 +61,6 @@
# define ACE_HAS_ANSI_CASTS 0
# endif
-// MSVC already defined __TEXT
-# define ACE_HAS_TEXT_MACRO_CONFLICT
-
# define ACE_HAS_EXPLICIT_KEYWORD
# define ACE_HAS_MUTABLE_KEYWORD
@@ -72,7 +69,6 @@
# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
# endif /* _MSC_VER && _MSC_VER < 1200 */
-# define ACE_HAS_WCHAR_TYPEDEFS_USHORT
# if !defined (ACE_HAS_WINCE)
# define ACE_HAS_EXCEPTIONS
# endif /* ACE_HAS_WINCE */
@@ -203,8 +199,8 @@ inline void *operator new (unsigned int, void *p) { return p; }
# pragma warning(default: 4201) /* winnt.h uses nameless structs */
// At least for Win32 - MSVC compiler (ver. 5)
-# define ACE_INT64_FORMAT_SPECIFIER "%I64d"
-# define ACE_UINT64_FORMAT_SPECIFIER "%I64u"
+# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%I64d")
+# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%I64u")
#endif /* _MSC_VER */
diff --git a/ace/config-win32-visualage.h b/ace/config-win32-visualage.h
index dbc791391d8..8a2823dbc0f 100644
--- a/ace/config-win32-visualage.h
+++ b/ace/config-win32-visualage.h
@@ -11,7 +11,7 @@
#if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-#define ACE_CC_NAME "IBM VisualAge C++"
+#define ACE_CC_NAME ACE_TEXT ("IBM VisualAge C++")
#define ACE_CC_MAJOR_VERSION (__IBMCPP__ / 0x100)
#define ACE_CC_MINOR_VERSION (__IBMCPP__ % 0x100)
#define ACE_CC_BETA_VERSION (0)
@@ -43,7 +43,6 @@
#define ACE_HAS_STRPTIME 1
#define ACE_HAS_TEMPLATE_SPECIALIZATION 1
#define ACE_HAS_TEMPLATE_TYPEDEFS 1
-#define ACE_HAS_TEXT_MACRO_CONFLICT 1
#define ACE_HAS_TYPENAME_KEYWORD 1
#define ACE_HAS_USING_KEYWORD 1
#define ACE_LACKS_ACE_IOSTREAM 1
@@ -55,7 +54,7 @@
#define ACE_NEW_THROWS_EXCEPTIONS 1
#define ACE_SIZEOF_LONG_DOUBLE 10
#define ACE_TEMPLATES_REQUIRE_SOURCE 1
-#define ACE_UINT64_FORMAT_SPECIFIER "%I64u"
+#define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%I64u")
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
#undef WIFEXITED
@@ -77,10 +76,6 @@
#define EPIPE 32
#define ENAMETOOLONG 38
-#if defined (ACE_HAS_UNICODE)
-# undef ACE_HAS_UNICODE
-#endif /* ACE_HAS_UNICODE */
-
#endif /* defined(__IBMCPP__) */
#include "ace/post.h"