diff options
532 files changed, 10485 insertions, 10035 deletions
diff --git a/ChangeLog b/ChangeLog index c96425dc1ee..a3c9c44b3bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,499 @@ +Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu> + + This is my first checkin of my Unicode changes. They should be + mostly harmless, since most platforms and build do not use Unicode + stuff, in which these changes *should* result in the exact same + behavior as before. + + But, if Unicode was being used, then chances are it is not going + to work without a few changes. A summary of the changes are: + + - Standardized wide char support to the following macros: + + ACE_HAS_WCHAR - if not defined, ACE will not use the type wchar_t + or provide any of the functions that use it. + ACE_USES_WCHAR - if defined, ACE will use wchar_t instead of char + for its strings (but not its buffers). + + This support has been mostly completed, but there are still some + loose ends that need to be cleaned up. + + Note also that even if ACE_USES_WCHAR is defined or not, both + wide and narrow versions of the string operations will be + available. + + - Removed all the ASYS_* macros (besides ASYS_INLINE). So all code + using ASYS_TEXT and ASYS_TCHAR should now use ACE_TEXT and + ACE_TCHAR. And unlike their predecessers, these *will* turn into + wide character versions when ACE_USES_WCHAR is defined. + + - Removed the macros ACE_HAS_WCHAR_TYPEDEFS_USHORT and + ACE_HAS_WCHAR_TYPEDEFS_CHAR since ACE will not depend on what + wchar_t defaults to. + + - Messed around with Windows CE support, most likely it broke it + even more. I've halted my work on Windows CE until after this + change, so I'll be fixing it up in upcoming checkins. + + - Since ACE_WString was changed, everything using it will now + not be available when ACE_HAS_WCHAR is not defined. + + The motivation for this change was that the Unicode support was + a mess and was very unintuitive. Since I was given the job of + maintaining it (since I'm doing Windows CE stuff now), I decided + to fix it instead of try to figure out what was currently + happening. A consistent design is much easier to explain and + maintain. + + * ace/ACE.h: + * ace/ACE.i: + * ace/ACE.cpp: + * ace/ARGV.cpp: + + Removed ACE's strecpy since all it did was call ACE_OS's strecpy. + + * ace/ace_wchar.h: (added) + + Moved all the unicode specific stuff here. + + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + + ACE_WString used to use ACE_USHORT16 instead of wchar_t. I + changed it so it does, since it will be more useful and intuitive + this way. + + * ace/Log_Record.cpp: + + We were using ACE_OS::fwrite to print the string. This didn't work + when the string was wchar_t, so this was changed to ACE_OS::fprintf + instead. + + * TODO: + * acconfig.h: + * configure.in: + * ace/ACE.cpp: + * ace/ACE.h: + * ace/ACE.i: + * ace/ARGV.cpp: + * ace/ARGV.h: + * ace/ARGV.i: + * ace/ATM_Addr.cpp: + * ace/ATM_Addr.h: + * ace/ATM_Connector.i: + * ace/ATM_QoS.cpp: + * ace/Acceptor.cpp: + * ace/Acceptor.h: + * ace/Activation_Queue.cpp: + * ace/Addr.cpp: + * ace/Arg_Shifter.cpp: + * ace/Arg_Shifter.h: + * ace/Asynch_Acceptor.cpp: + * ace/Asynch_IO.cpp: + * ace/Based_Pointer_T.cpp: + * ace/Basic_Types.h: + * ace/CORBA_Handler.cpp: + * ace/Cache_Map_Manager_T.cpp: + * ace/Cached_Connect_Strategy_T.cpp: + * ace/Caching_Strategies_T.i: + * ace/Capabilities.cpp: + * ace/Capabilities.h: + * ace/Capabilities.i: + * ace/Configuration.cpp: + * ace/Configuration.h: + * ace/Connector.cpp: + * ace/Connector.h: + * ace/Containers_T.cpp: + * ace/DEV_Addr.cpp: + * ace/DEV_Addr.h: + * ace/DEV_Addr.i: + * ace/DEV_Connector.i: + * ace/DLL.cpp: + * ace/DLL.h: + * ace/Dirent.h: + * ace/Dirent.i: + * ace/Dynamic_Service.cpp: + * ace/Dynamic_Service.h: + * ace/Env_Value_T.h: + * ace/Env_Value_T.i: + * ace/FIFO.cpp: + * ace/FIFO.h: + * ace/FIFO.i: + * ace/FIFO_Recv.cpp: + * ace/FIFO_Recv.h: + * ace/FIFO_Recv_Msg.cpp: + * ace/FIFO_Recv_Msg.h: + * ace/FIFO_Send.cpp: + * ace/FIFO_Send.h: + * ace/FIFO_Send_Msg.cpp: + * ace/FIFO_Send_Msg.h: + * ace/FILE_Addr.cpp: + * ace/FILE_Addr.h: + * ace/FILE_Addr.i: + * ace/FILE_Connector.cpp: + * ace/FILE_Connector.i: + * ace/Filecache.cpp: + * ace/Filecache.h: + * ace/Functor.h: + * ace/Functor.i: + * ace/Future.cpp: + * ace/Get_Opt.cpp: + * ace/Get_Opt.h: + * ace/Handle_Set.cpp: + * ace/Hash_Map_Manager_T.cpp: + * ace/Hash_Map_Manager_T.i: + * ace/High_Res_Timer.cpp: + * ace/High_Res_Timer.h: + * ace/INET_Addr.cpp: + * ace/INET_Addr.h: + * ace/INET_Addr.i: + * ace/IO_SAP.cpp: + * ace/IPC_SAP.cpp: + * ace/LSOCK.cpp: + * ace/LSOCK_CODgram.cpp: + * ace/LSOCK_Connector.cpp: + * ace/LSOCK_Dgram.cpp: + * ace/Local_Name_Space.cpp: + * ace/Local_Name_Space.h: + * ace/Local_Name_Space_T.cpp: + * ace/Local_Name_Space_T.h: + * ace/Local_Tokens.cpp: + * ace/Local_Tokens.h: + * ace/Local_Tokens.i: + * ace/Log_Msg.cpp: + * ace/Log_Msg.h: + * ace/Log_Record.cpp: + * ace/Log_Record.h: + * ace/Log_Record.i: + * ace/MEM_Acceptor.cpp: + * ace/MEM_Acceptor.h: + * ace/MEM_Acceptor.i: + * ace/MEM_Addr.cpp: + * ace/MEM_Addr.h: + * ace/MEM_Addr.i: + * ace/MEM_Connector.cpp: + * ace/MEM_SAP.cpp: + * ace/MEM_SAP.h: + * ace/Malloc.cpp: + * ace/Malloc_T.cpp: + * ace/Malloc_T.h: + * ace/Malloc_T.i: + * ace/Map_Manager.cpp: + * ace/Map_Manager.i: + * ace/Mem_Map.cpp: + * ace/Mem_Map.h: + * ace/Mem_Map.i: + * ace/Memory_Pool.cpp: + * ace/Memory_Pool.h: + * ace/Message_Block.cpp: + * ace/Message_Queue.cpp: + * ace/Message_Queue_T.cpp: + * ace/Module.cpp: + * ace/Module.h: + * ace/Module.i: + * ace/NT_Service.cpp: + * ace/NT_Service.h: + * ace/NT_Service.i: + * ace/Name_Proxy.cpp: + * ace/Name_Request_Reply.cpp: + * ace/Name_Space.cpp: + * ace/Name_Space.h: + * ace/Naming_Context.cpp: + * ace/Naming_Context.h: + * ace/OS.cpp: + * ace/OS.h: + * ace/OS.i: + * ace/Object_Manager.cpp: + * ace/Obstack.cpp: + * ace/Obstack.h: + * ace/POSIX_Asynch_IO.cpp: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Pipe.cpp: + * ace/Proactor.cpp: + * ace/Process.cpp: + * ace/Process.h: + * ace/Process.i: + * ace/Process_Manager.cpp: + * ace/QoS_Manager.cpp: + * ace/QoS_Session_Factory.cpp: + * ace/QoS_Session_Impl.cpp: + * ace/RB_Tree.cpp: + * ace/RB_Tree.i: + * ace/README: + * ace/Read_Buffer.cpp: + * ace/Registry.cpp: + * ace/Registry.h: + * ace/Registry_Name_Space.cpp: + * ace/Remote_Name_Space.cpp: + * ace/Remote_Name_Space.h: + * ace/Remote_Tokens.cpp: + * ace/Remote_Tokens.h: + * ace/Remote_Tokens.i: + * ace/SOCK.cpp: + * ace/SOCK_Acceptor.cpp: + * ace/SOCK_CODgram.cpp: + * ace/SOCK_Connector.cpp: + * ace/SOCK_Dgram.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/SOCK_Dgram_Bcast.h: + * ace/SOCK_Dgram_Mcast.cpp: + * ace/SOCK_Dgram_Mcast.h: + * ace/SOCK_Dgram_Mcast_QoS.cpp: + * ace/SOCK_Dgram_Mcast_QoS.h: + * ace/SPIPE_Acceptor.cpp: + * ace/SPIPE_Addr.cpp: + * ace/SPIPE_Addr.h: + * ace/SPIPE_Addr.i: + * ace/SPIPE_Connector.cpp: + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + * ace/SV_Message_Queue.cpp: + * ace/SV_Semaphore_Complex.cpp: + * ace/SV_Semaphore_Simple.cpp: + * ace/SV_Shared_Memory.cpp: + * ace/Select_Reactor_Base.cpp: + * ace/Select_Reactor_T.cpp: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Service_Config.i: + * ace/Service_Manager.cpp: + * ace/Service_Manager.h: + * ace/Service_Object.cpp: + * ace/Service_Object.h: + * ace/Service_Object.i: + * ace/Service_Repository.cpp: + * ace/Service_Repository.h: + * ace/Service_Types.cpp: + * ace/Service_Types.h: + * ace/Service_Types.i: + * ace/Shared_Memory_MM.cpp: + * ace/Shared_Memory_MM.h: + * ace/Shared_Memory_MM.i: + * ace/Shared_Object.cpp: + * ace/Shared_Object.h: + * ace/Singleton.cpp: + * ace/Stats.cpp: + * ace/Stats.h: + * ace/Stats.i: + * ace/Strategies_T.cpp: + * ace/Strategies_T.i: + * ace/Stream.cpp: + * ace/Stream.h: + * ace/Stream_Modules.cpp: + * ace/Stream_Modules.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.l: + * ace/Svc_Conf.y: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * ace/Svc_Handler.cpp: + * ace/Svc_Handler.h: + * ace/Synch.cpp: + * ace/Synch.h: + * ace/Synch.i: + * ace/Synch_T.cpp: + * ace/Synch_T.h: + * ace/Synch_T.i: + * ace/System_Time.cpp: + * ace/System_Time.h: + * ace/TLI.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.i: + * ace/TP_Reactor.cpp: + * ace/TP_Reactor.i: + * ace/Task_T.cpp: + * ace/Task_T.h: + * ace/Template_Instantiations.cpp: + * ace/Thread_Manager.cpp: + * ace/Time_Request_Reply.cpp: + * ace/Timeprobe_T.cpp: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.cpp: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_Adapters.cpp: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Wheel_T.cpp: + * ace/Token.cpp: + * ace/Token.h: + * ace/Token_Collection.cpp: + * ace/Token_Collection.h: + * ace/Token_Collection.i: + * ace/Token_Invariants.cpp: + * ace/Token_Invariants.h: + * ace/Token_Manager.cpp: + * ace/Token_Manager.h: + * ace/Token_Request_Reply.cpp: + * ace/Token_Request_Reply.h: + * ace/Token_Request_Reply.i: + * ace/Trace.cpp: + * ace/Trace.h: + * ace/UPIPE_Acceptor.cpp: + * ace/UPIPE_Connector.cpp: + * ace/UPIPE_Connector.i: + * ace/WFMO_Reactor.cpp: + * ace/WFMO_Reactor.i: + * ace/WIN32_Asynch_IO.cpp: + * ace/WIN32_Proactor.cpp: + * ace/XTI_ATM_Mcast.i: + * ace/config-WinCE.h: + * ace/config-all.h: + * ace/config-ghs-common.h: + * ace/config-tandem.h: + * ace/config-win32-borland.h: + * ace/config-win32-common.h: + * ace/config-win32-msvc.h: + * ace/config-win32-visualage.h: + * ace/CLASSIX/CLASSIX_CLD_Connector.cpp: + * ace/CLASSIX/CLASSIX_CO_Acceptor.cpp: + * ace/CLASSIX/CLASSIX_Port.cpp: + * ace/CLASSIX/CLASSIX_Port.h: + * ace/CLASSIX/CLASSIX_Select_Reactor.cpp: + * apps/Gateway/Gateway/Options.cpp: + * apps/JAWS/PROTOTYPE/JAWS/JAWS.h: + * bin/envinfo.cpp: + * docs/ACE-guidelines.html: + * docs/tutorials/Chap_3/mm.cpp: + * examples/Connection/blocking/SPIPE-acceptor.cpp: + * examples/Connection/blocking/SPIPE-acceptor.h: + * examples/Connection/blocking/SPIPE-connector.cpp: + * examples/Connection/blocking/SPIPE-connector.h: + * examples/Connection/non_blocking/test_lsock_acceptor.cpp: + * examples/Connection/non_blocking/test_lsock_connector.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-client.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-server.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp: + * examples/IPC_SAP/UPIPE_SAP/ex3.cpp: + * examples/Naming/test_multiple_contexts.cpp: + * examples/Naming/test_non_existent.cpp: + * examples/Naming/test_writers.cpp: + * examples/Reactor/WFMO_Reactor/test_console_input.cpp: + * examples/Reactor/WFMO_Reactor/test_directory_changes.cpp: + * examples/Reactor/WFMO_Reactor/test_handle_close.cpp: + * examples/Reactor/WFMO_Reactor/test_registry_changes.cpp: + * examples/Registry/test_registry_iterator.cpp: + * examples/Service_Configurator/Misc/Timer_Service.cpp: + * examples/Service_Configurator/Misc/Timer_Service.h: + * examples/Service_Configurator/Misc/main.cpp: + * examples/Service_Configurator/Misc/main.dsp: + * examples/Web_Crawler/Options.cpp: + * examples/Web_Crawler/Options.h: + * examples/Web_Crawler/URL_Addr.cpp: + * examples/Web_Crawler/URL_Addr.h: + * netsvcs/clients/Logger/indirect_logging.cpp: + * netsvcs/clients/Naming/Client/main.cpp: + * netsvcs/lib/Logging_Strategy.cpp: + * netsvcs/lib/TS_Clerk_Handler.cpp: + * netsvcs/lib/TS_Clerk_Handler.h: + * performance-tests/Misc/test_naming.cpp: + * performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp: + * performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp: + * performance-tests/TCP/tcp_test.cpp: + * tests/ACE_Init_Test.dsp: + * tests/ARGV_Test.cpp: + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Barrier_Test.cpp: + * tests/Basic_Types_Test.cpp: + * tests/Buffer_Stream_Test.cpp: + * tests/CDR_File_Test.cpp: + * tests/CDR_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Cached_Accept_Conn_Test.cpp: + * tests/Cached_Conn_Test.cpp: + * tests/Capabilities_Test.cpp: + * tests/Collection_Test.cpp: + * tests/Conn_Test.cpp: + * tests/DLL_Test.cpp: + * tests/DLL_Test.h: + * tests/DLList_Test.cpp: + * tests/Dynamic_Priority_Test.cpp: + * tests/Enum_Interfaces_Test.cpp: + * tests/Env_Value_Test.cpp: + * tests/FlReactor_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Handle_Set_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/Hash_Map_Manager_Test.cpp: + * tests/High_Res_Timer_Test.cpp: + * tests/IOStream_Test.cpp: + * tests/Lazy_Map_Manager_Test.cpp: + * tests/Log_Msg_Test.cpp: + * tests/MM_Shared_Memory_Test.cpp: + * tests/MT_Reactor_Timer_Test.cpp: + * tests/MT_SOCK_Test.cpp: + * tests/Malloc_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Map_Test.cpp: + * tests/Mem_Map_Test.cpp: + * tests/Message_Block_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Message_Queue_Test.cpp: + * tests/Naming_Test.cpp: + * tests/New_Fail_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Object_Manager_Test.cpp: + * tests/OrdMultiSet_Test.cpp: + * tests/Pipe_Test.cpp: + * tests/Priority_Buffer_Test.cpp: + * tests/Priority_Reactor_Test.cpp: + * tests/Priority_Task_Test.cpp: + * tests/Process_Manager_Test.cpp: + * tests/Process_Mutex_Test.cpp: + * tests/Process_Strategy_Test.cpp: + * tests/Process_Strategy_Test.h: + * tests/RB_Tree_Test.cpp: + * tests/Reactor_Exceptions_Test.cpp: + * tests/Reactor_Notify_Test.cpp: + * tests/Reactor_Performance_Test.cpp: + * tests/Reactor_Timer_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Recursive_Mutex_Test.cpp: + * tests/Reverse_Lock_Test.cpp: + * tests/SOCK_Connector_Test.cpp: + * tests/SOCK_Send_Recv_Test.cpp: + * tests/SOCK_Test.cpp: + * tests/SPIPE_Test.cpp: + * tests/SString_Test.cpp: + * tests/SV_Shared_Memory_Test.cpp: + * tests/Semaphore_Test.cpp: + * tests/Service_Config_Test.cpp: + * tests/Signal_Test.cpp: + * tests/Sigset_Ops_Test.cpp: + * tests/Simple_Message_Block_Test.cpp: + * tests/Svc_Handler_Test.cpp: + * tests/TSS_Test.cpp: + * tests/Task_Test.cpp: + * tests/Thread_Manager_Test.cpp: + * tests/Thread_Mutex_Test.cpp: + * tests/Thread_Pool_Reactor_Test.cpp: + * tests/Thread_Pool_Test.cpp: + * tests/Time_Service_Test.cpp: + * tests/Time_Value_Test.cpp: + * tests/Timeprobe_Test.cpp: + * tests/Timer_Queue_Test.cpp: + * tests/TkReactor_Test.cpp: + * tests/Tokens_Test.cpp: + * tests/UPIPE_SAP_Test.cpp: + * tests/Upgradable_RW_Test.cpp: + * tests/XtReactor_Test.cpp: + * tests/test_config.h: + * websvcs/lib/URL_Addr.cpp: + * websvcs/lib/URL_Addr.h: + * websvcs/lib/URL_Addr.i: + * websvcs/tests/Test_URL_Addr.cpp: + + Made all the appropriate changes to support the new wide char + policy. Most changes were macro changes, changing ASYS_* to + ACE_*, changing char's to ACE_TCHAR's, adding in ACE_TEXT ()'s + when necessary, etc. + Sat Apr 22 18:41:06 2000 Vishal Kachroo <vishal@cs.wustl.edu> * ace/SOCK_Dgram_Mcast.h: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index c96425dc1ee..a3c9c44b3bc 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,499 @@ +Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu> + + This is my first checkin of my Unicode changes. They should be + mostly harmless, since most platforms and build do not use Unicode + stuff, in which these changes *should* result in the exact same + behavior as before. + + But, if Unicode was being used, then chances are it is not going + to work without a few changes. A summary of the changes are: + + - Standardized wide char support to the following macros: + + ACE_HAS_WCHAR - if not defined, ACE will not use the type wchar_t + or provide any of the functions that use it. + ACE_USES_WCHAR - if defined, ACE will use wchar_t instead of char + for its strings (but not its buffers). + + This support has been mostly completed, but there are still some + loose ends that need to be cleaned up. + + Note also that even if ACE_USES_WCHAR is defined or not, both + wide and narrow versions of the string operations will be + available. + + - Removed all the ASYS_* macros (besides ASYS_INLINE). So all code + using ASYS_TEXT and ASYS_TCHAR should now use ACE_TEXT and + ACE_TCHAR. And unlike their predecessers, these *will* turn into + wide character versions when ACE_USES_WCHAR is defined. + + - Removed the macros ACE_HAS_WCHAR_TYPEDEFS_USHORT and + ACE_HAS_WCHAR_TYPEDEFS_CHAR since ACE will not depend on what + wchar_t defaults to. + + - Messed around with Windows CE support, most likely it broke it + even more. I've halted my work on Windows CE until after this + change, so I'll be fixing it up in upcoming checkins. + + - Since ACE_WString was changed, everything using it will now + not be available when ACE_HAS_WCHAR is not defined. + + The motivation for this change was that the Unicode support was + a mess and was very unintuitive. Since I was given the job of + maintaining it (since I'm doing Windows CE stuff now), I decided + to fix it instead of try to figure out what was currently + happening. A consistent design is much easier to explain and + maintain. + + * ace/ACE.h: + * ace/ACE.i: + * ace/ACE.cpp: + * ace/ARGV.cpp: + + Removed ACE's strecpy since all it did was call ACE_OS's strecpy. + + * ace/ace_wchar.h: (added) + + Moved all the unicode specific stuff here. + + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + + ACE_WString used to use ACE_USHORT16 instead of wchar_t. I + changed it so it does, since it will be more useful and intuitive + this way. + + * ace/Log_Record.cpp: + + We were using ACE_OS::fwrite to print the string. This didn't work + when the string was wchar_t, so this was changed to ACE_OS::fprintf + instead. + + * TODO: + * acconfig.h: + * configure.in: + * ace/ACE.cpp: + * ace/ACE.h: + * ace/ACE.i: + * ace/ARGV.cpp: + * ace/ARGV.h: + * ace/ARGV.i: + * ace/ATM_Addr.cpp: + * ace/ATM_Addr.h: + * ace/ATM_Connector.i: + * ace/ATM_QoS.cpp: + * ace/Acceptor.cpp: + * ace/Acceptor.h: + * ace/Activation_Queue.cpp: + * ace/Addr.cpp: + * ace/Arg_Shifter.cpp: + * ace/Arg_Shifter.h: + * ace/Asynch_Acceptor.cpp: + * ace/Asynch_IO.cpp: + * ace/Based_Pointer_T.cpp: + * ace/Basic_Types.h: + * ace/CORBA_Handler.cpp: + * ace/Cache_Map_Manager_T.cpp: + * ace/Cached_Connect_Strategy_T.cpp: + * ace/Caching_Strategies_T.i: + * ace/Capabilities.cpp: + * ace/Capabilities.h: + * ace/Capabilities.i: + * ace/Configuration.cpp: + * ace/Configuration.h: + * ace/Connector.cpp: + * ace/Connector.h: + * ace/Containers_T.cpp: + * ace/DEV_Addr.cpp: + * ace/DEV_Addr.h: + * ace/DEV_Addr.i: + * ace/DEV_Connector.i: + * ace/DLL.cpp: + * ace/DLL.h: + * ace/Dirent.h: + * ace/Dirent.i: + * ace/Dynamic_Service.cpp: + * ace/Dynamic_Service.h: + * ace/Env_Value_T.h: + * ace/Env_Value_T.i: + * ace/FIFO.cpp: + * ace/FIFO.h: + * ace/FIFO.i: + * ace/FIFO_Recv.cpp: + * ace/FIFO_Recv.h: + * ace/FIFO_Recv_Msg.cpp: + * ace/FIFO_Recv_Msg.h: + * ace/FIFO_Send.cpp: + * ace/FIFO_Send.h: + * ace/FIFO_Send_Msg.cpp: + * ace/FIFO_Send_Msg.h: + * ace/FILE_Addr.cpp: + * ace/FILE_Addr.h: + * ace/FILE_Addr.i: + * ace/FILE_Connector.cpp: + * ace/FILE_Connector.i: + * ace/Filecache.cpp: + * ace/Filecache.h: + * ace/Functor.h: + * ace/Functor.i: + * ace/Future.cpp: + * ace/Get_Opt.cpp: + * ace/Get_Opt.h: + * ace/Handle_Set.cpp: + * ace/Hash_Map_Manager_T.cpp: + * ace/Hash_Map_Manager_T.i: + * ace/High_Res_Timer.cpp: + * ace/High_Res_Timer.h: + * ace/INET_Addr.cpp: + * ace/INET_Addr.h: + * ace/INET_Addr.i: + * ace/IO_SAP.cpp: + * ace/IPC_SAP.cpp: + * ace/LSOCK.cpp: + * ace/LSOCK_CODgram.cpp: + * ace/LSOCK_Connector.cpp: + * ace/LSOCK_Dgram.cpp: + * ace/Local_Name_Space.cpp: + * ace/Local_Name_Space.h: + * ace/Local_Name_Space_T.cpp: + * ace/Local_Name_Space_T.h: + * ace/Local_Tokens.cpp: + * ace/Local_Tokens.h: + * ace/Local_Tokens.i: + * ace/Log_Msg.cpp: + * ace/Log_Msg.h: + * ace/Log_Record.cpp: + * ace/Log_Record.h: + * ace/Log_Record.i: + * ace/MEM_Acceptor.cpp: + * ace/MEM_Acceptor.h: + * ace/MEM_Acceptor.i: + * ace/MEM_Addr.cpp: + * ace/MEM_Addr.h: + * ace/MEM_Addr.i: + * ace/MEM_Connector.cpp: + * ace/MEM_SAP.cpp: + * ace/MEM_SAP.h: + * ace/Malloc.cpp: + * ace/Malloc_T.cpp: + * ace/Malloc_T.h: + * ace/Malloc_T.i: + * ace/Map_Manager.cpp: + * ace/Map_Manager.i: + * ace/Mem_Map.cpp: + * ace/Mem_Map.h: + * ace/Mem_Map.i: + * ace/Memory_Pool.cpp: + * ace/Memory_Pool.h: + * ace/Message_Block.cpp: + * ace/Message_Queue.cpp: + * ace/Message_Queue_T.cpp: + * ace/Module.cpp: + * ace/Module.h: + * ace/Module.i: + * ace/NT_Service.cpp: + * ace/NT_Service.h: + * ace/NT_Service.i: + * ace/Name_Proxy.cpp: + * ace/Name_Request_Reply.cpp: + * ace/Name_Space.cpp: + * ace/Name_Space.h: + * ace/Naming_Context.cpp: + * ace/Naming_Context.h: + * ace/OS.cpp: + * ace/OS.h: + * ace/OS.i: + * ace/Object_Manager.cpp: + * ace/Obstack.cpp: + * ace/Obstack.h: + * ace/POSIX_Asynch_IO.cpp: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Pipe.cpp: + * ace/Proactor.cpp: + * ace/Process.cpp: + * ace/Process.h: + * ace/Process.i: + * ace/Process_Manager.cpp: + * ace/QoS_Manager.cpp: + * ace/QoS_Session_Factory.cpp: + * ace/QoS_Session_Impl.cpp: + * ace/RB_Tree.cpp: + * ace/RB_Tree.i: + * ace/README: + * ace/Read_Buffer.cpp: + * ace/Registry.cpp: + * ace/Registry.h: + * ace/Registry_Name_Space.cpp: + * ace/Remote_Name_Space.cpp: + * ace/Remote_Name_Space.h: + * ace/Remote_Tokens.cpp: + * ace/Remote_Tokens.h: + * ace/Remote_Tokens.i: + * ace/SOCK.cpp: + * ace/SOCK_Acceptor.cpp: + * ace/SOCK_CODgram.cpp: + * ace/SOCK_Connector.cpp: + * ace/SOCK_Dgram.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/SOCK_Dgram_Bcast.h: + * ace/SOCK_Dgram_Mcast.cpp: + * ace/SOCK_Dgram_Mcast.h: + * ace/SOCK_Dgram_Mcast_QoS.cpp: + * ace/SOCK_Dgram_Mcast_QoS.h: + * ace/SPIPE_Acceptor.cpp: + * ace/SPIPE_Addr.cpp: + * ace/SPIPE_Addr.h: + * ace/SPIPE_Addr.i: + * ace/SPIPE_Connector.cpp: + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + * ace/SV_Message_Queue.cpp: + * ace/SV_Semaphore_Complex.cpp: + * ace/SV_Semaphore_Simple.cpp: + * ace/SV_Shared_Memory.cpp: + * ace/Select_Reactor_Base.cpp: + * ace/Select_Reactor_T.cpp: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Service_Config.i: + * ace/Service_Manager.cpp: + * ace/Service_Manager.h: + * ace/Service_Object.cpp: + * ace/Service_Object.h: + * ace/Service_Object.i: + * ace/Service_Repository.cpp: + * ace/Service_Repository.h: + * ace/Service_Types.cpp: + * ace/Service_Types.h: + * ace/Service_Types.i: + * ace/Shared_Memory_MM.cpp: + * ace/Shared_Memory_MM.h: + * ace/Shared_Memory_MM.i: + * ace/Shared_Object.cpp: + * ace/Shared_Object.h: + * ace/Singleton.cpp: + * ace/Stats.cpp: + * ace/Stats.h: + * ace/Stats.i: + * ace/Strategies_T.cpp: + * ace/Strategies_T.i: + * ace/Stream.cpp: + * ace/Stream.h: + * ace/Stream_Modules.cpp: + * ace/Stream_Modules.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.l: + * ace/Svc_Conf.y: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * ace/Svc_Handler.cpp: + * ace/Svc_Handler.h: + * ace/Synch.cpp: + * ace/Synch.h: + * ace/Synch.i: + * ace/Synch_T.cpp: + * ace/Synch_T.h: + * ace/Synch_T.i: + * ace/System_Time.cpp: + * ace/System_Time.h: + * ace/TLI.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.i: + * ace/TP_Reactor.cpp: + * ace/TP_Reactor.i: + * ace/Task_T.cpp: + * ace/Task_T.h: + * ace/Template_Instantiations.cpp: + * ace/Thread_Manager.cpp: + * ace/Time_Request_Reply.cpp: + * ace/Timeprobe_T.cpp: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.cpp: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_Adapters.cpp: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Wheel_T.cpp: + * ace/Token.cpp: + * ace/Token.h: + * ace/Token_Collection.cpp: + * ace/Token_Collection.h: + * ace/Token_Collection.i: + * ace/Token_Invariants.cpp: + * ace/Token_Invariants.h: + * ace/Token_Manager.cpp: + * ace/Token_Manager.h: + * ace/Token_Request_Reply.cpp: + * ace/Token_Request_Reply.h: + * ace/Token_Request_Reply.i: + * ace/Trace.cpp: + * ace/Trace.h: + * ace/UPIPE_Acceptor.cpp: + * ace/UPIPE_Connector.cpp: + * ace/UPIPE_Connector.i: + * ace/WFMO_Reactor.cpp: + * ace/WFMO_Reactor.i: + * ace/WIN32_Asynch_IO.cpp: + * ace/WIN32_Proactor.cpp: + * ace/XTI_ATM_Mcast.i: + * ace/config-WinCE.h: + * ace/config-all.h: + * ace/config-ghs-common.h: + * ace/config-tandem.h: + * ace/config-win32-borland.h: + * ace/config-win32-common.h: + * ace/config-win32-msvc.h: + * ace/config-win32-visualage.h: + * ace/CLASSIX/CLASSIX_CLD_Connector.cpp: + * ace/CLASSIX/CLASSIX_CO_Acceptor.cpp: + * ace/CLASSIX/CLASSIX_Port.cpp: + * ace/CLASSIX/CLASSIX_Port.h: + * ace/CLASSIX/CLASSIX_Select_Reactor.cpp: + * apps/Gateway/Gateway/Options.cpp: + * apps/JAWS/PROTOTYPE/JAWS/JAWS.h: + * bin/envinfo.cpp: + * docs/ACE-guidelines.html: + * docs/tutorials/Chap_3/mm.cpp: + * examples/Connection/blocking/SPIPE-acceptor.cpp: + * examples/Connection/blocking/SPIPE-acceptor.h: + * examples/Connection/blocking/SPIPE-connector.cpp: + * examples/Connection/blocking/SPIPE-connector.h: + * examples/Connection/non_blocking/test_lsock_acceptor.cpp: + * examples/Connection/non_blocking/test_lsock_connector.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-client.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-server.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp: + * examples/IPC_SAP/UPIPE_SAP/ex3.cpp: + * examples/Naming/test_multiple_contexts.cpp: + * examples/Naming/test_non_existent.cpp: + * examples/Naming/test_writers.cpp: + * examples/Reactor/WFMO_Reactor/test_console_input.cpp: + * examples/Reactor/WFMO_Reactor/test_directory_changes.cpp: + * examples/Reactor/WFMO_Reactor/test_handle_close.cpp: + * examples/Reactor/WFMO_Reactor/test_registry_changes.cpp: + * examples/Registry/test_registry_iterator.cpp: + * examples/Service_Configurator/Misc/Timer_Service.cpp: + * examples/Service_Configurator/Misc/Timer_Service.h: + * examples/Service_Configurator/Misc/main.cpp: + * examples/Service_Configurator/Misc/main.dsp: + * examples/Web_Crawler/Options.cpp: + * examples/Web_Crawler/Options.h: + * examples/Web_Crawler/URL_Addr.cpp: + * examples/Web_Crawler/URL_Addr.h: + * netsvcs/clients/Logger/indirect_logging.cpp: + * netsvcs/clients/Naming/Client/main.cpp: + * netsvcs/lib/Logging_Strategy.cpp: + * netsvcs/lib/TS_Clerk_Handler.cpp: + * netsvcs/lib/TS_Clerk_Handler.h: + * performance-tests/Misc/test_naming.cpp: + * performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp: + * performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp: + * performance-tests/TCP/tcp_test.cpp: + * tests/ACE_Init_Test.dsp: + * tests/ARGV_Test.cpp: + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Barrier_Test.cpp: + * tests/Basic_Types_Test.cpp: + * tests/Buffer_Stream_Test.cpp: + * tests/CDR_File_Test.cpp: + * tests/CDR_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Cached_Accept_Conn_Test.cpp: + * tests/Cached_Conn_Test.cpp: + * tests/Capabilities_Test.cpp: + * tests/Collection_Test.cpp: + * tests/Conn_Test.cpp: + * tests/DLL_Test.cpp: + * tests/DLL_Test.h: + * tests/DLList_Test.cpp: + * tests/Dynamic_Priority_Test.cpp: + * tests/Enum_Interfaces_Test.cpp: + * tests/Env_Value_Test.cpp: + * tests/FlReactor_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Handle_Set_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/Hash_Map_Manager_Test.cpp: + * tests/High_Res_Timer_Test.cpp: + * tests/IOStream_Test.cpp: + * tests/Lazy_Map_Manager_Test.cpp: + * tests/Log_Msg_Test.cpp: + * tests/MM_Shared_Memory_Test.cpp: + * tests/MT_Reactor_Timer_Test.cpp: + * tests/MT_SOCK_Test.cpp: + * tests/Malloc_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Map_Test.cpp: + * tests/Mem_Map_Test.cpp: + * tests/Message_Block_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Message_Queue_Test.cpp: + * tests/Naming_Test.cpp: + * tests/New_Fail_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Object_Manager_Test.cpp: + * tests/OrdMultiSet_Test.cpp: + * tests/Pipe_Test.cpp: + * tests/Priority_Buffer_Test.cpp: + * tests/Priority_Reactor_Test.cpp: + * tests/Priority_Task_Test.cpp: + * tests/Process_Manager_Test.cpp: + * tests/Process_Mutex_Test.cpp: + * tests/Process_Strategy_Test.cpp: + * tests/Process_Strategy_Test.h: + * tests/RB_Tree_Test.cpp: + * tests/Reactor_Exceptions_Test.cpp: + * tests/Reactor_Notify_Test.cpp: + * tests/Reactor_Performance_Test.cpp: + * tests/Reactor_Timer_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Recursive_Mutex_Test.cpp: + * tests/Reverse_Lock_Test.cpp: + * tests/SOCK_Connector_Test.cpp: + * tests/SOCK_Send_Recv_Test.cpp: + * tests/SOCK_Test.cpp: + * tests/SPIPE_Test.cpp: + * tests/SString_Test.cpp: + * tests/SV_Shared_Memory_Test.cpp: + * tests/Semaphore_Test.cpp: + * tests/Service_Config_Test.cpp: + * tests/Signal_Test.cpp: + * tests/Sigset_Ops_Test.cpp: + * tests/Simple_Message_Block_Test.cpp: + * tests/Svc_Handler_Test.cpp: + * tests/TSS_Test.cpp: + * tests/Task_Test.cpp: + * tests/Thread_Manager_Test.cpp: + * tests/Thread_Mutex_Test.cpp: + * tests/Thread_Pool_Reactor_Test.cpp: + * tests/Thread_Pool_Test.cpp: + * tests/Time_Service_Test.cpp: + * tests/Time_Value_Test.cpp: + * tests/Timeprobe_Test.cpp: + * tests/Timer_Queue_Test.cpp: + * tests/TkReactor_Test.cpp: + * tests/Tokens_Test.cpp: + * tests/UPIPE_SAP_Test.cpp: + * tests/Upgradable_RW_Test.cpp: + * tests/XtReactor_Test.cpp: + * tests/test_config.h: + * websvcs/lib/URL_Addr.cpp: + * websvcs/lib/URL_Addr.h: + * websvcs/lib/URL_Addr.i: + * websvcs/tests/Test_URL_Addr.cpp: + + Made all the appropriate changes to support the new wide char + policy. Most changes were macro changes, changing ASYS_* to + ACE_*, changing char's to ACE_TCHAR's, adding in ACE_TEXT ()'s + when necessary, etc. + Sat Apr 22 18:41:06 2000 Vishal Kachroo <vishal@cs.wustl.edu> * ace/SOCK_Dgram_Mcast.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index c96425dc1ee..a3c9c44b3bc 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,499 @@ +Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu> + + This is my first checkin of my Unicode changes. They should be + mostly harmless, since most platforms and build do not use Unicode + stuff, in which these changes *should* result in the exact same + behavior as before. + + But, if Unicode was being used, then chances are it is not going + to work without a few changes. A summary of the changes are: + + - Standardized wide char support to the following macros: + + ACE_HAS_WCHAR - if not defined, ACE will not use the type wchar_t + or provide any of the functions that use it. + ACE_USES_WCHAR - if defined, ACE will use wchar_t instead of char + for its strings (but not its buffers). + + This support has been mostly completed, but there are still some + loose ends that need to be cleaned up. + + Note also that even if ACE_USES_WCHAR is defined or not, both + wide and narrow versions of the string operations will be + available. + + - Removed all the ASYS_* macros (besides ASYS_INLINE). So all code + using ASYS_TEXT and ASYS_TCHAR should now use ACE_TEXT and + ACE_TCHAR. And unlike their predecessers, these *will* turn into + wide character versions when ACE_USES_WCHAR is defined. + + - Removed the macros ACE_HAS_WCHAR_TYPEDEFS_USHORT and + ACE_HAS_WCHAR_TYPEDEFS_CHAR since ACE will not depend on what + wchar_t defaults to. + + - Messed around with Windows CE support, most likely it broke it + even more. I've halted my work on Windows CE until after this + change, so I'll be fixing it up in upcoming checkins. + + - Since ACE_WString was changed, everything using it will now + not be available when ACE_HAS_WCHAR is not defined. + + The motivation for this change was that the Unicode support was + a mess and was very unintuitive. Since I was given the job of + maintaining it (since I'm doing Windows CE stuff now), I decided + to fix it instead of try to figure out what was currently + happening. A consistent design is much easier to explain and + maintain. + + * ace/ACE.h: + * ace/ACE.i: + * ace/ACE.cpp: + * ace/ARGV.cpp: + + Removed ACE's strecpy since all it did was call ACE_OS's strecpy. + + * ace/ace_wchar.h: (added) + + Moved all the unicode specific stuff here. + + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + + ACE_WString used to use ACE_USHORT16 instead of wchar_t. I + changed it so it does, since it will be more useful and intuitive + this way. + + * ace/Log_Record.cpp: + + We were using ACE_OS::fwrite to print the string. This didn't work + when the string was wchar_t, so this was changed to ACE_OS::fprintf + instead. + + * TODO: + * acconfig.h: + * configure.in: + * ace/ACE.cpp: + * ace/ACE.h: + * ace/ACE.i: + * ace/ARGV.cpp: + * ace/ARGV.h: + * ace/ARGV.i: + * ace/ATM_Addr.cpp: + * ace/ATM_Addr.h: + * ace/ATM_Connector.i: + * ace/ATM_QoS.cpp: + * ace/Acceptor.cpp: + * ace/Acceptor.h: + * ace/Activation_Queue.cpp: + * ace/Addr.cpp: + * ace/Arg_Shifter.cpp: + * ace/Arg_Shifter.h: + * ace/Asynch_Acceptor.cpp: + * ace/Asynch_IO.cpp: + * ace/Based_Pointer_T.cpp: + * ace/Basic_Types.h: + * ace/CORBA_Handler.cpp: + * ace/Cache_Map_Manager_T.cpp: + * ace/Cached_Connect_Strategy_T.cpp: + * ace/Caching_Strategies_T.i: + * ace/Capabilities.cpp: + * ace/Capabilities.h: + * ace/Capabilities.i: + * ace/Configuration.cpp: + * ace/Configuration.h: + * ace/Connector.cpp: + * ace/Connector.h: + * ace/Containers_T.cpp: + * ace/DEV_Addr.cpp: + * ace/DEV_Addr.h: + * ace/DEV_Addr.i: + * ace/DEV_Connector.i: + * ace/DLL.cpp: + * ace/DLL.h: + * ace/Dirent.h: + * ace/Dirent.i: + * ace/Dynamic_Service.cpp: + * ace/Dynamic_Service.h: + * ace/Env_Value_T.h: + * ace/Env_Value_T.i: + * ace/FIFO.cpp: + * ace/FIFO.h: + * ace/FIFO.i: + * ace/FIFO_Recv.cpp: + * ace/FIFO_Recv.h: + * ace/FIFO_Recv_Msg.cpp: + * ace/FIFO_Recv_Msg.h: + * ace/FIFO_Send.cpp: + * ace/FIFO_Send.h: + * ace/FIFO_Send_Msg.cpp: + * ace/FIFO_Send_Msg.h: + * ace/FILE_Addr.cpp: + * ace/FILE_Addr.h: + * ace/FILE_Addr.i: + * ace/FILE_Connector.cpp: + * ace/FILE_Connector.i: + * ace/Filecache.cpp: + * ace/Filecache.h: + * ace/Functor.h: + * ace/Functor.i: + * ace/Future.cpp: + * ace/Get_Opt.cpp: + * ace/Get_Opt.h: + * ace/Handle_Set.cpp: + * ace/Hash_Map_Manager_T.cpp: + * ace/Hash_Map_Manager_T.i: + * ace/High_Res_Timer.cpp: + * ace/High_Res_Timer.h: + * ace/INET_Addr.cpp: + * ace/INET_Addr.h: + * ace/INET_Addr.i: + * ace/IO_SAP.cpp: + * ace/IPC_SAP.cpp: + * ace/LSOCK.cpp: + * ace/LSOCK_CODgram.cpp: + * ace/LSOCK_Connector.cpp: + * ace/LSOCK_Dgram.cpp: + * ace/Local_Name_Space.cpp: + * ace/Local_Name_Space.h: + * ace/Local_Name_Space_T.cpp: + * ace/Local_Name_Space_T.h: + * ace/Local_Tokens.cpp: + * ace/Local_Tokens.h: + * ace/Local_Tokens.i: + * ace/Log_Msg.cpp: + * ace/Log_Msg.h: + * ace/Log_Record.cpp: + * ace/Log_Record.h: + * ace/Log_Record.i: + * ace/MEM_Acceptor.cpp: + * ace/MEM_Acceptor.h: + * ace/MEM_Acceptor.i: + * ace/MEM_Addr.cpp: + * ace/MEM_Addr.h: + * ace/MEM_Addr.i: + * ace/MEM_Connector.cpp: + * ace/MEM_SAP.cpp: + * ace/MEM_SAP.h: + * ace/Malloc.cpp: + * ace/Malloc_T.cpp: + * ace/Malloc_T.h: + * ace/Malloc_T.i: + * ace/Map_Manager.cpp: + * ace/Map_Manager.i: + * ace/Mem_Map.cpp: + * ace/Mem_Map.h: + * ace/Mem_Map.i: + * ace/Memory_Pool.cpp: + * ace/Memory_Pool.h: + * ace/Message_Block.cpp: + * ace/Message_Queue.cpp: + * ace/Message_Queue_T.cpp: + * ace/Module.cpp: + * ace/Module.h: + * ace/Module.i: + * ace/NT_Service.cpp: + * ace/NT_Service.h: + * ace/NT_Service.i: + * ace/Name_Proxy.cpp: + * ace/Name_Request_Reply.cpp: + * ace/Name_Space.cpp: + * ace/Name_Space.h: + * ace/Naming_Context.cpp: + * ace/Naming_Context.h: + * ace/OS.cpp: + * ace/OS.h: + * ace/OS.i: + * ace/Object_Manager.cpp: + * ace/Obstack.cpp: + * ace/Obstack.h: + * ace/POSIX_Asynch_IO.cpp: + * ace/Parse_Node.cpp: + * ace/Parse_Node.h: + * ace/Pipe.cpp: + * ace/Proactor.cpp: + * ace/Process.cpp: + * ace/Process.h: + * ace/Process.i: + * ace/Process_Manager.cpp: + * ace/QoS_Manager.cpp: + * ace/QoS_Session_Factory.cpp: + * ace/QoS_Session_Impl.cpp: + * ace/RB_Tree.cpp: + * ace/RB_Tree.i: + * ace/README: + * ace/Read_Buffer.cpp: + * ace/Registry.cpp: + * ace/Registry.h: + * ace/Registry_Name_Space.cpp: + * ace/Remote_Name_Space.cpp: + * ace/Remote_Name_Space.h: + * ace/Remote_Tokens.cpp: + * ace/Remote_Tokens.h: + * ace/Remote_Tokens.i: + * ace/SOCK.cpp: + * ace/SOCK_Acceptor.cpp: + * ace/SOCK_CODgram.cpp: + * ace/SOCK_Connector.cpp: + * ace/SOCK_Dgram.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/SOCK_Dgram_Bcast.h: + * ace/SOCK_Dgram_Mcast.cpp: + * ace/SOCK_Dgram_Mcast.h: + * ace/SOCK_Dgram_Mcast_QoS.cpp: + * ace/SOCK_Dgram_Mcast_QoS.h: + * ace/SPIPE_Acceptor.cpp: + * ace/SPIPE_Addr.cpp: + * ace/SPIPE_Addr.h: + * ace/SPIPE_Addr.i: + * ace/SPIPE_Connector.cpp: + * ace/SString.cpp: + * ace/SString.h: + * ace/SString.i: + * ace/SV_Message_Queue.cpp: + * ace/SV_Semaphore_Complex.cpp: + * ace/SV_Semaphore_Simple.cpp: + * ace/SV_Shared_Memory.cpp: + * ace/Select_Reactor_Base.cpp: + * ace/Select_Reactor_T.cpp: + * ace/Service_Config.cpp: + * ace/Service_Config.h: + * ace/Service_Config.i: + * ace/Service_Manager.cpp: + * ace/Service_Manager.h: + * ace/Service_Object.cpp: + * ace/Service_Object.h: + * ace/Service_Object.i: + * ace/Service_Repository.cpp: + * ace/Service_Repository.h: + * ace/Service_Types.cpp: + * ace/Service_Types.h: + * ace/Service_Types.i: + * ace/Shared_Memory_MM.cpp: + * ace/Shared_Memory_MM.h: + * ace/Shared_Memory_MM.i: + * ace/Shared_Object.cpp: + * ace/Shared_Object.h: + * ace/Singleton.cpp: + * ace/Stats.cpp: + * ace/Stats.h: + * ace/Stats.i: + * ace/Strategies_T.cpp: + * ace/Strategies_T.i: + * ace/Stream.cpp: + * ace/Stream.h: + * ace/Stream_Modules.cpp: + * ace/Stream_Modules.h: + * ace/Svc_Conf.h: + * ace/Svc_Conf.l: + * ace/Svc_Conf.y: + * ace/Svc_Conf_l.cpp: + * ace/Svc_Conf_y.cpp: + * ace/Svc_Handler.cpp: + * ace/Svc_Handler.h: + * ace/Synch.cpp: + * ace/Synch.h: + * ace/Synch.i: + * ace/Synch_T.cpp: + * ace/Synch_T.h: + * ace/Synch_T.i: + * ace/System_Time.cpp: + * ace/System_Time.h: + * ace/TLI.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.i: + * ace/TP_Reactor.cpp: + * ace/TP_Reactor.i: + * ace/Task_T.cpp: + * ace/Task_T.h: + * ace/Template_Instantiations.cpp: + * ace/Thread_Manager.cpp: + * ace/Time_Request_Reply.cpp: + * ace/Timeprobe_T.cpp: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.cpp: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_Adapters.cpp: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Wheel_T.cpp: + * ace/Token.cpp: + * ace/Token.h: + * ace/Token_Collection.cpp: + * ace/Token_Collection.h: + * ace/Token_Collection.i: + * ace/Token_Invariants.cpp: + * ace/Token_Invariants.h: + * ace/Token_Manager.cpp: + * ace/Token_Manager.h: + * ace/Token_Request_Reply.cpp: + * ace/Token_Request_Reply.h: + * ace/Token_Request_Reply.i: + * ace/Trace.cpp: + * ace/Trace.h: + * ace/UPIPE_Acceptor.cpp: + * ace/UPIPE_Connector.cpp: + * ace/UPIPE_Connector.i: + * ace/WFMO_Reactor.cpp: + * ace/WFMO_Reactor.i: + * ace/WIN32_Asynch_IO.cpp: + * ace/WIN32_Proactor.cpp: + * ace/XTI_ATM_Mcast.i: + * ace/config-WinCE.h: + * ace/config-all.h: + * ace/config-ghs-common.h: + * ace/config-tandem.h: + * ace/config-win32-borland.h: + * ace/config-win32-common.h: + * ace/config-win32-msvc.h: + * ace/config-win32-visualage.h: + * ace/CLASSIX/CLASSIX_CLD_Connector.cpp: + * ace/CLASSIX/CLASSIX_CO_Acceptor.cpp: + * ace/CLASSIX/CLASSIX_Port.cpp: + * ace/CLASSIX/CLASSIX_Port.h: + * ace/CLASSIX/CLASSIX_Select_Reactor.cpp: + * apps/Gateway/Gateway/Options.cpp: + * apps/JAWS/PROTOTYPE/JAWS/JAWS.h: + * bin/envinfo.cpp: + * docs/ACE-guidelines.html: + * docs/tutorials/Chap_3/mm.cpp: + * examples/Connection/blocking/SPIPE-acceptor.cpp: + * examples/Connection/blocking/SPIPE-acceptor.h: + * examples/Connection/blocking/SPIPE-connector.cpp: + * examples/Connection/blocking/SPIPE-connector.h: + * examples/Connection/non_blocking/test_lsock_acceptor.cpp: + * examples/Connection/non_blocking/test_lsock_connector.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-client.cpp: + * examples/IPC_SAP/ATM_SAP/CPP-server.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp: + * examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp: + * examples/IPC_SAP/UPIPE_SAP/ex3.cpp: + * examples/Naming/test_multiple_contexts.cpp: + * examples/Naming/test_non_existent.cpp: + * examples/Naming/test_writers.cpp: + * examples/Reactor/WFMO_Reactor/test_console_input.cpp: + * examples/Reactor/WFMO_Reactor/test_directory_changes.cpp: + * examples/Reactor/WFMO_Reactor/test_handle_close.cpp: + * examples/Reactor/WFMO_Reactor/test_registry_changes.cpp: + * examples/Registry/test_registry_iterator.cpp: + * examples/Service_Configurator/Misc/Timer_Service.cpp: + * examples/Service_Configurator/Misc/Timer_Service.h: + * examples/Service_Configurator/Misc/main.cpp: + * examples/Service_Configurator/Misc/main.dsp: + * examples/Web_Crawler/Options.cpp: + * examples/Web_Crawler/Options.h: + * examples/Web_Crawler/URL_Addr.cpp: + * examples/Web_Crawler/URL_Addr.h: + * netsvcs/clients/Logger/indirect_logging.cpp: + * netsvcs/clients/Naming/Client/main.cpp: + * netsvcs/lib/Logging_Strategy.cpp: + * netsvcs/lib/TS_Clerk_Handler.cpp: + * netsvcs/lib/TS_Clerk_Handler.h: + * performance-tests/Misc/test_naming.cpp: + * performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp: + * performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp: + * performance-tests/TCP/tcp_test.cpp: + * tests/ACE_Init_Test.dsp: + * tests/ARGV_Test.cpp: + * tests/Atomic_Op_Test.cpp: + * tests/Auto_IncDec_Test.cpp: + * tests/Barrier_Test.cpp: + * tests/Basic_Types_Test.cpp: + * tests/Buffer_Stream_Test.cpp: + * tests/CDR_File_Test.cpp: + * tests/CDR_Test.cpp: + * tests/Cache_Map_Manager_Test.cpp: + * tests/Cached_Accept_Conn_Test.cpp: + * tests/Cached_Conn_Test.cpp: + * tests/Capabilities_Test.cpp: + * tests/Collection_Test.cpp: + * tests/Conn_Test.cpp: + * tests/DLL_Test.cpp: + * tests/DLL_Test.h: + * tests/DLList_Test.cpp: + * tests/Dynamic_Priority_Test.cpp: + * tests/Enum_Interfaces_Test.cpp: + * tests/Env_Value_Test.cpp: + * tests/FlReactor_Test.cpp: + * tests/Future_Set_Test.cpp: + * tests/Future_Test.cpp: + * tests/Handle_Set_Test.cpp: + * tests/Hash_Map_Bucket_Iterator_Test.cpp: + * tests/Hash_Map_Manager_Test.cpp: + * tests/High_Res_Timer_Test.cpp: + * tests/IOStream_Test.cpp: + * tests/Lazy_Map_Manager_Test.cpp: + * tests/Log_Msg_Test.cpp: + * tests/MM_Shared_Memory_Test.cpp: + * tests/MT_Reactor_Timer_Test.cpp: + * tests/MT_SOCK_Test.cpp: + * tests/Malloc_Test.cpp: + * tests/Map_Manager_Test.cpp: + * tests/Map_Test.cpp: + * tests/Mem_Map_Test.cpp: + * tests/Message_Block_Test.cpp: + * tests/Message_Queue_Notifications_Test.cpp: + * tests/Message_Queue_Test.cpp: + * tests/Naming_Test.cpp: + * tests/New_Fail_Test.cpp: + * tests/Notify_Performance_Test.cpp: + * tests/Object_Manager_Test.cpp: + * tests/OrdMultiSet_Test.cpp: + * tests/Pipe_Test.cpp: + * tests/Priority_Buffer_Test.cpp: + * tests/Priority_Reactor_Test.cpp: + * tests/Priority_Task_Test.cpp: + * tests/Process_Manager_Test.cpp: + * tests/Process_Mutex_Test.cpp: + * tests/Process_Strategy_Test.cpp: + * tests/Process_Strategy_Test.h: + * tests/RB_Tree_Test.cpp: + * tests/Reactor_Exceptions_Test.cpp: + * tests/Reactor_Notify_Test.cpp: + * tests/Reactor_Performance_Test.cpp: + * tests/Reactor_Timer_Test.cpp: + * tests/Reactors_Test.cpp: + * tests/Reader_Writer_Test.cpp: + * tests/Recursive_Mutex_Test.cpp: + * tests/Reverse_Lock_Test.cpp: + * tests/SOCK_Connector_Test.cpp: + * tests/SOCK_Send_Recv_Test.cpp: + * tests/SOCK_Test.cpp: + * tests/SPIPE_Test.cpp: + * tests/SString_Test.cpp: + * tests/SV_Shared_Memory_Test.cpp: + * tests/Semaphore_Test.cpp: + * tests/Service_Config_Test.cpp: + * tests/Signal_Test.cpp: + * tests/Sigset_Ops_Test.cpp: + * tests/Simple_Message_Block_Test.cpp: + * tests/Svc_Handler_Test.cpp: + * tests/TSS_Test.cpp: + * tests/Task_Test.cpp: + * tests/Thread_Manager_Test.cpp: + * tests/Thread_Mutex_Test.cpp: + * tests/Thread_Pool_Reactor_Test.cpp: + * tests/Thread_Pool_Test.cpp: + * tests/Time_Service_Test.cpp: + * tests/Time_Value_Test.cpp: + * tests/Timeprobe_Test.cpp: + * tests/Timer_Queue_Test.cpp: + * tests/TkReactor_Test.cpp: + * tests/Tokens_Test.cpp: + * tests/UPIPE_SAP_Test.cpp: + * tests/Upgradable_RW_Test.cpp: + * tests/XtReactor_Test.cpp: + * tests/test_config.h: + * websvcs/lib/URL_Addr.cpp: + * websvcs/lib/URL_Addr.h: + * websvcs/lib/URL_Addr.i: + * websvcs/tests/Test_URL_Addr.cpp: + + Made all the appropriate changes to support the new wide char + policy. Most changes were macro changes, changing ASYS_* to + ACE_*, changing char's to ACE_TCHAR's, adding in ACE_TEXT ()'s + when necessary, etc. + Sat Apr 22 18:41:06 2000 Vishal Kachroo <vishal@cs.wustl.edu> * ace/SOCK_Dgram_Mcast.h: diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 0c08e584ba1..981053f0250 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,120 @@ +Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu> + + * TAO/TAO_IDL/ast/ast_module.cpp: + * TAO/TAO_IDL/be/be_exception.cpp: + * TAO/TAO_IDL/be/be_sequence.cpp: + * TAO/TAO_IDL/be/be_structure.cpp: + * TAO/TAO_IDL/be/be_union.cpp: + * TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_ch.cpp: + * TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp: + * TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp: + * TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp: + * TAO/TAO_IDL/util/utl_global.cpp: + * TAO/examples/Load_Balancing_persistent/Identity_Client.cpp: + * TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp: + * TAO/examples/Logging/Logger_i.cpp: + * TAO/examples/Simple/time-date/server.cpp: + * TAO/orbsvcs/IFR_Service/TCF_Loader.cpp: + * TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp: + * TAO/orbsvcs/ImplRepo_Service/Options.cpp: + * TAO/orbsvcs/ImplRepo_Service/Options.h: + * TAO/orbsvcs/ImplRepo_Service/tao_imr.cpp: + * TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp: + * TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h: + * TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp: + * TAO/orbsvcs/Naming_Service/NT_Naming_Service.h: + * TAO/orbsvcs/Naming_Service/Naming_Service.cpp: + * TAO/orbsvcs/Naming_Service/Naming_Service.h: + * TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp: + * TAO/orbsvcs/orbsvcs/AV/RTCP.cpp: + * TAO/orbsvcs/orbsvcs/AV/RTP.cpp: + * TAO/orbsvcs/orbsvcs/AV/TCP.cpp: + * TAO/orbsvcs/orbsvcs/AV/UDP.cpp: + * TAO/orbsvcs/orbsvcs/AV/sfp.cpp: + * TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp: + * TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp: + * TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp: + * TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h: + * TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp: + * TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h: + * TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp: + * TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h: + * TAO/orbsvcs/orbsvcs/Trader/Trader.cpp: + * TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp: + * TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp: + * TAO/tao/Acceptor_Registry.cpp: + * TAO/tao/Any.cpp: + * TAO/tao/Connector_Registry.cpp: + * TAO/tao/DomainS.cpp: + * TAO/tao/Environment.cpp: + * TAO/tao/Exception.cpp: + * TAO/tao/GIOP_Message_Accept_State.cpp: + * TAO/tao/GIOP_Message_Acceptors.cpp: + * TAO/tao/GIOP_Message_Base.cpp: + * TAO/tao/GIOP_Message_Connectors.cpp: + * TAO/tao/GIOP_Message_Lite.cpp: + * TAO/tao/GIOP_Server_Request.cpp: + * TAO/tao/GIOP_Utils.cpp: + * TAO/tao/IIOP_Acceptor.cpp: + * TAO/tao/IIOP_Connect.cpp: + * TAO/tao/IIOP_Connector.cpp: + * TAO/tao/IIOP_Factory.cpp: + * TAO/tao/IIOP_Lite_Factory.cpp: + * TAO/tao/IIOP_Profile.cpp: + * TAO/tao/IIOP_Transport.cpp: + * TAO/tao/Invocation.cpp: + * TAO/tao/Leader_Follower.cpp: + * TAO/tao/Leader_Follower.i: + * TAO/tao/Messaging_Policy_i.cpp: + * TAO/tao/NVList.cpp: + * TAO/tao/ORB.cpp: + * TAO/tao/ORB_Core.cpp: + * TAO/tao/Object.cpp: + * TAO/tao/Operation_Table.cpp: + * TAO/tao/POA.cpp: + * TAO/tao/POAS.cpp: + * TAO/tao/Pluggable.cpp: + * TAO/tao/Pluggable_Messaging.cpp: + * TAO/tao/Pool_Per_Endpoint.cpp: + * TAO/tao/Reactor_Per_Priority.cpp: + * TAO/tao/Reply_Dispatcher.cpp: + * TAO/tao/Request.cpp: + * TAO/tao/SHMIOP_Acceptor.cpp: + * TAO/tao/SHMIOP_Acceptor.h: + * TAO/tao/SHMIOP_Connect.cpp: + * TAO/tao/SHMIOP_Connector.cpp: + * TAO/tao/SHMIOP_Factory.cpp: + * TAO/tao/SHMIOP_Profile.cpp: + * TAO/tao/SHMIOP_Transport.cpp: + * TAO/tao/Stub.cpp: + * TAO/tao/Stub.i: + * TAO/tao/TAO.cpp: + * TAO/tao/Transport_Mux_Strategy.cpp: + * TAO/tao/Typecode.cpp: + * TAO/tao/UIOP_Connector.cpp: + * TAO/tao/UIOP_Factory.cpp: + * TAO/tao/UIOP_Lite_Factory.cpp: + * TAO/tao/UIOP_Profile.cpp: + * TAO/tao/UIOP_Transport.cpp: + * TAO/tao/ValueBase.cpp: + * TAO/tao/Wait_Strategy.cpp: + * TAO/tao/append.cpp: + * TAO/tao/default_client.cpp: + * TAO/tao/default_resource.cpp: + * TAO/tao/default_server.cpp: + * TAO/tao/qt_resource.cpp: + * TAO/tao/skip.cpp: + * TAO/tao/xt_resource.cpp: + * TAO/tests/Smart_Proxies/server.cpp: + * TAO/tests/Smart_Proxies/On_Demand/server.cpp: + + Made the appropriate changes based on the Wide Character support + I did in ACE. Mainly just renaming the ASYS_* macros to their + ACE_* equivalents. + + Unicode support in TAO is pretty iffy right now anyway, so it is + debatable if any of these macros will continue to be used in TAO. + Sat Apr 22 01:31:13 2000 Nanbor Wang <nanbor@cs.wustl.edu> * docs/Options.html: Added a reminder for compiling idl files with diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp index b75dc3ef5cf..f518f628010 100644 --- a/TAO/TAO_IDL/ast/ast_module.cpp +++ b/TAO/TAO_IDL/ast/ast_module.cpp @@ -178,14 +178,14 @@ AST_Module *AST_Module::fe_add_module (AST_Module *t) UTL_String *s = t->file_name (); long lineno = t->line (); ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%s:warning: %s:%d: %s%s"), - ASYS_TEXT (idl_global->prog_name ()), - ASYS_TEXT ((idl_global->read_from_stdin () + ACE_TEXT ("%s:warning: %s:%d: %s%s"), + ACE_TEXT (idl_global->prog_name ()), + ACE_TEXT ((idl_global->read_from_stdin () ? "standard input" : s->get_string ())), lineno, - ASYS_TEXT ("reopening module but platform does not\n"), - ASYS_TEXT ("support namespaces, generated code may not compile\n")), + ACE_TEXT ("reopening module but platform does not\n"), + ACE_TEXT ("support namespaces, generated code may not compile\n")), 0); } #endif /* ACE_HAS_USING_KEYWORD */ diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp index 238144214fd..ebe4f346fa8 100644 --- a/TAO/TAO_IDL/be/be_exception.cpp +++ b/TAO/TAO_IDL/be/be_exception.cpp @@ -105,9 +105,9 @@ be_exception::in_recursion (be_type *node) { delete si; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_exception::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad field node\n")), + ACE_TEXT ("(%N:%l) be_exception::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad field node\n")), 0); } be_type *type = be_type::narrow_from_decl (field->field_type ()); @@ -115,9 +115,9 @@ be_exception::in_recursion (be_type *node) { delete si; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_exception::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad field type\n")), + ACE_TEXT ("(%N:%l) be_exception::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad field type\n")), 0); } if (type->in_recursion (node)) diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index b15f8bf011d..fdb5d38c0fe 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -365,9 +365,9 @@ be_sequence::in_recursion (be_type *node) { // there has to be a parameter ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_sequence::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad parameter node\n")), + ACE_TEXT ("(%N:%l) be_sequence::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad parameter node\n")), 0); } @@ -375,9 +375,9 @@ be_sequence::in_recursion (be_type *node) if (!type) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_sequence::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad base type\n")), + ACE_TEXT ("(%N:%l) be_sequence::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad base type\n")), 0); } diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp index c6674828b11..c71e451048e 100644 --- a/TAO/TAO_IDL/be/be_structure.cpp +++ b/TAO/TAO_IDL/be/be_structure.cpp @@ -753,9 +753,9 @@ be_structure::in_recursion (be_type *node) { delete si; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_structure::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad field type\n")), + ACE_TEXT ("(%N:%l) be_structure::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad field type\n")), 0); } if (type->in_recursion (node)) diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp index 792b309e18d..4f61a1f256e 100644 --- a/TAO/TAO_IDL/be/be_union.cpp +++ b/TAO/TAO_IDL/be/be_union.cpp @@ -812,9 +812,9 @@ be_union::in_recursion (be_type *node) { delete si; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad field node\n")), + ACE_TEXT ("(%N:%l) be_union::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad field node\n")), 0); } be_type *type = be_type::narrow_from_decl (field->field_type ()); @@ -822,9 +822,9 @@ be_union::in_recursion (be_type *node) { delete si; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::") - ASYS_TEXT ("in_recursion - ") - ASYS_TEXT ("bad field type\n")), + ACE_TEXT ("(%N:%l) be_union::") + ACE_TEXT ("in_recursion - ") + ACE_TEXT ("bad field type\n")), 0); } if (type->in_recursion (node)) @@ -851,10 +851,10 @@ be_union::default_value (be_union::DefaultValue &dv) if (this->compute_default_value () == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::") - ASYS_TEXT ("default_value - ") - ASYS_TEXT ("Error computing ") - ASYS_TEXT ("default value\n")), + ACE_TEXT ("(%N:%l) be_union::") + ACE_TEXT ("default_value - ") + ACE_TEXT ("Error computing ") + ACE_TEXT ("default value\n")), -1); } } @@ -921,9 +921,9 @@ be_union::compute_default_value (void) // error for now this->default_value_.computed_ = -1; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::compute_default_value ") - ASYS_TEXT ("- unimplemented discriminant type ") - ASYS_TEXT ("(longlong or ulonglong)\n")), + ACE_TEXT ("(%N:%l) be_union::compute_default_value ") + ACE_TEXT ("- unimplemented discriminant type ") + ACE_TEXT ("(longlong or ulonglong)\n")), -1); ACE_NOTREACHED (break;) case AST_Expression::EV_char: @@ -958,9 +958,9 @@ be_union::compute_default_value (void) // error this->default_value_.computed_ = -1; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::") - ASYS_TEXT ("compute_default_value ") - ASYS_TEXT ("- disc type not an ENUM\n")), + ACE_TEXT ("(%N:%l) be_union::") + ACE_TEXT ("compute_default_value ") + ACE_TEXT ("- disc type not an ENUM\n")), -1); } } @@ -969,8 +969,8 @@ be_union::compute_default_value (void) // error this->default_value_.computed_ = -1; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::compute_default_value ") - ASYS_TEXT ("- Bad discriminant type\n")), + ACE_TEXT ("(%N:%l) be_union::compute_default_value ") + ACE_TEXT ("- Bad discriminant type\n")), -1); ACE_NOTREACHED (break;) } // end of switch @@ -983,8 +983,8 @@ be_union::compute_default_value (void) // error this->default_value_.computed_ = -1; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::compute_default_value ") - ASYS_TEXT ("- default clause is invalid here\n")), + ACE_TEXT ("(%N:%l) be_union::compute_default_value ") + ACE_TEXT ("- default clause is invalid here\n")), -1); } @@ -1067,9 +1067,9 @@ be_union::compute_default_value (void) this->default_value_.computed_ = -1; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_union::") - ASYS_TEXT ("compute_default_value - ") - ASYS_TEXT ("Bad case label value\n")), + ACE_TEXT ("(%N:%l) be_union::") + ACE_TEXT ("compute_default_value - ") + ACE_TEXT ("Bad case label value\n")), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_ch.cpp index 9a02c6cc2f1..abf9f784dda 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_ch.cpp @@ -81,9 +81,9 @@ be_visitor_operation_ami_exception_holder_operation_ch::visit_operation (be_oper if (this->gen_throw_spec (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_operation_ami_exception_holder_operation_ch") - ASYS_TEXT ("::visit_operation - ") - ASYS_TEXT ("Failed to generate throw spec\n")), + ACE_TEXT ("(%N:%l) be_visitor_operation_ami_exception_holder_operation_ch") + ACE_TEXT ("::visit_operation - ") + ACE_TEXT ("Failed to generate throw spec\n")), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp index d951134f72d..248dd22f383 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp @@ -111,9 +111,9 @@ be_visitor_operation_ami_exception_holder_operation_cs::visit_operation (be_oper if (this->gen_throw_spec (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_operation_ami_exception_holder_operation_cs::") - ASYS_TEXT ("::visit_operation - ") - ASYS_TEXT ("Failed to generate throw spec\n")), + ACE_TEXT ("(%N:%l) be_visitor_operation_ami_exception_holder_operation_cs::") + ACE_TEXT ("::visit_operation - ") + ACE_TEXT ("Failed to generate throw spec\n")), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp index 887068f0b52..da1518d0ba2 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp @@ -95,9 +95,9 @@ be_visitor_operation_arglist::visit_operation (be_operation *node) if (this->gen_throw_spec (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_operation_arglist") - ASYS_TEXT ("::visit_operation - ") - ASYS_TEXT ("Failed to generate throw spec\n")), + ACE_TEXT ("(%N:%l) be_visitor_operation_arglist") + ACE_TEXT ("::visit_operation - ") + ACE_TEXT ("Failed to generate throw spec\n")), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index d68b55ddf69..a1e5c35814c 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -279,9 +279,9 @@ be_visitor_typecode_defn::visit_array (be_array *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -312,9 +312,9 @@ be_visitor_typecode_defn::visit_enum (be_enum *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -333,9 +333,9 @@ be_visitor_typecode_defn::visit_enum_val (be_enum_val *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -366,9 +366,9 @@ be_visitor_typecode_defn::visit_exception (be_exception *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -387,9 +387,9 @@ be_visitor_typecode_defn::visit_field (be_field *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -418,9 +418,9 @@ be_visitor_typecode_defn::visit_interface (be_interface *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -457,9 +457,9 @@ be_visitor_typecode_defn::visit_predefined_type (be_predefined_type *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -487,9 +487,9 @@ be_visitor_typecode_defn::visit_sequence (be_sequence *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -519,9 +519,9 @@ be_visitor_typecode_defn::visit_string (be_string *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -552,9 +552,9 @@ be_visitor_typecode_defn::visit_structure (be_structure *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -582,9 +582,9 @@ be_visitor_typecode_defn::visit_typedef (be_typedef *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -615,9 +615,9 @@ be_visitor_typecode_defn::visit_union (be_union *node) break; } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -637,9 +637,9 @@ be_visitor_typecode_defn::visit_union_branch (be_union_branch *node) } ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("visit - bad sub state ") - ASYS_TEXT ("in visitor context\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("visit - bad sub state ") + ACE_TEXT ("in visitor context\n")), -1); } @@ -664,9 +664,9 @@ be_visitor_typecode_defn::gen_typecode (be_array *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (array) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (array) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } *os << this->computed_encap_len_ << ", // encapsulation length" @@ -679,9 +679,9 @@ be_visitor_typecode_defn::gen_typecode (be_array *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn::") - ASYS_TEXT ("gen_typecode - ") - ASYS_TEXT ("gen_encapsulation failed for array\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn::") + ACE_TEXT ("gen_typecode - ") + ACE_TEXT ("gen_encapsulation failed for array\n")), -1); } @@ -714,9 +714,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_array *node) if (bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_encapsulation (array) - ") - ASYS_TEXT ("Failed to get typecode size\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_encapsulation (array) - ") + ACE_TEXT ("Failed to get typecode size\n")), -1); } @@ -817,9 +817,9 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (enum) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (enum) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -836,9 +836,9 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (enum) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (enum) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } @@ -878,9 +878,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_enum *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (enum) - ") - ASYS_TEXT ("cannot generate typecode for members\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (enum) - ") + ACE_TEXT ("cannot generate typecode for members\n")), -1); } @@ -950,9 +950,9 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (exception) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (exception) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -969,9 +969,9 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (exception) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (exception) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } @@ -1010,9 +1010,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_exception *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (exception) - ") - ASYS_TEXT ("cannot generate typecode for members\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (exception) - ") + ACE_TEXT ("cannot generate typecode for members\n")), -1); } @@ -1036,9 +1036,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_field *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (field) - ") - ASYS_TEXT ("failed to generate typecode\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (field) - ") + ACE_TEXT ("failed to generate typecode\n")), -1); } // revert the state to what it was before because we may be dealing with @@ -1098,9 +1098,9 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (interface) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (interface) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -1117,9 +1117,9 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (interface) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (interface) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } *os << be_uidt << "\n"; @@ -1267,9 +1267,9 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (predefined) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (predefined) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect @@ -1286,9 +1286,9 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (predefined objref) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (predefined objref) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } *os << be_uidt << "\n"; @@ -1347,9 +1347,9 @@ be_visitor_typecode_defn::gen_typecode (be_sequence *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (sequence) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (sequence) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -1366,9 +1366,9 @@ be_visitor_typecode_defn::gen_typecode (be_sequence *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (sequence) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (sequence) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } *os << be_uidt << "\n"; @@ -1394,9 +1394,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_sequence *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (sequence) - ") - ASYS_TEXT ("failed to generate typecode\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (sequence) - ") + ACE_TEXT ("failed to generate typecode\n")), -1); } @@ -1495,9 +1495,9 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (struct) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (struct) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -1514,9 +1514,9 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (structure) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (structure) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } *os << be_uidt << "\n"; @@ -1610,9 +1610,9 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (typedef) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (typedef) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -1629,9 +1629,9 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (typedef) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (typedef) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } @@ -1666,9 +1666,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_typedef *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (typedef) - ") - ASYS_TEXT ("failed to generate typecode\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (typedef) - ") + ACE_TEXT ("failed to generate typecode\n")), -1); } return 0; @@ -1724,9 +1724,9 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) - be_visitor_typecode_defn") - ASYS_TEXT ("gen_typecode (union) - ") - ASYS_TEXT ("Failed to get encap length\n")), + ACE_TEXT ("(%N:%l) - be_visitor_typecode_defn") + ACE_TEXT ("gen_typecode (union) - ") + ACE_TEXT ("Failed to get encap length\n")), -1); } // reset the compute queue since we must not affect computation of other @@ -1743,9 +1743,9 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_typecode (union) - ") - ASYS_TEXT ("failed to generate encapsulation\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_typecode (union) - ") + ACE_TEXT ("failed to generate encapsulation\n")), -1); } *os << be_uidt << "\n"; @@ -1979,9 +1979,9 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::gen_encapsulation (union_branch) - ") - ASYS_TEXT ("failed to generate typecode\n") + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::gen_encapsulation (union_branch) - ") + ACE_TEXT ("failed to generate typecode\n") ), -1); } @@ -2004,9 +2004,9 @@ be_visitor_typecode_defn::compute_tc_size (be_array *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (array) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (array) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2039,9 +2039,9 @@ be_visitor_typecode_defn::compute_encap_length (be_array *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (array) - ") - ASYS_TEXT ("cannot compute tc size for base\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (array) - ") + ACE_TEXT ("cannot compute tc size for base\n")), -1); } @@ -2087,9 +2087,9 @@ be_visitor_typecode_defn::compute_tc_size (be_enum *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (enum) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (enum) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2117,9 +2117,9 @@ be_visitor_typecode_defn::compute_encap_length (be_enum *node) if (this->push (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (enum) - ") - ASYS_TEXT ("push failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (enum) - ") + ACE_TEXT ("push failed\n")), -1); } this->computed_scope_encap_len_ = 0; @@ -2129,9 +2129,9 @@ be_visitor_typecode_defn::compute_encap_length (be_enum *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (enum) - ") - ASYS_TEXT ("cannot compute scope tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (enum) - ") + ACE_TEXT ("cannot compute scope tc size\n")), -1); } @@ -2141,9 +2141,9 @@ be_visitor_typecode_defn::compute_encap_length (be_enum *node) if (this->pop (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (enum) - ") - ASYS_TEXT ("pop failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (enum) - ") + ACE_TEXT ("pop failed\n")), -1); } @@ -2194,9 +2194,9 @@ be_visitor_typecode_defn::compute_tc_size (be_exception *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (array) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (array) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; @@ -2222,9 +2222,9 @@ be_visitor_typecode_defn::compute_encap_length (be_exception *node) if (this->push (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (exception) - ") - ASYS_TEXT ("push failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (exception) - ") + ACE_TEXT ("push failed\n")), -1); } this->computed_scope_encap_len_ = 0; @@ -2234,9 +2234,9 @@ be_visitor_typecode_defn::compute_encap_length (be_exception *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (exception) - ") - ASYS_TEXT ("cannot compute scope tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (exception) - ") + ACE_TEXT ("cannot compute scope tc size\n")), -1); } @@ -2246,9 +2246,9 @@ be_visitor_typecode_defn::compute_encap_length (be_exception *node) if (this->pop (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (exception) - ") - ASYS_TEXT ("pop failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (exception) - ") + ACE_TEXT ("pop failed\n")), -1); } @@ -2271,9 +2271,9 @@ be_visitor_typecode_defn::compute_encap_length (be_field *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (array) - ") - ASYS_TEXT ("cannot compute tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (array) - ") + ACE_TEXT ("cannot compute tc size\n")), -1); } @@ -2321,9 +2321,9 @@ be_visitor_typecode_defn::compute_tc_size (be_interface *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (interface) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (interface) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2400,9 +2400,9 @@ be_visitor_typecode_defn::compute_tc_size (be_predefined_type *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (predefined objref) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (predefined objref) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2444,9 +2444,9 @@ be_visitor_typecode_defn::compute_tc_size (be_sequence *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (sequence) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (sequence) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2468,9 +2468,9 @@ be_visitor_typecode_defn::compute_encap_length (be_sequence *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (sequence) - ") - ASYS_TEXT ("cannot compute tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (sequence) - ") + ACE_TEXT ("cannot compute tc size\n")), -1); } @@ -2533,9 +2533,9 @@ be_visitor_typecode_defn::compute_tc_size (be_structure *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (structure) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (structure) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2562,9 +2562,9 @@ be_visitor_typecode_defn::compute_encap_length (be_structure *node) if (this->push (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (struct) - ") - ASYS_TEXT ("push failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (struct) - ") + ACE_TEXT ("push failed\n")), -1); } this->computed_scope_encap_len_ = 0; @@ -2574,9 +2574,9 @@ be_visitor_typecode_defn::compute_encap_length (be_structure *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (structure) - ") - ASYS_TEXT ("cannot compute scope tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (structure) - ") + ACE_TEXT ("cannot compute scope tc size\n")), -1); } @@ -2586,9 +2586,9 @@ be_visitor_typecode_defn::compute_encap_length (be_structure *node) if (this->pop (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (struct) - ") - ASYS_TEXT ("pop failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (struct) - ") + ACE_TEXT ("pop failed\n")), -1); } @@ -2632,9 +2632,9 @@ be_visitor_typecode_defn::compute_tc_size (be_typedef *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (array) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (array) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2663,9 +2663,9 @@ be_visitor_typecode_defn::compute_encap_length (be_typedef *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (typedef) - ") - ASYS_TEXT ("cannot compute tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (typedef) - ") + ACE_TEXT ("cannot compute tc size\n")), -1); } @@ -2710,9 +2710,9 @@ be_visitor_typecode_defn::compute_tc_size (be_union *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_tc_size (union) - ") - ASYS_TEXT ("cannot compute encap len\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_tc_size (union) - ") + ACE_TEXT ("cannot compute encap len\n")), -1); } @@ -2740,9 +2740,9 @@ be_visitor_typecode_defn::compute_encap_length (be_union *node) if (!discrim || discrim->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (union) - ") - ASYS_TEXT ("cannot compute tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (union) - ") + ACE_TEXT ("cannot compute tc size\n")), -1); } @@ -2756,9 +2756,9 @@ be_visitor_typecode_defn::compute_encap_length (be_union *node) if (this->push (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (union) - ") - ASYS_TEXT ("push failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (union) - ") + ACE_TEXT ("push failed\n")), -1); } this->computed_scope_encap_len_ = 0; @@ -2768,9 +2768,9 @@ be_visitor_typecode_defn::compute_encap_length (be_union *node) if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (union) - ") - ASYS_TEXT ("cannot compute scope tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (union) - ") + ACE_TEXT ("cannot compute scope tc size\n")), -1); } @@ -2780,9 +2780,9 @@ be_visitor_typecode_defn::compute_encap_length (be_union *node) if (this->pop (this->computed_scope_encap_len_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (union) - ") - ASYS_TEXT ("pop failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (union) - ") + ACE_TEXT ("pop failed\n")), -1); } @@ -2805,9 +2805,9 @@ be_visitor_typecode_defn::compute_encap_length (be_union_branch *node) if (!bt || bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::compute_encap_len (union branch) - ") - ASYS_TEXT ("cannot compute tc size\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::compute_encap_len (union branch) - ") + ACE_TEXT ("cannot compute tc size\n")), -1); } @@ -3085,8 +3085,8 @@ queue_insert (ACE_Unbounded_Queue <be_visitor_typecode_defn::QNode *> &queue, { delete qnode; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N:%l) be_visitor_typecode_defn") - ASYS_TEXT ("::queue_insert - failed\n")), + ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") + ACE_TEXT ("::queue_insert - failed\n")), 0); } diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 4f7e48c1bc2..670cbabdc3d 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -1309,14 +1309,14 @@ IDL_GlobalData::temp_dir (const char* s) // Allocate memory, 1 for the end of string. ACE_NEW (this->temp_dir_, char [ACE_OS::strlen (s) + - ACE_OS::strlen (ACE_DIRECTORY_SEPARATOR_STR_A) + + ACE_OS::strlen (ACE_DIRECTORY_SEPARATOR_STR) + 1]); // Copy the strings. ACE_OS::sprintf (this->temp_dir_, "%s%s", s, - ACE_DIRECTORY_SEPARATOR_STR_A); + ACE_DIRECTORY_SEPARATOR_STR); } const char* diff --git a/TAO/examples/Load_Balancing_persistent/Identity_Client.cpp b/TAO/examples/Load_Balancing_persistent/Identity_Client.cpp index 30843517ebf..28393e21375 100755 --- a/TAO/examples/Load_Balancing_persistent/Identity_Client.cpp +++ b/TAO/examples/Load_Balancing_persistent/Identity_Client.cpp @@ -114,8 +114,8 @@ Identity_Client::run (CORBA::Environment &ACE_TRY_ENV) if (obj.in () == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l) <ERROR> [Identity_Client::run] \n"), - ASYS_TEXT ("factory_resolve \n")), + ACE_TEXT ("(%N|%l) <ERROR> [Identity_Client::run] \n"), + ACE_TEXT ("factory_resolve \n")), -1); Load_Balancer::Object_Group_Factory_var factory = diff --git a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp index 867098999d4..9cab5f43bf0 100755 --- a/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp +++ b/TAO/examples/Load_Balancing_persistent/Load_Balancer_i.cpp @@ -335,8 +335,8 @@ Object_Group_Factory_i::resolve (const char * id, (void *&)this->rr_groups_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l) The factory does not have any references "), - ASYS_TEXT ("to the group that you have sought \n\n")), + ACE_TEXT ("(%N|%l) The factory does not have any references "), + ACE_TEXT ("to the group that you have sought \n\n")), 0); } } @@ -347,8 +347,8 @@ Object_Group_Factory_i::resolve (const char * id, (void *&)this->random_groups_) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l) The factory does not have any references "), - ASYS_TEXT ("to the group that you have sought \n\n")), + ACE_TEXT ("(%N|%l) The factory does not have any references "), + ACE_TEXT ("to the group that you have sought \n\n")), 0); } diff --git a/TAO/examples/Logging/Logger_i.cpp b/TAO/examples/Logging/Logger_i.cpp index a61897aec58..1456c0626e9 100644 --- a/TAO/examples/Logging/Logger_i.cpp +++ b/TAO/examples/Logging/Logger_i.cpp @@ -150,7 +150,7 @@ Logger_i::logv (const Logger::Log_Record &log_rec, // Create a temporary buffer for manipulating the logging message, // adding additional space for formatting characters.. - ASYS_TCHAR msgbuf [ACE_MAXLOGMSGLEN + 4]; + ACE_TCHAR msgbuf [ACE_MAXLOGMSGLEN + 4]; // Format the message for proper display. ACE_OS::strcpy (msgbuf, "::"); @@ -172,7 +172,7 @@ Logger_i::logv (const Logger::Log_Record &log_rec, addr)); // Create a buffer and fill it with the host name of the logger - ASYS_TCHAR namebuf[MAXHOSTNAMELEN + 1]; + ACE_TCHAR namebuf[MAXHOSTNAMELEN + 1]; ACE_OS::strncpy (namebuf, addy.get_host_addr (), MAXHOSTNAMELEN); diff --git a/TAO/examples/Simple/time-date/server.cpp b/TAO/examples/Simple/time-date/server.cpp index 7a3e23f32a5..64574aad014 100644 --- a/TAO/examples/Simple/time-date/server.cpp +++ b/TAO/examples/Simple/time-date/server.cpp @@ -23,13 +23,13 @@ ACE_RCSID(Misc, main, "$Id$") int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { if (ACE_Service_Config::open (argc, argv) == -1 && errno != ENOENT) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 1); // Run forever, performing the configured services until we diff --git a/TAO/orbsvcs/IFR_Service/TCF_Loader.cpp b/TAO/orbsvcs/IFR_Service/TCF_Loader.cpp index 4e06d9a5fd1..b5110d9e23e 100644 --- a/TAO/orbsvcs/IFR_Service/TCF_Loader.cpp +++ b/TAO/orbsvcs/IFR_Service/TCF_Loader.cpp @@ -61,7 +61,7 @@ TCF_Loader::create_object (CORBA::ORB_ptr orb, #if 0 ACE_STATIC_SVC_DEFINE (TCF_Loader, - ASYS_TEXT ("TAO_Object_Loader"), + ACE_TEXT ("TAO_Object_Loader"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TCF_Loader), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp index ed76d060f38..9ac93426b1c 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp @@ -631,7 +631,7 @@ ImplRepo_i::server_is_running (const char *server, ACE_DEBUG ((LM_DEBUG, " at %s\n", location)); // Get the stringified server_object_ior - ASYS_TCHAR *server_object_ior = this->orb_->object_to_string (server_object, ACE_TRY_ENV); + ACE_TCHAR *server_object_ior = this->orb_->object_to_string (server_object, ACE_TRY_ENV); ACE_CHECK_RETURN (0); if (this->repository_.update (server, location, server_object_ior) == 0) diff --git a/TAO/orbsvcs/ImplRepo_Service/Options.cpp b/TAO/orbsvcs/ImplRepo_Service/Options.cpp index 79ead83aa74..13e7f8fda65 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Options.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Options.cpp @@ -20,7 +20,7 @@ Options::~Options () } int -Options::parse_args (int argc, ASYS_TCHAR *argv[]) +Options::parse_args (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opts (argc, argv, "d:o:p:rt:"); int c; diff --git a/TAO/orbsvcs/ImplRepo_Service/Options.h b/TAO/orbsvcs/ImplRepo_Service/Options.h index 8976ae76983..09733c49eee 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Options.h +++ b/TAO/orbsvcs/ImplRepo_Service/Options.h @@ -40,7 +40,7 @@ public: ~Options(); // dtor - int parse_args (int argc, ASYS_TCHAR *argv[]); + int parse_args (int argc, ACE_TCHAR *argv[]); // Parse the command-line arguments and initialize the options. int debug (void) const; diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr.cpp index 7390c4536bc..84a3f704500 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr.cpp @@ -6,7 +6,7 @@ ACE_RCSID(ImplRepo_Service, tao_imr, "$Id$") int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { TAO_IMR_i tao_imr_i; diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp index ca211a89d84..a97c227b59b 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp @@ -142,23 +142,23 @@ TAO_IMR_i::print_usage (void) // Factory for operations TAO_IMR_Op * -TAO_IMR_Op::make_op (const ASYS_TCHAR *op_name) +TAO_IMR_Op::make_op (const ACE_TCHAR *op_name) { - if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("activate")) == 0) + if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("activate")) == 0) return new TAO_IMR_Op_Activate (); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("add")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("add")) == 0) return new TAO_IMR_Op_Add (); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("autostart")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("autostart")) == 0) return new TAO_IMR_Op_Autostart(); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("ior")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("ior")) == 0) return new TAO_IMR_Op_IOR(); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("list")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("list")) == 0) return new TAO_IMR_Op_List (); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("remove")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("remove")) == 0) return new TAO_IMR_Op_Remove (); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("shutdown")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("shutdown")) == 0) return new TAO_IMR_Op_Shutdown (); - else if (ACE_OS::strcasecmp (op_name, ASYS_TEXT ("update")) == 0) + else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("update")) == 0) return new TAO_IMR_Op_Update (); return 0; @@ -284,7 +284,7 @@ TAO_IMR_Op_Update::~TAO_IMR_Op_Update (void) int -TAO_IMR_Op_Activate::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Activate::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) @@ -313,7 +313,7 @@ TAO_IMR_Op_Activate::parse (int argc, ASYS_TCHAR **argv) } void -TAO_IMR_Op_Add::setenv (ASYS_TCHAR *optarg) +TAO_IMR_Op_Add::setenv (ACE_TCHAR *optarg) { CORBA::ULong length = this->environment_vars_.length (); @@ -329,7 +329,7 @@ TAO_IMR_Op_Add::setenv (ASYS_TCHAR *optarg) } int -TAO_IMR_Op_Add::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Add::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) @@ -382,7 +382,7 @@ TAO_IMR_Op_Add::parse (int argc, ASYS_TCHAR **argv) } int -TAO_IMR_Op_Autostart::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Autostart::parse (int argc, ACE_TCHAR **argv) { // Skip the "autostart" command ACE_Get_Opt get_opts (argc, argv, "h", 0); @@ -403,7 +403,7 @@ TAO_IMR_Op_Autostart::parse (int argc, ASYS_TCHAR **argv) } int -TAO_IMR_Op_IOR::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_IOR::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) @@ -435,7 +435,7 @@ TAO_IMR_Op_IOR::parse (int argc, ASYS_TCHAR **argv) } int -TAO_IMR_Op_List::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_List::parse (int argc, ACE_TCHAR **argv) { int server_flag = 0; @@ -467,7 +467,7 @@ TAO_IMR_Op_List::parse (int argc, ASYS_TCHAR **argv) } int -TAO_IMR_Op_Remove::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Remove::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) @@ -496,7 +496,7 @@ TAO_IMR_Op_Remove::parse (int argc, ASYS_TCHAR **argv) } int -TAO_IMR_Op_Shutdown::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Shutdown::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) @@ -525,7 +525,7 @@ TAO_IMR_Op_Shutdown::parse (int argc, ASYS_TCHAR **argv) } void -TAO_IMR_Op_Update::setenv (ASYS_TCHAR *optarg) +TAO_IMR_Op_Update::setenv (ACE_TCHAR *optarg) { this->set_environment_vars_ = 1; CORBA::ULong length = this->environment_vars_.length (); @@ -541,7 +541,7 @@ TAO_IMR_Op_Update::setenv (ASYS_TCHAR *optarg) } int -TAO_IMR_Op_Update::parse (int argc, ASYS_TCHAR **argv) +TAO_IMR_Op_Update::parse (int argc, ACE_TCHAR **argv) { // Check for enough arguments (we need at least one for the server name) if (argc < 1) diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h index dfb2d31f9c2..551f7257209 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.h @@ -54,7 +54,7 @@ private: int argc_; // # of arguments on the command line. - ASYS_TCHAR **argv_; + ACE_TCHAR **argv_; // arguments from command line. CORBA::ORB_var orb_; @@ -76,7 +76,7 @@ class TAO_IMR_Op // = DESCRIPTION // Provides a base class with virtual methods for each operation strategy. public: - static TAO_IMR_Op *make_op (const ASYS_TCHAR *op_name); + static TAO_IMR_Op *make_op (const ACE_TCHAR *op_name); // Factory. TAO_IMR_Op (void); @@ -88,7 +88,7 @@ public: virtual ~TAO_IMR_Op (void); // Virtual Destructor. - virtual int parse (int argc, ASYS_TCHAR **argv) = 0; + virtual int parse (int argc, ACE_TCHAR **argv) = 0; // Parse arguments. virtual int run (void) = 0; @@ -116,7 +116,7 @@ public: TAO_IMR_Op_Activate (void); ~TAO_IMR_Op_Activate (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -139,11 +139,11 @@ public: TAO_IMR_Op_Add (void); ~TAO_IMR_Op_Add (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: - void setenv (ASYS_TCHAR *optarg); + void setenv (ACE_TCHAR *optarg); // Sets one of the environment variables void print_usage (void); @@ -178,7 +178,7 @@ public: TAO_IMR_Op_Autostart (void); ~TAO_IMR_Op_Autostart (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -199,7 +199,7 @@ public: TAO_IMR_Op_IOR (void); ~TAO_IMR_Op_IOR (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -226,7 +226,7 @@ public: TAO_IMR_Op_List (void); ~TAO_IMR_Op_List (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -256,7 +256,7 @@ public: TAO_IMR_Op_Remove (void); ~TAO_IMR_Op_Remove (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -279,7 +279,7 @@ public: TAO_IMR_Op_Shutdown (void); ~TAO_IMR_Op_Shutdown (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: @@ -303,11 +303,11 @@ public: TAO_IMR_Op_Update (void); ~TAO_IMR_Op_Update (void); - virtual int parse (int argc, ASYS_TCHAR **argv); + virtual int parse (int argc, ACE_TCHAR **argv); virtual int run (void); protected: - void setenv (ASYS_TCHAR *optarg); + void setenv (ACE_TCHAR *optarg); // Sets one environment variable. void print_usage (void); diff --git a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp index afb16d1bae7..05a8a17d0f3 100644 --- a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp +++ b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.cpp @@ -50,7 +50,7 @@ TAO_NT_Naming_Service::handle_exception (ACE_HANDLE) int TAO_NT_Naming_Service::init (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { HKEY hkey = 0; BYTE buf[ACE_DEFAULT_ARGV_BUFSIZ]; diff --git a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.h b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.h index e3e18698e2f..19e7b9ac96e 100644 --- a/TAO/orbsvcs/Naming_Service/NT_Naming_Service.h +++ b/TAO/orbsvcs/Naming_Service/NT_Naming_Service.h @@ -50,7 +50,7 @@ public: // This is a virtual method inherited from ACE_NT_Service. virtual int init (int argc, - ASYS_TCHAR *argv[]); + ACE_TCHAR *argv[]); // Initialize the objects argc_ and argv_ attributes values. private: diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp index 6247e1c484f..7458664a357 100644 --- a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp @@ -105,7 +105,7 @@ TAO_Naming_Service::init (int argc, if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) Unable to initialize the POA.\n")), + ACE_TEXT (" (%P|%t) Unable to initialize the POA.\n")), -1); // Get the POA object. diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.h b/TAO/orbsvcs/Naming_Service/Naming_Service.h index ba081e88648..1ca7fdec243 100644 --- a/TAO/orbsvcs/Naming_Service/Naming_Service.h +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.h @@ -76,7 +76,7 @@ protected: // created under the given context will use the same size for their // initial hash table allocations. - LPCTSTR persistence_file_name_; + const ACE_TCHAR *persistence_file_name_; // Path to the file to be used to store/read in Naming Service // persistent state. diff --git a/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp b/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp index d11833a9654..d834271aa29 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/RTCP.cpp @@ -933,7 +933,7 @@ TAO_AV_RTCP_Callback::demux (TAO_AV_RTP::rtphdr* rh, ACE_FACTORY_DEFINE (AV, TAO_AV_RTCP_Flow_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_RTCP_Flow_Factory, - ASYS_TEXT ("RTCP_Flow_Factory"), + ACE_TEXT ("RTCP_Flow_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_RTCP_Flow_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp index 07eec55627c..8f2c27bcc84 100644 --- a/TAO/orbsvcs/orbsvcs/AV/RTP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/RTP.cpp @@ -338,7 +338,7 @@ TAO_AV_RTP_Flow_Factory::control_flow_factory (void) ACE_FACTORY_DEFINE (AV, TAO_AV_RTP_Flow_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_RTP_Flow_Factory, - ASYS_TEXT ("RTP_Flow_Factory"), + ACE_TEXT ("RTP_Flow_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_RTP_Flow_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/orbsvcs/orbsvcs/AV/TCP.cpp b/TAO/orbsvcs/orbsvcs/AV/TCP.cpp index 36d994ddca5..14cfb5ce261 100644 --- a/TAO/orbsvcs/orbsvcs/AV/TCP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/TCP.cpp @@ -614,8 +614,8 @@ TAO_AV_TCP_Flow_Handler::open (void * /*arg*/) (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; } @@ -658,7 +658,7 @@ template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<TAO_AV_TCP_Flo #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ ACE_STATIC_SVC_DEFINE (TAO_AV_TCP_Flow_Factory, - ASYS_TEXT ("TCP_Flow_Factory"), + ACE_TEXT ("TCP_Flow_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_TCP_Flow_Factory), ACE_Service_Type::DELETE_THIS | @@ -668,7 +668,7 @@ ACE_STATIC_SVC_DEFINE (TAO_AV_TCP_Flow_Factory, ACE_FACTORY_DEFINE (AV, TAO_AV_TCP_Flow_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_TCP_Factory, - ASYS_TEXT ("TCP_Factory"), + ACE_TEXT ("TCP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_TCP_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/orbsvcs/orbsvcs/AV/UDP.cpp b/TAO/orbsvcs/orbsvcs/AV/UDP.cpp index 1d9674e05f3..254d5488049 100644 --- a/TAO/orbsvcs/orbsvcs/AV/UDP.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/UDP.cpp @@ -715,7 +715,7 @@ TAO_AV_UDP_Flow_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, ACE_FACTORY_DEFINE (AV, TAO_AV_UDP_Flow_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_UDP_Flow_Factory, - ASYS_TEXT ("UDP_Flow_Factory"), + ACE_TEXT ("UDP_Flow_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_UDP_Flow_Factory), ACE_Service_Type::DELETE_THIS | @@ -725,7 +725,7 @@ ACE_STATIC_SVC_DEFINE (TAO_AV_UDP_Flow_Factory, ACE_FACTORY_DEFINE (AV, TAO_AV_UDP_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_UDP_Factory, - ASYS_TEXT ("UDP_Factory"), + ACE_TEXT ("UDP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_UDP_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp index f4f1afe8823..819994530db 100644 --- a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp @@ -1364,7 +1364,7 @@ template class ACE_Singleton<TAO_SFP_Base, ACE_SYNCH_MUTEX>; ACE_FACTORY_DEFINE (AV, TAO_AV_SFP_Factory) ACE_STATIC_SVC_DEFINE (TAO_AV_SFP_Factory, - ASYS_TEXT ("SFP_Factory"), + ACE_TEXT ("SFP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_AV_SFP_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp index 32b3299ebd1..c48b8bfa718 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp @@ -932,7 +932,7 @@ TAO_CEC_Default_Factory::destroy_supplier_control (TAO_CEC_SupplierControl* x) // **************************************************************** ACE_STATIC_SVC_DEFINE (TAO_CEC_Default_Factory, - ASYS_TEXT ("CEC_Factory"), + ACE_TEXT ("CEC_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_CEC_Default_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index 46855acecfb..9e011f9c69a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -987,7 +987,7 @@ TAO_EC_Default_Factory::destroy_supplier_control (TAO_EC_SupplierControl* x) // **************************************************************** ACE_STATIC_SVC_DEFINE (TAO_EC_Default_Factory, - ASYS_TEXT ("EC_Factory"), + ACE_TEXT ("EC_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_EC_Default_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp index a5a1006f2bc..153e445f03b 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp @@ -1043,7 +1043,7 @@ TAO_ECG_UDP_EH::get_handle (void) const // **************************************************************** TAO_ECG_Mcast_EH::TAO_ECG_Mcast_EH (TAO_ECG_UDP_Receiver *recv, - const ASYS_TCHAR *net_if) + const ACE_TCHAR *net_if) : net_if_ (net_if?ACE_OS::strdup (net_if):0), receiver_ (recv), observer_ (this) diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h index 6379b6c7073..83ad6bfdf7e 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h @@ -563,7 +563,7 @@ class TAO_RTEvent_Export TAO_ECG_Mcast_EH : public ACE_Event_Handler // public: TAO_ECG_Mcast_EH (TAO_ECG_UDP_Receiver *recv, - const ASYS_TCHAR *net_if = 0); + const ACE_TCHAR *net_if = 0); // Constructor, the messages received by this EH are forwarded to // the <recv>. // It is possible to select the NIC where the multicast messages are @@ -640,7 +640,7 @@ private: // Control the multicast group subscriptions private: - ASYS_TCHAR *net_if_; + ACE_TCHAR *net_if_; // The NIC name used to subscribe for multicast traffic. ACE_SOCK_Dgram_Mcast dgram_; diff --git a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp index e3d8ff178e9..05d10d5d8b0 100644 --- a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp +++ b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp @@ -28,8 +28,8 @@ TAO_IOR_Multicast::TAO_IOR_Multicast (const char *ior, mcast_addr, service_id) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("TAO_IOR_Multicast"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("TAO_IOR_Multicast"))); } // destructor diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp index 480fc2d7db0..48a6bd997a2 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp @@ -23,7 +23,7 @@ TAO_Naming_Server::TAO_Naming_Server (CORBA::ORB_ptr orb, size_t context_size, ACE_Time_Value *timeout, int resolve_for_existing_naming_service, - LPCTSTR persistence_location) + const ACE_TCHAR *persistence_location) : naming_context_ (), ior_multicast_ (0), naming_service_ior_ (), @@ -47,7 +47,7 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, size_t context_size, ACE_Time_Value *timeout, int resolve_for_existing_naming_service, - LPCTSTR persistence_location) + const ACE_TCHAR *persistence_location) { if (resolve_for_existing_naming_service) { @@ -107,7 +107,7 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, int TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, - LPCTSTR persistence_location, + const ACE_TCHAR *persistence_location, size_t context_size) { ACE_DECLARE_NEW_CORBA_ENV; diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h index bbcd6df6a03..4a320073e04 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h @@ -67,7 +67,7 @@ public: size_t context_size = ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout = 0, int resolve_for_existing_naming_service = 1, - LPCTSTR persistence_location = 0); + const ACE_TCHAR *persistence_location = 0); // Constructor. Attempts to find an existing Naming Service if // <resolve_for_existing_naming_service> is set to true. If it is // false, or no Naming Service was found during a <timeout> period, @@ -83,7 +83,7 @@ public: size_t context_size = ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout = 0, int resolve_for_existing_naming_service = 1, - LPCTSTR persistence_location = 0); + const ACE_TCHAR *persistence_location = 0); // Initializer. Attempts to find an existing Naming Service if // <resolve_for_existing_naming_service> is set to true. If it is // false, or no Naming Service was found during a <timeout> period, @@ -106,7 +106,7 @@ public: protected: int init_new_naming (CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa, - LPCTSTR persistence_location, + const ACE_TCHAR *persistence_location, size_t context_size); // Helper method: create Naming Service locally. // Make the root context of size diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp index 2be2d61a2ad..493aeb19018 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.cpp @@ -145,7 +145,7 @@ TAO_Persistent_Context_Index::orb (void) } int -TAO_Persistent_Context_Index::open (LPCTSTR file_name, +TAO_Persistent_Context_Index::open (const ACE_TCHAR *file_name, void *base_address) { this->base_address_ = base_address; diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h index 325d4920116..f6b23ac9ee9 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h @@ -61,7 +61,7 @@ public: PortableServer::POA_ptr poa); // Constructor. - int open (LPCTSTR file_name, + int open (const ACE_TCHAR *file_name, void * base_address = ACE_DEFAULT_BASE_ADDR); // Create ACE_Allocator, open/create memory-mapped file with the // specified file name/base address. Find or allocate <index_>. @@ -131,7 +131,7 @@ private: // Hash map where we keep entries for all Persistent Naming // Contexts. - LPCTSTR index_file_; + const ACE_TCHAR *index_file_; // Name of the memory-mapped file used by <allocator_>. void *base_address_; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp index cb022af60f2..bff5f5c7d2e 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader.cpp @@ -835,13 +835,6 @@ template class TAO_Register<ACE_Null_Mutex, ACE_Null_Mutex>; template class TAO_Admin<ACE_Null_Mutex, ACE_Null_Mutex>; template class TAO_Link<ACE_Null_Mutex, ACE_Null_Mutex>; template class TAO_Proxy<ACE_Null_Mutex, ACE_Null_Mutex>; -# if defined (ACE_HAS_MOSTLY_UNICODE_APIS) - // These aren't needed unless ACE_HAS_MOSTLY_UNICODE_APIS. - // Otherwise, they're in ace/ARGV.cpp. - template class ACE_Node<char*>; - template class ACE_Unbounded_Queue<char*>; - template class ACE_Unbounded_Queue_Iterator<char*>; -#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ template class ACE_Node<CosTrading::Admin::OctetSeq *>; template class ACE_Unbounded_Queue<CosTrading::Admin::OctetSeq *>; template class ACE_Unbounded_Queue_Iterator<CosTrading::Admin::OctetSeq *>; @@ -923,13 +916,6 @@ template class ACE_Hash_Map_Iterator_Base_Ex<TAO_String_Hash_Key, TAO_Offer_Data #pragma instantiate TAO_Admin<ACE_Null_Mutex, ACE_Null_Mutex> #pragma instantiate TAO_Link<ACE_Null_Mutex, ACE_Null_Mutex> #pragma instantiate TAO_Proxy<ACE_Null_Mutex, ACE_Null_Mutex> -# if defined (ACE_HAS_MOSTLY_UNICODE_APIS) - // These aren't needed unless ACE_HAS_MOSTLY_UNICODE_APIS. - // Otherwise, they're in ace/ARGV.cpp. -# pragma instantiate ACE_Node<char*> -# pragma instantiate ACE_Unbounded_Queue<char*> -# pragma instantiate ACE_Unbounded_Queue_Iterator<char*> -# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ #pragma instantiate ACE_Node<CosTrading::Admin::OctetSeq *> #pragma instantiate ACE_Unbounded_Queue<CosTrading::Admin::OctetSeq *> #pragma instantiate ACE_Unbounded_Queue_Iterator<CosTrading::Admin::OctetSeq *> diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index 384d345795a..cd7d723c31c 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -1291,7 +1291,7 @@ TAO_Admin (TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader) // Ok, then, Carlos, we'll do it a different way: ip addr + pid. ACE_UINT32 ip_addr = 0; - ASYS_TCHAR host_name[BUFSIZ]; + ACE_TCHAR host_name[BUFSIZ]; if (ACE_OS::hostname (host_name, BUFSIZ) != -1) diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp index 352c638739f..6665a6addbe 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp @@ -198,8 +198,8 @@ Server::activate_high_servant (void) 0, this->high_priority_) == -1) ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) task activation at priority %d ") - ASYS_TEXT (" failed, exiting!\n%a"), + ACE_TEXT ("(%P|%t) task activation at priority %d ") + ACE_TEXT (" failed, exiting!\n%a"), this->high_priority_, -1)); @@ -288,8 +288,8 @@ Server::activate_low_servants (void) 0, this->low_priority_) == -1) ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) task activation at priority %d ") - ASYS_TEXT (" failed, exiting!\n%a"), + ACE_TEXT ("(%P|%t) task activation at priority %d ") + ACE_TEXT (" failed, exiting!\n%a"), this->low_priority_, -1)); diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index 16d40afa807..b2054de9db2 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -141,8 +141,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Invalid endpoint specification: ") - ASYS_TEXT ("<%s>.\n"), + ACE_TEXT ("(%P|%t) Invalid endpoint specification: ") + ACE_TEXT ("<%s>.\n"), iop.c_str ())); ACE_THROW_RETURN (CORBA::BAD_PARAM ( @@ -261,8 +261,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) unable to open acceptor ") - ASYS_TEXT ("for <%s>%p\n"), + ACE_TEXT ("TAO (%P|%t) unable to open acceptor ") + ACE_TEXT ("for <%s>%p\n"), iop.c_str (),"")); ACE_THROW_RETURN (CORBA::BAD_PARAM ( @@ -280,8 +280,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) unable to create ") - ASYS_TEXT ("an acceptor for <%s>.\n"), + ACE_TEXT ("TAO (%P|%t) unable to create ") + ACE_TEXT ("an acceptor for <%s>.\n"), iop.c_str ())); ACE_THROW_RETURN (CORBA::NO_MEMORY ( @@ -300,8 +300,8 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, if (found == 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) no usable transport protocol ") - ASYS_TEXT ("was found.\n"))); + ACE_TEXT ("TAO (%P|%t) no usable transport protocol ") + ACE_TEXT ("was found.\n"))); ACE_THROW_RETURN (CORBA::BAD_PARAM ( CORBA_SystemException::_tao_minor_code ( @@ -361,10 +361,10 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core, if (TAO_debug_level > 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) No default endpoints ") - ASYS_TEXT ("opened.\n") - ASYS_TEXT ("Please specify one or more using ") - ASYS_TEXT ("the \"-ORBEndpoint\" option.\n"))); + ACE_TEXT ("TAO (%P|%t) No default endpoints ") + ACE_TEXT ("opened.\n") + ACE_TEXT ("Please specify one or more using ") + ACE_TEXT ("the \"-ORBEndpoint\" option.\n"))); } return -1; @@ -391,8 +391,8 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) unable to create ") - ASYS_TEXT ("an acceptor for <%s>\n"), + ACE_TEXT ("TAO (%P|%t) unable to create ") + ACE_TEXT ("an acceptor for <%s>\n"), (*factory)->protocol_name ().c_str ())); return -1; @@ -405,8 +405,8 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core, if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) unable to open ") - ASYS_TEXT ("default acceptor for <%s>%p\n"), + ACE_TEXT ("TAO (%P|%t) unable to open ") + ACE_TEXT ("default acceptor for <%s>%p\n"), (*factory)->protocol_name ().c_str (), "")); return -1; diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 91d8d2aefb7..2905725154b 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -586,7 +586,7 @@ CORBA_Any::operator<<= (const CORBA_Exception &exception) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Exception insertion\n"))); + ACE_TEXT ("Exception in CORBA::Exception insertion\n"))); } ACE_ENDTRY; ACE_CHECK; @@ -751,7 +751,7 @@ CORBA_Any::operator>>= (CORBA::Short &s) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Short extraction\n"))); + ACE_TEXT ("Exception in CORBA::Short extraction\n"))); } ACE_ENDTRY; @@ -780,7 +780,7 @@ CORBA_Any::operator>>= (CORBA::UShort &s) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::UShort extraction\n"))); + ACE_TEXT ("Exception in CORBA::UShort extraction\n"))); } ACE_ENDTRY; @@ -809,7 +809,7 @@ CORBA_Any::operator>>= (CORBA::Long &l) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Long extraction\n"))); + ACE_TEXT ("Exception in CORBA::Long extraction\n"))); } ACE_ENDTRY; @@ -838,7 +838,7 @@ CORBA_Any::operator>>= (CORBA::ULong &l) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::ULong extraction\n"))); + ACE_TEXT ("Exception in CORBA::ULong extraction\n"))); } ACE_ENDTRY; @@ -867,7 +867,7 @@ CORBA_Any::operator>>= (CORBA::LongLong &l) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::LongLong extraction\n"))); + ACE_TEXT ("Exception in CORBA::LongLong extraction\n"))); } ACE_ENDTRY; @@ -908,7 +908,7 @@ CORBA_Any::operator>>= (CORBA::ULongLong &l) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::ULongLong extraction\n"))); + ACE_TEXT ("Exception in CORBA::ULongLong extraction\n"))); } ACE_ENDTRY; @@ -937,7 +937,7 @@ CORBA_Any::operator>>= (CORBA::Float &f) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Float extraction\n"))); + ACE_TEXT ("Exception in CORBA::Float extraction\n"))); } ACE_ENDTRY; @@ -966,7 +966,7 @@ CORBA_Any::operator>>= (CORBA::Double &d) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Double extraction\n"))); + ACE_TEXT ("Exception in CORBA::Double extraction\n"))); } ACE_ENDTRY; @@ -995,7 +995,7 @@ CORBA_Any::operator>>= (CORBA::LongDouble &ld) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::LongDouble extraction\n"))); + ACE_TEXT ("Exception in CORBA::LongDouble extraction\n"))); } ACE_ENDTRY; @@ -1028,7 +1028,7 @@ CORBA_Any::operator>>= (CORBA::Any &a) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Any extraction\n"))); + ACE_TEXT ("Exception in CORBA::Any extraction\n"))); } ACE_ENDTRY; @@ -1081,7 +1081,7 @@ CORBA_Any::operator>>= (const CORBA::Any *&a) const if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Any extraction\n"))); + ACE_TEXT ("Exception in CORBA::Any extraction\n"))); } } ACE_ENDTRY; @@ -1193,7 +1193,7 @@ CORBA_Any::operator>>= (const CORBA::WChar *&s) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in unbounded wstring extraction\n"))); + ACE_TEXT ("Exception in unbounded wstring extraction\n"))); } ACE_ENDTRY; @@ -1247,7 +1247,7 @@ CORBA_Any::operator>>= (CORBA::TypeCode_ptr &tc) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::TypeCode_ptr extraction\n"))); + ACE_TEXT ("Exception in CORBA::TypeCode_ptr extraction\n"))); } ACE_ENDTRY; @@ -1278,7 +1278,7 @@ CORBA_Any::operator>>= (to_boolean b) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Boolean extraction\n"))); + ACE_TEXT ("Exception in CORBA::Boolean extraction\n"))); } ACE_ENDTRY; @@ -1307,7 +1307,7 @@ CORBA_Any::operator>>= (to_octet o) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Octet extraction\n"))); + ACE_TEXT ("Exception in CORBA::Octet extraction\n"))); } ACE_ENDTRY; @@ -1336,7 +1336,7 @@ CORBA_Any::operator>>= (to_char c) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Char extraction\n"))); + ACE_TEXT ("Exception in CORBA::Char extraction\n"))); } ACE_ENDTRY; @@ -1365,7 +1365,7 @@ CORBA_Any::operator>>= (to_wchar wc) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::WChar extraction\n"))); + ACE_TEXT ("Exception in CORBA::WChar extraction\n"))); } ACE_ENDTRY; @@ -1427,7 +1427,7 @@ CORBA_Any::operator>>= (to_string s) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in bounded string extraction\n"))); + ACE_TEXT ("Exception in bounded string extraction\n"))); } ACE_ENDTRY; @@ -1489,7 +1489,7 @@ CORBA_Any::operator>>= (to_wstring ws) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in bounded wstring extraction\n"))); + ACE_TEXT ("Exception in bounded wstring extraction\n"))); } ACE_ENDTRY; @@ -1554,7 +1554,7 @@ CORBA_Any::operator>>= (to_object obj) const ACE_CATCHANY { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Object_ptr extraction\n"))); + ACE_TEXT ("Exception in CORBA::Object_ptr extraction\n"))); } ACE_ENDTRY; diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp index fa2fe123497..8d310d40479 100644 --- a/TAO/tao/Connector_Registry.cpp +++ b/TAO/tao/Connector_Registry.cpp @@ -78,8 +78,8 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core) delete connector; ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) unable to open connector for ") - ASYS_TEXT ("<%s>.\n"), + ACE_TEXT ("TAO (%P|%t) unable to open connector for ") + ACE_TEXT ("<%s>.\n"), (*factory)->protocol_name ().c_str ()), -1); } @@ -125,7 +125,7 @@ TAO_Connector_Registry::preconnect (TAO_ORB_Core *orb_core, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to preprocess the preconnections.\n"))); + ACE_TEXT ("TAO (%P|%t) Unable to preprocess the preconnections.\n"))); return -1; } @@ -340,7 +340,7 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) unknown profile tag %d\n"), + ACE_TEXT ("TAO (%P|%t) unknown profile tag %d\n"), tag)); } diff --git a/TAO/tao/DomainS.cpp b/TAO/tao/DomainS.cpp index 47d429ee1fd..d3551ce9509 100644 --- a/TAO/tao/DomainS.cpp +++ b/TAO/tao/DomainS.cpp @@ -208,7 +208,7 @@ void POA_CORBA::DomainManager::_dispatch (CORBA::ServerRequest &req, void *conte // find the skeleton corresponding to this opname if (this->_find (opname, skel, req.operation_length ()) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -470,7 +470,7 @@ void POA_CORBA::ConstructionPolicy::_dispatch (CORBA::ServerRequest &req, void * // find the skeleton corresponding to this opname if (this->_find (opname, skel, req.operation_length ()) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index a51befe971c..25268af3f3b 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -219,7 +219,7 @@ CORBA::Environment::print_exception (const char *info, const char *id = this->exception_->_id (); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) EXCEPTION, %s\n"), + ACE_TEXT ("TAO: (%P|%t) EXCEPTION, %s\n"), info)); CORBA::SystemException *x2 = @@ -232,12 +232,12 @@ CORBA::Environment::print_exception (const char *info, // held within it ... ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) user exception, ID '%s'\n"), + ACE_TEXT ("TAO: (%P|%t) user exception, ID '%s'\n"), id)); } else ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) no exception, %s\n"), info)); + ACE_TEXT ("TAO: (%P|%t) no exception, %s\n"), info)); } CORBA_Environment_var & diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index 6e88015cd3a..a6d6fd2528d 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -101,8 +101,8 @@ CORBA_Exception::_tao_print_exception (const char *user_provided_info, FILE *) const { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) EXCEPTION, %s\n") - ASYS_TEXT ("%s\n"), + ACE_TEXT ("(%P|%t) EXCEPTION, %s\n") + ACE_TEXT ("%s\n"), user_provided_info, this->_info ().c_str ())); } @@ -372,7 +372,7 @@ void CORBA_SystemException::_tao_print_system_exception (FILE *) const { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) system exception, ID '%s'\n"), + ACE_TEXT ("(%P|%t) system exception, ID '%s'\n"), this->_info ().c_str ())); } diff --git a/TAO/tao/GIOP_Message_Accept_State.cpp b/TAO/tao/GIOP_Message_Accept_State.cpp index 88998585b0e..51070ff62e5 100644 --- a/TAO/tao/GIOP_Message_Accept_State.cpp +++ b/TAO/tao/GIOP_Message_Accept_State.cpp @@ -367,8 +367,8 @@ write_locate_reply_mesg (TAO_OutputCDR &output, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) write_locate_reply_mesg-") - ASYS_TEXT (" cannot marshal object reference\n"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) write_locate_reply_mesg-") + ACE_TEXT (" cannot marshal object reference\n"))); } } @@ -531,7 +531,7 @@ TAO_GIOP_Message_Accept_State_12:: // Store it in the Locate request classes request.request_id (req_id); - // Read the discriminant of the union. + // Read the discriminant of the union. CORBA::Short disc = 0; hdr_status = hdr_status && msg.read_short (disc); @@ -698,8 +698,8 @@ write_locate_reply_mesg (TAO_OutputCDR & output, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) write_locate_reply_mesg-") - ASYS_TEXT (" cannot marshal object reference\n"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) write_locate_reply_mesg-") + ACE_TEXT (" cannot marshal object reference\n"))); } } break; diff --git a/TAO/tao/GIOP_Message_Acceptors.cpp b/TAO/tao/GIOP_Message_Acceptors.cpp index ec2e34c6e5b..7ea79b8566b 100644 --- a/TAO/tao/GIOP_Message_Acceptors.cpp +++ b/TAO/tao/GIOP_Message_Acceptors.cpp @@ -43,7 +43,7 @@ TAO_GIOP_Message_Acceptors:: default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Illegal message received by server\n"))); + ACE_TEXT ("TAO (%P|%t) Illegal message received by server\n"))); return this->send_error (transport); } @@ -212,8 +212,8 @@ TAO_GIOP_Message_Acceptors:: { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), - ASYS_TEXT ("process_connector_request ()"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), + ACE_TEXT ("process_connector_request ()"))); ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO: "); } @@ -228,8 +228,8 @@ TAO_GIOP_Message_Acceptors:: // down, since it really isn't the client's fault. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) exception thrown ") - ASYS_TEXT ("but client is not waiting a response\n"))); + ACE_TEXT ("(%P|%t) exception thrown ") + ACE_TEXT ("but client is not waiting a response\n"))); ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO: "); } @@ -262,8 +262,8 @@ TAO_GIOP_Message_Acceptors:: { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), - ASYS_TEXT ("process_connector_request ()"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), + ACE_TEXT ("process_connector_request ()"))); ACE_PRINT_EXCEPTION (exception, "TAO: "); } } @@ -275,8 +275,8 @@ TAO_GIOP_Message_Acceptors:: // However, in this case, we cannot close the connection // down, since it really isn't the client's fault. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t|%N|%l) exception thrown ") - ASYS_TEXT ("but client is not waiting a response\n"))); + ACE_TEXT ("(%P|%t|%N|%l) exception thrown ") + ACE_TEXT ("but client is not waiting a response\n"))); } return result; @@ -301,8 +301,8 @@ TAO_GIOP_Message_Acceptors:: // No exception but some kind of error, yet a response // is required. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send reply\n"), - ASYS_TEXT ("TAO_GIOP::process_server_message"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send reply\n"), + ACE_TEXT ("TAO_GIOP::process_server_message"))); } } } @@ -359,7 +359,7 @@ TAO_GIOP_Message_Acceptors:: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Simple Object key %s. Doing the Table Lookup ...\n"), + ACE_TEXT ("Simple Object key %s. Doing the Table Lookup ...\n"), object_id.c_str ())); CORBA::Object_ptr object_reference; @@ -431,7 +431,7 @@ TAO_GIOP_Message_Acceptors:: status_info.status = TAO_GIOP_OBJECT_HERE; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t) handle_locate() : found\n"))); + ACE_TEXT ("TAO: (%P|%t) handle_locate() : found\n"))); } else if (server_request.exception_type () != TAO_GIOP_NO_EXCEPTION) { @@ -440,14 +440,14 @@ TAO_GIOP_Message_Acceptors:: { status_info.status = TAO_GIOP_OBJECT_FORWARD; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: forwarding\n"))); + ACE_TEXT ("handle_locate has been called: forwarding\n"))); } else { // Normal exception, so the object is not here status_info.status = TAO_GIOP_UNKNOWN_OBJECT; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: not here\n"))); + ACE_TEXT ("handle_locate has been called: not here\n"))); } } } @@ -459,7 +459,7 @@ TAO_GIOP_Message_Acceptors:: status_info.forward_location_var = forward_request.forward_reference; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: forwarding\n"))); + ACE_TEXT ("handle_locate has been called: forwarding\n"))); } #endif /* TAO_HAS_MINIMUM_CORBA */ ACE_CATCHANY @@ -468,8 +468,8 @@ TAO_GIOP_Message_Acceptors:: status_info.status = TAO_GIOP_UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") - ASYS_TEXT ("CORBA exception raised\n"))); + ACE_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") + ACE_TEXT ("CORBA exception raised\n"))); } #if defined (TAO_HAS_EXCEPTIONS) ACE_CATCHALL @@ -478,8 +478,8 @@ TAO_GIOP_Message_Acceptors:: status_info.status = TAO_GIOP_UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") - ASYS_TEXT ("C++ exception raised\n"))); + ACE_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") + ACE_TEXT ("C++ exception raised\n"))); } #endif /* TAO_HAS_EXCEPTIONS */ ACE_ENDTRY; @@ -564,9 +564,9 @@ TAO_GIOP_Message_Acceptors:: // Close the handle. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t|%N|%l) cannot marshal exception, handle = %d: %p\n"), + ACE_TEXT ("(%P|%t|%N|%l) cannot marshal exception, handle = %d: %p\n"), transport->handle (), - ASYS_TEXT ("send_reply_exception ()"))); + ACE_TEXT ("send_reply_exception ()"))); return -1; } ACE_ENDTRY; @@ -603,7 +603,7 @@ TAO_GIOP_Message_Acceptors:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) bad version <%d.%d>\n"), + ACE_TEXT ("TAO (%P|%t|%N|%l) bad version <%d.%d>\n"), incoming_major, incoming_minor)); return -1; } @@ -647,8 +647,8 @@ TAO_GIOP_Message_Acceptors:: if (TAO_debug_level > 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) %p: cannot send reply\n"), - ASYS_TEXT ("TAO_GIOP::process_server_message"))); + ACE_TEXT ("TAO: (%P|%t) %p: cannot send reply\n"), + ACE_TEXT ("TAO_GIOP::process_server_message"))); } } diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 44e32267e74..76004d245dc 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -134,7 +134,7 @@ TAO_GIOP_Message_Base:: default: if (TAO_debug_level > 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t|%N|%l) Wrong header type \n")), + ACE_TEXT ("(%P|%t|%N|%l) Wrong header type \n")), 0); } @@ -222,8 +222,8 @@ TAO_GIOP_Message_Base:: if (retval == -1 && TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - \n") - ASYS_TEXT ("TAO_GIOP_Message_Base::handle_input \n"))); + ACE_TEXT ("TAO (%P|%t) - \n") + ACE_TEXT ("TAO_GIOP_Message_Base::handle_input \n"))); return -1; } @@ -232,8 +232,8 @@ TAO_GIOP_Message_Base:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) -"), - ASYS_TEXT ("TAO_GIOP_Message_Base::handle_input, parse_magic_bytes \n"))); + ACE_TEXT ("TAO (%P|%t) -"), + ACE_TEXT ("TAO_GIOP_Message_Base::handle_input, parse_magic_bytes \n"))); return -1; } @@ -243,8 +243,8 @@ TAO_GIOP_Message_Base:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N%l) -\n"), - ASYS_TEXT ("TAO_GIOP_Message_Base::handle_input \n"))); + ACE_TEXT ("TAO (%P|%t|%N%l) -\n"), + ACE_TEXT ("TAO_GIOP_Message_Base::handle_input \n"))); return -1; } @@ -253,8 +253,8 @@ TAO_GIOP_Message_Base:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) - %p\n"), - ASYS_TEXT ("ACE_CDR::grow"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) - %p\n"), + ACE_TEXT ("ACE_CDR::grow"))); return -1; } @@ -277,16 +277,16 @@ TAO_GIOP_Message_Base:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("TAO_GIOP_Message_Base::handle_input, read_buffer[1] \n"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("TAO_GIOP_Message_Base::handle_input, read_buffer[1] \n"))); return -1; } else if (n == 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("TAO_GIOP_Message_Base::handle_input, read_buffer[2]\n"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("TAO_GIOP_Message_Base::handle_input, read_buffer[2]\n"))); return -1; } @@ -364,8 +364,8 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, // Print. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P | %t):%s GIOP v%c.%c msg, ") - ASYS_TEXT ("%d data bytes, %s endian, %s = %d\n"), + ACE_TEXT ("(%P | %t):%s GIOP v%c.%c msg, ") + ACE_TEXT ("%d data bytes, %s endian, %s = %d\n"), label, digits[ptr[TAO_GIOP_VERSION_MAJOR_OFFSET]], digits[ptr[TAO_GIOP_VERSION_MINOR_OFFSET]], @@ -378,7 +378,7 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, ACE_HEX_DUMP ((LM_DEBUG, (const char *) ptr, len, - ASYS_TEXT ("GIOP message"))); + ACE_TEXT ("GIOP message"))); } @@ -423,7 +423,7 @@ TAO_GIOP_Message_Base::send_error (TAO_Transport *transport) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%N|%l|%P|%t) error sending error to %d\n"), + ACE_TEXT ("TAO (%N|%l|%P|%t) error sending error to %d\n"), which)); } @@ -446,7 +446,7 @@ TAO_GIOP_Message_Base::parse_magic_bytes (TAO_GIOP_Message_State *state) // For the present... if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) bad header, magic word [%c%c%c%c]\n"), + ACE_TEXT ("TAO (%P|%t) bad header, magic word [%c%c%c%c]\n"), buf[0], buf[1], buf[2], @@ -459,8 +459,8 @@ TAO_GIOP_Message_Base::parse_magic_bytes (TAO_GIOP_Message_State *state) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l|%P|%t) Error in validating") - ASYS_TEXT ("revision \n"))); + ACE_TEXT ("(%N|%l|%P|%t) Error in validating") + ACE_TEXT ("revision \n"))); return -1; } } @@ -482,8 +482,8 @@ TAO_GIOP_Message_Base::parse_header (TAO_GIOP_Message_State *state) && state->byte_order != 0 && state->byte_order != 1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) invalid byte order <%d>") - ASYS_TEXT (" for version <1.0>\n"), + ACE_TEXT ("TAO (%P|%t) invalid byte order <%d>") + ACE_TEXT (" for version <1.0>\n"), state->byte_order)); return -1; } @@ -499,8 +499,8 @@ TAO_GIOP_Message_Base::parse_header (TAO_GIOP_Message_State *state) && (buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & ~0x3) != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) invalid flags for <%d>") - ASYS_TEXT (" for version <%d %d> \n"), + ACE_TEXT ("TAO (%P|%t) invalid flags for <%d>") + ACE_TEXT (" for version <%d %d> \n"), buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET], this->major_version (), this->minor_version ())); @@ -521,7 +521,7 @@ TAO_GIOP_Message_Base::parse_header (TAO_GIOP_Message_State *state) if (TAO_debug_level > 2) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Parsed header = <%d,%d,%d,%d,%d>\n"), + ACE_TEXT ("TAO (%P|%t) Parsed header = <%d,%d,%d,%d,%d>\n"), this->major_version (), this->minor_version (), state->byte_order, diff --git a/TAO/tao/GIOP_Message_Connectors.cpp b/TAO/tao/GIOP_Message_Connectors.cpp index 12f02fc16a0..31861e04ed8 100644 --- a/TAO/tao/GIOP_Message_Connectors.cpp +++ b/TAO/tao/GIOP_Message_Connectors.cpp @@ -103,7 +103,7 @@ TAO_GIOP_Message_Connectors:: default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l) Unknown reply status \n"))); + ACE_TEXT ("(%N|%l) Unknown reply status \n"))); } return 0; @@ -207,7 +207,7 @@ TAO_GIOP_Message_Connector_10:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } @@ -252,7 +252,7 @@ TAO_GIOP_Message_Connector_10:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N | %l) Unable to handle this request \n"))); + ACE_TEXT ("(%N | %l) Unable to handle this request \n"))); return 0; } @@ -285,8 +285,8 @@ TAO_GIOP_Message_Connector_10:: case TAO_GIOP_CLOSECONNECTION: default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") - ASYS_TEXT ("wrong message.\n")), + ACE_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") + ACE_TEXT ("wrong message.\n")), -1); case TAO_GIOP_LOCATEREPLY: // Handle after the switch @@ -296,8 +296,8 @@ TAO_GIOP_Message_Connector_10:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) parse_reply, ") - ASYS_TEXT ("extracting context\n"))); + ACE_TEXT ("TAO (%P|%t) parse_reply, ") + ACE_TEXT ("extracting context\n"))); return -1; } // Rest of the stuff after the switch @@ -466,7 +466,7 @@ TAO_GIOP_Message_Connector_12:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } break; @@ -488,7 +488,7 @@ TAO_GIOP_Message_Connector_12:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } break; @@ -514,7 +514,7 @@ TAO_GIOP_Message_Connector_12:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } break; @@ -522,7 +522,7 @@ TAO_GIOP_Message_Connector_12:: default: if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } @@ -554,8 +554,8 @@ parse_reply (TAO_Message_State_Factory &mesg_state, case TAO_GIOP_CLOSECONNECTION: default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") - ASYS_TEXT ("wrong message.\n")), + ACE_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") + ACE_TEXT ("wrong message.\n")), -1); case TAO_GIOP_LOCATEREPLY: // Handle after the switch @@ -565,8 +565,8 @@ parse_reply (TAO_Message_State_Factory &mesg_state, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) parse_reply, ") - ASYS_TEXT ("extracting context\n"))); + ACE_TEXT ("TAO (%P|%t) parse_reply, ") + ACE_TEXT ("extracting context\n"))); return -1; } // Rest of the stuff after the switch diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp index d9b83173bb2..01ce35ebbda 100644 --- a/TAO/tao/GIOP_Message_Lite.cpp +++ b/TAO/tao/GIOP_Message_Lite.cpp @@ -119,8 +119,8 @@ TAO_GIOP_Message_Lite:: if (retval == -1 && TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - \n") - ASYS_TEXT ("TAO_GIOP_Message_Lite::handle_input \n"))); + ACE_TEXT ("TAO (%P|%t) - \n") + ACE_TEXT ("TAO_GIOP_Message_Lite::handle_input \n"))); return -1; } @@ -143,8 +143,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) - %p\n"), - ASYS_TEXT ("ACE_CDR::grow"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) - %p\n"), + ACE_TEXT ("ACE_CDR::grow"))); return -1; } @@ -166,16 +166,16 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("TAO_GIOP_Message_Lite::handle_input, read_buffer[1]"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("TAO_GIOP_Message_Lite::handle_input, read_buffer[1]"))); return -1; } else if (n == 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("TAO_GIOP_Message_Lite::handle_input, read_buffer[2]"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("TAO_GIOP_Message_Lite::handle_input, read_buffer[2]"))); return -1; } @@ -230,7 +230,7 @@ TAO_GIOP_Message_Lite:: default: if (TAO_debug_level > 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t|%N|%l) Wrong header type \n")), + ACE_TEXT ("(%P|%t|%N|%l) Wrong header type \n")), 0); } @@ -308,8 +308,8 @@ TAO_GIOP_Message_Lite:: case TAO_GIOP_REQUEST: // In GIOP 1.0 and GIOP 1.1 this is an error, ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) %N:%l TAO_GIOP_Message_Lite::parse_reply: ") - ASYS_TEXT ("request.\n")), + ACE_TEXT ("TAO (%P|%t) %N:%l TAO_GIOP_Message_Lite::parse_reply: ") + ACE_TEXT ("request.\n")), -1); case TAO_GIOP_CANCELREQUEST: @@ -318,8 +318,8 @@ TAO_GIOP_Message_Lite:: case TAO_GIOP_CLOSECONNECTION: default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") - ASYS_TEXT ("wrong message.\n")), + ACE_TEXT ("TAO (%P|%t) %N:%l parse_reply: ") + ACE_TEXT ("wrong message.\n")), -1); case TAO_GIOP_LOCATEREPLY: case TAO_GIOP_REPLY: @@ -334,8 +334,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) : TAO_GIOP_Message_Lite::parse_reply, ") - ASYS_TEXT ("extracting request id"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) : TAO_GIOP_Message_Lite::parse_reply, ") + ACE_TEXT ("extracting request id"))); return -1; } @@ -348,8 +348,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) : TAO_GIOP_Message_Lite::parse_reply, ") - ASYS_TEXT ("extracting reply status\n"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) : TAO_GIOP_Message_Lite::parse_reply, ") + ACE_TEXT ("extracting reply status\n"))); return -1; } @@ -376,7 +376,7 @@ TAO_GIOP_Message_Lite:: default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l) Unknown reply status \n"))); + ACE_TEXT ("(%N|%l) Unknown reply status \n"))); } return 0; } @@ -413,7 +413,7 @@ TAO_GIOP_Message_Lite:: default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Illegal message received by server\n"))); + ACE_TEXT ("TAO (%P|%t) Illegal message received by server\n"))); return this->send_error (transport); } @@ -513,7 +513,7 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } @@ -545,7 +545,7 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } @@ -693,8 +693,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), - ASYS_TEXT ("process_connector_request ()"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), + ACE_TEXT ("process_connector_request ()"))); ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO: "); } @@ -709,8 +709,8 @@ TAO_GIOP_Message_Lite:: // down, since it really isn't the client's fault. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) exception thrown ") - ASYS_TEXT ("but client is not waiting a response\n"))); + ACE_TEXT ("(%P|%t) exception thrown ") + ACE_TEXT ("but client is not waiting a response\n"))); ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO: "); } @@ -743,8 +743,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), - ASYS_TEXT ("process_connector_request ()"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send exception\n"), + ACE_TEXT ("process_connector_request ()"))); ACE_PRINT_EXCEPTION (exception, "TAO: "); } } @@ -756,8 +756,8 @@ TAO_GIOP_Message_Lite:: // However, in this case, we cannot close the connection // down, since it really isn't the client's fault. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t|%N|%l) exception thrown ") - ASYS_TEXT ("but client is not waiting a response\n"))); + ACE_TEXT ("(%P|%t|%N|%l) exception thrown ") + ACE_TEXT ("but client is not waiting a response\n"))); } return result; @@ -782,8 +782,8 @@ TAO_GIOP_Message_Lite:: // No exception but some kind of error, yet a response // is required. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send reply\n"), - ASYS_TEXT ("TAO_GIOP::process_server_message"))); + ACE_TEXT ("TAO: (%P|%t|%N|%l) %p: cannot send reply\n"), + ACE_TEXT ("TAO_GIOP::process_server_message"))); } } } @@ -841,7 +841,7 @@ TAO_GIOP_Message_Lite:: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Simple Object key %s. Doing the Table Lookup ...\n"), + ACE_TEXT ("Simple Object key %s. Doing the Table Lookup ...\n"), object_id.c_str ())); CORBA::Object_ptr object_reference; @@ -915,7 +915,7 @@ TAO_GIOP_Message_Lite:: status_info.status = TAO_GIOP_OBJECT_HERE; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t) handle_locate() : found\n"))); + ACE_TEXT ("TAO: (%P|%t) handle_locate() : found\n"))); } else if (server_request.exception_type () != TAO_GIOP_NO_EXCEPTION) { @@ -924,14 +924,14 @@ TAO_GIOP_Message_Lite:: { status_info.status = TAO_GIOP_OBJECT_FORWARD; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: forwarding\n"))); + ACE_TEXT ("handle_locate has been called: forwarding\n"))); } else { // Normal exception, so the object is not here status_info.status = TAO_GIOP_UNKNOWN_OBJECT; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: not here\n"))); + ACE_TEXT ("handle_locate has been called: not here\n"))); } } @@ -944,7 +944,7 @@ TAO_GIOP_Message_Lite:: status_info.forward_location_var = forward_request.forward_reference; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("handle_locate has been called: forwarding\n"))); + ACE_TEXT ("handle_locate has been called: forwarding\n"))); } #endif /* TAO_HAS_MINIMUM_CORBA */ ACE_CATCHANY @@ -953,8 +953,8 @@ TAO_GIOP_Message_Lite:: status_info.status = TAO_GIOP_UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") - ASYS_TEXT ("CORBA exception raised\n"))); + ACE_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") + ACE_TEXT ("CORBA exception raised\n"))); } #if defined (TAO_HAS_EXCEPTIONS) ACE_CATCHALL @@ -963,8 +963,8 @@ TAO_GIOP_Message_Lite:: status_info.status = TAO_GIOP_UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") - ASYS_TEXT ("C++ exception raised\n"))); + ACE_TEXT ("TAO (%P|%t) TAO_GIOP::process_server_locate - ") + ACE_TEXT ("C++ exception raised\n"))); } #endif /* TAO_HAS_EXCEPTIONS */ ACE_ENDTRY; @@ -1152,9 +1152,9 @@ TAO_GIOP_Message_Lite:: // Close the handle. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t|%N|%l) cannot marshal exception, handle = %d: %p\n"), + ACE_TEXT ("(%P|%t|%N|%l) cannot marshal exception, handle = %d: %p\n"), transport->handle (), - ASYS_TEXT ("send_reply_exception ()"))); + ACE_TEXT ("send_reply_exception ()"))); return -1; } ACE_ENDTRY; @@ -1189,8 +1189,8 @@ TAO_GIOP_Message_Lite:: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) make_locate_reply-") - ASYS_TEXT ("cannot marshal object reference\n"))); + ACE_TEXT ("TAO (%P|%t|%N|%l) make_locate_reply-") + ACE_TEXT ("cannot marshal object reference\n"))); } } @@ -1206,8 +1206,8 @@ TAO_GIOP_Message_Lite:: if (TAO_debug_level > 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) %p: cannot send reply\n"), - ASYS_TEXT ("TAO_GIOP::process_server_message"))); + ACE_TEXT ("TAO: (%P|%t) %p: cannot send reply\n"), + ACE_TEXT ("TAO_GIOP::process_server_message"))); } } @@ -1243,7 +1243,7 @@ TAO_GIOP_Message_Lite::send_error (TAO_Transport *transport) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%N|%l|%P|%t) error sending error to %d\n"), + ACE_TEXT ("TAO (%N|%l|%P|%t) error sending error to %d\n"), which)); } @@ -1293,8 +1293,8 @@ TAO_GIOP_Message_Lite::dump_msg (const char *label, // Print. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P | %t):%s GIOP lite msg, ") - ASYS_TEXT ("%d data bytes, %s endian, <%s = %d> \n"), + ACE_TEXT ("(%P | %t):%s GIOP lite msg, ") + ACE_TEXT ("%d data bytes, %s endian, <%s = %d> \n"), label, len - TAO_GIOP_LITE_HEADER_LEN, (byte_order == TAO_ENCAP_BYTE_ORDER) ? "my" : "other", diff --git a/TAO/tao/GIOP_Server_Request.cpp b/TAO/tao/GIOP_Server_Request.cpp index c160f0fe065..97388e74024 100644 --- a/TAO/tao/GIOP_Server_Request.cpp +++ b/TAO/tao/GIOP_Server_Request.cpp @@ -336,8 +336,8 @@ TAO_GIOP_ServerRequest::init_reply (CORBA::Environment &ACE_TRY_ENV) if ((*this->outgoing_ << object_ptr) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_GIOP_ServerRequest::marshal - ") - ASYS_TEXT ("encoding forwarded objref failed\n"))); + ACE_TEXT ("TAO_GIOP_ServerRequest::marshal - ") + ACE_TEXT ("encoding forwarded objref failed\n"))); return; } } @@ -406,8 +406,8 @@ TAO_GIOP_ServerRequest::send_no_exception_reply (TAO_Transport *transport) // No exception but some kind of error, yet a response // is required. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO: (%P|%t) %p: cannot send NO_EXCEPTION reply\n"), - ASYS_TEXT ("TAO_GIOP_ServerRequest::send_no_exception_reply"))); + ACE_TEXT ("TAO: (%P|%t) %p: cannot send NO_EXCEPTION reply\n"), + ACE_TEXT ("TAO_GIOP_ServerRequest::send_no_exception_reply"))); } } } diff --git a/TAO/tao/GIOP_Utils.cpp b/TAO/tao/GIOP_Utils.cpp index 99e86dd8568..8b130d3ec10 100644 --- a/TAO/tao/GIOP_Utils.cpp +++ b/TAO/tao/GIOP_Utils.cpp @@ -55,10 +55,10 @@ TAO_GIOP_Utils::read_buffer (TAO_Transport *transport, if (bytes_read <= 0 && TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t|%N|%l) - %p,\n") - ASYS_TEXT (" transport = %d, ") - ASYS_TEXT ("bytes = %d, len = %d\n"), - ASYS_TEXT ("read_buffer"), + ACE_TEXT ("TAO (%P|%t|%N|%l) - %p,\n") + ACE_TEXT (" transport = %d, ") + ACE_TEXT ("bytes = %d, len = %d\n"), + ACE_TEXT ("read_buffer"), transport->handle (), bytes_read, len)); diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 0c6d915f16e..c9b4151c57e 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -160,9 +160,9 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core, // The hostname cache has already been set! // This is bad mojo, i.e. an internal TAO error. ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) ") - ASYS_TEXT ("IIOP_Acceptor::open - "), - ASYS_TEXT ("hostname already set\n\n")), + ACE_TEXT ("TAO (%P|%t) ") + ACE_TEXT ("IIOP_Acceptor::open - "), + ACE_TEXT ("hostname already set\n\n")), -1); } @@ -246,9 +246,9 @@ TAO_IIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, // The hostname cache has already been set! // This is bad mojo, i.e. an internal TAO error. ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) ") - ASYS_TEXT ("IIOP_Acceptor::open_default - "), - ASYS_TEXT ("hostname already set\n\n")), + ACE_TEXT ("TAO (%P|%t) ") + ACE_TEXT ("IIOP_Acceptor::open_default - "), + ACE_TEXT ("hostname already set\n\n")), -1); } @@ -301,9 +301,9 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) IIOP_Acceptor::open_i ") - ASYS_TEXT ("- %p\n\n"), - ASYS_TEXT ("cannot open acceptor"))); + ACE_TEXT ("\n\nTAO (%P|%t) IIOP_Acceptor::open_i ") + ACE_TEXT ("- %p\n\n"), + ACE_TEXT ("cannot open acceptor"))); return -1; } @@ -316,9 +316,9 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, // @@ Should this be a catastrophic error??? if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) IIOP_Acceptor::open_i ") - ASYS_TEXT ("- %p\n\n"), - ASYS_TEXT ("cannot get local addr"))); + ACE_TEXT ("\n\nTAO (%P|%t) IIOP_Acceptor::open_i ") + ACE_TEXT ("- %p\n\n"), + ACE_TEXT ("cannot get local addr"))); return -1; } @@ -335,8 +335,8 @@ TAO_IIOP_Acceptor::open_i (TAO_ORB_Core* orb_core, for (size_t i = 0; i < this->num_hosts_; ++i) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nTAO (%P|%t) IIOP_Acceptor::open_i - ") - ASYS_TEXT ("listening on: <%s:%u>\n"), + ACE_TEXT ("\nTAO (%P|%t) IIOP_Acceptor::open_i - ") + ACE_TEXT ("listening on: <%s:%u>\n"), this->hosts_[i].c_str (), this->addrs_[i].get_port_number ())); } @@ -360,10 +360,10 @@ TAO_IIOP_Acceptor::hostname (TAO_ORB_Core *orb_core, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) ") - ASYS_TEXT ("IIOP_Acceptor::hostname ") - ASYS_TEXT ("- %p\n\n"), - ASYS_TEXT ("cannot determine hostname"))); + ACE_TEXT ("\n\nTAO (%P|%t) ") + ACE_TEXT ("IIOP_Acceptor::hostname ") + ACE_TEXT ("- %p\n\n"), + ACE_TEXT ("cannot determine hostname"))); return -1; } @@ -400,8 +400,8 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("TAO (%P|%t) Unable to probe network ") - ASYS_TEXT ("interfaces. Using default."))); + ACE_TEXT ("TAO (%P|%t) Unable to probe network ") + ACE_TEXT ("interfaces. Using default."))); } if_cnt = 1; // Force the network interface count to be one. @@ -522,7 +522,7 @@ TAO_IIOP_Acceptor::parse_options (const char *str) if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Zero length IIOP option.\n")), + ACE_TEXT ("TAO (%P|%t) Zero length IIOP option.\n")), -1); else if (end != ACE_CString::npos) { @@ -533,8 +533,8 @@ TAO_IIOP_Acceptor::parse_options (const char *str) if (slot == ACE_static_cast (int, len - 1) || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) IIOP option <%s> is ") - ASYS_TEXT ("missing a value.\n"), + ACE_TEXT ("TAO (%P|%t) IIOP option <%s> is ") + ACE_TEXT ("missing a value.\n"), opt.c_str ()), -1); @@ -543,8 +543,8 @@ TAO_IIOP_Acceptor::parse_options (const char *str) if (name.length () == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Zero length IIOP ") - ASYS_TEXT ("option name.\n")), + ACE_TEXT ("TAO (%P|%t) Zero length IIOP ") + ACE_TEXT ("option name.\n")), -1); if (name == "priority") @@ -561,14 +561,14 @@ TAO_IIOP_Acceptor::parse_options (const char *str) this->priority_ = corba_priority; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Invalid IIOP endpoint ") - ASYS_TEXT ("priority: <%s>\n"), + ACE_TEXT ("TAO (%P|%t) Invalid IIOP endpoint ") + ACE_TEXT ("priority: <%s>\n"), value.c_str ()), -1); } else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Invalid IIOP option: <%s>\n"), + ACE_TEXT ("TAO (%P|%t) Invalid IIOP option: <%s>\n"), name.c_str ()), -1); } diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp index e09d02cfc3e..862d67a64dc 100644 --- a/TAO/tao/IIOP_Connect.cpp +++ b/TAO/tao/IIOP_Connect.cpp @@ -161,7 +161,7 @@ TAO_IIOP_Server_Connection_Handler::open (void*) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP connection from client <%s> on %d\n"), + ACE_TEXT ("TAO (%P|%t) IIOP connection from client <%s> on %d\n"), client, this->peer ().get_handle ())); return 0; @@ -181,8 +181,8 @@ TAO_IIOP_Server_Connection_Handler::activate (long flags, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::activate %d ") - ASYS_TEXT ("threads, flags = %d\n"), + ACE_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::activate %d ") + ACE_TEXT ("threads, flags = %d\n"), n_threads, flags, THR_BOUND)); @@ -205,8 +205,8 @@ TAO_IIOP_Server_Connection_Handler::handle_close (ACE_HANDLE handle, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::handle_close ") - ASYS_TEXT ("(%d, %d)\n"), + ACE_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::handle_close ") + ACE_TEXT ("(%d, %d)\n"), handle, rm)); @@ -230,7 +230,7 @@ TAO_IIOP_Server_Connection_Handler::svc (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc begin\n"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc begin\n"))); // Here we simply synthesize the "typical" event loop one might find // in a reactive handler, except that this can simply block waiting @@ -258,13 +258,13 @@ TAO_IIOP_Server_Connection_Handler::svc (void) current_timeout = timeout; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc - ") - ASYS_TEXT ("loop <%d>\n"), current_timeout.msec ())); + ACE_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc - ") + ACE_TEXT ("loop <%d>\n"), current_timeout.msec ())); } if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc end\n"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Server_Connection_Handler::svc end\n"))); return result; } @@ -289,9 +289,9 @@ TAO_IIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, if (result == -1 && TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("IIOP_Server_Connection_Handler::handle_input, ") - ASYS_TEXT ("handle_input"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("IIOP_Server_Connection_Handler::handle_input, ") + ACE_TEXT ("handle_input"))); } if (result == 0 || result == -1) @@ -406,7 +406,7 @@ TAO_IIOP_Client_Connection_Handler::open (void *) (void *) &nodelay, sizeof (nodelay)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("NODELAY failed\n")), + ACE_TEXT ("NODELAY failed\n")), -1); #endif /* ! ACE_LACKS_TCP_NODELAY */ @@ -428,7 +428,7 @@ TAO_IIOP_Client_Connection_Handler::open (void *) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP connection to server <%s> on %d\n"), + ACE_TEXT ("TAO (%P|%t) IIOP connection to server <%s> on %d\n"), server, this->peer ().get_handle ())); // Register the handler with the Reactor if necessary. @@ -497,8 +497,8 @@ TAO_IIOP_Client_Connection_Handler::handle_close (ACE_HANDLE handle, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::") - ASYS_TEXT ("handle_close (%d, %d)\n"), handle, rm)); + ACE_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::") + ACE_TEXT ("handle_close (%d, %d)\n"), handle, rm)); if (this->recycler ()) this->recycler ()->mark_as_closed (this->recycling_act ()); @@ -520,8 +520,8 @@ TAO_IIOP_Client_Connection_Handler::handle_close_i (ACE_HANDLE handle, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::") - ASYS_TEXT ("handle_close_i (%d, %d)\n"), handle, rm)); + ACE_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::") + ACE_TEXT ("handle_close_i (%d, %d)\n"), handle, rm)); if (this->recycler ()) this->recycler ()->mark_as_closed_i (this->recycling_act ()); diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index f95a9f6daf9..7c6ffb58b0d 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -505,8 +505,8 @@ TAO_IIOP_Connector::connect (TAO_Profile *profile, profile->addr_to_string (buffer, (MAXNAMELEN * 2) - 1); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %s:%u, connection to ") - ASYS_TEXT ("%s failed (%p)\n"), + ACE_TEXT ("(%P|%t) %s:%u, connection to ") + ACE_TEXT ("%s failed (%p)\n"), __FILE__, __LINE__, buffer, @@ -527,7 +527,7 @@ TAO_IIOP_Connector::connect (TAO_Profile *profile, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); + ACE_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); } return -1; } @@ -602,8 +602,8 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) No port specified for <%s>. ") - ASYS_TEXT ("Using <%d> as default port.\n"), + ACE_TEXT ("TAO (%P|%t) No port specified for <%s>. ") + ACE_TEXT ("Using <%d> as default port.\n"), where, dest.get_port_number ())); } @@ -662,14 +662,14 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") - ASYS_TEXT ("succeeded.\n"), + ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") + ACE_TEXT ("succeeded.\n"), remote_addrs[slot].get_host_name (), remote_addrs[slot].get_port_number ())); } else if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Preconnection <%s:%d> failed.\n"), + ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> failed.\n"), remote_addrs[slot].get_host_name (), remote_addrs[slot].get_port_number ())); } @@ -678,8 +678,8 @@ TAO_IIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP preconnections: %d successes and ") - ASYS_TEXT ("%d failures.\n"), + ACE_TEXT ("TAO (%P|%t) IIOP preconnections: %d successes and ") + ACE_TEXT ("%d failures.\n"), successes, num_connections - successes)); } diff --git a/TAO/tao/IIOP_Factory.cpp b/TAO/tao/IIOP_Factory.cpp index 84d22b9c27b..38fa1c2cf21 100644 --- a/TAO/tao/IIOP_Factory.cpp +++ b/TAO/tao/IIOP_Factory.cpp @@ -75,7 +75,7 @@ TAO_IIOP_Protocol_Factory::requires_explicit_endpoint (void) const } ACE_STATIC_SVC_DEFINE (TAO_IIOP_Protocol_Factory, - ASYS_TEXT ("IIOP_Factory"), + ACE_TEXT ("IIOP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_IIOP_Protocol_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/tao/IIOP_Lite_Factory.cpp b/TAO/tao/IIOP_Lite_Factory.cpp index 86bbe570cb0..0abf9c5d95f 100644 --- a/TAO/tao/IIOP_Lite_Factory.cpp +++ b/TAO/tao/IIOP_Lite_Factory.cpp @@ -81,7 +81,7 @@ TAO_IIOP_Lite_Protocol_Factory::requires_explicit_endpoint (void) const } ACE_STATIC_SVC_DEFINE (TAO_IIOP_Lite_Protocol_Factory, - ASYS_TEXT ("IIOP_Lite_Factory"), + ACE_TEXT ("IIOP_Lite_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_IIOP_Lite_Protocol_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index 783e23bbfab..4de666651ab 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -157,7 +157,7 @@ TAO_IIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Profile::decode - v%d.%d\n"), + ACE_TEXT ("TAO (%P|%t) IIOP_Profile::decode - v%d.%d\n"), major, minor)); } @@ -176,8 +176,8 @@ TAO_IIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Profile::decode - ") - ASYS_TEXT ("error while decoding host/port"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Profile::decode - ") + ACE_TEXT ("error while decoding host/port"))); } return -1; } @@ -188,8 +188,8 @@ TAO_IIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Profile::decode - ") - ASYS_TEXT ("ACE_INET_Addr::set() failed\n"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Profile::decode - ") + ACE_TEXT ("ACE_INET_Addr::set() failed\n"))); } return -1; } @@ -210,7 +210,7 @@ TAO_IIOP_Profile::decode (TAO_InputCDR& cdr) // If there is extra data in the profile we are supposed to // ignore it, but print a warning just in case... ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d bytes out of %d left after IIOP profile data\n"), + ACE_TEXT ("%d bytes out of %d left after IIOP profile data\n"), cdr.length (), encap_len)); } @@ -322,8 +322,8 @@ TAO_IIOP_Profile::parse_string (const char *string, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Profile::parse_string - \n") - ASYS_TEXT ("TAO (%P|%t) ACE_INET_Addr::set () failed"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Profile::parse_string - \n") + ACE_TEXT ("TAO (%P|%t) ACE_INET_Addr::set () failed"))); } return -1; } diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index a4419ea385c..4de4f4872cd 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -227,8 +227,8 @@ TAO_IIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP_Transport::handle_client_input -") - ASYS_TEXT (" nil message state\n"))); + ACE_TEXT ("TAO (%P|%t) IIOP_Transport::handle_client_input -") + ACE_TEXT (" nil message state\n"))); return -1; } @@ -241,8 +241,8 @@ TAO_IIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("IIOP_Transport::handle_client_input, handle_input"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("IIOP_Transport::handle_client_input, handle_input"))); return -1; } if (result == 0) @@ -256,8 +256,8 @@ TAO_IIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("IIOP_Transport::handle_client_input, parse reply"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("IIOP_Transport::handle_client_input, parse reply"))); message_state->reset (); return -1; } @@ -273,9 +273,9 @@ TAO_IIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) : IIOP_Client_Transport::") - ASYS_TEXT ("handle_client_input - ") - ASYS_TEXT ("dispatch reply failed\n"))); + ACE_TEXT ("TAO (%P|%t) : IIOP_Client_Transport::") + ACE_TEXT ("handle_client_input - ") + ACE_TEXT ("dispatch reply failed\n"))); message_state->reset (); return -1; } @@ -343,7 +343,7 @@ TAO_IIOP_Client_Transport::messaging_init (CORBA::Octet major, if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), 0); } } @@ -353,7 +353,7 @@ TAO_IIOP_Client_Transport::messaging_init (CORBA::Octet major, if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), 0); } } diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 121e09b0f21..f9bee0da6c5 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -154,7 +154,7 @@ TAO_GIOP_Invocation::select_profile_based_on_policy } if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - matching priority range %d %d\n"), + ACE_TEXT ("TAO (%P|%t) - matching priority range %d %d\n"), min_priority, max_priority)); @@ -687,7 +687,7 @@ TAO_GIOP_Twoway_Invocation::invoke (TAO_Exception_Data *excepts, if (TAO_debug_level > 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t) Raising exception %s\n"), + ACE_TEXT ("TAO: (%P|%t) Raising exception %s\n"), buf.in ())); // @@ Think about a better way to raise the exception here, @@ -766,7 +766,7 @@ TAO_GIOP_Twoway_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV) this->max_wait_time_->msec (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Timeout on recv is <%u>\n"), + ACE_TEXT ("TAO (%P|%t) Timeout on recv is <%u>\n"), msecs)); } @@ -781,7 +781,7 @@ TAO_GIOP_Twoway_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV) this->max_wait_time_->msec (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Timeout after recv is <%u> status <%d>\n"), + ACE_TEXT ("TAO (%P|%t) Timeout after recv is <%u> status <%d>\n"), msecs, reply_error)); } @@ -985,7 +985,7 @@ TAO_GIOP_Oneway_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) this->max_wait_time_->msec (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Timeout on recv is <%u>\n"), + ACE_TEXT ("TAO (%P|%t) Timeout on recv is <%u>\n"), msecs)); } @@ -1000,7 +1000,7 @@ TAO_GIOP_Oneway_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) this->max_wait_time_->msec (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Timeout after recv is <%u> status <%d>\n"), + ACE_TEXT ("TAO (%P|%t) Timeout after recv is <%u> status <%d>\n"), msecs, reply_error)); } diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp index c49a2d2495c..792110a6ebb 100644 --- a/TAO/tao/Leader_Follower.cpp +++ b/TAO/tao/Leader_Follower.cpp @@ -61,8 +61,8 @@ TAO_Leader_Follower::wait_for_client_leader_to_complete (ACE_Time_Value *max_wai if (this->event_loop_threads_condition_.wait () == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): TAO_Leader_Follower::wait_for_client_leader_to_complete - ") - ASYS_TEXT ("Condition variable wait failed\n"))); + ACE_TEXT ("TAO (%P|%t): TAO_Leader_Follower::wait_for_client_leader_to_complete - ") + ACE_TEXT ("Condition variable wait failed\n"))); result = -1; } @@ -76,8 +76,8 @@ TAO_Leader_Follower::wait_for_client_leader_to_complete (ACE_Time_Value *max_wai { if (errno != ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): TAO_Leader_Follower::wait_for_client_leader_to_complete - ") - ASYS_TEXT ("Condition variable wait failed\n"))); + ACE_TEXT ("TAO (%P|%t): TAO_Leader_Follower::wait_for_client_leader_to_complete - ") + ACE_TEXT ("Condition variable wait failed\n"))); result = -1; } diff --git a/TAO/tao/Leader_Follower.i b/TAO/tao/Leader_Follower.i index 529ee24e4c0..fcfac12cad6 100644 --- a/TAO/tao/Leader_Follower.i +++ b/TAO/tao/Leader_Follower.i @@ -263,6 +263,6 @@ TAO_LF_Event_Loop_Thread_Helper::~TAO_LF_Event_Loop_Thread_Helper (void) if (result == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Failed to wake up ") - ASYS_TEXT ("a follower thread\n"))); + ACE_TEXT ("TAO (%P|%t) Failed to wake up ") + ACE_TEXT ("a follower thread\n"))); } diff --git a/TAO/tao/Messaging_Policy_i.cpp b/TAO/tao/Messaging_Policy_i.cpp index a75a74cfa3e..4187ccf833a 100644 --- a/TAO/tao/Messaging_Policy_i.cpp +++ b/TAO/tao/Messaging_Policy_i.cpp @@ -135,7 +135,7 @@ TAO_RelativeRoundtripTimeoutPolicy::set_time_value (ACE_Time_Value &time_value) CORBA::ULong msecs = ACE_static_cast(CORBA::ULong, microseconds / 1000); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Timeout is <%u>\n"), + ACE_TEXT ("TAO (%P|%t) Timeout is <%u>\n"), msecs)); } } diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp index b6b3f44d406..a40c2f1ea41 100644 --- a/TAO/tao/NVList.cpp +++ b/TAO/tao/NVList.cpp @@ -334,7 +334,7 @@ CORBA_NVList::_tao_encode (TAO_OutputCDR &cdr, arg = "(nil)"; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("NVList::_tao_encode - parameter <%s>\n"), + ACE_TEXT ("NVList::_tao_encode - parameter <%s>\n"), arg)); } CORBA::TypeCode_var tc = nv->value ()->type (); @@ -378,7 +378,7 @@ CORBA_NVList::_tao_decode (TAO_InputCDR &incoming, CORBA::Environment &ACE_TRY_ENV) { if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("TAO (%P|%t) : NVList::_tao_decode\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) : NVList::_tao_decode\n"))); // Then unmarshal each "in" and "inout" parameter. ACE_Unbounded_Queue_Iterator<CORBA::NamedValue_ptr> i (this->values_); @@ -399,7 +399,7 @@ CORBA_NVList::_tao_decode (TAO_InputCDR &incoming, if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) : NVList::_tao_decode - %s\n"), + ACE_TEXT ("TAO (%P|%t) : NVList::_tao_decode - %s\n"), nv->name ()?nv->name ():"(no name given)" )); CORBA::Any_ptr any = nv->value (); diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 91399e1c7b4..4de2cdbae1c 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -215,7 +215,7 @@ CORBA_ORB::destroy (CORBA::Environment &ACE_TRY_ENV) if (TAO_debug_level >= 3) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("CORBA::ORB::destroy() has been called on ORB <%s>.\n"), + ACE_TEXT ("CORBA::ORB::destroy() has been called on ORB <%s>.\n"), this->orb_core ()->orbid ())); } @@ -572,8 +572,8 @@ CORBA_ORB::multicast_query (char *&buf, || acceptor.get_local_addr (my_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("acceptor.open () || ") - ASYS_TEXT ("acceptor.get_local_addr () failed"))); + ACE_TEXT ("acceptor.open () || ") + ACE_TEXT ("acceptor.get_local_addr () failed"))); result = -1; } else @@ -591,7 +591,7 @@ CORBA_ORB::multicast_query (char *&buf, if (multicast_addr.set (mde.c_str()) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT("ORB.cpp: Multicast address setting failed\n"))); + ACE_TEXT("ORB.cpp: Multicast address setting failed\n"))); stream.close (); dgram.close (); acceptor.close (); @@ -602,7 +602,7 @@ CORBA_ORB::multicast_query (char *&buf, if (dgram.open (ACE_Addr::sap_any) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Unable to open the Datagram!\n"))); + ACE_TEXT ("Unable to open the Datagram!\n"))); result = -1; } else @@ -640,19 +640,19 @@ CORBA_ORB::multicast_query (char *&buf, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nsent multicast request."))); + ACE_TEXT ("\nsent multicast request."))); // Check for errors. if (result == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("error sending IIOP multicast"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("error sending IIOP multicast"))); else { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n%s; Sent multicast.") - ASYS_TEXT ("# of bytes sent is %d.\n"), + ACE_TEXT ("\n%s; Sent multicast.") + ACE_TEXT ("# of bytes sent is %d.\n"), __FILE__, result)); // Wait for response until timeout. @@ -667,8 +667,8 @@ CORBA_ORB::multicast_query (char *&buf, &tv) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("multicast_query: unable to accept"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("multicast_query: unable to accept"))); result = -1; } else @@ -684,9 +684,9 @@ CORBA_ORB::multicast_query (char *&buf, if (result != sizeof (ior_len)) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("multicast_query: unable to receive ") - ASYS_TEXT ("ior length"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("multicast_query: unable to receive ") + ACE_TEXT ("ior length"))); result = -1; } else @@ -700,9 +700,9 @@ CORBA_ORB::multicast_query (char *&buf, if (buf == 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("multicast_query: unable to ") - ASYS_TEXT ("allocate memory"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("multicast_query: unable to ") + ACE_TEXT ("allocate memory"))); result = -1; } } @@ -716,11 +716,11 @@ CORBA_ORB::multicast_query (char *&buf, &tv); if (result == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ( "%p\n"), - ASYS_TEXT ("error reading ior"))); + ACE_TEXT ( "%p\n"), + ACE_TEXT ("error reading ior"))); else if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s: service resolved to IOR <%s>\n"), + ACE_TEXT ("%s: service resolved to IOR <%s>\n"), __FILE__, buf)); } @@ -1361,7 +1361,7 @@ CORBA::ORB_init (int &argc, if (TAO_debug_level >= 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) created new ORB <%s>\n"), + ACE_TEXT ("TAO (%P|%t) created new ORB <%s>\n"), orbid)); // Before returning remember to store the ORB into the table... @@ -1462,8 +1462,8 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO_Stub pointer in CORBA::ORB::object_to_string() ") - ASYS_TEXT ("is zero.\n"))); + ACE_TEXT ("TAO_Stub pointer in CORBA::ORB::object_to_string() ") + ACE_TEXT ("is zero.\n"))); ACE_THROW_RETURN (CORBA::MARSHAL ( CORBA_SystemException::_tao_minor_code ( @@ -1484,8 +1484,8 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO_Profile pointer in ") - ASYS_TEXT ("CORBA::ORB::object_to_string() is zero.\n"))); + ACE_TEXT ("TAO_Profile pointer in ") + ACE_TEXT ("CORBA::ORB::object_to_string() is zero.\n"))); ACE_THROW_RETURN (CORBA::MARSHAL ( CORBA_SystemException::_tao_minor_code ( @@ -1928,7 +1928,7 @@ CORBA_ORB::_tao_add_to_IOR_table (const ACE_CString &object_id, { if (CORBA::is_nil (obj)) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): Cannot add nil object to table <%s>\n"), + ACE_TEXT ("TAO (%P|%t): Cannot add nil object to table <%s>\n"), object_id.c_str ()), -1); @@ -1942,7 +1942,7 @@ CORBA_ORB::_tao_add_to_IOR_table (const ACE_CString &object_id, if (this->lookup_table_.add_ior (object_id, ior) != 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): Unable to add IOR to table <%s>\n"), + ACE_TEXT ("TAO (%P|%t): Unable to add IOR to table <%s>\n"), object_id.c_str ()), -1); @@ -2070,7 +2070,7 @@ void CORBA_ORB::unregister_value_factory (const char * /* repository_id */, CORBA_Environment &) { - ACE_ERROR((LM_ERROR, ASYS_TEXT ("(%N:%l) function not implemented\n"))); + ACE_ERROR((LM_ERROR, ACE_TEXT ("(%N:%l) function not implemented\n"))); // %! TODO } diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 62eb9c693d8..b44b64c3f62 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -306,7 +306,7 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (TAO_debug_level <= 0) TAO_debug_level = 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_debug_level == %d"), TAO_debug_level)); + ACE_TEXT ("TAO_debug_level == %d"), TAO_debug_level)); } } #endif /* TAO_DEBUG */ @@ -340,8 +340,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // messaging protocols. // giop_lite = 1; ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("(%P|%t) This option has been deprecated \n") - ASYS_TEXT ("Please use svc.conf file to load the protcol \n"))); + ACE_TEXT ("(%P|%t) This option has been deprecated \n") + ACE_TEXT ("Please use svc.conf file to load the protcol \n"))); arg_shifter.consume_arg (); } @@ -431,8 +431,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->endpoints (endpts) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t)\n") - ASYS_TEXT ("Invalid endpoint(s) specified:\n%s\n"), + ACE_TEXT ("(%P|%t)\n") + ACE_TEXT ("Invalid endpoint(s) specified:\n%s\n"), endpts.c_str ())); ACE_THROW_RETURN (CORBA::BAD_PARAM ( CORBA_SystemException::_tao_minor_code ( @@ -444,15 +444,16 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) arg_shifter.consume_arg (); } else if ((current_arg = arg_shifter.get_the_parameter + ("-ORBNameServiceIOR"))) { // Specify the IOR of the NameService. // Issue a warning since this backward compatibilty support // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("(%P|%t) \nWARNING: The `-ORBNameServiceIOR' option ") - ASYS_TEXT ("is obsolete.\n") - ASYS_TEXT ("Please use the `-ORBInitRef ' option instead.\n"))); + ACE_TEXT ("(%P|%t) \nWARNING: The `-ORBNameServiceIOR' option ") + ACE_TEXT ("is obsolete.\n") + ACE_TEXT ("Please use the `-ORBInitRef ' option instead.\n"))); // Construct an argument that would be equivalent to // "-ORBInitRef NameService=....." @@ -463,8 +464,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->add_to_ior_table (init_ref) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add the Name ") - ASYS_TEXT ("Service IOR <%s> to the lookup table.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add the Name ") + ACE_TEXT ("Service IOR <%s> to the lookup table.\n"), current_arg)); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( @@ -511,9 +512,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // Issue a warning since this backward compatibilty support // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("(%P|%t) \nWARNING: The `-ORBTradingServiceIOR' ") - ASYS_TEXT ("option is obsolete.\n") - ASYS_TEXT ("Please use the `-ORBInitRef' option instead.\n"))); + ACE_TEXT ("(%P|%t) \nWARNING: The `-ORBTradingServiceIOR' ") + ACE_TEXT ("option is obsolete.\n") + ACE_TEXT ("Please use the `-ORBInitRef' option instead.\n"))); // Construct an argument that would be equivalent to // "-ORBInitRef TradingService=....." @@ -526,8 +527,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->add_to_ior_table (init_ref) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add the Trading ") - ASYS_TEXT ("Service IOR <%s> to the lookup table.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add the Trading ") + ACE_TEXT ("Service IOR <%s> to the lookup table.\n"), current_arg)); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( @@ -555,9 +556,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // Issue a warning since this backward compatibilty support // may be dropped in future releases. ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("(%P|%t) \nWARNING: The `-ORBImplRepoServiceIOR' ") - ASYS_TEXT ("option is obsolete.\n") - ASYS_TEXT ("Please use the `-ORBInitRef' option instead.\n"))); + ACE_TEXT ("(%P|%t) \nWARNING: The `-ORBImplRepoServiceIOR' ") + ACE_TEXT ("option is obsolete.\n") + ACE_TEXT ("Please use the `-ORBInitRef' option instead.\n"))); // Construct an argument that would be equivalent to // "-ORBInitRef ImplRepoService=....." @@ -570,9 +571,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->add_to_ior_table (init_ref) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add the ") - ASYS_TEXT ("Implementation Repository IOR <%s> to ") - ASYS_TEXT ("the lookup table.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add the ") + ACE_TEXT ("Implementation Repository IOR <%s> to ") + ACE_TEXT ("the lookup table.\n"), current_arg)); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( @@ -672,9 +673,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) { yes_implies_global = 1; ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("WARNING: using '-ORBCollocation YES' is obsolete ") - ASYS_TEXT ("and implies '-ORBCollocation global'") - ASYS_TEXT (" Please use '-ORBCollocation global' instead.\n"))); + ACE_TEXT ("WARNING: using '-ORBCollocation YES' is obsolete ") + ACE_TEXT ("and implies '-ORBCollocation global'") + ACE_TEXT (" Please use '-ORBCollocation global' instead.\n"))); } if (yes_implies_global || @@ -700,9 +701,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // calls. { ACE_DEBUG ((LM_WARNING, - ASYS_TEXT ("WARNING: -ORBGlobalCollocation option is obsolete.") - ASYS_TEXT (" Please use '-ORBCollocation global/per-orb/no'") - ASYS_TEXT ("instead.\n"))); + ACE_TEXT ("WARNING: -ORBGlobalCollocation option is obsolete.") + ACE_TEXT (" Please use '-ORBCollocation global/per-orb/no'") + ACE_TEXT ("instead.\n"))); char *opt = current_arg; if (ACE_OS::strcasecmp (opt, "YES") == 0) @@ -741,9 +742,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->preconnects (preconnections) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t)\n") - ASYS_TEXT ("Invalid preconnect(s)") - ASYS_TEXT ("specified:\n%s\n"), + ACE_TEXT ("(%P|%t)\n") + ACE_TEXT ("Invalid preconnect(s)") + ACE_TEXT ("specified:\n%s\n"), preconnections.c_str ())); ACE_THROW_RETURN (CORBA::BAD_PARAM ( CORBA_SystemException::_tao_minor_code ( @@ -772,9 +773,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (this->orb_params ()->add_to_ior_table (init_ref) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Unable to add initial reference:\n") - ASYS_TEXT ("%s\n") - ASYS_TEXT ("to the initial reference lookup table.\n"), + ACE_TEXT ("Unable to add initial reference:\n") + ACE_TEXT ("%s\n") + ACE_TEXT ("to the initial reference lookup table.\n"), current_arg)); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( @@ -822,7 +823,7 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // if <file> is not present = create // - ASYS_TCHAR* file_name = current_arg; + ACE_TCHAR* file_name = current_arg; arg_shifter.consume_arg (); // @@ -888,10 +889,10 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (ACE_OS::setuid (orb_uid) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Error setting effective user ") - ASYS_TEXT ("ID for ORB <%s>%p\n"), + ACE_TEXT ("Error setting effective user ") + ACE_TEXT ("ID for ORB <%s>%p\n"), this->orbid_, - ASYS_TEXT(""))); + ACE_TEXT(""))); ACE_THROW_RETURN (CORBA::BAD_PARAM ( CORBA_SystemException::_tao_minor_code ( @@ -914,10 +915,10 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (ACE_OS::setgid (orb_gid) != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Error setting effective group ") - ASYS_TEXT ("ID for ORB <%s>%p\n"), + ACE_TEXT ("Error setting effective group ") + ACE_TEXT ("ID for ORB <%s>%p\n"), this->orbid_, - ASYS_TEXT(""))); + ACE_TEXT(""))); ACE_THROW_RETURN (CORBA::BAD_PARAM ( CORBA_SystemException::_tao_minor_code ( @@ -957,8 +958,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) { current_arg = arg_shifter.get_current (); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("ERROR: Unknown \"-ORB\" option ") - ASYS_TEXT ("<%s>.\n"), + ACE_TEXT ("ERROR: Unknown \"-ORB\" option ") + ACE_TEXT ("<%s>.\n"), ((current_arg == 0) ? "<NULL>" : current_arg))); } @@ -1014,9 +1015,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (result != 0 && errno != ENOENT) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("ORB Core unable to initialize the ") - ASYS_TEXT ("Service Configurator"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB Core unable to initialize the ") + ACE_TEXT ("Service Configurator"))); ACE_THROW_RETURN (CORBA::INITIALIZE ( CORBA_SystemException::_tao_minor_code ( TAO_ORB_CORE_INIT_LOCATION_CODE, @@ -1033,8 +1034,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (trf == 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("ORB Core unable to find a Resource Factory instance"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB Core unable to find a Resource Factory instance"))); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( TAO_ORB_CORE_INIT_LOCATION_CODE, @@ -1061,8 +1062,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (reactor == 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("ORB Core unable to initialize reactor"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB Core unable to initialize reactor"))); ACE_THROW_RETURN (CORBA::INITIALIZE ( CORBA_SystemException::_tao_minor_code ( TAO_ORB_CORE_INIT_LOCATION_CODE, @@ -1076,9 +1077,9 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) if (ssf == 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("ORB Core unable to find a ") - ASYS_TEXT ("Server Strategy Factory instance"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB Core unable to find a ") + ACE_TEXT ("Server Strategy Factory instance"))); ACE_THROW_RETURN (CORBA::INTERNAL ( CORBA_SystemException::_tao_minor_code ( TAO_ORB_CORE_INIT_LOCATION_CODE, @@ -1217,7 +1218,7 @@ TAO_ORB_Core::fini (void) if (TAO_debug_level >= 3) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Destroying ORB <%s>\n"), + ACE_TEXT ("Destroying ORB <%s>\n"), this->orbid_)); } @@ -1294,10 +1295,10 @@ TAO_ORB_Core::resource_factory (void) // platforms. if (TAO_orbdebug) ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("(%P|%t) WARNING - No Resource Factory found ") - ASYS_TEXT ("in Service Repository.\n") - ASYS_TEXT (" Using default instance with GLOBAL resource ") - ASYS_TEXT ("source specifier.\n"))); + ACE_TEXT ("(%P|%t) WARNING - No Resource Factory found ") + ACE_TEXT ("in Service Repository.\n") + ACE_TEXT (" Using default instance with GLOBAL resource ") + ACE_TEXT ("source specifier.\n"))); TAO_Default_Resource_Factory *default_factory; ACE_NEW_RETURN (default_factory, @@ -1337,9 +1338,9 @@ TAO_ORB_Core::client_factory (void) // platforms. if (TAO_orbdebug) ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("(%P|%t) WARNING - No Client Strategy Factory found ") - ASYS_TEXT ("in Service Repository.\n") - ASYS_TEXT (" Using default instance.\n"))); + ACE_TEXT ("(%P|%t) WARNING - No Client Strategy Factory found ") + ACE_TEXT ("in Service Repository.\n") + ACE_TEXT (" Using default instance.\n"))); ACE_NEW_RETURN (this->client_factory_, TAO_Default_Client_Strategy_Factory, @@ -1376,9 +1377,9 @@ TAO_ORB_Core::server_factory (void) // Still don't have one, so let's allocate the default. if (TAO_orbdebug) ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("(%P|%t) WARNING - No %s found in Service Repository.") - ASYS_TEXT (" Using default instance.\n"), - ASYS_TEXT ("Server Strategy Factory"))); + ACE_TEXT ("(%P|%t) WARNING - No %s found in Service Repository.") + ACE_TEXT (" Using default instance.\n"), + ACE_TEXT ("Server Strategy Factory"))); ACE_NEW_RETURN (this->server_factory_, TAO_Default_Server_Strategy_Factory, @@ -1632,7 +1633,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv, { if (TAO_debug_level >= 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - start of run/perform_work\n"))); + ACE_TEXT ("TAO (%P|%t) - start of run/perform_work\n"))); TAO_Leader_Follower &leader_follower = this->leader_follower (); TAO_LF_Event_Loop_Thread_Helper event_loop_thread_helper (leader_follower); @@ -1678,7 +1679,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv, { if (TAO_debug_level >= 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - blocking on handle events\n"))); + ACE_TEXT ("TAO (%P|%t) - blocking on handle events\n"))); switch (r->handle_events (tv)) { case 0: @@ -1707,7 +1708,7 @@ TAO_ORB_Core::run (ACE_Time_Value *tv, } if (TAO_debug_level >= 3) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("TAO (%P|%t) - end of run/perform_work %d\n"), result)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - end of run/perform_work %d\n"), result)); return result; } @@ -1822,9 +1823,9 @@ TAO_ORB_Core::input_cdr_dblock_allocator (void) TAO_ORB_Core_TSS_Resources *tss = this->get_tss_resources (); if (tss == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("TAO_ORB_Core::input_cdr_dblock_allocator (); ") - ASYS_TEXT ("no more TSS keys")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("TAO_ORB_Core::input_cdr_dblock_allocator (); ") + ACE_TEXT ("no more TSS keys")), 0); return this->input_cdr_dblock_allocator_i (tss); } @@ -1858,9 +1859,9 @@ TAO_ORB_Core::input_cdr_buffer_allocator (void) TAO_ORB_Core_TSS_Resources *tss = this->get_tss_resources (); if (tss == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("TAO_ORB_Core::input_cdr_buffer_allocator (); ") - ASYS_TEXT ("no more TSS keys")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("TAO_ORB_Core::input_cdr_buffer_allocator (); ") + ACE_TEXT ("no more TSS keys")), 0); return this->input_cdr_buffer_allocator_i (tss); @@ -1887,9 +1888,9 @@ TAO_ORB_Core::output_cdr_dblock_allocator (void) TAO_ORB_Core_TSS_Resources *tss = this->get_tss_resources (); if (tss == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("TAO_ORB_Core::output_cdr_dblock_allocator (); ") - ASYS_TEXT ("no more TSS keys")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("TAO_ORB_Core::output_cdr_dblock_allocator (); ") + ACE_TEXT ("no more TSS keys")), 0); if (tss->output_cdr_dblock_allocator_ == 0) @@ -1922,9 +1923,9 @@ TAO_ORB_Core::output_cdr_buffer_allocator (void) TAO_ORB_Core_TSS_Resources *tss = this->get_tss_resources (); if (tss == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("TAO_ORB_Core::input_cdr_buffer_allocator (); ") - ASYS_TEXT ("no more TSS keys")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("TAO_ORB_Core::input_cdr_buffer_allocator (); ") + ACE_TEXT ("no more TSS keys")), 0); if (tss->output_cdr_buffer_allocator_ == 0) @@ -1960,9 +1961,9 @@ TAO_ORB_Core::create_input_cdr_data_block (size_t size) TAO_ORB_Core_TSS_Resources *tss = this->get_tss_resources (); if (tss == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("TAO_ORB_Core::create_input_cdr_data_block (); ") - ASYS_TEXT ("no more TSS keys")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("TAO_ORB_Core::create_input_cdr_data_block (); ") + ACE_TEXT ("no more TSS keys")), 0); dblock_allocator = @@ -2053,8 +2054,8 @@ TAO_ORB_Core::get_thread_priority (CORBA::Short &priority) if (ACE_Thread::getprio (current, native_priority) == -1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - ORB_Core::get_thread_priority: ") - ASYS_TEXT (" ACE_Thread::get_prio\n"))); + ACE_TEXT ("TAO (%P|%t) - ORB_Core::get_thread_priority: ") + ACE_TEXT (" ACE_Thread::get_prio\n"))); return -1; } @@ -2064,8 +2065,8 @@ TAO_ORB_Core::get_thread_priority (CORBA::Short &priority) if (priority_mapping->to_CORBA (native_priority, priority) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - ORB_Core::get_thread_priority: ") - ASYS_TEXT (" Priority_Mapping::to_CORBA\n"))); + ACE_TEXT ("TAO (%P|%t) - ORB_Core::get_thread_priority: ") + ACE_TEXT (" Priority_Mapping::to_CORBA\n"))); return -1; } diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index ae7452df484..f11540b3336 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -229,7 +229,7 @@ CORBA::Object::_key (CORBA::Environment &) if (this->_stubobj () && this->_stubobj ()->profile_in_use ()) return this->_stubobj ()->profile_in_use ()->_key (); - ACE_ERROR_RETURN((LM_ERROR, ASYS_TEXT ("(%P|%t) Null stub obj!!!\n")), 0); + ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT ("(%P|%t) Null stub obj!!!\n")), 0); } const TAO_ObjectKey & @@ -651,7 +651,7 @@ operator>> (TAO_InputCDR& cdr, CORBA_Object*& x) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("WARNING: extracting object from default ORB_Core\n"))); + ACE_TEXT ("WARNING: extracting object from default ORB_Core\n"))); } } @@ -669,8 +669,8 @@ operator>> (TAO_InputCDR& cdr, CORBA_Object*& x) if (mp.profile_count () != profile_count) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) could not create all ") - ASYS_TEXT ("the profiles\n"))); + ACE_TEXT ("TAO (%P|%t) could not create all ") + ACE_TEXT ("the profiles\n"))); return 0; } diff --git a/TAO/tao/Operation_Table.cpp b/TAO/tao/Operation_Table.cpp index d5992812b44..c5ac60ba652 100644 --- a/TAO/tao/Operation_Table.cpp +++ b/TAO/tao/Operation_Table.cpp @@ -70,8 +70,8 @@ TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry // @@ (ASG): what happens if bind fails ??? if (this->bind (db[i].opname_, db[i].skel_ptr_) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("bind failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("bind failed"))); } TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void) @@ -143,7 +143,7 @@ TAO_Linear_Search_OpTable::find (const char *opname, const TAO_operation_db_entry *entry = lookup (opname); if (entry == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO_Linear_Search_Table:find failed\n")), + ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")), -1); // Valid entry. Figure out the skel_ptr. @@ -247,7 +247,7 @@ TAO_Perfect_Hash_OpTable::find (const char *opname, length); if (entry == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO_Perfect_Hash_Table:find failed\n")), + ACE_TEXT ("TAO_Perfect_Hash_Table:find failed\n")), -1); // Valid entry. Figure out the skel_ptr. @@ -290,7 +290,7 @@ TAO_Binary_Search_OpTable::find (const char *opname, if (entry == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO_Binary_Search_Table:find failed\n")), + ACE_TEXT ("TAO_Binary_Search_Table:find failed\n")), -1); // Valid entry. Figure out the skel_ptr. skelfunc = entry->skel_ptr_; diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp index d081be41c7e..704bc2fdd75 100644 --- a/TAO/tao/POA.cpp +++ b/TAO/tao/POA.cpp @@ -725,7 +725,7 @@ TAO_POA::is_servant_in_map (PortableServer::Servant servant) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TAO_POA::is_servant_in_map: waiting for servant to deactivate\n"))); + ACE_TEXT ("(%t) TAO_POA::is_servant_in_map: waiting for servant to deactivate\n"))); ++this->waiting_servant_deactivation_; @@ -762,7 +762,7 @@ TAO_POA::is_user_id_in_map (const PortableServer::ObjectId &id) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TAO_POA::is_user_id_in_map: waiting for servant to deactivate\n"))); + ACE_TEXT ("(%t) TAO_POA::is_user_id_in_map: waiting for servant to deactivate\n"))); ++this->waiting_servant_deactivation_; diff --git a/TAO/tao/POAS.cpp b/TAO/tao/POAS.cpp index 83fc211a96b..c608acd245a 100644 --- a/TAO/tao/POAS.cpp +++ b/TAO/tao/POAS.cpp @@ -210,7 +210,7 @@ void POA_PortableServer::ThreadPolicy::_dispatch (CORBA::ServerRequest &req, voi // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -493,7 +493,7 @@ void POA_PortableServer::LifespanPolicy::_dispatch (CORBA::ServerRequest &req, v // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -773,7 +773,7 @@ void POA_PortableServer::IdUniquenessPolicy::_dispatch (CORBA::ServerRequest &re // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -1056,7 +1056,7 @@ void POA_PortableServer::IdAssignmentPolicy::_dispatch (CORBA::ServerRequest &re // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -1340,7 +1340,7 @@ void POA_PortableServer::ImplicitActivationPolicy::_dispatch (CORBA::ServerReque // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -1622,7 +1622,7 @@ void POA_PortableServer::ServantRetentionPolicy::_dispatch (CORBA::ServerRequest // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else @@ -1904,7 +1904,7 @@ void POA_PortableServer::RequestProcessingPolicy::_dispatch (CORBA::ServerReques // find the skeleton corresponding to this opname if (this->_find (opname, skel) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Bad operation <%s>\n"), opname)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Bad operation <%s>\n"), opname)); ACE_THROW (CORBA_BAD_OPERATION ()); } else diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp index ccdd55d3877..cd4110fdbf5 100644 --- a/TAO/tao/Pluggable.cpp +++ b/TAO/tao/Pluggable.cpp @@ -293,7 +293,7 @@ TAO_Connector::make_mprofile (const char *string, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - TAO_Connector::make_mprofile <%s>\n"), + ACE_TEXT ("TAO (%P|%t) - TAO_Connector::make_mprofile <%s>\n"), string)); } diff --git a/TAO/tao/Pluggable_Messaging.cpp b/TAO/tao/Pluggable_Messaging.cpp index 1544877aac1..ae7ff98e869 100644 --- a/TAO/tao/Pluggable_Messaging.cpp +++ b/TAO/tao/Pluggable_Messaging.cpp @@ -40,9 +40,9 @@ TAO_Pluggable_Messaging:: transport_message (TAO_Transport *transport, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) closing conn %d after fault %p\n"), + ACE_TEXT ("TAO: (%P|%t|%N|%l) closing conn %d after fault %p\n"), transport->handle (), - ASYS_TEXT ("transport_message ()\n"))); + ACE_TEXT ("transport_message ()\n"))); return -1; } @@ -52,8 +52,8 @@ TAO_Pluggable_Messaging:: transport_message (TAO_Transport *transport, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t|%N|%l) send_message () \n") - ASYS_TEXT ("EOF, closing conn %d\n"), + ACE_TEXT ("TAO: (%P|%t|%N|%l) send_message () \n") + ACE_TEXT ("EOF, closing conn %d\n"), transport->handle())); return -1; } diff --git a/TAO/tao/Pool_Per_Endpoint.cpp b/TAO/tao/Pool_Per_Endpoint.cpp index e2d28d8c409..74dc25f358c 100644 --- a/TAO/tao/Pool_Per_Endpoint.cpp +++ b/TAO/tao/Pool_Per_Endpoint.cpp @@ -52,7 +52,7 @@ TAO_Pool_Per_Endpoint::run (CORBA::Environment &ACE_TRY_ENV) if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - creating thread at priority %d:%d\n"), + ACE_TEXT ("TAO (%P|%t) - creating thread at priority %d:%d\n"), priority, corba_priority)); #endif /* TAO_HAS_RT_CORBA == 1 */ if (this->activate (this->flags_, @@ -71,16 +71,16 @@ TAO_Pool_Per_Endpoint::svc (void) { if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") - ASYS_TEXT (" using reactor <%x> in this thread\n"), + ACE_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") + ACE_TEXT (" using reactor <%x> in this thread\n"), this->orb_->orb_core ()->reactor ())); this->orb_->run (); if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") - ASYS_TEXT (" ORB::run() finished\n"))); + ACE_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") + ACE_TEXT (" ORB::run() finished\n"))); return 0; } diff --git a/TAO/tao/Reactor_Per_Priority.cpp b/TAO/tao/Reactor_Per_Priority.cpp index 273901a85c8..b9f3cb1a03b 100644 --- a/TAO/tao/Reactor_Per_Priority.cpp +++ b/TAO/tao/Reactor_Per_Priority.cpp @@ -42,8 +42,8 @@ TAO_Reactor_Per_Priority::reactor (void) { if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - Reactor_Per_Priority::reactor: ") - ASYS_TEXT (" cannot get priority for this thread\n"))); + ACE_TEXT ("TAO (%P|%t) - Reactor_Per_Priority::reactor: ") + ACE_TEXT (" cannot get priority for this thread\n"))); return 0; } @@ -108,7 +108,7 @@ TAO_Reactor_Per_Priority::leader_follower_i (CORBA::Short priority) { if (TAO_debug_level > 3) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - new priority %d\n"), + ACE_TEXT ("TAO (%P|%t) - new priority %d\n"), priority)); // The priority is new, create an entry in the table. ACE_NEW_RETURN (leader_follower, diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp index 1a6b96f32ed..ad378c52112 100644 --- a/TAO/tao/Reply_Dispatcher.cpp +++ b/TAO/tao/Reply_Dispatcher.cpp @@ -275,7 +275,7 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( if (TAO_debug_level >= 4) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P | %t):TAO_Asynch_Reply_Dispatcher::dispatch_reply:\n"))); + ACE_TEXT ("(%P | %t):TAO_Asynch_Reply_Dispatcher::dispatch_reply:\n"))); } ACE_TRY_NEW_ENV diff --git a/TAO/tao/Request.cpp b/TAO/tao/Request.cpp index 00e1d901f47..9155ad43352 100644 --- a/TAO/tao/Request.cpp +++ b/TAO/tao/Request.cpp @@ -221,7 +221,7 @@ CORBA_Request::handle_response (TAO_InputCDR &incoming, default: // @@ (JP) Don't know what to do about any of these yet. ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) unhandled reply status\n"))); + ACE_TEXT ("(%P|%t) unhandled reply status\n"))); } } diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp index 85253d50173..e625c78f935 100644 --- a/TAO/tao/SHMIOP_Acceptor.cpp +++ b/TAO/tao/SHMIOP_Acceptor.cpp @@ -197,7 +197,7 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core) -1); // We only accept connection on localhost. - // ACE_INET_Addr local_addr (addr.get_port_number (), ASYS_TEXT ("localhost")); + // ACE_INET_Addr local_addr (addr.get_port_number (), ACE_TEXT ("localhost")); if (this->base_acceptor_.open (this->address_, this->orb_core_->reactor (this), this->creation_strategy_, @@ -206,8 +206,8 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), - ASYS_TEXT ("cannot open acceptor"))); + ACE_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), + ACE_TEXT ("cannot open acceptor"))); return -1; } @@ -219,8 +219,8 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), - ASYS_TEXT ("cannot get local addr"))); + ACE_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), + ACE_TEXT ("cannot get local addr"))); return -1; } @@ -231,8 +231,8 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), - ASYS_TEXT ("cannot cache hostname"))); + ACE_TEXT ("\n\nTAO (%P|%t) SHMIOP_Acceptor::open_i - %p\n\n"), + ACE_TEXT ("cannot cache hostname"))); return -1; } this->host_ = tmp_host; @@ -240,8 +240,8 @@ TAO_SHMIOP_Acceptor::open_i (TAO_ORB_Core* orb_core) if (TAO_debug_level > 5) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nTAO (%P|%t) SHMIOP_Acceptor::open_i - ") - ASYS_TEXT ("listening on %s using: <localhost:%u>\n"), + ACE_TEXT ("\nTAO (%P|%t) SHMIOP_Acceptor::open_i - ") + ACE_TEXT ("listening on %s using: <localhost:%u>\n"), this->host_.c_str (), this->address_.get_port_number ())); } @@ -306,7 +306,7 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Zero length SHMIOP option.\n")), + ACE_TEXT ("TAO (%P|%t) Zero length SHMIOP option.\n")), -1); else if (end != ACE_CString::npos) { @@ -317,8 +317,8 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) if (slot == ACE_static_cast (int, len - 1) || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) SHMIOP option <%s> is ") - ASYS_TEXT ("missing a value.\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP option <%s> is ") + ACE_TEXT ("missing a value.\n"), opt.c_str ()), -1); @@ -327,8 +327,8 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) if (name.length () == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Zero length SHMIOP ") - ASYS_TEXT ("option name.\n")), + ACE_TEXT ("TAO (%P|%t) Zero length SHMIOP ") + ACE_TEXT ("option name.\n")), -1); if (name == "priority") @@ -345,14 +345,14 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) this->priority_ = corba_priority; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Invalid SHMIOP endpoint ") - ASYS_TEXT ("priority: <%s>\n"), + ACE_TEXT ("TAO (%P|%t) Invalid SHMIOP endpoint ") + ACE_TEXT ("priority: <%s>\n"), value.c_str ()), -1); } else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Invalid SHMIOP option: <%s>\n"), + ACE_TEXT ("TAO (%P|%t) Invalid SHMIOP option: <%s>\n"), name.c_str ()), -1); } diff --git a/TAO/tao/SHMIOP_Acceptor.h b/TAO/tao/SHMIOP_Acceptor.h index 64edfca3faf..feec7372933 100644 --- a/TAO/tao/SHMIOP_Acceptor.h +++ b/TAO/tao/SHMIOP_Acceptor.h @@ -106,7 +106,7 @@ private: TAO_SHMIOP_ACCEPT_STRATEGY *accept_strategy_; // Acceptor strategies. - ASYS_TCHAR *mmap_file_prefix_; + ACE_TCHAR *mmap_file_prefix_; // Determine the prefix (include path name) of the mmap file. off_t mmap_size_; diff --git a/TAO/tao/SHMIOP_Connect.cpp b/TAO/tao/SHMIOP_Connect.cpp index 94cf26450e9..8c5dffa6f65 100644 --- a/TAO/tao/SHMIOP_Connect.cpp +++ b/TAO/tao/SHMIOP_Connect.cpp @@ -160,7 +160,7 @@ TAO_SHMIOP_Server_Connection_Handler::open (void*) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP connection from client <%s> on %d\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP connection from client <%s> on %d\n"), client, this->peer ().get_handle ())); return 0; @@ -180,8 +180,8 @@ TAO_SHMIOP_Server_Connection_Handler::activate (long flags, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::activate %d ") - ASYS_TEXT ("threads, flags = %d\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::activate %d ") + ACE_TEXT ("threads, flags = %d\n"), n_threads, flags, THR_BOUND)); @@ -204,8 +204,8 @@ TAO_SHMIOP_Server_Connection_Handler::handle_close (ACE_HANDLE handle, { if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::handle_close ") - ASYS_TEXT ("(%d, %d)\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::handle_close ") + ACE_TEXT ("(%d, %d)\n"), handle, rm)); @@ -232,7 +232,7 @@ TAO_SHMIOP_Server_Connection_Handler::svc (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc begin\n"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc begin\n"))); // Here we simply synthesize the "typical" event loop one might find // in a reactive handler, except that this can simply block waiting @@ -260,13 +260,13 @@ TAO_SHMIOP_Server_Connection_Handler::svc (void) current_timeout = timeout; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc - ") - ASYS_TEXT ("loop <%d>\n"), current_timeout.msec ())); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc - ") + ACE_TEXT ("loop <%d>\n"), current_timeout.msec ())); } if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc end\n"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Server_Connection_Handler::svc end\n"))); return result; } @@ -291,9 +291,9 @@ TAO_SHMIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, if (result == -1 && TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("SHMIOP_Server_Connection_Handler::handle_input, ") - ASYS_TEXT ("handle_input"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("SHMIOP_Server_Connection_Handler::handle_input, ") + ACE_TEXT ("handle_input"))); } if (result == 0 || result == -1) @@ -397,7 +397,7 @@ TAO_SHMIOP_Client_Connection_Handler::open (void *) (void *) &nodelay, sizeof (nodelay)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("NODELAY failed\n")), + ACE_TEXT ("NODELAY failed\n")), -1); #endif /* TCP_NODELAY */ @@ -419,7 +419,7 @@ TAO_SHMIOP_Client_Connection_Handler::open (void *) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP connection to server <%s> on %d\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP connection to server <%s> on %d\n"), server, this->peer ().get_handle ())); // Register the handler with the Reactor if necessary. @@ -468,8 +468,8 @@ TAO_SHMIOP_Client_Connection_Handler::handle_close (ACE_HANDLE handle, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Client_Connection_Handler::") - ASYS_TEXT ("handle_close (%d, %d)\n"), handle, rm)); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Client_Connection_Handler::") + ACE_TEXT ("handle_close (%d, %d)\n"), handle, rm)); if (this->recycler ()) this->recycler ()->mark_as_closed (this->recycling_act ()); @@ -491,8 +491,8 @@ TAO_SHMIOP_Client_Connection_Handler::handle_close_i (ACE_HANDLE handle, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Client_Connection_Handler::") - ASYS_TEXT ("handle_close_i (%d, %d)\n"), handle, rm)); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Client_Connection_Handler::") + ACE_TEXT ("handle_close_i (%d, %d)\n"), handle, rm)); if (this->recycler ()) this->recycler ()->mark_as_closed_i (this->recycling_act ()); diff --git a/TAO/tao/SHMIOP_Connector.cpp b/TAO/tao/SHMIOP_Connector.cpp index 17017be6473..7f349c59325 100644 --- a/TAO/tao/SHMIOP_Connector.cpp +++ b/TAO/tao/SHMIOP_Connector.cpp @@ -490,8 +490,8 @@ TAO_SHMIOP_Connector::connect (TAO_Profile *profile, profile->addr_to_string (buffer, (MAXNAMELEN * 2) - 1); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %s:%u, connection to ") - ASYS_TEXT ("%s failed (%p)\n"), + ACE_TEXT ("(%P|%t) %s:%u, connection to ") + ACE_TEXT ("%s failed (%p)\n"), __FILE__, __LINE__, buffer, @@ -512,7 +512,7 @@ TAO_SHMIOP_Connector::connect (TAO_Profile *profile, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); + ACE_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); } return -1; } @@ -589,8 +589,8 @@ TAO_SHMIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) No port specified for <%s>. ") - ASYS_TEXT ("Using <%d> as default port.\n"), + ACE_TEXT ("TAO (%P|%t) No port specified for <%s>. ") + ACE_TEXT ("Using <%d> as default port.\n"), where, dest.get_port_number ())); } @@ -649,14 +649,14 @@ TAO_SHMIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") - ASYS_TEXT ("succeeded.\n"), + ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> ") + ACE_TEXT ("succeeded.\n"), remote_addrs[slot].get_host_name (), remote_addrs[slot].get_port_number ())); } else if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Preconnection <%s:%d> failed.\n"), + ACE_TEXT ("TAO (%P|%t) Preconnection <%s:%d> failed.\n"), remote_addrs[slot].get_host_name (), remote_addrs[slot].get_port_number ())); } @@ -665,8 +665,8 @@ TAO_SHMIOP_Connector::preconnect (const char *preconnects) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) IIOP preconnections: %d successes and ") - ASYS_TEXT ("%d failures.\n"), + ACE_TEXT ("TAO (%P|%t) IIOP preconnections: %d successes and ") + ACE_TEXT ("%d failures.\n"), successes, num_connections - successes)); } diff --git a/TAO/tao/SHMIOP_Factory.cpp b/TAO/tao/SHMIOP_Factory.cpp index 62d4a45966d..75e04cbc5b4 100644 --- a/TAO/tao/SHMIOP_Factory.cpp +++ b/TAO/tao/SHMIOP_Factory.cpp @@ -78,7 +78,7 @@ TAO_SHMIOP_Protocol_Factory::requires_explicit_endpoint (void) const } ACE_STATIC_SVC_DEFINE (TAO_SHMIOP_Protocol_Factory, - ASYS_TEXT ("SHMIOP_Factory"), + ACE_TEXT ("SHMIOP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_SHMIOP_Protocol_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/tao/SHMIOP_Profile.cpp b/TAO/tao/SHMIOP_Profile.cpp index 5527d81d364..ffbe9fb41cc 100644 --- a/TAO/tao/SHMIOP_Profile.cpp +++ b/TAO/tao/SHMIOP_Profile.cpp @@ -155,8 +155,8 @@ TAO_SHMIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") - ASYS_TEXT ("v%d.%d\n"), + ACE_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") + ACE_TEXT ("v%d.%d\n"), this->version_.major, this->version_.minor)); } @@ -169,8 +169,8 @@ TAO_SHMIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") - ASYS_TEXT ("error while decoding host/port"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") + ACE_TEXT ("error while decoding host/port"))); } return -1; } @@ -181,8 +181,8 @@ TAO_SHMIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") - ASYS_TEXT ("ACE_INET_Addr::set() failed\n"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Profile::decode - ") + ACE_TEXT ("ACE_INET_Addr::set() failed\n"))); } return -1; } @@ -203,8 +203,8 @@ TAO_SHMIOP_Profile::decode (TAO_InputCDR& cdr) // If there is extra data in the profile we are supposed to // ignore it, but print a warning just in case... ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d bytes out of %d left after SHMIOP ") - ASYS_TEXT ("profile data\n"), + ACE_TEXT ("%d bytes out of %d left after SHMIOP ") + ACE_TEXT ("profile data\n"), cdr.length (), encap_len)); } @@ -316,8 +316,8 @@ TAO_SHMIOP_Profile::parse_string (const char *string, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Profile::parse_string () - \n") - ASYS_TEXT ("TAO (%P|%t) ACE_INET_Addr::set () failed"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Profile::parse_string () - \n") + ACE_TEXT ("TAO (%P|%t) ACE_INET_Addr::set () failed"))); } return -1; } diff --git a/TAO/tao/SHMIOP_Transport.cpp b/TAO/tao/SHMIOP_Transport.cpp index f44ac86ec13..db2ab2322f1 100644 --- a/TAO/tao/SHMIOP_Transport.cpp +++ b/TAO/tao/SHMIOP_Transport.cpp @@ -224,8 +224,8 @@ TAO_SHMIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) SHMIOP_Transport::handle_client_input -") - ASYS_TEXT (" nil message state\n"))); + ACE_TEXT ("TAO (%P|%t) SHMIOP_Transport::handle_client_input -") + ACE_TEXT (" nil message state\n"))); return -1; } @@ -237,8 +237,8 @@ TAO_SHMIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("SHMIOP_Transport::handle_client_input, handle_input"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("SHMIOP_Transport::handle_client_input, handle_input"))); return -1; } if (result == 0) @@ -253,8 +253,8 @@ TAO_SHMIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - %p\n"), - ASYS_TEXT ("SHMIOP_Transport::handle_client_input, parse reply"))); + ACE_TEXT ("TAO (%P|%t) - %p\n"), + ACE_TEXT ("SHMIOP_Transport::handle_client_input, parse reply"))); message_state->reset (); return -1; } @@ -270,9 +270,9 @@ TAO_SHMIOP_Client_Transport::handle_client_input (int /* block */, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) : SHMIOP_Client_Transport::") - ASYS_TEXT ("handle_client_input - ") - ASYS_TEXT ("dispatch reply failed\n"))); + ACE_TEXT ("TAO (%P|%t) : SHMIOP_Client_Transport::") + ACE_TEXT ("handle_client_input - ") + ACE_TEXT ("dispatch reply failed\n"))); message_state->reset (); return -1; } @@ -340,7 +340,7 @@ TAO_SHMIOP_Client_Transport::messaging_init (CORBA::Octet major, if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), 0); } } @@ -350,7 +350,7 @@ TAO_SHMIOP_Client_Transport::messaging_init (CORBA::Octet major, if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), 0); } } diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp index ed67189d3b5..4be37dc2884 100644 --- a/TAO/tao/Stub.cpp +++ b/TAO/tao/Stub.cpp @@ -61,8 +61,8 @@ TAO_Stub::TAO_Stub (char *repository_id, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO: (%P|%t) TAO_Stub created with default ") - ASYS_TEXT ("ORB core\n"))); + ACE_TEXT ("TAO: (%P|%t) TAO_Stub created with default ") + ACE_TEXT ("ORB core\n"))); } this->orb_core_ = TAO_ORB_Core_instance (); } @@ -155,7 +155,7 @@ TAO_Stub::hash (CORBA::ULong max, // we rely on the profile object that its address info if (profile_in_use_) return profile_in_use_->hash (max, ACE_TRY_ENV); - ACE_ERROR_RETURN((LM_ERROR, ASYS_TEXT ("(%P|%t) hash called on a null profile!\n")), 0); + ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT ("(%P|%t) hash called on a null profile!\n")), 0); } // Expensive comparison of objref data, to see if two objrefs diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i index 969882d3da2..925b440a5f6 100644 --- a/TAO/tao/Stub.i +++ b/TAO/tao/Stub.i @@ -12,7 +12,7 @@ TAO_Stub::set_profile_in_use_i (TAO_Profile *pfile) if (pfile && (pfile->_incr_refcnt () == 0)) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) unable to increment profile ref!\n")), + ACE_TEXT ("(%P|%t) unable to increment profile ref!\n")), 0); } diff --git a/TAO/tao/TAO.cpp b/TAO/tao/TAO.cpp index 1c58b447e47..634e339d8a8 100644 --- a/TAO/tao/TAO.cpp +++ b/TAO/tao/TAO.cpp @@ -64,7 +64,7 @@ TAO_ORB_Manager::init (int &argc, if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) Unable to initialize the POA.\n")), + ACE_TEXT (" (%P|%t) Unable to initialize the POA.\n")), -1); // Get the POA object. @@ -118,7 +118,7 @@ TAO_ORB_Manager::init_child_poa (int& argc, if (init_result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) Error in init.\n")), + ACE_TEXT (" (%P|%t) Error in init.\n")), -1); // Create the default policies - user-supplied ID, and persistent @@ -224,8 +224,8 @@ TAO_ORB_Manager::activate_under_child_poa (const char* object_name, { if (object_name == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("\n(%P|%t) TAO_ORB_Manager::register: ") - ASYS_TEXT ("object_name is null!")), + ACE_TEXT ("\n(%P|%t) TAO_ORB_Manager::register: ") + ACE_TEXT ("object_name is null!")), 0); PortableServer::ObjectId_var id = @@ -282,8 +282,8 @@ TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV, if (status == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ASYS_TEXT ("run")), + ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), + ACE_TEXT ("run")), -1); return 0; } @@ -300,8 +300,8 @@ TAO_ORB_Manager::run (ACE_Time_Value &tv, if (status == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ASYS_TEXT ("run")), + ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), + ACE_TEXT ("run")), -1); return 0; } @@ -332,8 +332,8 @@ TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV) if (status == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ASYS_TEXT ("run")), + ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), + ACE_TEXT ("run")), -1); return 0; } diff --git a/TAO/tao/Transport_Mux_Strategy.cpp b/TAO/tao/Transport_Mux_Strategy.cpp index c970eb78765..3972ed3060b 100644 --- a/TAO/tao/Transport_Mux_Strategy.cpp +++ b/TAO/tao/Transport_Mux_Strategy.cpp @@ -84,7 +84,7 @@ TAO_Exclusive_TMS::dispatch_reply (CORBA::ULong request_id, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Exclusive_TMS::dispatch_reply - <%d != %d>\n"), + ACE_TEXT ("TAO_Exclusive_TMS::dispatch_reply - <%d != %d>\n"), this->request_id_, request_id)); return 0; } @@ -203,8 +203,8 @@ TAO_Muxed_TMS::bind_dispatcher (CORBA::ULong request_id, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P | %t):TAO_Muxed_TMS::bind_dispatcher: ") - ASYS_TEXT ("bind dispatcher failed: result = %d\n"), + ACE_TEXT ("(%P | %t):TAO_Muxed_TMS::bind_dispatcher: ") + ACE_TEXT ("bind dispatcher failed: result = %d\n"), result)); return -1; @@ -236,8 +236,8 @@ TAO_Muxed_TMS::dispatch_reply (CORBA::ULong request_id, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P | %t):TAO_Muxed_TMS::dispatch_reply: ") - ASYS_TEXT ("unbind dispatcher failed: result = %d\n"), + ACE_TEXT ("(%P | %t):TAO_Muxed_TMS::dispatch_reply: ") + ACE_TEXT ("unbind dispatcher failed: result = %d\n"), result)); return -1; diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp index 51d4b92a169..3bd3fdaeb95 100644 --- a/TAO/tao/Typecode.cpp +++ b/TAO/tao/Typecode.cpp @@ -1952,8 +1952,8 @@ CORBA_TypeCode::private_member_label (CORBA::ULong n, || !stream.read_ulong (member_count)) // member count { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TypeCode::private_member_label -- ") - ASYS_TEXT ("error reading from stream"))); + ACE_TEXT ("TypeCode::private_member_label -- ") + ACE_TEXT ("error reading from stream"))); ACE_THROW_RETURN (CORBA::BAD_TYPECODE (), 0); } @@ -2030,8 +2030,8 @@ CORBA_TypeCode::private_member_label (CORBA::ULong n, { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TypeCode::private_member_label ") - ASYS_TEXT ("error getting typecode for member %d\n"), + ACE_TEXT ("TypeCode::private_member_label ") + ACE_TEXT ("error getting typecode for member %d\n"), i)); ACE_THROW_RETURN (CORBA::BAD_TYPECODE (), 0); diff --git a/TAO/tao/UIOP_Connector.cpp b/TAO/tao/UIOP_Connector.cpp index 966469daa8e..c3c0c6c2ec1 100644 --- a/TAO/tao/UIOP_Connector.cpp +++ b/TAO/tao/UIOP_Connector.cpp @@ -509,8 +509,8 @@ TAO_UIOP_Connector::connect (TAO_Profile *profile, profile->addr_to_string (buffer, (MAXNAMELEN * 2) - 1); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %s:%u, connection to ") - ASYS_TEXT ("%s failed (%p)\n"), + ACE_TEXT ("(%P|%t) %s:%u, connection to ") + ACE_TEXT ("%s failed (%p)\n"), __FILE__, __LINE__, buffer, @@ -530,7 +530,7 @@ TAO_UIOP_Connector::connect (TAO_Profile *profile, if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); + ACE_TEXT ("(%N|%l|%p|%t) init_mesg_protocol () failed \n"))); } return -1; } diff --git a/TAO/tao/UIOP_Factory.cpp b/TAO/tao/UIOP_Factory.cpp index 09fc3875bed..5b0132e4c32 100644 --- a/TAO/tao/UIOP_Factory.cpp +++ b/TAO/tao/UIOP_Factory.cpp @@ -80,7 +80,7 @@ TAO_UIOP_Protocol_Factory::requires_explicit_endpoint (void) const } ACE_STATIC_SVC_DEFINE (TAO_UIOP_Protocol_Factory, - ASYS_TEXT ("UIOP_Factory"), + ACE_TEXT ("UIOP_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_UIOP_Protocol_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/tao/UIOP_Lite_Factory.cpp b/TAO/tao/UIOP_Lite_Factory.cpp index 651be0dc1cf..b63f2c8d08d 100644 --- a/TAO/tao/UIOP_Lite_Factory.cpp +++ b/TAO/tao/UIOP_Lite_Factory.cpp @@ -84,7 +84,7 @@ TAO_UIOP_Lite_Protocol_Factory::requires_explicit_endpoint (void) const } ACE_STATIC_SVC_DEFINE (TAO_UIOP_Lite_Protocol_Factory, - ASYS_TEXT ("UIOP_Lite_Factory"), + ACE_TEXT ("UIOP_Lite_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_UIOP_Lite_Protocol_Factory), ACE_Service_Type::DELETE_THIS | diff --git a/TAO/tao/UIOP_Profile.cpp b/TAO/tao/UIOP_Profile.cpp index 42095a05b31..38047b4830e 100644 --- a/TAO/tao/UIOP_Profile.cpp +++ b/TAO/tao/UIOP_Profile.cpp @@ -336,8 +336,8 @@ TAO_UIOP_Profile::decode (TAO_InputCDR& cdr) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) UIOP_Profile::decode - ") - ASYS_TEXT ("ACE_UNIX_Addr::set() failed\n"))); + ACE_TEXT ("TAO (%P|%t) UIOP_Profile::decode - ") + ACE_TEXT ("ACE_UNIX_Addr::set() failed\n"))); } return -1; } diff --git a/TAO/tao/UIOP_Transport.cpp b/TAO/tao/UIOP_Transport.cpp index 54251e9fbde..21e2c8ddf87 100644 --- a/TAO/tao/UIOP_Transport.cpp +++ b/TAO/tao/UIOP_Transport.cpp @@ -351,7 +351,7 @@ TAO_UIOP_Client_Transport:: if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), 0); } } @@ -361,7 +361,7 @@ TAO_UIOP_Client_Transport:: if (TAO_debug_level > 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), + ACE_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), 0); } } diff --git a/TAO/tao/ValueBase.cpp b/TAO/tao/ValueBase.cpp index 6037f7bb9c3..13512177934 100644 --- a/TAO/tao/ValueBase.cpp +++ b/TAO/tao/ValueBase.cpp @@ -134,7 +134,7 @@ CORBA_ValueBase::_tao_unmarshal (TAO_InputCDR &, // new_object->_tao_unmarshal_v () // new_object->_tao_unmarshal_post () - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("unimpl. CORBA::ValueBase::_tao_unmarshal\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("unimpl. CORBA::ValueBase::_tao_unmarshal\n"))); return 0; // %! } @@ -177,7 +177,7 @@ CORBA_ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, if (!TAO_OBV_GIOP_Flags::is_value_tag (value_tag)) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("!CORBA::ValueBase::_tao_unmarshal_pre not value_tag\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("!CORBA::ValueBase::_tao_unmarshal_pre not value_tag\n"))); return 0; } @@ -200,7 +200,7 @@ CORBA_ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, ->lookup_value_factory (repo_id_stream.in()); if (factory == 0) // %! except.! { - ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("(%N:%l) OBV factory is null !!!\n"))); + ACE_DEBUG ((LM_ERROR, ACE_TEXT ("(%N:%l) OBV factory is null !!!\n"))); return 0; } diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index f6a9eb319ff..7076770f15e 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -193,7 +193,7 @@ TAO_Exclusive_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core, this->calling_thread_ = ACE_Thread::self (); if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("TAO (%P|%t) - sending request for <%x>\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - sending request for <%x>\n"), this->transport_)); // Register the handler. @@ -433,15 +433,15 @@ TAO_Exclusive_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (leader_follower.elect_new_leader () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): TAO_Wait_On_LF::wait - ") - ASYS_TEXT ("Failed to unset the leader and wake up a ") - ASYS_TEXT ("new follower.\n")), + ACE_TEXT ("TAO (%P|%t): TAO_Wait_On_LF::wait - ") + ACE_TEXT ("Failed to unset the leader and wake up a ") + ACE_TEXT ("new follower.\n")), -1); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t): TAO_Wait_On_LF::wait: %p.\n"), - ASYS_TEXT ("handle_events failed")), + ACE_TEXT ("TAO (%P|%t): TAO_Wait_On_LF::wait: %p.\n"), + ACE_TEXT ("handle_events failed")), -1); // Return an error if there was a problem receiving the reply... @@ -507,8 +507,8 @@ TAO_Exclusive_Wait_On_Leader_Follower::handle_input (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") - ASYS_TEXT ("unexpected on <%x>\n"), + ACE_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") + ACE_TEXT ("unexpected on <%x>\n"), this->transport_)); return -1; } @@ -526,8 +526,8 @@ TAO_Exclusive_Wait_On_Leader_Follower::handle_input (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") - ASYS_TEXT ("handle_client_input == -1\n"))); + ACE_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") + ACE_TEXT ("handle_client_input == -1\n"))); this->reply_received_ = -1; } @@ -681,7 +681,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - wait (follower) on Transport <%x>, cond <%x>\n"), + ACE_TEXT ("TAO (%P|%t) - wait (follower) on Transport <%x>, cond <%x>\n"), this->transport_, cond)); @@ -695,8 +695,8 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, { if (leader_follower.add_follower (cond) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) TAO_Muxed_Wait_On_Leader_Follower::wait - ") - ASYS_TEXT ("add_follower failed for <%x>\n"), + ACE_TEXT ("TAO (%P|%t) TAO_Muxed_Wait_On_Leader_Follower::wait - ") + ACE_TEXT ("add_follower failed for <%x>\n"), cond)); } @@ -710,8 +710,8 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, { if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - wait (follower) on <%x> ") - ASYS_TEXT ("cond == 0 || cond->wait () == -1 : cond = %d\n"), + ACE_TEXT ("TAO (%P|%t) - wait (follower) on <%x> ") + ACE_TEXT ("cond == 0 || cond->wait () == -1 : cond = %d\n"), this->transport_, (cond == 0) ? 0 : cond)); return -1; } @@ -725,8 +725,8 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, { if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - wait (follower) on <%x> ") - ASYS_TEXT ("cond == 0 || cond->wait (tv) == -1\n"), + ACE_TEXT ("TAO (%P|%t) - wait (follower) on <%x> ") + ACE_TEXT ("cond == 0 || cond->wait (tv) == -1\n"), this->transport_)); return -1; } @@ -747,7 +747,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - done (follower) on <%x>, reply_received %d\n"), + ACE_TEXT ("TAO (%P|%t) - done (follower) on <%x>, reply_received %d\n"), this->transport_, reply_received)); // Now somebody woke us up to become a leader or to handle our @@ -788,7 +788,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - wait (leader):to enter reactor event loop on <%x>\n"), + ACE_TEXT ("TAO (%P|%t) - wait (leader):to enter reactor event loop on <%x>\n"), this->transport_)); while (1) @@ -816,7 +816,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - wait : (leader) : done with reactor event loop on <%x>\n"), + ACE_TEXT ("TAO (%P|%t) - wait : (leader) : done with reactor event loop on <%x>\n"), this->transport_)); } } @@ -835,14 +835,14 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, if (leader_follower.elect_new_leader () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO:%N:%l:(%P|%t):TAO_Muxed_Wait_On_Leader_Follower::send_request: ") - ASYS_TEXT ("Failed to unset the leader and wake up a new follower.\n")), + ACE_TEXT ("TAO:%N:%l:(%P|%t):TAO_Muxed_Wait_On_Leader_Follower::send_request: ") + ACE_TEXT ("Failed to unset the leader and wake up a new follower.\n")), -1); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO:%N:%l:(%P|%t):TAO_Muxed_Wait_On_Leader_Follower::wait: ") - ASYS_TEXT ("handle_events failed.\n")), + ACE_TEXT ("TAO:%N:%l:(%P|%t):TAO_Muxed_Wait_On_Leader_Follower::wait: ") + ACE_TEXT ("handle_events failed.\n")), -1); // Return an error if there was a problem receiving the reply... @@ -883,7 +883,7 @@ TAO_Muxed_Wait_On_Leader_Follower::handle_input (void) if (TAO_debug_level >= 5) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - reading reply on <%x>\n"), + ACE_TEXT ("TAO (%P|%t) - reading reply on <%x>\n"), this->transport_)); // Receive any data that is available, without blocking... @@ -898,8 +898,8 @@ TAO_Muxed_Wait_On_Leader_Follower::handle_input (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") - ASYS_TEXT ("handle_client_input == -1\n"))); + ACE_TEXT ("TAO (%P|%t) - Wait_On_LF::handle_input, ") + ACE_TEXT ("handle_client_input == -1\n"))); // this->reply_received_ = -1; } diff --git a/TAO/tao/append.cpp b/TAO/tao/append.cpp index a3a05e6159d..ee97f042223 100644 --- a/TAO/tao/append.cpp +++ b/TAO/tao/append.cpp @@ -87,7 +87,7 @@ TAO_Marshal_Primitive::append (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Primitive::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_Primitive::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -122,7 +122,7 @@ TAO_Marshal_Any::append (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Any::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_Any::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -204,8 +204,8 @@ TAO_Marshal_TypeCode::append (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode: ") - ASYS_TEXT ("Bad kind_ value in CDR stream\n"))); + ACE_TEXT ("TAO_Marshal_TypeCode: ") + ACE_TEXT ("Bad kind_ value in CDR stream\n"))); ACE_THROW_RETURN (CORBA::BAD_TYPECODE (), CORBA::TypeCode::TRAVERSE_STOP); @@ -218,7 +218,7 @@ TAO_Marshal_TypeCode::append (CORBA::TypeCode_ptr, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_TypeCode::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -299,7 +299,7 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr, return CORBA::TypeCode::TRAVERSE_CONTINUE; if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("TAO_Marshal_ObjRef::append detected error\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO_Marshal_ObjRef::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -341,7 +341,7 @@ TAO_Marshal_Struct::append (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Struct::encode detected error\n"))); + ACE_TEXT ("TAO_Marshal_Struct::encode detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -592,7 +592,7 @@ TAO_Marshal_String::append (CORBA::TypeCode_ptr, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode::append detected error"))); + ACE_TEXT ("TAO_Marshal_TypeCode::append detected error"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), @@ -643,7 +643,7 @@ TAO_Marshal_Sequence::append (CORBA::TypeCode_ptr tc, // error exit if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("marshaling TAO_Marshal_Sequence::append detected error\n"))); + ACE_TEXT ("marshaling TAO_Marshal_Sequence::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::TypeCode::TRAVERSE_STOP); @@ -688,7 +688,7 @@ TAO_Marshal_Array::append (CORBA::TypeCode_ptr tc, // error exit if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Sequence::append detected error"))); + ACE_TEXT ("TAO_Marshal_Sequence::append detected error"))); ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::TypeCode::TRAVERSE_STOP); @@ -722,7 +722,7 @@ TAO_Marshal_Alias::append (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Alias::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_Alias::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -769,7 +769,7 @@ TAO_Marshal_Except::append (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Except::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_Except::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -799,7 +799,7 @@ TAO_Marshal_WString::append (CORBA::TypeCode_ptr, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_WString::append detected error\n"))); + ACE_TEXT ("TAO_Marshal_WString::append detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index c889dd18ab9..e4c912af861 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -77,9 +77,9 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char ** argv) "-ORBIIOPProfileLock") == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("WARNING: The -ORBIIOPProfileLock option") - ASYS_TEXT (" is deprecated and will be removed.\n") - ASYS_TEXT (" Please use -ORBProfileLock instead\n"))); + ACE_TEXT ("WARNING: The -ORBIIOPProfileLock option") + ACE_TEXT (" is deprecated and will be removed.\n") + ACE_TEXT (" Please use -ORBProfileLock instead\n"))); curarg++; if (curarg < argc) { @@ -241,7 +241,7 @@ TAO_Default_Client_Strategy_Factory::create_cached_connector_lock (void) // **************************************************************** ACE_STATIC_SVC_DEFINE (TAO_Default_Client_Strategy_Factory, - ASYS_TEXT ("Client_Strategy_Factory"), + ACE_TEXT ("Client_Strategy_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_Default_Client_Strategy_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 8e31058b01e..5e7bc0ea3d0 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -86,8 +86,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) "-ORBReactorLock") == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Resource obsolete -ORBReactorLock ") - ASYS_TEXT ("option, please use -ORBReactorType\n"))); + ACE_TEXT ("TAO_Default_Resource obsolete -ORBReactorLock ") + ACE_TEXT ("option, please use -ORBReactorType\n"))); curarg++; if (curarg < argc) { @@ -131,8 +131,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->reactor_registry_type_ = TAO_REACTOR_PER_PRIORITY; else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT (" <%s> for -ORBReactorRegistry\n"), name)); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT (" <%s> for -ORBReactorRegistry\n"), name)); } } @@ -156,16 +156,16 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) reactor_type_ = TAO_REACTOR_FL; #else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - FlReactor") - ASYS_TEXT (" not supported on this platform\n"))); + ACE_TEXT ("TAO_Default_Factory - FlReactor") + ACE_TEXT (" not supported on this platform\n"))); #endif /* ACE_HAS_FL */ else if (ACE_OS::strcasecmp (name, "tk_reactor") == 0) #if defined(ACE_HAS_TK) reactor_type_ = TAO_REACTOR_TK; #else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - TkReactor") - ASYS_TEXT (" not supported on this platform\n"))); + ACE_TEXT ("TAO_Default_Factory - TkReactor") + ACE_TEXT (" not supported on this platform\n"))); #endif /* ACE_HAS_TK */ else if (ACE_OS::strcasecmp (name, "wfmo") == 0) @@ -191,8 +191,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) reactor_type_ = TAO_REACTOR_TP; else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT (" <%s> for -ORBreactortype\n"), name)); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT (" <%s> for -ORBreactortype\n"), name)); } } @@ -232,7 +232,7 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) -1); if (pset->insert (item) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Unable to add protocol factories for %s: %p\n"), + ACE_TEXT ("(%P|%t) Unable to add protocol factories for %s: %p\n"), argv[curarg])); } } @@ -259,8 +259,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->connection_caching_type_ = TAO_Resource_Factory::NOOP; else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT (" <%s> for -ORBConnectionCachingStrategy\n"), name)); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT (" <%s> for -ORBConnectionCachingStrategy\n"), name)); } } @@ -272,8 +272,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->purge_percentage_ = ACE_OS::atoi (argv[curarg]); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT ("for -ORBPurgePercentage\n"))); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT ("for -ORBPurgePercentage\n"))); } else if (ACE_OS::strcasecmp (argv[curarg], @@ -295,8 +295,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->sched_policy_ = ACE_SCHED_RR; else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT (" <%s> for -ORBSchedPolicy\n"), name)); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT (" <%s> for -ORBSchedPolicy\n"), name)); } } @@ -316,8 +316,8 @@ TAO_Default_Resource_Factory::init (int argc, char **argv) this->priority_mapping_type_ = TAO_PRIORITY_MAPPING_DIRECT; else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Default_Factory - unknown argument") - ASYS_TEXT (" <%s> for -ORBPriorityMapping\n"), name)); + ACE_TEXT ("TAO_Default_Factory - unknown argument") + ACE_TEXT (" <%s> for -ORBPriorityMapping\n"), name)); } } @@ -344,7 +344,7 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) // second argument passed to the ACE_STATIC_SVC_DEFINE macro: // // ACE_STATIC_SVC_DEFINE (PP_Protocol_Factory, - // ASYS_TEXT ("PP_Factory"), ...) + // ACE_TEXT ("PP_Factory"), ...) // // "PP_Protocol_Factory" is the name of your protocol factory // class. A "_make_" is prepended to your protocol factory @@ -376,11 +376,11 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) { if (TAO_orbdebug) ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("TAO (%P|%t) No %s found in ") - ASYS_TEXT ("Service Repository. ") - ASYS_TEXT ("Using default instance IIOP ") - ASYS_TEXT ("Protocol Factory.\n"), - ASYS_TEXT ("IIOP Protocol Factory"))); + ACE_TEXT ("TAO (%P|%t) No %s found in ") + ACE_TEXT ("Service Repository. ") + ACE_TEXT ("Using default instance IIOP ") + ACE_TEXT ("Protocol Factory.\n"), + ACE_TEXT ("IIOP Protocol Factory"))); ACE_NEW_RETURN (protocol_factory, TAO_IIOP_Protocol_Factory, @@ -415,8 +415,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (this->protocol_factories_.insert (item) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add ") - ASYS_TEXT ("<%s> to protocol factory set.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add ") + ACE_TEXT ("<%s> to protocol factory set.\n"), item->protocol_name ().c_str ())); delete item; @@ -430,8 +430,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Loaded default ") - ASYS_TEXT ("protocol <IIOP_Factory>\n"))); + ACE_TEXT ("TAO (%P|%t) Loaded default ") + ACE_TEXT ("protocol <IIOP_Factory>\n"))); } #if TAO_HAS_UIOP == 1 @@ -477,8 +477,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (this->protocol_factories_.insert (item) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add ") - ASYS_TEXT ("<%s> to protocol factory set.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add ") + ACE_TEXT ("<%s> to protocol factory set.\n"), item->protocol_name ().c_str ())); delete item; @@ -492,8 +492,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Loaded default ") - ASYS_TEXT ("protocol <UIOP_Factory>\n"))); + ACE_TEXT ("TAO (%P|%t) Loaded default ") + ACE_TEXT ("protocol <UIOP_Factory>\n"))); } #endif /* TAO_HAS_UIOP == 1 */ @@ -540,8 +540,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (this->protocol_factories_.insert (item) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to add ") - ASYS_TEXT ("<%s> to protocol factory set.\n"), + ACE_TEXT ("TAO (%P|%t) Unable to add ") + ACE_TEXT ("<%s> to protocol factory set.\n"), item->protocol_name ().c_str ())); delete item; @@ -555,8 +555,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Loaded default ") - ASYS_TEXT ("protocol <SHMIOP_Factory>\n"))); + ACE_TEXT ("TAO (%P|%t) Loaded default ") + ACE_TEXT ("protocol <SHMIOP_Factory>\n"))); } #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */ @@ -571,8 +571,8 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if ((*factory)->factory () == 0) { ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("TAO (%P|%t) Unable to load ") - ASYS_TEXT ("protocol <%s>, %p\n"), + ACE_TEXT ("TAO (%P|%t) Unable to load ") + ACE_TEXT ("protocol <%s>, %p\n"), name.c_str (), ""), -1); } @@ -580,7 +580,7 @@ TAO_Default_Resource_Factory::init_protocol_factories (void) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) Loaded protocol <%s>\n"), + ACE_TEXT ("TAO (%P|%t) Loaded protocol <%s>\n"), name.c_str ())); } } @@ -844,7 +844,7 @@ TAO_Default_Resource_Factory::get_priority_mapping (void) // **************************************************************** ACE_STATIC_SVC_DEFINE (TAO_Default_Resource_Factory, - ASYS_TEXT ("Resource_Factory"), + ACE_TEXT ("Resource_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_Default_Resource_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index bb0a10ddde2..a554ba828f7 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -332,8 +332,8 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[]) "-ORBDemuxStrategy") == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Warning: -ORBDemuxStrategy is deprecated. Please use ") - ASYS_TEXT ("-ORBSystemidPolicyDemuxStrategy or -ORBUseridPolicyDemuxStrategy instead.\n"))); + ACE_TEXT ("Warning: -ORBDemuxStrategy is deprecated. Please use ") + ACE_TEXT ("-ORBSystemidPolicyDemuxStrategy or -ORBUseridPolicyDemuxStrategy instead.\n"))); curarg++; } else if (ACE_OS::strcasecmp (argv[curarg], @@ -373,9 +373,9 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[]) "-ORBConnectorLock") == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) WARNING: the ") - ASYS_TEXT ("-ORBConnectorLock option is in the client ") - ASYS_TEXT ("strategy factory now\n"))); + ACE_TEXT ("TAO (%P|%t) WARNING: the ") + ACE_TEXT ("-ORBConnectorLock option is in the client ") + ACE_TEXT ("strategy factory now\n"))); } else if (ACE_OS::strcasecmp (argv[curarg], @@ -395,7 +395,7 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[]) #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ ACE_STATIC_SVC_DEFINE (TAO_Default_Server_Strategy_Factory, - ASYS_TEXT ("Server_Strategy_Factory"), + ACE_TEXT ("Server_Strategy_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_Default_Server_Strategy_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/tao/qt_resource.cpp b/TAO/tao/qt_resource.cpp index bf99121ac54..5207f41c981 100644 --- a/TAO/tao/qt_resource.cpp +++ b/TAO/tao/qt_resource.cpp @@ -30,7 +30,7 @@ TAO_QtResource_Factory::set_context (QApplication *qapp) } ACE_STATIC_SVC_DEFINE (TAO_QtResource_Factory, - ASYS_TEXT ("QtResource_Factory"), + ACE_TEXT ("QtResource_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_QtResource_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/tao/skip.cpp b/TAO/tao/skip.cpp index 8787173db26..90d8c4bb5d2 100644 --- a/TAO/tao/skip.cpp +++ b/TAO/tao/skip.cpp @@ -83,7 +83,7 @@ TAO_Marshal_Primitive::skip (CORBA::TypeCode_ptr tc, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Primitive::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Primitive::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -187,8 +187,8 @@ TAO_Marshal_TypeCode::skip (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode::skip: ") - ASYS_TEXT ("Bad kind_ value in CDR stream"))); + ACE_TEXT ("TAO_Marshal_TypeCode::skip: ") + ACE_TEXT ("Bad kind_ value in CDR stream"))); ACE_THROW_RETURN (CORBA::BAD_TYPECODE (), CORBA::TypeCode::TRAVERSE_STOP); } @@ -200,7 +200,7 @@ TAO_Marshal_TypeCode::skip (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_TypeCode::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -234,7 +234,7 @@ TAO_Marshal_Principal::skip (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Principal::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Principal::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -296,7 +296,7 @@ TAO_Marshal_ObjRef::skip (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_ObjRef::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_ObjRef::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -334,7 +334,7 @@ TAO_Marshal_Struct::skip (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Struct::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Struct::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -581,7 +581,7 @@ TAO_Marshal_String::skip (CORBA::TypeCode_ptr, { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_TypeCode::skip detected error"))); + ACE_TEXT ("TAO_Marshal_TypeCode::skip detected error"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -632,7 +632,7 @@ TAO_Marshal_Sequence::skip (CORBA::TypeCode_ptr tc, // error exit if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Sequence::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Sequence::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::TypeCode::TRAVERSE_STOP); } @@ -670,7 +670,7 @@ TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc, // error exit if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Sequence::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Sequence::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (), CORBA::TypeCode::TRAVERSE_STOP); } @@ -705,7 +705,7 @@ TAO_Marshal_Alias::skip (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Alias::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Alias::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -752,7 +752,7 @@ TAO_Marshal_Except::skip (CORBA::TypeCode_ptr tc, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_Except::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_Except::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); @@ -789,7 +789,7 @@ TAO_Marshal_WString::skip (CORBA::TypeCode_ptr, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO_Marshal_WString::skip detected error\n"))); + ACE_TEXT ("TAO_Marshal_WString::skip detected error\n"))); ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), CORBA::TypeCode::TRAVERSE_STOP); diff --git a/TAO/tao/xt_resource.cpp b/TAO/tao/xt_resource.cpp index f6204af62d2..747bf2672e5 100644 --- a/TAO/tao/xt_resource.cpp +++ b/TAO/tao/xt_resource.cpp @@ -32,7 +32,7 @@ TAO_XT_Resource_Factory::set_context (XtAppContext context) } ACE_STATIC_SVC_DEFINE (TAO_XT_Resource_Factory, - ASYS_TEXT ("XT_Resource_Factory"), + ACE_TEXT ("XT_Resource_Factory"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (TAO_XT_Resource_Factory), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp index abd10c997c1..79975e2e1d2 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp @@ -53,7 +53,7 @@ Test_i :: method (CORBA::Short boo, Test::Oops)) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Test_i::method () invoked\n"))); + ACE_TEXT ("Test_i::method () invoked\n"))); if (boo == 5) ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"), -1); diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp index 63f05ed711e..22768dc39b3 100644 --- a/TAO/tests/Smart_Proxies/server.cpp +++ b/TAO/tests/Smart_Proxies/server.cpp @@ -53,7 +53,7 @@ Test_i :: method (CORBA::Short boo, Test::Oops)) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Test_i::method () invoked\n"))); + ACE_TEXT ("Test_i::method () invoked\n"))); if (boo == 5) ACE_THROW_RETURN (Test::Oops ("Invalid boo\n"), -1); @@ -95,9 +95,6 @@ ACE/TAO Configuration Project /* Compiler enforces C++ One Definition Rule */ #undef ACE_HAS_ONE_DEFINITION_RULE -/* Platform also has __TEXT defined */ -#undef ACE_HAS_TEXT_MACRO_CONFLICT - /* Platform has void (*)(...) prototype for pthread_key_create() destructor (e.g., LynxOS). */ #undef ACE_HAS_STDARG_THR_DEST @@ -220,8 +217,8 @@ ACE/TAO Configuration Project /* The pthread_create() routine *must* take extern C functions. */ #undef ACE_HAS_THR_C_FUNC -/* Platform/compiler supports UNICODE */ -#undef ACE_HAS_UNICODE +/* Platform/compiler supports WCHAR */ +#undef ACE_HAS_WCHAR /* The Win32 platform supports WinSock 2.0 */ #undef ACE_HAS_WINSOCK2 diff --git a/WindozeCE/ACEApp.cpp b/WindozeCE/ACEApp.cpp index 3d7ab6722ca..bf86016b137 100644 --- a/WindozeCE/ACEApp.cpp +++ b/WindozeCE/ACEApp.cpp @@ -6,7 +6,7 @@ #if 0 int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { Sleep (500); for (int i = 0; i < argc; i++, Sleep (700)) diff --git a/WindozeCE/WindozeCEDlg.cpp b/WindozeCE/WindozeCEDlg.cpp index 8a9e03358a1..c2342f329f0 100644 --- a/WindozeCE/WindozeCEDlg.cpp +++ b/WindozeCE/WindozeCEDlg.cpp @@ -18,8 +18,8 @@ static CWnd *host_window_ = 0; UINT worker (void * arg) { - ACE_ARGV cmd_line ((TCHAR *) arg); - extern int ace_ce_main (int, ASYS_TCHAR *[]); + ACE_ARGV cmd_line ((ACE_TCHAR *) arg); + extern int ace_ce_main (int, ACE_TCHAR *[]); int retv = ace_ce_main (cmd_line.argc (), cmd_line.argv ()); host_window_->SetDlgItemText (IDC_RUN, TEXT ("Stopped")); diff --git a/acconfig.h b/acconfig.h index 36c0c2c18df..109941c3506 100644 --- a/acconfig.h +++ b/acconfig.h @@ -295,9 +295,6 @@ Linux glibc 2.0. */ #undef ACE_HAS_RUSAGE_WHO_ENUM -/* Platform also has __TEXT defined */ -#undef ACE_HAS_TEXT_MACRO_CONFLICT - /* Platform has void (*)(...) prototype for pthread_key_create() destructor (e.g., LynxOS). */ #undef ACE_HAS_STDARG_THR_DEST @@ -682,9 +679,6 @@ functions). */ #undef ACE_HAS_REENTRANT_FUNCTIONS -/* Compiler typedefs wchar with char. */ -#undef ACE_HAS_WCHAR_TYPEDEFS_CHAR - /* Solaris for intel uses macros for fstat() and stat(), these are wrappers for _fxstat() and _xstat() uses of the macros. Causes compile and runtime problems. */ @@ -983,16 +977,12 @@ platforms */ #undef ACE_HAS_UNIXWARE_SVR4_SIGNAL_T -/* Platform/compiler supports UNICODE */ -#undef ACE_HAS_UNICODE +/* Platform/compiler supports wchar_t */ +#undef ACE_HAS_WCHAR /* Platform has <utime.h> header file */ #undef ACE_HAS_UTIME -/* Most APIs in platform/compiler supports UNICODE. (No char version - available.) */ -#undef ACE_HAS_MOSTLY_UNICODE_APIS - /* Compiler supports explicit constructors. */ #undef ACE_HAS_EXPLICIT_KEYWORD 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_, @@ -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) @@ -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" diff --git a/apps/Gateway/Gateway/Options.cpp b/apps/Gateway/Gateway/Options.cpp index 7160bdb4c31..0dde3ddd83b 100644 --- a/apps/Gateway/Gateway/Options.cpp +++ b/apps/Gateway/Gateway/Options.cpp @@ -188,7 +188,7 @@ Options::parse_args (int argc, char *argv[]) ACE_OS::strncpy (this->consumer_config_file_, get_opt.optarg, sizeof this->consumer_config_file_ - / sizeof (ASYS_TCHAR)); + / sizeof (ACE_TCHAR)); break; case 'c': { diff --git a/apps/JAWS/PROTOTYPE/JAWS/JAWS.h b/apps/JAWS/PROTOTYPE/JAWS/JAWS.h index 27572fc3b07..930d5fcbf60 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/JAWS.h +++ b/apps/JAWS/PROTOTYPE/JAWS/JAWS.h @@ -3,9 +3,9 @@ #if (JAWS_NTRACE == 1) # define JAWS_TRACE(X) #else -# define JAWS_TRACE(X) ACE_Trace ____ (ASYS_TEXT (X), \ +# define JAWS_TRACE(X) ACE_Trace ____ (ACE_TEXT (X), \ __LINE__, \ - ASYS_TEXT (__FILE__)) + ACE_TEXT (__FILE__)) #endif /* JAWS_NTRACE */ #ifndef JAWS_JAWS_H diff --git a/bin/envinfo.cpp b/bin/envinfo.cpp index 8d25afd91a7..2ba90817e43 100644 --- a/bin/envinfo.cpp +++ b/bin/envinfo.cpp @@ -5,7 +5,7 @@ ACE_RCSID(bin, envinfo, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { cerr << "ACE: " << ACE::major_version() << "." diff --git a/configure.in b/configure.in index 688cb54a169..fcaa0f13850 100644 --- a/configure.in +++ b/configure.in @@ -902,9 +902,9 @@ AC_CHECK_HEADER(utime.h, dnl AC_DEFINE(ACE_HAS_UTIME),) dnl This check will be disabled until we can get ACE to compile when it -dnl ACE_HAS_UNICODE is defined on UN*X systems +dnl ACE_HAS_WCHAR is defined on UN*X systems dnl AC_CHECK_HEADER(wchar.h, -dnl AC_DEFINE(ACE_HAS_UNICODE),) +dnl AC_DEFINE(ACE_HAS_WCHAR),) AC_CHECK_HEADER(libc.h, dnl AC_DEFINE(ACE_HAS_LIBC_H)) diff --git a/docs/ACE-guidelines.html b/docs/ACE-guidelines.html index 6851457c7f6..24d1bc08e1c 100644 --- a/docs/ACE-guidelines.html +++ b/docs/ACE-guidelines.html @@ -709,135 +709,11 @@ Foo::bar () <code>%ld</code> of any other multicharacter format.<p> </ul> - <li><strong>UNICODE conformity</strong><p> - - <ul> - <li>Define strings as <strong><code>ASYS_TCHAR</code></strong> if - they need to be passed into system API. It expands to - <code>wchar_t</code> only when - <code>ACE_HAS_MOSTLY_UNICODE_APIS</code> is defined.<p> - - <li>Use <strong><code>ASYS_TEXT</code></strong> and - <strong><code>ASYS_WIDE_STRING</code></strong> for format - strings and other string arguments passed to - <code>ACE_DEBUG</code> or <code>ACE_ERROR</code>. For - example,<p> - <pre> - void - ACE_FOO::ace_bar (int err, ASYS_TCHAR *astr) - { - ACE_TRACE ("ACE_FOO::ace_bar"); - - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("From ACE_FOO::ace_bar"))); - - if (err) - ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P) Printing this string %s\n"), - astr)); - } - </pre> - <p> - This is because ACE also support platforms which use UNICODE - in most of their APIs. On these platforms, ACE also uses - UNICODE as its system string type.<p> - - Notice that when spaning a string literal across several lines, - you must apply <code>ASYS_TEXT</code> to <strong>every</strong> - line. For example, it is <font color=red>illegal</font> to do this: - <pre> - ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("\nerror: x is a null pointer in " - "ACE_RB_Tree<EXT_ID, INT_ID>::" - "RB_rotate_left\n"))); - </pre></p> - - <p>Instead, this should be written like this: - <pre> - 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>::") - ASYS_TEXT ("RB_rotate_left\n"))); - </pre></p> - - <li><strong><code>ACE_TRACE</code></strong> handles conversion - between char strings and UNICODE strings automatically.<p> - - <li>Other helper macros include - <strong><code>ASYS_MULTIBYTE_STRING</code></strong> and - <strong><code>ASYS_ONLY_MULTIBYTE_STRING</code></strong>. See - the end of <a href="../ace/OS.h">OS.h</a> for more details.<p> - - <li>Here is a brief breakdown:<p> - <table BORDER=2 CELLSPACING=2 CELLPADDING=0> - <tr> - <th Align=left>Macro Name</th> - <td>NONE </td> - <td>UNICODE</td> - <td>MOSTLY</td> - <td>Remark</td> - </tr> - <tr> - <th align=left><code>ACE_WIDE_STRING</code></th> - <td>NOP</td> - <td>C 2 W</td> - <td>C 2 W</td> - <td> </td> - </tr> - <tr> - <th align=left><code>ACE_MULTIBYTE_STRING</code> - <td>NOP</td> - <td>W 2 C</td> - <td>W 2 C</td> - <td> </td> - </tr> - <tr> - <th align=left><code>ASYS_WIDE_STRING</code></th> - <td>NOP</td> - <td>NOP</td> - <td>C 2 W</td> - <td>Convert char strings to where ASYS_TCHAR strings are - expected.</td> - </tr> - <tr> - <th align=left><code>ASYS_MULTIBYTE_STRING</code></th> - <td>NOP</td> - <td>W 2 C</td> - <td>NOP</td> - <td>Convert LPTCSTR or LPTSTR strings to where ASYS_TCHAR - strings are expected.</td> - </tr> - <tr> - <th align=left><code>ASYS_ONLY_WIDE_STRING</code></th> - <td>NOP</td> - <td>C 2 W</td> - <td>NOP</td> - <td>Convert ASYS_TCHAR stirngs to where wchar strings are - expected.</td> - </tr> - <tr> - <th align=left><code>ASYS_ONLY_MULTIBYTE_STRING</code></th> - <td>NOP</td> - <td>NOP</td> - <td>W 2 C</td> - <td>Convert ASYS_TCHAR strings to where</td> - </tr> - </table><p> - Where: - - <ul> - <li>UNICODE: When <code>UNICODE</code> is defined. - <li>MOSTLY: When <code>ACE_HAS_MOSTLY_UNICODE_APIS</code> is - defined - <li>C: char * - <li>W: wchar * - <li>T: ASYS_TCHAR* (T == W) only when MOSTLY is defined, - otherwise, (T == C) - <li>NOP: No operation. - </ul><p> - </ul><p> + <li><strong>WCHAR conformity</strong><p> + <!-- @@ UNICODE: update --> + For now, don't worry about it. + <li><strong>Exceptions</strong><p> <ul> diff --git a/docs/tutorials/Chap_3/mm.cpp b/docs/tutorials/Chap_3/mm.cpp index 2be56fbcc9a..43188360f66 100644 --- a/docs/tutorials/Chap_3/mm.cpp +++ b/docs/tutorials/Chap_3/mm.cpp @@ -9,7 +9,7 @@ #define DATA_SIZE 100 #define MESSAGE1 "Hiya over there client process" #define MESSAGE2 "Did you hear me the first time?" -LPCTSTR poolname="My_Pool"; +const ACE_TCHAR *poolname="My_Pool"; typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> Malloc_Allocator; diff --git a/examples/Connection/blocking/SPIPE-acceptor.cpp b/examples/Connection/blocking/SPIPE-acceptor.cpp index a94e9cb441b..ba65d3d7101 100644 --- a/examples/Connection/blocking/SPIPE-acceptor.cpp +++ b/examples/Connection/blocking/SPIPE-acceptor.cpp @@ -77,7 +77,7 @@ IPC_Server::init (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "Opening %s\n", - ACE_MULTIBYTE_STRING (rendezvous_))); + rendezvous_)); // Initialize named pipe listener. if (this->open (ACE_SPIPE_Addr (rendezvous_)) == -1) @@ -113,8 +113,8 @@ IPC_Server::parse_args (int argc, char *argv[]) { case 'r': ACE_OS::strncpy (rendezvous_, - ACE_WIDE_STRING (get_opt.optarg), - sizeof rendezvous_ / sizeof TCHAR); + ACE_TEXT_CHAR_TO_TCHAR (get_opt.optarg), + sizeof rendezvous_ / sizeof ACE_TCHAR); break; case 't': n_threads_ = ACE_OS::atoi (get_opt.optarg); diff --git a/examples/Connection/blocking/SPIPE-acceptor.h b/examples/Connection/blocking/SPIPE-acceptor.h index 84253f2e37c..ae97487d396 100644 --- a/examples/Connection/blocking/SPIPE-acceptor.h +++ b/examples/Connection/blocking/SPIPE-acceptor.h @@ -58,7 +58,7 @@ private: int n_threads_; // Size of thread pool to use. - TCHAR rendezvous_[MAXPATHLEN + 1]; + ACE_TCHAR rendezvous_[MAXPATHLEN + 1]; // Meeting place for pipe. ACE_Sig_Adapter done_handler_; diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp index bd0956354a5..8f8bdaabc92 100644 --- a/examples/Connection/blocking/SPIPE-connector.cpp +++ b/examples/Connection/blocking/SPIPE-connector.cpp @@ -143,7 +143,7 @@ IPC_Client::init (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "Opening %s\n", - ACE_MULTIBYTE_STRING (rendezvous_))); + rendezvous_)); Peer_Handler *ph; @@ -200,8 +200,8 @@ IPC_Client::parse_args (int argc, char *argv[]) { case 'r': ACE_OS::strncpy (rendezvous_, - ACE_WIDE_STRING (get_opt.optarg), - sizeof rendezvous_ / sizeof TCHAR); + ACE_TEXT_CHAR_TO_TCHAR (get_opt.optarg), + sizeof rendezvous_ / sizeof ACE_TCHAR); break; case 'i': iterations_ = ACE_OS::atoi (get_opt.optarg); diff --git a/examples/Connection/blocking/SPIPE-connector.h b/examples/Connection/blocking/SPIPE-connector.h index d9ea2d32629..83fd3174bf6 100644 --- a/examples/Connection/blocking/SPIPE-connector.h +++ b/examples/Connection/blocking/SPIPE-connector.h @@ -69,7 +69,7 @@ private: int iterations_; // Number of times to send a buffer. - TCHAR rendezvous_[MAXPATHLEN + 1]; + ACE_TCHAR rendezvous_[MAXPATHLEN + 1]; // Meeting place for pipe. ACE_Sig_Adapter done_handler_; diff --git a/examples/Connection/non_blocking/test_lsock_acceptor.cpp b/examples/Connection/non_blocking/test_lsock_acceptor.cpp index 3f11ab907b5..ddf0de2a823 100644 --- a/examples/Connection/non_blocking/test_lsock_acceptor.cpp +++ b/examples/Connection/non_blocking/test_lsock_acceptor.cpp @@ -9,8 +9,8 @@ int main (int, char *argv[]) { ACE_ERROR_RETURN ((LM_INFO, - ASYS_TEXT ("%s: not supported with ") - ASYS_TEXT ("ACE_LACKS_UNIX_DOMAIN_SOCKETS\n"), + ACE_TEXT ("%s: not supported with ") + ACE_TEXT ("ACE_LACKS_UNIX_DOMAIN_SOCKETS\n"), argv[0]), -1); } diff --git a/examples/Connection/non_blocking/test_lsock_connector.cpp b/examples/Connection/non_blocking/test_lsock_connector.cpp index 5d7fc467251..a65867fb701 100644 --- a/examples/Connection/non_blocking/test_lsock_connector.cpp +++ b/examples/Connection/non_blocking/test_lsock_connector.cpp @@ -7,8 +7,8 @@ int main (int, char *argv[]) { ACE_ERROR_RETURN ((LM_INFO, - ASYS_TEXT ("%s: not supported with ") - ASYS_TEXT ("ACE_LACKS_UNIX_DOMAIN_SOCKETS\n"), + ACE_TEXT ("%s: not supported with ") + ACE_TEXT ("ACE_LACKS_UNIX_DOMAIN_SOCKETS\n"), argv[0]), -1); } diff --git a/examples/IPC_SAP/ATM_SAP/CPP-client.cpp b/examples/IPC_SAP/ATM_SAP/CPP-client.cpp index b14cf4870e8..b902123f18e 100644 --- a/examples/IPC_SAP/ATM_SAP/CPP-client.cpp +++ b/examples/IPC_SAP/ATM_SAP/CPP-client.cpp @@ -175,7 +175,7 @@ int main (int argc, char *argv[]) actual_rate = ( double )xmit * ( double )8 / real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) bytes = %d, usec = %f, rate = %0.00f Mbps\n"), + ACE_TEXT ("(%t) bytes = %d, usec = %f, rate = %0.00f Mbps\n"), xmit, real_time, actual_rate < 0 ? 0 : actual_rate )); diff --git a/examples/IPC_SAP/ATM_SAP/CPP-server.cpp b/examples/IPC_SAP/ATM_SAP/CPP-server.cpp index a6dc8115927..44871ba8869 100644 --- a/examples/IPC_SAP/ATM_SAP/CPP-server.cpp +++ b/examples/IPC_SAP/ATM_SAP/CPP-server.cpp @@ -128,7 +128,7 @@ main (int argc, char *argv[]) actual_rate = ( double )recvd * ( double )8 / real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) bytes = %d, usec = %f, rate = %0.00f Mbps\n"), + ACE_TEXT ("(%t) bytes = %d, usec = %f, rate = %0.00f Mbps\n"), recvd, real_time, actual_rate < 0 ? 0 : actual_rate )); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp index 03a68823ee6..b5ec9d95734 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp @@ -345,7 +345,7 @@ Options::twoway_client_test (void *) double messages_per_sec = iteration * double (ACE_ONE_SECOND_IN_USECS) / real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) messages = %d\n(%t) usec-per-message = %f\n(%t) messages-per-second = %0.00f\n"), + ACE_TEXT ("(%t) messages = %d\n(%t) usec-per-message = %f\n(%t) messages-per-second = %0.00f\n"), iteration, real_time / double (iteration), messages_per_sec < 0 ? 0 : messages_per_sec)); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp index 2324707748c..37fbc9a4a21 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp @@ -357,13 +357,13 @@ Oneway_Handler::print_results (void) this->timer_.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\tmessages = %d\n\t\ttotal bytes = %d\n\t\tmbits/sec = %f\n\t\tusec-per-message = %f\n"), + ACE_TEXT ("\t\tmessages = %d\n\t\ttotal bytes = %d\n\t\tmbits/sec = %f\n\t\tusec-per-message = %f\n"), this->message_count_, this->total_bytes_, (((double) this->total_bytes_ * 8) / et.real_time) / (double) (1024 * 1024), diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp index c51840de7e7..9871273c7ea 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp @@ -254,7 +254,7 @@ oneway_server (void *arg) timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n"), et.real_time, et.user_time, et.system_time)); @@ -262,7 +262,7 @@ oneway_server (void *arg) double messages_per_sec = double (message_count) / et.real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\tmessages = %d\n\t\ttotal bytes = %d\n\t\tmbits/sec = %f\n\t\tusec-per-message = %f\n\t\tmessages-per-second = %0.00f\n"), + ACE_TEXT ("\t\tmessages = %d\n\t\ttotal bytes = %d\n\t\tmbits/sec = %f\n\t\tusec-per-message = %f\n\t\tmessages-per-second = %0.00f\n"), message_count, total_bytes, (((double) total_bytes * 8) / et.real_time) / (double) (1024 * 1024), diff --git a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp index 7e99e46466b..a97b75d23d1 100644 --- a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp +++ b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp @@ -129,7 +129,7 @@ consumer (void *) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { size = argc > 1 ? ACE_OS::atoi (argv[1]) : 32; iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16; @@ -148,7 +148,7 @@ main (int argc, ASYS_TCHAR *argv[]) } #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), diff --git a/examples/Naming/test_multiple_contexts.cpp b/examples/Naming/test_multiple_contexts.cpp index 307260c250b..584d98d5da9 100644 --- a/examples/Naming/test_multiple_contexts.cpp +++ b/examples/Naming/test_multiple_contexts.cpp @@ -6,6 +6,8 @@ ACE_RCSID(Naming, test_multiple_contexts, "$Id$") int main (int, char *[]) { +#if defined (ACE_HAS_WCHAR) + static u_long ACE_DEFAULT_BASE_ADDR_1 = (1 * 64 * 1024 * 1024); static u_long ACE_DEFAULT_BASE_ADDR_2 = (2 * 64 * 1024 * 1024); @@ -77,5 +79,9 @@ int main (int, char *[]) if (i != 0) return -1; +#else /* ACE_HAS_WCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_WCHAR */ + return 0; } diff --git a/examples/Naming/test_non_existent.cpp b/examples/Naming/test_non_existent.cpp index f8785ad0f81..79ec5670345 100644 --- a/examples/Naming/test_non_existent.cpp +++ b/examples/Naming/test_non_existent.cpp @@ -6,6 +6,7 @@ ACE_RCSID(Naming, test_non_existent, "$Id$") int main (int, char *[]) { +#if defined (ACE_HAS_WCHAR) int i; ACE_Naming_Context *ns_ptr; @@ -47,5 +48,8 @@ int main (int, char *[]) ACE_DEBUG ((LM_DEBUG, "(%P) bound with %d\n", i)); +#else /* ACE_HAS_WCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_WCHAR */ return 0; } diff --git a/examples/Naming/test_writers.cpp b/examples/Naming/test_writers.cpp index 460667815c8..f2677233f97 100644 --- a/examples/Naming/test_writers.cpp +++ b/examples/Naming/test_writers.cpp @@ -6,6 +6,7 @@ ACE_RCSID(Naming, test_writers, "$Id$") int main (int, char *[]) { +#if defined (ACE_HAS_WCHAR) int i; ACE_Naming_Context *ns_ptr; @@ -66,6 +67,8 @@ int main (int, char *[]) } } - +#else /* ACE_HAS_WCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_WCHAR */ return 0; } diff --git a/examples/Reactor/WFMO_Reactor/test_console_input.cpp b/examples/Reactor/WFMO_Reactor/test_console_input.cpp index 75168bde9ee..924466f1d58 100644 --- a/examples/Reactor/WFMO_Reactor/test_console_input.cpp +++ b/examples/Reactor/WFMO_Reactor/test_console_input.cpp @@ -44,7 +44,7 @@ Event_Handler::Event_Handler (ACE_Reactor &reactor) int Event_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) { - TCHAR buffer[BUFSIZ]; + ACE_TCHAR buffer[BUFSIZ]; int result = ACE_OS::read (ACE_STDIN, buffer, sizeof buffer); buffer[result] = '\0'; diff --git a/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp b/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp index 763f5d492fb..14ab8860069 100644 --- a/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp +++ b/examples/Reactor/WFMO_Reactor/test_directory_changes.cpp @@ -23,8 +23,8 @@ ACE_RCSID(ReactorEx, test_directory_changes, "$Id$") static int stop_test = 0; -static LPCTSTR directory = ACE_TEXT ("."); -static LPCTSTR temp_file = ACE_TEXT ("foo"); +static const ACE_TCHAR *directory = ACE_TEXT ("."); +static const ACE_TCHAR *temp_file = ACE_TEXT ("foo"); class Event_Handler : public ACE_Event_Handler { diff --git a/examples/Reactor/WFMO_Reactor/test_handle_close.cpp b/examples/Reactor/WFMO_Reactor/test_handle_close.cpp index 71f57d2c63e..e370c293b10 100644 --- a/examples/Reactor/WFMO_Reactor/test_handle_close.cpp +++ b/examples/Reactor/WFMO_Reactor/test_handle_close.cpp @@ -219,7 +219,7 @@ main (int argc, char *argv[]) int result = 0; // Parse args - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("swmc"), 1); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("swmc"), 1); for (int c; (c = getopt ()) != -1; ) switch (c) { diff --git a/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp b/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp index 9b0fc9f5930..58e6438ed61 100644 --- a/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp +++ b/examples/Reactor/WFMO_Reactor/test_registry_changes.cpp @@ -25,7 +25,7 @@ ACE_RCSID(ReactorEx, test_registry_changes, "$Id$") static int stop_test = 0; static HKEY context_to_monitor = HKEY_CURRENT_USER; -static LPCTSTR temp_context_name = ACE_TEXT ("ACE temporary context"); +static const ACE_TCHAR *temp_context_name = ACE_TEXT ("ACE temporary context"); class Event_Handler : public ACE_Event_Handler { diff --git a/examples/Registry/test_registry_iterator.cpp b/examples/Registry/test_registry_iterator.cpp index fadd6e52f01..1931b82b167 100644 --- a/examples/Registry/test_registry_iterator.cpp +++ b/examples/Registry/test_registry_iterator.cpp @@ -3,7 +3,7 @@ // This example uses the ACE_Registry class to iterator through the // entries in the predefined registries. The host of iteration can be // varied through argv[1]. If no host is specified the local host is -// used. This is very similar to how regedt32 starts up. +// used. This is very similar to how regedt32 starts up. // // This examples points the cool iterators in ACE_Registry @@ -17,12 +17,12 @@ static const u_long INDENTATION_LEVEL = 3; // Prototypes static int print_naming_context (ACE_Registry::Naming_Context &naming_context, - u_long indentation); -static void print_object (const ACE_Registry::Istring &name, - u_long indentation); + u_long indentation); +static void print_object (const ACE_TString &name, + u_long indentation); static void print_context (ACE_Registry::Naming_Context &parent, - const ACE_Registry::Istring &name, - u_long indentation); + const ACE_TString &name, + u_long indentation); static void indent (u_long indentation); int @@ -33,15 +33,15 @@ main (int argc, char *argv[]) // Connect to a predefined naming context result = ACE_Predefined_Naming_Contexts::connect (naming_context, - HKEY_LOCAL_MACHINE, - // HKEY_CLASSES_ROOT, - // HKEY_USERS, - // HKEY_CURRENT_USER, - argc == 2 ? ACE_WIDE_STRING (argv[1]) : 0); - + HKEY_LOCAL_MACHINE, + // HKEY_CLASSES_ROOT, + // HKEY_USERS, + // HKEY_CURRENT_USER, + argc == 2 ? ACE_TEXT_CHAR_TO_TCHAR (argv[1]) : 0); + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Predefined_Naming_Contexts::connect failed"), -1); - + // Print contents of naming context result = ::print_naming_context (naming_context, 0); if (result != 0) @@ -54,15 +54,15 @@ main (int argc, char *argv[]) // Print contents of <naming_context> static int print_naming_context (ACE_Registry::Naming_Context &naming_context, - u_long indentation) + u_long indentation) { ACE_Registry::Binding_List list; - + // Get the list of all entries int result = naming_context.list (list); if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Registry::Naming_Context::list"), -1); - + // Iterator through all entries for (ACE_Registry::Binding_List::iterator i = list.begin (); i != list.end (); @@ -72,14 +72,14 @@ print_naming_context (ACE_Registry::Naming_Context &naming_context, ACE_Registry::Binding &binding = *i; if (binding.type () == ACE_Registry::OBJECT) - // If object - ::print_object (binding.name (), - indentation); + // If object + ::print_object (binding.name (), + indentation); else - // If context - ::print_context (naming_context, - binding.name (), - indentation); + // If context + ::print_context (naming_context, + binding.name (), + indentation); } return 0; } @@ -87,8 +87,8 @@ print_naming_context (ACE_Registry::Naming_Context &naming_context, // Print an object with <name> static void -print_object (const ACE_Registry::Istring &name, - u_long indentation) +print_object (const ACE_TString &name, + u_long indentation) { // Set indentation ::indent (indentation); @@ -99,27 +99,27 @@ print_object (const ACE_Registry::Istring &name, // Print an context with <name> and <parent> static void print_context (ACE_Registry::Naming_Context &parent, - const ACE_Registry::Istring &name, - u_long indentation) -{ + const ACE_TString &name, + u_long indentation) +{ // Set indentation indent (indentation); cout << name << endl; - + ACE_Registry::Naming_Context child_context; // Find child context - int result = parent.resolve_context (name, - child_context, - KEY_READ); + int result = parent.resolve_context (name, + child_context, + KEY_READ); if (result != 0) ACE_ERROR ((LM_ERROR, "%s %s\n", "ACE_Registry::Naming_Context::resolve_context failed for:", name.c_str ())); - else + else { // Print contents of the child result = ::print_naming_context (child_context, - indentation + INDENTATION_LEVEL); + indentation + INDENTATION_LEVEL); if (result != 0) - ACE_ERROR ((LM_ERROR, "%p\n", "print_naming_context failed")); + ACE_ERROR ((LM_ERROR, "%p\n", "print_naming_context failed")); } } diff --git a/examples/Service_Configurator/Misc/Timer_Service.cpp b/examples/Service_Configurator/Misc/Timer_Service.cpp index f42db99ea0e..dc018a0feb2 100644 --- a/examples/Service_Configurator/Misc/Timer_Service.cpp +++ b/examples/Service_Configurator/Misc/Timer_Service.cpp @@ -7,20 +7,20 @@ ACE_RCSID(Misc, Timer_Service, "$Id$") Timer_Service_1::Timer_Service_1 (void) { ACE_OS::strcpy (this->name_, - ASYS_TEXT ("Timer_Service_1")); + ACE_TEXT ("Timer_Service_1")); } int -Timer_Service_1::init (int argc, ASYS_TCHAR *argv[]) +Timer_Service_1::init (int argc, ACE_TCHAR *argv[]) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("in Timer_Service::init, argv[0] = %s, argc == %d\n"), + ACE_TEXT ("in Timer_Service::init, argv[0] = %s, argc == %d\n"), argv[0], argc)); // Printout the <argv> values for sanity's sake. for (int i = 0; i < argc; i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("argv[%d] = %s\n"), + ACE_TEXT ("argv[%d] = %s\n"), i, argv[i])); int interval = Timer_Service_1::TIMEOUT; @@ -72,8 +72,8 @@ Timer_Service_1::handle_timeout (const ACE_Time_Value &tv, const void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%x) in %s::handle_timeout sec = %d, usec = %d") - ASYS_TEXT (" cur_timeouts = %d, max_timeouts = %d\n"), + ACE_TEXT ("(%x) in %s::handle_timeout sec = %d, usec = %d") + ACE_TEXT (" cur_timeouts = %d, max_timeouts = %d\n"), this, this->name_, tv.sec (), @@ -94,7 +94,7 @@ int Timer_Service_1::handle_close (ACE_HANDLE, ACE_Reactor_Mask) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("closing down the timer test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("closing down the timer test\n"))); ACE_Reactor::end_event_loop(); return 0; @@ -103,18 +103,18 @@ Timer_Service_1::handle_close (ACE_HANDLE, Timer_Service_2::Timer_Service_2 (void) { ACE_OS::strcpy (this->name_, - ASYS_TEXT ("Timer_Service_2")); + ACE_TEXT ("Timer_Service_2")); } Timer_Service_3::Timer_Service_3 (void) { ACE_OS::strcpy (this->name_, - ASYS_TEXT ("Timer_Service_3")); + ACE_TEXT ("Timer_Service_3")); } // Define the object that describes the service. ACE_STATIC_SVC_DEFINE (Timer_Service_1, - ASYS_TEXT ("Timer_Service_1"), + ACE_TEXT ("Timer_Service_1"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (Timer_Service_1), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, diff --git a/examples/Service_Configurator/Misc/Timer_Service.h b/examples/Service_Configurator/Misc/Timer_Service.h index 9400f2573a5..52bc6273028 100644 --- a/examples/Service_Configurator/Misc/Timer_Service.h +++ b/examples/Service_Configurator/Misc/Timer_Service.h @@ -16,7 +16,7 @@ public: Timer_Service_1 (void); // Default constructor. - virtual int init (int argc, ASYS_TCHAR *argv[]); + virtual int init (int argc, ACE_TCHAR *argv[]); // Initialization hook. virtual int handle_timeout (const ACE_Time_Value &, @@ -27,7 +27,7 @@ public: // Close hook. protected: - ASYS_TCHAR name_[BUFSIZ]; + ACE_TCHAR name_[BUFSIZ]; // Keep track of which service this is! private: diff --git a/examples/Service_Configurator/Misc/main.cpp b/examples/Service_Configurator/Misc/main.cpp index 13fc9101921..6d6ca44f882 100644 --- a/examples/Service_Configurator/Misc/main.cpp +++ b/examples/Service_Configurator/Misc/main.cpp @@ -30,7 +30,7 @@ ACE_RCSID(Misc, main, "$Id$") ACE_STATIC_SVC_REQUIRE (Timer_Service_1) int -main (int, ASYS_TCHAR *argv[]) +main (int, ACE_TCHAR *argv[]) { // Set up an argument vector that we can add entries to! ACE_ARGV args; @@ -39,24 +39,24 @@ main (int, ASYS_TCHAR *argv[]) // that allows us to pass these entries via the "command-line" // rather than the svc.conf file. args.add (argv[0]); - args.add (ASYS_TEXT ("-y")); - args.add (ASYS_TEXT ("-d")); - args.add (ASYS_TEXT ("-S")); - args.add (ASYS_TEXT ("\"static Timer_Service_1 'timer 1 10 $TRACE'\"")); - args.add (ASYS_TEXT ("-S")); - args.add (ASYS_TEXT ("\"dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() 'timer 2 10 $TRACE'\"")); + args.add (ACE_TEXT ("-y")); + args.add (ACE_TEXT ("-d")); + args.add (ACE_TEXT ("-S")); + args.add (ACE_TEXT ("\"static Timer_Service_1 'timer 1 10 $TRACE'\"")); + args.add (ACE_TEXT ("-S")); + args.add (ACE_TEXT ("\"dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() 'timer 2 10 $TRACE'\"")); // Test the -f option! - args.add (ASYS_TEXT ("-fsvc.conf1")); - args.add (ASYS_TEXT ("-fsvc.conf2")); + args.add (ACE_TEXT ("-fsvc.conf1")); + args.add (ACE_TEXT ("-fsvc.conf2")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("argc = %d\n"), - ASYS_TEXT (args.argc ()))); + ACE_TEXT ("argc = %d\n"), + ACE_TEXT (args.argc ()))); // Print the contents of the combined <ACE_ARGV>. for (size_t i = 0; i < args.argc (); i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d) %s\n"), + ACE_TEXT ("(%d) %s\n"), i, args.argv ()[i])); @@ -66,8 +66,8 @@ main (int, ASYS_TCHAR *argv[]) 0) == -1 && errno != ENOENT) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 1); // Run forever, performing the configured services until we diff --git a/examples/Service_Configurator/Misc/main.dsp b/examples/Service_Configurator/Misc/main.dsp index 6a31917e1d1..030074422f5 100644 --- a/examples/Service_Configurator/Misc/main.dsp +++ b/examples/Service_Configurator/Misc/main.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D ACE_HAS_SVC_DLL=0 /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D ACE_SVC_HAS_DLL=0 /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -66,7 +66,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D ACE_HAS_SVC_DLL=0 /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D ACE_SVC_HAS_DLL=0 /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
diff --git a/examples/Web_Crawler/Options.cpp b/examples/Web_Crawler/Options.cpp index 14d862dd5c4..89b8e90e5bc 100644 --- a/examples/Web_Crawler/Options.cpp +++ b/examples/Web_Crawler/Options.cpp @@ -9,7 +9,7 @@ ACE_RCSID(Web_Crawler, Options, "$Id$") int Options::parse_args (int argc, char *argv[]) { - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("df:h:i:l:rt:u:vo:p:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("df:h:i:l:rt:u:vo:p:")); ACE_LOG_MSG->open (argv[0]); @@ -121,24 +121,24 @@ Options::verbose (void) const return this->verbose_; } -LPCTSTR +const ACE_TCHAR * Options::order (void) const { return this->order_; } -LPCTSTR +const ACE_TCHAR * Options::hostname (void) const { return this->hostname_; } -LPCTSTR +const ACE_TCHAR * Options::path_name (void) const { return this->uri_; } -LPCTSTR +const ACE_TCHAR * Options::url_filter (void) const { return this->url_filter_; diff --git a/examples/Web_Crawler/Options.h b/examples/Web_Crawler/Options.h index 6110dc081c4..48e06f7930c 100644 --- a/examples/Web_Crawler/Options.h +++ b/examples/Web_Crawler/Options.h @@ -44,13 +44,13 @@ public: // If non-0 and the link is an HTML file then recursively check all // links that are embedded in the body of file. - LPCTSTR hostname (void) const; + const ACE_TCHAR *hostname (void) const; // Return the hostname of the initial Web server. - LPCTSTR path_name (void) const; + const ACE_TCHAR *path_name (void) const; // Return the initial URI. - LPCTSTR url_filter (void) const; + const ACE_TCHAR *url_filter (void) const; // String used to filter out which URLs to validate. int debug (void) const; @@ -59,7 +59,7 @@ public: int verbose (void) const; // Are we being verbose? - LPCTSTR order (void) const; + const ACE_TCHAR *order (void) const; // Which order? LIFO|FIFO?? int port_no (void) const; @@ -83,10 +83,10 @@ private: int recurse_; // Are we recursving. - LPCTSTR hostname_; + const ACE_TCHAR *hostname_; // Initial Web server name. - LPCTSTR uri_; + const ACE_TCHAR *uri_; // Initial URI name. int debug_; @@ -95,13 +95,13 @@ private: int verbose_; // Are we being verbose? - LPCTSTR order_; + const ACE_TCHAR *order_; // Whether the URLs are traversed in FIFO or LIFO order. ACE_Time_Value timeout_; // Timeout on <recv> and <connect> to broken Web servers. - LPCTSTR url_filter_; + const ACE_TCHAR *url_filter_; // String used to filter out which URLs to validate. Command_Processor *command_processor_; diff --git a/examples/Web_Crawler/URL_Addr.cpp b/examples/Web_Crawler/URL_Addr.cpp index b60a2c54e06..470ca13fc8c 100644 --- a/examples/Web_Crawler/URL_Addr.cpp +++ b/examples/Web_Crawler/URL_Addr.cpp @@ -11,7 +11,7 @@ ACE_URL_Addr::ACE_URL_Addr (void) } int -ACE_URL_Addr::addr_to_string (LPTSTR s, +ACE_URL_Addr::addr_to_string (ACE_TCHAR *s, size_t size, int ipaddr_format) const { @@ -29,17 +29,17 @@ ACE_URL_Addr::addr_to_string (LPTSTR s, return -1; else { - ACE_OS::sprintf (s, ASYS_TEXT ("%s:%d/%s"), - ASYS_WIDE_STRING (ipaddr_format == 0 - ? this->get_host_name () - : this->get_host_addr ()), + ACE_OS::sprintf (s, ACE_TEXT ("%s:%d/%s"), + ACE_TEXT_CHAR_TO_TCHAR (ipaddr_format == 0 + ? this->get_host_name () + : this->get_host_addr ()), this->get_port_number (), this->get_path_name ()); return 0; } } -LPCTSTR +const ACE_TCHAR * ACE_URL_Addr::addr_to_string (int ipaddr_format) const { ACE_URL_Addr *this_ptr = ACE_const_cast (ACE_URL_Addr *, @@ -64,20 +64,20 @@ ACE_URL_Addr::addr_to_string (int ipaddr_format) const this_ptr->addr_string_len_ = size; } ACE_OS::sprintf (this->addr_string_, - ASYS_TEXT ("%s:%d/%s"), - ASYS_WIDE_STRING (ipaddr_format == 0 - ? this->get_host_name () - : this->get_host_addr ()), + ACE_TEXT ("%s:%d/%s"), + ACE_TEXT_CHAR_TO_TCHAR (ipaddr_format == 0 + ? this->get_host_name () + : this->get_host_addr ()), this->get_port_number (), this->get_path_name ()); return this->addr_string_; } -int -ACE_URL_Addr::string_to_addr (LPCTSTR s) +int +ACE_URL_Addr::string_to_addr (const ACE_TCHAR *s) { int result; - LPTSTR t; + ACE_TCHAR *t; // Need to make a duplicate since we'll be overwriting the string. ACE_ALLOCATOR_RETURN (t, @@ -87,8 +87,8 @@ ACE_URL_Addr::string_to_addr (LPCTSTR s) // First split off the path_name. - LPTSTR path_name = ACE_OS::strchr (t, '/'); - LPCTSTR name = "index.html"; + ACE_TCHAR *path_name = ACE_OS::strchr (t, '/'); + const ACE_TCHAR *name = "index.html"; if (path_name != 0) { if (ACE_OS::strlen (path_name + 1) > 0) @@ -103,9 +103,9 @@ ACE_URL_Addr::string_to_addr (LPCTSTR s) -1); // Now handle the host address and port number. - LPTSTR port_number = ACE_OS::strchr (t, ':'); + ACE_TCHAR *port_number = ACE_OS::strchr (t, ':'); - if (port_number == 0) + if (port_number == 0) { // Assume it's an ip-address or ip-number. result = this->ACE_INET_Addr::set (ACE_DEFAULT_HTTP_PORT, @@ -129,17 +129,17 @@ ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr &addr) { if (this->set (addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); } -int +int ACE_URL_Addr::set (const ACE_URL_Addr &addr) { - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (char *, this->path_name_))); - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (char *, this->addr_string_))); if (this->ACE_INET_Addr::set (addr) == -1) @@ -165,8 +165,8 @@ ACE_URL_Addr::operator= (const ACE_URL_Addr &addr) { if (this->set (addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); } u_long @@ -181,7 +181,7 @@ ACE_URL_Addr::hash (void) const int ACE_URL_Addr::operator== (const ACE_URL_Addr &addr) const { - return ACE_OS::strcmp (addr.get_path_name (), + return ACE_OS::strcmp (addr.get_path_name (), this->get_path_name ()) == 0 && addr.get_port_number () == this->get_port_number () && addr.get_ip_address () == this->get_ip_address (); @@ -193,8 +193,8 @@ ACE_URL_Addr::operator!= (const ACE_URL_Addr &addr) const return !(*this == addr); } -ACE_URL_Addr::ACE_URL_Addr (LPCTSTR host_name, - LPCTSTR path_name, +ACE_URL_Addr::ACE_URL_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path_name, u_short port) : ACE_INET_Addr (port, host_name), path_name_ (ACE_OS::strdup (path_name)), @@ -203,7 +203,7 @@ ACE_URL_Addr::ACE_URL_Addr (LPCTSTR host_name, { } -LPCTSTR +const ACE_TCHAR * ACE_URL_Addr::get_path_name (void) const { return this->path_name_; @@ -211,16 +211,16 @@ ACE_URL_Addr::get_path_name (void) const ACE_URL_Addr::~ACE_URL_Addr (void) { - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (LPTSTR, this->path_name_))); - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (LPTSTR, this->addr_string_))); this->path_name_ = 0; } -int +int ACE_URL_Addr::destroy (void) { // Commit suicide. diff --git a/examples/Web_Crawler/URL_Addr.h b/examples/Web_Crawler/URL_Addr.h index c966033003d..82961b7e136 100644 --- a/examples/Web_Crawler/URL_Addr.h +++ b/examples/Web_Crawler/URL_Addr.h @@ -32,8 +32,8 @@ public: ACE_URL_Addr (void); // Constructor. - ACE_URL_Addr (LPCTSTR host_name, - LPCTSTR path_name, + ACE_URL_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path_name, u_short port = ACE_DEFAULT_HTTP_PORT); ACE_URL_Addr (const ACE_URL_Addr &addr); @@ -42,7 +42,7 @@ public: int set (const ACE_URL_Addr &addr); // Essentially the copy constructor. - virtual int string_to_addr (LPCTSTR address); + virtual int string_to_addr (const ACE_TCHAR *address); // Initializes an <ACE_URL_Addr> from the <address>, which can be // "ip-number:port-number/path-name" (e.g., // "www.cs.wustl.edu:1234/~schmidt/" "ip-number:port-number/path-name" @@ -50,7 +50,7 @@ public: // the <address> it is assumed to be an ip-number or ip-address // number, with the port number <ACE_DEFAULT_HTTP_PORT>. - virtual int addr_to_string (LPTSTR s, + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int ipaddr_format = 1) const; // Transform the current <ACE_INET_Addr> address into string format. @@ -61,7 +61,7 @@ public: // "www.cs.wustl.edu:80/~schmidt/"). Returns -1 if the <size> of // the <buffer> is too small, else 0. - virtual LPCTSTR addr_to_string (int ipaddr_format = 1) const; + virtual const ACE_TCHAR *addr_to_string (int ipaddr_format = 1) const; // Transform the current <ACE_INET_Addr> address into string format. // If <ipaddr_format> is non-0 this produces // "ip-number:port-number/path-name" (e.g., @@ -88,16 +88,16 @@ public: virtual u_long hash (void) const; // Computes and returns hash value. - LPCTSTR get_path_name (void) const; + const ACE_TCHAR *get_path_name (void) const; // Return the path name. int destroy (void); // Commit suicide. private: - LPTSTR path_name_; + ACE_TCHAR *path_name_; // Our path name. - LPTSTR addr_string_; + ACE_TCHAR *addr_string_; // The dynamically address string that's used for the // <addr_to_string> method. diff --git a/netsvcs/clients/Logger/indirect_logging.cpp b/netsvcs/clients/Logger/indirect_logging.cpp index aa5461e3b10..d13febea1d1 100644 --- a/netsvcs/clients/Logger/indirect_logging.cpp +++ b/netsvcs/clients/Logger/indirect_logging.cpp @@ -19,7 +19,7 @@ main (int argc, char *argv[]) ACE_OS::srand ((u_int) ACE_OS::time (0)); ACE_LOG_MSG->open (prog_name, ACE_Log_Msg::LOGGER, - ACE_WIDE_STRING (logger_key)); + ACE_TEXT_CHAR_TO_TCHAR (logger_key)); ACE_DEBUG ((LM_STARTUP, "starting up the test\n")); diff --git a/netsvcs/clients/Naming/Client/main.cpp b/netsvcs/clients/Naming/Client/main.cpp index 001218fa05d..8930bb61a6d 100644 --- a/netsvcs/clients/Naming/Client/main.cpp +++ b/netsvcs/clients/Naming/Client/main.cpp @@ -23,13 +23,13 @@ main (int, char *argv[]) new_args.add ("-d"); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("argc = %d\n"), - ASYS_TEXT (new_args.argc ()))); + ACE_TEXT ("argc = %d\n"), + ACE_TEXT (new_args.argc ()))); // Print the contents of the combined <ACE_ARGV>. for (size_t i = 0; i < new_args.argc (); i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d) %s\n"), + ACE_TEXT ("(%d) %s\n"), i, new_args.argv ()[i])); diff --git a/netsvcs/lib/Logging_Strategy.cpp b/netsvcs/lib/Logging_Strategy.cpp index d1cb7442f9f..d2533a5ae0a 100644 --- a/netsvcs/lib/Logging_Strategy.cpp +++ b/netsvcs/lib/Logging_Strategy.cpp @@ -142,7 +142,7 @@ ACE_Logging_Strategy::init (int argc, char *argv[]) return ACE_LOG_MSG->open ("Logging_Strategy", ACE_LOG_MSG->flags (), - ACE_WIDE_STRING (ACE_DEFAULT_LOGGER_KEY)); + ACE_TEXT_CHAR_TO_TCHAR (ACE_DEFAULT_LOGGER_KEY)); } // The following is a "Factory" used by the ACE_Service_Config and diff --git a/netsvcs/lib/TS_Clerk_Handler.cpp b/netsvcs/lib/TS_Clerk_Handler.cpp index 724f31f6782..95565887a83 100644 --- a/netsvcs/lib/TS_Clerk_Handler.cpp +++ b/netsvcs/lib/TS_Clerk_Handler.cpp @@ -577,8 +577,8 @@ ACE_TS_Clerk_Processor::parse_args (int argc, char *argv[]) case 'p': // Get the poolname ACE_OS::strncpy (this->poolname_, - ACE_WIDE_STRING (get_opt.optarg), - sizeof this->poolname_ / sizeof (TCHAR)); + ACE_TEXT_CHAR_TO_TCHAR (get_opt.optarg), + sizeof this->poolname_ / sizeof (ACE_TCHAR)); break; case 'b': // Blocking semantics diff --git a/netsvcs/lib/TS_Clerk_Handler.h b/netsvcs/lib/TS_Clerk_Handler.h index 0a39709d7c9..4d2ba888736 100644 --- a/netsvcs/lib/TS_Clerk_Handler.h +++ b/netsvcs/lib/TS_Clerk_Handler.h @@ -231,7 +231,7 @@ private: int timeout_; // Time period for updating system time - TCHAR poolname_[MAXNAMLEN + 1]; + ACE_TCHAR poolname_[MAXNAMLEN + 1]; // Pool name for backing store int blocking_semantics_; diff --git a/performance-tests/Misc/test_naming.cpp b/performance-tests/Misc/test_naming.cpp index cad900da438..a7f3225a552 100644 --- a/performance-tests/Misc/test_naming.cpp +++ b/performance-tests/Misc/test_naming.cpp @@ -23,6 +23,8 @@ ACE_RCSID(Misc, test_naming, "$Id$") +#if defined (ACE_HAS_WCHAR) + #define ACE_NS_MAX_ENTRIES 4000 static char name[BUFSIZ]; @@ -164,9 +166,12 @@ void do_testing (int argc, char *argv[], int light) et.real_time, et.user_time, et.system_time)); } +#endif /* ACE_HAS_WCHAR */ + int main (int argc, char *argv[]) { +#if defined (ACE_HAS_WCHAR) // Do testing with SYNC on ACE_DEBUG ((LM_DEBUG, "SYNC is ON\n")); do_testing (argc, argv, 0); @@ -174,6 +179,8 @@ main (int argc, char *argv[]) // Do testing with SYNC off ACE_DEBUG ((LM_DEBUG, "SYNC is OFF\n")); do_testing (argc, argv, 1); - +#else /* ACE_HAS_WCHAR */ + ACE_ERROR ((LM_INFO, "Naming isn't supported without wchar_t\n")); +#endif /* ACE_HAS_WCHAR */ return 0; } diff --git a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp index c607221fcf3..875f0bd2345 100644 --- a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp +++ b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp @@ -181,9 +181,9 @@ Leader_Follower_Task::svc (void) } static int -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("m:s:w:b:t:d:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("m:s:w:b:t:d:")); int c; while ((c = get_opt ()) != -1) @@ -226,7 +226,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp index b41f5e0a97a..81e8f006111 100644 --- a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp +++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp @@ -223,9 +223,9 @@ IO_Task::svc (void) } static int -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("m:s:w:b:t:d:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("m:s:w:b:t:d:")); int c; while ((c = get_opt ()) != -1) @@ -268,7 +268,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/TCP/tcp_test.cpp b/performance-tests/TCP/tcp_test.cpp index 86222eea2fa..a52483bd681 100644 --- a/performance-tests/TCP/tcp_test.cpp +++ b/performance-tests/TCP/tcp_test.cpp @@ -405,8 +405,8 @@ thread_pool_worker (void *) { if (ACE_Reactor::instance ()->handle_events () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("Error handling events"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("Error handling events"))); } return 0; diff --git a/tests/ACE_Init_Test.dsp b/tests/ACE_Init_Test.dsp index 0605eb36ec3..7cfc470404c 100644 --- a/tests/ACE_Init_Test.dsp +++ b/tests/ACE_Init_Test.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 aced.lib /nologo /subsystem:windows /pdb:"./ACE_Init_Test.pdb" /debug /machine:I386 /out:"./ACE_Init_Test.exe" /pdbtype:sept /libpath:"..\ace"
-# SUBTRACT LINK32 /pdb:none
+# SUBTRACT LINK32 /pdb:none /nodefaultlib
# Begin Target
# Name "ACE_Init_Test - Win32 Debug"
diff --git a/tests/ARGV_Test.cpp b/tests/ARGV_Test.cpp index c0f77b9968a..621d6fd586d 100644 --- a/tests/ARGV_Test.cpp +++ b/tests/ARGV_Test.cpp @@ -22,7 +22,7 @@ ACE_RCSID(tests, ARGV_Test, "$Id$") int main (int, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("ARGV_Test")); + ACE_START_TEST (ACE_TEXT ("ARGV_Test")); // From command line. ACE_ARGV cl (argv); @@ -38,13 +38,13 @@ main (int, char *argv[]) my.argv ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("argc = %d\n"), - ASYS_TEXT (a.argc ()))); + ACE_TEXT ("argc = %d\n"), + ACE_TEXT (a.argc ()))); // Print the contents of the combined <ACE_ARGV>. for (size_t i = 0; i < a.argc (); i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d) %s\n"), + ACE_TEXT ("(%d) %s\n"), i, a.argv ()[i])); diff --git a/tests/Atomic_Op_Test.cpp b/tests/Atomic_Op_Test.cpp index cedbd26de63..c2d7712ca7f 100644 --- a/tests/Atomic_Op_Test.cpp +++ b/tests/Atomic_Op_Test.cpp @@ -27,9 +27,9 @@ ACE_RCSID(tests, Atomic_Op_Test, "$Id$") #if defined (ACE_HAS_THREADS) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Atomic_Op_Test")); + ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); ACE_Atomic_Op <ACE_Thread_Mutex, long> foo (5); @@ -62,12 +62,12 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, long>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Atomic_Op_Test")); + ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Auto_IncDec_Test.cpp b/tests/Auto_IncDec_Test.cpp index 255b3d5f1f2..169ec22b58e 100644 --- a/tests/Auto_IncDec_Test.cpp +++ b/tests/Auto_IncDec_Test.cpp @@ -36,7 +36,7 @@ static void * worker (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) worker starting\n"))); + ACE_TEXT (" (%t) worker starting\n"))); { // First section. ACE_Auto_IncDec<INTERLOCKED_INT> threads_in_section_auto_inc_dec @@ -60,7 +60,7 @@ worker (void *) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) worker exiting\n"))); + ACE_TEXT (" (%t) worker exiting\n"))); return 0; } @@ -83,13 +83,13 @@ template class ACE_Auto_IncDec<int>; // Spawn off threads. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Auto_IncDec_Test")); + ACE_START_TEST (ACE_TEXT ("Auto_IncDec_Test")); #if defined (ACE_HAS_THREADS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); current_threads_in_first_section = 0; current_threads_in_second_section = 0; @@ -100,8 +100,8 @@ main (int, ASYS_TCHAR *[]) 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), -1); // Make sure at least one thread is started... ACE_Thread::yield (); @@ -110,7 +110,7 @@ main (int, ASYS_TCHAR *[]) { // wait according to the number of threads... ACE_DEBUG ((LM_DEBUG, - " %d in first section, %d in second section\n", + ACE_TEXT (" %d in first section, %d in second section\n"), current_threads_in_first_section.value (), current_threads_in_second_section.value ())); @@ -124,7 +124,7 @@ main (int, ASYS_TCHAR *[]) && current_threads_in_second_section.value () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); #else int counter = 0; { diff --git a/tests/Barrier_Test.cpp b/tests/Barrier_Test.cpp index a29a6b7ef21..0d070d085fe 100644 --- a/tests/Barrier_Test.cpp +++ b/tests/Barrier_Test.cpp @@ -51,7 +51,7 @@ tester (Tester_Args *args) iterations <= args->n_iterations_; iterations++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in iteration %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in iteration %d\n"), iterations)); // Block until all other threads have waited, then continue. @@ -64,9 +64,9 @@ tester (Tester_Args *args) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Barrier_Test")); + ACE_START_TEST (ACE_TEXT ("Barrier_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; @@ -80,7 +80,7 @@ main (int, ASYS_TCHAR *[]) iteration_count < ACE_MAX_ITERATIONS; iteration_count++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("starting iteration %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("starting iteration %d\n"), iteration_count)); if (ACE_Thread_Manager::instance ()->spawn_n @@ -89,16 +89,16 @@ main (int, ASYS_TCHAR *[]) (void *) &args, THR_NEW_LWP | THR_JOINABLE) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("test done\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("test done\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp index f4be82c3a0a..82213cf85e2 100644 --- a/tests/Basic_Types_Test.cpp +++ b/tests/Basic_Types_Test.cpp @@ -29,7 +29,7 @@ # undef ACE_ERROR # define ACE_ERROR(x) ACE_OS::fprintf x # define LM_ERROR stderr -# define ACE_START_TEST(x) ACE_OS::printf (x ASYS_TEXT ("\n")) +# define ACE_START_TEST(x) ACE_OS::printf (x ACE_TEXT ("\n")) # define ACE_END_TEST #else /* ! ACE_HAS_MINIMAL_ACE_OS */ # include "test_config.h" @@ -41,16 +41,16 @@ typedef void* (*a_function_pointer) (void*); static u_int -check (const ASYS_TCHAR *message, u_int i, u_int j) +check (const ACE_TCHAR *message, u_int i, u_int j) { if (i == j) { - ACE_DEBUG ((LM_DEBUG, message, j, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, message, j, ACE_TEXT ("\n"))); return 0; } else { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("assertion failed \"%s\": %u != %u\n"), + ACE_ERROR ((LM_ERROR, ACE_TEXT ("assertion failed \"%s\": %u != %u\n"), message, i, j)); return 1; } @@ -58,33 +58,32 @@ check (const ASYS_TCHAR *message, u_int i, u_int j) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Basic_Types_Test")); + ACE_START_TEST (ACE_TEXT ("Basic_Types_Test")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("This is ACE Version %u.%u.%u\n\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("This is ACE Version %u.%u.%u\n\n"), ACE_MAJOR_VERSION, ACE_MINOR_VERSION, ACE_BETA_VERSION)); u_int errors = 0; - errors += check (ASYS_TEXT ("ACE_SIZEOF_CHAR: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_CHAR: %u%s"), sizeof (char), ACE_SIZEOF_CHAR); -#if defined (ACE_HAS_WCHAR_TYPEDEFS_CHAR) - errors += check (ASYS_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), - sizeof (char), ACE_SIZEOF_WCHAR); -#else - errors += check (ASYS_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), +#if defined (ACE_HAS_WCHAR) + // This is pointless - since ACE_SIZEOF_WCHAR is defined to sizeof (wchar_t) + // but oh well... + errors += check (ACE_TEXT ("ACE_SIZEOF_WCHAR: %u%s"), sizeof (wchar_t), ACE_SIZEOF_WCHAR); -#endif /* ACE_HAS_WCHAR_TYPEDEFS_CHAR */ - errors += check (ASYS_TEXT ("ACE_SIZEOF_SHORT: %u%s"), +#endif /* ACE_HAS_WCHAR */ + errors += check (ACE_TEXT ("ACE_SIZEOF_SHORT: %u%s"), sizeof (short), ACE_SIZEOF_SHORT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_INT: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_INT: %u%s"), sizeof (int), ACE_SIZEOF_INT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG: %u%s"), sizeof (long), ACE_SIZEOF_LONG); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG_LONG: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG_LONG: %u%s"), #if defined (ACE_WIN32) sizeof (unsigned __int64), #elif defined (ACE_LACKS_LONGLONG_T) @@ -93,77 +92,77 @@ main (int, ASYS_TCHAR *[]) sizeof (long long), #endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ ACE_SIZEOF_LONG_LONG); - errors += check (ASYS_TEXT ("sizeof 64-bit literal: %u%s"), + errors += check (ACE_TEXT ("sizeof 64-bit literal: %u%s"), sizeof ACE_UINT64_LITERAL (1), 8); - errors += check (ASYS_TEXT ("ACE_SIZEOF_VOID_P: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_VOID_P: %u%s"), sizeof (void *), ACE_SIZEOF_VOID_P); - errors += check (ASYS_TEXT ("ACE_SIZEOF_FLOAT: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_FLOAT: %u%s"), sizeof (float), ACE_SIZEOF_FLOAT); - errors += check (ASYS_TEXT ("ACE_SIZEOF_DOUBLE: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_DOUBLE: %u%s"), sizeof (double), ACE_SIZEOF_DOUBLE); - errors += check (ASYS_TEXT ("ACE_SIZEOF_LONG_DOUBLE: %u%s"), + errors += check (ACE_TEXT ("ACE_SIZEOF_LONG_DOUBLE: %u%s"), sizeof (long double), ACE_SIZEOF_LONG_DOUBLE); // Crays don't have 16-bit quantities, so don't even test for 16-bit values #if !defined(_UNICOS) - errors += check (ASYS_TEXT ("sizeof (ACE_INT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT16) is %u%s"), sizeof (ACE_INT16), 2); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT16) is %u%s"), sizeof (ACE_INT16), 2); #else /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_INT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT16) is %u%s"), sizeof (ACE_INT16), 8); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT16) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT16) is %u%s"), sizeof (ACE_INT16), 8); #endif /* ! _UNICOS */ // MPP Crays do have 32-bit quantities (short), though vector Crays don't #if !defined(_UNICOS) || defined(_CRAYMPP) - errors += check (ASYS_TEXT ("sizeof (ACE_INT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT32) is %u%s"), sizeof (ACE_INT32), 4); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT32) is %u%s"), sizeof (ACE_INT32), 4); #else /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_INT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_INT32) is %u%s"), sizeof (ACE_INT32), 8); - errors += check (ASYS_TEXT ("sizeof (ACE_UINT32) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT32) is %u%s"), sizeof (ACE_INT32), 8); #endif /* ! _UNICOS */ - errors += check (ASYS_TEXT ("sizeof (ACE_UINT64) is %u%s"), + errors += check (ACE_TEXT ("sizeof (ACE_UINT64) is %u%s"), sizeof (ACE_UINT64), 8); // ACE assumes sizeof (long) == sizeof (void*) if (sizeof (long) == sizeof (void *)) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) == sizeof (void*)\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sizeof (long) == sizeof (void*)\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) != sizeof (void*)\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("sizeof (long) != sizeof (void*)\n"))); // ACE assumes sizeof (long) >= sizeof (a_function_pointer) if (sizeof (long) >= sizeof (a_function_pointer)) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) >= sizeof (a_function_pointer)\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sizeof (long) >= sizeof (a_function_pointer)\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) < sizeof (a_function_pointer)\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("sizeof (long) < sizeof (a_function_pointer)\n"))); #if defined (ACE_LITTLE_ENDIAN) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("little endian\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("little endian\n"))); #elif defined (ACE_BIG_ENDIAN) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("big endian\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("big endian\n"))); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("assertion failed: no ACE_*_ENDIAN definition!\n"))); + ACE_TEXT ("assertion failed: no ACE_*_ENDIAN definition!\n"))); #endif /* ACE_LITTLE_ENDIAN */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("OS page size: %u\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OS page size: %u\n"), ACE_OS::getpagesize ())); #if defined (_SC_PAGESIZE) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sysconf page size: %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sysconf page size: %d\n"), (int) ACE_OS::sysconf (_SC_PAGESIZE))); #endif /* _SC_PAGESIZE */ #if defined (_SC_CLK_TCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("clock ticks/sec = %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("clock ticks/sec = %d\n"), (int) ACE_OS::sysconf (_SC_CLK_TCK))); #endif /* _SC_CLK_TCK */ diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index 7540988d69b..dd0b6eb740d 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -83,7 +83,7 @@ int Common_Task::open (void *) { if (this->activate (THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), -1); return 0; } @@ -91,7 +91,7 @@ int Common_Task::close (u_long exit_status) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) thread is exiting with status %d in module %s\n"), + ACE_TEXT ("(%t) thread is exiting with status %d in module %s\n"), exit_status, this->name ())); @@ -129,13 +129,13 @@ Supplier::svc (void) mb->wr_ptr (2); if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next"))); } ACE_NEW_RETURN(mb, ACE_Message_Block, -1); if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), ASYS_TEXT ("put_next"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), ACE_TEXT ("put_next"))); return 0; } @@ -198,9 +198,9 @@ Consumer::svc (void) // Main driver function. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Buffer_Stream_Test")); + ACE_START_TEST (ACE_TEXT ("Buffer_Stream_Test")); #if defined (ACE_HAS_THREADS) // Control hierachically-related active objects. @@ -209,23 +209,23 @@ main (int, ASYS_TCHAR *[]) MT_Module *sm; // Allocate the Consumer and Supplier modules. - ACE_NEW_RETURN (cm, MT_Module (ASYS_TEXT ("Consumer"), new Consumer), -1); - ACE_NEW_RETURN (sm, MT_Module (ASYS_TEXT ("Supplier"), new Supplier), -1); + ACE_NEW_RETURN (cm, MT_Module (ACE_TEXT ("Consumer"), new Consumer), -1); + ACE_NEW_RETURN (sm, MT_Module (ACE_TEXT ("Supplier"), new Supplier), -1); // Create Supplier and Consumer Modules and push them onto the // Stream. All processing is performed in the Stream. if (stream.push (cm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("push")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("push")), 1); else if (stream.push (sm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("push")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("push")), 1); // Barrier synchronization: wait for the threads to exit, then exit // ourselves. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/CDR_File_Test.cpp b/tests/CDR_File_Test.cpp index 9a254cefc4e..34fba990146 100644 --- a/tests/CDR_File_Test.cpp +++ b/tests/CDR_File_Test.cpp @@ -122,7 +122,7 @@ CDR_Test::operator == (const CDR_Test &rhs) static int run_test (int write_file, ACE_FILE_IO &file, - LPCTSTR filename, + const ACE_TCHAR *filename, CDR_Test &cdr_test) { if (write_file) @@ -143,7 +143,7 @@ run_test (int write_file, output_cdr.begin (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Writing file %s in %s endian format...\n"), + ACE_TEXT ("Writing file %s in %s endian format...\n"), filename, ACE_CDR_BYTE_ORDER ? "little" : "big")); @@ -151,7 +151,7 @@ run_test (int write_file, output_mb->length ()); if (n != (ssize_t) output_mb->length()) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("send failed on %p\n"), + ACE_TEXT ("send failed on %p\n"), filename), -1); } @@ -160,7 +160,7 @@ run_test (int write_file, ACE_FILE_Info info; if (file.get_info (info) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("get_info failed on %p\n"), + ACE_TEXT ("get_info failed on %p\n"), filename), -1); @@ -176,7 +176,7 @@ run_test (int write_file, if (file.seek (0, SEEK_SET) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), + ACE_TEXT ("%p\n"), filename), -1); // Read the file into the buffer. @@ -184,8 +184,8 @@ run_test (int write_file, info.size_); if (size != info.size_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Read %d bytes, rather than expected ") - ASYS_TEXT ("%d bytes\n"), + ACE_TEXT ("Read %d bytes, rather than expected ") + ACE_TEXT ("%d bytes\n"), size, info.size_), -1); @@ -203,7 +203,7 @@ run_test (int write_file, input_cdr.reset_byte_order (ACE_CDR_BYTE_ORDER); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Reading file %s in %s endian format...\n"), + ACE_TEXT ("Reading file %s in %s endian format...\n"), filename, ACE_CDR_BYTE_ORDER ? "little" : "big")); @@ -223,9 +223,9 @@ run_test (int write_file, // Main function int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_File_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); // Create a temporary filename. ACE_FILE_Addr filename (ACE_sap_any_cast (ACE_FILE_Addr &)); @@ -242,14 +242,14 @@ main (int, ASYS_TCHAR *[]) O_RDWR | O_CREAT, ACE_DEFAULT_FILE_PERMS) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), filename.get_path_name ()), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (file.unlink () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), filename.get_path_name ()), 1); CDR_Test cdr_test ('a', @@ -290,12 +290,12 @@ main (int, ASYS_TCHAR *[]) #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_File_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("iostreams not supported on this platform\n"))); + ACE_TEXT ("iostreams not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/CDR_Test.cpp b/tests/CDR_Test.cpp index d2624bd307a..1aabb2c5225 100644 --- a/tests/CDR_Test.cpp +++ b/tests/CDR_Test.cpp @@ -110,8 +110,8 @@ short_stream (void) if (in_mb->length () != len) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("buffer length not preserved")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("buffer length not preserved")), 1); u_long in_chunk, out_chunk; @@ -122,8 +122,8 @@ short_stream (void) out_chunk = u_long (* (out_mb->rd_ptr () + i)); if (in_chunk != out_chunk ) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("buffer contents not preserved")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("buffer contents not preserved")), 1); } @@ -144,7 +144,7 @@ short_stream (void) ACE_CDR::Double d_array1[3]; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Checking operators and arrays\n\n"))); + ACE_TEXT ("Checking operators and arrays\n\n"))); ACE_InputCDR::to_char tc (ch1); is >> tc; @@ -162,78 +162,78 @@ short_stream (void) if (ch1 != ch) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("char transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("char transfer error")), 1); if (str1 != str) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("string transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("string transfer error")), 1); if (s1 != s) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("short transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("short transfer error")), 1); if (us1 != us) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ushort transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("ushort transfer error")), 1); if (l1 != l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("long transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("long transfer error")), 1); if (ul1 != ul) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ulong transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("ulong transfer error")), 1); if (f1 != f) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("float transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("float transfer error")), 1); if (d1 != d) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("double transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("double transfer error")), 1); for (i = 0 ; i < 3; i++) if (s_array1[i] != s_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("short array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("short array transfer error")), 1); for (i = 0 ; i < 3; i++) if (l_array1[i] != l_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("long array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("long array transfer error")), 1); for (i = 0 ; i < 3; i++) if (f_array1[i] != f_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("float array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("float array transfer error")), 1); for (i = 0 ; i < 3; i++) if (d_array1[i] != d_array[i]) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("double array transfer error")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("double array transfer error")), 1); return 0; @@ -246,33 +246,33 @@ CDR_Test_Types::test_put (ACE_OutputCDR &cdr) { if (cdr.write_octet (this->o) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_octet[%d] failed\n"), + ACE_TEXT ("write_octet[%d] failed\n"), i), 1); if (cdr.write_short (this->s) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_short[%d] failed\n"), + ACE_TEXT ("write_short[%d] failed\n"), i), 1); if (cdr.write_octet (this->o) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_octet-2[%d] failed\n"), + ACE_TEXT ("write_octet-2[%d] failed\n"), i), 1); if (cdr.write_long (this->l) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_long[%d] failed\n"), + ACE_TEXT ("write_long[%d] failed\n"), i), 1); if (cdr.write_long (this->l) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_long-2[%d] failed\n"), + ACE_TEXT ("write_long-2[%d] failed\n"), i), 1); if (cdr.write_string (this->str) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("write_string[%d] failed\n"), + ACE_TEXT ("write_string[%d] failed\n"), i), 1); @@ -292,64 +292,64 @@ CDR_Test_Types::test_get (ACE_InputCDR &cdr) const { if (cdr.read_octet (xo) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_octet[%d] failed\n"), + ACE_TEXT ("read_octet[%d] failed\n"), i), 1); if (xo != this->o) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("octet[%d] differs\n"), + ACE_TEXT ("octet[%d] differs\n"), i), 1); if (cdr.read_short (xs) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_short[%d] failed\n"), + ACE_TEXT ("read_short[%d] failed\n"), i), 1); if (xs != this->s) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("short[%d] differs\n"), + ACE_TEXT ("short[%d] differs\n"), i), 1); if (cdr.read_octet (xo) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_octet-2[%d] failed\n"), + ACE_TEXT ("read_octet-2[%d] failed\n"), i), 1); if (xo != this->o) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("octet-2[%d] differs\n"), + ACE_TEXT ("octet-2[%d] differs\n"), i), 1); if (cdr.read_long (xl) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_long[%d] failed\n"), + ACE_TEXT ("read_long[%d] failed\n"), i), 1); if (xl != this->l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("long[%d] differs\n"), + ACE_TEXT ("long[%d] differs\n"), i), 1); if (cdr.read_long (xl) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_long-2[%d] failed\n"), + ACE_TEXT ("read_long-2[%d] failed\n"), i), 1); if (xl != this->l) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("long-2[%d] differs\n"), + ACE_TEXT ("long-2[%d] differs\n"), i), 1); ACE_CDR::Char *xstr; if (cdr.read_string (xstr) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("read_string2[%d] failed\n"), + ACE_TEXT ("read_string2[%d] failed\n"), i), 1); ACE_Auto_Basic_Array_Ptr<ACE_CDR::Char> auto_xstr (xstr); if (ACE_OS::strcmp (auto_xstr.get (), this->str) != 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("string[%d] differs\n"), + ACE_TEXT ("string[%d] differs\n"), i), 1); } @@ -357,17 +357,17 @@ CDR_Test_Types::test_get (ACE_InputCDR &cdr) const } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("CDR_Test")); + ACE_START_TEST (ACE_TEXT ("CDR_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This is ACE Version %u.%u.%u\n\n"), + ACE_TEXT ("This is ACE Version %u.%u.%u\n\n"), ACE::major_version (), ACE::minor_version(), ACE::beta_version())); - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("dn:l:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("dn:l:")); int opt; int debug = 0; @@ -387,25 +387,25 @@ main (int argc, ASYS_TCHAR *argv[]) case '?': default: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Usage: %s ") - ASYS_TEXT ("-d debug") - ASYS_TEXT ("-n <num> ") - ASYS_TEXT ("-l <loops> ") - ASYS_TEXT ("\n"), + ACE_TEXT ("Usage: %s ") + ACE_TEXT ("-d debug") + ACE_TEXT ("-n <num> ") + ACE_TEXT ("-l <loops> ") + ACE_TEXT ("\n"), argv[0])); return -1; } } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Testing ACE CDR functions - short stream\n\n"))); + ACE_TEXT ("Testing ACE CDR functions - short stream\n\n"))); if (short_stream () != 0 ) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Short stream - no errors\n\n") - ASYS_TEXT ("Testing basic types - long stream\n\n"))); + ACE_TEXT ("Short stream - no errors\n\n") + ACE_TEXT ("Testing basic types - long stream\n\n"))); for (int i = 0; i < nloops; ++i) { @@ -419,12 +419,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Output CDR: \n"))); + ACE_TEXT ("Output CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Input CDR: \n"))); + ACE_TEXT ("Input CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); @@ -435,8 +435,8 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Long stream - no errors\n\n") - ASYS_TEXT ("Testing basic types - long stream[2]\n\n"))); + ACE_TEXT ("Long stream - no errors\n\n") + ACE_TEXT ("Testing basic types - long stream[2]\n\n"))); for (int j = 0; j < nloops; ++j) { @@ -450,12 +450,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Output CDR: \n"))); + ACE_TEXT ("Output CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Input CDR: \n"))); + ACE_TEXT ("Input CDR: \n"))); ACE_HEX_DUMP ((LM_DEBUG, input.rd_ptr(), 64)); @@ -466,7 +466,7 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Long stream[2] - no errors\n\n"))); + ACE_TEXT ("Long stream[2] - no errors\n\n"))); ACE_END_TEST; return 0; diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp index 24fb6bcf298..26c708291e5 100644 --- a/tests/Cache_Map_Manager_Test.cpp +++ b/tests/Cache_Map_Manager_Test.cpp @@ -142,7 +142,7 @@ run_iterator_cache (MAP_CACHE &cache) { // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); @@ -150,7 +150,7 @@ run_iterator_cache (MAP_CACHE &cache) ++counter; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_UNUSED_ARG (iterations); ACE_ASSERT (counter == iterations); @@ -169,7 +169,7 @@ run_iterator_hash_cache (HASH_MAP_CACHE &cache) { // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); @@ -177,7 +177,7 @@ run_iterator_hash_cache (HASH_MAP_CACHE &cache) ++counter; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_UNUSED_ARG (iterations); ACE_ASSERT (counter == iterations); @@ -198,14 +198,14 @@ run_reverse_iterator_cache (MAP_CACHE &cache) // Debugging info. if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); --counter; } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -225,14 +225,14 @@ run_reverse_iterator_hash_cache (HASH_MAP_CACHE &cache) // Debugging info. if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d)"), + ACE_TEXT ("(%d|%d)"), (*iter).first (), (*iter).second ())); --counter; } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -249,13 +249,13 @@ find_test_cache (MAP_CACHE &cache) ACE_ASSERT (j == lookup_array[i]); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d "), j)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d "), j)); ACE_UNUSED_ARG (result); } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } static void @@ -270,13 +270,13 @@ find_test_hash_cache (HASH_MAP_CACHE &cache) ACE_ASSERT (j == lookup_array[i]); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d "), j)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d "), j)); ACE_UNUSED_ARG (result); } if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } static void @@ -352,14 +352,14 @@ functionality_test_cache (MAP_CACHING_STRATEGY &caching_strategy) ACE_UNUSED_ARG (result); if (debug) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("keys[%d]=%d value=[%d]=%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("keys[%d]=%d value=[%d]=%d\n"), i, i, j, j)); ++counter; ACE_ASSERT (cache.current_size () == counter); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache before purging: %d\n"), + ACE_TEXT ("Number of entries in cache before purging: %d\n"), cache.current_size ())); run_iterator_cache (cache); @@ -373,7 +373,7 @@ functionality_test_cache (MAP_CACHING_STRATEGY &caching_strategy) run_reverse_iterator_cache (cache); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache after purging: %d\n"), + ACE_TEXT ("Number of entries in cache after purging: %d\n"), cache.current_size ())); } @@ -395,14 +395,14 @@ functionality_test_hash_cache (HASH_MAP_CACHING_STRATEGY &caching_strategy) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("keys[%d]=%d value=[%d]=%d\n"), + ACE_TEXT ("keys[%d]=%d value=[%d]=%d\n"), i, i, j, j)); ++counter; ACE_ASSERT (cache.current_size () == counter); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache before purging: %d\n"), + ACE_TEXT ("Number of entries in cache before purging: %d\n"), cache.current_size ())); run_iterator_hash_cache (cache); @@ -416,7 +416,7 @@ functionality_test_hash_cache (HASH_MAP_CACHING_STRATEGY &caching_strategy) run_reverse_iterator_hash_cache (cache); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of entries in cache after purging: %d\n"), + ACE_TEXT ("Number of entries in cache after purging: %d\n"), cache.current_size ())); } @@ -429,7 +429,7 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nNull_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_NULL_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -437,7 +437,7 @@ test_caching_strategy_type (void) break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nLRU_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_LRU_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -445,7 +445,7 @@ test_caching_strategy_type (void) break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nLFU_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_LFU_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -453,7 +453,7 @@ test_caching_strategy_type (void) break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nFIFO_Caching_Strategy\n\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (map_caching_strategy, MAP_FIFO_ADAPTER); ACE_NEW (hash_map_caching_strategy, @@ -464,10 +464,10 @@ test_caching_strategy_type (void) break; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("map cache\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("map cache\n"))); functionality_test_cache (*map_caching_strategy); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nhash map cache\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhash map cache\n"))); functionality_test_hash_cache (*hash_map_caching_strategy); delete map_caching_strategy; @@ -475,9 +475,9 @@ test_caching_strategy_type (void) } static int -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("c:i:r:f:p:d")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("c:i:r:f:p:d")); int cc; while ((cc = get_opt ()) != -1) @@ -485,13 +485,13 @@ parse_args (int argc, ASYS_TCHAR *argv[]) switch (cc) { case 'c': - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("null")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("lru")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("lfu")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, ASYS_TEXT ("fifo")) == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'i': @@ -513,13 +513,13 @@ parse_args (int argc, ASYS_TCHAR *argv[]) case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-r (randomize lookups)] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-d (debug, i.e., addition printouts)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-f (number of lookups)] \n"), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-r (randomize lookups)] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-d (debug, i.e., addition printouts)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-f (number of lookups)] \n"), argv[0])); return -1; } @@ -528,7 +528,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -536,7 +536,7 @@ main (int argc, ASYS_TCHAR *argv[]) return result; // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cache_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Cache_Map_Manager_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -550,7 +550,7 @@ main (int argc, ASYS_TCHAR *argv[]) -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nLookup sequence: "))); + ACE_TEXT ("\nLookup sequence: "))); // Initialize the lookup array. for (size_t k = 0; @@ -563,12 +563,12 @@ main (int argc, ASYS_TCHAR *argv[]) lookup_array[k] = k % iterations; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), lookup_array[k])); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\n"))); + ACE_TEXT ("\n\n"))); // Do we need to test all the strategies. if (caching_strategy_type == ACE_ALL) diff --git a/tests/Cached_Accept_Conn_Test.cpp b/tests/Cached_Accept_Conn_Test.cpp index 7683f3d53bb..eddee72acb6 100644 --- a/tests/Cached_Accept_Conn_Test.cpp +++ b/tests/Cached_Accept_Conn_Test.cpp @@ -110,7 +110,7 @@ Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler (SVC_HANDL { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Accept succeeded with handle %d\n"), + ACE_TEXT ("Accept succeeded with handle %d\n"), svc_handler->get_handle ())); return result; } @@ -134,7 +134,7 @@ Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::out_of_sockets_handler (void) // Close connections which are cached by explicitly purging the // connection cache maintained by the connector. ACE_DEBUG ((LM_DEBUG, - "Purging connections from Connection Cache...\n")); + ACE_TEXT ("Purging connections from Connection Cache...\n"))); return this->caching_connect_strategy_.purge_connections (); } @@ -348,7 +348,7 @@ Client_Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Client_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Client_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return 0; @@ -358,7 +358,7 @@ int Client_Svc_Handler::close (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Closing Client_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("Closing Client_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::close (flags); @@ -375,7 +375,7 @@ Server_Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Server_Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Server_Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); @@ -422,13 +422,13 @@ cached_connect (STRATEGY_CONNECTOR &con, remote_addr); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("connection failed")), -1); else if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Connection successful to server at port %d!\n"), + ACE_TEXT ("Connection successful to server at port %d!\n"), remote_addr.get_port_number ())); // Reset Svc_Handler state. @@ -485,7 +485,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) for (int i = 1; i <= iterations; ++i) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iteration %d\n"), + ACE_TEXT ("iteration %d\n"), i)); // Connect strategy is required by the <out_of_sockets_handler>. @@ -505,16 +505,16 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) &listen_multiple_times_accept_strategy) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("open"))); ACE_ASSERT (0); } if (listen_multiple_times_acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); ACE_ASSERT (0); } @@ -522,7 +522,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting server at port %d\n"), + ACE_TEXT ("starting server at port %d\n"), server_addr.get_port_number ())); // Run the cached blocking test. @@ -555,25 +555,25 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, "\nNull_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, NULL_CACHING_STRATEGY_ADAPTER); break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, "\nLRU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LRU_CACHING_STRATEGY_ADAPTER); break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, "\nLFU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LFU_CACHING_STRATEGY_ADAPTER); break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, "\nFIFO_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, FIFO_CACHING_STRATEGY_ADAPTER); break; @@ -590,9 +590,9 @@ test_caching_strategy_type (void) #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "l:i:p:c:a:d"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("l:i:p:c:a:d")); int cc; @@ -603,43 +603,43 @@ parse_args (int argc, char *argv[]) debug = 1; break; case 'l': - listen_once = atoi (get_opt.optarg); + listen_once = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); user_has_specified_iterations = 1; break; case 'p': - purge_percentage = atoi (get_opt.optarg); + purge_percentage = ACE_OS::atoi (get_opt.optarg); break; case 'c': // Note that if null caching strategy is used then this test // will fail if the number of servers exceed number of open // files allowed for the process. - if (ACE_OS::strcmp (get_opt.optarg, "null") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, "lru") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, "lfu") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, "fifo") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'a': - keep_handles_available = atoi (get_opt.optarg); + keep_handles_available = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-t (timeout)] ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-l (listen once)] ") - ASYS_TEXT ("[-d (addition debugging output)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-a (keep handles available)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-t (timeout)] ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-l (listen once)] ") + ACE_TEXT ("[-d (addition debugging output)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-a (keep handles available)] "), argv[0])); return -1; } @@ -649,7 +649,7 @@ parse_args (int argc, char *argv[]) int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -665,7 +665,7 @@ main (int argc, #endif /* ACE_WIN32 */ // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cached_Accept_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Accept_Conn_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -713,14 +713,14 @@ main (int argc, int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Cached_Accept_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Accept_Conn_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C Set++ won't build this test correctly\n"))); + ACE_TEXT ("C Set++ won't build this test correctly\n"))); #endif /* !__xlC__ || __xlC > 0x0301 */ diff --git a/tests/Cached_Conn_Test.cpp b/tests/Cached_Conn_Test.cpp index c1ccafa58f3..a4e682dd4a8 100644 --- a/tests/Cached_Conn_Test.cpp +++ b/tests/Cached_Conn_Test.cpp @@ -312,7 +312,7 @@ Svc_Handler::open (void *) { if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("opening Svc_Handler %d with handle %d\n"), + ACE_TEXT ("opening Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); @@ -323,7 +323,7 @@ int Svc_Handler::close (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Closing Svc_Handler %d with handle %d\n"), + ACE_TEXT ("Closing Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::close (flags); @@ -363,7 +363,7 @@ out_of_sockets_handler (void) { // Close connections which are cached by explicitly purging the // connection cache maintained by the connector. - ACE_DEBUG ((LM_DEBUG, "Purging connections from Connection Cache...\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Purging connections from Connection Cache...\n"))); int retval = connect_strategy->purge_connections (); ACE_ASSERT (retval != -1); @@ -371,8 +371,8 @@ out_of_sockets_handler (void) else { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("out_of_sockets_handler failed!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("out_of_sockets_handler failed!"))); // This shouldn't happen! ACE_ASSERT (0); } @@ -393,8 +393,8 @@ cached_connect (STRATEGY_CONNECTOR &con, remote_addr); if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("connection failed")), -1); // Reset Svc_Handler state. @@ -418,7 +418,7 @@ server (ACCEPTOR *acceptor) if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("client %s connected from %d\n"), + ACE_TEXT ("client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -459,7 +459,7 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) for (int i = 1; i <= iterations; ++i) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iteration %d\n"), + ACE_TEXT ("iteration %d\n"), i)); // If <listen_once> is false, one Acceptor is used for every @@ -483,14 +483,14 @@ test_connection_management (CACHING_STRATEGY &caching_strategy) if (acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); ACE_ASSERT (0); } if (debug) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting server at port %d\n"), + ACE_TEXT ("starting server at port %d\n"), server_addr.get_port_number ())); } @@ -526,25 +526,25 @@ test_caching_strategy_type (void) switch (caching_strategy_type) { case ACE_NULL: - ACE_DEBUG ((LM_DEBUG, "\nNull_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nNull_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, NULL_CACHING_STRATEGY_ADAPTER); break; case ACE_LRU: - ACE_DEBUG ((LM_DEBUG, "\nLRU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLRU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LRU_CACHING_STRATEGY_ADAPTER); break; case ACE_LFU: - ACE_DEBUG ((LM_DEBUG, "\nLFU_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nLFU_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, LFU_CACHING_STRATEGY_ADAPTER); break; case ACE_FIFO: - ACE_DEBUG ((LM_DEBUG, "\nFIFO_Caching_Strategy\n\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nFIFO_Caching_Strategy\n\n"))); ACE_NEW (caching_strategy, FIFO_CACHING_STRATEGY_ADAPTER); break; @@ -561,9 +561,9 @@ test_caching_strategy_type (void) #endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */ int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "l:i:p:c:a:d"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("l:i:p:c:a:d")); int cc; @@ -574,42 +574,42 @@ parse_args (int argc, char *argv[]) debug = 1; break; case 'l': - listen_once = atoi (get_opt.optarg); + listen_once = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); user_has_specified_iterations = 1; break; case 'p': - purge_percentage = atoi (get_opt.optarg); + purge_percentage = ACE_OS::atoi (get_opt.optarg); break; case 'c': // Note that if null caching strategy is used then this test // will fail if the number of servers exceed number of open // files allowed for the process. - if (ACE_OS::strcmp (get_opt.optarg, "null") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("null")) == 0) caching_strategy_type = ACE_NULL; - if (ACE_OS::strcmp (get_opt.optarg, "lru") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lru")) == 0) caching_strategy_type = ACE_LRU; - if (ACE_OS::strcmp (get_opt.optarg, "lfu") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("lfu")) == 0) caching_strategy_type = ACE_LFU; - if (ACE_OS::strcmp (get_opt.optarg, "fifo") == 0) + if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("fifo")) == 0) caching_strategy_type = ACE_FIFO; break; case 'a': - keep_handles_available = atoi (get_opt.optarg); + keep_handles_available = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-l (listen once)] ") - ASYS_TEXT ("[-d (addition debugging output)] ") - ASYS_TEXT ("[-p (purge percent)] ") - ASYS_TEXT ("[-a (keep handles available)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-c (caching strategy: lru / lfu / fifo / null [default = all])] ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-l (listen once)] ") + ACE_TEXT ("[-d (addition debugging output)] ") + ACE_TEXT ("[-p (purge percent)] ") + ACE_TEXT ("[-a (keep handles available)] "), argv[0])); return -1; } @@ -619,7 +619,7 @@ parse_args (int argc, char *argv[]) int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -635,7 +635,7 @@ main (int argc, #endif /* ACE_WIN32 */ // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Cached_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Conn_Test")); // Remove the extra debugging attributes from Log_Msg output. ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); @@ -683,14 +683,14 @@ main (int argc, int main (int argc, - ASYS_TCHAR *argv[]) + ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Cached_Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Cached_Conn_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C Set++ won't build this test correctly\n"))); + ACE_TEXT ("C Set++ won't build this test correctly\n"))); #endif /* !__xlC__ || __xlC > 0x0301 */ diff --git a/tests/Capabilities_Test.cpp b/tests/Capabilities_Test.cpp index 984f1c7be48..f123a2ba2bb 100644 --- a/tests/Capabilities_Test.cpp +++ b/tests/Capabilities_Test.cpp @@ -22,45 +22,44 @@ ACE_RCSID(tests, Capabilities_Test, "$Id$") -static const char config[] = "Capabilities_Test.cfg"; +static const ACE_TCHAR config[] = ACE_TEXT ("Capabilities_Test.cfg"); static int load_config (void) { ACE_Capabilities caps; - if (caps.getent (config, - "Config") == -1) + if (caps.getent (config, ACE_TEXT ("Config")) == -1) ACE_ERROR_RETURN ((LM_ERROR, - "Can't read %s", + ACE_TEXT ("Can't read %s"), config), 1); int b = 0; - caps.getval ("bool", b); + caps.getval (ACE_TEXT ("bool"), b); ACE_DEBUG ((LM_DEBUG, - "bool = %d\n", + ACE_TEXT ("bool = %d\n"), b)); int n = 0; - caps.getval ("integer", n); + caps.getval (ACE_TEXT ("integer"), n); ACE_DEBUG ((LM_DEBUG, - "integer = %d\n", + ACE_TEXT ("integer = %d\n"), n)); - ACE_CString s; - caps.getval ("string", s); + ACE_TString s; + caps.getval (ACE_TEXT ("string"), s); ACE_DEBUG ((LM_DEBUG, - "string = %s\n", + ACE_TEXT ("string = %s\n"), s.c_str ())); return 0; } int -main (int, char *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Capabilities_Test")); + ACE_START_TEST (ACE_TEXT ("Capabilities_Test")); // -------------------------------------------------------- @@ -79,7 +78,7 @@ main (int, char *[]) ACE_HANDLE fd = ACE_OS::open (config, O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::open"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::open")), -1); if (ACE_OS::write (fd, file_contents, sizeof(file_contents)) != @@ -87,13 +86,13 @@ main (int, char *[]) { ACE_OS::unlink (config); ACE_OS::close (fd); - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::write"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::write")), -1); } if (ACE_OS::close (fd) != 0) { ACE_OS::unlink (config); - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::close"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_OS::close")), -1); } // -------------------------------------------------------- diff --git a/tests/Collection_Test.cpp b/tests/Collection_Test.cpp index 3d25d4fd6d8..b225a928dae 100644 --- a/tests/Collection_Test.cpp +++ b/tests/Collection_Test.cpp @@ -25,9 +25,9 @@ ACE_RCSID(tests, Collection_Test, "$Id$") typedef int DATA; -int main (int, ASYS_TCHAR *[]) +int main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Collection_Test")); + ACE_START_TEST (ACE_TEXT ("Collection_Test")); typedef ACE_Unbounded_Set<DATA> UNBOUNDED_SET; typedef ACE_Unbounded_Set_Iterator<DATA> UNBOUNDED_SET_ITERATOR; @@ -43,7 +43,7 @@ int main (int, ASYS_TCHAR *[]) iterator != unbounded_set.end (); ++iterator) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*iterator))); } } @@ -54,7 +54,7 @@ int main (int, ASYS_TCHAR *[]) { DATA *data = 0; iterator.next (data); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*data))); iterator.advance (); } @@ -94,7 +94,7 @@ int main (int, ASYS_TCHAR *[]) i != array1.size (); ++i) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), array1[i])); ACE_ASSERT (array1[i] == 4); } @@ -106,7 +106,7 @@ int main (int, ASYS_TCHAR *[]) { DATA *data = 0; iterator.next (data); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), (*data))); ACE_ASSERT (*data == 4); iterator.advance (); diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index dfc6a05f473..36298bd161d 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -219,14 +219,14 @@ int Svc_Handler::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) opening Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); // Enable non-blocking I/O. if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable")), -1); return 0; } @@ -235,7 +235,7 @@ int Svc_Handler::recycle (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) recycling Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) recycling Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return 0; @@ -249,8 +249,8 @@ Svc_Handler::send_data (void) for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (this->peer ().send_n (c, 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); } void @@ -273,8 +273,8 @@ Svc_Handler::recv_data (void) handle_set, 0, 0, 0) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select"))); else { char c; @@ -295,26 +295,26 @@ Svc_Handler::recv_data (void) if (r_bytes == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); // Close endpoint handle (but don't close <this> yet // since we're going to recycle it for the next // iteration). if (new_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); break; } else if (r_bytes == -1) { if (errno == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n"))); } } } @@ -326,8 +326,8 @@ Svc_Handler::close (u_long side) // Only run this protocol if we're the write-side (i.e., "1"). if (side == 1 && this->peer ().close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close_writer"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close_writer"))); // Trigger the shutdown. return this->handle_close (); } @@ -336,7 +336,7 @@ int Svc_Handler::idle (u_long flags) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) idling Svc_Handler %d with handle %d\n"), + ACE_TEXT ("(%P|%t) idling Svc_Handler %d with handle %d\n"), this, this->peer ().get_handle ())); return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::idle (flags); @@ -360,8 +360,8 @@ timed_blocking_connect (CONNECTOR &con, server_addr, options) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); else { // Send the data to the server. @@ -370,8 +370,8 @@ timed_blocking_connect (CONNECTOR &con, // Close the connection completely. if (svc_handler->close (1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); } } @@ -387,8 +387,8 @@ blocking_connect (CONNECTOR &con, if (con.connect (svc_handler, server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); else { // Send the data to the server. @@ -397,8 +397,8 @@ blocking_connect (CONNECTOR &con, // Close the connection completely. if (svc_handler->close (1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); } } @@ -422,8 +422,8 @@ cached_connect (STRAT_CONNECTOR &con, server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); return; } @@ -467,7 +467,7 @@ client_connections (void *arg) // Run the timed-blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting timed-blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting timed-blocking connect\n"))); timed_blocking_connect (*info->connector_, *info->server_addr_); @@ -478,7 +478,7 @@ client_connections (void *arg) // Run the blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting blocking connect\n"))); blocking_connect (*info->connector_, *info->server_addr_); @@ -489,7 +489,7 @@ client_connections (void *arg) // Run the cached blocking test. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** starting cached blocking connect\n"))); + ACE_TEXT ("(%P|%t) **** starting cached blocking connect\n"))); cached_connect (*info->strat_connector_, *info->server_addr_); return 0; @@ -534,8 +534,8 @@ client (void *arg) (void *) &info, THR_NEW_LWP) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("client thread spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("client thread spawn failed"))); // Wait for the threads to exit. client_manager.wait (); @@ -553,7 +553,7 @@ server (void *arg) { #if defined (VXWORKS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) server stack size is %u\n"), + ACE_TEXT ("(%P|%t) server stack size is %u\n"), ACE_OS::thr_min_stack ())); #endif /* VXWORKS */ @@ -593,17 +593,17 @@ server (void *arg) if (errno == ETIMEDOUT) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("accept timed out\n"))); + ACE_TEXT ("accept timed out\n"))); return 0; } else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept failed, shutting down")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept failed, shutting down")), 0); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -639,13 +639,13 @@ spawn_processes (ACCEPTOR *acceptor, // on the same port number for clients to connect. for (i = 0; i < n_servers; i++) { - pid_t pid = ACE_OS::fork (ASYS_TEXT ("child")); + pid_t pid = ACE_OS::fork (ACE_TEXT ("child")); switch (pid) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); ACE_OS::exit (-1); /* NOTREACHED */ case 0: // In the child. @@ -670,7 +670,7 @@ spawn_processes (ACCEPTOR *acceptor, // Shutdown the servers. if (ACE_OS::kill (children[i], SIGTERM) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p for %d\n"), + ACE_TEXT ("(%P|%t) %p for %d\n"), children[i])); pid_t child; @@ -680,7 +680,7 @@ spawn_processes (ACCEPTOR *acceptor, child = ACE_OS::wait (); if (child != -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reaping %d\n"), + ACE_TEXT ("(%P|%t) reaping %d\n"), child)); } while (child != -1); @@ -720,9 +720,9 @@ spawn_threads (ACCEPTOR *acceptor, for (i = 0; i < n_servers; ++i) { - ACE_NEW_RETURN (server_name[i], ASYS_TCHAR[32], -1); + ACE_NEW_RETURN (server_name[i], ACE_TCHAR[32], -1); ACE_OS::sprintf (server_name[i], - ASYS_TEXT ("server%u"), + ACE_TEXT ("server%u"), i); stack_size[i] = 40000; ACE_NEW_RETURN (stack[i], char[stack_size[i]], -1); @@ -731,7 +731,7 @@ spawn_threads (ACCEPTOR *acceptor, ACE_OS::memset (stack[i], 0xEE, stack_size[i]); } - ASYS_TCHAR *client_name = ASYS_TEXT ("Conn client"); + ACE_TCHAR *client_name = ACE_TEXT ("Conn client"); #endif /* VXWORKS */ if (ACE_Thread_Manager::instance ()->spawn_n @@ -755,8 +755,8 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* VXWORKS */ ) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("server thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("server thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) client, @@ -767,8 +767,8 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* VXWORKS */ ) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("client thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("client thread create failed"))); // Wait for the threads to exit. // But, wait for a limited time because sometimes the test hangs on Irix. @@ -778,10 +778,10 @@ spawn_threads (ACCEPTOR *acceptor, { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else - ACE_OS::perror (ASYS_TEXT ("wait")); + ACE_OS::perror (ACE_TEXT ("wait")); status = -1; } @@ -802,12 +802,12 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* ! ACE_LACKS_FORK && ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Conn_Test")); + ACE_START_TEST (ACE_TEXT ("Conn_Test")); int status = 0; - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("c:i:s:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("c:i:s:")); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -831,28 +831,28 @@ main (int argc, ASYS_TCHAR *argv[]) || acceptor.acceptor ().get_local_addr (server_addr) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); ACE_ASSERT (0); } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) if (spawn_processes (&acceptor, &server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%r) %p\n"), - ASYS_TEXT ("spawn_processes")), + ACE_TEXT ("(%P|%r) %p\n"), + ACE_TEXT ("spawn_processes")), 1); #elif defined (ACE_HAS_THREADS) status = spawn_threads (&acceptor, &server_addr); #else /* ACE_LACKS_FORK && ! ACE_HAS_THREADS */ ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_LACKS_FORK && ! ACE_HAS_THREADS */ } diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp index defcdd203f7..6f1e90ebb79 100644 --- a/tests/DLL_Test.cpp +++ b/tests/DLL_Test.cpp @@ -35,20 +35,20 @@ ACE_RCSID(tests, DLL_Test, "$Id$") // symbols dynamically at runtime. #if defined (ACE_WIN32) -# define OBJ_SUFFIX ".exe" -# define OBJ_PREFIX "" +# define OBJ_SUFFIX ACE_TEXT (".exe") +# define OBJ_PREFIX ACE_TEXT ("") #else # define OBJ_SUFFIX ACE_DLL_SUFFIX # define OBJ_PREFIX "./" ACE_DLL_PREFIX #endif /*ACE_WIN32*/ -char const * -cdecl_decoration (char const *func_name) +ACE_TCHAR const * +cdecl_decoration (ACE_TCHAR const *func_name) { #if defined (__BORLANDC__) - static char decorated_func_name[10*1024]; + static ACE_TCHAR decorated_func_name[10*1024]; ACE_OS::sprintf (decorated_func_name, - "_%s", + ACE_TEXT ("_%s"), func_name); return decorated_func_name; #else @@ -75,25 +75,25 @@ get_hello (void) typedef Hello *(*TC) (void); int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("DLL_Test")); + ACE_START_TEST (ACE_TEXT ("DLL_Test")); // Protection against this test being run on platforms not supporting Dlls. #if defined (ACE_WIN32) || defined (ACE_HAS_SVR4_DYNAMIC_LINKING) || \ defined (__hpux) ACE_DLL dll; - int retval = dll.open (ASYS_TEXT (OBJ_PREFIX) - ASYS_TEXT ("DLL_Test") - ASYS_TEXT (OBJ_SUFFIX)); + int retval = dll.open (OBJ_PREFIX + ACE_TEXT ("DLL_Test") + OBJ_SUFFIX); if (retval != 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - dll.error ()), + ACE_TEXT ("%p\n"), + dll.error ()), -1); // Just because the ANSI C++ spec says you can no longer cast a @@ -101,7 +101,7 @@ main (int argc, ASYS_TCHAR *argv[]) // TC f = (TC) dll.symbol ("get_hello"); void *foo; - char const *cdecl_str = cdecl_decoration ("get_hello"); + ACE_TCHAR const *cdecl_str = cdecl_decoration (ACE_TEXT ("get_hello")); foo = dll.symbol (cdecl_str); // Cast the void* to long first. @@ -109,7 +109,7 @@ main (int argc, ASYS_TCHAR *argv[]) TC f = ACE_reinterpret_cast (Hello * (*)(void), tmp); if (f == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), + ACE_TEXT ("%p\n"), dll.error ()), -1); @@ -121,7 +121,7 @@ main (int argc, ASYS_TCHAR *argv[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("Dynamically Linkable Libraries not supported on this platform\n"))); + ACE_TEXT ("Dynamically Linkable Libraries not supported on this platform\n"))); #endif /* ACE_WIN32 || ACE_HAS_SVR4_DYNAMIC_LINKING || __hpux */ ACE_END_TEST; diff --git a/tests/DLL_Test.h b/tests/DLL_Test.h index c644cb04216..d19a488f8d9 100644 --- a/tests/DLL_Test.h +++ b/tests/DLL_Test.h @@ -41,13 +41,13 @@ public: void say_hello (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Hello\n"))); + ACE_TEXT ("Hello\n"))); } void say_next (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("How are you?\n"))); + ACE_TEXT ("How are you?\n"))); } }; diff --git a/tests/DLList_Test.cpp b/tests/DLList_Test.cpp index fd9e6e9c9fb..ea382e30bfd 100644 --- a/tests/DLList_Test.cpp +++ b/tests/DLList_Test.cpp @@ -21,7 +21,7 @@ #include "ace/SString.h" #include "ace/Malloc.h" -typedef ASYS_TCHAR *ACE_STRING; +typedef ACE_TCHAR *ACE_STRING; typedef ACE_DLList<ACE_STRING> STRLIST; typedef ACE_DLList_Iterator<ACE_STRING> STRLIST_ITERATOR; @@ -44,12 +44,12 @@ static ACE_STRING string_table[] = // Note: all these casts are to appease SC 5.0 which is not pleased // with using string literals (i.e. const char *'s) as char // *'s. It's ugly, but necessary. - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("hello")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("guten Tag")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("goodbye")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("auf wiedersehen")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("funny")), - ACE_const_cast (ASYS_TCHAR *, ASYS_TEXT ("lustig")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("hello")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("guten Tag")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("goodbye")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("auf wiedersehen")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("funny")), + ACE_const_cast (ACE_TCHAR *, ACE_TEXT ("lustig")), 0 }; @@ -63,9 +63,9 @@ run_iterate (STRLIST &list) (entry = iter.next ()) != 0; iter.advance (), i++) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("iterating (%d): [%s]\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("iterating (%d): [%s]\n"), i, - (ASYS_TCHAR *) *entry)); + (ACE_TCHAR *) *entry)); } } @@ -83,14 +83,14 @@ run_test (void) if (ACE_EVEN (i) && list.insert_tail ((ACE_STRING *) &string_table[i]) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("insert"), string_table[i]), -1); else if (list.insert_head ((ACE_STRING *) &string_table[i]) == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("insert"), string_table[i]), -1); run_iterate (list); @@ -113,9 +113,9 @@ run_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("DLList_Test")); + ACE_START_TEST (ACE_TEXT ("DLList_Test")); run_test (); diff --git a/tests/Dynamic_Priority_Test.cpp b/tests/Dynamic_Priority_Test.cpp index 2b63ab276b8..5f6ea6e0961 100644 --- a/tests/Dynamic_Priority_Test.cpp +++ b/tests/Dynamic_Priority_Test.cpp @@ -362,7 +362,7 @@ performance_consumer (void * args) timer.stop (); ACE_Time_Value tv; timer.elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%6u, %6u, %f"), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%6u, %6u, %f"), local_count, tv.msec (), (ACE_timer_t) tv.msec () / local_count)); @@ -423,7 +423,7 @@ performance_producer (void *args) timer.stop (); ACE_Time_Value tv; timer.elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%6u, %6u, %f, "), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%6u, %6u, %f, "), local_count, tv.msec (), (ACE_timer_t) tv.msec () / local_count)); @@ -473,35 +473,35 @@ run_performance_test (u_int min_load, { case BEST: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, best static time, best static avg, ") - ASYS_TEXT ("dequeued, best static time, best static avg, ") - ASYS_TEXT ("enqueued, best deadline time, best deadline avg, ") - ASYS_TEXT ("dequeued, best deadline time, best deadline avg, ") - ASYS_TEXT ("enqueued, best laxity time, best laxity avg, ") - ASYS_TEXT ("dequeued, best laxity time, best laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, best static time, best static avg, ") + ACE_TEXT ("dequeued, best static time, best static avg, ") + ACE_TEXT ("enqueued, best deadline time, best deadline avg, ") + ACE_TEXT ("dequeued, best deadline time, best deadline avg, ") + ACE_TEXT ("enqueued, best laxity time, best laxity avg, ") + ACE_TEXT ("dequeued, best laxity time, best laxity avg\n"))); break; case WORST: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, worst static time, worst static avg, ") - ASYS_TEXT ("dequeued, worst static time, worst static avg, ") - ASYS_TEXT ("enqueued, worst deadline time, worst deadline avg, ") - ASYS_TEXT ("dequeued, worst deadline time, worst deadline avg, ") - ASYS_TEXT ("enqueued, worst laxity time, worst laxity avg, ") - ASYS_TEXT ("dequeued, worst laxity time, worst laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, worst static time, worst static avg, ") + ACE_TEXT ("dequeued, worst static time, worst static avg, ") + ACE_TEXT ("enqueued, worst deadline time, worst deadline avg, ") + ACE_TEXT ("dequeued, worst deadline time, worst deadline avg, ") + ACE_TEXT ("enqueued, worst laxity time, worst laxity avg, ") + ACE_TEXT ("dequeued, worst laxity time, worst laxity avg\n"))); break; case RANDOM: ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n\nenqueued, random static time, random static avg, ") - ASYS_TEXT ("dequeued, random static time, random static avg, ") - ASYS_TEXT ("enqueued, random deadline time, random deadline avg, ") - ASYS_TEXT ("dequeued, random deadline time, random deadline avg, ") - ASYS_TEXT ("enqueued, random laxity time, random laxity avg, ") - ASYS_TEXT ("dequeued, random laxity time, random laxity avg\n"))); + ACE_TEXT ("\n\nenqueued, random static time, random static avg, ") + ACE_TEXT ("dequeued, random static time, random static avg, ") + ACE_TEXT ("enqueued, random deadline time, random deadline avg, ") + ACE_TEXT ("dequeued, random deadline time, random deadline avg, ") + ACE_TEXT ("enqueued, random laxity time, random laxity avg, ") + ACE_TEXT ("dequeued, random laxity time, random laxity avg\n"))); break; default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unknown test type %d"), + ACE_TEXT ("unknown test type %d"), test_type), -1); } @@ -610,7 +610,7 @@ run_performance_test (u_int min_load, // This should only happen for a *very* large messages // relative to the system's representation size. ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Insufficient range of random numbers")), + ACE_TEXT ("Insufficient range of random numbers")), -1); shuffle_index = random_int % load; @@ -629,7 +629,7 @@ run_performance_test (u_int min_load, break; default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unknown test type %d"), + ACE_TEXT ("unknown test type %d"), test_type), -1); } @@ -649,7 +649,7 @@ run_performance_test (u_int min_load, // Add a comma delimiter for most recent outputs. ACE_DEBUG ((LM_INFO, - ASYS_TEXT (", "))); + ACE_TEXT (", "))); // Run the performance test producer and consumer on the // deadline queue. @@ -660,7 +660,7 @@ run_performance_test (u_int min_load, // Add a comma delimiter for most recent outputs. ACE_DEBUG ((LM_INFO, - ASYS_TEXT (", "))); + ACE_TEXT (", "))); // Run the performance test producer and consumer on the laxity // queue. @@ -671,7 +671,7 @@ run_performance_test (u_int min_load, // Move to the next line of output. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); delete [] time_offsets; @@ -693,9 +693,9 @@ run_performance_test (u_int min_load, #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Dynamic_Priority_Test")); + ACE_START_TEST (ACE_TEXT ("Dynamic_Priority_Test")); #if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS) // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. @@ -707,15 +707,15 @@ main (int, ASYS_TCHAR *[]) { if (ACE_OS::last_error () == EPERM) ACE_DEBUG ((LM_MAX, - ASYS_TEXT ("user is not superuser, ") - ASYS_TEXT ("so remain in time-sharing class\n"))); + ACE_TEXT ("user is not superuser, ") + ACE_TEXT ("so remain in time-sharing class\n"))); else if (ACE_OS::last_error () == ENOTSUP) ACE_DEBUG ((LM_MAX, - ASYS_TEXT ("process scope scheduling is not available, ") - ASYS_TEXT ("so remain in time-sharing class\n"))); + ACE_TEXT ("process scope scheduling is not available, ") + ACE_TEXT ("so remain in time-sharing class\n"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%n: ACE_OS::sched_params failed\n%a")), + ACE_TEXT ("%n: ACE_OS::sched_params failed\n%a")), -1); } @@ -783,7 +783,7 @@ main (int, ASYS_TCHAR *[]) RANDOM); #else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE is not compiled with ACE_HAS_TIMED_MESSAGE_BLOCKS enabled\n"))); + ACE_TEXT ("ACE is not compiled with ACE_HAS_TIMED_MESSAGE_BLOCKS enabled\n"))); #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */ ACE_END_TEST; diff --git a/tests/Enum_Interfaces_Test.cpp b/tests/Enum_Interfaces_Test.cpp index 071c06c6843..c08692010a4 100644 --- a/tests/Enum_Interfaces_Test.cpp +++ b/tests/Enum_Interfaces_Test.cpp @@ -34,15 +34,15 @@ ACE_RCSID(tests, Enum_Interfaces_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Enum_Interfaces_Test")); + ACE_START_TEST (ACE_TEXT ("Enum_Interfaces_Test")); struct utsname uname; ACE_OS::uname(&uname); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Machine: %s running on %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Machine: %s running on %s\n"), uname.nodename, uname.machine )); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Platform: %s, %s, %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Platform: %s, %s, %s\n"), uname.sysname, uname.release, uname.version )); ACE_INET_Addr *the_addr_array; @@ -52,17 +52,17 @@ main (int, ASYS_TCHAR *[]) if (rc != 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE::get_ip_interfaces failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE::get_ip_interfaces failed"))); else if (how_many == 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("No interfaces presently configured in the kernel\n"))); + ACE_TEXT ("No interfaces presently configured in the kernel\n"))); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("there are %d interfaces\n"), how_many)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("there are %d interfaces\n"), how_many)); for (size_t i = 0; i < how_many; i++) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\t%s\n"), the_addr_array[i].get_host_addr ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"), the_addr_array[i].get_host_addr ())); delete [] the_addr_array; } diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp index da467ad1ba8..82e08b524fe 100644 --- a/tests/Env_Value_Test.cpp +++ b/tests/Env_Value_Test.cpp @@ -26,7 +26,7 @@ do { \ ACE_Env_Value<type> val (varname, (defval)); \ if (val != (expval)) { \ ACE_ERROR ((LM_ERROR, \ - ASYS_TEXT ("val %d does not match expected value of %d\n"), \ + ACE_TEXT ("val %d does not match expected value of %d\n"), \ (int) (type) val, (int) (expval))); \ } \ ACE_ASSERT (val == (expval)); \ @@ -36,13 +36,15 @@ int #if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) || defined (ACE_LACKS_FORK) // ACE_HAS_NONSTATIC_OBJECT_MANAGER only allows main to have two // arguments. And on platforms that lack fork (), we can't use spawn. -main (int argc, ASYS_TCHAR* []) + +main (int argc, ACE_TCHAR* []) { ACE_UNUSED_ARG (argc); - ACE_OS::putenv (ASYS_TEXT ("TEST_VALUE_POSITIVE=10.2")); - ACE_OS::putenv (ASYS_TEXT ("TEST_VALUE_NEGATIVE=-10.2")); + + ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_POSITIVE=10.2")); + ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_NEGATIVE=-10.2")); #else /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */ -main (int argc, LPTSTR [], LPTSTR envp[]) +main (int argc, ACE_TCHAR * [], ACE_TCHAR *envp[]) { if (argc == 1) { @@ -74,28 +76,29 @@ main (int argc, LPTSTR [], LPTSTR envp[]) #endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */ { // In this case we're the child - ACE_START_TEST (ASYS_TEXT ("Env_Value_Test")); - TEST_THIS (int, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 4, 10); + ACE_START_TEST (ACE_TEXT ("Env_Value_Test")); + + TEST_THIS (int, ACE_TEXT ("TEST_VALUE_POSITIVE"), 4, 10); #if !defined (ACE_LACKS_FLOATING_POINT) - TEST_THIS (double, ASYS_TEXT ("TEST_VALUE_POSITIVE"), -1.0, 10.2); + TEST_THIS (double, ACE_TEXT ("TEST_VALUE_POSITIVE"), -1.0, 10.2); #endif /* ! ACE_LACKS_FLOATING_POINT */ - TEST_THIS (long, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (unsigned long, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (short, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (unsigned short, ASYS_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (long, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (unsigned long, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (short, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); + TEST_THIS (unsigned short, ACE_TEXT ("TEST_VALUE_POSITIVE"), 0, 10); - TEST_THIS (int, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 4, -10); + TEST_THIS (int, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 4, -10); #if !defined (ACE_LACKS_FLOATING_POINT) - TEST_THIS (double, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), -1.0, -10.2); + TEST_THIS (double, ACE_TEXT ("TEST_VALUE_NEGATIVE"), -1.0, -10.2); #endif /* ! ACE_LACKS_FLOATING_POINT */ - TEST_THIS (long, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10L); - TEST_THIS (unsigned long, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned long) -10); - TEST_THIS (short, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10); - TEST_THIS (unsigned short, ASYS_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned short) -10); + TEST_THIS (long, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10L); + TEST_THIS (unsigned long, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned long) -10); + TEST_THIS (short, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, -10); + TEST_THIS (unsigned short, ACE_TEXT ("TEST_VALUE_NEGATIVE"), 0, (unsigned short) -10); - const ASYS_TCHAR *defstr = ASYS_TEXT ("Sarah Cleeland is Two!"); - ACE_Env_Value<const ASYS_TCHAR *> sval (ASYS_TEXT ("This_Shouldnt_Be_Set_Hopefully"), + const ACE_TCHAR *defstr = ACE_TEXT ("Sarah Cleeland is Two!"); + ACE_Env_Value<const ACE_TCHAR *> sval (ACE_TEXT ("This_Shouldnt_Be_Set_Hopefully"), defstr); ACE_ASSERT (ACE_OS::strcmp (sval, defstr) == 0); ACE_END_TEST; diff --git a/tests/FlReactor_Test.cpp b/tests/FlReactor_Test.cpp index 9e2ff5f21ca..83804f6b8a5 100644 --- a/tests/FlReactor_Test.cpp +++ b/tests/FlReactor_Test.cpp @@ -31,7 +31,7 @@ ACE_RCSID(tests, FlReactor_Test, "$Id$") int main (int, char*[]) { - ACE_START_TEST (ASYS_TEXT ("FlReactor_Test")); + ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); ACE_ERROR ((LM_INFO, "FL not supported on this platform\n")); @@ -231,7 +231,7 @@ Acceptor::make_svc_handler (Connection_Handler *&sh) int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("FlReactor_Test")); + ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); Fl_Window window (300, 370); diff --git a/tests/Future_Set_Test.cpp b/tests/Future_Set_Test.cpp index 179e6febfa6..6491063e982 100644 --- a/tests/Future_Set_Test.cpp +++ b/tests/Future_Set_Test.cpp @@ -57,7 +57,7 @@ class Prime_Scheduler : public ACE_Task_Base friend class Method_Request_end; public: // = Initialization and termination methods. - Prime_Scheduler (const ASYS_TCHAR *, + Prime_Scheduler (const ACE_TCHAR *, Prime_Scheduler * = 0); // Constructor. @@ -72,7 +72,7 @@ public: // = These methods are part of the Active Object Proxy interface. ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<const ASYS_TCHAR*> name (void); + ACE_Future<const ACE_TCHAR*> name (void); void end (void); protected: @@ -82,11 +82,11 @@ protected: // = These are the Servant methods that do the actual work. u_long work_i (u_long, int); - const ASYS_TCHAR *name_i (void); + const ACE_TCHAR *name_i (void); private: // = These are the <Prime_Scheduler> implementation details. - ASYS_TCHAR *name_; + ACE_TCHAR *name_; ACE_Activation_Queue activation_queue_; Prime_Scheduler *scheduler_; }; @@ -129,13 +129,13 @@ Method_Request_work::Method_Request_work (Prime_Scheduler *new_Prime_Scheduler, future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work created\n"))); + ACE_TEXT ("(%t) Method_Request_work created\n"))); } Method_Request_work::~Method_Request_work (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_work will be deleted.\n"))); } int @@ -154,7 +154,7 @@ class Method_Request_name : public ACE_Method_Request // Reification of the <name> method. public: Method_Request_name (Prime_Scheduler *, - ACE_Future<const ASYS_TCHAR*> &); + ACE_Future<const ACE_TCHAR*> &); virtual ~Method_Request_name (void); virtual int call (void); @@ -162,22 +162,22 @@ public: private: Prime_Scheduler *scheduler_; - ACE_Future<const ASYS_TCHAR*> future_result_; + ACE_Future<const ACE_TCHAR*> future_result_; }; Method_Request_name::Method_Request_name (Prime_Scheduler *new_scheduler, - ACE_Future<const ASYS_TCHAR*> &new_result) + ACE_Future<const ACE_TCHAR*> &new_result) : scheduler_ (new_scheduler), future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name created\n"))); + ACE_TEXT ("(%t) Method_Request_name created\n"))); } Method_Request_name::~Method_Request_name (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_name will be deleted.\n"))); } int @@ -219,16 +219,16 @@ Method_Request_end::call (void) } // Constructor -Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, +Prime_Scheduler::Prime_Scheduler (const ACE_TCHAR *newname, Prime_Scheduler *new_scheduler) : scheduler_ (new_scheduler) { ACE_NEW (this->name_, - ASYS_TCHAR[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, + ACE_TCHAR[ACE_OS::strlen (newname) + 1]); + ACE_OS::strcpy ((ACE_TCHAR *) this->name_, newname); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s created\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s created\n"), this->name_)); } @@ -237,7 +237,7 @@ Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, Prime_Scheduler::~Prime_Scheduler (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), this->name_)); delete [] this->name_; } @@ -249,7 +249,7 @@ Prime_Scheduler::open (void *) { task_count++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s open\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s open\n"), this->name_)); // Become an Active Object. return this->activate (THR_BOUND | THR_DETACHED); @@ -261,7 +261,7 @@ int Prime_Scheduler::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s close\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s close\n"), this->name_)); task_count--; return 0; @@ -279,7 +279,7 @@ Prime_Scheduler::svc (void) auto_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) calling method request\n"))); + ACE_TEXT ("(%t) calling method request\n"))); // Call it. if (mo->call () == -1) break; @@ -308,13 +308,13 @@ Prime_Scheduler::work_i (u_long param, return ACE::is_prime (param, 2, param / 2); } -const ASYS_TCHAR * +const ACE_TCHAR * Prime_Scheduler::name_i (void) { return this->name_; } -ACE_Future<const ASYS_TCHAR *> +ACE_Future<const ACE_TCHAR *> Prime_Scheduler::name (void) { if (this->scheduler_) @@ -322,7 +322,7 @@ Prime_Scheduler::name (void) return this->scheduler_->name (); else { - ACE_Future<const ASYS_TCHAR*> new_future; + ACE_Future<const ACE_TCHAR*> new_future; // @@ What happens if new fails here? this->activation_queue_.enqueue @@ -359,29 +359,29 @@ static int n_loops = 100; typedef ACE_Future_Rep<u_long> *u_long_key; typedef ACE_Future_Holder<u_long> *u_long_value; -typedef ACE_Future_Rep<const ASYS_TCHAR *> *char_star_key; -typedef ACE_Future_Holder<const ASYS_TCHAR *> *char_star_value; +typedef ACE_Future_Rep<const ACE_TCHAR *> *char_star_key; +typedef ACE_Future_Holder<const ACE_TCHAR *> *char_star_value; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future_Holder<const ASYS_TCHAR *>; +template class ACE_Future_Holder<const ACE_TCHAR *>; template class ACE_Future_Holder<u_long>; -template class ACE_Future_Observer<const ASYS_TCHAR *>; +template class ACE_Future_Observer<const ACE_TCHAR *>; template class ACE_Future_Observer<u_long>; -template class ACE_Future<const ASYS_TCHAR *>; +template class ACE_Future<const ACE_TCHAR *>; template class ACE_Future<u_long>; -template class ACE_Future_Rep<const ASYS_TCHAR *>; +template class ACE_Future_Rep<const ACE_TCHAR *>; template class ACE_Future_Rep<u_long>; -template class ACE_Future_Set<const ASYS_TCHAR *>; +template class ACE_Future_Set<const ACE_TCHAR *>; template class ACE_Future_Set<u_long>; template class auto_ptr<ACE_Method_Request>; template class ACE_Auto_Basic_Ptr<ACE_Method_Request>; -template class ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Node<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; template class ACE_Pointer_Hash<u_long_key>; template class ACE_Equal_To<u_long_key>; @@ -401,23 +401,23 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<char_star_key, char_star_value, #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> -#pragma instantiate ACE_Future_Holder<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Holder<const ACE_TCHAR *> #pragma instantiate ACE_Future_Holder<u_long> -#pragma instantiate ACE_Future_Observer<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Observer<const ACE_TCHAR *> #pragma instantiate ACE_Future_Observer<u_long> -#pragma instantiate ACE_Future<const ASYS_TCHAR *> +#pragma instantiate ACE_Future<const ACE_TCHAR *> #pragma instantiate ACE_Future<u_long> -#pragma instantiate ACE_Future_Rep<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Rep<const ACE_TCHAR *> #pragma instantiate ACE_Future_Rep<u_long> -#pragma instantiate ACE_Future_Set<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Set<const ACE_TCHAR *> #pragma instantiate ACE_Future_Set<u_long> #pragma instantiate auto_ptr<ACE_Method_Request> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Request> -#pragma instantiate ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Node<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *> #pragma instantiate ACE_Pointer_Hash<u_long_key> #pragma instantiate ACE_Equal_To<u_long_key> @@ -439,9 +439,9 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<char_star_key, char_star_value, #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Future_Set_Test")); + ACE_START_TEST (ACE_TEXT ("Future_Set_Test")); #if defined (ACE_HAS_THREADS) // @@ Should make these be <auto_ptr>s... @@ -449,21 +449,21 @@ main (int, ASYS_TCHAR *[]) // Create active objects.. ACE_NEW_RETURN (andres, - Prime_Scheduler (ASYS_TEXT ("andres")), + Prime_Scheduler (ACE_TEXT ("andres")), -1); ACE_ASSERT (andres->open () != -1); ACE_NEW_RETURN (peter, - Prime_Scheduler (ASYS_TEXT ("peter")), + Prime_Scheduler (ACE_TEXT ("peter")), -1); ACE_ASSERT (peter->open () != -1); ACE_NEW_RETURN (helmut, - Prime_Scheduler (ASYS_TEXT ("helmut")), + Prime_Scheduler (ACE_TEXT ("helmut")), -1); ACE_ASSERT (helmut->open () != -1); // Matias passes all asynchronous method calls on to Andres... ACE_NEW_RETURN (matias, - Prime_Scheduler (ASYS_TEXT ("matias"), + Prime_Scheduler (ACE_TEXT ("matias"), andres), -1); ACE_ASSERT (matias->open () != -1); @@ -472,16 +472,16 @@ main (int, ASYS_TCHAR *[]) ACE_Future<u_long> fresultb; ACE_Future<u_long> fresultc; ACE_Future<u_long> fresultd; - ACE_Future<const ASYS_TCHAR *> fname; + ACE_Future<const ACE_TCHAR *> fname; ACE_Future_Set<u_long> fseta; ACE_Future_Set<u_long> fsetb; ACE_Future_Set<u_long> fsetc; ACE_Future_Set<u_long> fsetd; - ACE_Future_Set<const ASYS_TCHAR *> fsetname; + ACE_Future_Set<const ACE_TCHAR *> fsetname; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) initializing future sets with non-blocking call\n"))); + ACE_TEXT ("(%t) initializing future sets with non-blocking call\n"))); for (int i = 0; i < n_loops; i++) { @@ -505,26 +505,26 @@ main (int, ASYS_TCHAR *[]) if (!fseta.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set a is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set a is not empty.....\n"))); if (!fsetb.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set b is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set b is not empty.....\n"))); if (!fsetc.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set c is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set c is not empty.....\n"))); if (!fsetd.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set d is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set d is not empty.....\n"))); if (!fsetname.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set name is not empty.....\n"))); + ACE_TEXT ("(%t) wow.. set name is not empty.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) non-blocking calls done... now blocking...\n"))); + ACE_TEXT ("(%t) non-blocking calls done... now blocking...\n"))); // Save the result of fresulta. @@ -539,7 +539,7 @@ main (int, ASYS_TCHAR *[]) fresulta.get (resulta); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) a %u\n"), + ACE_TEXT ("(%t) result(%u) a %u\n"), count, (u_int) resulta)); } @@ -550,7 +550,7 @@ main (int, ASYS_TCHAR *[]) fresultb.get (resultb); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) b %u\n"), + ACE_TEXT ("(%t) result(%u) b %u\n"), count, (u_int) resultb)); } @@ -561,7 +561,7 @@ main (int, ASYS_TCHAR *[]) fresultc.get (resultc); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) c %u\n"), + ACE_TEXT ("(%t) result(%u) c %u\n"), count, (u_int) resultc)); } @@ -572,45 +572,45 @@ main (int, ASYS_TCHAR *[]) fresultd.get (resultd); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) d %u\n"), + ACE_TEXT ("(%t) result(%u) d %u\n"), count, (u_int) resultd)); } - const ASYS_TCHAR *name; + const ACE_TCHAR *name; count = 0; while (fsetname.next_readable (fname)) { fname.get (name); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result(%u) name %s\n"), + ACE_TEXT ("(%t) result(%u) name %s\n"), count, name)); } if (fseta.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set a is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set a is empty.....\n"))); if (fsetb.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set b is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set b is empty.....\n"))); if (fsetc.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set c is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set c is empty.....\n"))); if (fsetd.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set d is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set d is empty.....\n"))); if (fsetname.is_empty ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. set name is empty.....\n"))); + ACE_TEXT ("(%t) wow.. set name is empty.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d\n"), + ACE_TEXT ("(%t) task_count %d\n"), task_count.value () )); // Close things down. @@ -622,7 +622,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (2); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d\n"), + ACE_TEXT ("(%t) task_count %d\n"), task_count.value () )); ACE_OS::sleep (5); @@ -634,7 +634,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index 2c02aa1c8a2..2391ad99f07 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -65,7 +65,7 @@ class Prime_Scheduler : public ACE_Task_Base friend class Method_Request_end; public: // = Initialization and termination methods. - Prime_Scheduler (const ASYS_TCHAR *, + Prime_Scheduler (const ACE_TCHAR *, Prime_Scheduler * = 0); // Constructor. @@ -80,7 +80,7 @@ public: // = These methods are part of the Active Object Proxy interface. ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<const ASYS_TCHAR*> name (void); + ACE_Future<const ACE_TCHAR*> name (void); void end (void); protected: @@ -90,11 +90,11 @@ protected: // = These are the Servant methods that do the actual work. u_long work_i (u_long, int); - const ASYS_TCHAR *name_i (void); + const ACE_TCHAR *name_i (void); private: // = These are the <Prime_Scheduler> implementation details. - ASYS_TCHAR *name_; + ACE_TCHAR *name_; ACE_Activation_Queue activation_queue_; Prime_Scheduler *scheduler_; }; @@ -137,13 +137,13 @@ Method_Request_work::Method_Request_work (Prime_Scheduler *new_Prime_Scheduler, future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work created\n"))); + ACE_TEXT ("(%t) Method_Request_work created\n"))); } Method_Request_work::~Method_Request_work (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_work will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_work will be deleted.\n"))); } int @@ -162,7 +162,7 @@ class Method_Request_name : public ACE_Method_Request // Reification of the <name> method. public: Method_Request_name (Prime_Scheduler *, - ACE_Future<const ASYS_TCHAR*> &); + ACE_Future<const ACE_TCHAR*> &); virtual ~Method_Request_name (void); virtual int call (void); @@ -170,22 +170,22 @@ public: private: Prime_Scheduler *scheduler_; - ACE_Future<const ASYS_TCHAR*> future_result_; + ACE_Future<const ACE_TCHAR*> future_result_; }; Method_Request_name::Method_Request_name (Prime_Scheduler *new_scheduler, - ACE_Future<const ASYS_TCHAR*> &new_result) + ACE_Future<const ACE_TCHAR*> &new_result) : scheduler_ (new_scheduler), future_result_ (new_result) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name created\n"))); + ACE_TEXT ("(%t) Method_Request_name created\n"))); } Method_Request_name::~Method_Request_name (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Method_Request_name will be deleted.\n"))); + ACE_TEXT ("(%t) Method_Request_name will be deleted.\n"))); } int @@ -227,16 +227,16 @@ Method_Request_end::call (void) } // Constructor -Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, +Prime_Scheduler::Prime_Scheduler (const ACE_TCHAR *newname, Prime_Scheduler *new_scheduler) : scheduler_ (new_scheduler) { ACE_NEW (this->name_, - ASYS_TCHAR[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((ASYS_TCHAR *) this->name_, + ACE_TCHAR[ACE_OS::strlen (newname) + 1]); + ACE_OS::strcpy ((ACE_TCHAR *) this->name_, newname); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s created\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s created\n"), this->name_)); } @@ -245,7 +245,7 @@ Prime_Scheduler::Prime_Scheduler (const ASYS_TCHAR *newname, Prime_Scheduler::~Prime_Scheduler (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s will be destroyed\n"), this->name_)); delete [] this->name_; } @@ -257,7 +257,7 @@ Prime_Scheduler::open (void *) { task_count++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s open\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s open\n"), this->name_)); // Become an Active Object. return this->activate (THR_BOUND | THR_DETACHED); @@ -269,7 +269,7 @@ int Prime_Scheduler::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Prime_Scheduler %s close\n"), + ACE_TEXT ("(%t) Prime_Scheduler %s close\n"), this->name_)); task_count--; return 0; @@ -287,7 +287,7 @@ Prime_Scheduler::svc (void) auto_ptr<ACE_Method_Request> mo (this->activation_queue_.dequeue ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) calling method request\n"))); + ACE_TEXT ("(%t) calling method request\n"))); // Call it. if (mo->call () == -1) break; @@ -316,13 +316,13 @@ Prime_Scheduler::work_i (u_long param, return ACE::is_prime (param, 2, param / 2); } -const ASYS_TCHAR * +const ACE_TCHAR * Prime_Scheduler::name_i (void) { return this->name_; } -ACE_Future<const ASYS_TCHAR *> +ACE_Future<const ACE_TCHAR *> Prime_Scheduler::name (void) { if (this->scheduler_) @@ -330,7 +330,7 @@ Prime_Scheduler::name (void) return this->scheduler_->name (); else { - ACE_Future<const ASYS_TCHAR*> new_future; + ACE_Future<const ACE_TCHAR*> new_future; // @@ What happens if new fails here? this->activation_queue_.enqueue @@ -366,40 +366,40 @@ static int n_loops = 100; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future<const ASYS_TCHAR *>; +template class ACE_Future<const ACE_TCHAR *>; template class ACE_Future<int>; template class ACE_Future<u_long>; -template class ACE_Future_Rep<const ASYS_TCHAR *>; +template class ACE_Future_Rep<const ACE_TCHAR *>; template class ACE_Future_Rep<int>; template class ACE_Future_Rep<u_long>; template class auto_ptr<ACE_Method_Request>; template class ACE_Auto_Basic_Ptr<ACE_Method_Request>; -template class ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Node<ACE_Future_Observer<int> *>; template class ACE_Node<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<int> *>; template class ACE_Unbounded_Set<ACE_Future_Observer<u_long> *>; -template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *>; +template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<int> *>; template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> -#pragma instantiate ACE_Future<const ASYS_TCHAR *> +#pragma instantiate ACE_Future<const ACE_TCHAR *> #pragma instantiate ACE_Future<int> #pragma instantiate ACE_Future<u_long> -#pragma instantiate ACE_Future_Rep<const ASYS_TCHAR *> +#pragma instantiate ACE_Future_Rep<const ACE_TCHAR *> #pragma instantiate ACE_Future_Rep<int> #pragma instantiate ACE_Future_Rep<u_long> #pragma instantiate auto_ptr<ACE_Method_Request> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Method_Request> -#pragma instantiate ACE_Node<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Node<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Node<ACE_Future_Observer<int> *> #pragma instantiate ACE_Node<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<int> *> #pragma instantiate ACE_Unbounded_Set<ACE_Future_Observer<u_long> *> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ASYS_TCHAR *> *> +#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<const ACE_TCHAR *> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<int> *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ @@ -407,9 +407,9 @@ template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Future_Test")); + ACE_START_TEST (ACE_TEXT ("Future_Test")); #if defined (ACE_HAS_THREADS) // @@ Should make these be <auto_ptr>s... @@ -417,21 +417,21 @@ main (int, ASYS_TCHAR *[]) // Create active objects.. ACE_NEW_RETURN (andres, - Prime_Scheduler (ASYS_TEXT ("andres")), + Prime_Scheduler (ACE_TEXT ("andres")), -1); ACE_ASSERT (andres->open () != -1); ACE_NEW_RETURN (peter, - Prime_Scheduler (ASYS_TEXT ("peter")), + Prime_Scheduler (ACE_TEXT ("peter")), -1); ACE_ASSERT (peter->open () != -1); ACE_NEW_RETURN (helmut, - Prime_Scheduler (ASYS_TEXT ("helmut")), + Prime_Scheduler (ACE_TEXT ("helmut")), -1); ACE_ASSERT (helmut->open () != -1); // Matias passes all asynchronous method calls on to Andres... ACE_NEW_RETURN (matias, - Prime_Scheduler (ASYS_TEXT ("matias"), + Prime_Scheduler (ACE_TEXT ("matias"), andres), -1); ACE_ASSERT (matias->open () != -1); @@ -444,10 +444,10 @@ main (int, ASYS_TCHAR *[]) ACE_Future<u_long> fresultc; ACE_Future<u_long> fresultd; ACE_Future<u_long> fresulte; - ACE_Future<const ASYS_TCHAR *> fname; + ACE_Future<const ACE_TCHAR *> fname; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) going to do a non-blocking call\n"))); + ACE_TEXT ("(%t) going to do a non-blocking call\n"))); // Spawn off the methods, which run in a separate thread as // active object invocations. @@ -460,10 +460,10 @@ main (int, ASYS_TCHAR *[]) // See if the result is available... if (fresulta.ready ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) wow.. work is ready.....\n"))); + ACE_TEXT ("(%t) wow.. work is ready.....\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) non-blocking call done... now blocking...\n"))); + ACE_TEXT ("(%t) non-blocking call done... now blocking...\n"))); // Save the result of fresulta. @@ -488,28 +488,28 @@ main (int, ASYS_TCHAR *[]) fresulte.get (resulte); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) result a %u\n") - ASYS_TEXT ("(%t) result b %u\n") - ASYS_TEXT ("(%t) result c %u\n") - ASYS_TEXT ("(%t) result d %u\n") - ASYS_TEXT ("(%t) result e %u\n"), + ACE_TEXT ("(%t) result a %u\n") + ACE_TEXT ("(%t) result b %u\n") + ACE_TEXT ("(%t) result c %u\n") + ACE_TEXT ("(%t) result d %u\n") + ACE_TEXT ("(%t) result e %u\n"), (u_int) resulta, (u_int) resultb, (u_int) resultc, (u_int) resulte, (u_int) resultd)); - const ASYS_TCHAR *name; + const ACE_TCHAR *name; fname.get (name); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) name %s\n"), + ACE_TEXT ("(%t) name %s\n"), name)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d future_count %d ") - ASYS_TEXT ("capsule_count %d method_request_count %d\n"), + ACE_TEXT ("(%t) task_count %d future_count %d ") + ACE_TEXT ("capsule_count %d method_request_count %d\n"), task_count.value (), future_count.value (), capsule_count.value (), @@ -525,8 +525,8 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (2); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task_count %d future_count %d ") - ASYS_TEXT ("capsule_count %d method_request_count %d\n"), + ACE_TEXT ("(%t) task_count %d future_count %d ") + ACE_TEXT ("capsule_count %d method_request_count %d\n"), task_count.value (), future_count.value (), capsule_count.value (), @@ -546,17 +546,17 @@ main (int, ASYS_TCHAR *[]) if (f1.get (value, &timeout) == 0 && value == 100) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n"))); + ACE_TEXT ("Ace_Future<T>::Set followed by Ace_Future<T>::Get works.\n"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_Future<T>::Set followed by Ace_Future<T>::Get does ") - ASYS_TEXT ("not work, broken Ace_Future<> implementation.\n"))); + ACE_TEXT ("ACE_Future<T>::Set followed by Ace_Future<T>::Get does ") + ACE_TEXT ("not work, broken Ace_Future<> implementation.\n"))); } { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Checking if Ace_Future<T>::operator= is implemented ") - ASYS_TEXT ("incorrectly this might crash the program.\n"))); + ACE_TEXT ("Checking if Ace_Future<T>::operator= is implemented ") + ACE_TEXT ("incorrectly this might crash the program.\n"))); ACE_Future<int> f1; { // To ensure that a rep object is created. @@ -565,7 +565,7 @@ main (int, ASYS_TCHAR *[]) // Now it is one ACE_Future<int> referencing the rep instance ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("0.\n"))); + ACE_TEXT ("0.\n"))); //Check that self assignment works. f1 = f1; @@ -584,7 +584,7 @@ main (int, ASYS_TCHAR *[]) f1.get (value, &timeout); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("1.\n"))); + ACE_TEXT ("1.\n"))); { // Might delete the same data a couple of times. ACE_Future<int> f2 (f1); @@ -593,7 +593,7 @@ main (int, ASYS_TCHAR *[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("2.\n"))); + ACE_TEXT ("2.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); @@ -601,21 +601,21 @@ main (int, ASYS_TCHAR *[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("3.\n"))); + ACE_TEXT ("3.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); f1.get (value, &timeout); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("4.\n"))); + ACE_TEXT ("4.\n"))); { ACE_Future<int> f2 (f1); f1.set (100); f1.get (value, &timeout); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("5.\n"))); + ACE_TEXT ("5.\n"))); { ACE_Future<int> f2 (90); f2.get (value, &timeout); @@ -623,7 +623,7 @@ main (int, ASYS_TCHAR *[]) } } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("No it did not crash the program.\n"))); + ACE_TEXT ("No it did not crash the program.\n"))); ACE_OS::sleep (5); @@ -634,7 +634,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Handle_Set_Test.cpp b/tests/Handle_Set_Test.cpp index 8964aed6d94..aed0a00546c 100644 --- a/tests/Handle_Set_Test.cpp +++ b/tests/Handle_Set_Test.cpp @@ -107,13 +107,13 @@ test_boundaries (void) ACE_ASSERT (0 == SET_IS_EMPTY_SO_SHOULD_NOT_SEE_THIS); #else /* ! defined (ACE_PSOS_DIAB) */ ACE_ASSERT (0 == - ASYS_TEXT ("this shouldn't get called since ") - ASYS_TEXT ("the set is empty!\n")); + ACE_TEXT ("this shouldn't get called since ") + ACE_TEXT ("the set is empty!\n")); #endif /* defined (ACE_PSOS_DIAB) */ } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_DEFAULT_SELECT_REACTOR_SIZE %d\n"), + ACE_TEXT ("ACE_DEFAULT_SELECT_REACTOR_SIZE %d\n"), ACE_DEFAULT_SELECT_REACTOR_SIZE)); // Insert the vector of <ACE_HANDLE>s into the set. @@ -136,7 +136,7 @@ test_boundaries (void) ) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("obtained handle %d\n"), + ACE_TEXT ("obtained handle %d\n"), handle)); int done = set.remove (handle); ACE_ASSERT (done == 0); @@ -180,32 +180,32 @@ test_performance (size_t max_handles, #if defined (ACE_LACKS_FLOATING_POINT) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %u usecs\n"), + ACE_TEXT ("real time = %u usecs\n"), et.real_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per each of the %d calls = %u usecs\n"), + ACE_TEXT ("time per each of the %d calls = %u usecs\n"), count, et.real_time / count)); #else /* ! ACE_LACKS_FLOATING_POINT */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, ") - ASYS_TEXT ("system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, ") + ACE_TEXT ("system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per each of the %d calls = %f usecs\n"), + ACE_TEXT ("time per each of the %d calls = %f usecs\n"), count, et.real_time / double (count) * 1000000)); #endif /* ! ACE_LACKS_FLOATING_POINT */ } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Handle_Set_Test")); + ACE_START_TEST (ACE_TEXT ("Handle_Set_Test")); int count = argc > 1 ? ACE_OS::atoi (argv[1]) diff --git a/tests/Hash_Map_Bucket_Iterator_Test.cpp b/tests/Hash_Map_Bucket_Iterator_Test.cpp index 75f044d0d34..2f2e13b96e1 100644 --- a/tests/Hash_Map_Bucket_Iterator_Test.cpp +++ b/tests/Hash_Map_Bucket_Iterator_Test.cpp @@ -28,9 +28,9 @@ static ACE_UINT32 iterations = ACE_MAX_ITERATIONS * 10; static ACE_UINT32 table_size = ACE_MAX_ITERATIONS; int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "t:i:"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("t:i:")); int cc; @@ -38,18 +38,18 @@ parse_args (int argc, char *argv[]) switch (cc) { case 't': - table_size = atoi (get_opt.optarg); + table_size = ACE_OS::atoi (get_opt.optarg); break; case 'i': - iterations = atoi (get_opt.optarg); + iterations = ACE_OS::atoi (get_opt.optarg); break; case '?': case 'h': default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s ") - ASYS_TEXT ("[-i (iterations)] ") - ASYS_TEXT ("[-t (table size)] "), + ACE_TEXT ("usage: %s ") + ACE_TEXT ("[-i (iterations)] ") + ACE_TEXT ("[-t (table size)] "), argv[0])); return -1; } @@ -70,7 +70,7 @@ typedef ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, ACE_SYNCH_NULL_MUTEX> HASH_MAP_BUCKET_ITERATOR; int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); @@ -78,7 +78,7 @@ main (int argc, ASYS_TCHAR *argv[]) return result; // Start the test only if options are valid. - ACE_START_TEST (ASYS_TEXT ("Hash_Map_Bucket_Iterator_Test")); + ACE_START_TEST (ACE_TEXT ("Hash_Map_Bucket_Iterator_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_UINT32 i = 0; diff --git a/tests/Hash_Map_Manager_Test.cpp b/tests/Hash_Map_Manager_Test.cpp index 32150c2735c..a346686f92a 100644 --- a/tests/Hash_Map_Manager_Test.cpp +++ b/tests/Hash_Map_Manager_Test.cpp @@ -30,8 +30,8 @@ ACE_RCSID(tests, Hash_Map_Manager_Test, "$Id$") static const size_t STRING_TABLE_ENTRIES = 3; static const size_t MAX_HASH = 6; -typedef ACE_Hash_Map_Entry<LPCTSTR, - LPCTSTR> HASH_STRING_ENTRY; +typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, + const ACE_TCHAR *> HASH_STRING_ENTRY; // @@ The following requires too much internal implementation // information about the <ACE_Hash_Map_Manager>. We need to figure @@ -40,45 +40,45 @@ static const size_t STRING_TABLE_SIZE = sizeof (HASH_STRING_ENTRY) * (STRING_TABLE_ENTRIES + MAX_HASH); #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Entry<LPCTSTR, LPCTSTR>; -template class ACE_Hash_Map_Manager_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Entry<const ACE_TCHAR *, const ACE_TCHAR *>; +template class ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, const ACE_TCHAR *, 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 *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, 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 *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>; template class ACE_Static_Allocator<STRING_TABLE_SIZE>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Entry<LPCTSTR, LPCTSTR> -#pragma instantiate ACE_Hash_Map_Manager_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, LPCTSTR, ACE_Hash<LPCTSTR>, ACE_Equal_To<LPCTSTR>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Entry<const ACE_TCHAR *, const ACE_TCHAR *> +#pragma instantiate ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, const ACE_TCHAR *, 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 *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, const ACE_TCHAR *, 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 *, const ACE_TCHAR *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> #pragma instantiate ACE_Static_Allocator<STRING_TABLE_SIZE> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static ACE_Static_Allocator<STRING_TABLE_SIZE> alloc; -typedef ACE_Hash_Map_Manager_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_MAP; -typedef ACE_Hash_Map_Iterator_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_ITER; -typedef ACE_Hash_Map_Reverse_Iterator_Ex<LPCTSTR, - LPCTSTR, - ACE_Hash<LPCTSTR>, - ACE_Equal_To<LPCTSTR>, +typedef ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, + const ACE_TCHAR *, + ACE_Hash<const ACE_TCHAR *>, + ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> HASH_STRING_REVERSE_ITER; struct String_Table { - LPCTSTR key_; - LPCTSTR value_; + const ACE_TCHAR *key_; + const ACE_TCHAR *value_; }; static String_Table string_table[] = @@ -116,37 +116,37 @@ run_test (void) if (hash.bind (string_table[i].key_, string_table[i].value_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("bind"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), -1); + ACE_TEXT ("%p failed for %s \n"), + ACE_TEXT ("bind"), + string_table[i].key_), -1); - LPCTSTR entry; + const ACE_TCHAR *entry; // Check the <find> operation. for (i = 0; string_table[i].key_ != 0; i++) if (hash.find (string_table[i].key_, entry) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("`%s' found `%s'\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_), + ACE_TEXT ("`%s' found `%s'\n"), + string_table[i].key_, entry)); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("`%s' not found\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), + ACE_TEXT ("`%s' not found\n"), + string_table[i].key_), -1); // Check the <trybind> operation. { - LPCTSTR pc = string_table[1].value_; + const ACE_TCHAR *pc = string_table[1].value_; if (hash.trybind (string_table[0].key_, pc) != 1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("::trybind missed existing entry.")), + ACE_TEXT ("::trybind missed existing entry.")), -1); else if (pc != string_table[0].value_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("::trybind doesn't return existing value.")), + ACE_TEXT ("::trybind doesn't return existing value.")), -1); } @@ -160,10 +160,10 @@ run_test (void) hash_iter.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iterating (%d): [%s, %s]\n"), + ACE_TEXT ("iterating (%d): [%s, %s]\n"), i, - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->ext_id_), - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->int_id_))); + entry->ext_id_, + entry->int_id_)); i++; } } @@ -175,13 +175,13 @@ run_test (void) if (hash.find (string_table[i].key_, entry) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("`%s' found `%s'\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_), - ASYS_MULTIBYTE_STRING (entry))); + ACE_TEXT ("`%s' found `%s'\n"), + string_table[i].key_, + entry)); else if (i != 2) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("`%s' not found\n"), - ASYS_MULTIBYTE_STRING (string_table[i].key_)), + ACE_TEXT ("`%s' not found\n"), + string_table[i].key_), -1); // Let's test the iterator backwards. @@ -194,10 +194,10 @@ run_test (void) hash_iter.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("iterating (%d): [%s, %s]\n"), + ACE_TEXT ("iterating (%d): [%s, %s]\n"), i, - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->ext_id_), - ASYS_MULTIBYTE_STRING ((LPCTSTR) entry->int_id_))); + entry->ext_id_, + entry->int_id_)); i++; } } @@ -207,9 +207,9 @@ run_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Hash_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Hash_Map_Manager_Test")); run_test (); diff --git a/tests/High_Res_Timer_Test.cpp b/tests/High_Res_Timer_Test.cpp index 1dd6f9bd555..feff6ad16dd 100644 --- a/tests/High_Res_Timer_Test.cpp +++ b/tests/High_Res_Timer_Test.cpp @@ -39,8 +39,8 @@ check (const u_int interval, const u_int measured) return 0; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("The measured time of %u differs from ") - ASYS_TEXT ("the interval of %u by %u percent.\n"), + ACE_TEXT ("The measured time of %u differs from ") + ACE_TEXT ("the interval of %u by %u percent.\n"), measured, interval, percentage_difference), @@ -67,20 +67,20 @@ u_int intervals [] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000}; /* usec */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("High_Res_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("High_Res_Timer_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("The ACE_High_Res_Timer scale factor is %u ") - ASYS_TEXT ("1/microsecond\n"), + ACE_TEXT ("The ACE_High_Res_Timer scale factor is %u ") + ACE_TEXT ("1/microsecond\n"), ACE_High_Res_Timer::global_scale_factor ())); u_int errors = 0; u_int iterations = 1; - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("i:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("i:")); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -100,11 +100,11 @@ main (int argc, ASYS_TCHAR *argv[]) const ACE_Time_Value interval (0, intervals[i]); const ACE_Time_Value measured = time_interval (interval); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("interval: %u usec, measured: %u usec%s\n"), + ACE_TEXT ("interval: %u usec, measured: %u usec%s\n"), interval.sec () * 1000000 + interval.usec (), measured.sec () * 1000000 + measured.usec (), intervals[i] <= TIMER_RESOLUTION ? - ASYS_TEXT (" (interval and measured may differ)") : ASYS_TEXT (""))); + ACE_TEXT (" (interval and measured may differ)") : ACE_TEXT (""))); if (intervals[i] > TIMER_RESOLUTION) { diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp index c2e33e47972..1f08bf42c42 100644 --- a/tests/IOStream_Test.cpp +++ b/tests/IOStream_Test.cpp @@ -179,14 +179,14 @@ client (void *arg = 0) if (connector.connect (server, addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("Failed to connect to server thread")), + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("Failed to connect to server thread")), 0); // Send a string to the server which it can interpret as a qchar[] const char *str = "\"This is a test string.\""; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%P|%t) Client Sending: (%s)\n"), - ASYS_WIDE_STRING (str))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%P|%t) Client Sending: (%s)\n"), + ACE_TEXT_CHAR_TO_TCHAR (str))); server << str << endl; // Allow the server to get the string and echo it to the user. (The @@ -199,8 +199,8 @@ client (void *arg = 0) str = "\"THIS IS A TEST STRING.\""; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Sending: (%s)\n"), - ASYS_WIDE_STRING (str))); + ACE_TEXT (" (%P|%t) Client Sending: (%s)\n"), + str)); server << str << endl; // Again, give the server time to display the happenings to the @@ -212,7 +212,7 @@ client (void *arg = 0) // the server. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Receiving\n"))); + ACE_TEXT (" (%P|%t) Client Receiving\n"))); ACE_Time_Value timeout (2); ACE_Time_Value *timeoutp = &timeout; @@ -230,13 +230,13 @@ client (void *arg = 0) if (eof) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Unrecoverable stream error/eof\n"))); + ACE_TEXT (" (%P|%t) Unrecoverable stream error/eof\n"))); break; } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Recoverable stream error/timed out)\n"))); + ACE_TEXT (" (%P|%t) Recoverable stream error/timed out)\n"))); server.clear (0); } } @@ -247,7 +247,7 @@ client (void *arg = 0) server >> d; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Client Received: int %d float %f long %d float %f double %f\n"), + ACE_TEXT (" (%P|%t) Client Received: int %d float %f long %d float %f double %f\n"), i, f1, (int) l, @@ -294,8 +294,8 @@ server (void *arg = 0) if (acceptor->get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr")), 0); #if defined (ACE_HAS_THREADS) @@ -303,14 +303,14 @@ server (void *arg = 0) (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("spawing client thread")), + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("spawing client thread")), 0); #endif /* ACE_HAS_THREADS */ if (acceptor->accept (client_handler) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) Failed to accept new client_handler")), + ACE_TEXT (" (%P|%t) Failed to accept new client_handler")), 0); // Read a qbuf[] from the client. Notice that all of the client's @@ -320,8 +320,8 @@ server (void *arg = 0) client_handler >> qbuf; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: (\"%s\")\n"), - ASYS_WIDE_STRING ((char *) qbuf))); + ACE_TEXT (" (%P|%t) Server Received: (\"%s\")\n"), + ACE_TEXT_CHAR_TO_TCHAR ((char *) qbuf))); // Give the client time to announce the next test to the user. ACE_OS::sleep (2); @@ -353,7 +353,7 @@ server (void *arg = 0) char buf[BUFSIZ]; ACE_OS::memset (buf, 0, sizeof buf); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: ("))); + ACE_TEXT (" (%P|%t) Server Received: ("))); while (ACE_OS::strlen (buf) == 0 || buf[ACE_OS::strlen (buf) - 1] != '"') @@ -361,12 +361,12 @@ server (void *arg = 0) if (! (client_handler >> buf)) break; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s "), - ASYS_WIDE_STRING (buf))); + ACE_TEXT ("%s "), + ACE_TEXT_CHAR_TO_TCHAR (buf))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (")\n"))); + ACE_TEXT (")\n"))); #endif /* ACE_HAS_STRING_CLASS */ // Send some non-textual data to the client. We use a single @@ -376,11 +376,11 @@ server (void *arg = 0) // command or the implicit <<endl. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server sleeping\n"))); + ACE_TEXT (" (%P|%t) Server sleeping\n"))); ACE_OS::sleep (5); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n"))); + ACE_TEXT (" (%P|%t) Server Sending: 1 .12342134 666555444 23.45 -46.5e9 \n"))); client_handler << 1 << " "; client_handler << .12342134 << " "; client_handler << 666555444 << " "; @@ -399,7 +399,7 @@ server (void *arg = 0) client_handler >> i >> f1 >> l >> f2 >> d; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%P|%t) Server Received: int %d float %g long %d float %g double %g\n"), + ACE_TEXT (" (%P|%t) Server Received: int %d float %g long %d float %g double %g\n"), i, f1, (int) l, @@ -424,16 +424,16 @@ spawn (void) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%P|%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT (" (%P|%t) %p\n"), + ACE_TEXT ("open")), -1); #if defined (ACE_HAS_THREADS) else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), &acceptor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning server thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning server thread")), -1); // Wait for the client and server thread to exit. @@ -445,8 +445,8 @@ spawn (void) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("%p\n%a"), + ACE_TEXT ("fork failed"))); ACE_OS::_exit (-1); case 0: // In child { @@ -455,8 +455,8 @@ spawn (void) if (acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("get_local_addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("get_local_addr"))); else client ((void *) &server_addr); ACE_END_LOG; @@ -471,7 +471,7 @@ spawn (void) } #else ACE_ERROR_RETURN ((LM_INFO, - ASYS_TEXT ("threads *and* processes not supported on this platform\n")), + ACE_TEXT ("threads *and* processes not supported on this platform\n")), -1); #endif /* ACE_HAS_THREADS */ @@ -482,16 +482,16 @@ spawn (void) #endif /* !ACE_LACKS_ACE_IOSTREAM */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("IOStream_Test")); + ACE_START_TEST (ACE_TEXT ("IOStream_Test")); #if !defined (ACE_LACKS_ACE_IOSTREAM) - ACE_INIT_LOG (ASYS_TEXT ("IOStream_Test-children")); + ACE_INIT_LOG (ACE_TEXT ("IOStream_Test-children")); spawn (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("ACE_IOSTREAM not supported on this platform\n"))); + ACE_TEXT ("ACE_IOSTREAM not supported on this platform\n"))); #endif /* !ACE_LACKS_ACE_IOSTREAM */ ACE_END_TEST; return 0; diff --git a/tests/Lazy_Map_Manager_Test.cpp b/tests/Lazy_Map_Manager_Test.cpp index 0ce276c47c4..7cb31c3db1d 100644 --- a/tests/Lazy_Map_Manager_Test.cpp +++ b/tests/Lazy_Map_Manager_Test.cpp @@ -42,11 +42,11 @@ display_map (MAP &map) { MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } { @@ -57,16 +57,16 @@ display_map (MAP &map) { MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } // Test for map manager. @@ -186,12 +186,12 @@ display_map (ACTIVE_MAP &map) { ACTIVE_MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } { @@ -202,16 +202,16 @@ display_map (ACTIVE_MAP &map) { ACTIVE_MAP::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%d "), + ACE_TEXT ("%d "), entry.int_id_)); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); } // Test for active map manager. @@ -317,17 +317,17 @@ active_map_test (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Lazy_Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Lazy_Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nMap Manager...\n\n"))); + ACE_TEXT ("\nMap Manager...\n\n"))); map_test (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nActive Map Manager...\n\n"))); + ACE_TEXT ("\nActive Map Manager...\n\n"))); active_map_test (); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp index 82cae74bda8..d98e1b1d06f 100644 --- a/tests/Log_Msg_Test.cpp +++ b/tests/Log_Msg_Test.cpp @@ -31,7 +31,7 @@ static void cleanup (void) { ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("cleanup hook (%P)!\n"))); + ACE_TEXT ("cleanup hook (%P)!\n"))); } static void @@ -87,7 +87,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), log_record.msg_data ())); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -107,7 +107,7 @@ Logger::log (ACE_Log_Record &log_record) { if (use_log_msg) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Logger::log->%s\n"), + ACE_TEXT ("Logger::log->%s\n"), verbose_msg)); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) else @@ -129,20 +129,20 @@ test_callbacks (void) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) first message\n"))); + ACE_TEXT ("(%t) first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) second message\n"))); + ACE_TEXT ("(%t) second message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::MSG_CALLBACK); // This message should not show up anywhere since no callback object // has been specified. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) third message\n"))); + ACE_TEXT ("(%t) third message\n"))); // Create a callback object and make it "verbose". Logger logger; @@ -153,28 +153,28 @@ test_callbacks (void) // This message should show up via the Logger callback. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) forth message\n"))); + ACE_TEXT ("(%t) forth message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); // This message should show up via the Logger callback (somewhat // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) fifth message\n"))); + ACE_TEXT ("(%t) fifth message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE); // This message should show up via the Logger callback (really // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) sixth message\n"))); + ACE_TEXT ("(%t) sixth message\n"))); logger.verbose (0); // This message should show up via the Logger callback (not // verbosely). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) seventh message\n"))); + ACE_TEXT ("(%t) seventh message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -182,7 +182,7 @@ test_callbacks (void) // The one from the Logger callback will not be verbose, but the one // from stderr should be verbose. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) eighth message\n"))); + ACE_TEXT ("(%t) eighth message\n"))); ACE_LOG_MSG->msg_callback (0); } @@ -203,7 +203,7 @@ test_log_msg_features (const char *program) if (ACE_LOG_MSG->op_status () == -1 && ACE_LOG_MSG->errnum () == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("op_status and errnum work!\n"))); + ACE_TEXT ("op_status and errnum work!\n"))); else ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); @@ -221,7 +221,7 @@ test_log_msg_features (const char *program) // Exercise many different combinations of OSTREAM. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter++, 8, "", @@ -232,7 +232,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -243,7 +243,7 @@ test_log_msg_features (const char *program) // The next two messages shouldn't print. ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -251,7 +251,7 @@ test_log_msg_features (const char *program) 10000 * counter++)); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -260,7 +260,7 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%10f, %*s%s = %d\n"), + ACE_TEXT ("%10f, %*s%s = %d\n"), 3.1416 * counter, 8, "", @@ -281,9 +281,9 @@ test_log_msg_features (const char *program) ACE_LOG_MSG->priority_mask (priority_mask); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); ACE_SET_BITS (priority_mask, LM_INFO); @@ -291,18 +291,18 @@ test_log_msg_features (const char *program) ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should print!\n"))); + ACE_TEXT ("This LM_INFO message should print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); ACE_CLR_BITS (priority_mask, LM_INFO); ACE_LOG_MSG->priority_mask (priority_mask, ACE_Log_Msg::PROCESS); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("This LM_INFO message should not print!\n"))); + ACE_TEXT ("This LM_INFO message should not print!\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("This LM_DEBUG message should not print!\n"))); + ACE_TEXT ("This LM_DEBUG message should not print!\n"))); } static int @@ -310,13 +310,13 @@ test_ostream (void) { // This message should show up in the log file. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT( "first message\n"))); + ACE_TEXT( "first message\n"))); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); // This message should not show up anywhere. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("second message\n"))); + ACE_TEXT ("second message\n"))); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); @@ -334,7 +334,7 @@ test_ostream (void) // This message should show up in the ostream. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fourth message\n"))); + ACE_TEXT ("fourth message\n"))); ACE_FILE_Connector connector; ACE_FILE_IO file; @@ -343,20 +343,20 @@ test_ostream (void) if (connector.connect (file, ACE_FILE_Addr (filename)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), filename), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (ACE_OS::unlink (filename) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), filename), 1); ACE_FILE_Info info; if (file.get_info (info) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("get_info failed on %p\n"), + ACE_TEXT ("get_info failed on %p\n"), filename), -1); @@ -373,7 +373,7 @@ test_ostream (void) info.size_); if (size != info.size_) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Read %d bytes, rather than expected %d bytes\n"), + ACE_TEXT ("Read %d bytes, rather than expected %d bytes\n"), size, info.size_), -1); @@ -384,7 +384,7 @@ test_ostream (void) ACE_LOG_MSG->msg_ostream (ace_file_stream::instance ()->output_file ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s"), + ACE_TEXT ("%s"), buffer)); #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ @@ -392,7 +392,7 @@ test_ostream (void) // This message should show up in stderr and the ostream (without // ACE_LACKS_IOSTREAM_TOTALLY). ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("fifth message\n"))); + ACE_TEXT ("fifth message\n"))); return 0; } @@ -402,23 +402,23 @@ test_ostream (void) int main (int, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Log_Msg_Test")); + ACE_START_TEST (ACE_TEXT ("Log_Msg_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running ostream test\n"))); + ACE_TEXT ("**** running ostream test\n"))); // Test the <ACE_Log_Msg> abstraction wrt writing to stderr and to a // file. test_ostream (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running callback test\n"))); + ACE_TEXT ("**** running callback test\n"))); // Test the <ACE_Log_Msg> callback mechanism. test_callbacks (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** running features test\n"))); + ACE_TEXT ("**** running features test\n"))); // Test various features of the <ACE_Log_Msg>. test_log_msg_features (argv[0]); diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp index 5e74fd73c22..6c124d1275d 100644 --- a/tests/MM_Shared_Memory_Test.cpp +++ b/tests/MM_Shared_Memory_Test.cpp @@ -29,7 +29,7 @@ ACE_RCSID(tests, MM_Shared_Memory_Test, "$Id$") const int SHMSZ = 27; -static TCHAR *shm_key; +static ACE_TCHAR *shm_key; #if defined (ACE_LACKS_FORK) typedef ACE_Thread_Semaphore SYNCHRONIZER; @@ -112,7 +112,7 @@ parent (void * = 0) // Perform a "busy wait" until the child sets the character to '*'. while (*shm != '*') ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) spinning in parent!\n"))); + ACE_TEXT ("(%P) spinning in parent!\n"))); result = shm_parent.remove (); ACE_ASSERT (result != -1); @@ -132,12 +132,12 @@ spawn (void) -1); #if !defined (ACE_LACKS_FORK) - switch (ACE_OS::fork (ASYS_TEXT ("child"))) + switch (ACE_OS::fork (ACE_TEXT ("child"))) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("fork failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("fork failed")), 1); /* NOTREACHED */ case 0: @@ -159,39 +159,39 @@ spawn (void) (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("thread create failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("thread create failed")), 1); else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (parent), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("thread create failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("thread create failed")), 1); ACE_Thread_Manager::instance ()->wait (); delete synchronizer; #else ACE_UNUSED_ARG (synchronizer); ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("only one thread may be run in a process on this platform\n")), + ACE_TEXT ("only one thread may be run in a process on this platform\n")), 1); #endif /* ACE_HAS_THREADS */ return 0; } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MM_Shared_Memory_Test")); + ACE_START_TEST (ACE_TEXT ("MM_Shared_Memory_Test")); - TCHAR temp_file[MAXPATHLEN + 1]; + ACE_TCHAR temp_file[MAXPATHLEN + 1]; // Get the temporary directory, // The - 24 is for the filename, mm_shared_mem_testXXXXXX if (ACE::get_temp_dir (temp_file, MAXPATHLEN - 24) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Temporary path too long\n")), -1); // Add the filename to the end ACE_OS::strcat (temp_file, ACE_TEXT ("mm_shared_mem_testXXXXXX")); @@ -203,7 +203,7 @@ main (int, ASYS_TCHAR *[]) || (ACE_OS::unlink (shm_key) == -1 && errno == EPERM)) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("(%P|%t) %p\n"), shm_key), 1); spawn (); diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp index 98dcbbd6c94..566ae8c9bad 100644 --- a/tests/MT_Reactor_Timer_Test.cpp +++ b/tests/MT_Reactor_Timer_Test.cpp @@ -128,7 +128,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv, ACE_GUARD_RETURN (ACE_Thread_Mutex, id_lock, this->lock_, 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): Timer #%d (id #%d) expired\n"), + ACE_TEXT ("%T (%t): Timer #%d (id #%d) expired\n"), time_tag, this->timer_id_[time_tag])); @@ -154,27 +154,27 @@ Dispatch_Count_Handler::Dispatch_Count_Handler (void) // Initialize the pipe. if (this->pipe_.open () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_Pipe::open"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Pipe::open"))); // Register the "read" end of the pipe. else if (r->register_handler (this->pipe_.read_handle (), this, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("register_handler"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("register_handler"))); // Put something in our pipe and smoke it... ;-) else if (ACE::send (this->pipe_.write_handle (), "z", 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("send"))); // Call notify to prime the pump for this, as well. else if (r->notify (this) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("notify"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("notify"))); } int @@ -184,7 +184,7 @@ Dispatch_Count_Handler::handle_close (ACE_HANDLE h, ACE_Reactor *r = ACE_Reactor::instance (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_close\n"))); + ACE_TEXT ("%T (%t): handle_close\n"))); ACE_ASSERT (h == this->pipe_.read_handle () && m == ACE_Event_Handler::READ_MASK); @@ -193,8 +193,8 @@ Dispatch_Count_Handler::handle_close (ACE_HANDLE h, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("remove_handler")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("remove_handler")), -1); return 0; } @@ -209,13 +209,13 @@ Dispatch_Count_Handler::handle_input (ACE_HANDLE h) if (ACE::recv (h, &c, 1) != 1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("recv")), -1); ACE_ASSERT (c == 'z'); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_input\n"))); + ACE_TEXT ("%T (%t): handle_input\n"))); // Trigger the <handle_close> hook. return -1; } @@ -229,7 +229,7 @@ Dispatch_Count_Handler::handle_exception (ACE_HANDLE h) this->notify_seen_ = 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): handle_exception\n"))); + ACE_TEXT ("%T (%t): handle_exception\n"))); return 0; } @@ -246,7 +246,7 @@ Dispatch_Count_Handler::handle_timeout (const ACE_Time_Value &tv, // This case just tests to make sure the Reactor is counting timer // expiration correctly. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%T (%t): expiration %d\n"), + ACE_TEXT ("%T (%t): expiration %d\n"), value)); return 0; } @@ -263,9 +263,9 @@ Dispatch_Count_Handler::verify_results (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MT_Reactor_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("MT_Reactor_Timer_Test")); int status = 0; int test_result = 0; @@ -280,8 +280,8 @@ main (int, ASYS_TCHAR *[]) (const void *) i, ACE_Time_Value (0)) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("schedule_timer")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("schedule_timer")), 1); ACE_Time_Value no_waiting (0); @@ -307,7 +307,7 @@ main (int, ASYS_TCHAR *[]) if (events < ACE_MAX_TIMERS + 2) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("expected %d events, got %d instead\n"), + ACE_TEXT ("expected %d events, got %d instead\n"), ACE_MAX_TIMERS + 2, events)); ACE_ASSERT (events >= ACE_MAX_TIMERS + 2); @@ -317,7 +317,7 @@ main (int, ASYS_TCHAR *[]) if (status != 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Dispatch counting test failed.\n"))); + ACE_TEXT ("Dispatch counting test failed.\n"))); test_result = 1; } @@ -339,7 +339,7 @@ main (int, ASYS_TCHAR *[]) if (status == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p, errno is %d\n"), + ACE_TEXT ("%p, errno is %d\n"), "wait ()", errno)); ACE_ASSERT (status != -1); @@ -351,7 +351,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/MT_SOCK_Test.cpp b/tests/MT_SOCK_Test.cpp index a6dbb1bd34e..492b81aa713 100644 --- a/tests/MT_SOCK_Test.cpp +++ b/tests/MT_SOCK_Test.cpp @@ -50,7 +50,7 @@ client (void *arg) #endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting timed connect\n"))); + ACE_TEXT ("(%P|%t) starting timed connect\n"))); // Initiate timed connection with server. // Attempt a timed connect to the server. @@ -58,57 +58,57 @@ client (void *arg) server_addr, timeout) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed")), 0); if (cli_stream.get_local_addr (client_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("get_local_addr")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("get_local_addr")), 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) connected client at %d\n"), + ACE_TEXT ("(%P|%t) connected client at %d\n"), client_addr.get_port_number ())); if (cli_stream.disable (ACE_NONBLOCK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("disable"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("disable"))); // Send data to server (correctly handles "incomplete writes"). for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send_n (c, 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) closing writer\n"))); + ACE_TEXT ("(%P|%t) closing writer\n"))); // Explicitly close the writer-side of the connection. if (cli_stream.close_writer () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close_writer"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close_writer"))); char buf[1]; // Wait for handshake with server. if (cli_stream.recv_n (buf, 1) != 1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) received handshake from server\n"))); + ACE_TEXT ("(%P|%t) received handshake from server\n"))); // Close the connection completely. if (cli_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); return 0; } @@ -120,8 +120,8 @@ server (void *arg) if (peer_acceptor->enable (ACE_NONBLOCK) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable"))); // Keep these objects out here to prevent excessive constructor // calls... @@ -147,13 +147,13 @@ server (void *arg) if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select")), 0); else if (result == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) select timed out, shutting down\n"))); + ACE_TEXT ("(%P|%t) select timed out, shutting down\n"))); return 0; } @@ -166,15 +166,15 @@ server (void *arg) char *t = ACE_ALPHABET; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); // Enable non-blocking I/O. if (new_stream.enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("enable")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("enable")), 0); handle_set.reset (); handle_set.set_bit (new_stream.get_handle ()); @@ -184,13 +184,13 @@ server (void *arg) for (ssize_t r_bytes; ;) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting in select\n"))); + ACE_TEXT ("(%P|%t) waiting in select\n"))); if (ACE_OS::select (int (new_stream.get_handle ()) + 1, handle_set, 0, 0, 0) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("select")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("select")), 0); while ((r_bytes = new_stream.recv (buf, 1)) > 0) { @@ -202,29 +202,29 @@ server (void *arg) { // Handshake back with client. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); if (new_stream.send_n ("", 1) != 1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); // Close endpoint. if (new_stream.close () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("close"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("close"))); break; } else if (r_bytes == -1) { if (errno == EWOULDBLOCK || errno == EAGAIN) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv_n")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv_n")), 0); } } @@ -233,11 +233,11 @@ server (void *arg) { if (errno == EWOULDBLOCK) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no connections available, going back to accepting\n"))); + ACE_TEXT ("(%P|%t) no connections available, going back to accepting\n"))); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept"))); } } ACE_NOTREACHED (return 0); @@ -256,18 +256,18 @@ spawn (void) if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) for (size_t i = 0; i < ACE_MAX_CLIENTS; i++) { - switch (ACE_OS::fork (ASYS_TEXT ("child"))) + switch (ACE_OS::fork (ACE_TEXT ("child"))) { case -1: ACE_ERROR ((LM_ERROR, @@ -300,8 +300,8 @@ spawn (void) (void *) &peer_acceptor, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("spawn failed"))); if (ACE_Thread_Manager::instance ()->spawn_n (ACE_MAX_CLIENTS, @@ -309,14 +309,14 @@ spawn (void) (void *) &server_addr, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("spawn failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("spawn failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* !ACE_LACKS_FORK */ peer_acceptor.close (); @@ -324,9 +324,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("MT_SOCK_Test")); + ACE_START_TEST (ACE_TEXT ("MT_SOCK_Test")); spawn (); diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp index fe6afc4e335..7e40bfcd22a 100644 --- a/tests/Malloc_Test.cpp +++ b/tests/Malloc_Test.cpp @@ -199,15 +199,15 @@ print (const char *process_name, for (Test_Data *t = data; t != 0; t = t->next_) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("<<<< (%P) %s\ni1_ = %d, i2_ = %d, i3_ = %d, d1_ = %f\n"), + ACE_TEXT ("<<<< (%P) %s\ni1_ = %d, i2_ = %d, i3_ = %d, d1_ = %f\n"), process_name, t->i1_, t->i2_, t->i3_, t->d1_)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("*t->bpl_ = %d, t->long_test_->array_[0] = ") - ASYS_TEXT ("%d\n>>>>\n"), + ACE_TEXT ("*t->bpl_ = %d, t->long_test_->array_[0] = ") + ACE_TEXT ("%d\n>>>>\n"), *t->long_test_->bpl_, t->long_test_->array_[0])); } @@ -261,7 +261,7 @@ child (void) ) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) sleeping for 10 milliseconds!\n"))); + ACE_TEXT ("(%P) sleeping for 10 milliseconds!\n"))); ACE_OS::sleep (timeout); } @@ -272,12 +272,12 @@ child (void) } int -main (int argc, ASYS_TCHAR *[]) +main (int argc, ACE_TCHAR *[]) { if (argc == 1) { - ACE_START_TEST (ASYS_TEXT ("Malloc_Test")); - ACE_INIT_LOG (ASYS_TEXT ("Malloc_Test-child")); + ACE_START_TEST (ACE_TEXT ("Malloc_Test")); + ACE_INIT_LOG (ACE_TEXT ("Malloc_Test-child")); init_test (PARENT_BASE_ADDR); @@ -299,8 +299,8 @@ main (int argc, ASYS_TCHAR *[]) ACE_ASSERT (data != 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) PARENT allocator at = %x, ") - ASYS_TEXT ("data allocated at %x\n"), + ACE_TEXT ("(%P) PARENT allocator at = %x, ") + ACE_TEXT ("data allocated at %x\n"), myalloc, data)); myalloc->dump (); @@ -323,7 +323,7 @@ main (int argc, ASYS_TCHAR *[]) else { // In this case we're the child process. - ACE_APPEND_LOG (ASYS_TEXT ("Malloc_Test-child")); + ACE_APPEND_LOG (ACE_TEXT ("Malloc_Test-child")); void *data = 0; MALLOC *myalloc = myallocator (CHILD_BASE_ADDR); @@ -331,8 +331,8 @@ main (int argc, ASYS_TCHAR *[]) ACE_ASSERT (result != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) CHILD allocator at = %x, ") - ASYS_TEXT ("data allocated at %x\n"), + ACE_TEXT ("(%P) CHILD allocator at = %x, ") + ACE_TEXT ("data allocated at %x\n"), myalloc, data)); myalloc->dump (); @@ -372,12 +372,12 @@ template class ACE_Based_Pointer<Long_Test>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Malloc_Test")); + ACE_START_TEST (ACE_TEXT ("Malloc_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("process creation is not supported on this ") - ASYS_TEXT ("platform\n"))); + ACE_TEXT ("process creation is not supported on this ") + ACE_TEXT ("platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Map_Manager_Test.cpp b/tests/Map_Manager_Test.cpp index c4814771c55..24dbefff2ea 100644 --- a/tests/Map_Manager_Test.cpp +++ b/tests/Map_Manager_Test.cpp @@ -105,7 +105,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -113,7 +113,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -128,7 +128,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -136,7 +136,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -151,7 +151,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -159,7 +159,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -174,7 +174,7 @@ test_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -182,7 +182,7 @@ test_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -232,7 +232,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -240,7 +240,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -255,7 +255,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -263,7 +263,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -278,7 +278,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, (*iter).first (), (*iter).second ())); @@ -286,7 +286,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -301,7 +301,7 @@ test_hash_cache_map_manager (size_t table_size, ++iter) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, (*iter).first (), (*iter).second ())); @@ -309,7 +309,7 @@ test_hash_cache_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -365,7 +365,7 @@ test_active_map_manager (size_t table_size, { ACTIVE_MAP_MANAGER::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d-%d|%d)"), + ACE_TEXT ("(%d|%d-%d|%d)"), i, entry.ext_id_.slot_index (), entry.ext_id_.slot_generation (), @@ -374,7 +374,7 @@ test_active_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -390,7 +390,7 @@ test_active_map_manager (size_t table_size, ACTIVE_MAP_MANAGER::ENTRY &entry = *iter; ACE_UNUSED_ARG (entry); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d-%d|%d)"), + ACE_TEXT ("(%d|%d-%d|%d)"), k, entry.ext_id_.slot_index (), entry.ext_id_.slot_generation (), @@ -399,7 +399,7 @@ test_active_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -447,7 +447,7 @@ test_hash_map_manager (size_t table_size, { HASH_ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -455,7 +455,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -469,7 +469,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -477,7 +477,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -492,7 +492,7 @@ test_hash_map_manager (size_t table_size, { HASH_ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry.ext_id_, entry.int_id_)); @@ -500,7 +500,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -513,14 +513,14 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -534,7 +534,7 @@ test_hash_map_manager (size_t table_size, { HASH_MAP_MANAGER::ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -542,7 +542,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -555,7 +555,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -563,7 +563,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -579,7 +579,7 @@ test_hash_map_manager (size_t table_size, HASH_MAP_MANAGER::ENTRY &entry = *iter; ACE_UNUSED_ARG (entry); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry.ext_id_, entry.int_id_)); @@ -587,7 +587,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -599,7 +599,7 @@ test_hash_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); @@ -607,7 +607,7 @@ test_hash_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -652,7 +652,7 @@ test_map_manager (size_t table_size, { ENTRY &entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry.ext_id_, entry.int_id_)); @@ -660,7 +660,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -672,7 +672,7 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); @@ -680,7 +680,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -695,13 +695,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -714,7 +714,7 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); @@ -722,7 +722,7 @@ test_map_manager (size_t table_size, } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -736,13 +736,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); ++i; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -755,14 +755,14 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), i, entry->ext_id_, entry->int_id_)); ++i; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (i == iterations); } @@ -778,13 +778,13 @@ test_map_manager (size_t table_size, { entry = *iter; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%u "), + ACE_TEXT ("%u "), entry.int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } @@ -796,14 +796,14 @@ test_map_manager (size_t table_size, iterator.advance ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), k, entry->ext_id_, entry->int_id_)); k--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (k == -1); } } @@ -828,7 +828,7 @@ run_test (void (*ptf) (size_t, size_t, int), size_t table_size, size_t iterations, int test_iterators, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { ACE_Profile_Timer timer; timer.start (); @@ -841,39 +841,39 @@ run_test (void (*ptf) (size_t, size_t, int), timer.elapsed_time (et); - ASYS_TCHAR *test_iterators_string = 0; + ACE_TCHAR *test_iterators_string = 0; if (test_iterators) test_iterators_string = - ACE_const_cast (ASYS_TCHAR*, - ASYS_TEXT ( "includes executing iterators")); + ACE_const_cast (ACE_TCHAR*, + ACE_TEXT ( "includes executing iterators")); else test_iterators_string = - ACE_const_cast (ASYS_TCHAR*, - ASYS_TEXT ("doesn't include executing iterators")); + ACE_const_cast (ACE_TCHAR*, + ACE_TEXT ("doesn't include executing iterators")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to test a map of size %d for %d iterations using %s (%s)\n"), + ACE_TEXT ("time to test a map of size %d for %d iterations using %s (%s)\n"), table_size, iterations, test_name, test_iterators_string)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.real_time / ACE_timer_t (iterations)) * 1000000)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Map_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); size_t table_size = ACE_MAX_ITERATIONS / 2; @@ -894,35 +894,35 @@ main (int argc, ASYS_TCHAR *argv[]) table_size, iterations, test_iterators, - ASYS_TEXT ("Map_Manager")); + ACE_TEXT ("Map_Manager")); // Test the <ACE_Hash_Map_Manager>. run_test (&test_hash_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Hash_Map_Manager")); + ACE_TEXT ("Hash_Map_Manager")); // Test the <ACE_Hash_Map_Manager>. run_test (&test_active_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Active_Map_Manager")); + ACE_TEXT ("Active_Map_Manager")); // Test the <ACE_Cache_Map_Manager>. run_test (&test_cache_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Cache_Map_Manager")); + ACE_TEXT ("Cache_Map_Manager")); // Test the <ACE_Hash_Cache_Map_Manager>. run_test (&test_hash_cache_map_manager, table_size, iterations, test_iterators, - ASYS_TEXT ("Hash_Cache_Map_Manager")); + ACE_TEXT ("Hash_Cache_Map_Manager")); ACE_LOG_MSG->set_flags (ACE_Log_Msg::VERBOSE_LITE); ACE_END_TEST; return 0; diff --git a/tests/Map_Test.cpp b/tests/Map_Test.cpp index ac8c5115bab..a946fbe6425 100644 --- a/tests/Map_Test.cpp +++ b/tests/Map_Test.cpp @@ -103,14 +103,14 @@ functionality_test (MAP &map, // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), counter, original_value, entry.second ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (counter == iterations); } @@ -142,14 +142,14 @@ functionality_test (MAP &map, // Debugging info. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%d|%d|%d)"), + ACE_TEXT ("(%d|%d|%d)"), counter, original_value, entry.second ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n"))); + ACE_TEXT ("\n"))); ACE_ASSERT (counter == 0); } @@ -225,7 +225,7 @@ performance_test (void (*ptf) (MAP &, size_t, KEY *), size_t iterations, KEY *keys, size_t table_size, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { ACE_Profile_Timer timer; timer.start (); @@ -239,26 +239,26 @@ performance_test (void (*ptf) (MAP &, size_t, KEY *), timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to run %s of size %d for %d iterations\n"), + ACE_TEXT ("time to run %s of size %d for %d iterations\n"), test_name, table_size, iterations)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.real_time / ACE_timer_t (iterations)) * 1000000)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Map_Test")); + ACE_START_TEST (ACE_TEXT ("Map_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); size_t table_size = ACE_MAX_ITERATIONS / 2; @@ -281,16 +281,16 @@ main (int argc, ASYS_TCHAR *argv[]) if (functionality_tests) { // Functionality test of the maps. - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nMap Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMap Manager functionality test\n"))); functionality_test (map1, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nHash Map Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nHash Map Manager functionality test\n"))); functionality_test (map2, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\nActive Map Manager functionality test\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nActive Map Manager functionality test\n"))); functionality_test (map3, iterations); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); } // Performance test of the maps. @@ -302,21 +302,21 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Map Manager (insert test)")); + ACE_TEXT ("Map Manager (insert test)")); performance_test (&find_test, map1, iterations, keys, table_size, - ASYS_TEXT ("Map Manager (find test)")); + ACE_TEXT ("Map Manager (find test)")); performance_test (&unbind_test, map1, iterations, keys, table_size, - ASYS_TEXT ("Map Manager (unbind test)")); + ACE_TEXT ("Map Manager (unbind test)")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); // Hash Map Manager performance_test (&insert_test, @@ -324,21 +324,21 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (insert test)")); + ACE_TEXT ("Hash Map Manager (insert test)")); performance_test (&find_test, map2, iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (find test)")); + ACE_TEXT ("Hash Map Manager (find test)")); performance_test (&unbind_test, map2, iterations, keys, table_size, - ASYS_TEXT ("Hash Map Manager (unbind test)")); + ACE_TEXT ("Hash Map Manager (unbind test)")); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); // Active Map Manager performance_test (&insert_test, @@ -346,19 +346,19 @@ main (int argc, ASYS_TCHAR *argv[]) iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (insert test)")); + ACE_TEXT ("Active Map Manager (insert test)")); performance_test (&find_test, map3, iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (find test)")); + ACE_TEXT ("Active Map Manager (find test)")); performance_test (&unbind_test, map3, iterations, keys, table_size, - ASYS_TEXT ("Active Map Manager (unbind test)")); + ACE_TEXT ("Active Map Manager (unbind test)")); delete[] keys; diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp index b5a79bcd31e..8c43bd4e3b7 100644 --- a/tests/Mem_Map_Test.cpp +++ b/tests/Mem_Map_Test.cpp @@ -46,7 +46,7 @@ reverse_file (ACE_HANDLE file_handle, if (array[i] == '\n') { ACE_OS::write (file_handle, array + i + 1, count); - ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1); + ACE_OS::write (file_handle, ACE_TEXT ("\n"), 1); count = 0; } else @@ -56,7 +56,7 @@ reverse_file (ACE_HANDLE file_handle, } static int -create_test_file (TCHAR *filename, int line_length, int num_lines) +create_test_file (ACE_TCHAR *filename, int line_length, int num_lines) { char *mybuf = 0; @@ -71,7 +71,7 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) if (file_handle == ACE_INVALID_HANDLE) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); } for (int j = 0; j < num_lines; j++) @@ -89,14 +89,14 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) if (ACE_OS::write (file_handle, mybuf, line_length) != line_length) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed: %p (%d)\n"), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("write to file failed: %p (%d)\n"), errno, errno), -1); } - if (ACE_OS::write (file_handle, ASYS_TEXT ("\n"), 1) != 1) + if (ACE_OS::write (file_handle, ACE_TEXT ("\n"), 1) != 1) { delete [] mybuf; - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("write to file failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("write to file failed\n")), -1); } } @@ -107,20 +107,20 @@ create_test_file (TCHAR *filename, int line_length, int num_lines) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Mem_Map_Test")); + ACE_START_TEST (ACE_TEXT ("Mem_Map_Test")); // = Initialize the temporary variable names - TCHAR test_file[MAXPATHLEN + 1]; - TCHAR temp_file1[MAXPATHLEN + 1]; - TCHAR temp_file2[MAXPATHLEN + 1]; + ACE_TCHAR test_file[MAXPATHLEN + 1]; + ACE_TCHAR temp_file1[MAXPATHLEN + 1]; + ACE_TCHAR temp_file2[MAXPATHLEN + 1]; // Get the temporary directory // - 18 is for the filenames, ace_mem_map_temp_1 is the longest if (ACE::get_temp_dir (test_file, MAXPATHLEN - 18) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Temporary path too long\n")), -1); // Copy the temp directory to the other variables ACE_OS::strcpy (temp_file1, test_file); @@ -134,13 +134,13 @@ main (int, ASYS_TCHAR *[]) // First create a test file to work on if (create_test_file (test_file, LINE_LENGTH, NUM_LINES) != 0) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Create test file failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Create test file failed\n")), -1); ACE_Mem_Map mmap; // First memory map the test file if (mmap.map (test_file) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); // Now create a temporary file for intermediate processing ACE_HANDLE temp_file_handle = ACE_OS::open (temp_file1, @@ -148,7 +148,7 @@ main (int, ASYS_TCHAR *[]) 0666); if (temp_file_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); // Reverse the original file and write the output to the temporary // file. @@ -162,12 +162,12 @@ main (int, ASYS_TCHAR *[]) // Now memory map the temporary file if (temp_mmap.map (temp_file1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); if ((temp_file_handle = ACE_OS::open (temp_file2, O_RDWR | O_TRUNC | O_CREAT, 0666)) == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Open failed\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Open failed\n")), -1); // Now reverse the temporary file and write everything to the second // temporary file. @@ -181,7 +181,7 @@ main (int, ASYS_TCHAR *[]) ACE_Mem_Map temp_mmap2; if (temp_mmap2.map (temp_file2) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%n: %p\n%a"), ASYS_TEXT ("mmap")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%n: %p\n%a"), ACE_TEXT ("mmap")), -1); // Now do a memcmp -- the orig file and the second temporary file // should be identical. diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp index 4092df0c4cb..eb0e93d1f1a 100644 --- a/tests/Message_Block_Test.cpp +++ b/tests/Message_Block_Test.cpp @@ -65,7 +65,7 @@ private: int Worker_Task::close (u_long) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) close of worker\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) close of worker\n"))); return 0; } @@ -87,7 +87,7 @@ Worker_Task::svc (void) // process-wide <ACE_Thread_Manager> when the thread begins. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting svc() method\n"))); + ACE_TEXT ("(%t) starting svc() method\n"))); // Keep looping, reading a message out of the queue, until we get a // message with a length == 0, which signals us to quit. @@ -112,13 +112,13 @@ Worker_Task::svc (void) // message here. else if (length > 0) { - int current_count = ACE_OS::atoi (mb->rd_ptr ()); + int current_count = ACE_OS::atoi (ACE_TEXT_CHAR_TO_TCHAR (mb->rd_ptr ())); int i; ACE_ASSERT (count == current_count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) enqueueing %d duplicates\n"), + ACE_TEXT ("(%t) enqueueing %d duplicates\n"), current_count)); ACE_Message_Block *dup; @@ -143,21 +143,21 @@ Worker_Task::svc (void) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) dequeueing %d duplicates\n"), + ACE_TEXT ("(%t) dequeueing %d duplicates\n"), current_count)); // Dequeue the same <current_count> duplicates. for (i = current_count; i > 0; i--) { ACE_ASSERT (this->msg_queue ()->dequeue_head (dup) != -1); - ACE_ASSERT (count == ACE_OS::atoi (dup->rd_ptr ())); + ACE_ASSERT (count == ACE_OS::atoi (ACE_TEXT_CHAR_TO_TCHAR (dup->rd_ptr ()))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), dup->rd_ptr ()) == 0); ACE_ASSERT (dup->msg_priority () == 1); dup->release (); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, length = %d, prio = %d, text = \"%*s\"\n"), + ACE_TEXT ("(%t) in iteration %d, length = %d, prio = %d, text = \"%*s\"\n"), count, length, mb->msg_priority (), @@ -171,7 +171,7 @@ Worker_Task::svc (void) if (length == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, got NULL message, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, got NULL message, exiting\n"), count, this->msg_queue ()->message_count ())); break; } @@ -187,8 +187,8 @@ Worker_Task::Worker_Task (void) // Make us an Active Object. if (this->activate (THR_NEW_LWP) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("activate failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("activate failed"))); } static int @@ -200,10 +200,10 @@ produce (Worker_Task &worker_task, // Send <n_iteration> messages through the pipeline. for (size_t count = 0; count < n_iterations; count++) { - ASYS_TCHAR buf[BUFSIZ]; - ACE_OS::sprintf (buf, ASYS_TEXT ("%d\n"), count); + ACE_TCHAR buf[BUFSIZ]; + ACE_OS::sprintf (buf, ACE_TEXT ("%d\n"), count); - int n = (ACE_OS::strlen (buf) + 1) * sizeof (ASYS_TCHAR); + int n = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR); // Allocate a new message. ACE_NEW_RETURN (mb, @@ -224,13 +224,13 @@ produce (Worker_Task &worker_task, // Don't block indefinitely if we flow control... (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } // Send a shutdown message to the waiting threads and exit. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) sending shutdown message\n"))); + ACE_TEXT ("\n(%t) sending shutdown message\n"))); ACE_NEW_RETURN (mb, ACE_Message_Block (0, @@ -243,15 +243,15 @@ produce (Worker_Task &worker_task, if (worker_task.put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) end producer\n"))); + ACE_TEXT ("\n(%t) end producer\n"))); return 0; } -typedef ASYS_TCHAR MEMORY_CHUNK[ACE_MALLOC_ALIGN * ACE_ALLOC_SIZE]; +typedef ACE_TCHAR MEMORY_CHUNK[ACE_MALLOC_ALIGN * ACE_ALLOC_SIZE]; ACE_Cached_Allocator<MEMORY_CHUNK, ACE_SYNCH_MUTEX> @@ -259,12 +259,12 @@ ACE_Cached_Allocator<MEMORY_CHUNK, struct { ACE_Allocator *strategy_; - const ASYS_TCHAR *name_; + const ACE_TCHAR *name_; ACE_Profile_Timer::ACE_Elapsed_Time et_; } alloc_struct[ACE_ALLOC_STRATEGY_NO] = { - { NULL, ASYS_TEXT ("Default"), {0,0,0} }, - { &mem_allocator, ASYS_TEXT ("Cached Memory"), {0,0,0} } + { NULL, ACE_TEXT ("Default"), {0,0,0} }, + { &mem_allocator, ACE_TEXT ("Cached Memory"), {0,0,0} } }; #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ @@ -288,13 +288,13 @@ template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Block_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Block_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) threads = %d\n"), n_threads)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) threads = %d\n"), n_threads)); ACE_Profile_Timer ptime; @@ -303,7 +303,7 @@ main (int, ASYS_TCHAR *[]) for (i = 0; i < ACE_ALLOC_STRATEGY_NO; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Start Message_Block_Test using %s allocation strategy\n"), + ACE_TEXT ("(%t) Start Message_Block_Test using %s allocation strategy\n"), alloc_struct[i].name_)); // Create the worker tasks. @@ -320,27 +320,27 @@ main (int, ASYS_TCHAR *[]) // Wait for all the threads to reach their exit point. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); ACE_Thread_Manager::instance ()->wait (); ptime.stop (); ptime.elapsed_time (alloc_struct[i].et_); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) destroying worker tasks\n"))); + ACE_TEXT ("(%t) destroying worker tasks\n"))); } for (i = 0; i < ACE_ALLOC_STRATEGY_NO; i++) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Elapsed time using %s allocation strategy: %f sec\n"), + ACE_TEXT ("Elapsed time using %s allocation strategy: %f sec\n"), alloc_struct[i].name_, alloc_struct[i].et_.real_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Exiting...\n"))); + ACE_TEXT ("(%t) Exiting...\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp index ac28b577e04..736ef4a65cf 100644 --- a/tests/Message_Queue_Notifications_Test.cpp +++ b/tests/Message_Queue_Notifications_Test.cpp @@ -111,7 +111,7 @@ int Message_Handler::handle_input (ACE_HANDLE) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_input\n"))); + ACE_TEXT ("Message_Handler::handle_input\n"))); // Next time handle_output will be called. this->notification_strategy_.mask (ACE_Event_Handler::WRITE_MASK); @@ -123,7 +123,7 @@ int Message_Handler::handle_output (ACE_HANDLE fd) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_output\n"))); + ACE_TEXT ("Message_Handler::handle_output\n"))); ACE_UNUSED_ARG (fd); // Next time handle_exception will be called. @@ -136,7 +136,7 @@ int Message_Handler::handle_exception (ACE_HANDLE fd) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Message_Handler::handle_exception\n"))); + ACE_TEXT ("Message_Handler::handle_exception\n"))); ACE_UNUSED_ARG (fd); // Next time handle_input will be called. @@ -153,13 +153,13 @@ Message_Handler::process_message (void) if (this->getq (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("message received = %s\n"), + ACE_TEXT ("message received = %s\n"), mb->rd_ptr ())); mb->release (); } @@ -175,10 +175,10 @@ Message_Handler::make_message (void) { ACE_Message_Block *mb; ACE_NEW (mb, - ACE_Message_Block ((char *) ASYS_TEXT ("hello"))); + ACE_Message_Block ((char *) ACE_TEXT ("hello"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("sending message\n"))); + ACE_TEXT ("sending message\n"))); this->putq (mb); } } @@ -213,7 +213,7 @@ Watermark_Test::producer (void) i--; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Producer: High water mark hit ---- \n"))); + ACE_TEXT ("(%P|%t) Producer: High water mark hit ---- \n"))); ACE_MT (this->mq_full_.wait ()); @@ -259,14 +259,14 @@ Watermark_Test::get_message (void) if (this->getq (mb) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Consumer: message size = %3d, ") - ASYS_TEXT ("message count = %3d\n"), + ACE_TEXT ("(%P|%t) Consumer: message size = %3d, ") + ACE_TEXT ("message count = %3d\n"), this->msg_queue ()-> message_bytes (), this->msg_queue ()-> message_count ())); mb->release (); @@ -292,8 +292,8 @@ void Watermark_Test::print_producer_debug_message (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Producer: message size = %3d, ") - ASYS_TEXT ("message count = %3d\n"), + ACE_TEXT ("(%P|%t) Producer: message size = %3d, ") + ACE_TEXT ("message count = %3d\n"), this->msg_queue ()-> message_bytes (), this->msg_queue ()-> message_count ())); } @@ -319,12 +319,12 @@ Watermark_Test::svc (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Queue_Notifications_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Queue_Notifications_Test")); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting message queue reactive notification test...\n"))); + ACE_TEXT ("Starting message queue reactive notification test...\n"))); ACE_Reactor reactor; Message_Handler mh (reactor); @@ -334,11 +334,11 @@ main (int, ASYS_TCHAR *[]) #if defined (ACE_HAS_THREADS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting message queue watermark test...\n"))); + ACE_TEXT ("Starting message queue watermark test...\n"))); Watermark_Test watermark_test; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("High water mark is %d\n") - ASYS_TEXT ("Low water mark is %d\n"), + ACE_TEXT ("High water mark is %d\n") + ACE_TEXT ("Low water mark is %d\n"), default_high_water_mark, default_low_water_mark)); @@ -348,7 +348,7 @@ main (int, ASYS_TCHAR *[]) ACE_Thread_Manager::instance ()->wait (); #else ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("Message queue watermark test not performed because threads are not supported\n"))); + ACE_TEXT ("Message queue watermark test not performed because threads are not supported\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp index ec93d1e38d1..5fdcd6798bd 100644 --- a/tests/Message_Queue_Test.cpp +++ b/tests/Message_Queue_Test.cpp @@ -30,7 +30,7 @@ ACE_RCSID(tests, Message_Queue_Test, "$Id$") -const ASYS_TCHAR usage[] = ASYS_TEXT ("usage: Message_Queue_Test <number of messages>\n"); +const ACE_TCHAR usage[] = ACE_TEXT ("usage: Message_Queue_Test <number of messages>\n"); typedef ACE_Message_Queue<ACE_NULL_SYNCH> QUEUE; typedef ACE_Message_Queue_Iterator<ACE_NULL_SYNCH> ITERATOR; @@ -77,7 +77,7 @@ static int iterator_test (void) { const int ITERATIONS = 5; - ASYS_TCHAR buffer[ITERATIONS][BUFSIZ]; + ACE_TCHAR buffer[ITERATIONS][BUFSIZ]; // Use queue size from of 32 Kb, instead of the default of 16 Kb // (defined by ACE_Message_Queue_Base::DEFAULT_HWM), so that the // test runs on machines with 8Kb pagesizes. @@ -93,7 +93,7 @@ iterator_test (void) for (i = 0; i < ITERATIONS; i++) { ACE_OS::sprintf (buffer[i], - ASYS_TEXT ("%d"), + ACE_TEXT ("%d"), i + 1); ACE_Message_Block *entry; @@ -104,18 +104,18 @@ iterator_test (void) if (queue.is_full ()) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("QUEUE:: the message queue is full on iteration %u!\n"), + ACE_TEXT ("QUEUE:: the message queue is full on iteration %u!\n"), i + 1), -1); if (queue.enqueue (entry) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("QUEUE::enqueue\n")), + ACE_TEXT ("QUEUE::enqueue\n")), -1); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nForward Iterations\n"))); + ACE_TEXT ("\nForward Iterations\n"))); { ITERATOR iterator (queue); @@ -123,12 +123,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nReverse Iterations\n"))); + ACE_TEXT ("\nReverse Iterations\n"))); { REVERSE_ITERATOR iterator (queue); @@ -136,12 +136,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nForward Iterations\n"))); + ACE_TEXT ("\nForward Iterations\n"))); { QUEUE::ITERATOR iterator (queue); @@ -149,12 +149,12 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nReverse Iterations\n"))); + ACE_TEXT ("\nReverse Iterations\n"))); { QUEUE::REVERSE_ITERATOR iterator (queue); @@ -162,7 +162,7 @@ iterator_test (void) iterator.next (entry) != 0; iterator.advance ()) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("%s\n"), + ACE_TEXT ("%s\n"), entry->base ())); } @@ -177,8 +177,8 @@ single_thread_performance_test (int queue_type = 0) { const char test_message[] = "ACE_Message_Queue Test Message"; - const ASYS_TCHAR *message = - ASYS_TEXT ("ACE_Message_Queue<ACE_NULL_SYNCH>, single thread"); + const ACE_TCHAR *message = + ACE_TEXT ("ACE_Message_Queue<ACE_NULL_SYNCH>, single thread"); int i; // Create a message queue. @@ -203,7 +203,7 @@ single_thread_performance_test (int queue_type = 0) ACE_NEW_RETURN (msgq, ACE_Message_Queue_NT, -1); - message = ASYS_TEXT ("ACE_Message_Queue_NT, single thread test"); + message = ACE_TEXT ("ACE_Message_Queue_NT, single thread test"); } #endif /* VXWORKS */ @@ -251,14 +251,14 @@ single_thread_performance_test (int queue_type = 0) { if (msgq->enqueue_tail (send_block[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("enqueue")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("enqueue")), -1); if (msgq->dequeue_head (receive_block_p[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), -1); } @@ -267,7 +267,7 @@ single_thread_performance_test (int queue_type = 0) ACE_Time_Value tv; timer->elapsed_time (tv); ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), + ACE_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), message, max_messages, tv.msec (), @@ -322,8 +322,8 @@ receiver (void *arg) for (i = 0; i < max_messages; ++i) if (queue_wrapper->q_->dequeue_head (receive_block_p[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("dequeue_head")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("dequeue_head")), 0); timer->stop (); @@ -349,8 +349,8 @@ sender (void *arg) if (queue_wrapper->q_-> enqueue_tail (queue_wrapper->send_block_[i]) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("enqueue")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("enqueue")), 0); return 0; } @@ -360,8 +360,8 @@ int performance_test (int queue_type = 0) { Queue_Wrapper queue_wrapper; - const ASYS_TCHAR *message = - ASYS_TEXT ("ACE_Message_Queue<ACE_SYNCH>"); + const ACE_TCHAR *message = + ACE_TEXT ("ACE_Message_Queue<ACE_SYNCH>"); int i; // Create the messages. Allocate off the heap in case messages is @@ -400,7 +400,7 @@ performance_test (int queue_type = 0) ACE_NEW_RETURN (queue_wrapper.q_, ACE_Message_Queue_NT, -1); - message = ASYS_TEXT ("ACE_Message_Queue_NT"); + message = ACE_TEXT ("ACE_Message_Queue_NT"); } #endif /* VXWORKS */ @@ -408,22 +408,22 @@ performance_test (int queue_type = 0) &queue_wrapper, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning sender thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning sender thread")), -1); if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) receiver, &queue_wrapper, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawning receiver thread")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawning receiver thread")), -1); ACE_Thread_Manager::instance ()->wait (); ACE_Time_Value tv; timer->elapsed_time (tv); - ACE_DEBUG ((LM_INFO, ASYS_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%s: %u messages took %u msec (%f msec/message)\n"), message, max_messages, tv.msec (), @@ -442,16 +442,16 @@ performance_test (int queue_type = 0) #endif /* ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Message_Queue_Test")); + ACE_START_TEST (ACE_TEXT ("Message_Queue_Test")); int status = 0; if (argc == 2) - if (! ACE_OS::strcmp (argv[1], ASYS_TEXT ("-?"))) + if (! ACE_OS::strcmp (argv[1], ACE_TEXT ("-?"))) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%s/n"), + ACE_TEXT ("%s/n"), usage)); else max_messages = ACE_OS::atoi (argv[1]); @@ -459,23 +459,23 @@ main (int argc, ASYS_TCHAR *argv[]) // Be sure that the a timed out get sets the error code properly. ACE_Message_Queue<ACE_SYNCH> q1; if (!q1.is_empty ()) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("New queue is not empty!\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("New queue is not empty!\n"))); status = 1; } else { ACE_Message_Block *b; ACE_Time_Value tv (ACE_OS::gettimeofday()); // Now if (q1.dequeue_head (b, &tv) != -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Dequeued from empty queue!\n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Dequeued from empty queue!\n"))); status = 1; } else if (errno != EWOULDBLOCK) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("Dequeue timeout should be EWOULDBLOCK, got"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("Dequeue timeout should be EWOULDBLOCK, got"))); status = 1; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Timed dequeue test: OK\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Timed dequeue test: OK\n"))); status = 0; // All is well } } @@ -513,8 +513,8 @@ main (int argc, ASYS_TCHAR *argv[]) if (status != 0) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("test failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("test failed"))); delete timer; timer = 0; diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp index 60be9098721..8b0a9a752ba 100644 --- a/tests/Naming_Test.cpp +++ b/tests/Naming_Test.cpp @@ -25,6 +25,8 @@ ACE_RCSID(tests, Naming_Test, "$Id$") +#if defined (ACE_HAS_WCHAR) + static char name[BUFSIZ]; static char value[BUFSIZ]; static char type[BUFSIZ]; @@ -37,11 +39,11 @@ print_time (ACE_Profile_Timer &timer, timer.stop (); timer.elapsed_time (et); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n ***** %s ***** \n"), test)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n ***** %s ***** \n"), test)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time per call = %f usecs\n\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time per call = %f usecs\n\n"), (et.real_time / double (ACE_NS_MAX_ENTRIES)) * 1000000)); } @@ -154,10 +156,10 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) { if (type_out) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Name: %s\tValue: %s\tType: %s\n"), + ACE_TEXT ("Name: %s\tValue: %s\tType: %s\n"), name, l_value, type_out)); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Name: %s\tValue: %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name: %s\tValue: %s\n"), name, l_value)); } @@ -172,12 +174,14 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) } } +#endif /* ACE_HAS_WCHAR */ + int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - TCHAR temp_file [BUFSIZ]; - ACE_START_TEST (ASYS_TEXT ("Naming_Test")); - + ACE_START_TEST (ACE_TEXT ("Naming_Test")); +#if defined (ACE_HAS_WCHAR) + ACE_TCHAR temp_file [BUFSIZ]; ACE_Naming_Context *ns_context; ACE_NEW_RETURN (ns_context, ACE_Naming_Context, -1); @@ -206,9 +210,9 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_ASSERT (ns_context->open (ACE_Naming_Context::PROC_LOCAL, 1) != -1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("time to test %d iterations using %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("time to test %d iterations using %s\n"), ACE_NS_MAX_ENTRIES, name_options->use_registry () ? - ASYS_TEXT ("Registry") : ASYS_TEXT ("ACE"))); + ACE_TEXT ("Registry") : ACE_TEXT ("ACE"))); ACE_Profile_Timer timer; @@ -253,6 +257,9 @@ main (int argc, ASYS_TCHAR *argv[]) // since we don't care if the file doesn't exist. ACE_OS::unlink (temp_file); +#else /* ACE_HAS_TCHAR */ + ACE_ERROR ((LM_INFO, ACE_TEXT ("Naming_Test requires wchar_t support to run.\n"))); +#endif /* ACE_HAS_TCHAR */ ACE_END_TEST; return 0; } diff --git a/tests/New_Fail_Test.cpp b/tests/New_Fail_Test.cpp index 8138b0bac13..283be9f9817 100644 --- a/tests/New_Fail_Test.cpp +++ b/tests/New_Fail_Test.cpp @@ -61,9 +61,9 @@ try_ace_new_return (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("New_Fail_Test")); + ACE_START_TEST (ACE_TEXT ("New_Fail_Test")); int status = 0; // Some platforms are known to throw an exception on a failed 'new', @@ -74,8 +74,8 @@ main (int, ASYS_TCHAR *[]) // complete. #if (defined (__SUNPRO_CC) || defined (__GNUG__)) && \ !defined (ACE_HAS_EXCEPTIONS) - ACE_DEBUG ((LM_NOTICE, ASYS_TEXT ("Out-of-memory will throw an unhandled exception\n"))); - ACE_DEBUG ((LM_NOTICE, ASYS_TEXT ("Rebuild with exceptions=1 to prevent this, but it may impair performance.\n"))); + ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Out-of-memory will throw an unhandled exception\n"))); + ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Rebuild with exceptions=1 to prevent this, but it may impair performance.\n"))); // Use the static function addresses, to prevent warnings about the // functions not being used. @@ -102,7 +102,7 @@ main (int, ASYS_TCHAR *[]) if (i == MAX_ALLOCS_IN_TEST) { ACE_ERROR((LM_WARNING, - ASYS_TEXT ("Test didn't exhaust all available memory\n"))); + ACE_TEXT ("Test didn't exhaust all available memory\n"))); // Back up to valid pointer for deleting. --i; } @@ -111,7 +111,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (blocks[i] == 0); ACE_ASSERT (errno == ENOMEM); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_NEW failed properly at block %d\n"), + ACE_TEXT ("ACE_NEW failed properly at block %d\n"), i)); } @@ -130,7 +130,7 @@ main (int, ASYS_TCHAR *[]) if (i == MAX_ALLOCS_IN_TEST) { ACE_ERROR ((LM_WARNING, - ASYS_TEXT ("Test didn't exhaust all available memory\n"))); + ACE_TEXT ("Test didn't exhaust all available memory\n"))); // Back up to valid pointer. --i; } @@ -139,7 +139,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (blocks[i] == 0); ACE_ASSERT (errno == ENOMEM); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("ACE_NEW_RETURN failed properly at block %d\n"), + ACE_TEXT ("ACE_NEW_RETURN failed properly at block %d\n"), i)); } while (i >= 0) @@ -151,10 +151,10 @@ main (int, ASYS_TCHAR *[]) catch (...) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Caught exception during test; ") - ASYS_TEXT ("ACE_bad_alloc not defined correctly, or\n"))); + ACE_TEXT ("Caught exception during test; ") + ACE_TEXT ("ACE_bad_alloc not defined correctly, or\n"))); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("ACE_NEW_THROWS_EXCEPTIONS is not #defined (and should be).\n"))); + ACE_TEXT ("ACE_NEW_THROWS_EXCEPTIONS is not #defined (and should be).\n"))); // Mark test failure status = 1; } diff --git a/tests/Notify_Performance_Test.cpp b/tests/Notify_Performance_Test.cpp index cb5462e8638..e7b69065eec 100644 --- a/tests/Notify_Performance_Test.cpp +++ b/tests/Notify_Performance_Test.cpp @@ -113,47 +113,47 @@ create_reactor (void) static void print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) { - const ASYS_TCHAR *reactor_type = 0; + const ACE_TCHAR *reactor_type = 0; if (opt_wfmo_reactor) - reactor_type = ASYS_TEXT ("WFMO_Reactor"); + reactor_type = ACE_TEXT ("WFMO_Reactor"); else if (opt_select_reactor) - reactor_type = ASYS_TEXT ("Select_Reactor"); + reactor_type = ACE_TEXT ("Select_Reactor"); else - reactor_type = ASYS_TEXT ("Platform's default Reactor"); + reactor_type = ACE_TEXT ("Platform's default Reactor"); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\nNotify_Performance Test statistics:\n\n"))); + ACE_TEXT ("\nNotify_Performance Test statistics:\n\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tReactor Type: %s\n"), + ACE_TEXT ("\tReactor Type: %s\n"), reactor_type)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tWorker threads (calling notify()): %d\n"), + ACE_TEXT ("\tWorker threads (calling notify()): %d\n"), opt_nthreads)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tIteration per thread: %d\n"), + ACE_TEXT ("\tIteration per thread: %d\n"), opt_nloops)); if (opt_pass_notify_data) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tData was passed in the notify() call\n"))); + ACE_TEXT ("\tData was passed in the notify() call\n"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tNo data was passed in the notify() call\n"))); + ACE_TEXT ("\tNo data was passed in the notify() call\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tTiming results notify() call:\n"))); + ACE_TEXT ("\n\tTiming results notify() call:\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), et.real_time, et.user_time, et.system_time)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("swdc:l:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("swdc:l:")); for (int c; (c = getopt ()) != -1; ) switch (c) @@ -199,7 +199,7 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_THR_FUNC (client), (void *) &handler, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); // Timer business ACE_Profile_Timer timer; @@ -217,7 +217,7 @@ main (int argc, ASYS_TCHAR *argv[]) print_results (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting for the worker threads...\n"))); + ACE_TEXT ("(%P|%t) waiting for the worker threads...\n"))); // Wait for all worker to get done. ACE_Thread_Manager::instance ()->wait (); @@ -242,12 +242,12 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, long>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Notify_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Object_Manager_Test.cpp b/tests/Object_Manager_Test.cpp index c10f556ee3d..1eb83b7f1b1 100644 --- a/tests/Object_Manager_Test.cpp +++ b/tests/Object_Manager_Test.cpp @@ -42,17 +42,17 @@ hook2 (void * /* object */, void *param) // invocation in main () will prevent this from being output to the // log stream. ACE_DEBUG ((LM_DEBUG, - "hook2: %d\n", + ACE_TEXT ("hook2: %d\n"), *paramp)); delete paramp; } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { ACE::init (); - ACE_START_TEST (ASYS_TEXT ("Object_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Object_Manager_Test")); u_int errors = 0; @@ -67,7 +67,7 @@ main (int, ASYS_TCHAR *[]) ACE_Object_Manager::instance ()->shutting_down (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("starting_up: %d, shutting_down: %d\n"), + ACE_TEXT ("starting_up: %d, shutting_down: %d\n"), starting_up, shutting_down)); @@ -75,17 +75,17 @@ main (int, ASYS_TCHAR *[]) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("starting_up and shutting_down are supposed to ") - ASYS_TEXT (" be 0!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("starting_up and shutting_down are supposed to ") + ACE_TEXT (" be 0!!!!"))); } if (ACE_OS::atexit (hook1) != 0) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_OS::atexit () returned non-zero!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_OS::atexit () returned non-zero!!!!"))); } for (u_int i = 0; i < 10; ++i) @@ -105,9 +105,9 @@ main (int, ASYS_TCHAR *[]) { ++errors; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_Object_Manager::at_exit () ") - ASYS_TEXT ("returned non-zero!!!!"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Object_Manager::at_exit () ") + ACE_TEXT ("returned non-zero!!!!"))); } } diff --git a/tests/OrdMultiSet_Test.cpp b/tests/OrdMultiSet_Test.cpp index a93c4e3e121..b34a785e0cf 100644 --- a/tests/OrdMultiSet_Test.cpp +++ b/tests/OrdMultiSet_Test.cpp @@ -28,12 +28,12 @@ ACE_RCSID(tests, OrdMultiSet_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { int ret = 0; int *ptr = 0; - ACE_START_TEST (ASYS_TEXT ("OrdMultiSet_Test")); + ACE_START_TEST (ACE_TEXT ("OrdMultiSet_Test")); // make an empty set of int and an iterator ACE_Ordered_MultiSet<int> set; diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index f99c547bc93..da43003fc01 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -78,14 +78,14 @@ open (ACE_Pipe &pipe, #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Pipe_Test")); - ACE_ERROR ((LM_INFO, ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_START_TEST (ACE_TEXT ("Pipe_Test")); + ACE_ERROR ((LM_INFO, ACE_TEXT ("fork is not supported on this platform\n"))); ACE_END_TEST; #else /* ! ACE_LACKS_FORK */ parse_args (argc, argv); diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp index 14ef4dee0ac..7f4b6089dbe 100644 --- a/tests/Priority_Buffer_Test.cpp +++ b/tests/Priority_Buffer_Test.cpp @@ -124,8 +124,8 @@ producer (void *args) // Enqueue in priority order. if (msg_queue->enqueue_prio (mb) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next")), 0); } @@ -136,8 +136,8 @@ producer (void *args) if (msg_queue->enqueue_tail (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("put_next"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("put_next"))); count++; @@ -154,9 +154,9 @@ producer (void *args) // size of each line. int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Buffer_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Buffer_Test")); #if defined (ACE_HAS_THREADS) // Message queue. @@ -167,15 +167,15 @@ main (int, ASYS_TCHAR *[]) (void *) &msg_queue, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), 1); // Wait for producer and consumer threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Priority_Reactor_Test.cpp b/tests/Priority_Reactor_Test.cpp index 5ad543dcebc..68fd91ddaa7 100644 --- a/tests/Priority_Reactor_Test.cpp +++ b/tests/Priority_Reactor_Test.cpp @@ -87,14 +87,14 @@ Read_Handler::open (void *) { if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Read_Handler::open, ") - ASYS_TEXT ("cannot set non blocking mode")), + ACE_TEXT ("(%P|%t) Read_Handler::open, ") + ACE_TEXT ("cannot set non blocking mode")), -1); if (reactor ()->register_handler (this, READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Read_Handler::open, ") - ASYS_TEXT ("cannot register handler")), + ACE_TEXT ("(%P|%t) Read_Handler::open, ") + ACE_TEXT ("cannot register handler")), -1); // A number larger than the actual number of priorities, so some @@ -105,8 +105,8 @@ Read_Handler::open (void *) started_++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) created svc_handler for handle %d ") - ASYS_TEXT ("with priority %d\n"), + ACE_TEXT ("(%P|%t) created svc_handler for handle %d ") + ACE_TEXT ("with priority %d\n"), get_handle (), priority ())); return 0; @@ -129,19 +129,19 @@ Read_Handler::handle_input (ACE_HANDLE h) return 0; if (result != 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Read_Handler::handle_input"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Read_Handler::handle_input"))); waiting_--; if (waiting_ == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Last svc_handler closed, shutting down\n"))); + ACE_TEXT ("Last svc_handler closed, shutting down\n"))); ACE_Reactor::instance()->end_event_loop(); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Read_Handler::handle_input closing down\n"))); + ACE_TEXT ("(%P|%t) Read_Handler::handle_input closing down\n"))); return -1; } @@ -169,8 +169,8 @@ Write_Handler::svc (void) if (this->peer ().send_n (ACE_ALPHABET, sizeof (ACE_ALPHABET) - 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n"))); ACE_OS::sleep (pause); } @@ -184,7 +184,7 @@ client (void *arg) ACE_INET_Addr *connection_addr = ACE_reinterpret_cast (ACE_INET_Addr *, arg); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) running client\n"))); + ACE_TEXT ("(%P|%t) running client\n"))); CONNECTOR connector; Write_Handler *writer = 0; @@ -209,7 +209,7 @@ client (void *arg) options.timeout (tmp); writer = 0; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) still trying to connect\n"))); + ACE_TEXT ("(%P|%t) still trying to connect\n"))); } else { @@ -220,23 +220,23 @@ client (void *arg) writer->destroy (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) finishing client\n"))); + ACE_TEXT ("(%P|%t) finishing client\n"))); return 0; } } ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) failed to connect after %d retries\n"), + ACE_TEXT ("(%P|%t) failed to connect after %d retries\n"), max_retries)); return 0; } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Reactor_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dc:l:m:t:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dc:l:m:t:")); for (int c; (c = getopt ()) != -1; ) switch (c) @@ -259,12 +259,12 @@ main (int argc, ASYS_TCHAR *argv[]) case '?': default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Usage: Priority_Reactor_Test ") - ASYS_TEXT (" [-d] (disable priority reactor)\n") - ASYS_TEXT (" [-c nchildren] (number of threads/processes)\n") - ASYS_TEXT (" [-l loops] (number of loops per child)\n") - ASYS_TEXT (" [-m maxretries] (attempts to connect)\n") - ASYS_TEXT (" [-t max_time] (limits test duration)\n")), + ACE_TEXT ("Usage: Priority_Reactor_Test ") + ACE_TEXT (" [-d] (disable priority reactor)\n") + ACE_TEXT (" [-c nchildren] (number of threads/processes)\n") + ACE_TEXT (" [-l loops] (number of loops per child)\n") + ACE_TEXT (" [-m maxretries] (attempts to connect)\n") + ACE_TEXT (" [-t max_time] (limits test duration)\n")), -1); ACE_NOTREACHED (break); } @@ -300,12 +300,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); ACE_INET_Addr connection_addr (server_addr.get_port_number (), @@ -321,8 +321,8 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) &connection_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); } #elif !defined (ACE_LACKS_FORK) for (i = 0; i < opt_nchildren; ++i) @@ -331,7 +331,7 @@ main (int argc, ASYS_TCHAR *argv[]) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("fork failed"))); exit (-1); /* NOTREACHED */ case 0: @@ -346,7 +346,7 @@ main (int argc, ASYS_TCHAR *argv[]) } #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ ACE_Time_Value tv (opt_max_duration); @@ -358,12 +358,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (Read_Handler::get_countdown () != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) running out of time, ") - ASYS_TEXT ("probably due to failed connections.\n"))); + ACE_TEXT ("(%P|%t) running out of time, ") + ACE_TEXT ("probably due to failed connections.\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waiting for the children...\n"))); + ACE_TEXT ("(%P|%t) waiting for the children...\n"))); #if defined (ACE_HAS_THREADS) ACE_Thread_Manager::instance ()->wait (); @@ -372,7 +372,7 @@ main (int argc, ASYS_TCHAR *argv[]) { pid_t pid = ACE_OS::wait(); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) child %d terminated\n"), + ACE_TEXT ("(%P|%t) child %d terminated\n"), pid)); } #else diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index e74dbb85a81..253d0773651 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -24,7 +24,7 @@ ACE_RCSID(tests, Priority_Task_Test, "$Id$") -static const ASYS_TCHAR *usage = ASYS_TEXT ("usage: %s [-d]\n"); +static const ACE_TCHAR *usage = ACE_TEXT ("usage: %s [-d]\n"); #if defined (ACE_HAS_THREADS) @@ -91,15 +91,15 @@ Priority_Task::open (void *arg) ACE_SCOPE_THREAD); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) task activation at priority %d with ") - ASYS_TEXT ("flags 0x%X failed; retry at priority %d with ") - ASYS_TEXT ("flags 0x%X (errno is %d%p)\n"), + ACE_TEXT ("(%t) task activation at priority %d with ") + ACE_TEXT ("flags 0x%X failed; retry at priority %d with ") + ACE_TEXT ("flags 0x%X (errno is %d%p)\n"), this->priority_, flags, fallback_priority, THR_NEW_LWP, errno, - ASYS_TEXT (""))); + ACE_TEXT (""))); flags = THR_NEW_LWP; this->priority_ = fallback_priority; @@ -111,12 +111,12 @@ Priority_Task::open (void *arg) { if (ACE_OS::last_error () == EPERM) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("Insufficient privilege to run this test.\n")), + ACE_TEXT ("Insufficient privilege to run this test.\n")), -1); else ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%t) task activation at priority %d failed, ") - ASYS_TEXT ("exiting!\n%a"), + ACE_TEXT ("(%t) task activation at priority %d failed, ") + ACE_TEXT ("exiting!\n%a"), this->priority_, -1)); } @@ -133,18 +133,18 @@ Priority_Task::svc (void) if (ACE_Thread::getprio (thr_handle, prio) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("getprio failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("getprio failed")), -1); if (prio == this->priority_) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) actual prio of %d equals desired priority\n"), + ACE_TEXT ("(%t) actual prio of %d equals desired priority\n"), prio)); else { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("(%t) actual prio = %d, desired priority_ = %d!\n"), + ACE_TEXT ("(%t) actual prio = %d, desired priority_ = %d!\n"), prio, this->priority_)); ++error_; @@ -156,9 +156,9 @@ Priority_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Priority_Task_Test")); + ACE_START_TEST (ACE_TEXT ("Priority_Task_Test")); if (argc <= 1) // Disable LM_DEBUG messages. @@ -167,7 +167,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (argc == 2) { if (ACE_OS::strcmp (argv[1], - ASYS_TEXT ("-d")) != 0) + ACE_TEXT ("-d")) != 0) ACE_ERROR_RETURN ((LM_ERROR, usage, argv [0]), @@ -211,7 +211,7 @@ main (int argc, ASYS_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %d tasks spawned, wait for them to exit . . .\n"), + ACE_TEXT ("(%t) %d tasks spawned, wait for them to exit . . .\n"), ACE_MAX_ITERATIONS)); // Wait for all tasks to exit. @@ -226,7 +226,7 @@ main (int argc, ASYS_TCHAR *argv[]) #else ACE_ERROR ((LM_DEBUG, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ // Re-enable LM_DEBUG messages. diff --git a/tests/Process_Manager_Test.cpp b/tests/Process_Manager_Test.cpp index cb2ad773ddb..48c61341511 100644 --- a/tests/Process_Manager_Test.cpp +++ b/tests/Process_Manager_Test.cpp @@ -52,7 +52,7 @@ public: { if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Exit_Handler(%s) got %d: %d\n"), + ACE_TEXT ("(%P|%t) Exit_Handler(%s) got %d: %d\n"), msg_, int (proc->getpid ()), int (proc->exit_code ()) )); @@ -63,23 +63,23 @@ private: }; static void -usage (const char *argv0) +usage (const ACE_TCHAR *argv0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("usage: %s [-d] [sleep-seconds]\n"), + ACE_TEXT ("usage: %s [-d] [sleep-seconds]\n"), argv0)); ACE_OS::exit (0); } static pid_t -spawn_child (const char *argv0, +spawn_child (const ACE_TCHAR *argv0, ACE_Process_Manager &mgr, int sleep_time = 0) { ACE_Process_Options opts; opts.command_line (ACE_TEXT("%s %s %d"), - ACE_WIDE_STRING(argv0), + argv0, debug_test ? ACE_TEXT ("-d") : ACE_TEXT (""), sleep_time); @@ -87,15 +87,15 @@ spawn_child (const char *argv0, if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawned child: %d\n"), + ACE_TEXT ("(%P|%t) spawned child: %d\n"), int (result))); return result; } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt args (argc, argv, "d"); + ACE_Get_Opt args (argc, argv, ACE_TEXT ("d")); for (int arg = args (); arg != EOF; arg = args ()) switch (arg) @@ -110,11 +110,11 @@ main (int argc, ASYS_TCHAR *argv[]) if (args.optind == argc - 1) { // child process: sleep & exit - int secs = atoi (argv[args.optind]); + int secs = ACE_OS::atoi (argv[args.optind]); ACE_OS::sleep (secs ? secs : 1); if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) about to exit with code %d\n"), + ACE_TEXT ("(%P|%t) about to exit with code %d\n"), secs)); return secs; } @@ -122,7 +122,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (args.optind != argc) // incorrect usage usage (argv[0]); - ACE_START_TEST (ASYS_TEXT ("Process_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Manager_Test")); // Try the explicit <ACE_Process_Manager::wait> functions @@ -146,7 +146,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child %d: %d\n"), + ACE_TEXT ("(%P|%t) waited for child %d: %d\n"), child1, exitcode)); @@ -166,7 +166,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child %d: %d\n"), + ACE_TEXT ("(%P|%t) waited for child %d: %d\n"), child3, exitcode)); @@ -176,7 +176,7 @@ main (int argc, ASYS_TCHAR *argv[]) &exitcode); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) expected to reap %d, got %d\n"), + ACE_TEXT ("(%P|%t) expected to reap %d, got %d\n"), child2, result3)); ACE_ASSERT (result3 == child2); @@ -184,7 +184,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // -------------------------------------------------- @@ -203,7 +203,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // This one should timeout: @@ -218,7 +218,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for any child: %d\n"), + ACE_TEXT ("(%P|%t) waited for any child: %d\n"), exitcode)); // Now wait indefinitely to clean up... @@ -230,7 +230,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) waited for child 5 again: %d\n"), + ACE_TEXT ("(%P|%t) waited for child 5 again: %d\n"), exitcode)); // -------------------------------------------------- @@ -254,7 +254,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (debug_test) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) done!\n") )); + ACE_TEXT ("(%P|%t) done!\n") )); ACE_END_TEST; return result; @@ -262,11 +262,11 @@ main (int argc, ASYS_TCHAR *argv[]) #else /* (!ACE_LACKS_FORK || ACE_WIN32) && ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Process_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Manager_Test")); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("The ACE Process Manager is not supported on this platform\n"))); + ACE_TEXT ("The ACE Process Manager is not supported on this platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp index b0f4f861f5a..c3c680afb02 100644 --- a/tests/Process_Mutex_Test.cpp +++ b/tests/Process_Mutex_Test.cpp @@ -38,8 +38,8 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-d (don't release mutex)] ") - ASYS_TEXT ("[-c (child process)] [-n mutex name]\n"))); + ACE_TEXT ("usage: %n [-d (don't release mutex)] ") + ACE_TEXT ("[-c (child process)] [-n mutex name]\n"))); ACE_OS::exit (1); } @@ -72,7 +72,7 @@ parse_args (int argc, char *argv[]) static void acquire_release (void) { - ACE_Process_Mutex mutex (ACE_WIDE_STRING (mutex_name)); + ACE_Process_Mutex mutex (ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); // Make sure the constructor succeeded ACE_ASSERT (ACE_LOG_MSG->op_status () == 0); @@ -81,10 +81,10 @@ acquire_release (void) ACE_ASSERT (mutex.acquire () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Mutex acquired %s\n"), + ACE_TEXT ("(%P) Mutex acquired %s\n"), mutex_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Working....\n"))); + ACE_TEXT ("(%P) Working....\n"))); // Do some "work", i.e., just sleep for a couple of seconds. ACE_OS::sleep (2); @@ -93,7 +93,7 @@ acquire_release (void) if (release_mutex == 1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) Releasing the mutex %s\n"), + ACE_TEXT ("(%P) Releasing the mutex %s\n"), mutex_name)); ACE_ASSERT (mutex.release () == 0); } @@ -101,15 +101,15 @@ acquire_release (void) #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); - ACE_START_TEST (ASYS_TEXT ("Process_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Mutex_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_TEXT ("fork is not supported on this platform\n"))); ACE_END_TEST; #else /* ! ACE_LACKS_FORK */ @@ -124,7 +124,7 @@ main (int argc, ASYS_TCHAR *argv[]) } else { - ACE_START_TEST (ASYS_TEXT ("Process_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Mutex_Test")); ACE_INIT_LOG ("Process_Mutex_Test-children"); ACE_Process_Options options; @@ -133,13 +133,13 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c -n %s -d"), - ACE_WIDE_STRING (mutex_name)); + ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); else options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("Process_Mutex_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" -c -n %s"), - ACE_WIDE_STRING (mutex_name)); + ACE_TEXT_CHAR_TO_TCHAR (mutex_name)); // Spawn <n_processes> child processes that will contend for the // lock. @@ -154,7 +154,7 @@ main (int argc, ASYS_TCHAR *argv[]) int result = children[i].spawn (options); ACE_ASSERT (result != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Parent spawned child process with pid = %d.\n"), + ACE_TEXT ("Parent spawned child process with pid = %d.\n"), children[i].getpid ())); // Give the newly spawned child process a chance to start... @@ -166,7 +166,7 @@ main (int argc, ASYS_TCHAR *argv[]) // Wait for the child processes we created to exit. ACE_ASSERT (children[i].wait () != -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Parent %d finished\n"), + ACE_TEXT ("Parent %d finished\n"), children[i].getpid ())); } diff --git a/tests/Process_Strategy_Test.cpp b/tests/Process_Strategy_Test.cpp index 359179b032a..35150a68301 100644 --- a/tests/Process_Strategy_Test.cpp +++ b/tests/Process_Strategy_Test.cpp @@ -163,7 +163,7 @@ Options::concurrency_strategy (void) return this->concurrency_strategy_; } -const ASYS_TCHAR * +const ACE_TCHAR * Options::filename (void) { return this->filename_; @@ -189,37 +189,39 @@ Options::~Options (void) } int -Options::parse_args (int argc, ASYS_TCHAR *argv[]) +Options::parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("p:c:f:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("p:c:f:")); // - 26 is for the "process_strategy_test_temp" that is appended if (ACE::get_temp_dir (this->filename_, MAXPATHLEN - 26) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Temporary path too long\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Temporary path too long\n")), + -1); - ACE_OS::strcat (this->filename_, "process_strategy_test_temp"); + ACE_OS::strcat (this->filename_, ACE_TEXT ("process_strategy_test_temp")); for (int c; (c = get_opt ()) != -1; ) switch (c) { case 'c': if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("REACTIVE")) == 0) + ACE_TEXT ("REACTIVE")) == 0) OPTIONS::instance ()->concurrency_type (Options::REACTIVE); #if !defined (ACE_LACKS_FORK) else if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("PROCESS")) == 0) + ACE_TEXT ("PROCESS")) == 0) OPTIONS::instance ()->concurrency_type (Options::PROCESS); #endif /* !ACE_LACKS_FORK */ #if defined (ACE_HAS_THREADS) else if (ACE_OS::strcmp (get_opt.optarg, - ASYS_TEXT ("THREAD")) == 0) + ACE_TEXT ("THREAD")) == 0) OPTIONS::instance ()->concurrency_type (Options::THREAD); #endif /* ACE_HAS_THREADS */ else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("WARNING: concurrency strategy \"%s\" ") - ASYS_TEXT ("is not supported\n"), + ACE_TEXT ("WARNING: concurrency strategy \"%s\" ") + ACE_TEXT ("is not supported\n"), get_opt.optarg)); break; case 'f': @@ -227,23 +229,23 @@ Options::parse_args (int argc, ASYS_TCHAR *argv[]) break; default: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-f (filename)] ") - ASYS_TEXT ("[-c (concurrency strategy)]\n%a"), 1)); + ACE_TEXT ("usage: %n [-f (filename)] ") + ACE_TEXT ("[-c (concurrency strategy)]\n%a"), 1)); /* NOTREACHED */ } // Initialize the file lock. Note that this object lives beyond the // lifetime of the Acceptor. - if (this->file_lock_.open (ASYS_ONLY_WIDE_STRING (this->filename_), + if (this->file_lock_.open (this->filename_, O_RDWR | O_CREAT, ACE_DEFAULT_FILE_PERMS) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening %s on handle %d.\n"), + ACE_TEXT ("(%P|%t) opening %s on handle %d.\n"), this->filename_, this->file_lock_.get_handle ())); @@ -254,8 +256,8 @@ Options::parse_args (int argc, ASYS_TCHAR *argv[]) (const void *) &count, sizeof count) != sizeof count) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("write"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("write"))); // Initialize the Concurrency strategy. switch (this->concurrency_type_) @@ -317,7 +319,7 @@ Options::concurrency_type (Options::Concurrency_Type cs) Counting_Service::Counting_Service (ACE_Thread_Manager *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) creating the Counting_Service\n"))); + ACE_TEXT ("(%P|%t) creating the Counting_Service\n"))); } // Read the current value from the shared file and return it to the @@ -329,7 +331,7 @@ Counting_Service::read (void) ACE_READ_GUARD_RETURN (ACE_File_Lock, ace_mon, OPTIONS::instance ()->file_lock (), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reading on handle %d.\n"), + ACE_TEXT ("(%P|%t) reading on handle %d.\n"), OPTIONS::instance ()->file_lock ().get_handle ())); int count; @@ -338,8 +340,8 @@ Counting_Service::read (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("read")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("read")), -1); char buf[BUFSIZ]; @@ -347,13 +349,13 @@ Counting_Service::read (void) "count = %d\n", count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) count = %d\n"), + ACE_TEXT ("(%P|%t) count = %d\n"), count)); if (this->peer ().send_n (buf, n) != n) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("send_n")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("send_n")), -1); return 0; } @@ -367,7 +369,7 @@ Counting_Service::inc (void) OPTIONS::instance ()->file_lock (), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) incrementing on handle %d.\n"), + ACE_TEXT ("(%P|%t) incrementing on handle %d.\n"), OPTIONS::instance ()->file_lock ().get_handle ())); int count; @@ -376,12 +378,12 @@ Counting_Service::inc (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("read")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("read")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) incrementing count from %d to %d\n"), + ACE_TEXT ("(%P|%t) incrementing count from %d to %d\n"), count, count + 1)); count++; @@ -391,8 +393,8 @@ Counting_Service::inc (void) sizeof count, 0) != sizeof count) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("write")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("write")), -1); return 0; } @@ -406,7 +408,7 @@ Counting_Service::handle_input (ACE_HANDLE) char buf[BUFSIZ]; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reading from peer on %d\n"), + ACE_TEXT ("(%P|%t) reading from peer on %d\n"), this->peer ().get_handle ())); size_t len; // Read the PDU length first. @@ -422,7 +424,7 @@ Counting_Service::handle_input (ACE_HANDLE) else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) %d bytes of input on %d is %*s\n"), + ACE_TEXT ("(%P|%t) %d bytes of input on %d is %*s\n"), bytes, this->peer ().get_handle (), bytes, @@ -437,7 +439,7 @@ Counting_Service::handle_input (ACE_HANDLE) return this->inc (); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) no match...\n"))); + ACE_TEXT ("(%P|%t) no match...\n"))); return 0; } } @@ -446,7 +448,7 @@ int Counting_Service::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) handling thread\n"))); + ACE_TEXT ("(%P|%t) handling thread\n"))); while (this->handle_input () >= 0) continue; @@ -472,7 +474,7 @@ int Counting_Service::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) opening service\n"))); + ACE_TEXT ("(%P|%t) opening service\n"))); if (OPTIONS::instance ()->concurrency_type () == Options::PROCESS) { @@ -485,7 +487,7 @@ Counting_Service::open (void *) continue; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) About to exit from the child\n"))); + ACE_TEXT ("(%P|%t) About to exit from the child\n"))); // Exit the child. ACE_OS::exit (0); @@ -518,13 +520,13 @@ client (void *arg) for (i = 0; i < ACE_MAX_ITERATIONS; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client iteration %d\n"), + ACE_TEXT ("(%P|%t) client iteration %d\n"), i)); if (connector.connect (stream, server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 0); command = "inc"; command_len = ACE_OS::strlen (command); @@ -533,8 +535,8 @@ client (void *arg) &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); command = "read"; command_len = ACE_OS::strlen (command); @@ -543,23 +545,23 @@ client (void *arg) &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); else if (stream.recv (buf, sizeof buf) <= 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("recv")), 0); // ACE_DEBUG ((LM_DEBUG, - // ASYS_TEXT ("(%P|%t) client iteration %d, buf = %s\n"), + // ACE_TEXT ("(%P|%t) client iteration %d, buf = %s\n"), // i, buf)); if (stream.close () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("close")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("close")), 0); } @@ -569,20 +571,20 @@ client (void *arg) if (connector.connect (stream, server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 0); else if (stream.send (4, &command_len, sizeof command_len, command, command_len) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("send")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("send")), 0); else if ((bytes_read = stream.recv (buf, sizeof buf)) <= 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("recv")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("recv")), 0); else { @@ -590,10 +592,11 @@ client (void *arg) // the call to ACE_OS::strrchr (). buf [bytes_read] = '\0'; - size_t count = ACE_OS::atoi (ACE_OS::strrchr (buf, ' ')); + size_t count = ACE_OS::atoi (ACE_OS::strrchr (ACE_TEXT_CHAR_TO_TCHAR (buf), + ACE_TEXT (' '))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) count = %d\n"), + ACE_TEXT ("(%P|%t) count = %d\n"), count)); // Make sure that the count is correct. ACE_ASSERT (count == ACE_MAX_ITERATIONS); @@ -601,8 +604,8 @@ client (void *arg) if (stream.close () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("close")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("close")), 0); // Remove the filename. @@ -627,14 +630,14 @@ server (void *) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Process_Strategy_Test")); + ACE_START_TEST (ACE_TEXT ("Process_Strategy_Test")); if (OPTIONS::instance ()->parse_args (argc, argv) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("parse_args")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("parse_args")), -1); ACCEPTOR acceptor; @@ -650,13 +653,13 @@ main (int argc, ASYS_TCHAR *argv[]) OPTIONS::instance ()->concurrency_strategy ()) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), -1); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) @@ -668,8 +671,8 @@ main (int argc, ASYS_TCHAR *argv[]) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); exit (-1); /* NOTREACHED */ case 0: @@ -687,23 +690,23 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run ") - ASYS_TEXT ("in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run ") + ACE_TEXT ("in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ } diff --git a/tests/Process_Strategy_Test.h b/tests/Process_Strategy_Test.h index 0cf701ee058..1af7987e64c 100644 --- a/tests/Process_Strategy_Test.h +++ b/tests/Process_Strategy_Test.h @@ -101,7 +101,7 @@ public: ~Options (void); // Destructor. - int parse_args (int argc, ASYS_TCHAR *argv[]); + int parse_args (int argc, ACE_TCHAR *argv[]); // Read command-line arguments and initialize options. enum Concurrency_Type @@ -118,7 +118,7 @@ public: ACE_File_Lock &file_lock (void); // Returns the file lock. - const ASYS_TCHAR *filename (void); + const ACE_TCHAR *filename (void); // Returns the filename that we're using as the lock. ACE_Concurrency_Strategy <Counting_Service> *concurrency_strategy (void); @@ -135,7 +135,7 @@ private: // Activation strategy that either forks a new process or spawns a // new thread for each client connection. - ASYS_TCHAR filename_[MAXPATHLEN + 1]; + ACE_TCHAR filename_[MAXPATHLEN + 1]; // Name of the counting file. }; diff --git a/tests/RB_Tree_Test.cpp b/tests/RB_Tree_Test.cpp index c8158eaf9d0..06d810ad26e 100644 --- a/tests/RB_Tree_Test.cpp +++ b/tests/RB_Tree_Test.cpp @@ -63,9 +63,9 @@ static int str_int_index [] = {4, 6, 2, 7, 5, 3, 1, 0}; // RL BFS static int str_str_index [] = {4, 2, 1, 0, 3, 6, 5, 7}; // LR preorder int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("RB_Tree_Test")); + ACE_START_TEST (ACE_TEXT ("RB_Tree_Test")); // Construct and run four distinctly parameterized tests. Note that // specialization of the ACE_Less_Than template for character diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp index 0fe412cf772..355b4c73d36 100644 --- a/tests/Reactor_Exceptions_Test.cpp +++ b/tests/Reactor_Exceptions_Test.cpp @@ -32,7 +32,7 @@ static void throw_exception (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) throw exception\n"))); + ACE_TEXT ("(%P|%t) throw exception\n"))); // Cause a Win32 structured exception. *(char *) 0 = 0; @@ -45,7 +45,7 @@ static void throw_exception (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) throw exception\n"))); + ACE_TEXT ("(%P|%t) throw exception\n"))); throw Except (); } #endif /* ACE_WIN32 */ @@ -73,11 +73,11 @@ My_Handler::get_handle (void) const int My_Handler::handle_input (ACE_HANDLE) { - ASYS_TCHAR buf[BUFSIZ]; + ACE_TCHAR buf[BUFSIZ]; ACE_INET_Addr from_addr; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Activity occurred on handle %d!\n"), + ACE_TEXT ("Activity occurred on handle %d!\n"), ACE_SOCK_Dgram::get_handle ())); ssize_t n = ACE_SOCK_Dgram::recv (buf, @@ -85,11 +85,11 @@ My_Handler::handle_input (ACE_HANDLE) from_addr); if (n == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("handle_input"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("handle_input"))); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("got buf = %s\n"), + ACE_TEXT ("got buf = %s\n"), buf)); throw_exception (); @@ -129,7 +129,7 @@ public: catch (...) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) catch exception\n"))); + ACE_TEXT (" (%t) catch exception\n"))); ret = -1; // do your thing, etc. } @@ -151,7 +151,7 @@ worker (void) for (;;) if (ACE_Reactor::instance ()->handle_events () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT (" (%t) exception return\n")), + ACE_TEXT (" (%t) exception return\n")), 0); ACE_NOTREACHED (return 0); @@ -159,13 +159,13 @@ worker (void) #endif /* ACE_HAS_EXCEPTIONS */ int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Exceptions_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Exceptions_Test")); #if defined (ACE_HAS_EXCEPTIONS) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Starting tracing\n"))); + ACE_TEXT ("Starting tracing\n"))); u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; @@ -186,8 +186,8 @@ main (int argc, ASYS_TCHAR *argv[]) (&handler, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("register_handler")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("register_handler")), -1); #if defined (ACE_HAS_THREADS) @@ -195,14 +195,14 @@ main (int argc, ASYS_TCHAR *argv[]) #else // Need to figure out how to implement this test. ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_SOCK_Dgram dgram (ACE_sap_any_cast (ACE_INET_Addr &)); for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) - dgram.send (ASYS_TEXT ("Hello"), - sizeof (ASYS_TEXT ("Hello")), + dgram.send (ACE_TEXT ("Hello"), + sizeof (ACE_TEXT ("Hello")), remote_addr); // Barrier to wait for the other thread to return. thr_mgr->wait (); @@ -211,12 +211,12 @@ main (int argc, ASYS_TCHAR *argv[]) dgram.close (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main\n"))); + ACE_TEXT (" (%t) exiting main\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("C++ exception support not enabled on this platform\n"))); + ACE_TEXT ("C++ exception support not enabled on this platform\n"))); #endif /* ACE_HAS_EXCEPTIONS */ ACE_END_TEST; diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp index 29d08bbb5ce..e136903c577 100644 --- a/tests/Reactor_Notify_Test.cpp +++ b/tests/Reactor_Notify_Test.cpp @@ -134,7 +134,7 @@ int Supplier_Task::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Supplier_Task::close\n"))); + ACE_TEXT ("(%t) Supplier_Task::close\n"))); int result; @@ -150,7 +150,7 @@ Supplier_Task::close (u_long) // Wait to be told to shutdown by the main thread. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting to be shutdown by main thread\n"))); + ACE_TEXT ("(%t) waiting to be shutdown by main thread\n"))); result = this->waiter_.acquire (); ACE_ASSERT (result != -1); } @@ -160,7 +160,7 @@ Supplier_Task::close (u_long) Supplier_Task::~Supplier_Task (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) ~Supplier_Task\n"))); + ACE_TEXT ("(%t) ~Supplier_Task\n"))); this->pipe_.close (); } @@ -177,7 +177,7 @@ Supplier_Task::perform_notifications (int notifications) for (size_t i = 0; i < iterations; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) notifying reactor on iteration %d\n"), + ACE_TEXT ("(%t) notifying reactor on iteration %d\n"), i)); int result; @@ -188,8 +188,8 @@ Supplier_Task::perform_notifications (int notifications) { if (errno == ETIME) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify"))); else ACE_ASSERT (result != -1); } @@ -211,7 +211,7 @@ int Supplier_Task::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** starting unlimited notifications test\n"))); + ACE_TEXT ("(%t) **** starting unlimited notifications test\n"))); // Allow an unlimited number of iterations per // <ACE_Reactor::notify>. @@ -220,13 +220,13 @@ Supplier_Task::svc (void) if (this->long_timeout_ == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** starting limited notifications test\n"))); + ACE_TEXT ("(%t) **** starting limited notifications test\n"))); // Only allow 1 iteration per <ACE_Reactor::notify> this->perform_notifications (1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) **** exiting thread test\n"))); + ACE_TEXT ("(%t) **** exiting thread test\n"))); } return 0; } @@ -236,7 +236,7 @@ Supplier_Task::handle_exception (ACE_HANDLE handle) { ACE_ASSERT (handle == ACE_INVALID_HANDLE); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_exception\n"))); + ACE_TEXT ("(%t) handle_exception\n"))); this->waiter_.release (); return 0; @@ -247,7 +247,7 @@ Supplier_Task::handle_output (ACE_HANDLE handle) { ACE_ASSERT (handle == this->pipe_.write_handle ()); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_output\n"))); + ACE_TEXT ("(%t) handle_output\n"))); // This function is called by the main thread, believe it or not :-) // That's because the pipe's write handle is always active. Thus, @@ -313,8 +313,8 @@ run_test (int disable_notify_pipe, ACE_Time_Value timeout (tv); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting handle_events() on iteration %d") - ASYS_TEXT (" with time-out = %d seconds\n"), + ACE_TEXT ("(%t) starting handle_events() on iteration %d") + ACE_TEXT (" with time-out = %d seconds\n"), iteration, timeout.sec ())); @@ -324,14 +324,14 @@ run_test (int disable_notify_pipe, case -1: if (! disable_notify_pipe) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("reactor"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("reactor"))); shutdown = 1; break; /* NOTREACHED */ case 0: ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_events timed out\n"))); + ACE_TEXT ("(%t) handle_events timed out\n"))); shutdown = 1; break; /* NOTREACHED */ @@ -344,7 +344,7 @@ run_test (int disable_notify_pipe, if (tv.sec () == LONG_TIMEOUT) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) releasing supplier task thread\n"))); + ACE_TEXT ("(%t) releasing supplier task thread\n"))); task.release (); } return 0; @@ -353,35 +353,35 @@ run_test (int disable_notify_pipe, #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Notify_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Notify_Test")); #if defined (ACE_HAS_THREADS) ACE_Time_Value timeout (SHORT_TIMEOUT); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with notify pipe enabled") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with notify pipe enabled") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (0, timeout); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with notify pipe disabled") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with notify pipe disabled") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (1, timeout); timeout.set (LONG_TIMEOUT, 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running tests with reactor notification pipe enabled\n") - ASYS_TEXT (" and time-out = %d seconds\n"), + ACE_TEXT ("(%t) running tests with reactor notification pipe enabled\n") + ACE_TEXT (" and time-out = %d seconds\n"), timeout.sec ())); run_test (0, timeout); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Reactor_Performance_Test.cpp b/tests/Reactor_Performance_Test.cpp index 54d8b68da78..b655fd1385b 100644 --- a/tests/Reactor_Performance_Test.cpp +++ b/tests/Reactor_Performance_Test.cpp @@ -64,16 +64,16 @@ Read_Handler::open (void *) { if (this->peer ().enable (ACE_NONBLOCK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Read_Handler::open, cannot set non blocking mode\n")), + ACE_TEXT ("(%t) Read_Handler::open, cannot set non blocking mode\n")), -1); if (reactor ()->register_handler (this, READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Read_Handler::open, cannot register handler\n")), + ACE_TEXT ("(%t) Read_Handler::open, cannot register handler\n")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) created svc_handler for handle %d\n"), + ACE_TEXT ("(%t) created svc_handler for handle %d\n"), get_handle ())); return 0; } @@ -95,7 +95,7 @@ Read_Handler::handle_input (ACE_HANDLE handle) { buf[result] = 0; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Read_Handler::handle_input: %s\n"), + ACE_TEXT ("(%t) Read_Handler::handle_input: %s\n"), buf)); } } @@ -105,8 +105,8 @@ Read_Handler::handle_input (ACE_HANDLE handle) return 0; else { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("handle_input: %p (errno: %d)\n"), - ASYS_TEXT ("recv"), errno)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("handle_input: %p (errno: %d)\n"), + ACE_TEXT ("recv"), errno)); // This will cause handle_close to get called. return -1; @@ -139,7 +139,7 @@ Read_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor::instance ()->end_event_loop (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Read_Handler::handle_close closing down\n"))); + ACE_TEXT ("(%t) Read_Handler::handle_close closing down\n"))); // Shutdown this->destroy (); @@ -160,8 +160,8 @@ Write_Handler::send_data (void) if (this->peer ().send_n (ACE_ALPHABET, send_size) != send_size) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n")), -1); return 0; } @@ -175,7 +175,7 @@ void * client (void *arg) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running client\n"))); + ACE_TEXT ("(%t) running client\n"))); ACE_INET_Addr *connection_addr = ACE_reinterpret_cast (ACE_INET_Addr *, arg); @@ -190,11 +190,11 @@ client (void *arg) 0); ACE_Auto_Basic_Array_Ptr <Write_Handler *> writers (temp_writers); - ASYS_TCHAR *temp_failed; + ACE_TCHAR *temp_failed; ACE_NEW_RETURN (temp_failed, - ASYS_TCHAR[opt_nconnections], + ACE_TCHAR[opt_nconnections], 0); - ACE_Auto_Basic_Array_Ptr <ASYS_TCHAR> failed_svc_handlers (temp_failed); + ACE_Auto_Basic_Array_Ptr <ACE_TCHAR> failed_svc_handlers (temp_failed); // Automagic memory cleanup. ACE_INET_Addr *temp_addresses; @@ -223,7 +223,7 @@ client (void *arg) { ACE_INET_Addr failed_addr = addresses.get()[i]; ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) connection failed to %s, %d\n"), + ACE_TEXT ("(%t) connection failed to %s, %d\n"), failed_addr.get_host_name (), failed_addr.get_port_number ())); } @@ -237,15 +237,15 @@ client (void *arg) for (i = 0; i < opt_nconnections; i++) if (writers[i]->send_data () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("writer::send_data")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("writer::send_data")), 0); // Cleanup for (i = 0; i < opt_nconnections; i++) writers[i]->destroy (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) finishing client\n"))); + ACE_TEXT ("(%t) finishing client\n"))); return 0; } @@ -278,42 +278,42 @@ create_reactor (void) void print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) { - const ASYS_TCHAR *reactor_type = 0; + const ACE_TCHAR *reactor_type = 0; if (opt_wfmo_reactor) - reactor_type = ASYS_TEXT ("WFMO_Reactor"); + reactor_type = ACE_TEXT ("WFMO_Reactor"); else if (opt_select_reactor) - reactor_type = ASYS_TEXT ("Select_Reactor"); + reactor_type = ACE_TEXT ("Select_Reactor"); else - reactor_type = ASYS_TEXT ("Platform's default Reactor"); + reactor_type = ACE_TEXT ("Platform's default Reactor"); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tReactor_Performance Test statistics:\n\n"))); + ACE_TEXT ("\n\tReactor_Performance Test statistics:\n\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tReactor Type: %s\n"), + ACE_TEXT ("\tReactor Type: %s\n"), reactor_type)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tConnections: %d\n"), + ACE_TEXT ("\tConnections: %d\n"), opt_nconnections)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\tIteration per connection: %d\n"), + ACE_TEXT ("\tIteration per connection: %d\n"), opt_nloops)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n\tTiming results:\n"))); + ACE_TEXT ("\n\tTiming results:\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), + ACE_TEXT ("\t\treal time = %f secs \n\t\tuser time = %f secs \n\t\tsystem time = %f secs\n\n"), et.real_time, et.user_time, et.system_time)); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("dswc:l:"), 1); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dswc:l:"), 1); for (int c; (c = getopt ()) != -1; ) switch (c) { @@ -359,12 +359,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("open")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting server at port %d\n"), + ACE_TEXT ("(%t) starting server at port %d\n"), server_addr.get_port_number ())); ACE_INET_Addr connection_addr (server_addr.get_port_number (), @@ -375,8 +375,8 @@ main (int argc, ASYS_TCHAR *argv[]) (void *) &connection_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("thread create failed"))); ACE_Time_Value run_limit (opt_nloops / 10); @@ -392,7 +392,7 @@ main (int argc, ASYS_TCHAR *argv[]) print_results (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for the client thread...\n"))); + ACE_TEXT ("(%t) waiting for the client thread...\n"))); ACE_Thread_Manager::instance ()->wait (); @@ -438,12 +438,12 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Performance_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp index d1fe88674f5..a69875c523d 100644 --- a/tests/Reactor_Timer_Test.cpp +++ b/tests/Reactor_Timer_Test.cpp @@ -66,7 +66,7 @@ Time_Handler::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("[%x] handle = %d, close_mask = %d, timer id = %d\n"), + ACE_TEXT ("[%x] handle = %d, close_mask = %d, timer id = %d\n"), this, handle, close_mask, @@ -83,7 +83,7 @@ Time_Handler::handle_timeout (const ACE_Time_Value &tv, ACE_ASSERT (current_count == count); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("[%x] Timer id %d with count #%d|%d timed out at %d!\n"), + ACE_TEXT ("[%x] Timer id %d with count #%d|%d timed out at %d!\n"), this, this->timer_id (), count, @@ -122,7 +122,9 @@ Time_Handler::timer_id (long t) static void test_registering_all_handlers (void) { - ACE_Trace t ("test_registering_all_handler", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_registering_all_handler"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -143,7 +145,9 @@ test_registering_all_handlers (void) static void test_registering_one_handler (void) { - ACE_Trace t ("test_registering_one_handler", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_registering_one_handler"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -166,7 +170,9 @@ test_registering_one_handler (void) static void test_canceling_odd_timers (void) { - ACE_Trace t ("test_canceling_odd_timers", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_canceling_odd_timers"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; @@ -199,7 +205,9 @@ test_canceling_odd_timers (void) static void test_resetting_timer_intervals (void) { - ACE_Trace t ("test_resetting_timer_intervals", __LINE__, __FILE__); + ACE_Trace t (ACE_TEXT ("test_resetting_timer_intervals"), + __LINE__, + ACE_TEXT_CHAR_TO_TCHAR (__FILE__)); Time_Handler rt; int t_id; @@ -223,9 +231,9 @@ test_resetting_timer_intervals (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactor_Timer_Test")); + ACE_START_TEST (ACE_TEXT ("Reactor_Timer_Test")); // Register all different handlers, i.e., one per timer. test_registering_all_handlers (); diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index 4c3ea3a6e1e..b71fc2fc0f3 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -72,7 +72,7 @@ Test_Task::Test_Task (void) Test_Task::task_count_++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TT+ Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) TT+ Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); } @@ -81,7 +81,7 @@ Test_Task::~Test_Task (void) ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, recursive_lock); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) TT- Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) TT- Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); ACE_ASSERT (Test_Task::task_count_ == 0); @@ -103,7 +103,7 @@ Test_Task::close (u_long) Test_Task::task_count_--; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) close Test_Task::task_count_ = %d\n"), + ACE_TEXT ("(%t) close Test_Task::task_count_ = %d\n"), Test_Task::task_count_)); ACE_ASSERT (Test_Task::task_count_ >= 0); @@ -115,7 +115,7 @@ int Test_Task::svc (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svc\n"))); + ACE_TEXT ("(%t) svc\n"))); for (size_t i = 0; i < ACE_MAX_ITERATIONS; i++) { @@ -130,12 +130,12 @@ Test_Task::svc (void) { if (errno == ETIME) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify() timed out"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify() timed out"))); else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("notify")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("notify")), -1); } } @@ -158,7 +158,7 @@ Test_Task::handle_input (ACE_HANDLE) { done_count--; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handle_input, handled_ = %d, done_count = %d\n"), + ACE_TEXT ("(%t) handle_input, handled_ = %d, done_count = %d\n"), this->handled_, done_count.value ())); } @@ -184,13 +184,13 @@ worker (void *args) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("reactor")), + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("reactor")), 0); /* NOTREACHED */ case 0: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%t) Reactor shutdown\n")), + ACE_TEXT ("(%t) Reactor shutdown\n")), 0); /* NOTREACHED */ } @@ -207,9 +207,9 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reactors_Test")); + ACE_START_TEST (ACE_TEXT ("Reactors_Test")); #if defined (ACE_HAS_THREADS) ACE_ASSERT (ACE_LOG_MSG->op_status () != -1); @@ -237,30 +237,30 @@ main (int, ASYS_TCHAR *[]) (void *) ACE_Reactor::instance (), THR_BOUND | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), -1); else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (worker), (void *) &reactor, THR_BOUND | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn")), -1); if (ACE_Thread_Manager::instance ()->wait () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("wait")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("wait")), -1); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) all threads are finished \n"))); + ACE_TEXT ("(%t) all threads are finished \n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index 018b1eddd13..ec796df9ce9 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -65,14 +65,14 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n"))); + ACE_TEXT ("usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("r:w:n:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("r:w:n:")); int c; @@ -100,7 +100,7 @@ parse_args (int argc, ASYS_TCHAR *argv[]) static void * reader (void *) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) reader starting\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) reader starting\n"))); // We use a random pause, around 2msec with 1msec jittering. int usecs = 1000 + ACE_OS::rand() % 2000; @@ -111,10 +111,10 @@ reader (void *) ACE_OS::sleep (pause); ACE_Read_Guard<ACE_RW_Thread_Mutex> g (rw_mutex); // int n = ++current_readers; - // ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) I'm reader number %d\n"), n)); + // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) I'm reader number %d\n"), n)); if (current_writers > 0) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writers found!!!\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) writers found!!!\n"))); ACE_thread_t data = shared_data; @@ -124,7 +124,7 @@ reader (void *) if (!ACE_OS::thr_equal (shared_data, data)) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) somebody changed %d to %d\n"), + ACE_TEXT (" (%t) somebody changed %d to %d\n"), data, shared_data)); } @@ -136,7 +136,7 @@ reader (void *) current_writers++; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) upgraded to write lock!\n"))); + ACE_TEXT ("(%t) upgraded to write lock!\n"))); ACE_thread_t self = ACE_Thread::self (); @@ -147,7 +147,7 @@ reader (void *) { if (ACE_OS::thr_equal (shared_data, data) == 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) upgraded writer error: somebody changed %d to %d\n"), + ACE_TEXT ("(%t) upgraded writer error: somebody changed %d to %d\n"), data, shared_data)); } @@ -161,19 +161,19 @@ reader (void *) // we were still a reader ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) could not upgrade to write lock!\n"))); + ACE_TEXT ("(%t) could not upgrade to write lock!\n"))); } else // result == -1 { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) failure in upgrading to write lock!\n"), + ACE_TEXT ("(%t) failure in upgrading to write lock!\n"), 1)); } - //ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) done with reading guarded data\n"))); + //ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) done with reading guarded data\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) reader finished %d iterations at %T\n"), + ACE_TEXT ("(%t) reader finished %d iterations at %T\n"), iterations)); } return 0; @@ -185,7 +185,7 @@ reader (void *) static void * writer (void *) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" (%t) writer starting\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) writer starting\n"))); // We use a random pause, around 2msec with 1msec jittering. int usecs = 1000 + ACE_OS::rand() % 2000; @@ -201,11 +201,11 @@ writer (void *) if (current_writers > 1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) other writers found!!!\n"))); + ACE_TEXT (" (%t) other writers found!!!\n"))); if (current_readers > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) readers found!!!\n"))); + ACE_TEXT (" (%t) readers found!!!\n"))); ACE_thread_t self = ACE_Thread::self (); @@ -217,13 +217,13 @@ writer (void *) if (!ACE_OS::thr_equal (shared_data, self)) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) somebody wrote on my data %d\n"), + ACE_TEXT (" (%t) somebody wrote on my data %d\n"), shared_data)); } current_writers--; - ACE_DEBUG((LM_DEBUG, ASYS_TEXT (" (%t) write %d done at %T\n"), iterations)); + ACE_DEBUG((LM_DEBUG, ACE_TEXT (" (%t) write %d done at %T\n"), iterations)); } return 0; } @@ -245,9 +245,9 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. -int main (int argc, ASYS_TCHAR *argv[]) +int main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Reader_Writer_Test")); + ACE_START_TEST (ACE_TEXT ("Reader_Writer_Test")); #if defined (ACE_HAS_THREADS) parse_args (argc, argv); @@ -256,32 +256,32 @@ int main (int argc, ASYS_TCHAR *argv[]) current_writers = 0; // Possibly already done ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); if (ACE_Thread_Manager::instance ()->spawn_n (n_readers, ACE_THR_FUNC (reader), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); else if (ACE_Thread_Manager::instance ()->spawn_n (n_writers, ACE_THR_FUNC (writer), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Recursive_Mutex_Test.cpp b/tests/Recursive_Mutex_Test.cpp index 8bfc818a0e6..8cd882d53d5 100644 --- a/tests/Recursive_Mutex_Test.cpp +++ b/tests/Recursive_Mutex_Test.cpp @@ -47,7 +47,7 @@ recursive_worker (size_t nesting_level, { ACE_ASSERT (rm->acquire () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"), + ACE_TEXT ("(%P|%t) = acquired, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), rm->get_thread_id ())); @@ -56,7 +56,7 @@ recursive_worker (size_t nesting_level, ACE_ASSERT (rm->release () == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"), + ACE_TEXT ("(%P|%t) = released, nesting = %d, thread id = %u\n"), rm->get_nesting_level (), rm->get_thread_id ())); } @@ -75,9 +75,9 @@ worker (void *arg) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Recursive_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Recursive_Mutex_Test")); #if defined (ACE_HAS_THREADS) ACE_Recursive_Thread_Mutex rm; @@ -88,7 +88,7 @@ main (int, ASYS_TCHAR *[]) ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("ACE doesn't support recursive process mutexes on this platform\n"))); + ACE_TEXT ("ACE doesn't support recursive process mutexes on this platform\n"))); #endif /* ACE_WIN32 */ ACE_END_TEST; return 0; diff --git a/tests/Reverse_Lock_Test.cpp b/tests/Reverse_Lock_Test.cpp index 6fba4738452..2c88f545d1b 100644 --- a/tests/Reverse_Lock_Test.cpp +++ b/tests/Reverse_Lock_Test.cpp @@ -25,9 +25,9 @@ ACE_RCSID(tests, Reverse_Lock_Test, "$Id$") typedef ACE_Reverse_Lock<ACE_SYNCH_MUTEX> REVERSE_MUTEX; int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Reverse_Lock_Test")); + ACE_START_TEST (ACE_TEXT ("Reverse_Lock_Test")); ACE_SYNCH_MUTEX mutex; REVERSE_MUTEX reverse_mutex (mutex); diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp index 0b891511990..0a27717cf0f 100644 --- a/tests/SOCK_Connector_Test.cpp +++ b/tests/SOCK_Connector_Test.cpp @@ -30,14 +30,14 @@ ACE_RCSID(tests, SOCK_Connector_Test, "$Id$") // Attempt a blocking connection to it; if it succeeds, // then the host exists, is reachable, and is up. static u_int -host_is_up (ASYS_TCHAR hostname[]) +host_is_up (ACE_TCHAR hostname[]) { ACE_SOCK_Connector con; ACE_SOCK_Stream sock; // The ACE_INET_Addr construction causes gethostbyname_r // to be called, so we need to copy the hostname. - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; ACE_OS::strcpy (test_host, hostname); ACE_INET_Addr another_host ((u_short) 7, test_host); @@ -56,9 +56,9 @@ host_is_up (ASYS_TCHAR hostname[]) // one will do. static void -find_another_host (ASYS_TCHAR other_host[]) +find_another_host (ACE_TCHAR other_host[]) { - static ASYS_TCHAR cached_other_host[MAXHOSTNAMELEN] = {'\0'}; + static ACE_TCHAR cached_other_host[MAXHOSTNAMELEN] = {'\0'}; if (cached_other_host[0] == '\0') { @@ -122,7 +122,7 @@ find_another_host (ASYS_TCHAR other_host[]) static int fail_no_listener_nonblocking (void) { - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; int status; ACE_INET_Addr nobody_home; ACE_SOCK_Connector con; @@ -130,11 +130,11 @@ fail_no_listener_nonblocking (void) ACE_Time_Value nonblock (0, 0); find_another_host (test_host); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Testing to host \"%s\"\n"), test_host)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing to host \"%s\"\n"), test_host)); if (nobody_home.set ((u_short) 42000, test_host) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Host lookup for %s %p\n"), - test_host, ASYS_TEXT ("failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Host lookup for %s %p\n"), + test_host, ACE_TEXT ("failed"))); return -1; } @@ -155,22 +155,22 @@ fail_no_listener_nonblocking (void) if (status != -1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Connect which should fail didn't\n"))); + ACE_TEXT ("Connect which should fail didn't\n"))); status = -1; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%p\n"), - ASYS_TEXT ("Proper fail"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%p\n"), + ACE_TEXT ("Proper fail"))); status = 0; } } else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Test not executed fully; ") - ASYS_TEXT ("expected EWOULDBLOCK, %p (%d)\n"), - ASYS_TEXT ("not"), errno)); + ACE_TEXT ("Test not executed fully; ") + ACE_TEXT ("expected EWOULDBLOCK, %p (%d)\n"), + ACE_TEXT ("not"), errno)); status = -1; } @@ -190,7 +190,7 @@ fail_no_listener_nonblocking (void) static int succeed_nonblocking (void) { - ASYS_TCHAR test_host[MAXHOSTNAMELEN]; + ACE_TCHAR test_host[MAXHOSTNAMELEN]; int status; ACE_INET_Addr echo_server; ACE_SOCK_Connector con; @@ -198,11 +198,11 @@ succeed_nonblocking (void) ACE_Time_Value nonblock (0, 0); find_another_host (test_host); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Testing to host \"%s\"\n"), test_host)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing to host \"%s\"\n"), test_host)); if (echo_server.set ((u_short) 7, test_host) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Host lookup for %s %p\n"), - test_host, ASYS_TEXT ("failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Host lookup for %s %p\n"), + test_host, ACE_TEXT ("failed"))); return -1; } status = con.connect (sock, echo_server, &nonblock); @@ -211,7 +211,7 @@ succeed_nonblocking (void) if (status == 0 || (status == -1 && errno != EWOULDBLOCK)) { ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("Immediate success/fail; test not completed\n"))); + ACE_TEXT ("Immediate success/fail; test not completed\n"))); status = 0; } else @@ -226,12 +226,12 @@ succeed_nonblocking (void) if (errno == ECONNREFUSED || errno == ENOTCONN) status = 0; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("%p\n"), - ASYS_TEXT("connect:complete"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT("%p\n"), + ACE_TEXT("connect:complete"))); } else ACE_DEBUG((LM_DEBUG, - ASYS_TEXT("Connect which should succeed, did\n"))); + ACE_TEXT("Connect which should succeed, did\n"))); } // Just in case. @@ -242,9 +242,9 @@ succeed_nonblocking (void) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Connector_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Connector_Test")); int status = 0; diff --git a/tests/SOCK_Send_Recv_Test.cpp b/tests/SOCK_Send_Recv_Test.cpp index 1d289038f19..18b5e87e6b0 100644 --- a/tests/SOCK_Send_Recv_Test.cpp +++ b/tests/SOCK_Send_Recv_Test.cpp @@ -49,7 +49,7 @@ client (void *arg) ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) Connecting to port %d\n"), + ACE_TEXT ("(%P|%t) Connecting to port %d\n"), server_addr.get_port_number())); // Initiate connection with server; don't wait forever @@ -58,14 +58,14 @@ client (void *arg) &timeout) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("connection failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("connection failed"))); Test_Result = 1; return 0; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) connected to %s\n"), + ACE_TEXT ("(%P|%t) connected to %s\n"), server_addr.get_host_name ())); //******************* TEST 1 ****************************** @@ -104,8 +104,8 @@ client (void *arg) if (len == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Test 1, sendv failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Test 1, sendv failed"))); Test_Result = 1; } else @@ -127,7 +127,8 @@ client (void *arg) if (len != 255) { ACE_ERROR ((LM_ERROR, - "(%P|%t) %p; len is %d, but should be 255!\n", len)); + ACE_TEXT ("(%P|%t) %p; len is %d, but should be 255!\n"), + len)); } ACE_ASSERT (len == 255); @@ -135,7 +136,7 @@ client (void *arg) if (buffer2[i] != buffer[i]) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Test 2, rcvd byte %d is %d, not %d\n"), + ACE_TEXT ("(%P|%t) Test 2, rcvd byte %d is %d, not %d\n"), i, buffer2[i], buffer[i])); Test_Result = 1; } @@ -160,14 +161,14 @@ server (void *arg) &timeout) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("accept"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("accept"))); Test_Result = 1; return 0; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); @@ -197,8 +198,8 @@ server (void *arg) if (len == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("Test 1, recvv failed"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Test 1, recvv failed"))); Test_Result = 1; } @@ -207,7 +208,7 @@ server (void *arg) if (buffer[i] != i) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) Test 1, rcvd byte %d is %d, not %d\n"), + ACE_TEXT ("(%P|%t) Test 1, rcvd byte %d is %d, not %d\n"), i, buffer[i], i)); @@ -245,12 +246,12 @@ spawn (void) if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("open"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("open"))); else { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) @@ -258,8 +259,8 @@ spawn (void) { case -1: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("fork failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("fork failed"))); /* NOTREACHED */ case 0: client (&server_addr); @@ -276,22 +277,22 @@ spawn (void) ACE_reinterpret_cast (void *, &peer_acceptor), THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), ACE_reinterpret_cast (void *, &server_addr), THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), + ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ @@ -300,9 +301,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Send_Recv_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Send_Recv_Test")); spawn (); diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp index 61629d61a34..20dd1b82bc7 100644 --- a/tests/SOCK_Test.cpp +++ b/tests/SOCK_Test.cpp @@ -38,7 +38,7 @@ client (void *arg) ACE_SOCK_Stream cli_stream; ACE_SOCK_Connector con; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting non-blocking connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting non-blocking connect\n"))); // Initiate timed, non-blocking connection with server. // Attempt a non-blocking connect to the server. @@ -46,43 +46,43 @@ client (void *arg) (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) { if (errno != EWOULDBLOCK) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("connection failed"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting timed connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting timed connect\n"))); // Check if non-blocking connection is in progress, // and wait up to ACE_DEFAULT_TIMEOUT seconds for it to complete. ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT); if (con.complete (cli_stream, &server_addr, &tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("connection failed")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("connection failed")), 0); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) connected to %s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) connected to %s\n"), server_addr.get_host_name ())); } if (cli_stream.disable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("disable"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("disable"))); // Send data to server (correctly handles "incomplete writes"). for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send_n (c, 1) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("send_n"))); // Explicitly close the writer-side of the connection. if (cli_stream.close_writer () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("close_writer"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close_writer"))); char buf[1]; // Wait for handshake with server. if (cli_stream.recv_n (buf, 1) != 1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("recv_n"))); // Close the connection completely. if (cli_stream.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"))); return 0; } @@ -93,7 +93,7 @@ server (void *arg) ACE_SOCK_Acceptor *peer_acceptor = (ACE_SOCK_Acceptor *) arg; if (peer_acceptor->enable (ACE_NONBLOCK) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("enable"))); // Keep these objects out here to prevent excessive constructor // calls... @@ -115,10 +115,10 @@ server (void *arg) ACE_ASSERT (tv == def_timeout); if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("select")), 0); else if (result == 0) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) select timed out, shutting down\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) select timed out, shutting down\n"))); return 0; } @@ -127,12 +127,12 @@ server (void *arg) while ((result = peer_acceptor->accept (new_stream, &cli_addr)) != -1) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) client %s connected from %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) client %s connected from %d\n"), cli_addr.get_host_name (), cli_addr.get_port_number ())); // Enable non-blocking I/O. if (new_stream.enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("enable")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("enable")), 0); handle_set.reset (); handle_set.set_bit (new_stream.get_handle ()); @@ -144,7 +144,7 @@ server (void *arg) if (ACE_OS::select (int (new_stream.get_handle ()) + 1, handle_set, 0, 0, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("select")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("select")), 0); while ((r_bytes = new_stream.recv (buf, 1)) > 0) { @@ -155,23 +155,23 @@ server (void *arg) if (r_bytes == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); + ACE_TEXT ("(%P|%t) reached end of input, connection closed by client\n"))); // Handshake back with client. if (new_stream.send_n ("", 1) != 1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("send_n"))); // Close endpoint. if (new_stream.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"))); return 0; } else if (r_bytes == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no input available, going back to reading\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) no input available, going back to reading\n"))); else - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("recv_n")), 0); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("recv_n")), 0); } } } @@ -179,9 +179,9 @@ server (void *arg) if (result == -1) { if (errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) no connections available, shutting down\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) no connections available, shutting down\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("accept"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("accept"))); } return 0; @@ -199,17 +199,17 @@ spawn (void) // Bind listener to any port and then find out what the port was. if (peer_acceptor.open (ACE_Addr::sap_any) == -1 || peer_acceptor.get_local_addr (server_addr) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n"), ASYS_TEXT ("open"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("open"))); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) starting server at port %d\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); #if !defined (ACE_LACKS_FORK) switch (ACE_OS::fork ("child")) { case -1: - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("fork failed"))); /* NOTREACHED */ case 0: client (&server_addr); @@ -222,16 +222,16 @@ spawn (void) #elif defined (ACE_HAS_THREADS) if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) &peer_acceptor, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) %p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n%a"), ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) only one thread may be run in a process on this platform\n%a"), 1)); #endif /* ACE_HAS_THREADS */ peer_acceptor.close (); @@ -239,9 +239,9 @@ spawn (void) } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SOCK_Test")); + ACE_START_TEST (ACE_TEXT ("SOCK_Test")); spawn (); diff --git a/tests/SPIPE_Test.cpp b/tests/SPIPE_Test.cpp index 9e0f08f67cc..d13e9fcdec8 100644 --- a/tests/SPIPE_Test.cpp +++ b/tests/SPIPE_Test.cpp @@ -33,26 +33,26 @@ ACE_RCSID(tests, SPIPE_Test, "$Id$") #if defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) // pipe name to use -static const char *PIPE_NAME = "ace_pipe_name"; +static const ACE_TCHAR *PIPE_NAME = ACE_TEXT ("ace_pipe_name"); static void * client (void *) { - const char *rendezvous = PIPE_NAME; + const ACE_TCHAR *rendezvous = PIPE_NAME; ACE_SPIPE_Stream cli_stream; ACE_SPIPE_Connector con; ACE_OS::sleep (10); - if (con.connect (cli_stream, ACE_SPIPE_Addr (ACE_WIDE_STRING (rendezvous))) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), rendezvous)); + if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), rendezvous)); for (char *c = ACE_ALPHABET; *c != '\0'; c++) if (cli_stream.send (c, 1) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("send_n"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("send_n"))); if (cli_stream.close () == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("close"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("close"))); #if !defined (ACE_WIN32) ACE_OS::exit (0); @@ -68,27 +68,27 @@ server (void *) char buf[BUFSIZ]; char *t = ACE_ALPHABET; - const char *rendezvous = PIPE_NAME; + const ACE_TCHAR *rendezvous = PIPE_NAME; // Initialize named pipe listener. - if (acceptor.open (ACE_SPIPE_Addr (ACE_WIDE_STRING (rendezvous))) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("open"))); + if (acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("waiting for connection\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for connection\n"))); // Accept a client connection if (acceptor.accept (new_stream, 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("accept"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("accept"))); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Accepted connection\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Accepted connection\n"))); while (new_stream.recv (buf, 1) > 0) { ACE_ASSERT (*t == buf[0]); t++; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("End of connection. Closing handle\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End of connection. Closing handle\n"))); new_stream.close (); acceptor.close (); return 0; @@ -96,16 +96,16 @@ server (void *) #endif /* ACE_HAS_STREAM_PIPES || ACE_WIN32 */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SPIPE_Test")); + ACE_START_TEST (ACE_TEXT ("SPIPE_Test")); #if defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) #if !defined (ACE_LACKS_FORK) switch (ACE_OS::fork ()) { case -1: - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("fork failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("fork failed"))); exit (-1); case 0: client (0); @@ -116,18 +116,18 @@ main (int, ASYS_TCHAR *[]) if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("thread create failed"))); if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n%a"), ASYS_TEXT ("thread create failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n%a"), ACE_TEXT ("thread create failed"))); ACE_Thread_Manager::instance ()->wait (); #endif /* !ACE_LACKS_EXEC */ #else ACE_DEBUG ((LM_INFO, - ASYS_TEXT ("SPIPE is not supported on this platform\n"))); + ACE_TEXT ("SPIPE is not supported on this platform\n"))); #endif /* ACE_HAS_STREAM_PIPES || ACE_WIN32 */ ACE_END_TEST; return 0; diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp index ff406b7b3e4..aec8364fa7e 100644 --- a/tests/SString_Test.cpp +++ b/tests/SString_Test.cpp @@ -24,9 +24,9 @@ ACE_RCSID(tests, SString_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SString_Test")); + ACE_START_TEST (ACE_TEXT ("SString_Test")); { ACE_CString s0 ("hello"); @@ -122,6 +122,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (s1.rfind ('l', 3) == 2); } +#if defined (ACE_HAS_WCHAR) { ACE_WString s0 ("hello"); ACE_WString s1 ("hello"); @@ -168,6 +169,7 @@ main (int, ASYS_TCHAR *[]) ACE_ASSERT (s1.rfind ('l') == 3); ACE_ASSERT (s1.rfind ('l', 3) == 2); } +#endif /* ACE_HAS_WCHAR */ ACE_END_TEST; return 0; diff --git a/tests/SV_Shared_Memory_Test.cpp b/tests/SV_Shared_Memory_Test.cpp index 91f6d41eab0..be9447150df 100644 --- a/tests/SV_Shared_Memory_Test.cpp +++ b/tests/SV_Shared_Memory_Test.cpp @@ -110,11 +110,11 @@ child (char *shm) while ((result = mutex.tryacquire ()) == -1) if (errno == EAGAIN) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P) spinning in child!\n"))); + ACE_TEXT ("(%P) spinning in child!\n"))); else { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P) child mutex.tryacquire"))); + ACE_TEXT ("(%P) child mutex.tryacquire"))); ACE_ASSERT (result != -1); } @@ -142,9 +142,9 @@ template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_SYSV_IPC */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("SV_Shared_Memory_Test")); + ACE_START_TEST (ACE_TEXT ("SV_Shared_Memory_Test")); #if defined (ACE_HAS_SYSV_IPC) && !defined (ACE_LACKS_FORK) && \ !defined(ACE_LACKS_SYSV_SHMEM) @@ -175,7 +175,7 @@ main (int, ASYS_TCHAR *[]) { case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P) fork failed\n")), + ACE_TEXT ("(%P) fork failed\n")), -1); /* NOTREACHED */ case 0: @@ -189,8 +189,8 @@ main (int, ASYS_TCHAR *[]) } #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("SYSV IPC, SYSV SHMEM, or fork ") - ASYS_TEXT ("are not supported on this platform\n"))); + ACE_TEXT ("SYSV IPC, SYSV SHMEM, or fork ") + ACE_TEXT ("are not supported on this platform\n"))); #endif /* ACE_HAS_SYSV_IPC */ ACE_END_TEST; return 0; diff --git a/tests/Semaphore_Test.cpp b/tests/Semaphore_Test.cpp index 5fcc651ece8..49cd5b7b382 100644 --- a/tests/Semaphore_Test.cpp +++ b/tests/Semaphore_Test.cpp @@ -85,9 +85,9 @@ test_timeout (void) if (msecs_diff > ACE_ALLOWED_SLACK) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Timed wait fails length test\n"))); + ACE_TEXT ("Timed wait fails length test\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Value: %d ms, actual %d ms\n"), + ACE_TEXT ("Value: %d ms, actual %d ms\n"), msecs_expected, msecs_waited)); status = -1; @@ -103,14 +103,14 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n"))); + ACE_TEXT ("usage: %n [-s n_release_count] [-w n_workers] [-n iteration_count]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("s:w:n:")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("s:w:n:")); int c; @@ -156,9 +156,9 @@ worker (void *) if (diff.msec () > ACE_ALLOWED_SLACK) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Acquire fails time reset test\n"))); + ACE_TEXT ("Acquire fails time reset test\n"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Diff btw now and returned time: %d ms\n"), + ACE_TEXT ("Diff btw now and returned time: %d ms\n"), diff.msec ())); test_result = 1; } @@ -184,9 +184,9 @@ worker (void *) // Test semaphore functionality. -int main (int argc, ASYS_TCHAR *argv[]) +int main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Semaphore_Test")); + ACE_START_TEST (ACE_TEXT ("Semaphore_Test")); #if defined (ACE_HAS_THREADS) parse_args (argc, argv); @@ -208,8 +208,8 @@ int main (int argc, ASYS_TCHAR *argv[]) 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("spawn_n")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); @@ -218,16 +218,16 @@ int main (int argc, ASYS_TCHAR *argv[]) size_t percent = (timeouts * 100) / (n_workers * n_iterations); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Worker threads timed out %d percent of the time\n"), + ACE_TEXT ("Worker threads timed out %d percent of the time\n"), percent)); # endif /* ACE_HAS_STHREADS && ACE_HAS_POSIX_SEM */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Semaphore Test successful\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Semaphore Test successful\n"))); #else ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("Threads not supported on this platform\n"))); + ACE_TEXT ("Threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return test_result; diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp index 80f86622ead..dfb72483a29 100644 --- a/tests/Service_Config_Test.cpp +++ b/tests/Service_Config_Test.cpp @@ -86,7 +86,7 @@ Test_Singleton::Test_Singleton (u_short variety) if (variety_ != current_++) { ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("ERROR: instance %u created out of order!\n"), + ACE_TEXT ("ERROR: instance %u created out of order!\n"), variety_)); ++error; } @@ -97,21 +97,21 @@ Test_Singleton::Test_Singleton (u_short variety) Test_Singleton::~Test_Singleton (void) { - /* ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Test_Singleton %u dtor\n"), variety_)); */ + /* ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test_Singleton %u dtor\n"), variety_)); */ if (variety_ != --current_) { ACE_OS::fprintf (stderr, - ASYS_TEXT ("ERROR: instance %u destroyed out of order!\n"), + ACE_TEXT ("ERROR: instance %u destroyed out of order!\n"), variety_); - /* ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("ERROR: instance %u destroyed out of order!\n"), + /* ACE_DEBUG ((LM_ERROR, ACE_TEXT ("ERROR: instance %u destroyed out of order!\n"), variety_)); */ ++error; } } static void -run_test (int argc, ASYS_TCHAR *argv[]) +run_test (int argc, ACE_TCHAR *argv[]) { // We need this scope to make sure that the destructor for the // <ACE_Service_Config> gets called. @@ -125,9 +125,9 @@ run_test (int argc, ASYS_TCHAR *argv[]) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Service_Config_Test")); + ACE_START_TEST (ACE_TEXT ("Service_Config_Test")); for (u_int i = 0; i < VARIETIES; ++i) { @@ -135,7 +135,7 @@ main (int argc, ASYS_TCHAR *argv[]) if (s == 0) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("instance () allocate failed!\n")), + ACE_TEXT ("instance () allocate failed!\n")), 1); } diff --git a/tests/Signal_Test.cpp b/tests/Signal_Test.cpp index d524ec4e2a9..05ebbc9e204 100644 --- a/tests/Signal_Test.cpp +++ b/tests/Signal_Test.cpp @@ -51,7 +51,7 @@ static int handle_signal (int signum) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) received signal %S\n"), + ACE_TEXT ("(%P|%t) received signal %S\n"), signum)); switch (signum) @@ -68,7 +68,7 @@ handle_signal (int signum) case SIGTERM: // Shut down our thread using <ACE_Thread_Manager::exit>. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) shutting down due to %S\n"), + ACE_TEXT ("(%P|%t) shutting down due to %S\n"), signum)); // Signal to the worker thread to shut down. @@ -83,7 +83,7 @@ handle_signal (int signum) // Shutdown the child. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) killing child pid %d \n"), + ACE_TEXT ("(%P|%t) killing child pid %d \n"), child_pid)); int result = ACE_OS::kill (child_pid, SIGTERM); @@ -94,13 +94,13 @@ handle_signal (int signum) /* NOTREACHED */ case -1: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("(%P|%t) %p\n"), "sigwait"), -1); /* NOTREACHED */ default: ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("(%P|%t) signal %S unexpected\n"), + ACE_TEXT ("(%P|%t) signal %S unexpected\n"), signum), -1); /* NOTREACHED */ @@ -130,11 +130,11 @@ synchronous_signal_handler (void *) if (handle_signal (ACE_OS::sigwait (sigset)) == -1) break; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) handled signal\n"))); + ACE_TEXT ("(%P|%t) handled signal\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) synchronous signal handler done\n"))); + ACE_TEXT ("(%P|%t) synchronous signal handler done\n"))); return 0; } @@ -181,7 +181,7 @@ worker_child (void *arg) if (shut_down > 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) we've been shutdown!\n"))); + ACE_TEXT ("(%P|%t) we've been shutdown!\n"))); break; } @@ -189,7 +189,7 @@ worker_child (void *arg) if ((i % 100) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sleeping for 2 seconds\n"))); + ACE_TEXT ("(%P|%t) sleeping for 2 seconds\n"))); ACE_OS::sleep (2); } @@ -197,15 +197,15 @@ worker_child (void *arg) if ((i % 1000) == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sending SIGHUP to parent process %d\n"), + ACE_TEXT ("(%P|%t) sending SIGHUP to parent process %d\n"), parent_pid)); int result = ACE_OS::kill (parent_pid, SIGHUP); if (result == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("kill"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("kill"))); ACE_ASSERT (result != -1); } } @@ -214,7 +214,7 @@ worker_child (void *arg) if (handle_signals_synchronously) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) sending SIGINT to ourselves\n"))); + ACE_TEXT ("(%P|%t) sending SIGINT to ourselves\n"))); // We need to do this to dislodge the signal handling thread if // it hasn't shut down on its own accord yet. int result = ACE_OS::kill (ACE_OS::getpid (), @@ -222,7 +222,7 @@ worker_child (void *arg) ACE_ASSERT (result != -1); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) finished running child\n"))); + ACE_TEXT ("(%P|%t) finished running child\n"))); return 0; } @@ -235,8 +235,8 @@ worker_parent (void *arg) ACE_reinterpret_cast (long, arg); ACE_Process_Options options; - ASYS_TCHAR *l_argv[3]; - ASYS_TCHAR pid_str[100]; + ACE_TCHAR *l_argv[3]; + ACE_TCHAR pid_str[100]; // Store the parent's process id so we can pass it to the child // portably. Also, pass the test number, as well. ACE_OS::sprintf (pid_str, @@ -246,12 +246,12 @@ worker_parent (void *arg) // We're going to create a new process that runs this program again, // so we need to indicate that it's the child. - LPCTSTR t = ASYS_TEXT (".") - ACE_DIRECTORY_SEPARATOR_STR - ASYS_TEXT ("Signal_Test") - ACE_PLATFORM_EXE_SUFFIX - ASYS_TEXT (" -c"); - l_argv[0] = ACE_const_cast (ASYS_TCHAR *, + const ACE_TCHAR *t = ACE_TEXT (".") + ACE_DIRECTORY_SEPARATOR_STR + ACE_TEXT ("Signal_Test") + ACE_PLATFORM_EXE_SUFFIX + ACE_TEXT (" -c"); + l_argv[0] = ACE_const_cast (ACE_TCHAR *, t); l_argv[1] = pid_str; l_argv[2] = 0; @@ -264,7 +264,7 @@ worker_parent (void *arg) child_pid = pm.spawn (options); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning child process %d\n"), + ACE_TEXT ("(%P|%t) spawning child process %d\n"), child_pid)); ACE_ASSERT (child_pid != -1); @@ -277,7 +277,7 @@ worker_parent (void *arg) // Wait for the child process to exit. pm.wait (&status); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) reaped child with status %d\n"), + ACE_TEXT ("(%P|%t) reaped child with status %d\n"), status)); } else @@ -286,14 +286,14 @@ worker_parent (void *arg) // Wait for a signal to arrive. if (ACE_OS::sigsuspend (0) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%P|%t) %p\n"), - ASYS_TEXT ("sigsuspend"))); + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("sigsuspend"))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) got signal!\n"))); + ACE_TEXT ("(%P|%t) got signal!\n"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) parent worker done\n"))); + ACE_TEXT ("(%P|%t) parent worker done\n"))); return 0; } @@ -315,7 +315,7 @@ run_test (ACE_THR_FUNC worker, ACE_Sig_Guard guard; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning worker thread\n"))); + ACE_TEXT ("(%P|%t) spawning worker thread\n"))); result = ACE_Thread_Manager::instance ()->spawn (worker, ACE_reinterpret_cast (void *, @@ -326,7 +326,7 @@ run_test (ACE_THR_FUNC worker, if (handle_signals_in_separate_thread) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) spawning signal handler thread\n"))); + ACE_TEXT ("(%P|%t) spawning signal handler thread\n"))); result = ACE_Thread_Manager::instance ()->spawn (synchronous_signal_handler, @@ -391,26 +391,26 @@ parse_args (int argc, char *argv[]) default: ACE_DEBUG ((LM_DEBUG, "(%P|%t) usage:\n" - ASYS_TEXT ("-i <iterations>\n") - ASYS_TEXT ("-c\n") - ASYS_TEXT ("-p <parent_pid>\n") - ASYS_TEXT ("-t <test_number>\n"))); + ACE_TEXT ("-i <iterations>\n") + ACE_TEXT ("-c\n") + ACE_TEXT ("-p <parent_pid>\n") + ACE_TEXT ("-t <test_number>\n"))); break; } } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { if (argc > 1) { - ACE_APPEND_LOG (ASYS_TEXT ("Signal_Test-child")); + ACE_APPEND_LOG (ACE_TEXT ("Signal_Test-child")); parse_args (argc, argv); if (test_number == 1) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 1: handle signals synchronously in separate thread\n"))); + ACE_TEXT ("(%P|%t) **** test 1: handle signals synchronously in separate thread\n"))); // First, handle signals synchronously in separate thread. run_test (worker_child, 1, 1); @@ -418,7 +418,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (test_number == 2) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); // Next, handle signals synchronously in this thread. run_test (worker_child, 0, 1); @@ -426,7 +426,7 @@ main (int argc, ASYS_TCHAR *argv[]) else if (test_number == 3) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); // Finally, handle signals asynchronously in this thread. run_test (worker_child, 0, 0); @@ -436,8 +436,8 @@ main (int argc, ASYS_TCHAR *argv[]) } else { - ACE_START_TEST (ASYS_TEXT ("Signal_Test")); - ACE_INIT_LOG (ASYS_TEXT ("Signal_Test-child")); + ACE_START_TEST (ACE_TEXT ("Signal_Test")); + ACE_INIT_LOG (ACE_TEXT ("Signal_Test-child")); // We need to get the process id here to work around "features" // of Linux threads... @@ -446,7 +446,7 @@ main (int argc, ASYS_TCHAR *argv[]) #if !defined (linux) // Linux threads don't support this use-case very well. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 1: handle signals synchronously in a separate thread\n"))); + ACE_TEXT ("(%P|%t) **** test 1: handle signals synchronously in a separate thread\n"))); test_number++; // Run the parent logic for the signal test, first by handling @@ -458,14 +458,14 @@ main (int argc, ASYS_TCHAR *argv[]) #endif /* linux */ ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 2: handle signals synchronously in this thread\n"))); test_number++; // And next by handling synchronously signals in this thread. run_test (worker_parent, 0L, 1L); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); + ACE_TEXT ("(%P|%t) **** test 3: handle signals asynchronously in this thread\n"))); test_number++; // And finally by handling asynchronously signals in this thread. @@ -478,11 +478,11 @@ main (int argc, ASYS_TCHAR *argv[]) #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Signal_Test")); + ACE_START_TEST (ACE_TEXT ("Signal_Test")); ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("The ACE_Process capability is not supported on this platform\n"))); + ACE_TEXT ("The ACE_Process capability is not supported on this platform\n"))); ACE_END_TEST; return 0; } diff --git a/tests/Sigset_Ops_Test.cpp b/tests/Sigset_Ops_Test.cpp index 884e3486e44..c64d1f06f2a 100644 --- a/tests/Sigset_Ops_Test.cpp +++ b/tests/Sigset_Ops_Test.cpp @@ -29,31 +29,31 @@ siglistset(sigset_t x, int *sigset) int empty = 1 ; int retv = 0 ; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Signal(s) in the set = %08x:\n "), x)) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Signal(s) in the set = %08x:\n "), x)) ; for (int i = 1; i < ACE_NSIG; i++) { if ((retv = ACE_OS::sigismember (&x, i)) > 0) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT (" %d"), i)) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" %d"), i)) ; empty = 0 ; } ACE_ASSERT ((sigset [i] ? retv > 0 : retv <= 0)) ; } if (empty) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Empty!!\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Empty!!\n\n"))) ; } else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n\n"))) ; } } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Sigset_Ops_Test")); + ACE_START_TEST (ACE_TEXT ("Sigset_Ops_Test")); #if defined (ACE_LACKS_SIGSET) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses ACE implementation of sigset*() functions.\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%n uses ACE implementation of sigset*() functions.\n\n"))) ; #else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("%n uses platform's native sigset*() functions.\n\n"))) ; + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%n uses platform's native sigset*() functions.\n\n"))) ; #endif sigset_t x ; // examined sigset @@ -107,11 +107,11 @@ main (int, ASYS_TCHAR *[]) // Now testing out of bound signal if (ACE_OS::sigismember (&x, ACE_NSIG) >= 0) { - ACE_ERROR((LM_ERROR, ASYS_TEXT ("Platform doesn't check for valid signal number.\n"))); + ACE_ERROR((LM_ERROR, ACE_TEXT ("Platform doesn't check for valid signal number.\n"))); status = 1; } else if (ACE_OS::last_error() != EINVAL) { - ACE_ERROR((LM_ERROR, ASYS_TEXT ("%p.\n"), ASYS_TEXT ("Expected status EINVAL; got"))); + ACE_ERROR((LM_ERROR, ACE_TEXT ("%p.\n"), ACE_TEXT ("Expected status EINVAL; got"))); status = 1; } @@ -120,7 +120,7 @@ main (int, ASYS_TCHAR *[]) // Currently, I can only think of passing a NULL ptr // If you know other situations that fall into this // catagory, please let me know. Thanks. - ACE_DEBUG ((LM_ERROR, ASYS_TEXT ("Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n"))) ; + ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Now testing invalid sigset. If your platform gets a \nsegmentation fault, then it doesn't check the error properly.\n"))) ; ACE_ASSERT (ACE_OS::sigfillset (NULL) < 0 && ACE_OS::last_error() == EFAULT) ; */ diff --git a/tests/Simple_Message_Block_Test.cpp b/tests/Simple_Message_Block_Test.cpp index 0a02186862e..1e17b86c3b1 100644 --- a/tests/Simple_Message_Block_Test.cpp +++ b/tests/Simple_Message_Block_Test.cpp @@ -26,9 +26,9 @@ ACE_RCSID(tests, Simple_Message_Block_Test, "$Id$") int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Simple_Message_Block_Test")); + ACE_START_TEST (ACE_TEXT ("Simple_Message_Block_Test")); { // Checks normal stack deletes. diff --git a/tests/Svc_Handler_Test.cpp b/tests/Svc_Handler_Test.cpp index 31c1f4a1eda..343be6d7a83 100644 --- a/tests/Svc_Handler_Test.cpp +++ b/tests/Svc_Handler_Test.cpp @@ -58,24 +58,24 @@ run_test (SVC_HANDLER &svc_handler, // Note that this is a buffered call! if (svc_handler.put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("put"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("final flush\n"))); + ACE_TEXT ("final flush\n"))); // Make sure to flush everything out before we exit. if (svc_handler.flush () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("flush"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("flush"))); } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Svc_Handler_Test")); + ACE_START_TEST (ACE_TEXT ("Svc_Handler_Test")); { size_t max_buffer_size = BUFSIZ; size_t iterations = 10; @@ -94,14 +94,14 @@ main (int argc, ASYS_TCHAR *argv[]) if (connector.connect (file_io, file) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("connect failed for %p\n"), + ACE_TEXT ("connect failed for %p\n"), file.get_path_name ()), 1); // Unlink this file right away so that it is automatically removed // when the process exits. else if (file_io.unlink () == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("unlink failed for %p\n"), + ACE_TEXT ("unlink failed for %p\n"), file.get_path_name ()), 1); diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 81e783b828d..c9a35869d11 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -77,7 +77,7 @@ cleanup (void *ptr) // core dump on LynxOS 2.5.0. ACE_UNUSED_ARG (ptr); #else /* ! ACE_HAS_PTHREADS_DRAFT4 */ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in cleanup, ptr = %x\n"), ptr)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in cleanup, ptr = %x\n"), ptr)); #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ operator delete (ptr); @@ -92,7 +92,7 @@ worker (void *c) // size as a long on all current ACE platforms. int count = (int) (long) c; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) worker, iterations = %d\n"), count)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) worker, iterations = %d\n"), count)); ACE_thread_key_t key = ACE_OS::NULL_key; int *ip = 0; @@ -102,43 +102,43 @@ worker (void *c) if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no keys available)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no keys available)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); return (void *) -1; } ACE_NEW_RETURN (ip, int, 0); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); for (int i = 0; i < count; i++) { if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no more keys)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); break; } ACE_NEW_RETURN (ip, int, 0); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 1, ") - ASYS_TEXT ("key = %d, ip = %x\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in worker at location 1, ") + ACE_TEXT ("key = %d, ip = %x\n"), key, ip)); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); if (ACE_Thread::getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::getspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::getspecific"))); if (ACE_Thread::setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); #if ! defined (ACE_HAS_PTHREADS_DRAFT4) // See comment in cleanup () above. @@ -146,8 +146,8 @@ worker (void *c) #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ if (ACE_Thread::keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::keyfree"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::keyfree"))); // Cause an error. ACE_OS::read (ACE_INVALID_HANDLE, 0, 0); @@ -180,8 +180,8 @@ worker (void *c) ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, output_lock, 0)); ACE_DEBUG ((LM_ERROR, - ASYS_TEXT ("use of ACE_TSS_Type_Adapter failed, value ") - ASYS_TEXT ("is %u, it should be 37!\n"), + ACE_TEXT ("use of ACE_TSS_Type_Adapter failed, value ") + ACE_TEXT ("is %u, it should be 37!\n"), (*u)->operator u_int ())); ++errors; } @@ -192,28 +192,28 @@ worker (void *c) if (ACE_Thread::keycreate (&key, cleanup) == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p (no more keys)\n"), - ASYS_TEXT ("ACE_Thread::keycreate"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p (no more keys)\n"), + ACE_TEXT ("ACE_Thread::keycreate"))); break; } ACE_NEW_RETURN (ip, int, 0); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) in worker at location 2, ") - ASYS_TEXT ("key = %d, ip = %x\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) in worker at location 2, ") + ACE_TEXT ("key = %d, ip = %x\n"), key, ip)); if (ACE_Thread::setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); if (ACE_Thread::getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::getspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::getspecific"))); if (ACE_Thread::setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::setspecific"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::setspecific"))); #if !defined (ACE_HAS_PTHREADS_DRAFT4) // See comment in cleanup () above. @@ -221,8 +221,8 @@ worker (void *c) #endif /* ! ACE_HAS_PTHREADS_DRAFT4 */ if (ACE_Thread::keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("ACE_Thread::keyfree"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("ACE_Thread::keyfree"))); #endif /* ! __Lynx__ || ACE_HAS_TSS_EMULATION */ } @@ -243,9 +243,9 @@ template class ACE_TSS<ACE_TSS_Type_Adapter<u_int> >; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("TSS_Test")); + ACE_START_TEST (ACE_TEXT ("TSS_Test")); #if defined (ACE_HAS_THREADS) Errno::allocate_lock (); @@ -269,7 +269,7 @@ main (int, ASYS_TCHAR *[]) (void *) ITERATIONS, THR_BOUND) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn_n")), 1); + ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n")), 1); ACE_Thread_Manager::instance ()->wait (); @@ -279,7 +279,7 @@ main (int, ASYS_TCHAR *[]) Errno::deallocate_lock (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads are not supported on this platform\n"))); + ACE_TEXT ("threads are not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp index 23e746b2bc9..af6ab9abdf4 100644 --- a/tests/Task_Test.cpp +++ b/tests/Task_Test.cpp @@ -63,7 +63,7 @@ Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, { // Create worker threads. if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("activate failed"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("activate failed"))); } void * @@ -71,7 +71,7 @@ My_Thread_Hook::start (ACE_THR_FUNC func, void *arg) { ACE_DEBUG ((LM_DEBUG, - "(%t) starting the thread!\n")); + ACE_TEXT ("(%t) starting the thread!\n"))); return (func) (arg); } @@ -86,7 +86,7 @@ Barrier_Task::svc (void) iterations++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d\n"), + ACE_TEXT ("(%t) in iteration %d\n"), iterations)); // Block until all other threads have waited, then continue. @@ -102,9 +102,9 @@ Barrier_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Task_Test")); + ACE_START_TEST (ACE_TEXT ("Task_Test")); #if defined (ACE_HAS_THREADS) // Set the thread hook! @@ -122,7 +122,7 @@ main (int, ASYS_TCHAR *[]) delete ACE_Thread_Hook::thread_hook (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp index ef71f96e00d..f06e3d45603 100644 --- a/tests/Thread_Manager_Test.cpp +++ b/tests/Thread_Manager_Test.cpp @@ -86,7 +86,7 @@ static void * worker (int iterations) { #if defined (VXWORKS) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) %s: stack size is %u\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) %s: stack size is %u\n"), ACE_OS::thr_self (), ACE_OS::thr_min_stack ())); #endif /* VXWORKS */ @@ -102,7 +102,7 @@ worker (int iterations) thread_start->wait (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) worker starting loop\n"))); + ACE_TEXT ("(%t) worker starting loop\n"))); for (int i = 0; i < iterations; i++) { @@ -112,14 +112,14 @@ worker (int iterations) if (been_signalled (t_id)) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) had received signal\n"))); + ACE_TEXT ("(%t) had received signal\n"))); // Only test for cancellation after we've been signaled, // to avoid race conditions for suspend() and resume(). if (thr_mgr->testcancel (ACE_Thread::self ()) != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) has been cancelled " + ACE_TEXT ("(%t) has been cancelled " "before iteration %d!\n"), i)); break; @@ -129,8 +129,8 @@ worker (int iterations) if (thr_mgr->testcancel (ACE_Thread::self ()) != 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) has been cancelled " - "before iteration %d!\n"), + ACE_TEXT ("(%t) has been cancelled ") + ACE_TEXT ("before iteration %d!\n"), i)); break; } @@ -148,9 +148,9 @@ static const int DEFAULT_ITERATIONS = 10000; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Manager_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Manager_Test")); int status = 0; #if defined (ACE_HAS_THREADS) @@ -200,7 +200,7 @@ main (int, ASYS_TCHAR *[]) char[32], -1); ACE_OS::sprintf (thread_name[i], - ASYS_TEXT ("thread%u"), + ACE_TEXT ("thread%u"), i); } else @@ -233,15 +233,15 @@ main (int, ASYS_TCHAR *[]) // Wait for 1 second and then suspend every thread in the group. ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) suspending group\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) suspending group\n"))); if (thr_mgr->suspend_grp (grp_id) == -1) { // Pthreads w/o UNIX 98 extensions doesn't support suspend/resume, // so it's allowed to ENOTSUP; anything else is a hard fail. ACE_ASSERT (errno == ENOTSUP); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT (" OK: suspend_grp isn't supported with ") - ASYS_TEXT ("Pthreads\n"))); + ACE_TEXT (" OK: suspend_grp isn't supported with ") + ACE_TEXT ("Pthreads\n"))); } // Wait for 1 more second and then resume every thread in the @@ -249,14 +249,14 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) resuming group\n"))); + ACE_TEXT ("(%t) resuming group\n"))); if (thr_mgr->resume_grp (grp_id) == -1) { ACE_ASSERT (errno == ENOTSUP); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" OK: resume_grp isn't supported with ") - ASYS_TEXT ("Pthreads\n"))); + ACE_TEXT (" OK: resume_grp isn't supported with ") + ACE_TEXT ("Pthreads\n"))); } // Wait for 1 more second and then send a SIGINT to every thread in @@ -264,7 +264,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) signaling group\n"))); + ACE_TEXT ("(%t) signaling group\n"))); #if defined (ACE_HAS_WTHREADS) thr_mgr->kill_grp (grp_id, @@ -287,7 +287,7 @@ main (int, ASYS_TCHAR *[]) ACE_OS::sleep (ACE_Time_Value (1)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) cancelling group\n"))); + ACE_TEXT ("(%t) cancelling group\n"))); ACE_ASSERT (thr_mgr->cancel_grp (grp_id) != -1); @@ -299,16 +299,16 @@ main (int, ASYS_TCHAR *[]) { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), ASYS_TEXT ("wait"))); + ACE_TEXT ("%p\n"), ACE_TEXT ("wait"))); status = -1; } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) main thread finished\n"))); + ACE_TEXT ("(%t) main thread finished\n"))); #if defined (VXWORKS) for (i = 0; i < n_threads - 1; ++i) @@ -328,7 +328,7 @@ main (int, ASYS_TCHAR *[]) #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/Thread_Mutex_Test.cpp b/tests/Thread_Mutex_Test.cpp index 24d6b5484cc..e847f34fae9 100644 --- a/tests/Thread_Mutex_Test.cpp +++ b/tests/Thread_Mutex_Test.cpp @@ -34,12 +34,12 @@ test (void *args) for (size_t i = 0; i < ACE_MAX_ITERATIONS / 2; i++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = trying to acquire on iteration %d\n"), + ACE_TEXT ("(%P|%t) = trying to acquire on iteration %d\n"), i)); int result = mutex->acquire (); ACE_ASSERT (result == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = acquired on iteration %d\n"), + ACE_TEXT ("(%P|%t) = acquired on iteration %d\n"), i)); // Sleep for a random amount of time between 0 and 2 seconds. @@ -50,7 +50,7 @@ test (void *args) result = mutex->release (); ACE_ASSERT (result == 0); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%P|%t) = released on iteration %d\n"), + ACE_TEXT ("(%P|%t) = released on iteration %d\n"), i)); } @@ -69,22 +69,22 @@ spawn (void) (void *) &mutex, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n%a"), - ASYS_TEXT ("thread create failed"))); + ACE_TEXT ("%p\n%a"), + ACE_TEXT ("thread create failed"))); // Wait for the threads to exit. ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ } int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Mutex_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Mutex_Test")); spawn (); diff --git a/tests/Thread_Pool_Reactor_Test.cpp b/tests/Thread_Pool_Reactor_Test.cpp index a1f7e5e8dbd..a56c3e05816 100644 --- a/tests/Thread_Pool_Reactor_Test.cpp +++ b/tests/Thread_Pool_Reactor_Test.cpp @@ -56,7 +56,7 @@ typedef ACE_Strategy_Acceptor <Request_Handler, ACE_SOCK_ACCEPTOR> ACCEPTOR; // Accepting end point. This is actually "localhost:10010", but some // platform couldn't resolve the name so we use the IP address // directly here. -static const ASYS_TCHAR *rendezvous = ASYS_TEXT ("127.0.0.1:10010"); +static const ACE_TCHAR *rendezvous = ACE_TEXT ("127.0.0.1:10010"); // Total number of server threads. static size_t svr_thrno = ACE_MAX_THREADS; @@ -81,9 +81,9 @@ static size_t cli_req_no = ACE_MAX_THREADS ACE_LOAD_FACTOR; static int req_delay = 50; static void -parse_arg (int argc, ASYS_TCHAR *argv[]) +parse_arg (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("r:s:c:d:i:n:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("r:s:c:d:i:n:")); int c; @@ -111,10 +111,10 @@ parse_arg (int argc, ASYS_TCHAR *argv[]) break; default: ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Usage: Thread_Pool_Reactor_Test [-r <hostname:port#>]") - ASYS_TEXT ("\t[-s <server thr#>] [-c <client thr#>] [-d <delay>]") - ASYS_TEXT ("\t[-i <client conn attempt#>]") - ASYS_TEXT ("[-n <client request# per conn>]\n"))); + ACE_TEXT ("Usage: Thread_Pool_Reactor_Test [-r <hostname:port#>]") + ACE_TEXT ("\t[-s <server thr#>] [-c <client thr#>] [-d <delay>]") + ACE_TEXT ("\t[-i <client conn attempt#>]") + ACE_TEXT ("[-n <client request# per conn>]\n"))); break; } } @@ -132,10 +132,10 @@ Request_Handler::Request_Handler (ACE_Thread_Manager *thr_mgr) int Request_Handler::handle_input (ACE_HANDLE fd) { - ASYS_TCHAR buffer[BUFSIZ]; - ASYS_TCHAR len = 0; + ACE_TCHAR buffer[BUFSIZ]; + ACE_TCHAR len = 0; ssize_t result = this->peer ().recv (&len, - sizeof (ASYS_TCHAR)); + sizeof (ACE_TCHAR)); if (result > 0 && this->peer ().recv_n (buffer, len) == len) @@ -143,17 +143,17 @@ Request_Handler::handle_input (ACE_HANDLE fd) ++this->nr_msgs_rcvd_; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svr input; fd: 0x%x; input: %s\n"), + ACE_TEXT ("(%t) svr input; fd: 0x%x; input: %s\n"), fd, buffer)); if (ACE_OS::strcmp (buffer, - ASYS_TEXT ("shutdown")) == 0) + ACE_TEXT ("shutdown")) == 0) ACE_Reactor::end_event_loop (); return 0; } else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Request_Handler: end handle input (0x%x)\n"), + ACE_TEXT ("(%t) Request_Handler: end handle input (0x%x)\n"), fd)); return -1; } @@ -162,12 +162,12 @@ int Request_Handler::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) svr close; fd: 0x%x, rcvd %d msgs\n"), + ACE_TEXT ("(%t) svr close; fd: 0x%x, rcvd %d msgs\n"), fd, this->nr_msgs_rcvd_)); if (this->nr_msgs_rcvd_ != cli_req_no) ACE_ERROR((LM_ERROR, - ASYS_TEXT ("(%t) Expected %d messages; got %d\n"), + ACE_TEXT ("(%t) Expected %d messages; got %d\n"), cli_req_no, this->nr_msgs_rcvd_)); this->destroy (); @@ -182,16 +182,16 @@ svr_worker (void *) while (!ACE_Reactor::event_loop_done ()) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) handling events ....\n"))); + ACE_TEXT ("(%t) handling events ....\n"))); if (ACE_Reactor::instance ()->handle_events () == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("Error handling events"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("Error handling events"))); } ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) I am done handling events. Bye, bye\n"))); + ACE_TEXT ("(%t) I am done handling events. Bye, bye\n"))); return 0; } @@ -203,30 +203,30 @@ cli_worker (void *arg) ACE_SOCK_Stream stream; ACE_SOCK_Connector connect; ACE_Time_Value delay (0, req_delay); - size_t len = * ACE_reinterpret_cast (ASYS_TCHAR *, arg); + size_t len = * ACE_reinterpret_cast (ACE_TCHAR *, arg); for (size_t i = 0 ; i < cli_conn_no; i++) { if (connect.connect (stream, addr) < 0) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("connect"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("connect"))); continue; } for (size_t j = 0; j < cli_req_no; j++) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) conn_worker handle 0x%x, req %d\n"), + ACE_TEXT ("(%t) conn_worker handle 0x%x, req %d\n"), stream.get_handle (), j+1)); if (stream.send_n (arg, - len + sizeof (ASYS_TCHAR)) == -1) + len + sizeof (ACE_TCHAR)) == -1) { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n"))); continue; } ACE_OS::sleep (delay); @@ -242,15 +242,15 @@ static void * worker (void *) { ACE_OS::sleep (3); - const ASYS_TCHAR *msg = ASYS_TEXT ("Message from Connection worker"); - ASYS_TCHAR buf [BUFSIZ]; - buf[0] = (ACE_OS::strlen (msg) + 1) * sizeof (ASYS_TCHAR); + const ACE_TCHAR *msg = ACE_TEXT ("Message from Connection worker"); + ACE_TCHAR buf [BUFSIZ]; + buf[0] = (ACE_OS::strlen (msg) + 1) * sizeof (ACE_TCHAR); ACE_OS::strcpy (&buf[1], msg); ACE_INET_Addr addr (rendezvous); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("(%t) Spawning %d client threads...\n"), + ACE_TEXT ("(%t) Spawning %d client threads...\n"), cli_thrno)); int grp = ACE_Thread_Manager::instance ()->spawn_n (cli_thrno, &cli_worker, @@ -260,25 +260,25 @@ worker (void *) ACE_Thread_Manager::instance ()->wait_grp (grp); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) Client threads done; shutting down...\n"))); + ACE_TEXT ("(%t) Client threads done; shutting down...\n"))); ACE_SOCK_Stream stream; ACE_SOCK_Connector connect; if (connect.connect (stream, addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p Error while connecting\n"), - ASYS_TEXT ("connect"))); + ACE_TEXT ("(%t) %p Error while connecting\n"), + ACE_TEXT ("connect"))); const char *sbuf = "\011shutdown"; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("shutdown stream handle = %x\n"), + ACE_TEXT ("shutdown stream handle = %x\n"), stream.get_handle ())); if (stream.send_n (sbuf, ACE_OS::strlen (sbuf) + 1) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p\n"), - ASYS_TEXT ("send_n"))); + ACE_TEXT ("(%t) %p\n"), + ACE_TEXT ("send_n"))); stream.close (); @@ -286,9 +286,9 @@ worker (void *) } int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); parse_arg (argc, argv); // Changed the default @@ -301,12 +301,12 @@ main (int argc, ASYS_TCHAR *argv[]) if (acceptor.open (accept_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("open")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("open")), 1); ACE_DEBUG((LM_DEBUG, - ASYS_TEXT ("(%t) Spawning %d server threads...\n"), + ACE_TEXT ("(%t) Spawning %d server threads...\n"), svr_thrno)); ACE_Thread_Manager::instance ()->spawn_n (svr_thrno, svr_worker); @@ -338,12 +338,12 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>; #else int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Reactor_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index 68fa98bab5b..0efeb6137dc 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -90,7 +90,7 @@ int Thread_Pool::close (u_long) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) worker thread closing down\n"))); + ACE_TEXT ("(%t) worker thread closing down\n"))); return 0; } @@ -129,8 +129,8 @@ Thread_Pool::svc (void) { // The queue has been deactivated, so let's bail out. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("queue deactivated, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("queue deactivated, exiting\n"), count, this->msg_queue ()->message_count ())); @@ -141,8 +141,8 @@ Thread_Pool::svc (void) if (length > 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("length = %d, text = \"%*s\"\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("length = %d, text = \"%*s\"\n"), count, this->msg_queue ()->message_count (), length, @@ -155,8 +155,8 @@ Thread_Pool::svc (void) if (length == 0) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) in iteration %d, queue len = %d, ") - ASYS_TEXT ("got \"empty\" message, exiting\n"), + ACE_TEXT ("(%t) in iteration %d, queue len = %d, ") + ACE_TEXT ("got \"empty\" message, exiting\n"), count, this->msg_queue ()->message_count ())); break; @@ -172,15 +172,15 @@ int Thread_Pool::open (void *) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) producer start, dumping the Thread_Pool\n"))); + ACE_TEXT ("(%t) producer start, dumping the Thread_Pool\n"))); this->dump (); // Create a pool of worker threads. if (this->activate (THR_NEW_LWP, this->n_threads_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("activate failed")), + ACE_TEXT ("%p\n"), + ACE_TEXT ("activate failed")), -1); return 0; } @@ -219,7 +219,8 @@ Thread_Pool::test_queue_deactivation_shutdown (void) if (manual) { ACE_DEBUG ((LM_DEBUG, - "(%t) enter a new message for the task pool...")); + ACE_TEXT ("(%t) enter a new message for ") + ACE_TEXT ("the task pool..."))); n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); @@ -246,13 +247,13 @@ Thread_Pool::test_queue_deactivation_shutdown (void) { // Send a normal message to the waiting threads and continue // producing. - mb->wr_ptr (n * sizeof (ASYS_TCHAR)); + mb->wr_ptr (n * sizeof (ACE_TCHAR)); // Pass the message to the Thread_Pool. if (this->put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } else { @@ -262,8 +263,8 @@ Thread_Pool::test_queue_deactivation_shutdown (void) mb->release (); // Deactivate the message queue and return. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) deactivating queue for %d threads, ") - ASYS_TEXT ("dump of task:\n"), + ACE_TEXT ("\n(%t) deactivating queue for %d threads, ") + ACE_TEXT ("dump of task:\n"), this->thr_count ())); this->dump (); @@ -308,7 +309,8 @@ Thread_Pool::test_empty_message_shutdown (void) if (manual) { ACE_DEBUG ((LM_DEBUG, - "(%t) enter a new message for the task pool...")); + ACE_TEXT ("(%t) enter a new message for ") + ACE_TEXT ("the task pool..."))); n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); @@ -335,20 +337,20 @@ Thread_Pool::test_empty_message_shutdown (void) { // Send a normal message to the waiting threads and continue // producing. - mb->wr_ptr (n * sizeof (ASYS_TCHAR)); + mb->wr_ptr (n * sizeof (ACE_TCHAR)); // Pass the message to the Thread_Pool. if (this->put (mb) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } else { // Send a shutdown message to the waiting threads and return. ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) sending shutdown message to %d threads, ") - ASYS_TEXT ("dump of task:\n"), + ACE_TEXT ("\n(%t) sending shutdown message to %d threads, ") + ACE_TEXT ("dump of task:\n"), this->thr_count ())); this->dump (); @@ -361,8 +363,8 @@ Thread_Pool::test_empty_message_shutdown (void) i--) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) end of input, ") - ASYS_TEXT ("enqueueing \"empty\" message %d\n"), + ACE_TEXT ("(%t) end of input, ") + ACE_TEXT ("enqueueing \"empty\" message %d\n"), i)); // Note the use of reference counting to avoid copying @@ -371,14 +373,14 @@ Thread_Pool::test_empty_message_shutdown (void) if (this->put (dup) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) %p\n"), - ASYS_TEXT ("put"))); + ACE_TEXT (" (%t) %p\n"), + ACE_TEXT ("put"))); } mb->release (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n(%t) end loop, dump of task:\n"))); + ACE_TEXT ("\n(%t) end loop, dump of task:\n"))); this->dump (); return 0; @@ -395,9 +397,9 @@ template class ACE_Lock_Adapter<ACE_Thread_Mutex>; #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Thread_Pool_Test")); + ACE_START_TEST (ACE_TEXT ("Thread_Pool_Test")); #if defined (ACE_HAS_THREADS) int n_threads = ACE_MAX_THREADS; @@ -406,11 +408,11 @@ main (int, ASYS_TCHAR *[]) Thread_Pool thread_pool (n_threads); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) running test with %d threads\n"), + ACE_TEXT ("(%t) running test with %d threads\n"), n_threads)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting empty message shutdown test\n"))); + ACE_TEXT ("(%t) starting empty message shutdown test\n"))); // Activate the task's thread pool, produce the messages that are, // produce the messages that are consumed by the threads in the @@ -420,7 +422,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); // Wait for all the threads to reach their exit point, at which // point the barrier in the destructor of the <ACE_Task> portion of // <Thread_Pool> will return. @@ -428,7 +430,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) starting queue deactivation shutdown test\n"))); + ACE_TEXT ("(%t) starting queue deactivation shutdown test\n"))); // Activate the task's thread pool, produce the messages that are // consumed by the threads in the thread pool, and demonstate how to @@ -437,7 +439,7 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) waiting for worker tasks to finish...\n"))); + ACE_TEXT ("(%t) waiting for worker tasks to finish...\n"))); // Wait for all the threads to reach their exit point, at which // point the barrier in the destructor of the <ACE_Task> portion of // <Thread_Pool> will return. @@ -445,10 +447,10 @@ main (int, ASYS_TCHAR *[]) return 1; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) all worker tasks destroyed, exiting test...\n"))); + ACE_TEXT ("(%t) all worker tasks destroyed, exiting test...\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index 84228df9573..46f10b82542 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -34,13 +34,13 @@ ACE_TEXT ("main") ACE_PLATFORM_EXE_SUFFIX \ ACE_TEXT (" -f ") ACE_PLATFORM int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Time_Service_Test")); + ACE_START_TEST (ACE_TEXT ("Time_Service_Test")); #if defined (ACE_LACKS_FORK) && !defined (ACE_WIN32) ACE_ERROR ((LM_INFO, - ASYS_TEXT ("fork is not supported on this platform\n"))); + ACE_TEXT ("fork is not supported on this platform\n"))); #else /* ! ACE_LACKS_FORK || ACE_WIN32 */ // Make sure that the backing store is not there. We need to make @@ -48,7 +48,7 @@ main (int, ASYS_TCHAR *[]) // the Clerk is not allowed to do a graceful shutdown. By cleaning // the backing store here, we are sure that we get a fresh start and // no garbage data from a possible aborted run - TCHAR backing_store[MAXPATHLEN + 1]; + ACE_TCHAR backing_store[MAXPATHLEN + 1]; #if defined (ACE_DEFAULT_BACKING_STORE) // Create a temporary file. @@ -59,8 +59,8 @@ main (int, ASYS_TCHAR *[]) MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX { ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("Temporary path too long, ") - ASYS_TEXT ("defaulting to current directory\n"))); + ACE_TEXT ("Temporary path too long, ") + ACE_TEXT ("defaulting to current directory\n"))); backing_store[0] = 0; } @@ -72,45 +72,45 @@ main (int, ASYS_TCHAR *[]) ACE_OS::unlink (backing_store); - LPCTSTR server_cl = APPLICATION ACE_TEXT ("server.conf"); + const ACE_TCHAR *server_cl = APPLICATION ACE_TEXT ("server.conf"); ACE_Process_Options server_options; server_options.command_line (server_cl); ACE_Process server; if (server.spawn (server_options) == -1) ACE_ERROR_RETURN ((LM_DEBUG, - ASYS_TEXT ("%n; %p (%s).\n"), - ASYS_TEXT ("Server fork failed"), + ACE_TEXT ("%n; %p (%s).\n"), + ACE_TEXT ("Server fork failed"), server_cl), -1); else ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Server forked with pid = %d.\n"), + ACE_TEXT ("Server forked with pid = %d.\n"), server.getpid ())); ACE_OS::sleep (3); - LPCTSTR clerk_cl = APPLICATION ACE_TEXT ("clerk.conf"); + const ACE_TCHAR *clerk_cl = APPLICATION ACE_TEXT ("clerk.conf"); ACE_Process_Options clerk_options; clerk_options.command_line (clerk_cl); ACE_Process clerk; if (clerk.spawn (clerk_options) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%n; %p: (%s).\n"), - ASYS_TEXT ("Clerk fork failed"), clerk_cl), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%n; %p: (%s).\n"), + ACE_TEXT ("Clerk fork failed"), clerk_cl), -1); else - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Clerk forked with pid = %d.\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Clerk forked with pid = %d.\n"), clerk.getpid ())); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Sleeping...\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sleeping...\n"))); ACE_OS::sleep (10); if (clerk.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Terminate failed for clerk.\n")), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Terminate failed for clerk.\n")), -1); if (server.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Terminate failed for server.\n")), + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Terminate failed for server.\n")), -1); // Because we kill the clerk process, on Win32 it may not do a diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp index b1b6f396dc8..15e828257fc 100644 --- a/tests/Time_Value_Test.cpp +++ b/tests/Time_Value_Test.cpp @@ -51,7 +51,7 @@ ACE_RCSID(tests, Time_Value_Test, "$Id$") #if defined (sun) && !defined (ACE_LACKS_LONGLONG_T) static u_long -check_ace_u_longlong (const ASYS_TCHAR *const name, +check_ace_u_longlong (const ACE_TCHAR *const name, const ACE_U_LongLong ull, const u_long hi, const u_long lo) @@ -60,8 +60,8 @@ check_ace_u_longlong (const ASYS_TCHAR *const name, return 0; else ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%s; hi: %x, should be %x; ") - ASYS_TEXT ("lo: %x, should be %x.\n"), + ACE_TEXT ("%s; hi: %x, should be %x; ") + ACE_TEXT ("lo: %x, should be %x.\n"), name, ull.hi (), hi, ull.lo (), lo), 1); } @@ -73,101 +73,101 @@ test_ace_u_longlong (void) u_long errors = 0; ACE_U_LongLong ull1 (0x21,1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull1"), ull1, 1, 0x21); + errors += check_ace_u_longlong (ACE_TEXT ("ull1"), ull1, 1, 0x21); ACE_U_LongLong ull2 (0x20,2); - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); ull2 -= ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 0, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 0, 0xfffffffful); ull2 += ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull2"), ull2, 2, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); ACE_U_LongLong ull3 = ull1 + ull1; - errors += check_ace_u_longlong (ASYS_TEXT ("ull3"), ull3, 2, 0x42); + errors += check_ace_u_longlong (ACE_TEXT ("ull3"), ull3, 2, 0x42); ACE_U_LongLong ull4 = ACE_U_LongLong (0x1111, 0) - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful); ACE_U_LongLong ull5 = ACE_U_LongLong (0x1111, 1) - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 0, 0xfffffffful); + errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 0, 0xfffffffful); ++ull5; - errors += check_ace_u_longlong (ASYS_TEXT ("ull5"), ull5, 1, 0); + errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 1, 0); ACE_U_LongLong ull6 = ull2 + ACE_U_LongLong (0, 1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 3, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 3, 0x20); ull6 += ACE_U_LongLong (0xffffffff, 0xfff0); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x1f); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x1f); ++ull6; - errors += check_ace_u_longlong (ASYS_TEXT ("ull6"), ull6, 0xfff4, 0x20); + errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x20); // The hi part of ull6 will be lost in the following, because // the quotient has only 32 bits. - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 1"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 1"), (ACE_U_LongLong) (ull6 / 1u), 0, 0x20); // There's apparently a small loss in precision in // ACE_U_LongLong::operator/. It calculates // ull6 / 0xd0000 as 0x13b013b4 instead of 0x13b04ec4. - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 / 0x10000 / 0xd"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 0x10000 / 0xd"), (ACE_U_LongLong) (ull6 / 0x10000u / 0xd), 0, 0x13b04ec4); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 5"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 5"), (ACE_U_LongLong) (ull6 % 5), 0, 1); - errors += check_ace_u_longlong (ASYS_TEXT ("ull6 % 0x20007"), + errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 0x20007"), (ACE_U_LongLong) (ull6 % 0x20007), 0, 0x3f63); ACE_U_LongLong ull7 (12); ull7 *= 3125; - errors += check_ace_u_longlong (ASYS_TEXT ("12 * 3125"), + errors += check_ace_u_longlong (ACE_TEXT ("12 * 3125"), ull7, 0, 37500); ull7 *= 100; - errors += check_ace_u_longlong (ASYS_TEXT ("37500 * 100"), + errors += check_ace_u_longlong (ACE_TEXT ("37500 * 100"), ull7, 0, 3750000); - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 << 16"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 << 16"), ull7 << 16 , 0x39, 0x38700000); - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 >> 16"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 >> 16"), ull7 >> 16, 0, 0x39); ull7 <<= 32; - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32"), ull7, 3750000, 0); ull7 >>= 12; - errors += check_ace_u_longlong (ASYS_TEXT ("3750000 <<= 32 >>= 15"), + errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32 >>= 15"), ull7, 0x393, 0x87000000); ACE_U_LongLong ull8 (0x0f0f, 0xf0f0); ACE_U_LongLong ull9 (0xf0f0, 0xf0f0); ull8 |= ull9; - errors += check_ace_u_longlong (ASYS_TEXT ("ull8 |= ull9"), + errors += check_ace_u_longlong (ACE_TEXT ("ull8 |= ull9"), ull8, 0xf0f0, 0xffff); ull9.lo (0x5678); ull9.hi (0x1234); ull8 &= ull9; - errors += check_ace_u_longlong (ASYS_TEXT ("ull8 &= 0x12345678"), + errors += check_ace_u_longlong (ACE_TEXT ("ull8 &= 0x12345678"), ull9, 0x1234, 0x5678); @@ -177,11 +177,11 @@ test_ace_u_longlong (void) int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { int ret = 0; - ACE_START_TEST (ASYS_TEXT ("Time_Value_Test")); + ACE_START_TEST (ACE_TEXT ("Time_Value_Test")); ACE_Time_Value tv1; ACE_Time_Value tv2 (2); diff --git a/tests/Timeprobe_Test.cpp b/tests/Timeprobe_Test.cpp index 9fb2ab7a77d..ec30b4af233 100644 --- a/tests/Timeprobe_Test.cpp +++ b/tests/Timeprobe_Test.cpp @@ -96,9 +96,9 @@ int static_singleton_creator = create_singleton (); #endif /* ! ACE_HAS_PURIFY */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Timeprobe_Test")); + ACE_START_TEST (ACE_TEXT ("Timeprobe_Test")); ACE_TIMEPROBE ("Starting Test"); diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp index dfaa41b605f..5b6ca9903f8 100644 --- a/tests/Timer_Queue_Test.cpp +++ b/tests/Timer_Queue_Test.cpp @@ -192,7 +192,7 @@ test_functionality (ACE_Timer_Queue *tq) static void test_performance (ACE_Timer_Queue *tq, - const ASYS_TCHAR *test_name) + const ACE_TCHAR *test_name) { Example_Handler eh; ACE_Profile_Timer timer; @@ -228,13 +228,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to schedule %d timers for %s\n"), + ACE_TEXT ("time to schedule %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to cancel all the timers. @@ -251,13 +251,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to cancel %d timers for %s\n"), + ACE_TEXT ("time to cancel %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to schedule and expire all the @@ -288,13 +288,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to schedule and expire %d timers for %s\n"), + ACE_TEXT ("time to schedule and expire %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to randomly cancel all the @@ -328,16 +328,16 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to randomly cancel %d timers for %s\n"), + ACE_TEXT ("time to randomly cancel %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to randomly schedule all the timers. @@ -364,15 +364,15 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to randomly schedule %d timers for %s\n"), + ACE_TEXT ("time to randomly schedule %d timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); // Test the amount of time required to cancel all the timers. @@ -394,13 +394,13 @@ test_performance (ACE_Timer_Queue *tq, timer.elapsed_time (et); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time to expire %d randomly scheduled timers for %s\n"), + ACE_TEXT ("time to expire %d randomly scheduled timers for %s\n"), max_iterations, test_name)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), + ACE_TEXT ("real time = %f secs, user time = %f secs, system time = %f secs\n"), et.real_time, et.user_time, et.system_time)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("time per call = %f usecs\n"), + ACE_TEXT ("time per call = %f usecs\n"), (et.user_time / ACE_timer_t (max_iterations)) * 1000000)); delete [] times; @@ -416,7 +416,7 @@ class Timer_Queue_Stack public: // = Initialization method Timer_Queue_Stack (ACE_Timer_Queue *queue, - const ASYS_TCHAR *name, + const ACE_TCHAR *name, Timer_Queue_Stack *next = NULL) : queue_ (queue), name_ (name), @@ -427,7 +427,7 @@ public: ACE_Timer_Queue *queue_; // Pointer to the subclass of <ACE_Timer_Queue> that we're testing. - const ASYS_TCHAR *name_; + const ACE_TCHAR *name_; // Name of the Queue that we're testing. Timer_Queue_Stack *next_; @@ -435,9 +435,9 @@ public: }; int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Timer_Queue_Test")); + ACE_START_TEST (ACE_TEXT ("Timer_Queue_Test")); ACE_OS::srand (ACE_OS::time (0L)); @@ -454,28 +454,28 @@ main (int argc, ASYS_TCHAR *argv[]) // Timer_Hash (Heap) ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Hash_Heap, - ASYS_TEXT ("ACE_Timer_Hash (Heap)"), + ACE_TEXT ("ACE_Timer_Hash (Heap)"), tq_stack), -1); // Timer_Hash ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Hash, - ASYS_TEXT ("ACE_Timer_Hash"), + ACE_TEXT ("ACE_Timer_Hash"), tq_stack), -1); // Timer_stack ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_List, - ASYS_TEXT ("ACE_Timer_List"), + ACE_TEXT ("ACE_Timer_List"), tq_stack), -1); // Timer_Wheel without preallocated memory ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Wheel, - ASYS_TEXT ("ACE_Timer_Wheel (non-preallocated)"), + ACE_TEXT ("ACE_Timer_Wheel (non-preallocated)"), tq_stack), -1); @@ -484,20 +484,20 @@ main (int argc, ASYS_TCHAR *argv[]) Timer_Queue_Stack (new ACE_Timer_Wheel (ACE_DEFAULT_TIMER_WHEEL_SIZE, ACE_DEFAULT_TIMER_WHEEL_RESOLUTION, max_iterations), - ASYS_TEXT ("ACE_Timer_Wheel (preallocated)"), + ACE_TEXT ("ACE_Timer_Wheel (preallocated)"), tq_stack), -1); // Timer_Heap without preallocated memory. ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Heap, - ASYS_TEXT ("ACE_Timer_Heap (non-preallocated)"), + ACE_TEXT ("ACE_Timer_Heap (non-preallocated)"), tq_stack), -1); // Timer_Heap with preallocate memory. ACE_NEW_RETURN (tq_stack, Timer_Queue_Stack (new ACE_Timer_Heap (max_iterations, 1), - ASYS_TEXT ("ACE_Timer_Heap (preallocated)"), + ACE_TEXT ("ACE_Timer_Heap (preallocated)"), tq_stack), -1); @@ -511,7 +511,7 @@ main (int argc, ASYS_TCHAR *argv[]) while (tq_ptr != NULL) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("**** starting test of %s\n"), + ACE_TEXT ("**** starting test of %s\n"), tq_ptr->name_)); test_functionality (tq_ptr->queue_); test_performance (tq_ptr->queue_, diff --git a/tests/TkReactor_Test.cpp b/tests/TkReactor_Test.cpp index e4c2576400a..45f37469a2c 100644 --- a/tests/TkReactor_Test.cpp +++ b/tests/TkReactor_Test.cpp @@ -33,7 +33,7 @@ ACE_RCSID(tests, TkReactor_Test, "$Id$") int main (int, char*[]) { - ACE_START_TEST (ASYS_TEXT ("TkReactor_Test")); + ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); ACE_ERROR ((LM_ERROR, "Tk not supported on this platform\n")); @@ -267,7 +267,7 @@ init (Tcl_Interp *interp) int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("TkReactor_Test")); + ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); tcl_interp = Tcl_CreateInterp (); diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp index 528932d7cb0..30113586aac 100644 --- a/tests/Tokens_Test.cpp +++ b/tests/Tokens_Test.cpp @@ -40,7 +40,7 @@ ACE_RCSID(tests, Tokens_Test, "$Id$") typedef ACE_Token_Invariant_Manager TOKEN_INVARIANTS; -static const ASYS_TCHAR *server_host = ACE_DEFAULT_SERVER_HOST; +static const ACE_TCHAR *server_host = ACE_DEFAULT_SERVER_HOST; static const int server_port = 23456; // Synchronize starts of threads, so that they all start before one @@ -54,7 +54,7 @@ struct Test_Params public: ACE_Token_Proxy *token1_; ACE_Token_Proxy *token2_; - const ASYS_TCHAR *collection_name_; + const ACE_TCHAR *collection_name_; }; static void * @@ -65,7 +65,7 @@ run_thread (void *vp) collection.insert (*(tp->token1_)); collection.insert (*(tp->token2_)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) new thread.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) new thread.\n"))); thread_start->wait (); int count = 50; @@ -75,19 +75,19 @@ run_thread (void *vp) { if (ACE_OS::last_error () == EDEADLK) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("deadlock detected in acquire"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("deadlock detected in acquire"))); continue; } ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("(%t) %p acquire failed\n"), - ASYS_TEXT ("run_thread"))); + ACE_TEXT ("(%t) %p acquire failed\n"), + ACE_TEXT ("run_thread"))); return (void *) -1; } ACE_ASSERT ((TOKEN_INVARIANTS::instance ()->acquired (tp->token1_) == 1) || (TOKEN_INVARIANTS::instance ()->acquired (tp->token2_) == 1)); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s acquired.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s acquired.\n"), collection.name ())); TOKEN_INVARIANTS::instance ()->releasing (tp->token1_); TOKEN_INVARIANTS::instance ()->releasing (tp->token2_); @@ -96,18 +96,18 @@ run_thread (void *vp) { if (ACE_OS::last_error () == EDEADLK) { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("deadlock detected"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("deadlock detected"))); goto deadlock; } - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p renew failed\n"), - ASYS_TEXT ("run_thread"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p renew failed\n"), + ACE_TEXT ("run_thread"))); return (void *) -1; } ACE_ASSERT (TOKEN_INVARIANTS::instance ()->acquired (tp->token1_) == 1 || TOKEN_INVARIANTS::instance ()->acquired (tp->token2_) == 1); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s renewed.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s renewed.\n"), collection.name ())); deadlock: @@ -116,15 +116,15 @@ run_thread (void *vp) if (collection.release () == -1) { - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("(%t) %p release failed\n"),ASYS_TEXT ("run_thread"))); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %p release failed\n"),ACE_TEXT ("run_thread"))); return (void *) -1; } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) %s released.\n"), collection.name ())); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %s released.\n"), collection.name ())); } - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) thread finished.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) thread finished.\n"))); return 0; } @@ -140,15 +140,15 @@ run_test (ACE_Token_Proxy *A, // tp1 and tp2 can run concurrently. Neither tp1 or tp3 can run // when tp2 is running. - tp1.collection_name_ = ASYS_TEXT ("A and Reader"); + tp1.collection_name_ = ACE_TEXT ("A and Reader"); tp1.token1_ = A; tp1.token2_ = R; - tp2.collection_name_ = ASYS_TEXT ("A and Writer"); + tp2.collection_name_ = ACE_TEXT ("A and Writer"); tp2.token1_ = A; tp2.token2_ = W; - tp3.collection_name_ = ASYS_TEXT ("B and Reader"); + tp3.collection_name_ = ACE_TEXT ("B and Reader"); tp3.token1_ = B; tp3.token2_ = R; @@ -157,40 +157,40 @@ run_test (ACE_Token_Proxy *A, if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp1, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 1 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 1 failed")), -1); if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp2, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 2 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 2 failed")), -1); if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp3, THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn 3 failed")), -1); + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn 3 failed")), -1); // Wait for all threads to exit. mgr->wait (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Test finished.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Test finished.\n"))); return 0; } #endif /* ACE_HAS_THREADS */ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("Tokens_Test")); + ACE_START_TEST (ACE_TEXT ("Tokens_Test")); #if defined (ACE_HAS_THREADS) ACE_Token_Proxy *A = 0, *B = 0, *R = 0, *W = 0; - ACE_NEW_RETURN (A, ACE_Local_Mutex (ASYS_TEXT ("L Mutex A"), 0, 0), -1); - ACE_NEW_RETURN (B, ACE_Local_Mutex (ASYS_TEXT ("L Mutex B"), 0, 0), -1); - ACE_NEW_RETURN (R, ACE_Local_RLock (ASYS_TEXT ("L Reader Lock"), 0, 0), -1); - ACE_NEW_RETURN (W, ACE_Local_WLock (ASYS_TEXT ("L Writer Lock"), 0, 0), -1); + ACE_NEW_RETURN (A, ACE_Local_Mutex (ACE_TEXT ("L Mutex A"), 0, 0), -1); + ACE_NEW_RETURN (B, ACE_Local_Mutex (ACE_TEXT ("L Mutex B"), 0, 0), -1); + ACE_NEW_RETURN (R, ACE_Local_RLock (ACE_TEXT ("L Reader Lock"), 0, 0), -1); + ACE_NEW_RETURN (W, ACE_Local_WLock (ACE_TEXT ("L Writer Lock"), 0, 0), -1); ACE_NEW_RETURN (thread_start, ACE_Barrier (3), -1); run_test (A, B, R, W); - LPCTSTR cl = + const ACE_TCHAR * cl = ACE_TEXT ("..") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("netsvcs") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("servers") ACE_DIRECTORY_SEPARATOR_STR @@ -201,23 +201,23 @@ main (int, ASYS_TCHAR *[]) ACE_Process_Options options; options.command_line (cl); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Forking Token Service.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Forking Token Service.\n"))); // Start up the token server for the remote test. ACE_Process new_process; if (new_process.spawn (options) == -1) - ACE_ERROR ((LM_DEBUG, ASYS_TEXT ("%n; %p (%s), will not run remote test.\n"), - ASYS_TEXT ("Server fork failed"), cl)); + ACE_ERROR ((LM_DEBUG, ACE_TEXT ("%n; %p (%s), will not run remote test.\n"), + ACE_TEXT ("Server fork failed"), cl)); else { - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("Server forked with pid = %d.\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Server forked with pid = %d.\n"), new_process.getpid ())); // Wait for the server to start. ACE_OS::sleep (3); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Using Token Server on %s at port %d.\n"), + ACE_TEXT ("Using Token Server on %s at port %d.\n"), server_host, server_port)); ACE_Remote_Mutex::set_server_address (ACE_INET_Addr (server_port, server_host)); @@ -227,10 +227,10 @@ main (int, ASYS_TCHAR *[]) delete R; delete W; - ACE_NEW_RETURN (A, ACE_Remote_Mutex (ASYS_TEXT ("R Mutex A"), 0, 1), -1); - ACE_NEW_RETURN (B, ACE_Remote_Mutex (ASYS_TEXT ("R Mutex B"), 0, 1), -1); - ACE_NEW_RETURN (R, ACE_Remote_RLock (ASYS_TEXT ("R Reader Lock"), 0, 1), -1); - ACE_NEW_RETURN (W, ACE_Remote_WLock (ASYS_TEXT ("R Writer Lock"), 0, 1), -1); + ACE_NEW_RETURN (A, ACE_Remote_Mutex (ACE_TEXT ("R Mutex A"), 0, 1), -1); + ACE_NEW_RETURN (B, ACE_Remote_Mutex (ACE_TEXT ("R Mutex B"), 0, 1), -1); + ACE_NEW_RETURN (R, ACE_Remote_RLock (ACE_TEXT ("R Reader Lock"), 0, 1), -1); + ACE_NEW_RETURN (W, ACE_Remote_WLock (ACE_TEXT ("R Writer Lock"), 0, 1), -1); run_test (A, B, R, W); @@ -239,7 +239,7 @@ main (int, ASYS_TCHAR *[]) // Kill the token server. if (new_process.terminate () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("Kill failed.\n")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Kill failed.\n")), -1); } delete thread_start; @@ -249,10 +249,10 @@ main (int, ASYS_TCHAR *[]) delete R; delete W; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) main thread exiting.\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) main thread exiting.\n"))); #else ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; return 0; diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp index 7e2d2397d7e..a6e6ae999c0 100644 --- a/tests/UPIPE_SAP_Test.cpp +++ b/tests/UPIPE_SAP_Test.cpp @@ -42,11 +42,11 @@ connector (void *) ACE_OS::sleep (5); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector starting connect\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector starting connect\n"))); ACE_UPIPE_Connector con; if (con.connect (c_stream, addr) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector ACE_UPIPE_Connector failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector ACE_UPIPE_Connector failed\n"))); ACE_Message_Block *mb; @@ -55,10 +55,10 @@ connector (void *) mb->copy ("hello"); if (c_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) error connector send\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) error connector send\n"))); if (c_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) error connector recv\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) error connector recv\n"))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), "thanks") == 0); @@ -68,10 +68,10 @@ connector (void *) // Now try the send()/recv() interface. char mytext[] = "This string is sent by connector as a buffer"; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) connector sending text\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) connector sending text\n"))); if (c_stream.send (mytext, sizeof (mytext)) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) buffer send from connector failed\n"))); + ACE_TEXT ("(%t) buffer send from connector failed\n"))); char conbuf[BUFSIZ]; // Buffer to receive response. @@ -81,17 +81,17 @@ connector (void *) { if (c_stream.recv (&c, 1) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) buffer recv from connector failed\n"))); + ACE_TEXT ("(%t) buffer recv from connector failed\n"))); else conbuf[i] = c; } conbuf[i] = '\0'; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) conbuf = %s\n"), conbuf)); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) conbuf = %s\n"), conbuf)); ACE_ASSERT (ACE_OS::strcmp (conbuf, "this is the acceptor response!") == 0); c_stream.close (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) exiting thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) exiting thread\n"))); return 0; } @@ -103,12 +103,12 @@ acceptor (void *args) if (acceptor->accept (s_stream) == -1) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%t) ACE_UPIPE_Acceptor.accept failed\n"))); + ACE_TEXT ("(%t) ACE_UPIPE_Acceptor.accept failed\n"))); ACE_Message_Block *mb = 0; if (s_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor recv failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor recv failed\n"))); ACE_ASSERT (ACE_OS::strcmp (mb->rd_ptr (), "hello") == 0); @@ -116,13 +116,13 @@ acceptor (void *args) mb->copy ("thanks"); if (s_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor send failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor send failed\n"))); char s_buf[BUFSIZ]; - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor sleeping on recv\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor sleeping on recv\n"))); if (s_stream.recv (s_buf, sizeof (s_buf)) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor recv failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor recv failed\n"))); else ACE_ASSERT (ACE_OS::strcmp (s_buf, "This string is sent by connector as a buffer") == 0); @@ -131,18 +131,18 @@ acceptor (void *args) ACE_OS::strcpy (s_buf, svr_response); if (s_stream.send (s_buf, sizeof (svr_response)) == -1) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) acceptor send failed\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acceptor send failed\n"))); s_stream.close (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) exiting thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) exiting thread\n"))); return 0; } #endif /* ACE_HAS_THREADS && defined ACE_HAS_STREAM_PIPES || (ACE_WIN32&&NT4)*/ int -main (int, ASYS_TCHAR *[]) +main (int, ACE_TCHAR *[]) { - ACE_START_TEST (ASYS_TEXT ("UPIPE_SAP_Test")); + ACE_START_TEST (ACE_TEXT ("UPIPE_SAP_Test")); #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || \ (defined (ACE_WIN32) && \ @@ -155,17 +155,17 @@ main (int, ASYS_TCHAR *[]) (void *) &acc, THR_NEW_LWP, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), 1); // Spawn a connector thread. if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (connector), (void *) 0, THR_NEW_LWP, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("spawn")), 1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn")), 1); ACE_Thread_Manager::instance ()->wait (); - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%t) joined with acceptor thread\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) joined with acceptor thread\n"))); // Close the acceptor acc.close (); @@ -173,9 +173,9 @@ main (int, ASYS_TCHAR *[]) #else #if !defined (ACE_HAS_THREADS) - ACE_ERROR ((LM_INFO, ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_ERROR ((LM_INFO, ACE_TEXT ("threads not supported on this platform\n"))); #else - ACE_ERROR ((LM_INFO, ASYS_TEXT ("UPIPE is not supported on this platform\n"))); + ACE_ERROR ((LM_INFO, ACE_TEXT ("UPIPE is not supported on this platform\n"))); #endif /* !defined (ACE_HAS_THREADS) */ #endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_STREAM_PIPES) || defined (ACE_WIN32) && NT4) */ diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp index bc1e4193218..27b68c2b5c2 100644 --- a/tests/Upgradable_RW_Test.cpp +++ b/tests/Upgradable_RW_Test.cpp @@ -105,16 +105,16 @@ static void print_usage_and_die (void) { ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("usage: %n [-r n_readers] [-w n_writers]\n") - ASYS_TEXT (" [-e max_entries] [-u try update] ") - ASYS_TEXT ("[-n iteration_count] [-f for FIFO threads]\n"))); + ACE_TEXT ("usage: %n [-r n_readers] [-w n_writers]\n") + ACE_TEXT (" [-e max_entries] [-u try update] ") + ACE_TEXT ("[-n iteration_count] [-f for FIFO threads]\n"))); ACE_OS::exit (1); } static void -parse_args (int argc, ASYS_TCHAR *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, ASYS_TEXT ("e:fr:w:n:u")); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("e:fr:w:n:u")); int c; @@ -205,7 +205,7 @@ Reader_Task::svc (void) } else if (result == -1 && errno != EBUSY) ACE_ERROR ((LM_ERROR, - ASYS_TEXT (" (%t) failure in upgrading to write lock!\n"), + ACE_TEXT (" (%t) failure in upgrading to write lock!\n"), 1)); } @@ -290,23 +290,23 @@ Time_Calculation ::print_stats (void) double tmp = 1000 / elapsed_time.real_time; ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("\n") - ASYS_TEXT ("\treal_time\t = %0.06f ms, \n") - ASYS_TEXT ("\tuser_time\t = %0.06f ms, \n") - ASYS_TEXT ("\tsystem_time\t = %0.06f ms, \n") - ASYS_TEXT ("\t%0.00f calls/second\n"), + ACE_TEXT ("\n") + ACE_TEXT ("\treal_time\t = %0.06f ms, \n") + ACE_TEXT ("\tuser_time\t = %0.06f ms, \n") + ACE_TEXT ("\tsystem_time\t = %0.06f ms, \n") + ACE_TEXT ("\t%0.00f calls/second\n"), elapsed_time.real_time < 0.0 ? 0.0 : elapsed_time.real_time, elapsed_time.user_time < 0.0 ? 0.0 : elapsed_time.user_time, elapsed_time.system_time < 0.0 ? 0.0 : elapsed_time.system_time, tmp < 0.0 ? 0.0 : tmp)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of reported times: %d\n"), + ACE_TEXT ("Number of reported times: %d\n"), this->reported_times_)); } else ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("\tNo time stats printed. Zero iterations or error ocurred.\n"))); + ACE_TEXT ("\tNo time stats printed. Zero iterations or error ocurred.\n"))); } static int @@ -351,9 +351,9 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. int -main (int argc, ASYS_TCHAR *argv[]) +main (int argc, ACE_TCHAR *argv[]) { - ACE_START_TEST (ASYS_TEXT ("Upgradable_RW_Test")); + ACE_START_TEST (ACE_TEXT ("Upgradable_RW_Test")); int status = 0; #if defined (ACE_HAS_THREADS) @@ -369,7 +369,7 @@ main (int argc, ASYS_TCHAR *argv[]) init (); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) main thread starting\n"))); + ACE_TEXT (" (%t) main thread starting\n"))); Time_Calculation time_Calculation; // for the time calculation @@ -429,10 +429,10 @@ main (int argc, ASYS_TCHAR *argv[]) { if (errno == ETIME) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("maximum wait time of %d msec exceeded\n"), + ACE_TEXT ("maximum wait time of %d msec exceeded\n"), max_wait.msec ())); else - ACE_OS::perror ("wait"); + ACE_OS::perror (ACE_TEXT ("wait")); status = -1; } @@ -442,16 +442,16 @@ main (int argc, ASYS_TCHAR *argv[]) if (not_upgraded != 0 || upgraded != 0) ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("upgraded to not upgraded ratio = %f \n"), + ACE_TEXT ("upgraded to not upgraded ratio = %f \n"), (float) upgraded / (float) (not_upgraded + upgraded))); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Number of times, that find was called: %d\n"), + ACE_TEXT ("Number of times, that find was called: %d\n"), find_called)); ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT (" (%t) exiting main thread\n"))); + ACE_TEXT (" (%t) exiting main thread\n"))); // Delete the memory of the Double_Linked_List ACE_CString *cString_ptr; @@ -488,7 +488,7 @@ main (int argc, ASYS_TCHAR *argv[]) ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); ACE_ERROR ((LM_INFO, - ASYS_TEXT ("threads not supported on this platform\n"))); + ACE_TEXT ("threads not supported on this platform\n"))); #endif /* ACE_HAS_THREADS */ ACE_END_TEST; diff --git a/tests/XtReactor_Test.cpp b/tests/XtReactor_Test.cpp index 6660fe777cf..b29fcac9f2e 100644 --- a/tests/XtReactor_Test.cpp +++ b/tests/XtReactor_Test.cpp @@ -261,7 +261,7 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; int main (int argc, char *argv[]) { - ACE_START_TEST (ASYS_TEXT ("XtReactor_Test")); + ACE_START_TEST (ACE_TEXT ("XtReactor_Test")); #if defined (ACE_HAS_XT) XtAppContext app_context; diff --git a/tests/test_config.h b/tests/test_config.h index 2a63e9e36f7..f9ba817d022 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -43,52 +43,22 @@ #undef ACE_NDEBUG #if defined (ACE_HAS_WINCE) - -#define ACE_LOG_DIRECTORY_A "log\\" -#define MAKE_PIPE_NAME_A(X) "\\\\.\\pipe\\"#X - -#define ACE_LOG_DIRECTORY_W ASYS_TEXT (ACE_LOG_DIRECTORY_A) -#define MAKE_PIPE_NAME_W(X) ASYS_TEXT (MAKE_PIPE_NAME_A(X)) - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log\\") +# define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #elif defined (ACE_WIN32) - -#define ACE_LOG_DIRECTORY_A "log\\" -#define MAKE_PIPE_NAME_A(X) "\\\\.\\pipe\\"#X - -#define ACE_LOG_DIRECTORY_W L"log\\" -#define MAKE_PIPE_NAME_W(X) L"\\\\.\\pipe\\"#X - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log\\") +# define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #else - -#define ACE_LOG_DIRECTORY_A "log/" -#define MAKE_PIPE_NAME_A(X) X - -#if defined (ACE_HAS_UNICODE) -#define ACE_LOG_DIRECTORY_W L"log/" -#define MAKE_PIPE_NAME_W(X) L##X -#else -#define ACE_LOG_DIRECTORY_W "log/" -#define MAKE_PIPE_NAME_W(X) X -#endif /* ACE_HAS_UNICODE */ - +# define ACE_LOG_DIRECTORY ACE_TEXT ("log/") +# define MAKE_PIPE_NAME(X) ACE_TEXT (X) #endif /* ACE_WIN32 */ #if defined (ACE_HAS_WINCE) -#define ACE_LOG_FILE_EXT_NAME_A ".txt" -#define ACE_LOG_FILE_EXT_NAME_W ACE_TEXT (ACE_LOG_FILE_EXT_NAME_A) +#define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".txt") #else -#define ACE_LOG_FILE_EXT_NAME_W L".log" -#define ACE_LOG_FILE_EXT_NAME_A ".log" +#define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".log") #endif /* ACE_HAS_WINCE */ -#if defined (UNICODE) -#define ACE_LOG_DIRECTORY ACE_LOG_DIRECTORY_W -#define MAKE_PIPE_NAME MAKE_PIPE_NAME_W -#else -#define ACE_LOG_DIRECTORY ACE_LOG_DIRECTORY_A -#define MAKE_PIPE_NAME MAKE_PIPE_NAME_A -#endif /* UNICODE */ - #if defined (ACE_HAS_WINCE) || defined (ACE_HAS_PHARLAP) const size_t ACE_MAX_CLIENTS = 4; #else @@ -107,35 +77,35 @@ const size_t ACE_MAX_THREADS = 4; char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; #define ACE_START_TEST(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ if (ace_file_stream::instance()->set_output (program) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) #define ACE_END_TEST \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ ace_file_stream::instance()->close () #if !defined (ACE_WIN32) #define ACE_APPEND_LOG(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ ace_file_stream::instance()->close (); \ if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); #else /* ACE_WIN32 */ #define ACE_APPEND_LOG(NAME) \ - const ASYS_TCHAR *program = NAME; \ + const ACE_TCHAR *program = NAME; \ ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE); \ if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); #endif /* ACE_WIN32 */ #define ACE_END_LOG \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ ACE_LOG_MSG->set_flags(ACE_Log_Msg::SILENT); \ ace_file_stream::instance()->close (); @@ -143,12 +113,12 @@ char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; // This is the only way I could figure out to avoid an error // about attempting to unlink a non-existant file. #define ACE_INIT_LOG(NAME) \ - ASYS_TCHAR temp[MAXPATHLEN]; \ - ACE_OS::sprintf (temp, ASYS_TEXT ("%s%s%s"), \ - ASYS_TEXT (ACE_LOG_DIRECTORY_A), \ - ACE::basename (NAME, ASYS_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)), \ - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ + ACE_TCHAR temp[MAXPATHLEN]; \ + ACE_OS::sprintf (temp, ACE_TEXT ("%s%s%s"), \ + ACE_LOG_DIRECTORY, \ + ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \ + ACE_LOG_FILE_EXT_NAME); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ int fd_init_log; \ if ((fd_init_log = ACE_OS::open (temp, \ O_WRONLY | O_CREAT, 0x644)) != ERROR) \ @@ -164,12 +134,12 @@ char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz"; #endif /* ghs */ #else /* ! VXWORKS */ #define ACE_INIT_LOG(NAME) \ - ASYS_TCHAR temp[MAXPATHLEN]; \ - ACE_OS::sprintf (temp, ASYS_TEXT ("%s%s%s"), \ - ASYS_TEXT (ACE_LOG_DIRECTORY_A), \ - ACE::basename (NAME, ASYS_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A)), \ - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); \ - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ + ACE_TCHAR temp[MAXPATHLEN]; \ + ACE_OS::sprintf (temp, ACE_TEXT ("%s%s%s"), \ + ACE_LOG_DIRECTORY, \ + ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \ + ACE_LOG_FILE_EXT_NAME); \ + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \ ACE_OS::unlink (temp); #endif /* ! VXWORKS */ @@ -184,7 +154,7 @@ class ACE_Test_Output public: ACE_Test_Output (void); ~ACE_Test_Output (void); - int set_output (const ASYS_TCHAR *filename, int append = 0); + int set_output (const ACE_TCHAR *filename, int append = 0); OFSTREAM *output_file (void); void close (void); @@ -217,7 +187,7 @@ ACE_Test_Output::~ACE_Test_Output (void) } int -ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) +ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) { #if defined (ACE_HAS_PHARLAP) // For PharLap, just send it all to the host console for now - redirect @@ -226,23 +196,23 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) ACE_LOG_MSG->msg_ostream (&cout); #else - ASYS_TCHAR temp[MAXPATHLEN]; + ACE_TCHAR temp[MAXPATHLEN]; // Ignore the error value since the directory may already exist. - const ASYS_TCHAR *test_dir; + const ACE_TCHAR *test_dir; #if !defined (ACE_HAS_WINCE) - test_dir = ACE_OS::getenv (ASYS_TEXT ("ACE_TEST_DIR")); + test_dir = ACE_OS::getenv (ACE_TEXT ("ACE_TEST_DIR")); if (test_dir == 0) #endif /* ACE_HAS_WINCE */ - test_dir = ASYS_TEXT (""); + test_dir = ACE_TEXT (""); ACE_OS::sprintf (temp, - ASYS_TEXT ("%s%s%s%s"), + ACE_TEXT ("%s%s%s%s"), test_dir, - ASYS_TEXT (ACE_LOG_DIRECTORY_A), - ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR_A), - ASYS_TEXT (ACE_LOG_FILE_EXT_NAME_A)); + ACE_LOG_DIRECTORY, + ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR), + ACE_LOG_FILE_EXT_NAME); #if defined (VXWORKS) // This is the only way I could figure out to avoid a console @@ -260,20 +230,20 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) // directory does exist, it causes a wierd console error message // about "cat: input error on standard input: Is a directory". So, // VxWorks users must create the directory manually. - ACE_OS::mkdir (ASYS_TEXT (ACE_LOG_DIRECTORY_A)); + ACE_OS::mkdir (ACE_LOG_DIRECTORY); # endif /* ! VXWORKS */ # if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - this->output_file_->open (ASYS_ONLY_MULTIBYTE_STRING (temp), + this->output_file_->open (ACE_TEXT_ALWAYS_CHAR (temp), ios::out | (append ? ios::app : ios::trunc)); if (this->output_file_->bad ()) return -1; #else /* when ACE_LACKS_IOSTREAM_TOTALLY */ - ASYS_TCHAR *fmode = 0; + ACE_TCHAR *fmode = 0; if (append) - fmode = ASYS_TEXT ("a"); + fmode = ACE_TEXT ("a"); else - fmode = ASYS_TEXT ("w"); + fmode = ACE_TEXT ("w"); this->output_file_ = ACE_OS::fopen (temp, fmode); # endif /* ACE_LACKS_IOSTREAM_TOTALLY */ diff --git a/websvcs/lib/URL_Addr.cpp b/websvcs/lib/URL_Addr.cpp index c6dcf1b7017..43cd57389c2 100644 --- a/websvcs/lib/URL_Addr.cpp +++ b/websvcs/lib/URL_Addr.cpp @@ -9,37 +9,37 @@ ACE_RCSID(ace, URL_Addr, "$Id$") -static ASYS_TCHAR http[] = ASYS_TEXT ("http:"); +static ACE_TCHAR http[] = ACE_TEXT ("http:"); static size_t http_size = sizeof(http)/sizeof(http[0]) - 1; -static ASYS_TCHAR ftp[] = ASYS_TEXT ("ftp:"); +static ACE_TCHAR ftp[] = ACE_TEXT ("ftp:"); static size_t ftp_size = sizeof(ftp)/sizeof(ftp[0]) - 1; -static ASYS_TCHAR mailto[] = ASYS_TEXT ("mailto:"); +static ACE_TCHAR mailto[] = ACE_TEXT ("mailto:"); static size_t mailto_size = sizeof(mailto)/sizeof(mailto[0]) - 1; -static ASYS_TCHAR file[] = ASYS_TEXT ("file:"); +static ACE_TCHAR file[] = ACE_TEXT ("file:"); static size_t file_size = sizeof(file)/sizeof(file[0]) - 1; -static ASYS_TCHAR afs[] = ASYS_TEXT ("afs:"); +static ACE_TCHAR afs[] = ACE_TEXT ("afs:"); static size_t afs_size = sizeof(afs)/sizeof(afs[0]) - 1; -static ASYS_TCHAR news[] = ASYS_TEXT ("news:"); +static ACE_TCHAR news[] = ACE_TEXT ("news:"); static size_t news_size = sizeof(news)/sizeof(news[0]) - 1; -static ASYS_TCHAR nntp[] = ASYS_TEXT ("nntp:"); +static ACE_TCHAR nntp[] = ACE_TEXT ("nntp:"); static size_t nntp_size = sizeof(nntp)/sizeof(nntp[0]) - 1; -static ASYS_TCHAR cid[] = ASYS_TEXT ("cid:"); +static ACE_TCHAR cid[] = ACE_TEXT ("cid:"); static size_t cid_size = sizeof(cid)/sizeof(cid[0]) - 1; -static ASYS_TCHAR mid[] = ASYS_TEXT ("mid:"); +static ACE_TCHAR mid[] = ACE_TEXT ("mid:"); static size_t mid_size = sizeof(mid)/sizeof(mid[0]) - 1; -static ASYS_TCHAR wais[] = ASYS_TEXT ("wais:"); +static ACE_TCHAR wais[] = ACE_TEXT ("wais:"); static size_t wais_size = sizeof(wais)/sizeof(wais[0]) - 1; -static ASYS_TCHAR prospero[] = ASYS_TEXT ("prospero:"); +static ACE_TCHAR prospero[] = ACE_TEXT ("prospero:"); static size_t prospero_size = sizeof(prospero)/sizeof(prospero[0]) - 1; -static ASYS_TCHAR telnet[] = ASYS_TEXT ("telnet:"); +static ACE_TCHAR telnet[] = ACE_TEXT ("telnet:"); static size_t telnet_size = sizeof(telnet)/sizeof(telnet[0]) - 1; -static ASYS_TCHAR rlogin[] = ASYS_TEXT ("rlogin:"); +static ACE_TCHAR rlogin[] = ACE_TEXT ("rlogin:"); static size_t rlogin_size = sizeof(rlogin)/sizeof(rlogin[0]) - 1; -static ASYS_TCHAR tn3270[] = ASYS_TEXT ("tn3270:"); +static ACE_TCHAR tn3270[] = ACE_TEXT ("tn3270:"); static size_t tn3270_size = sizeof(tn3270)/sizeof(tn3270[0]) - 1; -static ASYS_TCHAR gopher[] = ASYS_TEXT ("gopher:"); +static ACE_TCHAR gopher[] = ACE_TEXT ("gopher:"); static size_t gopher_size = sizeof(gopher)/sizeof(gopher[0]) - 1; @@ -61,7 +61,7 @@ ACE_URL_Addr::set (const ACE_URL_Addr& address) } int -ACE_URL_Addr::string_to_addr (LPCTSTR address) +ACE_URL_Addr::string_to_addr (const ACE_TCHAR *address) { if (this->url_ != 0) ACE_OS::free (this->url_); @@ -72,7 +72,7 @@ ACE_URL_Addr::string_to_addr (LPCTSTR address) } int -ACE_URL_Addr::addr_to_string (LPTSTR s, +ACE_URL_Addr::addr_to_string (ACE_TCHAR *s, size_t size, int) const { @@ -90,7 +90,7 @@ ACE_URL_Addr::accept (ACE_URL_Addr_Visitor* visitor) // The factory method to create URL addresses. ACE_URL_Addr* -ACE_URL_Addr::create_address (LPCTSTR url) +ACE_URL_Addr::create_address (const ACE_TCHAR *url) { ACE_URL_Addr* addr = 0; if (ACE_OS::strncasecmp (http, url, http_size) == 0) @@ -111,7 +111,7 @@ ACE_URL_Addr::create_address (LPCTSTR url) } int -ACE_URL_Addr::known_scheme (LPCTSTR url) +ACE_URL_Addr::known_scheme (const ACE_TCHAR *url) { if (ACE_OS::strncasecmp (http, url, http_size) == 0) return 1; @@ -187,9 +187,9 @@ ACE_HTTP_Addr::ACE_HTTP_Addr (void) { } -ACE_HTTP_Addr::ACE_HTTP_Addr (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR query, +ACE_HTTP_Addr::ACE_HTTP_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *query, u_short port) : hostname_ (0), port_number_ (0), @@ -218,9 +218,9 @@ ACE_HTTP_Addr::~ACE_HTTP_Addr (void) } int -ACE_HTTP_Addr::set (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR query, +ACE_HTTP_Addr::set (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *query, u_short port) { if (host_name == 0 || path == 0) @@ -237,9 +237,9 @@ ACE_HTTP_Addr::set (LPCTSTR host_name, size_t size = this->url_size (1); - LPTSTR buffer; + ACE_TCHAR *buffer; ACE_ALLOCATOR_RETURN (buffer, - ACE_reinterpret_cast(LPTSTR, + ACE_reinterpret_cast(ACE_TCHAR *, ACE_OS::malloc (size)), -1); if (this->addr_to_string (buffer, size, 1) == -1) @@ -287,8 +287,8 @@ ACE_HTTP_Addr::url_size (int flags) const // Notice that we cannot hard-code the value because the size in // wchar's may be different. size_t size = - + sizeof (ASYS_TEXT ("http://")) - + sizeof (ASYS_TEXT ("/:?")); // separators + + sizeof (ACE_TEXT ("http://")) + + sizeof (ACE_TEXT ("/:?")); // separators size_t chars = + (this->path_?ACE_OS::strlen (this->path_):0) @@ -297,7 +297,7 @@ ACE_HTTP_Addr::url_size (int flags) const if (flags == 0) { - size += sizeof (ASYS_TEXT("255.255.255.255")); + size += sizeof (ACE_TEXT("255.255.255.255")); } else { @@ -306,25 +306,25 @@ ACE_HTTP_Addr::url_size (int flags) const if (this->port_number_ != ACE_DEFAULT_HTTP_PORT) { - size += sizeof (ASYS_TEXT(":65335")); + size += sizeof (ACE_TEXT(":65335")); } - size += chars * sizeof(ASYS_TCHAR); + size += chars * sizeof(ACE_TCHAR); return size; } inline int -path_copy (LPCTSTR begin, - LPCTSTR /* end */, - LPTSTR& target, - LPCTSTR src) +path_copy (const ACE_TCHAR *begin, + const ACE_TCHAR */* end */, + const ACE_TCHAR *& target, + const ACE_TCHAR *src) { // Copy one character at a time, if we find a /../ we go back to the // previous '/' for (; *src != 0; ++src) { - ASYS_TCHAR c = *src; + ACE_TCHAR c = *src; switch (c) { case '/': @@ -352,7 +352,7 @@ path_copy (LPCTSTR begin, } ACE_URL_Addr* -ACE_HTTP_Addr::create_relative_address (LPCTSTR url) const +ACE_HTTP_Addr::create_relative_address (const ACE_TCHAR *url) const { if (ACE_URL_Addr::known_scheme (url)) return ACE_URL_Addr::create_address (url); @@ -368,20 +368,20 @@ ACE_HTTP_Addr::create_relative_address (LPCTSTR url) const } else { - LPCTSTR path = this->get_path (); - LPTSTR buf; + const ACE_TCHAR *path = this->get_path (); + ACE_TCHAR *buf; size_t n = ACE_OS::strlen (url) + ACE_OS::strlen (path) + 2; ACE_NEW_RETURN (buf, - ASYS_TCHAR [n], + ACE_TCHAR [n], 0); // We copy the contens of <path> into <buf>; but simplifying the // path, to avoid infinite loop like: // "foo/../foo/../foo/../foo/../foo/index.html" // - LPTSTR target = buf; + ACE_TCHAR *target = buf; // Copy the path path_copy (buf, buf + n, target, path); @@ -389,7 +389,7 @@ ACE_HTTP_Addr::create_relative_address (LPCTSTR url) const if (url[0] == '#') { // Remove any # from the path - LPTSTR p = target; + ACE_TCHAR *p = target; while (p != buf && *(--p) != '#'); if (p != buf) target = p; @@ -432,7 +432,7 @@ ACE_HTTP_Addr::create_relative_address (LPCTSTR url) const } int -ACE_HTTP_Addr::string_to_addr (LPCTSTR address) +ACE_HTTP_Addr::string_to_addr (const ACE_TCHAR *address) { if (address == 0) return -1; @@ -449,20 +449,20 @@ ACE_HTTP_Addr::string_to_addr (LPCTSTR address) if (this->ACE_URL_Addr::string_to_addr (address) != 0) return -1; - LPCTSTR string = address; + ACE_TCHAR *string = address; string += http_size; string += 2; // == strlen ("//"); // Make a copy of the string to manipulate it. ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (string), -1); - ASYS_TCHAR *path_start = ACE_OS::strchr (this->hostname_, '/'); + ACE_TCHAR *path_start = ACE_OS::strchr (this->hostname_, '/'); if (path_start != 0) { // terminate the host:port substring path_start[0] = '\0'; path_start++; - ASYS_TCHAR *query_start = ACE_OS::strchr (path_start, '?'); + ACE_TCHAR *query_start = ACE_OS::strchr (path_start, '?'); if (query_start != 0) { query_start[0] = '\0'; @@ -476,7 +476,7 @@ ACE_HTTP_Addr::string_to_addr (LPCTSTR address) // By now t is null terminated at the start of the path, find the // port (if present). - ASYS_TCHAR *port_start = ACE_OS::strchr(this->hostname_, ':'); + ACE_TCHAR *port_start = ACE_OS::strchr(this->hostname_, ':'); this->port_number_ = ACE_DEFAULT_HTTP_PORT; if (port_start != 0) { @@ -490,7 +490,7 @@ ACE_HTTP_Addr::string_to_addr (LPCTSTR address) } int -ACE_HTTP_Addr::addr_to_string (LPTSTR buffer, +ACE_HTTP_Addr::addr_to_string (ACE_TCHAR *buffer, size_t size, int flags) const { @@ -501,7 +501,7 @@ ACE_HTTP_Addr::addr_to_string (LPTSTR buffer, return -1; size_t n = ACE_OS::sprintf (buffer, - ASYS_TEXT ("http://")); + ACE_TEXT ("http://")); if (flags == 0) { ACE_INET_Addr inet = this->get_inet_address (); @@ -543,10 +543,10 @@ ACE_FTP_Addr::ACE_FTP_Addr (void) { } -ACE_FTP_Addr::ACE_FTP_Addr (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR user, - LPCTSTR passwd) +ACE_FTP_Addr::ACE_FTP_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *user, + const ACE_TCHAR *passwd) : user_ (0), passwd_ (0), hostname_ (0), @@ -571,10 +571,10 @@ ACE_FTP_Addr::~ACE_FTP_Addr (void) } int -ACE_FTP_Addr::set (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR user, - LPCTSTR passwd) +ACE_FTP_Addr::set (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *user, + const ACE_TCHAR *passwd) { if (host_name == 0 || path == 0) return -1; @@ -592,9 +592,9 @@ ACE_FTP_Addr::set (LPCTSTR host_name, size_t size = this->url_size (1); - LPTSTR buffer; + ACE_TCHAR *buffer; ACE_ALLOCATOR_RETURN (buffer, - ACE_reinterpret_cast(LPTSTR, + ACE_reinterpret_cast(ACE_TCHAR *, ACE_OS::malloc (size)), -1); if (this->addr_to_string (buffer, size, 1) == -1) @@ -641,8 +641,8 @@ ACE_FTP_Addr::url_size (int flags) const // Notice that we cannot hard-code the value because the size in // wchar's may be different. size_t size = - + sizeof (ASYS_TEXT ("ftp://")) - + sizeof (ASYS_TEXT ("@:/")); // separators + + sizeof (ACE_TEXT ("ftp://")) + + sizeof (ACE_TEXT ("@:/")); // separators size_t chars = + (this->user_?ACE_OS::strlen (this->path_):0) @@ -651,19 +651,19 @@ ACE_FTP_Addr::url_size (int flags) const if (flags == 0) { - size += sizeof (ASYS_TEXT("255.255.255.255")); + size += sizeof (ACE_TEXT("255.255.255.255")); } else { chars += ACE_OS::strlen (this->hostname_); } - size += chars * sizeof(ASYS_TCHAR); + size += chars * sizeof(ACE_TCHAR); return size; } int -ACE_FTP_Addr::addr_to_string (LPTSTR buffer, +ACE_FTP_Addr::addr_to_string (ACE_TCHAR *buffer, size_t size, int flags) const { @@ -671,7 +671,7 @@ ACE_FTP_Addr::addr_to_string (LPTSTR buffer, return -1; size_t n = ACE_OS::sprintf (buffer, - ASYS_TEXT ("ftp://")); + ACE_TEXT ("ftp://")); if (this->user_ != 0) { @@ -704,7 +704,7 @@ ACE_FTP_Addr::addr_to_string (LPTSTR buffer, } int -ACE_FTP_Addr::string_to_addr (LPCTSTR address) +ACE_FTP_Addr::string_to_addr (const ACE_TCHAR *address) { if (address == 0) return -1; @@ -720,15 +720,15 @@ ACE_FTP_Addr::string_to_addr (LPCTSTR address) // Save the original URL.... this->ACE_URL_Addr::string_to_addr (address); - LPCTSTR string = address; + const ACE_TCHAR *string = address; string += ftp_size; string += 2; // == strlen ("//"); // Make a copy of the string to manipulate it. - ASYS_TCHAR *t; + ACE_TCHAR *t; ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (string), -1); - ASYS_TCHAR *path_start = ACE_OS::strchr (t, '/'); + ACE_TCHAR *path_start = ACE_OS::strchr (t, '/'); if (path_start != 0) { // terminate the host:port substring @@ -737,7 +737,7 @@ ACE_FTP_Addr::string_to_addr (LPCTSTR address) ACE_ALLOCATOR_RETURN (this->path_, ACE_OS::strdup (path_start), -1); } - ASYS_TCHAR *host_start = ACE_OS::strchr (t, '@'); + ACE_TCHAR *host_start = ACE_OS::strchr (t, '@'); if (host_start != 0) { host_start[0] = '\0'; @@ -745,7 +745,7 @@ ACE_FTP_Addr::string_to_addr (LPCTSTR address) ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (host_start), -1); - ASYS_TCHAR *pass_start = ACE_OS::strchr (t, ':'); + ACE_TCHAR *pass_start = ACE_OS::strchr (t, ':'); if (pass_start != 0) { pass_start[0] = '\0'; @@ -779,9 +779,9 @@ ACE_Mailto_Addr::ACE_Mailto_Addr (void) { } -ACE_Mailto_Addr::ACE_Mailto_Addr (LPCTSTR user, - LPCTSTR hostname, - LPCTSTR headers) +ACE_Mailto_Addr::ACE_Mailto_Addr (const ACE_TCHAR *user, + const ACE_TCHAR *hostname, + const ACE_TCHAR *headers) : user_ (0), hostname_ (0), headers_ (0) @@ -804,9 +804,9 @@ ACE_Mailto_Addr::~ACE_Mailto_Addr (void) } int -ACE_Mailto_Addr::set (LPCTSTR user, - LPCTSTR hostname, - LPCTSTR headers) +ACE_Mailto_Addr::set (const ACE_TCHAR *user, + const ACE_TCHAR *hostname, + const ACE_TCHAR *headers) { if (user == 0 || hostname == 0) return -1; @@ -818,9 +818,9 @@ ACE_Mailto_Addr::set (LPCTSTR user, else this->headers_ = 0; size_t size = this->url_size (1); - LPTSTR buffer; + ACE_TCHAR *buffer; ACE_ALLOCATOR_RETURN (buffer, - ACE_reinterpret_cast(LPTSTR, + ACE_reinterpret_cast(ACE_TCHAR *, ACE_OS::malloc (size)), -1); if (this->addr_to_string (buffer, size, 1) == -1) @@ -860,20 +860,20 @@ ACE_Mailto_Addr::url_size (int) const { // Notice that we cannot hard-code the value because the size in // wchar's may be different. - size_t size = sizeof (ASYS_TEXT ("mailto:")) - + sizeof (ASYS_TEXT ("@?")); // separators + size_t size = sizeof (ACE_TEXT ("mailto:")) + + sizeof (ACE_TEXT ("@?")); // separators size_t chars = + (this->user_?ACE_OS::strlen (this->user_):0) + (this->hostname_?ACE_OS::strlen (this->hostname_):0) + (this->headers_?ACE_OS::strlen (this->headers_):0); - size += chars * sizeof (ASYS_TCHAR); + size += chars * sizeof (ACE_TCHAR); return size; } int -ACE_Mailto_Addr::addr_to_string (LPTSTR buffer, +ACE_Mailto_Addr::addr_to_string (ACE_TCHAR *buffer, size_t size, int flags) const { @@ -882,11 +882,11 @@ ACE_Mailto_Addr::addr_to_string (LPTSTR buffer, if (this->user_ == 0 || this->hostname_ == 0) return -1; - size_t n = ACE_OS::sprintf (buffer, ASYS_TEXT ("mailto:%s@%s"), + size_t n = ACE_OS::sprintf (buffer, ACE_TEXT ("mailto:%s@%s"), this->user_, this->hostname_); if (this->headers_ != 0) { - n += ACE_OS::sprintf (buffer + n, ASYS_TEXT ("?%s"), + n += ACE_OS::sprintf (buffer + n, ACE_TEXT ("?%s"), this->headers_); } @@ -894,7 +894,7 @@ ACE_Mailto_Addr::addr_to_string (LPTSTR buffer, } int -ACE_Mailto_Addr::string_to_addr (LPCTSTR address) +ACE_Mailto_Addr::string_to_addr (const ACE_TCHAR *address) { if (ACE_OS::strncasecmp (mailto, address, mailto_size) != 0) return -1; @@ -908,20 +908,20 @@ ACE_Mailto_Addr::string_to_addr (LPCTSTR address) if (this->ACE_URL_Addr::string_to_addr (address) != 0) return -1; - LPCTSTR string = address; + const ACE_TCHAR *string = address; string += mailto_size; // Make a copy of the string to manipulate it. - ASYS_TCHAR *t; + ACE_TCHAR *t; ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (string), -1); - ASYS_TCHAR *host_start = ACE_OS::strchr (t, '@'); + ACE_TCHAR *host_start = ACE_OS::strchr (t, '@'); if (host_start != 0) { // terminate the host:port substring host_start[0] = '\0'; host_start++; - ASYS_TCHAR *headers_start = ACE_OS::strchr (host_start, '?'); + ACE_TCHAR *headers_start = ACE_OS::strchr (host_start, '?'); if (headers_start != 0) { headers_start[0] = '\0'; diff --git a/websvcs/lib/URL_Addr.h b/websvcs/lib/URL_Addr.h index 5dc89033da3..aae680512e8 100644 --- a/websvcs/lib/URL_Addr.h +++ b/websvcs/lib/URL_Addr.h @@ -48,18 +48,18 @@ public: virtual ~ACE_URL_Addr (void); // destructor - LPCTSTR get_url (void) const; + const ACE_TCHAR *get_url (void) const; // Get the original URL int set (const ACE_URL_Addr& address); // Essentially the copy contructor. - virtual int string_to_addr (LPCTSTR address); + virtual int string_to_addr (const ACE_TCHAR *address); // Initializes from the scheme specific address, for instance: if // the address is an http URL it will initialize the address from // an string such as "www.cs.wustl.edu/~schmidt" - virtual int addr_to_string (LPTSTR s, + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int flags = 0) const; // Write the address in the scheme specific representation. @@ -70,23 +70,23 @@ public: // The accept method in the Visitor Pattern. Should return 0 on // success and not 0 on failure. - static ACE_URL_Addr* create_address (LPCTSTR url); + static ACE_URL_Addr* create_address (const ACE_TCHAR *url); // Create an address from a complete URL, such as "http://www/foo" // or "ftp://ftp.here/get_this". - static int known_scheme (LPCTSTR url); + static int known_scheme (const ACE_TCHAR *url); // Returns 1 if the URL scheme is recognized, 0 otherwise. u_long hash (void) const; // Hash function protected: - void set_url (LPTSTR url); + void set_url (ACE_TCHAR *url); // Allows the derived classes to store the compact representation of // the URL private: - LPTSTR url_; + ACE_TCHAR *url_; }; class ACE_HTTP_Addr; @@ -156,15 +156,15 @@ public: ACE_HTTP_Addr (void); // Constructor - ACE_HTTP_Addr (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR query = 0, + ACE_HTTP_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *query = 0, u_short port = ACE_DEFAULT_HTTP_PORT); // Construct an HTTP URL from the host, path, query and port. - int set (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR query = 0, + int set (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *query = 0, u_short port = ACE_DEFAULT_HTTP_PORT); // Essentially the constructor above. @@ -186,19 +186,19 @@ public: // URL can be can be refering to an hostname that cannot be // validated at this point. - LPCTSTR get_hostname (void) const; + const ACE_TCHAR *get_hostname (void) const; // Get the name of the host. u_short get_port_number (void) const; // Get the port number. - LPCTSTR get_path (void) const; + const ACE_TCHAR *get_path (void) const; // Get the path component in the URL - LPCTSTR get_query (void) const; + const ACE_TCHAR *get_query (void) const; // Get the query component in the URL - ACE_URL_Addr* create_relative_address (LPCTSTR url) const; + ACE_URL_Addr* create_relative_address (const ACE_TCHAR *url) const; // Create an address from a (possibly) relative URL, such as // "../foo.html", or "/icons/bar.gif" // If the URL is absolute (like "http://www/foo" or "ftp:host/bar") @@ -210,8 +210,8 @@ public: // and port are used. // = The ACE_URL methods, see the documentation above. - virtual int string_to_addr (LPCTSTR address); - virtual int addr_to_string (LPTSTR s, + virtual int string_to_addr (const ACE_TCHAR *address); + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int flags = 0) const; virtual int accept (ACE_URL_Addr_Visitor* visitor); @@ -225,14 +225,14 @@ private: // Helper method to cleanup resources private: - LPTSTR hostname_; + ACE_TCHAR *hostname_; u_short port_number_; // The host:port component in the URL - LPTSTR path_; + ACE_TCHAR *path_; // The path component in the URL - LPTSTR query_; + ACE_TCHAR *query_; // The query component in the URL }; @@ -258,17 +258,17 @@ public: ACE_FTP_Addr (void); // Constructor - ACE_FTP_Addr (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR user = 0, - LPCTSTR passwd = 0); + ACE_FTP_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *user = 0, + const ACE_TCHAR *passwd = 0); // Construct an FTP URL from the host_name, the path, the username // and the passwd. - int set (LPCTSTR host_name, - LPCTSTR path, - LPCTSTR user = 0, - LPCTSTR passwd = 0); + int set (const ACE_TCHAR *host_name, + const ACE_TCHAR *path, + const ACE_TCHAR *user = 0, + const ACE_TCHAR *passwd = 0); // Essentially the constructor above. ACE_FTP_Addr (const ACE_FTP_Addr &addr); @@ -283,16 +283,16 @@ public: virtual ~ACE_FTP_Addr (void); // Destructor - LPCTSTR get_hostname (void) const; + const ACE_TCHAR *get_hostname (void) const; // Get the host name component in the URL - LPCTSTR get_user (void) const; + const ACE_TCHAR *get_user (void) const; // Get the username component in the URL - LPCTSTR get_passwd (void) const; + const ACE_TCHAR *get_passwd (void) const; // Get the passwd component in the URL - LPCTSTR get_path (void) const; + const ACE_TCHAR *get_path (void) const; // Get the path component in the URL ACE_INET_Addr get_inet_address (void) const; @@ -300,8 +300,8 @@ public: // obtain the host and the port. // = The ACE_Addr methods, see the documentation above. - virtual int string_to_addr (LPCTSTR address); - virtual int addr_to_string (LPTSTR s, + virtual int string_to_addr (const ACE_TCHAR *address); + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int flags = 0) const; virtual int accept (ACE_URL_Addr_Visitor* visitor); @@ -315,14 +315,14 @@ private: // Helper method to release the internal resources private: - LPTSTR user_; - LPTSTR passwd_; + ACE_TCHAR *user_; + ACE_TCHAR *passwd_; // The login name - LPTSTR hostname_; + ACE_TCHAR *hostname_; // The hostname part. - LPTSTR path_; + ACE_TCHAR *path_; // The other components. }; @@ -340,14 +340,14 @@ public: ACE_Mailto_Addr (void); // Constructor - ACE_Mailto_Addr (LPCTSTR user, - LPCTSTR hostname, - LPCTSTR headers = 0); + ACE_Mailto_Addr (const ACE_TCHAR *user, + const ACE_TCHAR *hostname, + const ACE_TCHAR *headers = 0); // Construct an FTP URL from the host, path and headers. - int set (LPCTSTR user, - LPCTSTR hostname, - LPCTSTR headers = 0); + int set (const ACE_TCHAR *user, + const ACE_TCHAR *hostname, + const ACE_TCHAR *headers = 0); // Essentially the constructor above. ACE_Mailto_Addr (const ACE_Mailto_Addr &addr); @@ -362,13 +362,13 @@ public: virtual ~ACE_Mailto_Addr (void); // Destructor - LPCTSTR get_user (void) const; + const ACE_TCHAR *get_user (void) const; // Get the username component in the URL - LPCTSTR get_hostname (void) const; + const ACE_TCHAR *get_hostname (void) const; // Get the hostname component in the URL - LPCTSTR get_headers (void) const; + const ACE_TCHAR *get_headers (void) const; // Get the headers as a single string // @@ TODO A mailto: URL can contain multiple headers, an iterator @@ -376,8 +376,8 @@ public: // headers would be nice also. // = The ACE_URL methods, see the documentation above. - virtual int string_to_addr (LPCTSTR address); - virtual int addr_to_string (LPTSTR s, + virtual int string_to_addr (const ACE_TCHAR *address); + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int flags = 0) const; virtual int accept (ACE_URL_Addr_Visitor* visitor); @@ -391,9 +391,9 @@ private: // Helper method to cleanup resources private: - LPTSTR user_; - LPTSTR hostname_; - LPTSTR headers_; + ACE_TCHAR *user_; + ACE_TCHAR *hostname_; + ACE_TCHAR *headers_; }; #if defined (__ACE_INLINE__) diff --git a/websvcs/lib/URL_Addr.i b/websvcs/lib/URL_Addr.i index fe07bdf5a59..be329668408 100644 --- a/websvcs/lib/URL_Addr.i +++ b/websvcs/lib/URL_Addr.i @@ -118,7 +118,7 @@ ACE_FTP_Addr::get_path (void) const ACE_INLINE ACE_INET_Addr ACE_FTP_Addr::get_inet_address (void) const { - return ACE_INET_Addr (ASYS_TEXT ("ftp"), this->hostname_); + return ACE_INET_Addr (ACE_TEXT ("ftp"), this->hostname_); } // **************************************************************** diff --git a/websvcs/tests/Test_URL_Addr.cpp b/websvcs/tests/Test_URL_Addr.cpp index 644f0ebd467..7490cc4cd59 100644 --- a/websvcs/tests/Test_URL_Addr.cpp +++ b/websvcs/tests/Test_URL_Addr.cpp @@ -19,34 +19,34 @@ int main (int, char*[]) } #define HTTP_TEST_ARRAY \ - ASYS_TEXT("http://www.cs.wustl.edu/"), \ - ASYS_TEXT("http://www.cs.wustl.edu/index.html"), \ - ASYS_TEXT("http://www.cs.wustl.edu/form?var=foo"), \ - ASYS_TEXT("http://www.notexist.com:8080/index.html"), \ - ASYS_TEXT("http://www.notexist.com:80/index.html"), \ - ASYS_TEXT("ftp://foo"), \ - ASYS_TEXT("http://www/?kkk//") + ACE_TEXT("http://www.cs.wustl.edu/"), \ + ACE_TEXT("http://www.cs.wustl.edu/index.html"), \ + ACE_TEXT("http://www.cs.wustl.edu/form?var=foo"), \ + ACE_TEXT("http://www.notexist.com:8080/index.html"), \ + ACE_TEXT("http://www.notexist.com:80/index.html"), \ + ACE_TEXT("ftp://foo"), \ + ACE_TEXT("http://www/?kkk//") #define FTP_TEST_ARRAY \ - ASYS_TEXT("ftp://www.cs.wustl.edu/"), \ - ASYS_TEXT("ftp://user@www.cs.wustl.edu/"), \ - ASYS_TEXT("ftp://user:pass@www.cs.wustl.edu/"), \ - ASYS_TEXT("ftp://user:pass@www.cs.wustl.edu/path"), \ - ASYS_TEXT("ftp://www.cs.wustl.edu"), \ - ASYS_TEXT("http://www.cs.wustl.edu/index.html") + ACE_TEXT("ftp://www.cs.wustl.edu/"), \ + ACE_TEXT("ftp://user@www.cs.wustl.edu/"), \ + ACE_TEXT("ftp://user:pass@www.cs.wustl.edu/"), \ + ACE_TEXT("ftp://user:pass@www.cs.wustl.edu/path"), \ + ACE_TEXT("ftp://www.cs.wustl.edu"), \ + ACE_TEXT("http://www.cs.wustl.edu/index.html") #define MAILTO_TEST_ARRAY \ - ASYS_TEXT("mailto:ace-users@cs.wustl.edu"), \ - ASYS_TEXT("mailto:majordomo@cs.wustl.edu?Subject: subscribe ace-users"), \ - ASYS_TEXT("mailto:nobody"), \ - ASYS_TEXT("http://www.cs.wustl.edu") + ACE_TEXT("mailto:ace-users@cs.wustl.edu"), \ + ACE_TEXT("mailto:majordomo@cs.wustl.edu?Subject: subscribe ace-users"), \ + ACE_TEXT("mailto:nobody"), \ + ACE_TEXT("http://www.cs.wustl.edu") #define URL_TEST_ARRAY \ - ASYS_TEXT("file:/etc/passwd") + ACE_TEXT("file:/etc/passwd") void test_http_addr (void) { - static LPCTSTR addresses[] = { + static const ACE_TCHAR *addresses[] = { HTTP_TEST_ARRAY }; static int naddresses = sizeof(addresses)/sizeof(addresses[0]); @@ -62,7 +62,7 @@ void test_http_addr (void) continue; } - ASYS_TCHAR buffer[BUFSIZ]; + ACE_TCHAR buffer[BUFSIZ]; if (addr.addr_to_string (buffer, BUFSIZ, i%2) == 0) { ACE_DEBUG ((LM_DEBUG, @@ -86,7 +86,7 @@ void test_http_addr (void) void test_ftp_addr (void) { - static LPCTSTR addresses[] = { + static const ACE_TCHAR *addresses[] = { FTP_TEST_ARRAY }; static int naddresses = sizeof(addresses)/sizeof(addresses[0]); @@ -102,7 +102,7 @@ void test_ftp_addr (void) continue; } - ASYS_TCHAR buffer[BUFSIZ]; + ACE_TCHAR buffer[BUFSIZ]; if (addr.addr_to_string (buffer, BUFSIZ, i%2) == 0) { ACE_DEBUG ((LM_DEBUG, @@ -127,7 +127,7 @@ void test_ftp_addr (void) void test_mailto_addr (void) { - static LPCTSTR addresses[] = { + static const ACE_TCHAR *addresses[] = { MAILTO_TEST_ARRAY }; static int naddresses = sizeof(addresses)/sizeof(addresses[0]); @@ -143,7 +143,7 @@ void test_mailto_addr (void) continue; } - ASYS_TCHAR buffer[BUFSIZ]; + ACE_TCHAR buffer[BUFSIZ]; if (addr.addr_to_string (buffer, BUFSIZ, i%2) == 0) { ACE_DEBUG ((LM_DEBUG, @@ -168,7 +168,7 @@ void test_mailto_addr (void) void test_url_addr (void) { - static LPCTSTR addresses[] = { + static const ACE_TCHAR *addresses[] = { HTTP_TEST_ARRAY, FTP_TEST_ARRAY, MAILTO_TEST_ARRAY, @@ -188,7 +188,7 @@ void test_url_addr (void) continue; } - ASYS_TCHAR buffer[BUFSIZ]; + ACE_TCHAR buffer[BUFSIZ]; if (addr->addr_to_string (buffer, BUFSIZ, i%2) == 0) { ACE_DEBUG ((LM_DEBUG, |