diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 56f6f28e0bf..34556fdb58b 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -2,7 +2,7 @@ TrinityCore uses (parts of or in whole) the following opensource software : ACE (ADAPTIVE Communication Environment) http://www.cs.wustl.edu/~schmidt/ACE.html - Version: 5.8.3 + Version: 6.1.4 bzip2 (a freely available, patent free, high-quality data compressor) http://www.bzip.org/ diff --git a/dep/acelite/6.1.4_tc_changes.diff b/dep/acelite/6.1.4_tc_changes.diff new file mode 100644 index 00000000000..a0caff7ab7d --- /dev/null +++ b/dep/acelite/6.1.4_tc_changes.diff @@ -0,0 +1,407 @@ +diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt +new file mode 100644 +index 0000000..acd3d5a +--- /dev/null ++++ b/dep/acelite/ace/CMakeLists.txt +@@ -0,0 +1,337 @@ ++# Copyright (C) 2008-2012 TrinityCore ++# ++# This file is free software; as a special exception the author gives ++# unlimited permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++ ++# NOTE: Do not use glob here, it would include files we don't want ++set(ace_STAT_SRCS ++ PrecompiledHeaders/WinAcePCH.cpp ++ ACE.cpp ++ ACE_crc32.cpp ++ ACE_crc_ccitt.cpp ++ ace_wchar.cpp ++ Activation_Queue.cpp ++ Active_Map_Manager.cpp ++ Addr.cpp ++ Argv_Type_Converter.cpp ++ Assert.cpp ++ Asynch_IO.cpp ++ Asynch_IO_Impl.cpp ++ Asynch_Pseudo_Task.cpp ++ ATM_Acceptor.cpp ++ ATM_Addr.cpp ++ ATM_Connector.cpp ++ ATM_Params.cpp ++ ATM_QoS.cpp ++ ATM_Stream.cpp ++ Atomic_Op.cpp ++ Atomic_Op_Sparc.c ++ Auto_Event.cpp ++ Barrier.cpp ++ Base_Thread_Adapter.cpp ++ Based_Pointer_Repository.cpp ++ Basic_Stats.cpp ++ Basic_Types.cpp ++ Capabilities.cpp ++ CDR_Base.cpp ++ CDR_Size.cpp ++ CDR_Stream.cpp ++ Cleanup.cpp ++ Codecs.cpp ++ Codeset_IBM1047.cpp ++ Codeset_Registry.cpp ++ Codeset_Registry_db.cpp ++ Condition_Recursive_Thread_Mutex.cpp ++ Condition_Thread_Mutex.cpp ++ Configuration.cpp ++ Configuration_Import_Export.cpp ++ Connection_Recycling_Strategy.cpp ++ Containers.cpp ++ Copy_Disabled.cpp ++ Date_Time.cpp ++ DEV.cpp ++ DEV_Addr.cpp ++ DEV_Connector.cpp ++ DEV_IO.cpp ++ Dev_Poll_Reactor.cpp ++ Dirent.cpp ++ Dirent_Selector.cpp ++ DLL.cpp ++ DLL_Manager.cpp ++ Dump.cpp ++ Dynamic.cpp ++ Dynamic_Message_Strategy.cpp ++ Dynamic_Service_Base.cpp ++ Dynamic_Service_Dependency.cpp ++ Encoding_Converter.cpp ++ Encoding_Converter_Factory.cpp ++ Event.cpp ++ Event_Handler.cpp ++ Event_Handler_Handle_Timeout_Upcall.cpp ++ FIFO.cpp ++ FIFO_Recv.cpp ++ FIFO_Recv_Msg.cpp ++ FIFO_Send.cpp ++ FIFO_Send_Msg.cpp ++ FILE.cpp ++ FILE_Addr.cpp ++ FILE_Connector.cpp ++ FILE_IO.cpp ++ File_Lock.cpp ++ Filecache.cpp ++ Flag_Manip.cpp ++ Framework_Component.cpp ++ Functor.cpp ++ Functor_String.cpp ++ Get_Opt.cpp ++ Handle_Ops.cpp ++ Handle_Set.cpp ++ Hashable.cpp ++ High_Res_Timer.cpp ++ ICMP_Socket.cpp ++ INET_Addr.cpp ++ Init_ACE.cpp ++ IO_Cntl_Msg.cpp ++ IO_SAP.cpp ++ IOStream.cpp ++ IPC_SAP.cpp ++ Lib_Find.cpp ++ Local_Memory_Pool.cpp ++ Local_Name_Space.cpp ++ Local_Tokens.cpp ++ Lock.cpp ++ Log_Msg.cpp ++ Log_Msg_Backend.cpp ++ Log_Msg_Callback.cpp ++ Log_Msg_IPC.cpp ++ Log_Msg_NT_Event_Log.cpp ++ Log_Msg_UNIX_Syslog.cpp ++ Log_Record.cpp ++ Logging_Strategy.cpp ++ LSOCK.cpp ++ LSOCK_Acceptor.cpp ++ LSOCK_CODgram.cpp ++ LSOCK_Connector.cpp ++ LSOCK_Dgram.cpp ++ LSOCK_Stream.cpp ++ Malloc.cpp ++ Malloc_Allocator.cpp ++ Manual_Event.cpp ++ MEM_Acceptor.cpp ++ MEM_Addr.cpp ++ MEM_Connector.cpp ++ MEM_IO.cpp ++ Mem_Map.cpp ++ MEM_SAP.cpp ++ MEM_Stream.cpp ++ Message_Block.cpp ++ Message_Queue.cpp ++ Message_Queue_NT.cpp ++ Message_Queue_Vx.cpp ++ Method_Request.cpp ++ MMAP_Memory_Pool.cpp ++ Monitor_Admin.cpp ++ Monitor_Admin_Manager.cpp ++ Monitor_Base.cpp ++ Monitor_Control_Action.cpp ++ Monitor_Control_Types.cpp ++ Monitor_Point_Registry.cpp ++ Monitor_Size.cpp ++ Msg_WFMO_Reactor.cpp ++ Multihomed_INET_Addr.cpp ++ Mutex.cpp ++ Name_Proxy.cpp ++ Name_Request_Reply.cpp ++ Name_Space.cpp ++ Naming_Context.cpp ++ Netlink_Addr.cpp ++ Notification_Queue.cpp ++ Notification_Strategy.cpp ++ NT_Service.cpp ++ Obchunk.cpp ++ Object_Manager.cpp ++ Object_Manager_Base.cpp ++ OS_Errno.cpp ++ OS_Log_Msg_Attributes.cpp ++ OS_main.cpp ++ OS_NS_arpa_inet.cpp ++ OS_NS_ctype.cpp ++ OS_NS_dirent.cpp ++ OS_NS_dlfcn.cpp ++ OS_NS_errno.cpp ++ OS_NS_fcntl.cpp ++ OS_NS_math.cpp ++ OS_NS_netdb.cpp ++ OS_NS_poll.cpp ++ OS_NS_pwd.cpp ++ OS_NS_regex.cpp ++ OS_NS_signal.cpp ++ OS_NS_stdio.cpp ++ OS_NS_stdlib.cpp ++ OS_NS_string.cpp ++ OS_NS_strings.cpp ++ OS_NS_stropts.cpp ++ OS_NS_sys_mman.cpp ++ OS_NS_sys_msg.cpp ++ OS_NS_sys_resource.cpp ++ OS_NS_sys_select.cpp ++ OS_NS_sys_sendfile.cpp ++ OS_NS_sys_shm.cpp ++ OS_NS_sys_socket.cpp ++ OS_NS_sys_stat.cpp ++ OS_NS_sys_time.cpp ++ OS_NS_sys_uio.cpp ++ OS_NS_sys_utsname.cpp ++ OS_NS_sys_wait.cpp ++ OS_NS_Thread.cpp ++ OS_NS_time.cpp ++ OS_NS_unistd.cpp ++ OS_NS_wchar.cpp ++ OS_QoS.cpp ++ OS_Thread_Adapter.cpp ++ OS_TLI.cpp ++ Pagefile_Memory_Pool.cpp ++ Parse_Node.cpp ++ PI_Malloc.cpp ++ Ping_Socket.cpp ++ Pipe.cpp ++ POSIX_Asynch_IO.cpp ++ POSIX_CB_Proactor.cpp ++ POSIX_Proactor.cpp ++ Priority_Reactor.cpp ++ Proactor.cpp ++ Proactor_Impl.cpp ++ Process.cpp ++ Process_Manager.cpp ++ Process_Mutex.cpp ++ Process_Semaphore.cpp ++ Profile_Timer.cpp ++ Reactor.cpp ++ Reactor_Impl.cpp ++ Reactor_Notification_Strategy.cpp ++ Reactor_Timer_Interface.cpp ++ Read_Buffer.cpp ++ Recursive_Thread_Mutex.cpp ++ Recyclable.cpp ++ Registry.cpp ++ Registry_Name_Space.cpp ++ Remote_Name_Space.cpp ++ Remote_Tokens.cpp ++ Rtems_init.c ++ RW_Mutex.cpp ++ RW_Process_Mutex.cpp ++ RW_Thread_Mutex.cpp ++ Sample_History.cpp ++ Sbrk_Memory_Pool.cpp ++ Sched_Params.cpp ++ Select_Reactor_Base.cpp ++ Semaphore.cpp ++ Service_Config.cpp ++ Service_Gestalt.cpp ++ Service_Manager.cpp ++ Service_Object.cpp ++ Service_Repository.cpp ++ Service_Types.cpp ++ Shared_Memory.cpp ++ Shared_Memory_MM.cpp ++ Shared_Memory_Pool.cpp ++ Shared_Memory_SV.cpp ++ Shared_Object.cpp ++ Sig_Adapter.cpp ++ Sig_Handler.cpp ++ Signal.cpp ++ SOCK.cpp ++ SOCK_Acceptor.cpp ++ SOCK_CODgram.cpp ++ Sock_Connect.cpp ++ SOCK_Connector.cpp ++ SOCK_Dgram.cpp ++ SOCK_Dgram_Bcast.cpp ++ SOCK_Dgram_Mcast.cpp ++ SOCK_IO.cpp ++ SOCK_Netlink.cpp ++ SOCK_SEQPACK_Acceptor.cpp ++ SOCK_SEQPACK_Association.cpp ++ SOCK_SEQPACK_Connector.cpp ++ SOCK_Stream.cpp ++ SPIPE.cpp ++ SPIPE_Acceptor.cpp ++ SPIPE_Addr.cpp ++ SPIPE_Connector.cpp ++ SPIPE_Stream.cpp ++ SString.cpp ++ Stack_Trace.cpp ++ Stats.cpp ++ String_Base_Const.cpp ++ SUN_Proactor.cpp ++ SV_Message.cpp ++ SV_Message_Queue.cpp ++ SV_Semaphore_Complex.cpp ++ SV_Semaphore_Simple.cpp ++ SV_Shared_Memory.cpp ++ Svc_Conf_Lexer.cpp ++ Svc_Conf_y.cpp ++ Synch_Options.cpp ++ System_Time.cpp ++ Task.cpp ++ Thread.cpp ++ Thread_Adapter.cpp ++ Thread_Control.cpp ++ Thread_Exit.cpp ++ Thread_Hook.cpp ++ Thread_Manager.cpp ++ Thread_Mutex.cpp ++ Thread_Semaphore.cpp ++ Throughput_Stats.cpp ++ Time_Policy.cpp ++ Time_Value.cpp ++ Timeprobe.cpp ++ TLI.cpp ++ TLI_Acceptor.cpp ++ TLI_Connector.cpp ++ TLI_Stream.cpp ++ Token.cpp ++ Token_Collection.cpp ++ Token_Invariants.cpp ++ Token_Manager.cpp ++ Token_Request_Reply.cpp ++ TP_Reactor.cpp ++ Trace.cpp ++ TSS_Adapter.cpp ++ TTY_IO.cpp ++ UNIX_Addr.cpp ++ UPIPE_Acceptor.cpp ++ UPIPE_Connector.cpp ++ UPIPE_Stream.cpp ++ UTF16_Encoding_Converter.cpp ++ UTF32_Encoding_Converter.cpp ++ UTF8_Encoding_Converter.cpp ++ UUID.cpp ++ WFMO_Reactor.cpp ++ WIN32_Asynch_IO.cpp ++ WIN32_Proactor.cpp ++ XML_Svc_Conf.cpp ++ XTI_ATM_Mcast.cpp ++) ++ ++include_directories( ++ ${CMAKE_SOURCE_DIR}/dep/acelite ++ ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders ++ ${CMAKE_SOURCE_DIR}/dep/zlib ++) ++ ++# Needed for PCH support ++set_source_files_properties(Atomic_Op_Sparc.c Rtems_init.c PROPERTIES LANGUAGE CXX) ++ ++add_definitions(-DACE_BUILD_DLL) ++ ++add_library(ace SHARED ${ace_STAT_SRCS}) ++ ++add_native_precompiled_header(ace ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/WinAcePCH) ++ ++install(TARGETS ace RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") +diff --git a/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp +new file mode 100644 +index 0000000..139597f +--- /dev/null ++++ b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp +@@ -0,0 +1,2 @@ ++ ++ +diff --git a/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h +new file mode 100644 +index 0000000..6ff97bf +--- /dev/null ++++ b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h +@@ -0,0 +1,17 @@ ++ ++#ifndef WIN_ACE_PCH ++#define WIN_ACE_PCH ++ ++#include "ace/ACE.h" ++ ++#include "ace/Synch_Traits.h" ++#include "ace/Svc_Handler.h" ++#include "ace/SOCK_Stream.h" ++#include "ace/SOCK_Acceptor.h" ++#include "ace/Acceptor.h" ++#include "ace/Thread_Mutex.h" ++#include "ace/Guard_T.h" ++#include "ace/Unbounded_Queue.h" ++#include "ace/Message_Block.h" ++ ++#endif +diff --git a/dep/acelite/ace/config-macros.h b/dep/acelite/ace/config-macros.h +index f18c8e0..32e5894 100644 +--- a/dep/acelite/ace/config-macros.h ++++ b/dep/acelite/ace/config-macros.h +@@ -21,7 +21,11 @@ + #ifndef ACE_CONFIG_MACROS_H + #define ACE_CONFIG_MACROS_H + +-#include "ace/config.h" ++#ifdef _WIN32 ++ #include "ace/config-win32.h" ++#else ++ #include "ace/config.h" ++#endif + + #include "ace/Version.h" + #include "ace/Versioned_Namespace.h" +diff --git a/dep/acelite/ace/config-win32-common.h b/dep/acelite/ace/config-win32-common.h +index 50645a1..098ddbd 100644 +--- a/dep/acelite/ace/config-win32-common.h ++++ b/dep/acelite/ace/config-win32-common.h +@@ -527,9 +527,9 @@ + # else + # pragma comment(lib, "ws2_32.lib") + # pragma comment(lib, "mswsock.lib") +-# if defined (ACE_HAS_IPV6) ++// # if defined (ACE_HAS_IPV6) + # pragma comment(lib, "iphlpapi.lib") +-# endif ++// # endif + # endif /* ACE_HAS_WINCE */ + # endif /* _MSC_VER */ + diff --git a/dep/acelite/COPYING b/dep/acelite/COPYING index 551231de6cf..226708461b9 100644 --- a/dep/acelite/COPYING +++ b/dep/acelite/COPYING @@ -8,7 +8,7 @@ (henceforth referred to as "DOC software") are copyrighted by [5]Douglas C. Schmidt and his [6]research group at [7]Washington University, [8]University of California, Irvine, and [9]Vanderbilt - University, Copyright (c) 1993-2009, all rights reserved. Since DOC + University, Copyright (c) 1993-2012, all rights reserved. Since DOC software is open-source, freely available software, you are free to use, modify, copy, and distribute--perpetually and irrevocably--the DOC software source code and object code produced from the source, as diff --git a/dep/acelite/ChangeLog b/dep/acelite/ChangeLog index ec8c3ded3c5..7381bdcca07 100644 --- a/dep/acelite/ChangeLog +++ b/dep/acelite/ChangeLog @@ -1,3017 +1,2587 @@ -Wed Oct 27 12:01:05 CEST 2010 Johnny Willemsen +Wed Aug 29 08:16:04 CEST 2012 Johnny Willemsen - * ACE version 5.8.3 released. + * ACE version 6.1.4 released. -Tue Oct 26 11:21:35 UTC 2010 Johnny Willemsen +Mon Aug 27 20:38:00 UTC 2012 Steve Huston - * bin/diff-builds-and-group-fixed-tests-only.sh: - Fixed DANCE_ROOT, could cause problems with the test stats email + * include/makeinclude/platform_linux.GNU: Make CC and CXX setting + conditional again. Conditional behavior is relied upon by users. + Reverts the following: + Tue Mar 1 11:31:55 UTC 2011 Olli Savia -Mon Oct 25 21:01:02 UTC 2010 Olli Savia +Mon Aug 27 09:43:43 UTC 2012 johnny - * NEWS: - Updated. + * apps/JAWS/clients/WebSTONE/src/config.cache: + * apps/JAWS/clients/WebSTONE/src/config.log: + * apps/JAWS/clients/WebSTONE/src/config.status: + Removed these files, generated by configure and + shouldn't be stored in the repository -Mon Oct 25 14:07:15 UTC 2010 Phil Mesnier +Fri Aug 24 10:27:22 UTC 2012 johnny - * ace/Service_Gestalt.cpp: - Another fix to error processing behavior. If the result of - process_directives() was > 0, that value was replaced by the - result of process_commandline_directives(), which is contrary to - the expected behavior. Now the result is the sum of these to - return values, unless either returns -1, then the result is just - -1. + * examples/APG/Streams/CommandModule.h: + * tests/Service_Config_Stream_Test.cpp: + Add ACE_System_Time_Policy as second template argument + to ACE_Module, the default template argument doesn't + work with clang which seems to be a bug in that + compiler -Mon Oct 25 06:30:35 UTC 2010 Johnny Willemsen +Thu Aug 23 12:33:35 UTC 2012 johnny - * ace/Atomic_Op_T.h: - * ace/Auto_IncDec_T.h: - Doxygen changes + * ace/Condition_Attributes.inl: + * ace/config-hpux-11.00.h: + Another fix for hpux ia64 v3 -Sun Oct 24 12:35:28 UTC 2010 Johnny Willemsen +Thu Aug 23 06:35:20 UTC 2012 Johnny Willemsen - * ace/Event_Handler.h: - * ace/Reactor.h: - * ace/Reactor_Notification_Strategy.h: - * ace/Read_Buffer.h: - * ace/Registry_Name_Space.h: - * ace/Remote_Tokens.h: - Doxygen changes + * ace/Condition_Attributes.inl: + Only check for ACE_LACKS_MONOTONIC_TIME -Fri Oct 22 11:19:33 UTC 2010 Johnny Willemsen - - * ace/Reactor.h: - Doxygen changes - -Thu Oct 21 11:10:56 UTC 2010 Johnny Willemsen - - * ace/ACE.cpp: - * ace/FILE_IO.h: - * ace/Free_List.h: - * ace/Handle_Set.h: - * ace/Log_Msg.h: - * ace/WIN32_Asynch_IO.h: - Doxygen changes - -Wed Oct 20 18:19:51 UTC 2010 Johnny Willemsen - - * bin/fuzz.pl: - If we just see dollarIddollar we trigger an error, svn:keywords is - than lacking - -Wed Oct 20 16:07:09 UTC 2010 Steve Huston - - * ace/Timer_Queue_Adapters.cpp (ACE_Thread_Timer_Queue_Adapter::svc): - * ace/Timer_Queue_T.cpp (expire): - Temporarily release and reacquire the mutex around timer dispatch. - This prevents a deadlock on user code with multiple threads doing - timer-related operations. - -Wed Oct 20 09:22:46 UTC 2010 Johnny Willemsen - - * bin/MakeProjectCreator/config/global.features: - Add nddsmonitor as default to 0 - -Wed Oct 20 09:19:25 UTC 2010 Johnny Willemsen - - * ace/Log_Msg.h: - - * bin/MakeProjectCreator/config/global.features: - - * tests/Time_Value_Test.cpp: - -Tue Oct 19 18:11:57 UTC 2010 Olli Savia - - * ace/Caching_Utility_T.cpp: - Added missing include. - -Tue Oct 19 09:44:45 UTC 2010 Olli Savia - - * ace/Caching_Utility_T.cpp: - Use ACE::is_equal() to compare floating point values. - -Fri Oct 15 10:18:05 UTC 2010 Johnny Willemsen - - * tests/Bug_3911_Regression_Test.cpp: - Fixed warning - -Thu Oct 14 18:29:35 UTC 2010 Johnny Willemsen - - * tests/run_test.lst: - * tests/tests.mpc: - 3911 doesn't work with ace_for_tao - -Thu Oct 14 13:15:00 UTC 2010 Martin Corino - - * ace/Process.h: - * ace/Process.cpp: - Changes to allow to dynamically define the max. number of cmdline args. - The tao_idl compiler was running out of room in certain instances and - the static max was very conservative. - -Thu Oct 14 09:38:00 UTC 2010 Martin Corino - - * tests/Bug_3911_Regression_Test.cpp: - Wchar build fixes. - -Wed Oct 13 08:24:00 UTC 2010 Martin Corino - - * tests/Bug_3911_Regression_Test.cpp: - Wchar build fixes. - -Wed Oct 13 06:15:00 UTC 2010 Johnny Willemsen - - * ace/Framework_Component.h: - * ace/Framework_Component.inl: - * ace/Framework_Component.cpp: - * ace/Framework_Component_T.h: - Use ACE_Copy_Disabled, change c-style cast to const cast, use - sync macros instead of ACE_MT. Thanks to Ranjit Hande - for reporting the c-style cast warnings - - * tests/Framework_Component_Test.h: + * ace/Monotonic_Time_Policy.inl: Layout change -Tue Oct 12 21:12:51 UTC 2010 Adam Mitz + * ace/config-hpux-11.00.h: + Added ACE_LACKS_MONOTONIC_TIME - * bin/DependencyGenerator/GNUObjectGenerator.pm: - - Fixed incorrect Perl regex escaping from my previous commit. - -Tue Oct 12 11:41:00 UTC 2010 Martin Corino - - * tests/Bug_3911_Regression_Test.cpp: - Fuzz fixes. - -Tue Oct 12 08:06:00 UTC 2010 Martin Corino - - * tests/Bug_3911_Regression_Test.cpp: - * tests/run_test.lst: - * tests/tests.mpc: - Added reproducer test for Bugzilla #3911. - -Mon Oct 11 16:31:12 UTC 2010 Adam Mitz - - * bin/DependencyGenerator/GNUObjectGenerator.pm: - - If the source file contains '../', remove the directory part from - the name of the object file (see gnu.mpd:383 OBJS make variable). - -Mon Oct 11 11:53:43 UTC 2010 Johnny Willemsen - - * ace/Dev_Poll_Reactor.cpp: - * ace/Select_Reactor_T.cpp: - Fixed problems with threads=0, thanks to Elez - for reporting this and providing a patch - -Fri Oct 8 11:19:44 UTC 2010 Olli Savia - - * protocols/ace/RMCast/Flow.cpp: - Added missing include. - -Fri Oct 8 08:42:37 UTC 2010 Olli Savia - - * ace/config-linux-common.h: - * ace/os_include/os_unistd.h: - * configure.ac: - * m4/config_h.m4: - Removed references to ACE_LACKS_PREAD_PROTOTYPE. It is no - longer used. - -Fri Oct 8 08:20:04 UTC 2010 Olli Savia - - * ace/OS_NS_stdio.inl: - * ace/README: - * tests/OS_Test.cpp: - Removed references to ACE_LACKS_RENAME. It is no - longer used. - -Fri Oct 8 07:51:46 UTC 2010 Olli Savia - - * ace/config-integritySCA.h: - Removed references to ACE_LACKS_IPC_H. It is no - longer used. - -Fri Oct 8 07:48:38 UTC 2010 Olli Savia - - * ace/README: - Removed references to ACE_LACKS_IOSTREAMS_TOTALLY. It is no - longer used. - - * ace/os_include/os_stropts.h: - Fixed typo. - -Fri Oct 8 07:42:26 UTC 2010 Olli Savia - - * ace/OS_NS_stdio.h: - * ace/OS_NS_stdio.inl: - * ace/README: - * ace/Svc_Conf_Lexer.cpp: - Removed references to ACE_LACKS_CLEARERR. It is no - longer used. - -Fri Oct 8 06:58:56 UTC 2010 Olli Savia - - * protocols/ace/RMCast/Flow.cpp: - * tests/CDR_Array_Test.cpp: - * tests/CDR_File_Test.cpp: - * tests/CDR_Test.cpp: - * tests/Upgradable_RW_Test.cpp: - Use ACE::is_equal() to compare floating point values. - -Thu Oct 7 12:34:20 UTC 2010 Olli Savia - - * ASNMP/tests/Counter64_Test.cpp: - * ace/ETCL/ETCL_Constraint.cpp: - * ace/Monitor_Control/CPU_Load_Monitor.cpp: - Use ACE::is_equal() to compare floating point values. - -Tue Oct 5 07:23:19 UTC 2010 Johnny Willemsen - - * ACE-INSTALL.html: - * COPYING: - Small updates - - * docs/ACE-porting.html: - Updated links - - * include/makeinclude/wrapper_macros.GNU: - Added support for valgrind=1 - -Mon Oct 4 19:55:33 UTC 2010 William R. Otte - - * bin/make_release.py: - - Updates. - -Mon Oct 4 12:32:02 UTC 2010 Johnny Willemsen - - * ace/LSOCK_Stream.h: - Doxygen changes - - * ace/Makefile.am: - Removed zapped file - - * include/makeinclude/platform_sunos5_sunc++.GNU: - Removed SUN_CC_HAS_PVFC_BUG, this got added 8 years ago and is - used for any SunCC compiler version. If some old SunCC compiler breaks - we can readd this flag for just that compiler version - -Fri Oct 1 16:00:51 UTC 2010 William Otte - - * COPYING: - - Updated to include DAnCE. - -Fri Oct 1 11:55:23 UTC 2010 Johnny Willemsen - - * ace/config-g++-common.h: - * ace/config-qnx-neutrino.h: - * ace/config-qnx-rtp-common.h: - Fixed redefinition warnings - - * ace/ace_for_tao.mpc: - Zapped some files +Wed Aug 22 11:50:22 UTC 2012 Johnny Willemsen * ace/config-win32-common.h: - * ace/config-win32-msvc.h: - * ace/config-win32.h: - Cleanup - - * ace/config-win32-ghs.h: - Removed this file. - -Thu Sep 30 10:49:38 UTC 2010 Johnny Willemsen - - * debian/mpc-ace.install: - Improved - - * docs/bczar/bczar.html: - Added DAnCE to doxygen instructions - -Thu Sep 30 08:09:34 UTC 2010 Johnny Willemsen - - * ace/IOStream.h: - * ace/config-g++-common.h: - * ace/config-hpux-11.00.h: - * ace/config-linux-common.h: - * ace/config-mvs.h: - * ace/config-sunos5.5.h: - * ace/config-win32-borland.h: - * ace/config-win32-cegcc.h: - * ace/config-win32-dmc.h: - * ace/config-win32-ghs.h: - * ace/config-win32-mingw.h: - * ace/config-win32-msvc.h: - Cleanup, move g++ version defines to config-g++-common.h - -Thu Sep 30 05:45:10 UTC 2010 Marcel Smit - - * NEWS: - * ace/Cache_Map_Manager_T.h: - * ace/Cache_Map_Manager_T.inl: - * ace/Cache_Map_Manager_T.cpp: - * ace/Cached_Connect_Strategy_T.h: - * ace/Cached_Connect_Strategy_T.cpp: - * ace/Caching_Strategies_T.h: - * ace/Caching_Utility_T.cpp: - * ace/Cleanup_Strategies_T.cpp: - * ace/Hash_Cache_Map_Manager_T.h: - * ace/Hash_Cache_Map_Manager_T.cpp: - * ace/Map_T.h: - * ace/Map_T.inl: - * ace/Map_T.cpp: - * ace/Pair_T.h: - * ace/Pair_T.inl: - * examples/Web_Crawler/URL_Visitor.h: - * tests/Cache_Map_Manager_Test.cpp: - * tests/Cached_Accept_Conn_Test.h: - * tests/Cached_Conn_Test.cpp: - * tests/Map_Manager_Test.cpp: - Removed ACE_Pair from the ACE library. - -Wed Sep 29 14:06:40 UTC 2010 Johnny Willemsen - - * ace/Cache_Map_Manager_T.h: - * ace/MEM_SAP.h: - * ace/Metrics_Cache_T.h: - * ace/Metrics_Cache_T.inl: - * ace/Metrics_Cache_T.cpp: - Doxygen changes - -Wed Sep 29 12:19:17 UTC 2010 Johnny Willemsen - - * ace/Caching_Utility_T.h: - * ace/Caching_Utility_T.cpp: - Use bool and ACE_Copy_Disabled - - * ace/Malloc_Base.h: - * ace/Malloc_T.h: - Typo fixes - -Wed Sep 29 12:08:58 UTC 2010 Marijke Hengstmengel - - * bin/MakeProjectCreator/config/global.features: - Add ccm_noevent option, default 0, events in CCM are enabled. - If set, events in CCM are disabled. - -Tue Sep 28 18:48:58 UTC 2010 Johnny Willemsen - - * apps/JAWS3/jaws3-todo: - Removed, todo for years now - -Tue Sep 28 18:16:52 UTC 2010 Adam Mitz - - * performance-tests/TCP/tcp_test.cpp: - - If the 1st char of the host name is a digit, need to set the IP - address and port as network byte order since that is what's - returned from ACE_OS::inet_addr(). - -Tue Sep 28 11:34:05 UTC 2010 Johnny Willemsen - - * ace/Asynch_Connector.cpp: - * ace/Barrier.h: - * ace/Barrier.cpp: - * ace/Condition_Thread_Mutex.h: - * ace/Condition_Thread_Mutex.inl: - * ace/Containers_T.cpp: - * ace/Functor.h: - * ace/Functor.inl: - * ace/IO_Cntl_Msg.cpp: - * ace/Intrusive_List.cpp: - * ace/Local_Tokens.inl: - * ace/MEM_IO.cpp: - * ace/MEM_Stream.h: - * ace/MEM_Stream.inl: - * ace/Malloc_T.inl: - * ace/OS_NS_Thread.inl: - * ace/OS_NS_string.inl: - * ace/Object_Manager_Base.cpp: - * ace/POSIX_Proactor.cpp: - * ace/Ping_Socket.cpp: - * ace/Signal.inl: - * ace/Throughput_Stats.h: - * ace/Throughput_Stats.cpp: - * ace/Time_Value.cpp: - * ace/Timer_Hash_T.cpp: - * ace/Timer_Heap_T.cpp: - * ace/Vector_T.h: - * ace/Vector_T.cpp: - * ace/config-linux-common.h: - Removed code that was ifdefed out for years now - -Tue Sep 28 08:31:37 UTC 2010 Vladimir Zykov - - * performance-tests/Misc/test_guard.cpp: - * tests/ACE_Test.cpp: - * examples/Reactor/TP_Reactor/client.cpp: - Fixed compilation errors with missing includes. - -Mon Sep 27 18:04:34 UTC 2010 Johnny Willemsen - - * ace/ACE.h: - * ace/Thread.h: - * ace/Thread_Adapter.h: - * ace/Thread_Mutex.h: - Doxygen changes + Added ACE_LACKS_CLOCK_MONOTONIC and + ACE_LACKS_CLOCK_REALTIME -Mon Sep 27 14:47:47 UTC 2010 Johnny Willemsen +Wed Aug 22 06:13:12 UTC 2012 Johnny Willemsen - * ace/String_Base.h: - Doxygen changes + * ace/os_include/sys/os_time.h: + Fixed incorrect check in this file - * ace/Svc_Conf_Lexer.cpp: - Const changes +Tue Aug 21 16:55:13 UTC 2012 Johnny Willemsen - * bin/msvc_static_order.lst: - Some updates, but this list is very outdated + * ace/os_include/sys/os_time.h: + Introduced new ACE_LACKS_CLOCKID_T which is used to determine whether + we need to define clockid_t in ACE. Moved CLOCK_MONOTONIC and + CLOCK_REALTIME to file below -Mon Sep 27 14:27:25 UTC 2010 Jeff Parsons + * ace/os_include/sys/os_types.h: + Added CLOCK_MONOTONIC and CLOCK_REALTIME here and introduced new + ACE_LACKS_CLOCK_REALTIME and ACE_LACKS_CLOCK_MONOTONIC because on + for example HPUX CLOCK_REALTIME is not a define but part of an enum - * THANKS: + * ace/config-win32-common.h: + Added ACE_LACKS_CLOCKID_T - Added Matthew Waller +Tue Aug 21 14:38:00 UTC 2012 Simon Massey -Mon Sep 27 14:08:11 UTC 2010 Vladimir Zykov + * protocols/ace/INet/SSL_CallbackManager.h: + Spelling in comment. - * ace/Log_Msg.h: - * ace/Log_Msg.cpp: - Fixed compilation with ACE_HAS_DUMP. The later happens because - ACE_Log_Msg depends on ACE_Atomic_Op and ACE_Atomic_Op needs - ACE_DEBUG when ACE_HAS_DUMP is defined. This change moves - include of ace/Atomic_Op.h from header to CPP file and adds - forward declaration for ACE_Atomic_Op. +Tue Aug 21 12:25:45 UTC 2012 Simon Massey - * ace/Atomic_Op_T.cpp: - * ace/Guard_T.cpp: - Removed unnecessary this paramater when doing ACE_END_DUMP. + * ace/SSL/SSL_Context.h: + * ace/SSL/SSL_Context.inl: - * examples/Misc/test_dump.h: - * examples/Threads/thread_specific.cpp: - Fixed logging in these tests. + Solaris studio compilers amongst others were issuing warnings due to an + incorrect type of function pointer (i.e. not extern "C", but standard + C++ type) being stored/used of the form: -Mon Sep 27 11:24:02 UTC 2010 Vladimir Zykov + Warning (Anachronism): Formal argument callback of type + extern "C" int(*)(int,x509_store_ctx_st*) + in call to + SSL_CTX_set_verify(ssl_ctx_st*, int, extern "C" int(*)(int,x509_store_ctx_st*)) + is being passed + int(*)(int,x509_store_ctx_st*) - * examples/C++NPv2/AIO_Client_Logging_Daemon.h: - Another attempt to fix compile error. + when the C++ code was providing callback functions to certain C system SSL + library calls. -Mon Sep 27 09:42:29 UTC 2010 Johnny Willemsen + Unfortunatly you cannot specify extern "C" linkage anywhere inside a + class declaration or inside a function prototype for individual + parameters. I.e: - * bin/fuzz.pl: - Enable export file check, use TAO_IDL to generate export files or - remove the generated by line from the export file itself. Currently - only for CIAO and DAnCE + class { extern "C" int (*callback_) (int, void *); }; -Sat Sep 25 06:41:39 UTC 2010 Olli Savia + to store an extern "C" function pointer as a data member of the + class is illegal, as is: - * ace/ACE.h: - Modified ACE::is_equal() comment once again to make fuzz happy. + void function (extern "C" int (*callback) (int, void *); -Fri Sep 24 14:52:44 UTC 2010 Steve Huston + to declare a function (or a class member) that takes a extern "C" + function pointer as a parameter. - * ace/Pipe.{h inl cpp}: Added two new methods, close_read() and - close_write() to close individual pipe handles. Refactored the - original close() method to use these and factored out the actual - closing code to a new inlined close_handle() method. + Since we need to specify an extern "C" function pointer as a parameter + to be stored in the class and handled by member functions, we are forced + to declare a typedef of that extern "C" function pointer outside of the + class that we can then use. Unfortunatly you also are not allowed to + simply add the extern "C" to the typedef itself, like this: - Thanks to John Lilley for this - addition. + typedef extern "C" int (*extern_C_callback_t) (int, void *); - * NEWS: Added description of the new methods. + instead you have to place the typedef declaration inside an extern "C" + block, thus: -Fri Sep 24 12:41:13 UTC 2010 Johnny Willemsen + extern "C" { + typedef int (*extern_C_callback_t) (int, void *); + } - * ACE-INSTALL.html: - Updated Remedy platforms + This then results in the correct call type associated with the + function pointer which may then be used inside the function and + class declarations to remove these warnings and possiable incorrect + call methods undertaken via the STL C functions. A lot of different + compilers ignore extern "C" where it is not allowed, the only way + I have found to be universally understood is as stated above. - * ACEXML/parser/parser/Parser.h: - * ace/Containers_T.h: - * ace/Containers_T.cpp: - * ace/OS_NS_string.h: - * ace/OS_NS_wchar.h: - * apps/JAWS/clients/WebSTONE/src/nsapi-includes/base/shexp.h: - Fixed typo + * protocols/ace/INet/SSL_CallbackManager.h: + * protocols/ace/INet/SSL_CallbackManager.cpp: -Fri Sep 24 12:32:44 UTC 2010 Johnny Willemsen + Similar problems and interfacing to the changed calling type of the above + extern "C" function pointers. NOTE: just declaring a static function for + the class is NOT sufficient to obtain the correct extern "C" calling type. + We are therefore forced to declare friend functions external to the class + (as again we cannot have a extern "C" declaration inside a class even for + a static method) to do this job. Since these are extern "C" functions they + also of course cannot be overloaded, i.e. they are required to be unique + names. They also cannot be non-class static functions to make them private + to the cpp file as they need to actually be seen by the class declaration + to be made friends and therefore have to be included in the header file. - * ace/Containers_T.h: - * ace/Containers_T.cpp: - * ace/OS_NS_string.h: - * ace/OS_NS_wchar.h: - Fixed typo +Tue Aug 21 12:20:43 UTC 2012 Johnny Willemsen -Fri Sep 24 12:24:01 UTC 2010 Johnny Willemsen + * ace/os_include/sys/os_types.h: + Fixed HPUX problem - * ACE-INSTALL.html: - Documented vc10, thanks to Paul Carter - for reporting this. +Tue Aug 21 02:45:07 UTC 2012 Phil Mesnier -Fri Sep 24 11:44:06 UTC 2010 Olli Savia + * ace/config-macosx-leopard.h: + setclock not supported on current macs. - * ace/ACE.h: - Adjusted ACE::is_equal() comment to make fuzz happy. +Mon Aug 20 18:07:25 UTC 2012 Johnny Willemsen -Fri Sep 24 09:35:00 UTC 2010 Vladimir Zykov + * ace/Global_Macros.h: + Doxyen fixes - * examples/C++NPv2/AIO_Client_Logging_Daemon.h: - Removed code that is problematic for GCC 2.95.3 in a crossbuild - for LynxOS 4.0. + * bin/valgrind.supp: + Added another needed suppression -Fri Sep 24 07:35:27 UTC 2010 Olli Savia +Mon Aug 20 10:03:23 UTC 2012 Johnny Willemsen - * ace/ACE.h: - Added a simple helper ACE::is_equal() which compares equality of two - objects without using operator==. This is useful for comparing floating - point values. - - * tests/OS_Test.cpp: - Use ACE::is_equal() instead of local copy. - -Thu Sep 23 16:14:12 UTC 2010 Adam Mitz - - * ace/SSL/ssl.mpc: - * bin/MakeProjectCreator/config/pkgconfig.mpb: - * bin/MakeProjectCreator/templates/gnu.mpd: - * bin/ace_install_pkgconfig.pl: - * include/makeinclude/rules.lib.GNU: - * include/makeinclude/wrapper_macros.GNU: - - Added support for installing pkg-config (.pc) files as part of the - gnuace "make install". This includes a refactoring of how the - shared library version numbers are set internally in the makefiles. - -Thu Sep 23 12:32:05 UTC 2010 Vladimir Zykov - - * ace/Service_Gestalt.cpp: - Fixed memory leak. Previously it could happen that svc_queue_ was - allocated during processing of arguments but was not freed if - application didn't call process_commandline_directives(). - - * tests/Network_Adapters_Test.cpp: - Removed non-ASCII character from the comments. - -Wed Sep 22 18:42:25 UTC 2010 William R. Otte - - * bin/msvc_mpc_auto_compile.pl: - - Updates for DAnCE. - -Wed Sep 22 14:17:11 UTC 2010 Marcel Smit - - * debian/Basic_Logging_Service.sgml: - * debian/Event_Logging_Service.sgml: - * debian/Notify_Logging_Service.sgml: - * debian/RTEvent_Logging_Service.sgml: - Renamed TAO orb services. See $TAO_ROOT/NEWS for details. - -Wed Sep 22 14:06:25 UTC 2010 Marcel Smit - - * debian/libtao-orbsvcs-1.8.2.install: - * debian/libtao-orbsvcs-dev.install: - * debian/tao-imr.install: - * debian/tao-naming.install: - * debian/tao-notify.install: - * debian/tao-rtevent.install: - Renamed TAO orb services. See $TAO_ROOT/NEWS for details. - -Wed Sep 22 13:58:46 UTC 2010 Marcel Smit - - * debian/tao-concurrency.install: - * debian/tao-event.install: - * debian/tao-ft.install: - * debian/tao-ifr.install: - * debian/tao-lifecycle.install: - * debian/tao-load.install: - * debian/tao-log.install: - * debian/tao-scheduling.install: - * debian/tao-time.install: - * debian/tao-trading.install: - Renamed TAO orb services. See $TAO_ROOT/NEWS for details. - -Tue Sep 21 08:27:47 UTC 2010 Johnny Willemsen - - * ASNMP/agent/main.cpp: - Fixed compile error - -Mon Sep 20 13:24:56 UTC 2010 Johnny Willemsen - - * ASNMP/agent/agent.mpc: - * ASNMP/agent/main.cpp: - Enable for wchar, thanks to Christian Freund - for reporting this and providing a patch, fixes bugzilla 3889 - - * ace/String_Base.h: - * apps/JAWS3/http/HTTP_Service_Handler.h: - * apps/JAWS3/small/SS_Service_Handler.h: - Fixed typo in comment - - * ace/config-win32-borland.h: - Some updates based on QC emails - - * debian/libtao-dev.install: - * debian/mpc-ace.install: - Fixed paths - -Fri Sep 17 20:14:33 UTC 2010 Adam Mitz - - * ace/FlReactor/ace_flreactor.mpc: - * ace/FoxReactor/ace_foxreactor.mpc: - * ace/QtReactor/ace_qt3reactor.mpc: - * ace/QtReactor/ace_qt4reactor.mpc: - * ace/TkReactor/ace_tkreactor.mpc: - * ace/XtReactor/ace_xtreactor.mpc: - - Since these have been moved, the default install_dir isn't what we - want. Set the install_dir to ace/*Reactor. - -Fri Sep 17 07:51:06 UTC 2010 Marcel Smit - - * bin/fuzz.pl: - Added Id check for cdp files. - -Fri Sep 17 07:16:16 UTC 2010 Johnny Willemsen - - * ace/Log_Msg.h: - * ace/OS_Errno.cpp: - Layout changes - - * ace/Malloc_T.h: - * ace/Malloc_T.cpp: - * ace/Map_Manager.inl: - * ace/Map_Manager.cpp: - Moved some methods inline - - * ace/OS_NS_signal.cpp: - Fixed problem with versioned macros - -Thu Sep 16 13:36:51 UTC 2010 Martin Corino - - * protocols/ace/INet/ClientRequestHandler.h: - * protocols/ace/INet/URLBase.h: - * protocols/ace/INet/HTTP_ClientRequestHandler.h: - Changes to fix export problems with nested classes with MSVC 9. - -Thu Sep 16 09:25:51 UTC 2010 Johnny Willemsen - - * ace/ace.mpc: - Removed Service_Templates.h - -Thu Sep 16 09:08:39 UTC 2010 Johnny Willemsen - - * protocols/tests/HTBP/Send_Large_Msg/server.cpp: - * protocols/tests/HTBP/ping/client.cpp: - Added missing includes - -Wed Sep 15 12:45:13 UTC 2010 Johnny Willemsen - - * ace/Auto_Event.h: - * ace/OS_NS_arpa_inet.inl: - * ace/OS_NS_arpa_inet.cpp: - * ace/OS_NS_errno.cpp: - * ace/OS_NS_fcntl.cpp: - * ace/OS_NS_math.cpp: - * ace/OS_NS_pwd.inl: - * ace/OS_NS_pwd.cpp: - * ace/OS_NS_regex.inl: - * ace/OS_NS_regex.cpp: - * ace/OS_NS_signal.cpp: - * ace/OS_NS_sys_resource.cpp: - * ace/OS_NS_sys_wait.inl: - * ace/OS_NS_wctype.inl: - * ace/OS_NS_wctype.cpp: - * ace/config-tandem.h: - * ace/os_include/os_pthread.h: - * ace/os_include/os_signal.h: - * ace/os_include/sys/os_resource.h: - * ace/os_include/sys/os_socket.h: - Small cleanup and layout changes - -Wed Sep 15 12:31:07 UTC 2010 Johnny Willemsen - - * protocols/tests/HTBP/Reactor_Tests/server.cpp: - * protocols/tests/HTBP/Send_Recv_Tests/server.cpp: - * protocols/tests/HTBP/ping/server.cpp: - Fixed solaris compile problems - -Wed Sep 15 09:33:38 UTC 2010 Johnny Willemsen - - * ace/ace.mpc: - * ace/ace_for_tao.mpc: - Zapped removed files - - * docs/svn/config: - Added another file type - -Wed Sep 15 07:51:33 UTC 2010 Johnny Willemsen - - * bin/MakeProjectCreator/templates/gnu.mpd: - Removed invalid comma, thanks to Frank Preischl - for reporting this and Olli Savia - for correcting my initial patch - -Tue Sep 14 18:18:36 UTC 2010 Johnny Willemsen - - * ace/ace.mwc: - No need for a workspace with all projects in it - - * ace/ace_ce_dll.cfg: - Removed this file, ancient and not used - -Tue Sep 14 16:42:26 UTC 2010 Adam Mitz - - * bin/make_release.py (update_latest_tag): - - Fixed a bug with the new DAnCE changes and changed the way it does - the svn properties edits. This function is still not called, but - the calls are ready to be un-commented whenever the buildczar or - release manager can re-enable this. - -Tue Sep 14 13:00:44 UTC 2010 Johnny Willemsen - - * ace/Log_Record.h: - * ace/Log_Record.inl: - * ace/Log_Record.cpp: - Removed deprecated encode/decode methods - -Tue Sep 14 12:05:19 UTC 2010 Steve Huston - - * examples/APG/Logging/Callback-3.h: Replaced use of deprecated - ACE_Log_Record::encode() with CDR converter. - -Tue Sep 14 12:01:01 UTC 2010 Johnny Willemsen - - * ace/FlReactor/ace_flreactor.mpc: - * ace/FoxReactor/ace_foxreactor.mpc: - * ace/QtReactor/ace_qt3reactor.mpc: - * ace/QtReactor/ace_qt4reactor.mpc: - * ace/TkReactor/ace_tkreactor.mpc: - * ace/XtReactor/ace_xtreactor.mpc: - * ace/ace_flreactor.mpc: - * ace/ace_foxreactor.mpc: - * ace/ace_qt3reactor.mpc: - * ace/ace_qt4reactor.mpc: - * ace/ace_tkreactor.mpc: - * ace/ace_xtreactor.mpc: - Moved these files to the subdirectory they need to be in - -Tue Sep 14 11:40:39 UTC 2010 Johnny Willemsen - - * bin/Array.pl: - * bin/Array_Helper: - * bin/Hash_Map_Manager.pl: - * bin/Hash_Map_Manager_Helper: - * bin/vxworks_modify.pl: - Removed these files, very old and will not work at all - - * bin/PythonACE: - * bin/PythonACE/__init__.py: - * bin/PythonACE/fuzz: - * bin/PythonACE/fuzz/__init__.py: - * bin/PythonACE/fuzz/_fuzz.py: - * bin/PythonACE/fuzz/_generic_handler.py: - * bin/PythonACE/fuzz/_mailer.py: - * bin/PythonACE/fuzz/_path.py: - * bin/PythonACE/fuzz/_singleton.py: - * bin/PythonACE/fuzz/_types.py: - * bin/PythonACE/fuzz/_warning_handler.py: - * bin/PythonACE/fuzz/check_includes.py: - * bin/PythonACE/fuzz/check_no_tabs.py: - * bin/PythonACE/fuzz/cpp_inline.py: - * bin/PythonACE/fuzz/inline.py: - * bin/PythonACE/fuzz/math_include.py: - * bin/PythonACE/fuzz/max_filename.py: - * bin/PythonACE/fuzz/max_project_len.py: - * bin/PythonACE/fuzz/newline.py: - * bin/PythonACE/fuzz/no_conflict_markers.py: - * bin/PythonACE/fuzz/noncvs.py: - * bin/PythonACE/fuzz/ptr_arith_t.py: - * bin/PythonACE/fuzz/refcountservantbase.py: - * bin/PythonACE/fuzz/streams_include.py: - * bin/PythonACE/fuzz/verify_changelog.py: - * bin/fuzz.py: - Deleted, fuzz is still perl, if we need a PythonACE later we can - easily get this again from svn - -Tue Sep 14 11:31:42 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - * html/index.html: - Removed ciao config handlers - -Tue Sep 14 11:30:18 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - * html/index.html: - Removed pss - -Tue Sep 14 09:41:06 UTC 2010 Johnny Willemsen - - * debian/mpc-ace.install: - Don't use environment variables - - * protocols/ace/HTBP/HTBP_Filter.h: - Added missing includes - -Tue Sep 14 09:36:06 UTC 2010 Johnny Willemsen - - * bin/make_release.py: - Updated generation of dsc file - - * protocols/examples/RMCast/Send_Msg/Sender.cpp: - * protocols/tests/RMCast/Sender.cpp: - * tests/Based_Pointer_Test.cpp: - * tests/SSL/Bug_2912_Regression_Test.cpp: - Added missing includes - -Mon Sep 13 18:15:27 UTC 2010 Johnny Willemsen - - *: - Zapped trailing whitespaces using - find -name \*.h -o -name \*.cpp -name \*.inl | xargs perl -i -pe's/\s+\n/\n/' - -Mon Sep 13 14:04:48 UTC 2010 Johnny Willemsen - - Reverted change below, not correct given new info from Adam - - Thu Sep 9 11:49:30 UTC 2010 Johnny Willemsen - - * bin/MakeProjectCreator/templates/gnu.mpd: - Removed invalid comma, thanks to Frank Preischl - for reporting this - - * debian/debian.rules: - * debian/mpc-ace.install: - Improved - -Mon Sep 13 09:25:22 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - Updated for DAnCE move - - * ace/ETCL/ETCL_Constraint.cpp: - * ace/ETCL/ETCL_l.cpp.diff: - * ace/ETCL/ETCL_l.cpp: - * ace/Makefile.am: - * ace/Thread_Control.inl: - * ace/ace.mpc: - * ace/ace_for_tao.mpc: - * apps/JAWS3/bench/average.cpp: - * apps/JAWS3/bench/mkfiles.cpp: - * apps/JAWS3/bench/rqfiles.cpp: - * apps/JAWS3/http/HTTP_Data.h: - * apps/JAWS3/http/HTTP_Service_Handler.h: - * apps/JAWS3/http/HTTP_Service_Handler.cpp: - * apps/JAWS3/http/HTTP_States.h: - * apps/JAWS3/jaws3-todo/Reactive_Socket.h: - * apps/JAWS3/jaws3-todo/Reactive_Socket_Helpers.h: - * apps/JAWS3/jaws3-todo/Reactive_Socket_Helpers.cpp: - * apps/JAWS3/jaws3-todo/Socket.h: - * apps/JAWS3/jaws3/Concurrency_T.h: - * apps/JAWS3/small/SS_Data.h: - * apps/JAWS3/small/SS_Service_Handler.h: - * apps/JAWS3/small/SS_Service_Handler.cpp: - * apps/JAWS3/small/SS_State_DONE.h: - * apps/JAWS3/small/SS_State_DONE.cpp: - * apps/JAWS3/small/SS_State_ERROR.h: - * apps/JAWS3/small/SS_State_ERROR.cpp: - * apps/JAWS3/small/SS_State_PARSE.h: - * apps/JAWS3/small/SS_State_PARSE.cpp: - * apps/JAWS3/small/SS_State_READ.h: - * apps/JAWS3/small/SS_State_READ.cpp: - * apps/JAWS3/small/SS_State_WRITE.h: - * apps/JAWS3/small/SS_State_WRITE.cpp: - * apps/JAWS3/small/SS_Templates.cpp: - * contrib/FaCE/FaCE.h: - * examples/APG/Svc_Config/HA_Status_Dynamic.h: - * examples/APG/Svc_Config/HA_Status_Static.h: - * examples/Reactor/TP_Reactor/client.cpp: - * examples/Reactor/TP_Reactor/server.cpp: - * protocols/ace/HTBP/HTBP_Channel.cpp: - * protocols/ace/HTBP/HTBP_Filter.h: - * protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp: - * protocols/ace/HTBP/HTBP_Session.cpp: - * protocols/ace/TMCast/Group.cpp: - * protocols/examples/RMCast/Send_Msg/Sender.cpp: - * protocols/tests/HTBP/Reactor_Tests/client.cpp: - * protocols/tests/HTBP/Reactor_Tests/server.cpp: - * protocols/tests/HTBP/Reactor_Tests/test_config.h: - * protocols/tests/HTBP/Send_Large_Msg/client.cpp: - * protocols/tests/HTBP/Send_Large_Msg/server.cpp: - * protocols/tests/HTBP/Send_Recv_Tests/client.cpp: - * protocols/tests/HTBP/Send_Recv_Tests/server.cpp: - * protocols/tests/HTBP/ping/client.cpp: - * protocols/tests/HTBP/ping/server.cpp: - * protocols/tests/RMCast/Sender.cpp: - * tests/Based_Pointer_Test.cpp: - * tests/Bug_2980_Regression_Dll.cpp: - * tests/SSL/Bug_2912_Regression_Test.cpp: - Removed include of ace/OS.h, only in a few files we really had - to add an include of OS_NS_*.h - - * ace/OS.h: - * ace/OS.inl: - * ace/OS.cpp: - Removed these files, replaced with OS_NS_* files a long time ago - -Sun Sep 12 19:27:58 UTC 2010 William R. Otte - - * bin/make_release.py: - - Some updates to handle moved DAnCE package. - -Sun Sep 12 19:22:21 UTC 2010 William Otte - - * bin/MakeProjectCreator/modules/GNUACEProjectCreator.pm: - * bin/MakeProjectCreator/templates/: - - Added rules to pullin rules.dance.GNU. - -Fri Sep 10 16:43:39 UTC 2010 Steve Huston - - * ace/Makefile.am: Removed references to files removed at - Thu Sep 9 11:14:45 UTC 2010 Johnny Willemsen - -Fri Sep 10 11:07:56 UTC 2010 Marcel Smit - - * ace/TSS_T.h: - Resolved compile issue regarding ACE_Copy_Disabled class. - -Fri Sep 10 07:36:39 UTC 2010 Marcel Smit - - * ace/Thread_Control.inl: - Include before versioning macros. - -Fri Sep 10 07:05:45 UTC 2010 Marcel Smit - - * ace/Thread_Control.inl: - Resolved compile error (ACE_OS_TRACE could not be found). - -Thu Sep 9 12:53:39 UTC 2010 Johnny Willemsen - - * ace/Asynch_Acceptor.h: - * ace/Asynch_Acceptor.cpp: - * ace/Hash_Multi_Map_Manager_T.h: - * ace/OS_NS_Thread.h: - * ace/OS_NS_Thread.cpp: - * ace/Service_Config.cpp: - * ace/TSS_T.cpp: - * ace/Thread.h: - * ace/Thread.inl: - * ace/config-macosx-snowleopard.h: - * ace/config-macosx-tiger.h: - * ace/config-macosx.h: - * tests/Hash_Multi_Map_Manager_Test.cpp: - Removed deprecated methods and arguments - - * docs/FAQ: - * FAQ: - Moved to docs - -Thu Sep 9 11:54:10 UTC 2010 Johnny Willemsen - - * apps/soreduce/Signature.cpp: - * tests/TkReactor_Test.cpp: + * docs/ACE-monotonic-timer.html: Fixed fuzz -Thu Sep 9 11:49:30 UTC 2010 Johnny Willemsen +Mon Aug 20 09:03:22 UTC 2012 Johnny Willemsen - * bin/MakeProjectCreator/templates/gnu.mpd: - Removed invalid comma, thanks to Frank Preischl - for reporting this + * ace/Module.cpp: + Fixed possible memory leak and dead code, uncovered by Coverity scan -Thu Sep 9 11:14:45 UTC 2010 Johnny Willemsen +Mon Aug 20 08:36:46 UTC 2012 Johnny Willemsen - * Kokyu/Dispatch_Deferrer.h: + * docs/ACE-monotonic-timer.html: + New document describing the ACE monotonic timer support for conditions, + message queues and tasks - * ace/Atomic_Op_T.h: - * ace/Atomic_Op_T.inl: - * ace/Configuration.h: - * ace/Configuration.cpp: - * ace/Default_Constants.h: - * ace/Hash_Multi_Map_Manager_T.h: - * ace/Hash_Multi_Map_Manager_T.cpp: - * ace/Intrusive_List.h: - * ace/Intrusive_List.inl: - * ace/Local_Name_Space_T.h: - * ace/Log_Msg.h: - * ace/Log_Msg.cpp: - * ace/MEM_Acceptor.h: - * ace/MEM_Acceptor.inl: - * ace/MEM_Connector.h: - * ace/MEM_Connector.inl: - * ace/Message_Queue.h: - * ace/OS.h: - * ace/OS_Memory.h: - * ace/OS_TLI.h: - * ace/Obstack_T.h: - * ace/Obstack_T.inl: - * ace/POSIX_Asynch_IO.h: - * ace/Process_Manager.h: - * ace/Process_Manager.cpp: - * ace/Recursive_Thread_Mutex.h: - * ace/Recursive_Thread_Mutex.cpp: - * ace/Refcountable_T.h: - * ace/Strategies_T.h: - * ace/Strategies_T.inl: - * ace/Synch.h: - * ace/Task.h: - * ace/Task_Ex_T.h: - * ace/Task_Ex_T.inl: - * ace/Task_T.h: - * ace/Task_T.inl: - * ace/Thread_Control.cpp: - * ace/Token_Collection.h: - * ace/Token_Invariants.h: - * ace/Token_Manager.h: - * ace/ace_wchar.h: - * ace/config-macosx-leopard.h: - * ace/os_include/net/os_if.h: - * ace/os_include/sys/os_mman.h: - * apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp: - * netsvcs/lib/Time_Request_Reply.h: - * netsvcs/lib/Time_Request_Reply.cpp: - * tests/Conn_Test.cpp: - * tests/Dirent_Test.cpp: - * tests/Svc_Handler_Test.cpp: - Removed several methods, files, and macros that are marked deprecated - for several years now. + * docs/index.html: + Added new page, removed link to site that doesn't work anymore - * ace/Map.h: - * ace/Method_Object.h: - * ace/OS_Dirent.h: - * ace/OS_String.h: - * ace/Pair.h: - * ace/Refcountable.h: - * ace/Service_Templates.h: - Removed these files. +Mon Aug 20 08:21:00 UTC 2012 Johnny Willemsen -Thu Sep 9 09:37:22 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - Fixed errors - - * debian/debian.rules: - Moving forward with OBS - -Thu Sep 9 09:29:30 UTC 2010 Johnny Willemsen - - * ace/CDR_Base.h: - * ace/CDR_Base.cpp: - * ace/DEV.h: - * ace/FILE.h: - * ace/Global_Macros.h: - * ace/INET_Addr.inl: - * ace/Malloc_T.h: - * ace/Malloc_T.inl: - * ace/Malloc_T.cpp: - * ace/SOCK_Dgram_Bcast.cpp: - * ace/SSL/SSL_SOCK.h: - * ace/Shared_Memory_Pool.cpp: - * ace/Sock_Connect.cpp: - * ace/config-aix-5.x.h: - * ace/config-doxygen.h: - * ace/config-g++-common.h: - * ace/config-hpux-11.00.h: - * ace/config-icc-common.h: - * ace/config-integritySCA.h: - * ace/config-linux-common.h: - * ace/config-macros.h: - * ace/config-mvs.h: - * ace/config-openvms.h: - * ace/config-suncc-common.h: - * ace/config-sunos5.5.h: - * ace/config-sunos5.6.h: - * ace/config-tandem-nsk-mips-v2.h: - * ace/config-tandem-nsk-mips-v3.h: - * ace/config-win32-borland.h: - * ace/config-win32-dmc.h: - * ace/config-win32-ghs.h: - * ace/config-win32-msvc-10.h: - * ace/config-win32-msvc-7.h: - * ace/config-win32-msvc-8.h: - * ace/config-win32-msvc-9.h: - * examples/IOStream/server/iostream_server.h: - * examples/IPC_SAP/SOCK_SAP/C-inserver.cpp: - * examples/IPC_SAP/SSL_SAP/SSL-server-fancy.cpp: - * examples/Reactor/Misc/test_event_handler_t.cpp: - * tests/Basic_Types_Test.cpp: - * tests/Conn_Test.cpp: - * tests/Message_Queue_Test.cpp: - * tests/SSL/Thread_Pool_Reactor_SSL_Test.h: - * tests/SSL/Thread_Pool_Reactor_SSL_Test.cpp: - Cleanup, all compilers support templated typedefs - - * ace/config-cray.h: - * ace/config-cxx-common.h: - Removed these files, obsolete - -Thu Sep 9 09:01:10 UTC 2010 Johnny Willemsen - - * ace/ACE.cpp: - * ace/ACE_export.h: - * ace/ETCL/ETCL_y.cpp: - * ace/INET_Addr.cpp: - * ace/Log_Msg.cpp: - * ace/OS.inl: - * ace/OS_NS_Thread.h: - * ace/OS_NS_Thread.inl: - * ace/OS_NS_Thread.cpp: - * ace/OS_NS_ctype.cpp: - * ace/OS_NS_netdb.inl: - * ace/OS_NS_pwd.inl: - * ace/OS_NS_stdlib.inl: - * ace/OS_NS_time.inl: - * ace/OS_NS_time.cpp: - * ace/POSIX_CB_Proactor.cpp: - * ace/POSIX_Proactor.cpp: - * ace/config-cxx-common.h: - * ace/config-doxygen.h: - * ace/config-integritySCA.h: - * ace/config-lynxos.h: - * ace/config-macros.h: - * ace/config-openvms.h: - * ace/config-tandem-nsk-mips-v2.h: - * ace/config-tandem-nsk-mips-v3.h: - * ace/config-vxworks6.4.h: - * ace/config-win32-common.h: - * ace/os_include/os_pthread.h: - * ace/os_include/os_pwd.h: - * ace/os_include/os_signal.h: - * ace/os_include/os_stdlib.h: - * ace/os_include/os_time.h: * ace/os_include/sys/os_types.h: - Removed Tru64, Irix, Unixware, and SCO support + Define CLOCK_MONOTONIC to 1 when it is not defined, should fix + hpux problems - * debian/debian.rules: - Improved +Mon Aug 20 07:57:53 UTC 2012 Johnny Willemsen - * examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.h: - * examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.h: - * examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.h: - * examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.h: - * examples/QOS/Simple/Receiver_QoS_Event_Handler.h: - * examples/QOS/Simple/Sender_QoS_Event_Handler.h: - Zapped ACE_RCSID + * ace/Condition_Attributes.h: + * ace/Condition_Attributes.inl: + Added accessor for attributes and removed friend declaration, + that hopefully fixes the Sun Studio 11 problems - * ace/config-irix6.5.x-sgic++.h: - * ace/config-irix6.x-common.h: - * ace/config-irix6.x-g++.h: - * ace/config-irix6.x-sgic++.h: - * ace/config-sco-5.0.0-nothread.h: - * ace/config-sco-5.0.0.h: - * ace/config-unixware-7.1.0.h: - * ace/config-unixware-7.1.0.udk.h: - * include/makeinclude/platform_irix6.x_common.GNU: - * include/makeinclude/platform_irix6.x_g++.GNU: - * include/makeinclude/platform_irix6.x_sgic++.GNU: - * include/makeinclude/platform_tru64_cxx.GNU: - * include/makeinclude/platform_tru64_g++.GNU: - * include/makeinclude/platform_tru64_post.GNU: - * include/makeinclude/platform_tru64_pre.GNU: - * include/makeinclude/platform_unixware_g++.GNU: - Removed the files because Tru64, Irix, Unixware, and SCO support are - removed now + * ace/Condition_Recursive_Thread_Mutex.cpp: + * ace/Condition_T.cpp: + * ace/Condition_Thread_Mutex.cpp: + Use accessor of the attributes. -Wed Sep 8 14:54:45 UTC 2010 William Otte +Sat Aug 18 19:25:38 UTC 2012 Johnny Willemsen - * docs/bczar/bczar.html: + * ace/Null_Condition.h: + Fix for single threaded builds - Updated documentation for removal of Release makefile. +Sat Aug 18 19:23:21 UTC 2012 Johnny Willemsen -Wed Sep 8 14:40:57 UTC 2010 William Otte + * ace/Condition_Attributes.h: + Added forward declaration, maybe this fixes solaris 9 - * Release: +Fri Aug 17 18:05:54 UTC 2012 Johnny Willemsen - Removing obsolete release makefile. + * ace/OS_NS_Thread.inl: + Attempt to fix clang warning -Wed Sep 8 10:57:12 UTC 2010 Johnny Willemsen +Fri Aug 17 13:38:05 UTC 2012 Martin Corino - * debian/ace.dsc: - * debian/debian.changelog: - * debian/debian.control: - * debian/debian.rules: - * debian/changelog: - * debian/control: - * debian/dsc: - * debian/rules: - Renamed to the names we use on OBS + * ace/Condition_Recursive_Thread_Mutex.h: + * ace/Condition_Thread_Mutex.h: + * ace/Null_Condition.h: + * ace/Synch_Traits.h: + Changes to attempt to fix Solaris9 SUNStudio11 problems. -Wed Sep 8 09:11:03 UTC 2010 Johnny Willemsen +Fri Aug 17 12:28:32 UTC 2012 Martin Corino - * tests/SSL/Bug_2912_Regression_Test.cpp: - Fixed compile error + * ace/config-hpux-11.00.h: + * ace/config-linux.h: + Fixes (hopefully) for non-compliant POSIX platforms. -Wed Sep 8 05:53:24 UTC 2010 Johnny Willemsen +Fri Aug 17 11:19:01 UTC 2012 Martin Corino - * examples/APG/ThreadPools/Futures.cpp: - Added missing include + * tests/Monotonic_Message_Queue_Test.cpp: + * tests/Monotonic_Task_Test.cpp: + Added include files because of compile errors in certain + builds. -Tue Sep 7 17:07:58 UTC 2010 Steve Huston - - * ace/Process.h: Noted the affects of handle_inheritance() on Windows. - -Tue Sep 7 14:23:13 UTC 2010 Johnny Willemsen - - * ace/Message_Queue_T.cpp: - * examples/APG/ThreadPools/LF_ThreadPool.cpp: - * examples/APG/ThreadPools/ThreadPool.cpp: - * examples/APG/ThreadSafety/Mutex.cpp: - * examples/APG/Threads/Condition_Variables.cpp: - * protocols/ace/HTBP/HTBP_ID_Requestor.h: - * protocols/ace/TMCast/Group.cpp: - * protocols/ace/TMCast/MTQueue.hpp: - * tests/Bug_3878_Regression_Test.cpp: - * tests/Upgradable_RW_Test.cpp: - Fixed compile problems - -Tue Sep 7 11:35:04 UTC 2010 Johnny Willemsen - - * bin/fuzz.pl: - Fix fuzz problem - -Tue Sep 7 10:52:59 UTC 2010 Johnny Willemsen - - * Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp: - Use ACE_GUARD - - * Kokyu/Dispatcher_Task.cpp: - Initialise pointer with 0 - - * PROBLEM-REPORT-FORM: - * VERSION: - Updated support email addresses - - * ace/ACE.inl: - Layout changes - - * ace/ACE.cpp: - Layout changes, simplified some ifdef checks - - * ace/Auto_IncDec_T.h: - * ace/Env_Value_T.h: - Use ACE_Copy_Disabled - - * ace/Bound_Ptr.inl: - Documentation updates - - * ace/CORBA_macros.h: - Removed all deprecated macros - - * ace/Dynamic_Service_Base.cpp: - Use ACE_GUARD_RETURN - - * ace/Event_Handler_T.h: - * ace/Event_Handler_T.inl: - * ace/Event_Handler_T.cpp: - Removed checks for ACE_HAS_TEMPLATE_TYPEDEFS, I think all compilers - have this now, let us see if nothing breaks - - * ace/FILE.h: - Doxygen updates - - * ace/Future.h: - * ace/Future.cpp: - Use mutex defines - - * ace/Future_Set.h: - Use ACE_Copy_Disabled - - * ace/Future_Set.cpp: - Initialise pointer with 0 - - * ace/Global_Macros.h: - Removed checks for ACE_HAS_TEMPLATE_TYPEDEFS, doxygen changes, make it - possible for users to redefine ACE_GUARD macros - - * ace/Guard_T.h: - * ace/Guard_T.inl: - * ace/Guard_T.cpp: - Doxygen changes, disable ACE_Guard checks for this file - - * ace/Hash_Map_Manager_T.h: - * ace/Hash_Multi_Map_Manager_T.h: - * ace/Map_Manager.h: - Update to indicate the usage of ACE_GUARD - - * ace/INET_Addr.h: - Doxygen changes - - * ace/Local_Tokens.h: - Disable part of this file for ACE_Guard fuzz check - - * ace/Log_Msg.cpp: - Use ACE_OS::thr_self - - * ace/Malloc_T.h: - Disable part of this file for ACE_Guard fuzz check, doxygen changes +Fri Aug 17 09:04:50 UTC 2012 Martin Corino * ace/Message_Queue_T.h: * ace/Message_Queue_T.cpp: - * ace/Message_Queue_Vx.h: - * ace/Message_Queue_Vx.cpp: - Removed ACE_Guard argument to some methods, not used and now cause - fuzz to fail - - * ace/Mutex.h: - * ace/Mutex.inl: - Added non const lock(), this fixes bugzilla 3878. Thanks to - Susan Finster for reporting this - - * ace/Null_Barrier.h: - * ace/Null_Condition.h: - * ace/Null_Mutex.h: - * ace/Null_Semaphore.h: - Removed old comments, disable part for ACE_Guard, removed - ACE_Null_Mutex_Guard - - * ace/OS_NS_Thread.cpp: - Layout changes, use ACE_Guard - - * ace/OS_NS_poll.cpp: - * ace/OS_NS_sys_select.cpp: - Layout changes - - * ace/OS_NS_sys_socket.inl: - Comment change - - * ace/Read_Buffer.h: - * ace/Remote_Tokens.h: - * ace/SOCK.h: - Doxygen changes - - * ace/SOCK_Connector.h: - * ace/SOCK_Dgram_Mcast.h: - Doxygen changes - - * ace/SOCK_Connector.cpp: - Layout and const changes - - * ace/Select_Reactor.h: - Disable part of this file for ACE_Guard fuzz check - - * ace/Service_Gestalt.h: - Use ACE_Copy_Disabled - - * ace/Sig_Handler.cpp: - Use ACE_GUARD macros - - * ace/Synch_Traits.h: - Removed ACE_HAS_TEMPLATE_TYPEDEFS checks - - * ace/TSS_T.h: - * ace/TSS_T.cpp: - Use ACE_Copy_Disabled, reworked some code to fix ACE_Guard fuzz - checks - - * ace/Task_Ex_T.h: - Use ACE_Copy_Disabled - - * apps/Gateway/Peer/Peer.cpp: - * apps/JAWS/server/HTTP_Server.cpp: - * apps/JAWS/server/JAWS_IO.cpp: - Initialise pointers with 0 - - * apps/JAWS/server/HTTP_Helpers.cpp: - Use ACE_GUARD macros - - * apps/JAWS2/JAWS/Cache_Hash_T.cpp: - * apps/JAWS2/JAWS/Cache_Manager_T.cpp: - * apps/JAWS2/JAWS/Cache_Object.cpp: - * apps/JAWS2/JAWS/Concurrency.cpp: - * apps/JAWS2/JAWS/FILE.cpp: - * apps/JAWS2/JAWS/Jaws_IO.cpp: - * apps/JAWS2/JAWS/Reaper.cpp: - * apps/JAWS3/jaws3/FILE.cpp: - Use ACE_GUARD macros - - * apps/gperf/src/Options.cpp: - Rename of local variable so that we don't need to disable ACE_OS - fuzz check - - * bin/fuzz.pl: - Improved ACE_Guard checks and enable this one by default - - * bin/generate_doxygen.pl: - Let DANCE use the CIAO version file for the moment - - * bin/make_release.py: - Don't create static and wince solutions as part of the release anymore, - if you use these, generate them by hand in the future. Added vc10 - project files - - * examples/APG/Proactor/HA_Proactive_Status.cpp: - * examples/APG/Reactor/Client.cpp: - * examples/APG/Reactor/HAStatus.cpp: - * examples/APG/Streams/Answerer.cpp: - * examples/APG/Streams/CommandStream.cpp: - * examples/APG/ThreadManagement/Pool.cpp: - * examples/APG/ThreadPools/LF_ThreadPool.cpp: - * examples/APG/ThreadPools/Task_ThreadPool.cpp: - * examples/APG/ThreadSafety/Semaphore.cpp: - * examples/APG/Threads/Message_Blocks.cpp: - * examples/APG/Threads/Message_Queue.cpp: - * examples/ASX/Message_Queue/bounded_buffer.cpp: - * examples/ASX/Message_Queue/priority_buffer.cpp: - * examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp: - * examples/C++NPv2/AIO_Client_Logging_Daemon.cpp: - * examples/C++NPv2/display_logfile.cpp: - * examples/IPC_SAP/UPIPE_SAP/ex1.cpp: - * examples/Reactor/Misc/test_demuxing.cpp: - * examples/Reactor/WFMO_Reactor/Talker.cpp: - * examples/Threads/barrier2.cpp: - * examples/Threads/thread_pool.cpp: - Initialise pointers with 0 - - * examples/APG/ThreadPools/ThreadPool.cpp: - Use ACE_Thread_ID to store a print a thread id using ACE_DEBUG, that - is the only way that is 100% portable - - * examples/APG/Threads/Guards.cpp: - Disable ACE_Guard fuzz - - * examples/Threads/reader_writer.cpp: - * examples/Threads/recursive_mutex.cpp: - Use ACE_GUARD macros - - * examples/Threads/thread_specific.cpp: - * examples/Threads/tss1.cpp: - Removed code not used - - * include/makeinclude/platform_g++_common.GNU: - Added CROSS_COMPILE support to this file - - * include/makeinclude/platform_linux.GNU: - * include/makeinclude/platform_linux_common.GNU: - Moved some bits to platform_g++_common.GNU, works with G++ in - general - - * include/makeinclude/platform_qnx_neutrino.GNU: - * include/makeinclude/platform_qnx_rtp_gcc.GNU: - Cleanup - - * netsvcs/lib/Log_Message_Receiver.h: - * netsvcs/lib/Log_Message_Receiver.cpp: - Use ACE_GUARD macros - - * performance-tests/Misc/Misc.mpc: - Enable test_guard - - * performance-tests/Misc/test_guard.cpp: - Made this compiling again - - * performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp: - * performance-tests/TCP/tcp_test.cpp: - Renamed variable to not need ACE_OS fuzz disable code - - * protocols/ace/HTBP/HTBP_ID_Requestor.cpp: - * protocols/ace/HTBP/HTBP_Session.cpp: - Use ACE_GUARD macros - - * protocols/ace/RMCast/Acknowledge.h: - * protocols/ace/RMCast/Acknowledge.cpp: - * protocols/ace/RMCast/Bits.h: - * protocols/ace/RMCast/Flow.h: - * protocols/ace/RMCast/Flow.cpp: - * protocols/ace/RMCast/Fragment.h: - * protocols/ace/RMCast/Fragment.cpp: - * protocols/ace/RMCast/Link.h: - * protocols/ace/RMCast/Link.cpp: - * protocols/ace/RMCast/Parameters.h: - * protocols/ace/RMCast/Protocol.h: - * protocols/ace/RMCast/Protocol.cpp: - * protocols/ace/RMCast/Reassemble.h: - * protocols/ace/RMCast/Reassemble.cpp: - * protocols/ace/RMCast/Retransmit.h: - * protocols/ace/RMCast/Retransmit.cpp: - * protocols/ace/RMCast/Simulator.h: - * protocols/ace/RMCast/Simulator.cpp: - * protocols/ace/RMCast/Socket.h: - * protocols/ace/RMCast/Socket.cpp: - * protocols/ace/RMCast/Stack.h: - * protocols/ace/RMCast/Stack.cpp: - * protocols/ace/TMCast/FaultDetector.hpp: - * protocols/ace/TMCast/Group.cpp: - * protocols/ace/TMCast/Group.hpp: - * protocols/ace/TMCast/GroupFwd.hpp: - * protocols/ace/TMCast/LinkListener.hpp: - * protocols/ace/TMCast/MTQueue.hpp: - * protocols/ace/TMCast/MTQueue.cpp: - * protocols/ace/TMCast/Messaging.hpp: - * protocols/ace/TMCast/Protocol.hpp: - * protocols/ace/TMCast/Protocol.cpp: - * protocols/ace/TMCast/TransactionController.hpp: - Removed commented out code, Id changes, disable ACE_Guard check - for this project - - * rpmbuild/ace-tao.spec: - Fixed some problems in this spec file - - * tests/Aio_Platform_Test.cpp: - * tests/Basic_Types_Test.cpp: - * tests/Bug_1576_Regression_Test.cpp: - * tests/Bug_3532_Regression_Test.cpp: - * tests/Bug_3673_Regression_Test.cpp: - * tests/Bug_3709_Regression_Test.cpp: - * tests/Bug_3744_Regression_Test.cpp: - * tests/Compiler_Features_03_Test.cpp: - * tests/Compiler_Features_09_Test.cpp: - * tests/Compiler_Features_13_Test.cpp: - * tests/Compiler_Features_14_Test.cpp: - * tests/Env_Value_Test.cpp: - * tests/Hash_Map_Bucket_Iterator_Test.cpp: - * tests/Logging_Strategy_Test.cpp: - * tests/MT_SOCK_Test.cpp: - * tests/Pipe_Test.cpp: - * tests/Priority_Task_Test.cpp: - * tests/Proactor_UDP_Test.cpp: - * tests/QtReactor_Test.cpp: - * tests/Reactor_Notification_Queue_Test.cpp: - * tests/Reactor_Registration_Test.cpp: - * tests/Reference_Counted_Event_Handler_Test.cpp: - * tests/Time_Service_Test.cpp: - Zapped ACE_RCSID - - * tests/Message_Block_Test.cpp: - * tests/Multicast_Test_IPV6.cpp: - Initialise pointer with 0 - - * tests/Reader_Writer_Test.cpp: - Use ACE_GUARD - - * tests/Recursive_Mutex_Test.cpp: - Disable ACE_Guard fuzz for part of this file - - * tests/Bug_3878_Regression_Test.cpp: - New test for bugzilla 3878 - - * tests/SSL/Bug_2912_Regression_Test.cpp: - * tests/TP_Reactor_Test.cpp: - Use ACE_GUARD - - * tests/Simple_Message_Block_Test.cpp: - * tests/Svc_Handler_Test.cpp: - * tests/Thread_Pool_Test.cpp: - * tests/UPIPE_SAP_Test.cpp: - Initialise pointers with 0 - - * tests/Thread_Mutex_Test.cpp: - Disable ACE_Guard fuzz - - * tests/Upgradable_RW_Test.cpp: - Use ACE_GUARD - - * tests/run_test.lst: - * tests/tests.mpc: - Added 3878 - -Mon Sep 6 09:30:00 UTC 2010 Simon Massey - - * ace/Acceptor.cpp: - Due to the way the code was formatted, I mistook a do {} while loop for - a while loop with my change. I have corrected this. - -Mon Sep 6 08:10:00 UTC 2010 Simon Massey - - * ace/ACE.cpp: - * ace/Acceptor.cpp: - * ace/SOCK_IO.cpp: - * ace/SOCK_Dgram.cpp: - * tests/SOCK_Test.cpp: - * tests/MT_SOCK_Test.cpp: - * NEWS: - Now that release x.8.3. is out, we are attempting to provide the correct - fix to the original commit by Steve Huston related to handle_ready() - (Fri Aug 27 19:17:11 UTC 2010 Steve Huston ) - and added back the corresponding NEWS entry. - -Sat Sep 04 18:08:03 UTC 2010 Johnny Willemsen - - * NEWS: - * bin/diff-builds-and-group-fixed-tests-only.sh: - * bin/make_release.py: - * docs/Download.html: - * etc/index.html: - Updated because of release - -Sat Sep 04 11:30:18 CEST 2010 Johnny Willemsen - - * ACE version 5.8.2 released. - -Thu Sep 2 14:46:56 UTC 2010 Vladimir Zykov - - * ace/Acceptor.cpp: - * ace/SOCK_IO.cpp: - * ace/SOCK_Dgram.cpp: - * ace/ACE.cpp: - * tests/SOCK_Test.cpp: - * tests/MT_SOCK_Test.cpp: - * NEWS: - Reverted both commits by Steve Huston related to handle_ready() - and a NEWS entry. - Wed Sep 1 19:31:24 UTC 2010 Steve Huston - Fri Aug 27 19:17:11 UTC 2010 Steve Huston - This is necessary for a quick release of 1.8.2. - -Wed Sep 1 19:31:24 UTC 2010 Steve Huston - - * ace/ACE.cpp (handle_ready): Changed the timeout behavior to just - return 0, no errno, as ACE_OS::poll() and ACE_OS::select() both do. - This restores historic behavior changed inadvertently at - Fri Aug 27 19:17:11 UTC 2010 Steve Huston - - * ace/SOCK_Dgram.cpp: - * ace/SOCK_IO.cpp: - * tests/MT_SOCK_Test.cpp: - * tests/SOCK_Test.cpp: Re-added the if/switch on return value from - ACE::handle_read|write_ready() to detect timeout and set errno - here. - - These changes were necessary to fix the TAO faults test. Thanks - to Johnny and Simon for narrowing down the cause and testing - the fix. - -Wed Sep 1 15:58:47 UTC 2010 Adam Mitz - - * bin/MakeProjectCreator/templates/gnu.mpd: - - Changed the short-circuit logic for the .NOTPARALLEL checks to || - instead of &&. If any one file is newer, we will have to rebuild. - Also added a missing foreach for the output files with dependent libs. - -Wed Sep 1 09:59:42 UTC 2010 Vladimir Zykov - - * tests/Time_Value_Test.cpp: - Fixed compile warning on QNX. time_t on QNX is defined as unsigned - int. - -Tue Aug 31 16:53:07 UTC 2010 Jeff Parsons - - * THANKS: - - Added Catherine L. Paquin . - -Tue Aug 31 14:40:17 UTC 2010 Adam Mitz - - * NEWS: - - Updated to proper name of Visual Studio 2010, which may assist - those searching for it in the NEWS file. - -Tue Aug 31 12:56:36 UTC 2010 Steve Huston - - * NEWS: Added an entry for the change at - Fri Aug 27 19:17:11 UTC 2010 Steve Huston - - * ace/README: - * ace/config-sunos5.6.h: - * ace/config-sunos5.7.h: Removed all mention of ACE_HAS_LIMITED_SELECT. - -Mon Aug 30 18:41:24 UTC 2010 Johnny Willemsen + * ace/Stream.h: + * ace/Stream.cpp: + * tests/Bug_4055_Regression_Test.cpp: + * tests/Monotonic_Task_Test.cpp: + Fixed compile errors for a bunch of crappy compilers + like the one on RHEL53 and AIX. + +Thu Aug 16 18:47:59 UTC 2012 Johnny Willemsen * ace/ace.mpc: - Added Obstack.h + * ace/ace_for_tao.mpc: + List Time_Value_T files -Mon Aug 30 16:48:34 UTC 2010 Steve Huston +Thu Aug 16 13:43:39 UTC 2012 Martin Corino - * ace/FIFO.h: - * ace/FIFO_Recv.h: - * ace/FIFO_Send.h: Clarified initialization and open behavior. - -Mon Aug 30 15:33:57 UTC 2010 Steve Huston - - * ace/Process.h (set_handles): Add a note that passing a socket handle - with this mechanism does not work on Windows. - -Mon Aug 30 10:06:24 UTC 2010 Johnny Willemsen - - * examples/Reactor/Proactor/test_proactor2.cpp: - * examples/Reactor/Proactor/test_proactor3.cpp: - * tests/Proactor_Test.cpp: - * tests/Proactor_Test_IPV6.cpp: - * tests/Proactor_UDP_Test.cpp: - ACE_Guard changes - -Fri Aug 27 19:17:11 UTC 2010 Steve Huston - - * ace/ACE.cpp (handle_ready, handle_timed_complete, - handle_timed_accept): On platforms where poll() is - available, prefer that to using select() for checking a single - handle's state and/or waiting for a condition. This preference - was previously only used if ACE_HAS_LIMITED_SELECT was set. The - ACE_HAS_LIMITED_SELECT choice is removed, making ACE_HAS_POLL the - setting that switches this preference. The driving reason for this - is that if select() is called to detect changes on a handle whose - values falls outside that which can safely be stored in an fdset, - the handle-setting macros/functions will set/clear bits outside - of the fdset. This results in very weird memory changes, often in - the stack, which are very hard to diagnose. poll()'s operation - does not suffer from this affect. With the growing use of large - numbers of handles and use of ACE_Dev_Poll_Reactor on Linux, - the rate at which this problem was cropping up was increasing. - Thanks to Olivier Langlois for diagnosing this problem and - proposing the patch. - - (handle_ready): Properly set the poll condition for read and/or - write. Thanks to kumaran.prem@gmail.com for this fix. - - * ace/Acceptor.cpp: - * ace/SOCK_IO.cpp: - * ace/SOCK_Dgram.cpp: - * tests/MT_SOCK_Test.cpp: - * tests/SOCK_Test.cpp: Replaced use of ACE_OS::select() with - ACE::handle_ready() and friends. - - This all resolves Bugzilla #3606. - -Fri Aug 27 19:10:16 UTC 2010 Brian Johnson - - * bin/MakeProjectCreator/templates/gnu.mpd: - - Merging dependent_libs support for gnuace from TAO 1.5a. - (Bugzilla #3281) - -Fri Aug 27 18:36:37 UTC 2010 Johnny Willemsen - - * ace/OS_NS_Thread.h: - * ace/OS_NS_Thread.inl: - Added assignment operator for ACE_Thread_Id - -Fri Aug 27 15:01:41 UTC 2010 Steve Huston - - * Connector.{h cpp} (ACE_NonBlocking_Connect_Handler): Add a - handle_close() which calls handle_input() if called by the - ACE_Dev_Poll_Reactor to remove a failed connect. Apparently, - Linux epoll, at least sometimes, signals EPOLLERR on a failed - nonblocking connect, unlike the select() case which selects the - failed fd for read. Thanks to Kannan Ramaswamy for this information and fix. - - * THANKS: Added Kannan to the Hall of Fame. - -Fri Aug 27 14:17:56 UTC 2010 Johnny Willemsen - - * ace/Atomic_Op.h: - Doxygen changes - - * ace/OS_NS_Thread.cpp: - Use ACE_GUARD - - * bin/fuzz.pl: - Added check for ACE_Guard - -Fri Aug 27 06:56:11 UTC 2010 Johnny Willemsen - - * etc/ace.doxygen: - * etc/acexml.doxygen: - Fuzz fixes - -Thu Aug 26 13:20:48 UTC 2010 Johnny Willemsen - - * bin/diff-builds-and-group-fixed-tests-only.sh: - Added DANCE_ROOT - -Thu Aug 26 13:08:56 UTC 2010 Johnny Willemsen - - * netsvcs/servers/servers.mpc: - Use ace_netsvcs as executable name, this makes more sense when - we install this file in a target directory - -Thu Aug 26 13:04:06 UTC 2010 Johnny Willemsen - - * bin/fuzz.pl: - Check doxygen files for tabs - - * etc/ace.doxygen: - * etc/ace_inet.doxygen: - * etc/ace_qos.doxygen: - * etc/ace_rmcast.doxygen: - * etc/ace_ssl.doxygen: - * etc/acexml.doxygen: - * html/index.html: - Changed documentation subdirectories to make debian packaging easier - -Thu Aug 26 12:30:33 UTC 2010 Johnny Willemsen - - * debian/control: - Made some fixes for x.8.1 - -Thu Aug 26 11:54:15 UTC 2010 Johnny Willemsen - - * bin/auto_run_tests.pl: - Extended script to also check for $DANCE_ROOT/bin/dance_tests.lst - -Thu Aug 26 10:20:41 UTC 2010 Martin Corino - - * ace/OS_NS_Thread.cpp: - Changes implementing the patches from Bugzilla #3653 (with - changes and some rejects; *no* asserts allowed in ACE). - -Wed Aug 25 19:58:19 UTC 2010 Steve Huston - - * ace/Dev_Poll_Reactor.{h cpp}: Regarding change number 2 at - Fri Mar 26 14:07:55 UTC 2010 Steve Huston - dispatching notifies in only one thread at a time was 1) wrong - (TP_Reactor doesn't do this), 2) broke important existing - applications at a customer site. This has been fixed so that the - notify dispatch behavior is like ACE_TP_Reactor: when the - notify handle is signaled, extract one notification, release - the token, dispatch the notification. Thus, each thread will - dispatch one notification, and multiple threads can dispatch - them at the same time if there are multiples. - - Also fixed an error where it was possible to lose notice of a - notification. Resolves Bugzilla #3328. - -Wed Aug 25 09:49:41 UTC 2010 Martin Corino - - * ace/Arg_Shifter.h: - * ace/config-macosx-leopard.h: - * ace/Guard_T.h: - * ace/Global_Macros.h: - Selected changes from patches in Bugzilla 3652. - -Tue Aug 24 14:21:01 UTC 2010 Johnny Willemsen - - * ace/OS_NS_Thread.h: - Layout changes - - * ace/config-win32-common.h: - Improved MinGW GCC 4.4 support. Thanks to - Jani Hakala for creating the - patch - -Tue Aug 24 14:15:45 UTC 2010 Marijke Hengstmengel - - * ace/Log_Msg.cpp - * ace/Log_Msg.h - * tests/Log_Msg_Test.cpp - Revert changes for logging thread id as argument. - -Tue Aug 24 12:59:30 UTC 2010 Martin Corino - - * protocols/ace/INet/ClientRequestHandler.h: - * protocols/ace/INet/URLBase.h: - * protocols/ace/INet/HTTP_ClientRequestHandler.h: - Changes to fix export problems with nested classes with MSVC 7/8. - -Tue Aug 24 11:29:45 UTC 2010 Marijke Hengstmengel - - * ace/Log_Msg.h: - * ace/Log_Msg.cpp: - * tests/Log_Msg_Test.cpp: - * ChangeLog: - Add %#t to log a thread id that is coming from user code, as argument . - -Mon Aug 23 19:51:59 UTC 2010 Phil Mesnier - - * tests/Missing_Svc_Conf_Test.cpp: - - Fix some scoreboard problems. - -Mon Aug 23 15:05:56 UTC 2010 Adam Mitz - - * ace/Select_Reactor.h: - - vc10 needs an "ACE_Export" declaration on the explicit template - instantiation of ACE_Select_Reactor. - -Mon Aug 23 13:23:03 UTC 2010 Johnny Willemsen - - * ace/config-kfreebsd.h: - New config file for kfreebsd - - * ace/config-win32-common.h: - Removed commented out defines - -Mon Aug 23 11:57:30 UTC 2010 Martin Corino - - * protocols/ace/INet/INet_SSL_Export.h: - * protocols/ace/INet/HTTPS_Context.h: - * protocols/ace/INet/HTTPS_SessionFactory.h: - * protocols/ace/INet/HTTPS_URL.h: - * protocols/ace/INet/SSL_CallbackManager.h: - * protocols/ace/INet/SSL_CertificateCallback.h: - * protocols/ace/INet/SSL_PasswordCallback.h: - * protocols/ace/INet/SSL_X509Cert.h: - * protocols/ace/INet/inet_ssl.mpc: - Changes to fix MSVC 7/8 link errors. - -Mon Aug 23 11:34:30 UTC 2010 Martin Corino - - * protocols/ace/INet/HTTPS_URL.h: - Fixed GCC41 error concerning comma at end of enum list. - -Sat Aug 21 12:53:05 UTC 2010 Phil Mesnier - - * tests/Missing_Svc_Conf_Test.cpp: - - Added a descriptive comment block to the source. - -Fri Aug 20 13:29:22 UTC 2010 Phil Mesnier - - * ace/Service_Gestalt.cpp: - - One more shot at fixing the behavior of the service configurator - in the face of missing defaulted svc.conf file. - - * tests/Missing_Svc_Conf_Test.cpp: - * tests/run_test.lst: - * tests/tests.mpc: - - Added a proper test to ensure changes to this behavior are caught - in the future. - -Fri Aug 20 11:58:20 UTC 2010 Johnny Willemsen - - * ace/TSS_T.cpp: - Updated comment - - * include/makeinclude/platform_g++_common.GNU: - If minimaltoc is set to 1, add -mminimal-toc to compiler flags - - * include/makeinclude/platform_linux.GNU: - Removed check for ppc64, if you build for ppc64 and need -mminimal-toc - add minimaltoc=1 to your platform_macros.GNU file - -Fri Aug 20 09:52:30 UTC 2010 Martin Corino - - * protocols/ace/INet/inet_ssl.mpb: - Removed feature subproject config. - - * protocols/ace/INet/inet_ssl.mpc: - Added sublibrary project I forgot yesterday. - -Thu Aug 19 12:37:14 UTC 2010 Johnny Willemsen - - * ace/Functor_T.h: - Doxygen changes - - * include/makeinclude/platform_linux.GNU: - Make it possible to control -mminimal-toc through the - platform_macros.GNU file using minimaltoc - -Thu Aug 19 12:09:30 UTC 2010 Martin Corino - - * bin/MakeProjectCreator/config/inet.mpb: - * bin/MakeProjectCreator/config/inetssl.mpb: - * protocols/ace/INet/inet.mpc: - * protocols/ace/INet/inet_ssl.mpb: - Changes to split INet into 2 libraries; regular and SSL. - Fixes dependencies of DAnCE tools on SSL. - -Wed Aug 18 09:26:04 UTC 2010 Vladimir Zykov - - * netsvcs/lib/Client_Logging_Handler.cpp: - Fixed a compile warning. - -Tue Aug 17 07:34:31 UTC 2010 Marijke Hengstmengel - - * ace/CDR_Stream.cpp - Add Id - -Mon Aug 16 22:00:06 UTC 2010 Adam Mitz - - * examples/Reactor/Misc/Reactor_Misc.mpc: - - Explicitly list an empty Template_Files so that the *_t.cpp doesn't - get added to Template_Files. - -Mon Aug 16 12:58:31 UTC 2010 Marijke Hengstmengel - - * ace/Auto_Event.cpp: - * ace/CDR_Stream.cpp: - * ace/Cleanup.cpp: - * ace/Codecs.cpp: - * ace/DEV_Addr.cpp: - * ace/Dynamic_Service_Base.cpp: - * ace/Filecache.cpp: - * ace/Flag_Manip.cpp: - * ace/FlReactor/FlReactor.cpp: - * ace/FoxReactor/FoxReactor.cpp: - * ace/Handle_Ops.cpp: - * ace/Hashable.cpp: - * ace/INET_Addr.cpp: - * ace/Init_ACE.cpp: - * ace/Local_Tokens.cpp: - * ace/Logging_Strategy.cpp: - * ace/Malloc.cpp: - * ace/MEM_Addr.cpp: - * ace/Message_Block.cpp: - * ace/Method_Request.cpp: - * ace/Multihomed_INET_Addr.cpp: - * ace/Name_Request_Reply.cpp: - * ace/OS_NS_string.cpp: - * ace/OS_Thread_Adapter.cpp: - * ace/Parse_Node.cpp: - * ace/Ping_Socket.cpp: - * ace/POSIX_Asynch_IO.cpp: - * ace/POSIX_CB_Proactor.cpp: - * ace/Proactor.cpp: - * ace/Proactor_Impl.cpp: - * ace/Process_Manager.cpp: - * ace/QoS/QoS_Decorator.cpp: - * ace/QoS/QoS_Manager.cpp: - * ace/QoS/QoS_Session_Factory.cpp: - * ace/QoS/QoS_Session_Impl.cpp: - * ace/QoS/SOCK_Dgram_Mcast_QoS.cpp: - * ace/Reactor.cpp: - * ace/Refcountable_T.cpp: - * ace/Remote_Name_Space.cpp: - * ace/Select_Reactor_Base.cpp: - * ace/Service_Config.cpp: - * ace/Service_Gestalt.cpp: - * ace/Shared_Memory_SV.cpp: - * ace/Singleton.cpp: - * ace/Sock_Connect.cpp: - * ace/SSL/SSL_Asynch_BIO.cpp: - * ace/SSL/SSL_Asynch_Stream.cpp: - * ace/SSL/SSL_Context.cpp: - * ace/SSL/SSL_SOCK.cpp: - * ace/SSL/SSL_SOCK_Acceptor.cpp: - * ace/SSL/SSL_SOCK_Connector.cpp: - * ace/SSL/SSL_SOCK_Stream.cpp: - * ace/SString.cpp: - * ace/Svc_Conf.y - * ace/Svc_Conf_y.cpp: - * ace/Task.cpp: + * ace/Message_Queue_T.cpp: + * ace/Stream.cpp: * ace/Thread_Manager.cpp: - * ace/Timer_Hash_T.cpp: - * ace/TkReactor/TkReactor.cpp: - * ace/Token_Collection.cpp: - * ace/WIN32_Asynch_IO.cpp: - * ace/XtReactor/XtReactor.cpp: - Removed ACE_RCSID + * tests/Bug_4055_Regression_Test.cpp: + Fixed problems with single threaded builds. -Thu Aug 12 16:07:55 UTC 2010 Steve Huston +Thu Aug 16 12:44:05 UTC 2012 Martin Corino - * configure.ac: Added feature test for ACE_LACKS_STRUCT_LIFNUM. - -Thu Aug 12 08:39:31 UTC 2010 Johnny Willemsen - - * rpmbuild/ace-tao.spec: - Fixed problem compiling FC packages on OSB - -Wed Aug 11 20:50:37 UTC 2010 Adam Mitz - - * bin/MakeProjectCreator/templates/gnu.mpd: - - With ARCH set, we need to create the local ARCH directory for the - executable in case there are no object files that would otherwise - have required it. - -Wed Aug 11 13:45:52 UTC 2010 Johnny Willemsen - - * ace/config-g++-common.h: - Only enable GCC builtin atomic op when threads are enabled. Thanks to - Rafi for reporting this - -Tue Aug 10 17:24:05 UTC 2010 Johnny Willemsen - - * ACEXML/apps/svcconf/Svcconf.cpp: - Fixed compile problem - -Tue Aug 10 08:55:17 UTC 2010 Johnny Willemsen - - * ace/Makefile.am: - Removed zapped file - -Mon Aug 9 17:14:27 UTC 2010 Jeff Parsons - - * THANKS: - - Added Robert Shectman - -Mon Aug 9 16:02:08 UTC 2010 Adam Mitz - - * include/makeinclude/platform_vxworks6.3.GNU: - * include/makeinclude/platform_vxworks6.8.GNU: - - The location of user-mode (RTP) libraries has changed in 6.8. - -Mon Aug 9 15:14:43 UTC 2010 Johnny Willemsen - - * ACEXML/apps/svcconf/Svcconf_Handler.cpp: - Zap emulated exception macros - - * ace/config-macros.h: - Only define ACE_HAS_EXCEPTIONS when it is not defined yet - -Mon Aug 9 06:38:34 UTC 2010 Johnny Willemsen - - * ace/config-sunos5.5.h: - Fixed compile error - -Mon Aug 9 06:35:14 UTC 2010 Johnny Willemsen - - * ace/ace.mpc: - Removed zapped file - -Sun Aug 8 23:31:32 UTC 2010 William R. Otte - - * ace/config-macosx-snowleopard.h: - - Clang uses ACE_ANY_OPS_USE_NAMESPACE. - -Fri Aug 6 17:36:45 UTC 2010 Adam Mitz - - * bin/fuzz.pl: - - Added a "trailing whitespace" check (not enabled by default). - Added the ability to pass multiple test names on the command line. - Extend the "too long file name" check to some additional file types. - -Fri Aug 6 08:39:38 UTC 2010 Johnny Willemsen - - * protocols/ace/TMCast/TMCast.mpc: - Removed exceptions as base project - -Thu Aug 5 16:56:01 UTC 2010 Johnny Willemsen - - * bin/MakeProjectCreator/config/tmcast.mpb: - * protocols/tests/RMCast/RMCast.mpc: - Removed exceptions as base project - -Thu Aug 5 09:00:49 UTC 2010 Johnny Willemsen - - * ace/ACE.cpp: - * ace/ACE_crc32.cpp: - * ace/ACE_crc_ccitt.cpp: - * ace/ARGV.cpp: - * ace/ATM_Acceptor.cpp: - * ace/ATM_Addr.cpp: - * ace/ATM_Connector.cpp: - * ace/ATM_Params.cpp: - * ace/ATM_QoS.cpp: - * ace/ATM_Stream.cpp: - * ace/Acceptor.cpp: - * ace/Activation_Queue.cpp: - * ace/Active_Map_Manager.cpp: - * ace/Addr.cpp: - * ace/Arg_Shifter.cpp: - * ace/Argv_Type_Converter.cpp: - * ace/Assert.cpp: - * ace/Asynch_Acceptor.cpp: - * ace/Asynch_IO.cpp: - * ace/Asynch_Pseudo_Task.cpp: - * ace/Atomic_Op.cpp: - * ace/Atomic_Op_GCC_T.cpp: - * ace/Atomic_Op_T.cpp: - * ace/Auto_Ptr.cpp: - * ace/Barrier.cpp: - * ace/Base_Thread_Adapter.cpp: - * ace/Basic_Stats.cpp: - * ace/CDR_Base.cpp: - * ace/Capabilities.cpp: - * ace/Codeset_IBM1047.cpp: - * ace/Codeset_Registry.cpp: - * ace/Condition_Thread_Mutex.cpp: - * ace/Connection_Recycling_Strategy.cpp: - * ace/Containers.cpp: - * ace/Copy_Disabled.cpp: - * ace/Countdown_Time.cpp: - * ace/DEV.cpp: - * ace/DEV_Connector.cpp: - * ace/DEV_IO.cpp: - * ace/DLL.cpp: - * ace/DLL_Manager.cpp: - * ace/Date_Time.cpp: - * ace/Dev_Poll_Reactor.cpp: - * ace/Dirent_Selector.cpp: - * ace/Dump.cpp: - * ace/Dynamic.cpp: - * ace/Dynamic_Message_Strategy.cpp: - * ace/Dynamic_Service_Dependency.cpp: - * ace/Event.cpp: - * ace/Event_Handler.cpp: - * ace/FIFO.cpp: - * ace/FIFO_Recv.cpp: - * ace/FIFO_Recv_Msg.cpp: - * ace/FIFO_Send.cpp: - * ace/FIFO_Send_Msg.cpp: - * ace/FILE.cpp: - * ace/FILE_Addr.cpp: - * ace/FILE_Connector.cpp: - * ace/FILE_IO.cpp: - * ace/File_Lock.cpp: - * ace/Framework_Component.cpp: - * ace/Functor.cpp: - * ace/Functor_String.cpp: - * ace/Future.cpp: - * ace/Get_Opt.cpp: - * ace/Handle_Set.cpp: - * ace/High_Res_Timer.cpp: - * ace/ICMP_Socket.cpp: - * ace/IOStream.cpp: - * ace/IO_Cntl_Msg.cpp: - * ace/IO_SAP.cpp: - * ace/IPC_SAP.cpp: - * ace/LSOCK.cpp: - * ace/LSOCK_Acceptor.cpp: - * ace/LSOCK_CODgram.cpp: - * ace/LSOCK_Connector.cpp: - * ace/LSOCK_Dgram.cpp: - * ace/LSOCK_Stream.cpp: - * ace/Lib_Find.cpp: - * ace/Local_Memory_Pool.cpp: - * ace/Local_Name_Space.cpp: - * ace/Lock.cpp: - * ace/Log_Msg.cpp: - * ace/Log_Msg_Backend.cpp: - * ace/Log_Msg_Callback.cpp: - * ace/Log_Msg_IPC.cpp: - * ace/Log_Msg_NT_Event_Log.cpp: - * ace/Log_Record.cpp: - * ace/MEM_Acceptor.cpp: - * ace/MEM_Connector.cpp: - * ace/MEM_IO.cpp: - * ace/MEM_SAP.cpp: - * ace/MEM_Stream.cpp: - * ace/MMAP_Memory_Pool.cpp: - * ace/Malloc_Allocator.cpp: - * ace/Manual_Event.cpp: - * ace/Mem_Map.cpp: - * ace/Message_Queue.cpp: - * ace/Message_Queue_NT.cpp: - * ace/Message_Queue_Vx.cpp: - * ace/Msg_WFMO_Reactor.cpp: - * ace/Mutex.cpp: - * ace/Name_Proxy.cpp: - * ace/Name_Space.cpp: - * ace/Naming_Context.cpp: - * ace/Notification_Strategy.cpp: - * ace/OS.cpp: - * ace/OS_Errno.cpp: - * ace/OS_Log_Msg_Attributes.cpp: - * ace/OS_NS_Thread.cpp: - * ace/OS_NS_arpa_inet.cpp: - * ace/OS_NS_ctype.cpp: - * ace/OS_NS_dirent.cpp: - * ace/OS_NS_dlfcn.cpp: - * ace/OS_NS_errno.cpp: - * ace/OS_NS_fcntl.cpp: - * ace/OS_NS_math.cpp: - * ace/OS_NS_netdb.cpp: - * ace/OS_NS_poll.cpp: - * ace/OS_NS_pwd.cpp: - * ace/OS_NS_regex.cpp: - * ace/OS_NS_signal.cpp: - * ace/OS_NS_stdio.cpp: - * ace/OS_NS_stdlib.cpp: - * ace/OS_NS_strings.cpp: - * ace/OS_NS_stropts.cpp: - * ace/OS_NS_sys_mman.cpp: - * ace/OS_NS_sys_msg.cpp: - * ace/OS_NS_sys_resource.cpp: - * ace/OS_NS_sys_select.cpp: - * ace/OS_NS_sys_shm.cpp: - * ace/OS_NS_sys_socket.cpp: - * ace/OS_NS_sys_stat.cpp: - * ace/OS_NS_sys_time.cpp: - * ace/OS_NS_sys_uio.cpp: - * ace/OS_NS_sys_utsname.cpp: - * ace/OS_NS_sys_wait.cpp: - * ace/OS_NS_time.cpp: - * ace/OS_NS_unistd.cpp: - * ace/OS_NS_wchar.cpp: - * ace/OS_NS_wctype.cpp: - * ace/OS_TLI.cpp: - * ace/OS_main.cpp: - * ace/Obchunk.cpp: - * ace/Object_Manager.cpp: - * ace/Object_Manager_Base.cpp: - * ace/PI_Malloc.cpp: - * ace/Pagefile_Memory_Pool.cpp: - * ace/Pipe.cpp: - * ace/Priority_Reactor.cpp: - * ace/Process.cpp: - * ace/Process_Mutex.cpp: - * ace/Process_Semaphore.cpp: - * ace/Profile_Timer.cpp: - * ace/RW_Mutex.cpp: - * ace/RW_Process_Mutex.cpp: - * ace/RW_Thread_Mutex.cpp: - * ace/Reactor_Impl.cpp: - * ace/Reactor_Notification_Strategy.cpp: - * ace/Reactor_Timer_Interface.cpp: - * ace/Read_Buffer.cpp: - * ace/Recursive_Thread_Mutex.cpp: - * ace/Recyclable.cpp: - * ace/Registry.cpp: - * ace/Registry_Name_Space.cpp: - * ace/Remote_Tokens.cpp: - * 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_Mcast.cpp: - * ace/SOCK_IO.cpp: - * ace/SOCK_SEQPACK_Acceptor.cpp: - * ace/SOCK_SEQPACK_Association.cpp: - * ace/SOCK_SEQPACK_Connector.cpp: - * ace/SOCK_Stream.cpp: - * ace/SPIPE.cpp: - * ace/SPIPE_Acceptor.cpp: - * ace/SPIPE_Addr.cpp: - * ace/SPIPE_Connector.cpp: - * ace/SPIPE_Stream.cpp: - * ace/SUN_Proactor.cpp: - * ace/SV_Message.cpp: - * ace/SV_Message_Queue.cpp: - * ace/SV_Semaphore_Complex.cpp: - * ace/SV_Semaphore_Simple.cpp: - * ace/SV_Shared_Memory.cpp: - * ace/Sample_History.cpp: - * ace/Sbrk_Memory_Pool.cpp: - * ace/Sched_Params.cpp: - * ace/Select_Reactor_T.cpp: - * ace/Semaphore.cpp: - * ace/Service_Manager.cpp: - * ace/Service_Object.cpp: - * ace/Service_Repository.cpp: - * ace/Service_Types.cpp: - * ace/Shared_Memory.cpp: - * ace/Shared_Memory_MM.cpp: - * ace/Shared_Memory_Pool.cpp: - * ace/Shared_Object.cpp: - * ace/Sig_Adapter.cpp: - * ace/Sig_Handler.cpp: - * ace/Signal.cpp: - * ace/Stack_Trace.cpp: - * ace/Stats.cpp: - * ace/Synch_Options.cpp: - * ace/System_Time.cpp: - * ace/TLI.cpp: - * ace/TLI_Acceptor.cpp: - * ace/TLI_Connector.cpp: - * ace/TLI_Stream.cpp: - * ace/TP_Reactor.cpp: - * ace/TSS_Adapter.cpp: - * ace/TTY_IO.cpp: - * ace/Thread.cpp: - * ace/Thread_Adapter.cpp: - * ace/Thread_Control.cpp: - * ace/Thread_Exit.cpp: - * ace/Thread_Hook.cpp: - * ace/Thread_Mutex.cpp: - * ace/Thread_Semaphore.cpp: - * ace/Throughput_Stats.cpp: - * ace/Time_Value.cpp: - * ace/Timeprobe.cpp: - * ace/Timer_List_T.cpp: - * ace/Token.cpp: - * ace/Token_Invariants.cpp: - * ace/Token_Manager.cpp: - * ace/Token_Request_Reply.cpp: - * ace/Trace.cpp: - * ace/UNIX_Addr.cpp: - * ace/UPIPE_Acceptor.cpp: - * ace/UPIPE_Connector.cpp: - * ace/UPIPE_Stream.cpp: - * ace/UUID.cpp: - * ace/WFMO_Reactor.cpp: - * ace/WIN32_Proactor.cpp: - * ace/XTI_ATM_Mcast.cpp: - * ace/ace_wchar.cpp: - * ace/gethrtime.cpp: - Removed ACE_RCSID - -Thu Aug 5 08:13:51 UTC 2010 Johnny Willemsen - - * ace/CORBA_macros.h: - * ace/Global_Macros.h: - * ace/Vector_T.h: - * ace/ace_wchar.h: - * ace/config-cxx-common.h: - * ace/config-doxygen.h: - * ace/config-g++-common.h: - * ace/config-hpux-11.00.h: - * ace/config-icc-common.h: - * ace/config-integritySCA.h: - * ace/config-macros.h: - * ace/config-netbsd.h: - * ace/config-openvms.h: - * ace/config-suncc-common.h: - * ace/config-sunos5.4-sunc++-4.x.h: - * ace/config-sunos5.5.h: - * ace/config-tandem-nsk-mips-v2.h: - * ace/config-tandem-nsk-mips-v3.h: - * ace/config-unixware-7.1.0.h: - * ace/config-unixware-7.1.0.udk.h: - * ace/config-win32-borland.h: - * ace/config-win32-dmc.h: - * ace/config-win32-ghs.h: - * ace/config-win32-interix.h: - * ace/config-win32-msvc-10.h: - * ace/config-win32-msvc-7.h: - * ace/config-win32-msvc-8.h: - * ace/config-win32-msvc-9.h: - * include/makeinclude/platform_aix.GNU: - * include/makeinclude/platform_aix_g++.GNU: - * include/makeinclude/platform_aix_ibm.GNU: - * include/makeinclude/platform_cray.GNU: - * include/makeinclude/platform_freebsd.GNU: - * include/makeinclude/platform_gnuwin32_common.GNU: - * include/makeinclude/platform_hpux_aCC.GNU: - * include/makeinclude/platform_hpux_gcc.GNU: - * include/makeinclude/platform_integrity_ghs.GNU: - * include/makeinclude/platform_irix6.x_common.GNU: - * include/makeinclude/platform_linux_common.GNU: - * include/makeinclude/platform_lynxos.GNU: - * include/makeinclude/platform_macosx.GNU: - * include/makeinclude/platform_macosx_common.GNU: - * include/makeinclude/platform_macosx_icc.GNU: - * include/makeinclude/platform_macosx_panther.GNU: - * include/makeinclude/platform_netbsd.GNU: - * include/makeinclude/platform_openbsd.GNU: - * include/makeinclude/platform_openvms.GNU: - * include/makeinclude/platform_qnx_rtp_gcc.GNU: - * include/makeinclude/platform_rtems.x_g++.GNU: - * include/makeinclude/platform_sunos5_g++.GNU: - * include/makeinclude/platform_sunos5_sunc++.GNU: - * include/makeinclude/platform_tandem.GNU: - * include/makeinclude/platform_tru64_cxx.GNU: - * include/makeinclude/platform_tru64_g++.GNU: - * include/makeinclude/platform_unixware_g++.GNU: - * include/makeinclude/platform_vxworks5.5.x.GNU: - * include/makeinclude/platform_vxworks6.2.GNU: - * include/makeinclude/platform_vxworks6.3.GNU: - * include/makeinclude/platform_win32_dmc.GNU: - * include/makeinclude/platform_win32_icc.GNU: - * include/makeinclude/platform_win32_interix.GNU: - * include/makeinclude/wrapper_macros.GNU: - * tests/Bug_3673_Regression_Test.cpp: - * tests/Reactor_Exceptions_Test.cpp: - * tests/tests.mpc: - Removed support for non exception builds, ACE_HAS_EXCEPTIONS is - now always defined - - * rpmbuild/ace-tao.spec: - Small updates - - * ace/Exception_Macros.h: - * bin/MakeProjectCreator/config/exceptions.mpb: - Removed these files. - -Thu Aug 5 07:40:00 UTC 2010 Build CZar - - * ace/OS_NS_Thread.cpp: - Add the missing ; to the lines added by the fix below. - Wed Aug 4 14:16:46 UTC 2010 Johnny Willemsen - -Wed Aug 4 17:21:17 UTC 2010 Chris Cleeland - - * bin/MakeProjectCreator/config/crosscompile.mpb: - Added specific clause for cdt6. - -Wed Aug 4 14:16:46 UTC 2010 Johnny Willemsen - - * ace/OS_NS_Thread.cpp: - Check more internal return values - - * rpmbuild/ace-tao.spec-bugfixonly.patch: - Removed this file, not needed - -Tue Aug 3 12:14:51 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - * html/index.html: - DAnCE has its own file now and also some documentation got moved - out of the tao directory - -Sun Aug 1 18:14:03 UTC 2010 Johnny Willemsen - - * NEWS: - * bin/diff-builds-and-group-fixed-tests-only.sh: - * bin/make_release.py: - * docs/Download.html: - * etc/index.html: - Updated because of release - - * debian/*: - Did rename actions the release script didn't do, have to sort this - out later - -Sun Aug 01 11:30:54 CEST 2010 Johnny Willemsen - - * ACE version 5.8.1 released. - -Thu Jul 29 14:41:32 UTC 2010 Steve Huston - - * ace/Process.h (set_handles): Clarify that passing ACE_INVALID_HANDLE - for any of the handle values will cause a duplicate of the - corresponding ACE_STDIN/OUT/ERR to be used in the options. - -Thu Jul 29 10:43:32 UTC 2010 Marcel Smit - - * bin/MakeProjectCreator/config/global.features: - * bin/MakeProjectCreator/config/inetssl.mpb: - * protocols/ace/INet/inet_ssl.mpb: - Created a new feature, inet_ssl. When set, the INet libary - builds, using SSL. To let the INet libary use SSL, one should - enable the inet_ssl feature in default.features and add ssl=1 to - the platform_macos.GNU. - -Mon Jul 26 20:26:53 UTC 2010 Steve Huston - - * ace/OS_NS_Thread.h: Note that the cpu_set_size to the get/set - affinity methods is a byte count. - -Mon Jul 26 07:02:30 UTC 2010 Martin Corino - - * bin/MakeProjectCreator/config/inet.mpb: - * protocols/ace/INet/inet.mpc: - Added avoids += corba_e_compact. - -Thu Jul 22 04:35:30 UTC 2010 Martin Corino - - * bin/MakeProjectCreator/config/inet.mpb: - * protocols/ace/INet/inet.mpc: - Added avoids += ace_for_tao. - -Wed Jul 21 18:23:32 UTC 2010 Douglas C. Schmidt - - * ace/Basic_Types.h (ACE_INT8_FORMAT_SPECIFIER): Added the missing - "_ASCII" to the ACE_INT8_FORMAT_SPECIFIER macro usage. Thanks - to Andre Kostur for reporting - this. - -Wed Jul 21 15:52:32 UTC 2010 Phil Mesnier - - * ace/Service_Gestalt.h: - * ace/Service_Gestalt.inl: - * ace/Service_Gestalt.cpp: - - Reverted for_TAO specific change, revised the processing to - ensure default first, then files, then cmdline directives. - -Wed Jul 21 03:07:28 UTC 2010 Phil Mesnier - - * ace/Service_Gestalt.h: - * ace/Service_Gestalt.cpp: - - Fix errors in premature committal. - -Wed Jul 21 02:30:45 UTC 2010 Phil Mesnier - - * ace/Service_Gestalt.h: - * ace/Service_Gestalt.inl: - * ace/Service_Gestalt.cpp: - - Add a specialized open method to be called by TAO. TAO depends - on a modified order of directive evaluation. - -Tue Jul 20 18:02:03 UTC 2010 Johnny Willemsen - - * docs/Download.html: - Fixed some typos, thanks to Thomas Lockhart - for reporting this - -Tue Jul 20 15:08:49 UTC 2010 Phil Mesnier - - * tests/Bug_3319_Regression_Test.cpp: - - Fix the test to be consistent with revised service config - behavior. The test had assumed that ACE_Service_Config::open() - would return 0 even if svc.conf were not present, but since it - was setting the ignore_default_svc_conf_file to 0, the restore - behavior of the service configurator is to fail with ENOENT in - that case. - -Tue Jul 20 08:48:00 UTC 2010 Vladimir Zykov - - * ace/TSS_T.cpp: - Fixed a bug in ACE_TSS::ts_get() that only exhibited on - SunOS/Studio builds. The later configutsyion uses ACE_HAS_THR_C_DEST - and with that define ts_get() behaved differently. In particular it - didn't create a ts_obj if tss_adapter was not 0. - -Tue Jul 20 07:38:30 UTC 2010 Martin Corino - - * protocols/ace/INet/SSL_CallbackManager.h: - Fixed comment typo. - -Tue Jul 20 05:25:30 UTC 2010 Martin Corino - - * protocols/ace/INet/HTTP_BasicAuthentication.cpp: - * protocols/ace/INet/HTTP_BasicAuthentication.h: - * protocols/ace/INet/HTTP_BasicAuthentication.inl: - * protocols/ace/INet/inet.mpc: - Added basic support for HTTP Basic Authentication scheme. - -Tue Jul 20 03:56:30 UTC 2010 Martin Corino - - * protocols/ace/INet/HTTP_SessionBase.cpp: - Fixed MSVC 7.1 compile problems. - - * protocols/ace/INet/HTTP_Simple_exec.cpp: - Fixed compile problems for non-SSL builds. - -Tue Jul 20 03:25:30 UTC 2010 Martin Corino - - * bin/MakeProjectCreator/config/inetssl.mpb: - * protocols/ace/INet/inet_ssl.mpb: + * ace/Task_T.inl: + * ace/Time_Policy_T.inl: Fuzz fixes. -Mon Jul 19 11:50:59 UTC 2010 Vladimir Zykov +Thu Aug 16 09:43:00 UTC 2012 Simon Massey - * ace/TSS_T.inl: - * ace/TSS_T.h: - * ace/TSS_T.cpp: - Mostly fixed bug 3539. It doesn't fix a case when main thread - doesn't own ACE_TSS but still uses it. Fixing the later is not - straight forward and will require a lot more efforts. - Also rearranged the code so that it has less duplicates. + * test/Bug_3943_Regression_Test.cpp: + Another cast required to remove warning. + +Thu Aug 16 09:22:31 UTC 2012 Martin Corino + + * ace/Condition_Attributes.h: + * ace/Condition_Attributes.inl: + * ace/Condition_Attributes.cpp: + * ace/Condition_Recursive_Thread_Mutex.h: + * ace/Condition_Recursive_Thread_Mutex.cpp: + * ace/Condition_T.h: + * ace/Condition_T.cpp: + * ace/Condition_Thread_Mutex.h: + * ace/Condition_Thread_Mutex.inl: + * ace/Condition_Thread_Mutex.cpp: + * ace/Message_Queue.h: + * ace/Message_Queue_T.h: + * ace/Message_Queue_T.cpp: + * ace/Module.h: + * ace/Module.inl: + * ace/Module.cpp: + * ace/Monotonic_Time_Policy.h: + * ace/Monotonic_Time_Policy.inl: + * ace/Monotonic_Time_Policy.cpp: + * ace/Null_Condition.h: + * ace/OS_NS_Thread.h: + * ace/OS_NS_Thread.inl: + * ace/OS_NS_Thread.cpp: + * ace/Stream.h: + * ace/Stream.inl: + * ace/Stream.cpp: + * ace/Stream_Modules.h: + * ace/Stream_Modules.cpp: + * ace/Synch_Traits.h: + * ace/Task_Ex_T.h: + * ace/Task_Ex_T.inl: + * ace/Task_Ex_T.cpp: + * ace/Task_T.h: + * ace/Task_T.inl: + * ace/Task_T.cpp: + * ace/Thread_Manager.h: + * ace/Thread_Manager.cpp: + * ace/Thread_Mutex.h: + * ace/Time_Policy.h: + * ace/Time_Policy.inl: + * ace/Time_Policy.cpp: + * ace/Time_Policy_T.h: + * ace/Time_Policy_T.inl: + * ace/Time_Policy_T.cpp: + * ace/Time_Value.h: + * ace/Time_Value.cpp: + * ace/Time_Value_T.h: + * ace/Time_Value_T.inl: + * ace/Time_Value_T.cpp: + * ace/ace.mpc: + * ace/ace_for_tao.mpc: + Added a Monotonic time policy and a Time_Value template + supporting time policies. Refactored OS_NS_Thread time + calculations to use new time policy aware functionality + of time values. Added support for monotonic timers with + condition variables in message queues, tasks and related + classes. See NEWS file and new regression tests for more + details. + Full backward compatibility is maintained. + + * tests/Bug_4055_Regression_Test.cpp: + Updated to fixed state. + + * tests/Monotonic_Message_Queue_Test.cpp: + * tests/Monotonic_Task_Test.cpp: * tests/run_test.lst: - Marked the test as fixed. + * tests/tests.mpc: + Added new monotonic timer regression tests. -Mon Jul 19 09:15:30 UTC 2010 Martin Corino + * NEWS: + Added detailed update descriptions. - * bin/MakeProjectCreator/config/inet.mpb: - * bin/MakeProjectCreator/config/global.features: - * protocols/ace/INet/inet.mpc: - Added new feature 'exclude_inet' to allow builds to - explicitly exclude building INet. +Thu Aug 16 09:24:00 UTC 2012 Simon Massey -Mon Jul 19 08:49:30 UTC 2010 Martin Corino + * bin/PerlACE/Process_Win32.pm: + * bin/PerlACE/ProcessVX_Win32.pm: - * protocols/ace/INet/HTTPS_Session.cpp: - * protocols/ace/INet/HTTPS_Session.h: - Fixed compile errors byadding version check to disable - 'relatively' new OpenSSL functionality for builds using - outdated OpenSSL installations (OpenSSL <= 0.9.8e). + If we wait for a process to exit, and it does, set the RUNNING status to false. -Sat Jul 17 14:06:30 UTC 2010 Martin Corino +Thu Aug 16 08:26:12 UTC 2012 Olli Savia - * protocols/ace/INet/ClientRequestHandler.h: - * protocols/ace/INet/URLBase.h: - Some include shuffling to fix an incomplete type warning - with MSVC. + * tests/tests.mpc: + Bug_4055_Regression_Test uses threads. -Sat Jul 17 11:39:30 UTC 2010 Martin Corino +Wed Aug 15 14:10:00 UTC 2012 Simon Massey - * protocols/ace/INet/inet_ssl.mpb: - Replaced ace_openssl base project by ssl. Fixes missing - ACE_SSL lib link errors. + * test/Bug_3911_Regression_Test.cpp: + * test/Bug_3943_Regression_Test.cpp: - * protocols/ace/INet/SSL_CallbackManager.cpp: - Fixed MSVC compile errors. + Some compilers warning against ordering pointers with integers. -Sat Jul 17 10:26:30 UTC 2010 Martin Corino +Wed Aug 15 11:42:28 UTC 2012 Johnny Willemsen - * bin/MakeProjectCreator/config/inetssl.mpb: - * bin/MakeProjectCreator/config/inet.mpb: - Added feature project for SSL based parts of INet. - Setting feature ssl=1 will automatically cause correct - dependencies for SSL to be generated in INet based projects. + * include/makeinclude/platform_linux_clang.GNU: + Support for c++0x flag - * protocols/ace/INet/HTTPS_Context.cpp: - * protocols/ace/INet/HTTPS_Context.h: - * protocols/ace/INet/HTTPS_Context.inl: - * protocols/ace/INet/HTTP_SessionBase.cpp: - * protocols/ace/INet/HTTP_SessionBase.h: - * protocols/ace/INet/HTTP_SessionBase.inl: - * protocols/ace/INet/HTTPS_Session.cpp: - * protocols/ace/INet/HTTPS_SessionFactory.cpp: - * protocols/ace/INet/HTTPS_SessionFactory.h: - * protocols/ace/INet/HTTPS_Session.h: - * protocols/ace/INet/HTTPS_URL.cpp: - * protocols/ace/INet/HTTPS_URL.h: - * protocols/ace/INet/HTTPS_URL.inl: - * protocols/ace/INet/SSL_CallbackManager.cpp: - * protocols/ace/INet/SSL_CallbackManager.h: - * protocols/ace/INet/SSL_CallbackManager.inl: - * protocols/ace/INet/SSL_CertificateCallback.cpp: - * protocols/ace/INet/SSL_CertificateCallback.h: - * protocols/ace/INet/SSL_CertificateCallback.inl: - * protocols/ace/INet/SSL_PasswordCallback.cpp: - * protocols/ace/INet/SSL_PasswordCallback.h: - * protocols/ace/INet/SSL_Proxy_Connector.cpp: - * protocols/ace/INet/SSL_Proxy_Connector.h: - * protocols/ace/INet/SSLSock_IOStream.cpp: - * protocols/ace/INet/SSLSock_IOStream.h: - * protocols/ace/INet/SSL_X509Cert.cpp: - * protocols/ace/INet/SSL_X509Cert.h: - * protocols/ace/INet/SSL_X509Cert.inl: - New files implementing SSL/HTTPS support. - Includes support for proxy CONNECT tunneling. +Wed Aug 15 11:29:48 UTC 2012 Johnny Willemsen - * protocols/ace/INet/inet_ssl.mpb: - Feature project which will include SSL/HTTPS support - into INet when MPC feature ssl=1 is set. + * include/makeinclude/platform_clang_common.GNU: + Support for c++0x flag - * protocols/ace/INet/ClientRequestHandler.cpp: - * protocols/ace/INet/ClientRequestHandler.h: - * protocols/ace/INet/ConnectionCache.cpp: - * protocols/ace/INet/ConnectionCache.h: - * protocols/ace/INet/FTP_ClientRequestHandler.cpp: - * protocols/ace/INet/FTP_URL.cpp: - * protocols/ace/INet/FTP_URL.h: - * protocols/ace/INet/FTP_URL.inl: - * protocols/ace/INet/HeaderBase.h: - * protocols/ace/INet/HTTP_ClientRequestHandler.cpp: - * protocols/ace/INet/HTTP_ClientRequestHandler.h: - * protocols/ace/INet/HTTP_ClientRequestHandler.inl: - * protocols/ace/INet/HTTP_Session.cpp: - * protocols/ace/INet/HTTP_Session.h: - * protocols/ace/INet/HTTP_StreamPolicyBase.h: - * protocols/ace/INet/HTTP_StreamPolicy.h: - * protocols/ace/INet/HTTP_URL.cpp: - * protocols/ace/INet/HTTP_URL.h: - * protocols/ace/INet/HTTP_URL.inl: - * protocols/ace/INet/inet.mpc: - * protocols/ace/INet/RequestHandler.h: - * protocols/ace/INet/StreamHandler.cpp: - * protocols/ace/INet/StreamInterceptor.h: - * protocols/ace/INet/URLBase.h: - Some redesign to accomodate addition of HTTPS. - Some additional logging. - Some additional documentation. +Tue Aug 14 22:22:05 UTC 2012 Adam Mitz - * protocols/ace/INet/HTTP_Simple_exec.cpp: - Extended to include HTTPS support. + * ace/config-vxworks6.8.h: - * protocols/tests/INet/MT_Get/Main.cpp: - Added some traces. + When building for VxWorks kernel mode, define ACE_LACKS_STD_WSTRING. -Fri Jul 16 22:08:05 UTC 2010 Phil Mesnier +Tue Aug 14 06:35:54 UTC 2012 Johnny Willemsen - * ace/Service_Gestalt.h: - * ace/Service_Gestalt.cpp: + * bin/valgrind.supp: + Extended suppression list - Further refinement of service initialization process. This - restores the order of processing, and is more explicit about - handling a defaulted svc.conf. +Thu Aug 9 07:03:10 UTC 2012 Johnny Willemsen -Thu Jul 15 17:53:47 UTC 2010 Phil Mesnier + * docs/bczar/bczar.html: + Added packages - * ace/Service_Gestalt.cpp: - * THANKS: + * include/makeinclude/platform_g++_common.GNU: + Use -Wno-deprecated with C++11 due to the heavy usage of auto_ptr - Restore pre-gestalt behavior of returning -1 if svc.conf does - not exist and an ACE_Service_Config::open() is expecting to use - the default file. + * tests/randomize.h: + Doxygen fix - Thanks to Daynesh Mangal (daynesh@gmail.com) for reporting the - errant behavior. +Wed Aug 8 22:13:55 UTC 2012 Adam Mitz -Thu Jul 15 12:53:53 UTC 2010 Johnny Willemsen + * ace/ACE.cpp: + * ace/ACE_crc_ccitt.cpp: + * ace/Basic_Types.h: + * ace/Configuration_Import_Export.cpp: + * ace/Handle_Set.inl: + * ace/INET_Addr.inl: + * ace/Message_Queue_Vx.inl: + * ace/Name_Request_Reply.cpp: + * ace/OS_NS_stdlib.cpp: + * ace/OS_NS_unistd.inl: + * ace/Select_Reactor_T.inl: + * ace/Service_Config.cpp: + * ace/Stack_Trace.cpp: + * ace/UUID.cpp: + * ace/config-vxworks6.9.h: + * include/makeinclude/platform_vxworks6.8.GNU: + * include/makeinclude/platform_vxworks6.9.GNU: + + Enable compiling for 64-bit VxWorks 6.9 (x86 RTP static). + +Wed Aug 8 15:30:00 UTC 2012 Simon Massey + + * ace/config-linux.h: + + According to man pages Linux uses different (compared to UNIX systems) types + for setting IP_MULTICAST_TTL and IPV6_MULTICAST_LOOP / IP_MULTICAST_LOOP + in setsockopt/getsockopt. + In the current (circa 2012) kernel source however there is an explicit check + for IPV6_MULTICAST_LOOP being sizeof(int). Anything else is rejected so it must + not be a passed a bool, irrespective of what the man pages (still) say. + i.e. #define ACE_HAS_IPV6_MULTICAST_LOOP_AS_BOOL 1 is wrong. + + * ace/SOCK_Dgram_Mcast.h: + * ace/SOCK_Dgram_Mcast.inl: + + Override read/write acessor for the constructor options + This class is typically default instantiated in a connection handler templated + framework so these cannot be specified on construction. + +Mon Aug 6 20:54:17 UTC 2012 Adam Mitz + + * bin/PerlACE/TestTarget.pm: + + Updated fix from Fri Jul 20 17:37:27 UTC 2012 to work when + one of source or destination is a relative path and other is not. + +Sat Jul 28 19:22:06 UTC 2012 Johnny Willemsen + + * bin/make_release.py: + Fixed exclude + +Fri Jul 27 10:55:51 UTC 2012 Johnny Willemsen * etc/ace.doxygen: * etc/ace_inet.doxygen: - * etc/ace_man.doxygen: * etc/ace_qos.doxygen: * etc/ace_rmcast.doxygen: * etc/ace_ssl.doxygen: * etc/acexml.doxygen: - Generate deprecated/todo pages + Generate UML diagrams, assume stl is buildin -Thu Jul 15 12:35:30 UTC 2010 Martin Corino +Fri Jul 27 08:57:07 UTC 2012 Johnny Willemsen - * ace/SSL/SSL_SOCK_Stream.h: - * ace/SSL/SSL_SOCK_Stream.inl: - Added two method overloads available in ACE_SOCK_Stream but - missing from ACE_SSL_SOCK_Stream. - -Thu Jul 15 09:49:28 UTC 2010 Johnny Willemsen - - * ace/config-doxygen.h: - Added ACE_HAS_POSITION_INDEPENDENT_POINTERS - -Thu Jul 15 09:29:58 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: + * etc/ace.doxygen: * etc/ace_inet.doxygen: - * html/index.html: - Added ACE INet library + * etc/ace_qos.doxygen: + * etc/ace_rmcast.doxygen: + * etc/ace_ssl.doxygen: + * etc/acexml.doxygen: + Upgraded with doxygen -u -Thu Jul 15 09:11:51 UTC 2010 William R. Otte +Thu Jul 26 16:22:35 UTC 2012 Johnny Willemsen - * ace/config-macosx-snowleopard.h: - * include/makeinclude/platform_clang_common.GNU: - * include/makeinclude/platform_macosx_common.GNU: + * bin/make_release.py: + * docs/bczar/bczar.html: + Improved instructions - Preliminary support for clang compiler. +Thu Jul 26 14:40:45 UTC 2012 Johnny Willemsen -Tue Jul 13 14:39:55 UTC 2010 Johnny Willemsen + * docs/bczar/bczar.html: + Set all environment variables explicitly before running the doxygen + script + +Thu Jul 26 10:19:34 UTC 2012 Johnny Willemsen + + * ace/ARGV.h: + * ace/Arg_Shifter.h: + Doxygen improvements + + * rpmbuild/ace-tao.spec: + Removed ACE_XML_Utils, only compiled when xercesc is enabled + +Thu Jul 26 09:31:19 UTC 2012 Johnny Willemsen * NEWS: - Updated + Updated for next release -Tue Jul 13 14:33:23 UTC 2010 Johnny Willemsen + * bin/diff-builds-and-group-fixed-tests-only.sh: + * bin/make_release.py: + * docs/Download.html: + * docs/bczar/bczar.html: + Updated for x.1.3 release - * ace/Cached_Connect_Strategy_T.h: - * ace/Capabilities.h: - Doxygen fixes + * etc/ace.doxygen: + * etc/ace_inet.doxygen: + * etc/ace_qos.doxygen: + * etc/ace_rmcast.doxygen: + * etc/ace_ssl.doxygen: + * etc/acexml.doxygen: + * etc/index.html: + Removed deprecated tag -Tue Jul 13 14:20:09 UTC 2010 Johnny Willemsen +Thu Jul 26 09:12:26 CEST 2012 Johnny Willemsen - * ace/os_include/os_errno.h: - Fixed problems with msvc 10, , thanks to Max Zhou - for supplying these changes, this fixes - bugzilla 3873 + * ACE version 6.1.3 released. -Tue Jul 13 11:08:38 UTC 2010 Johnny Willemsen +Fri Jul 20 17:37:27 UTC 2012 Adam Mitz - * bin/MakeProjectCreator/config/vc10nmake.mpb: - * netsvcs/lib/lib.mpc: - vc10 support, thanks to Max Zhou for - supplying these changes + * ace/config-vxworks6.8.h: + * ace/config-vxworks6.9.h: -Mon Jul 12 11:04:58 UTC 2010 Johnny Willemsen + Changes to build for VxWorks 6.8 kernel mode. - * ace/ACE.cpp: - * ace/Activation_Queue.h: - * ace/Active_Map_Manager.h: - * ace/Dev_Poll_Reactor.h: - * ace/Dev_Poll_Reactor.inl: - * ace/Event_Handler.h: - * ace/Filecache.h: - * ace/Manual_Event.h: - * ace/Map_Manager.h: - * ace/Mem_Map.h: - * ace/Message_Block.h: - * ace/OS_Log_Msg_Attributes.h: - * ace/OS_NS_unistd.h: - * ace/Object_Manager.h: - * ace/Recursive_Thread_Mutex.h: - Layout, const, and doxygen fixes + * bin/PerlACE/ProcessVX_Win32.pm: + * tests/run_test.lst: -Mon Jul 12 10:11:24 UTC 2010 Johnny Willemsen + Changes for VxWorks testing. + + * bin/PerlACE/TestTarget.pm + + Fixed a Perl bug (ne vs. !=). + +Wed Jul 18 15:40:05 UTC 2012 Douglas C. Schmidt + + * Happy 50th Birthday to me! + +Tue Jun 26 21:47:18 UTC 2012 Adam Mitz + + * bin/valgrind.supp: + + Made the suppression for dlopen more generic, so that it + can work for different linux/glibc versions. + +Tue Jun 26 13:18:13 UTC 2012 Johnny Willemsen + + * tests/Bug_4055_Regression_Test.cpp: + Added commented out way to get the hr time + +Mon Jun 25 17:40:35 UTC 2012 Johnny Willemsen + + * tests/Bug_4055_Regression_Test.cpp: + * tests/run_test.lst: + * tests/tests.mpc: + Added new unit test which currently fails. The ACE condition + variables use an absolute timeout. If we for example wait for a + timeout 3 seconds in the future and the system time is changed 10 + seconds back we are really waiting 13 seconds now. The ACE timer + queues have support for using a monotonic time source using the + time policies but this support is not available for conditions at + this moment. When that is added, than in the ACE threading code + the monotonic time source can be set on the pthread condition + to control that we want to use a monotonic time source. + +Mon Jun 25 09:31:34 UTC 2012 Johnny Willemsen + + * ace/Condition_Attributes.h: + * ace/Condition_Attributes.inl: + * ace/Condition_Attributes.cpp: + * ace/Condition_Recursive_Thread_Mutex.h: + * ace/Condition_Thread_Mutex.h: + * ace/Condition_Thread_Mutex.inl: + * ace/ace.mpc: + * ace/ace_for_tao.mpc: + Moved condition attributes to its own file + +Fri Jun 22 00:30:11 UTC 2012 James H. Hill + + * tests/CDR_Test.cpp: + + Fixed compilation warnings on CentOS 3.9 and vc9 + +Thu Jun 21 17:08:55 UTC 2012 Johnny Willemsen * ace/DLL.h: * ace/DLL_Manager.h: - * ace/Dirent.h: - * ace/Dump_T.h: - * ace/Event_Handler.h: - * ace/File_Lock.h: - * ace/INET_Addr.h: - * ace/Log_Msg_Callback.h: - * ace/Log_Record.h: - * ace/Logging_Strategy.h: - Fixed set of doxygen warnings + * ace/DLL_Manager.cpp: + Changed the order that the ACE_DLL_Manager attempts to open a library + Foo so that it will try Foo. before + Foo.. This makes library loading using ACE succeed + on the first try instead of the fourth on any platform requiring a + library prefix, like Linux. For platforms that don't have a prefix + it will also succeed on the first time. Thanks to Trent Nadeau + for providing this improvement -Mon Jul 12 08:19:58 UTC 2010 Johnny Willemsen +Wed Jun 20 12:54:29 UTC 2012 James H. Hill - * ace/Connector.h: - * ace/Malloc_Base.h: - * ace/SString.h: - * ace/Stream.h: - * ace/Task.h: - Fixed set of doxygen warnings + * tests/CDR_Test.cpp: -Fri Jul 09 09:35:30 UTC 2010 Martin Corino + Fixed error in test execution. - * bin/PerlACE/Process_Unix.pm: - Fix killall() valgrind handling. +Mon Jun 18 20:40:29 UTC 2012 James H. Hill -Thu Jul 08 14:41:30 UTC 2010 Martin Corino + * ace/CDR_Stream.h: + * ace/CDR_Stream.cpp: + * tests/CDR_Test.cpp: - * bin/PerlACE/Process_Unix.pm: - Fix killall() valgrind handling. + Extended ACE_OutputCDR placeholders to support all ACE_CDR + simple types. -Thu Jul 08 07:56:30 UTC 2010 Martin Corino +Mon Jun 18 13:20:32 UTC 2012 Johnny Willemsen - * bin/PerlACE/Process_Unix.pm: - Make killall() recognize and handle valgrind runs correctly. + * bin/auto_run_tests.pl: + Use -z for debug mode -Wed Jul 7 14:53:12 UTC 2010 Vladimir Zykov +Mon Jun 18 06:44:11 UTC 2012 Johnny Willemsen - * tests/run_test.lst: - * tests/Bug_3539_Regression_Test.cpp: - * tests/tests.mpc: - Added a test for bug 3539 as non-fixed. + * debian/*: + Updated with latest files from debian packaging -Wed Jul 7 11:43:16 UTC 2010 Johnny Willemsen +Thu Jun 14 14:05:13 UTC 2012 Johnny Willemsen + + * ace/XML_Utils/XML_Error_Handler.cpp: + Only print errors on cerr when we have ACE::debug enabled + +Wed Jun 13 05:57:16 UTC 2012 Johnny Willemsen * docs/bczar/bczar.html: - Extended instructions + Added another package -Tue Jul 6 12:28:43 UTC 2010 Johnny Willemsen +Tue Jun 12 17:30:47 UTC 2012 Johnny Willemsen - * docs/Download.html: - CIAO is also online available + * bin/make_release.py: + Exclude CIAO_*_OpenDDS workspaces for the moment -Tue Jul 6 11:29:41 UTC 2010 Johnny Willemsen +Mon Jun 11 21:45:19 UTC 2012 Adam Mitz - * ace/Message_Queue_T.cpp: - * ace/Service_Repository.h: - * ace/Task_T.h: - Fixed doxygen warnings + * NEWS: + * ace/config-lite.h: + * include/makeinclude/platform_sunos5_sunc++.GNU: -Tue Jul 6 11:22:08 UTC 2010 Johnny Willemsen + Added support for Oracle Solaris Studio 12 Update 3 (SunCC 5.12). - * etc/ace.doxygen: - Improved doxygen configuration +Mon Jun 11 17:05:36 UTC 2012 Johnny Willemsen -Tue Jul 6 11:11:06 UTC 2010 Johnny Willemsen - - * etc/ace.doxygen: - * etc/ace_man.doxygen: - * etc/ace_qos.doxygen: - * etc/ace_rmcast.doxygen: - * etc/ace_ssl.doxygen: - * etc/acexml.doxygen: - Reduced the size of the colloboration graphs - -Mon Jul 5 15:20:14 UTC 2010 Johnny Willemsen - - * rpmbuild/ace-tao.spec: - Removed some test code - -Mon Jul 5 14:59:25 UTC 2010 Johnny Willemsen - - * rpmbuild/ace-tao.spec: - Added missing file, thanks to Anatoli Sakhnik - for reporting this, this should fix - bugzilla 3870 - -Mon Jul 05 14:32:30 UTC 2010 Martin Corino - - * bin/PerlACE/Process_Unix.pm: - Fixes problem with killall() function being not selective enough. - -Mon Jul 5 13:56:57 UTC 2010 Johnny Willemsen - - * etc/ace.doxygen: - * etc/ace_qos.doxygen: - * etc/ace_rmcast.doxygen: - * etc/ace_ssl.doxygen: - * etc/acexml.doxygen: - Disable include and included graphs, this should reduce the size - of the documentation a lot - -Mon Jul 5 13:29:23 UTC 2010 Johnny Willemsen - - * bin/generate_doxygen.pl: - Some preparations to move the DAnCE doxygen files to DAnCE - - * docs/bczar/bczar.html: - Updated release notes, made it possible to generate doxygen on - a regular system instead of on naboo, the side effect is that the - doxygen packages on naboo are 350Mb, on FC13 with all latest tools - they are 1.4GB - -Mon Jul 5 11:22:09 UTC 2010 Johnny Willemsen - - * ace/Select_Reactor_Base.cpp: - Fixed doxygen warning - - * etc/ace.doxygen: - * etc/ace_man.doxygen: - * etc/ace_qos.doxygen: - * etc/ace_rmcast.doxygen: - * etc/ace_ssl.doxygen: - * etc/acexml.doxygen: - Define ACE_INLINE as inline and not as 1 - -Mon Jul 5 10:56:15 UTC 2010 Johnny Willemsen - - * rpmbuild/ace-tao.spec-release.patch: - Removed this file. - -Mon Jul 5 09:11:21 UTC 2010 Johnny Willemsen - - * docs/Download.html: - Removed link to very old patches and fixed typo - -Mon Jul 5 09:05:43 UTC 2010 Johnny Willemsen - - * docs/Download.html: - Updated filenames in text - -Mon Jul 5 08:57:09 UTC 2010 Johnny Willemsen - - * docs/Download.html: - Update latest minor release to x.8.0 - -Mon Jul 5 08:19:17 UTC 2010 Johnny Willemsen + * bin/auto_run_tests.pl: + Added option -d to run OpenDDS tests also * bin/diff-builds-and-group-fixed-tests-only.sh: - Updated for x.8.0 + Also check OpenDDS lst files - * bin/generate_rel_manpages: - Remove restriction to run on naboo, removed doxygen check, updated - error message +Thu Jun 7 10:13:13 UTC 2012 Johnny Willemsen - * docs/Download.html: - Updated to x.8.0 + * ace/Condition_Thread_Mutex.h: + * ace/Dynamic_Message_Strategy.h: + * ace/Message_Queue.h: + * ace/Metrics_Cache_T.h: + Doxygen fixes - * etc/ace.doxygen: - Layout changes +Wed Jun 6 14:46:53 UTC 2012 Johnny Willemsen - * etc/index.html: - Added 5.8 + * ace/XML_Utils/XSCRT/Traversal.hpp: + * ace/XML_Utils/XSCRT/Traversal.tpp: + Readded tpp file, shouldn't have been deleted + +Wed Jun 6 13:09:02 UTC 2012 Johnny Willemsen + + * ace/XML_Utils/XMLSchema/Traversal.hpp: + * ace/XML_Utils/XMLSchema/Types.hpp: + * ace/XML_Utils/XMLSchema/Writer.hpp: + * ace/XML_Utils/XSCRT/Elements.hpp: + * ace/XML_Utils/XSCRT/Parser.hpp: + * ace/XML_Utils/XSCRT/Traversal.hpp: + * ace/XML_Utils/XSCRT/Writer.hpp: + * ace/XML_Utils/XSCRT/XML.hpp: + Removed includes + + * ace/XML_Utils/XMLSchema/Traversal.tpp: + * ace/XML_Utils/XMLSchema/Types.tpp: + * ace/XML_Utils/XMLSchema/Writer.tpp: + * ace/XML_Utils/XSCRT/Elements.tpp: + * ace/XML_Utils/XSCRT/Parser.tpp: + * ace/XML_Utils/XSCRT/Traversal.tpp: + * ace/XML_Utils/XSCRT/Writer.tpp: + * ace/XML_Utils/XSCRT/XML.tpp: + Removed these files. + +Wed Jun 6 10:27:33 UTC 2012 Johnny Willemsen + + * ace/XML_Utils/XML.mpc: + Install fixes + +Wed Jun 6 08:12:22 UTC 2012 Johnny Willemsen + + * ace/XML_Utils/XML.mpc: + Install fixes + +Fri Jun 1 12:43:48 UTC 2012 Johnny Willemsen + + * ace/Condition_Thread_Mutex.cpp: + * ace/Message_Queue_T.h: + * ace/Message_Queue_T.cpp: + * ace/Thread_Semaphore.h: + * ace/Time_Policy.h: + * ace/Timer_Hash_T.h: + Doxygen fixes + +Thu May 31 14:05:51 UTC 2012 Johnny Willemsen * rpmbuild/ace-tao.spec: - Changed version numbers to x.8.0 and added new ACE INet library + Added new library -Sun Jul 04 18:57:33 CEST 2010 Johnny Willemsen +Thu May 31 12:31:38 UTC 2012 Johnny Willemsen - * ACE version 5.8 released. + * ace/XML_Utils/XMLSchema: + * ace/XML_Utils/XMLSchema/Traversal.hpp: + * ace/XML_Utils/XMLSchema/TypeInfo.hpp: + * ace/XML_Utils/XMLSchema/Types.hpp: + * ace/XML_Utils/XMLSchema/Writer.hpp: + * ace/XML_Utils/XMLSchema/id_map.hpp: + * ace/XML_Utils/XSCRT: + * ace/XML_Utils/XSCRT/Elements.hpp: + * ace/XML_Utils/XSCRT/ExtendedTypeInfo.hpp: + * ace/XML_Utils/XSCRT/Parser.hpp: + * ace/XML_Utils/XSCRT/Traversal.hpp: + * ace/XML_Utils/XSCRT/Writer.hpp: + * ace/XML_Utils/XSCRT/XML.hpp: + * ace/XML_Utils/XSCRT/XMLSchema.hpp: + Moved these files from DAnCE to ACE + + * ace/XML_Utils/XSCRT/Elements.ipp: + * ace/XML_Utils/XSCRT/Parser.ipp: + * ace/XML_Utils/XSCRT/Traversal.ipp: + * ace/XML_Utils/XSCRT/Writer.ipp: + * ace/XML_Utils/XSCRT/XML.ipp: + Removed these files. + +Thu May 31 09:12:07 UTC 2012 Johnny Willemsen + + * ace/XML_Utils: + * ace/XML_Utils/XML.mpc: + * ace/XML_Utils/XML_Error_Handler.h: + * ace/XML_Utils/XML_Helper.h: + * ace/XML_Utils/XML_Schema_Resolver.h: + * bin/MakeProjectCreator/config/ace_xml_utils.mpb: + New ACE_XML_Utils library. This is coming from DAnCe and had to + move to ACE because it is now used in more places and soon will + also be used by OpenDDS + +Thu May 31 07:57:59 UTC 2012 Johnny Willemsen + + * ace/High_Res_Timer.h: + * ace/Message_Block.h: + Doxygen improvements + + * ace/High_Res_Timer.inl: + Use gsf type to prevent overflow + + * docs/bczar/bczar.html: + Added some more packages + +Thu May 24 14:35:04 UTC 2012 Steve Huston + + * ace/Cache_Map_Manager_T.cpp (find): Remove extraneous () from + 'second' - leftover from ACE_Pair days. + + * tests/Cache_Map_Manager_Test.cpp: Add call to the above method. + + * THANKS: Thanks to Milind Pangarkar for the above test, and fix. + +Thu May 24 07:58:53 UTC 2012 Johnny Willemsen + + * ace/High_Res_Timer.h: + * ace/config-win32-msvc.h: + Documentation updates + + * ace/High_Res_Timer.inl: + Layout changes + + * ace/High_Res_Timer.cpp: + Use this + +Thu May 24 05:56:27 UTC 2012 Johnny Willemsen + + * bin/MakeProjectCreator/config/MPC.cfg: + Added XSC_ROOT + + * bin/valgrind.supp: + Simplified this file + +Mon May 21 18:05:32 UTC 2012 Johnny Willemsen + + * tests/INTEGRITY.ld: + Removed this file. + +Mon May 21 07:15:10 UTC 2012 Johnny Willemsen + + * NEWS: + * bin/diff-builds-and-group-fixed-tests-only.sh: + * docs/Download.html: + * docs/bczar/bczar.html: + * etc/index.html: + Updated for new release + +Sat May 19 14:28:57 CEST 2012 Johnny Willemsen + + * ACE version 6.1.2 released. + +Thu May 17 16:16:09 UTC 2012 Adam Mitz + + * ACE-INSTALL.html: + + Replaced the make flag static_libs with static_libs_only. + Using static_libs implies that both static and shared can + be built at the same time, which is not true in general. + +Thu May 17 15:42:36 UTC 2012 Steve Huston + + * ace/Reactor.h: Clarified the timeout conditions on + run_reactor_event_loop(). Thank you to Mohsin Zaidi for this + clarification. + + * THANKS: Added Mohsin Zaidi to the Hall of Fame. + +Wed May 16 17:41:21 UTC 2012 Steve Huston + + * ace/OS_NS_Thread.cpp (ACE_Thread_ID::to_string): Use string literals + for the sprintf formats rather than build them up. Things have + simplified to the point we don't need that any longer. Thanks to + Rick Ohnemus for providing the patch. Fixes Bugzilla #4021. + +Wed May 16 06:44:23 UTC 2012 Johnny Willemsen + + * tests/run_test.lst: + * tests/tests.mpc: + * tests/Bug_4008_Regression_Test.cpp: + Removed bug 4008 test, it was testing incorrect assumptions + +Wed May 16 06:42:45 UTC 2012 Johnny Willemsen + + * ace/Basic_Types.h: + * ace/Basic_Types.cpp: + * ace/Functor.inl: + * ace/High_Res_Timer.inl: + * ace/OS_NS_time.h: + * ace/OS_NS_time.inl: + * tests/Basic_Types_Test.cpp: + * tests/Bug_2434_Regression_Test.cpp: + * tests/Time_Value_Test.cpp: + More cleanup due to removal of NSK + + * ace/Basic_Types.inl: + Removed this file. + +Tue May 15 18:16:09 UTC 2012 Johnny Willemsen + + * ace/ACE.inl: + * ace/Atomic_Op_T.h: + * ace/Basic_Types.h: + * ace/Basic_Types.inl: + * ace/Basic_Types.cpp: + * ace/CDR_Base.h: + * ace/Functor.h: + * ace/Functor.inl: + * ace/Handle_Set.cpp: + * ace/High_Res_Timer.cpp: + * ace/Log_Msg.cpp: + * ace/Numeric_Limits.h: + * ace/OS_NS_Thread.inl: + * ace/OS_NS_Thread.cpp: + * ace/OS_NS_stdlib.inl: + * ace/OS_NS_sys_select.inl: + * ace/OS_NS_sys_wait.inl: + * ace/OS_NS_time.h: + * ace/OS_NS_time.inl: + * ace/OS_NS_unistd.inl: + * ace/Profile_Timer.cpp: + * ace/Sched_Params.cpp: + * ace/Stats.cpp: + * ace/Task.cpp: + * ace/Throughput_Stats.cpp: + * ace/Time_Value.h: + * ace/Time_Value.inl: + * ace/Truncate.h: + * ace/UUID.cpp: + * ace/os_include/os_pthread.h: + * performance-tests/Server_Concurrency/Latency_Stats.h: + * performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp: + * performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp: + * performance-tests/UDP/udp_test.cpp: + * tests/Atomic_Op_Test.cpp: + * tests/Basic_Types_Test.cpp: + * tests/CDR_Array_Test.cpp: + Removed support for Tandem NSK. That was the last platform that + needed the emulated versions of ACE_INT64 and ACE_UINT64, that + emulation has now been removed + + * ace/config-tandem-nsk-mips-v2.h: + * ace/config-tandem-nsk-mips-v3.h: + Removed these files. + +Mon May 14 18:48:14 UTC 2012 Johnny Willemsen + + * performance-tests/Server_Concurrency/Latency_Stats.h: + Fixed conversion warnings + +Sun May 13 17:13:31 UTC 2012 Johnny Willemsen + + * ace/Sample_History.h: + * ace/Sample_History.inl: + * ace/Sample_History.cpp: + Introduced scale_factor_type traits to handle the fact that the + ACE HighResTimer scale factor is now ACE_UINT64 + +Sun May 13 12:27:03 UTC 2012 Johnny Willemsen + + * ace/High_Res_Timer.h: + Fixed typo + + * ace/Basic_Stats.h: + * ace/Basic_Stats.cpp: + * ace/Throughput_Stats.h: + * ace/Throughput_Stats.cpp: + Introduced scale_factor_type traits to handle the fact that the + ACE HighResTimer scale factor is now ACE_UINT64 + + * ace/Timeprobe_T.cpp: + Use correct trait for the scale factor + + * performance-tests/RPC/client.cpp: + * performance-tests/SCTP/SOCK_SEQPACK_clt.cpp: + * performance-tests/SCTP/SOCK_STREAM_clt.cpp: + * performance-tests/Server_Concurrency/Latency_Stats.h: + * performance-tests/TCP/tcp_test.cpp: + Use ACE_High_Res_Timer::global_scale_factor_type + +Sat May 12 11:11:45 UTC 2012 Johnny Willemsen + + * ace/Time_Value.h: + * ace/Time_Value.cpp: + None of the windows compilers define ACE_LACKS_LONGLONG_T + + * ace/High_Res_Timer.h: + * ace/High_Res_Timer.inl: + * ace/High_Res_Timer.cpp: + Integrated patches from bugzilla 3703 increasing the precision + of the high resolution timers on windows + +Sat May 12 11:03:57 UTC 2012 Johnny Willemsen + + * ASNMP/asnmp/transaction.cpp: + * Kokyu/Dispatch_Deferrer.cpp: + Compare return value of schedule_timer with -1 + + * ace/OS_NS_time.h: + None of the windows compilers define ACE_LACKS_LONGLONG_T + + * bin/PerlACE/TestTarget_WinCE.pm: + Typo fix + +Sat May 12 11:01:50 UTC 2012 Johnny Willemsen + + * ace/config-win32-common.h: + None of the windows compilers define ACE_LACKS_LONGLONG_T + +Sat May 12 10:54:24 UTC 2012 Johnny Willemsen + + * ace/Numeric_Limits.h: + Fixed typo + +Fri May 11 17:42:08 UTC 2012 Steve Huston + + * ace/Dev_Poll_Reactor.cpp (mask_ops_i): Return -1 if epoll_ctl + fails and we don't recover from it. Fixes Bugzilla #4019. Thanks + to David Simmonds for this fix. + +Fri May 4 17:25:53 UTC 2012 Johnny Willemsen + + * ace/Acceptor.cpp: + Fixed incorrect check of the return value of schedule_timer, + an error is indicated with -1, not 0. Thanks to Deux deVille + for reporting this + +Thu May 3 07:15:54 UTC 2012 Johnny Willemsen + + * tests/Bug_3673_Regression_Test.cpp: + Fixed typo + +Wed May 2 18:36:25 UTC 2012 Johnny Willemsen + + * ace/OS_NS_math.h: + Fixed compile warning with WinCE + +Wed May 2 17:08:28 UTC 2012 Jeff Parsons + + * THANKS: + + Added Markus Manck + +Tue May 1 17:38:13 UTC 2012 Johnny Willemsen + + * bin/msvc_mpc_auto_compile.pl: + Added -project_root to override $ACE_ROOT as root to search for + solutions. This is needed when using this script in a flat directory + layout + +Tue May 1 12:52:45 UTC 2012 Johnny Willemsen + + * ace/OS_NS_sys_time.cpp: + * ace/config-win32-msvc-10.h: + * ace/config-win32-msvc-8.h: + * ace/config-win32-msvc-9.h: + WinCE also has non conformant timeval. When _USE_32BIT_TIME_T is not + defined we have to use our workaround in all cases + +Tue May 1 11:42:22 UTC 2012 Johnny Willemsen + + * ace/os_include/sys/os_stat.h: + Fixed compile error + +Tue May 1 10:25:37 UTC 2012 Johnny Willemsen + + * ace/os_include/sys/os_stat.h: + Compile fix for WinCE 7 + +Tue May 1 07:48:30 UTC 2012 Johnny Willemsen + + * ace/Mem_Map.cpp: + Layout changes + + * ace/config-win32-msvc-9.h: + Removed wince comment + +Sun Apr 29 19:17:29 UTC 2012 Johnny Willemsen + + * bin/msvc_mpc_auto_compile.pl: + More improvements to this script + +Sun Apr 29 19:01:08 UTC 2012 Johnny Willemsen + + * bin/msvc_mpc_auto_compile.pl: + Support flat layout + +Fri Apr 27 18:43:31 UTC 2012 Johnny Willemsen + + * bin/msvc_mpc_auto_compile.pl: + Corrected output messages + +Fri Apr 27 18:40:51 UTC 2012 Johnny Willemsen + + * ace/OS_NS_time.h: + * ace/config-win32-msvc-9.h: + First fixes for WinCE 7 + +Wed Apr 25 07:02:16 UTC 2012 Johnny Willemsen + + * ace/Get_Opt.cpp: + Reverted Wed Apr 18 08:51:31 UTC 2012 Martin Corino + +Tue Apr 24 01:18:27 UTC 2012 Douglas C. Schmidt + + * ace/String_Base.h (template): Zapped the 'explicit' keywords + introduced by the change in + + Tue Apr 17 19:09:30 UTC 2012 Douglas C. Schmidt + + since it was breaking too much code. + +Wed Apr 18 08:51:31 UTC 2012 Martin Corino + + * ace/String_Base.h: + Reverted 'explicit' declaration for single arg constructor for + const ACE_TCHAR* as implicit conversion of this arg type to + ACE string class is the expected behaviour (similar to the + STL std::string). + + * ace/Get_Opt.cpp: + Introduced explicit ACE_CString constructor call for single + arg ACE_TCHAR (not pointer) constructor. + +Wed Apr 18 06:31:56 UTC 2012 Johnny Willemsen + + * ace/Future.cpp: + Fixed commented out guard. Thanks to Andreas Dröscher + for reporting this. + +Tue Apr 17 19:09:30 UTC 2012 Douglas C. Schmidt + + * ace/String_Base.h: Made the single parameter constructors + explicit to avoid problems with implict conversions. Thanks to + Adam Rymarczuk for + reporting this. + +Thu Apr 12 11:25:25 UTC 2012 Johnny Willemsen + + * include/makeinclude/platform_linux_icc.GNU: + Added support for c++0x + +Tue Apr 10 20:09:23 UTC 2012 Douglas C. Schmidt + + * ace/Dev_Poll_Reactor.cpp (ACE_Dev_Poll_Reactor::resumable_handler): + Changed this method to return 1 instead of 0. Thanks to David + Simmonds for providing + this fix. This fixes bugid 4015. + + Added David to the ACE hall of fame. + +Tue Apr 10 20:10:06 UTC 2012 Adam Mitz + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Install the Inline_Files even with inline=0. Many of these files + are still needed, especially *_T.inl. This resolves bug #4002. + +Mon Apr 9 21:57:39 UTC 2012 Steve Huston + + * ace/Timer_Queue_T.cpp (calculate_timeout): Lock the mutex before + accessing timer queue elements to calculate the timeout. Thanks to + Kannan Ramaswamy for this fix. + +Sun Apr 8 14:25:23 UTC 2012 Phil Mesnier + + * ace/ace.mpc: + + Move ace_wchar.inl to the header section so that it is always + installed even when the library is built with inline=0. This is + required because ace_wchar is always inlined. + +Fri Apr 6 11:58:40 UTC 2012 Johnny Willemsen + + * docs/Download.html: + Added another rpm + +Fri Apr 6 10:48:03 UTC 2012 Johnny Willemsen + + * NEWS: + * bin/diff-builds-and-group-fixed-tests-only.sh: + * docs/Download.html: + * docs/bczar/bczar.html: + * etc/index.html: + Updated for next release + +Fri Apr 06 09:03:19 CEST 2012 Johnny Willemsen + + * ACE version 6.1.1 released. + +Tue Apr 3 22:49:11 UTC 2012 Steve Huston + + * ace/SOCK_Dgram_Mcast.cpp (subscribe_ifs): Set the error code when + a Windows API call fails. Also, when calling GetAdaptersAddresses() + to both check size and get the info, supply GAA_FLAG_SKIP_MULTICAST + as the flag value. This avoids obtaining info for joined multicast + addresses, not multicastable interfaces. Without the flag, and if + some other process does a join between the size-check call and the + info-gathering call, the size will be wrong. + +Tue Apr 3 17:01:33 UTC 2012 Jeff Parsons + + * THANKS: + + Added Thomas Stegemann . + +Tue Apr 3 16:18:35 UTC 2012 Douglas C. Schmidt + + * ace/ACE.cpp (ACE::timestamp): Fixed an "off-by-one" error that + caused corruption of timestamps when using + ACE_LOG_TIMESTAMP="TIME" env var. Thanks to Andrea Sormanni + for reporting this and + providing a fix. + + Added Andrea to the Hall of Fame! + +Fri Mar 30 14:33:58 UTC 2012 Steve Huston + + * examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp: Changed + use of ::sscanf_s() to only those platforms with the setting + ACE_HAS_TR24731_2005_CRT (VC8 and up). + +Fri Mar 30 13:39:25 UTC 2012 Adam Mitz + + * include/makeinclude/platform_win32_msvc.GNU: + + Added iphlpapi to the list of system libraries. + +Thu Mar 29 21:50:17 UTC 2012 Adam Mitz + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Postbuild steps need a dependency on the executable or library + so that parallel make will run them at the right time. + +Wed Mar 28 22:03:45 UTC 2012 Steve Huston + + * examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp: Changed + the +H handle value scan to know this is a hex value on Windows, but + a decimal value on everything else. Thanks to Andy Gokhale for this. + +Wed Mar 28 21:44:20 UTC 2012 Steve Huston + + * tests/Multicast_Test.cpp: Removed the forced set_nic to "lo" for + Linux. It's not needed with the changes from: + Wed Mar 21 21:57:40 UTC 2012 Steve Huston + +Mon Mar 26 11:27:11 UTC 2012 Johnny Willemsen + + * include/makeinclude/platform_mingw32.GNU: + Added iphlpapi + +Sat Mar 24 21:53:13 UTC 2012 Steve Huston + + * ace/SOCK_Dgram_Mcast.cpp (subscribe_ifs): For Windows, handle IPv6 + and IPv4 differently. The make_multicast_ifaddr() call that will end + up being made for IPv4 wants the interface's IP address, not name. + + * bin/MakeProjectCreator/config/acedefaults.mpb: + * bin/MakeProjectCreator/config/ipv6.mpb: Moved the lit_lib for iphlpapi + on Windows from the IPv6 base to acedefaults. SOCK_Dgram_Mcast.cpp + uses it for both IPv4 and IPv6 now. + +Fri Mar 23 22:06:11 UTC 2012 Steve Huston + + * ace/WIN32_Asynch_IO.cpp: Fixed possible heap corruption in + ACE_SOCK_Dgram_Read_Dgram::recv(). Thank you to + Dmytro Ovdiienko for unconvering this. + + * THANKS: Added Dmytro to the Hall of Fame. + +Thu Mar 22 16:23:14 UTC 2012 Steve Huston + + * ace/SOCK_Dgram_Mcast.h: Corrected the description of conditions + under which using OPT_NULLIFACE_ALL works and neatened things up. + + * tests/Multicast_Test.cpp: Turn on IP_MULTICAST_LOOP all the time. + This test requires it and it's not universally the default. + +Thu Mar 22 13:03:46 UTC 2012 Johnny Willemsen + + * ace/ARGV.cpp: + * ace/Acceptor.cpp: + * ace/Asynch_Acceptor.cpp: + * ace/Cached_Connect_Strategy_T.cpp: + * ace/Lib_Find.cpp: + * ace/Strategies_T.cpp: + * ace/Timer_Heap_T.cpp: + Fixed coverity errors + +Wed Mar 21 21:57:40 UTC 2012 Steve Huston + + * ace/SOCK_Dgram_Mcast.cpp (subscribe_ifs): Expanded the use of + code to scan interfaces to be always, not just for IPv6, when + subscribing with OPT_NULLIFACE_ALL and no specific interface. + Also replaced use of ACE_OS::if_nameindex with getifaddr() when + it's available (which was only on Linux anyway) so checks + for interface up and multicastable can be made before joining. + The code now works for systems with ACE_HAS_GETIFDADDR (incl. + Linux, which was my main issue driving this) and Win32. The others + end up in the old get_ip_interfaces code which will never work + anywhere as far as I can tell because it tries to subscribe to an + interface named with the IP address in string form. + + * tests/Multicast_Test.cpp: Removed hack force of interface "lo0" + on join(). No need for that with the fix above. For background, this + was added at: + Thu Jan 21 15:25:30 UTC 2010 Martin Corino + + * ace/Sock_Connect.cpp (get_ip_interfaces_getifaddr): Will no longer + return an interface marked 'down'. Partially fixes Bugzilla #1990 + but other platform-specific changes are needed to resolve it + completely. + +Sat Mar 17 12:16:15 UTC 2012 Johnny Willemsen + + * docs/Download.html: + Added link to the mailing lists with an advice for people to subscribe + +Sat Mar 17 12:11:15 UTC 2012 Johnny Willemsen + + * bin/cleanbuilds.sh: + * bin/diff-builds.pl: + Updated teststat links + +Wed Mar 14 10:04:06 UTC 2012 Johnny Willemsen + + * docs/Download.html: + Added link to ORBZone as community site for CORBA/CCM + + * tests/run_test.lst: + Mark 4008 as not fixed + +Tue Mar 13 11:24:33 UTC 2012 Johnny Willemsen + + * ace/Service_Gestalt.cpp: + Reverted change below, breaks Missing_Svc_Conf_Test test + +Tue Mar 13 09:36:18 UTC 2012 Johnny Willemsen + + * ace/Service_Gestalt.cpp: + Fixed bugzilla 4008, thanks to Derek Dominish + for + creating the fix + +Tue Mar 13 09:29:56 UTC 2012 Johnny Willemsen + + * tests/Bug_4008_Regression_Test.cpp: + * tests/run_test.lst: + * tests/tests.mpc: + New test for bugzilla 4008. Thanks to Derek Dominish + for + creating this test + +Mon Mar 12 20:22:17 UTC 2012 Adam Mitz + + * include/makeinclude/rules.local.GNU: + + Revert this part of Friday's change, with a comment added + to describe why this use of 'pwd' is different. + +Fri Mar 9 20:38:22 UTC 2012 Adam Mitz + + * include/makeinclude/rules.lib.GNU: + + When creating an archive library, use all object files instead of + just modified object files. This fixes a bug that can occur when + two different subdirectories have objects files with the same name. + The archive dosn't track directory names so "replacing" one changed + object could actually be clobbering another one. + + * include/makeinclude/rules.local.GNU: + + Use the $(PWD) make variable for current directory. + +Wed Mar 7 14:58:07 UTC 2012 Johnny Willemsen + + * docs/Download.html: + Added new download link for latest minor with versioned namespaces + +Wed Mar 7 14:37:18 UTC 2012 Johnny Willemsen + + * rpmbuild/ace-tao.spec: + Fix for ppc64 + +Wed Mar 7 13:31:58 UTC 2012 Johnny Willemsen + + * ace/Base_Thread_Adapter.h: + * ace/Base_Thread_Adapter.cpp: + * ace/ETCL/ETCL_Constraint.inl: + * ace/Module.cpp: + * ace/Stream.cpp: + * ace/Thread_Manager.h: + * ace/Timer_Hash_T.cpp: + Fixed coverity errors + +Wed Mar 7 10:55:28 UTC 2012 Johnny Willemsen + + * rpmbuild/ace-tao.spec: + Added new libraries + +Wed Mar 7 10:02:49 UTC 2012 Johnny Willemsen + + * NEWS: + * bin/diff-builds-and-group-fixed-tests-only.sh: + * docs/Download.html: + * docs/bczar/bczar.html: + * etc/index.html: + Updated for release + +Wed Mar 07 09:04:40 CET 2012 Johnny Willemsen + + * ACE version 6.1.0 released. + +Sat Mar 3 20:48:15 UTC 2012 Johnny Willemsen + + * ace/Thread_Manager.cpp: + Coverity fix + +Sat Mar 3 20:45:30 UTC 2012 Johnny Willemsen + + * ace/Event_Handler_Handle_Timeout_Upcall.cpp: + Coverity fix + +Sat Mar 3 20:22:09 UTC 2012 Johnny Willemsen + + * ace/Compression/rle/RLECompressor.h: + Fixed export macro + +Fri Mar 2 12:41:21 UTC 2012 Johnny Willemsen + + * ace/Compression/rle/RLECompressor.h: + Fixed export macro + +Wed Feb 29 16:30:00 UTC 2012 Simon Massey + + * ace/CDR_Stream.cpp: + Allow strings to be indirected (required for ValueType RepoIDs). + +Wed Feb 29 07:25:21 UTC 2012 Johnny Willemsen + + * ace/Handle_Set.cpp: + * ace/Select_Reactor_Base.cpp: + * ace/Service_Types.cpp: + Fixed coverity errors + +Tue Feb 28 14:35:36 UTC 2012 Johnny Willemsen + + * ace/Process.cpp: + Fixed coverity error + +Tue Feb 28 03:27:28 UTC 2012 Douglas C. Schmidt + + * + apps/JAWS3/jaws3/Reactive_IO.cpp (JAWS_IO_Reactive_Transmit::handle_output_source): + Check mb == 0 before using it. Thanks to Andrey Karpov for reporting this. + +Tue Feb 28 03:18:56 UTC 2012 Douglas C. Schmidt + + * ace/Throughput_Stats.cpp (ACE_Throughput_Stats::sample): Zapped + a redundant else statement. Thanks to Andrey Karpov for reporting this. + +Tue Feb 28 03:15:37 UTC 2012 Douglas C. Schmidt + + * protocols/ace/INet/URLBase.cpp (ACE): Changed + + if (pos > 0 && url_string[pos+1] == '/' && url_string[pos+1] == '/') + + to + + if (pos > 0 && url_string[pos+1] == '/' && url_string[pos+2] == '/') + + Thanks to Andrey Karpov for reporting + this. + +Mon Feb 27 08:11:06 UTC 2012 Johnny Willemsen + + * ace/Compression/rle/RLECompressor.h: + Doxygen fix + + * ace/Compression/rle/RLECompressor.cpp: + Fixed gcc warning + +Fri Feb 24 09:19:40 UTC 2012 Johnny Willemsen + + * ace/Compression/Compressor.h: + Fixed compile warning + +Fri Feb 24 09:14:22 UTC 2012 Johnny Willemsen + + * ace/Compression/Compressor.h: + * ace/Compression/Compressor.cpp: + * ace/Compression/rle/RLECompressor.h: + * ace/Compression/rle/RLECompressor.cpp: + Added virtual destructors + +Fri Feb 24 08:45:08 UTC 2012 Johnny Willemsen + + * ace/Compression/ACE_Compression.mpc: + * ace/Compression/rle/ACE_RLECompression.mpc: + Fixed id and install problems + + * bin/fuzz.pl: + Extended check for incorrect id tags + +Thu Feb 23 08:20:56 UTC 2012 Johnny Willemsen + + * ace/Compression/Compressor.h: + * ace/Compression/rle/RLECompressor.h: + * bin/MakeProjectCreator/config/ace_compressionlib.mpb: + * bin/MakeProjectCreator/config/ace_rlecompressionlib.mpb: + Fuzz fixes + +Thu Feb 23 07:52:58 UTC 2012 Johnny Willemsen + + * ace/Compression: + * ace/Compression/ACE_Compression.mpc: + * ace/Compression/ACE_Compression_export.h: + * ace/Compression/Compressor.h: + * ace/Compression/Compressor.inl: + * ace/Compression/Compressor.cpp: + * ace/Compression/rle: + * ace/Compression/rle/ACE_RLECompression.mpc: + * ace/Compression/rle/ACE_RLECompression_export.h: + * ace/Compression/rle/RLECompressor.h: + * ace/Compression/rle/RLECompressor.cpp: + * bin/MakeProjectCreator/config/ace_compressionlib.mpb: + * bin/MakeProjectCreator/config/ace_rlecompressionlib.mpb: + Added new ACE compression and rle compressor libraries. This code + was first part of TAO, but now moved to ACE because it provides + a basic run length encoding compressor that makes it possible to + compress data without depending on any external library + + * docs/bczar/bczar.html: + Added package + +Tue Feb 21 14:52:02 UTC 2012 Adam Mitz + + * ace/OS_NS_Thread.inl: + * ace/config-vxworks6.9.h: + + Fixed errors from fuzz script. + +Tue Feb 21 14:37:47 UTC 2012 Johnny Willemsen + + * PROBLEM-REPORT-FORM: + Removed build method question + +Fri Feb 17 23:10:37 UTC 2012 Adam Mitz + + * NEWS: + * ace/Message_Queue_T.cpp: + * ace/Message_Queue_Vx.cpp: + * ace/OS_NS_Thread.inl: + * ace/OS_NS_arpa_inet.cpp: + * ace/OS_NS_unistd.inl: + * ace/Stack_Trace.cpp: + * ace/config-vxworks.h: + * ace/config-vxworks6.9.h: + * ace/os_include/sys/os_types.h: + * include/makeinclude/platform_vxworks.GNU: + * include/makeinclude/platform_vxworks6.9.GNU: + * tests/Bug_3943_Regression_Test.cpp: + + Added support for VxWorks version 6.9. + +Tue Feb 14 22:57:00 UTC 2012 William R. Otte + + * ace/ACE.cpp: + * ace/Dev_Poll_Reactor.cpp: + * ace/Handle_Set.cpp: + * ace/High_Res_Timer.h: + * ace/High_Res_Timer.cpp: + * ace/INET_Addr.h: + * ace/INET_Addr.cpp: + * ace/Monitor_Control/Bytes_Received_Monitor.h: + * ace/Monitor_Control/Bytes_Received_Monitor.cpp: + * ace/Monitor_Control/Bytes_Sent_Monitor.h: + * ace/Monitor_Control/Bytes_Sent_Monitor.cpp: + * ace/Monitor_Control/CPU_Load_Monitor.h: + * ace/Monitor_Control/CPU_Load_Monitor.cpp: + * ace/Monitor_Control/Linux_Network_Interface_Monitor.h: + * ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp: + * ace/Monitor_Control/Num_Threads_Monitor.h: + * ace/Monitor_Control/Num_Threads_Monitor.cpp: + * ace/Monitor_Control/Packets_Received_Monitor.h: + * ace/Monitor_Control/Packets_Received_Monitor.cpp: + * ace/Monitor_Control/Packets_Sent_Monitor.h: + * ace/Monitor_Control/Packets_Sent_Monitor.cpp: + * ace/OS_NS_netdb.cpp: + * ace/OS_NS_sys_socket.h: + * ace/OS_NS_sys_socket.inl: + * ace/OS_NS_time.inl: + * ace/OS_NS_unistd.inl: + * ace/SOCK_Dgram.cpp: + * ace/SOCK_Dgram_Mcast.cpp: + * ace/Select_Reactor_T.cpp: + * ace/config-linux.h: + * ace/os_include/os_pthread.h: + * apps/JAWS/clients/WebSTONE/src/nsapi-includes/base/systems.h: + * examples/APG/Signals/SigInfo.cpp: + * tests/INET_Addr_Test_IPV6.cpp: + * tests/MT_Reference_Counted_Event_Handler_Test.cpp: + * tests/Malloc_Test.cpp: + * tests/Multicast_Test.cpp: + * tests/Naming_Test.cpp: + * tests/Proactor_Test.cpp: + * tests/Proactor_Test_IPV6.cpp: + * tests/Proactor_UDP_Test.cpp: + * tests/Process_Test.cpp: + * tests/SSL/Bug_2912_Regression_Test.cpp: + + Created a new macro, ACE_LINUX, which replaces all non-standard + tests for linux, __linux, and __linux__. + +Mon Feb 13 16:38:15 UTC 2012 Adam Mitz + + * include/makeinclude/platform_gnuwin32_common.GNU: + + Set DCCFLAGS and OCCFLAGS to get debug=X and optimize=X to work. + +Tue Feb 7 12:56:41 UTC 2012 Johnny Willemsen + + * ace/XtReactor/XtReactor.cpp: + Use C++ cast to silence warning + +Tue Jan 31 20:19:16 UTC 2012 Johnny Willemsen + + * examples/Web_Crawler/Iterators.cpp: + * performance-tests/Misc/context_switch_time.cpp: + Fixed gcc 4.7 warning + +Tue Jan 31 20:17:35 UTC 2012 Johnny Willemsen + + * examples/IPC_SAP/SOCK_SAP/CPP-memclient.cpp: + Fixed gcc 4.7 warning + +Mon Jan 30 09:48:00 UTC 2012 Simon Massey + + * ace/Default_Constants.h: + Redefined ACE_MAX_UDP_PACKET_SIZE to 65507 bytes. The actual field size + sets a theoretical limit of 65,535 bytes (so 65536 was completly wrong) + which is composed of 8 byte header +65,527 bytes of data for a UDP datagram. + However the practical limit for the data length which is imposed by the + underlying IPv4 protocol is only 65,507 bytes (65507 bytes of data +8 bytes + UDP header +20 bytes IP header). + +Fri Jan 27 09:39:57 UTC 2012 Johnny Willemsen + + * ace/FlReactor/FlReactor.cpp: + Const change + + * bin/valgrind.supp: + Added another suppress + +Fri Jan 27 09:01:51 UTC 2012 Johnny Willemsen + + * NEWS: + * bin/diff-builds-and-group-fixed-tests-only.sh: + * bin/make_release.py: + * docs/Download.html: + * docs/bczar/bczar.html: + * etc/index.html: + Updated for next release + +Fri Jan 27 08:58:54 CET 2012 Johnny Willemsen + + * ACE version 6.0.8 released. + +Thu Jan 26 20:38:47 UTC 2012 Phil Mesnier + + * ace/Condition_T.cpp: + + In order to allow building with inlining on MacOSX Lion, + Condition_T.cpp needs to explicitly include Time_Value.h. In many + cases, Time_Value.h was being incidentally included, such as + through Atomic_Op_GCC_T.cpp, but that is specifically excluded for + Lion builds using the clang compiler. + +Tue Jan 24 16:44:22 UTC 2012 Chip Jones + + * NEWS: + Added information about IDL dependency generation. + +Tue Jan 24 15:26:24 UTC 2012 Johnny Willemsen + + * bin/MakeProjectCreator/config/conv_lib.mpb: + Fixed cleanup bug + +Tue Jan 24 14:40:00 UTC 2012 Johnny Willemsen + + * bin/fuzz.pl: + Can't check mpc files, when they contain gnuace specific stuff they + need tabs + +Tue Jan 24 14:29:18 UTC 2012 Johnny Willemsen + + * bin/fuzz.pl: + Fixed problem + +Tue Jan 24 13:52:20 UTC 2012 Johnny Willemsen + + * bin/fuzz.pl: + Also check mpc files for tabs + +Tue Jan 24 13:48:49 UTC 2012 Johnny Willemsen + + * apps/JAWS2/HTTPU/httpu.mpc: + * apps/JAWS2/JAWS/jaws2.mpc: + * apps/JAWS3/jaws3/jaws3.mpc: + * apps/gperf/tests/gperf_test.mpb: + * bin/MakeProjectCreator/config/ace_bzip2.mpb: + * bin/MakeProjectCreator/config/ace_fl.mpb: + * bin/MakeProjectCreator/config/ace_fox.mpb: + * bin/MakeProjectCreator/config/ace_openssl.mpb: + * bin/MakeProjectCreator/config/ace_output.mpb: + * bin/MakeProjectCreator/config/ace_qt.mpb: + * bin/MakeProjectCreator/config/ace_tk.mpb: + * bin/MakeProjectCreator/config/ace_x11.mpb: + * bin/MakeProjectCreator/config/ace_xt.mpb: + * bin/MakeProjectCreator/config/ace_zlib.mpb: + * bin/MakeProjectCreator/config/ace_zzip.mpb: + * bin/MakeProjectCreator/config/acedefaults.mpb: + * bin/MakeProjectCreator/config/conv_lib.mpb: + * bin/MakeProjectCreator/config/wxwindows.mpb: + * netsvcs/servers/servers.mpc: + * performance-tests/Synch-Benchmarks/Base_Test/Synch_Benchmarks_Base_Test.mpc: + * performance-tests/Synch-Benchmarks/Perf_Test/Synch_Benchmarks_Perf_Test.mpc: + * tests/tests.mpc: + Removed left over from automake removal + +Tue Jan 24 13:31:49 UTC 2012 Johnny Willemsen + + * examples/Reactor/WFMO_Reactor/Network_Events.cpp: + Fixed gcc warning + +Mon Jan 23 20:21:50 UTC 2012 Johnny Willemsen + + * bin/MakeProjectCreator/templates/gnu.mpd: + Fixed support for idl3toxmi and idl3toidl2 flags + +Mon Jan 23 12:02:07 UTC 2012 Johnny Willemsen + + * bin/MakeProjectCreator/templates/gnu.mpd: + Added support for idl3toxmi and idl3toidl2 flags + +Sun Jan 22 19:41:27 UTC 2012 Johnny Willemsen + + * examples/Reactor/WFMO_Reactor/APC.cpp: + * examples/Reactor/WFMO_Reactor/Abandoned.cpp: + * examples/Reactor/WFMO_Reactor/Directory_Changes.cpp: + * examples/Reactor/WFMO_Reactor/Handle_Close.cpp: + * examples/Reactor/WFMO_Reactor/Network_Events.cpp: + * examples/Reactor/WFMO_Reactor/Prerun_State_Changes.cpp: + * examples/Reactor/WFMO_Reactor/Registration.cpp: + * examples/Reactor/WFMO_Reactor/Registry_Changes.cpp: + * examples/Reactor/WFMO_Reactor/Suspended_Removals.cpp: + * examples/Reactor/WFMO_Reactor/Talker.cpp: + * examples/Reactor/WFMO_Reactor/Window_Messages.cpp: + Fixed GCC 4.6.2 release warnings + +Sun Jan 22 12:35:11 UTC 2012 Johnny Willemsen + + * bin/make_release.py: + Use the new MPC -workers option to speedup the release process + +Fri Jan 20 19:30:51 UTC 2012 Johnny Willemsen + + * examples/APG/Processes/Process_Mutex.cpp: + Use ACE_TEST_ASSERT instead of ACE_ASSERT to fix warnings in gcc 4.6 + release builds + +Fri Jan 20 19:06:02 UTC 2012 Johnny Willemsen + + * examples/APG/Containers/Allocator.cpp: + * examples/Reactor/Misc/test_timer_queue.cpp: + Use ACE_TEST_ASSERT instead of ACE_ASSERT to fix warnings in gcc 4.6 + release builds + +Wed Jan 18 09:02:18 UTC 2012 Martin Corino + + * bin/fuzz.pl: + Added suppress option to selectively disable checks. + +Tue Jan 17 17:36:31 UTC 2012 Chip Jones + + * include/makeinclude/rules.local.GNU: + Fixed 'no filename for -include' warning. + +Mon Jan 16 21:58:44 UTC 2012 Chip Jones + + * bin/DependencyGenerator/GNUIDLDependencyWriter.pm: + * bin/DependencyGenerator/GNUIDLObjectGenerator.pm: + * bin/MakeProjectCreator/config/ace_idl_dependencies.mpb: + + Added these files to support generation of IDL dependencies + for gnuace projects. + + * bin/MakeProjectCreator/config/acedefaults.mpb: + * bin/MakeProjectCreator/config/global.features: + + Added IDL dependency as a feature defaulted to off. + + * bin/MakeProjectCreator/templates/gnu.mpd: + + Modified gnuace template to generate IDL dependency rules. + + * include/makeinclude/rules.common.GNU: + * include/makeinclude/rules.local.GNU: + * include/makeinclude/wrapper_macros.GNU: + + Added depend_idl.local rule. + + This is a merge of work done in the 'ace-mpc_performance' + branch. + +Mon Jan 16 10:33:37 UTC 2012 Martin Corino + + * ace/config-win32-common.h: + * ace/config-win32-mingw.h: + Moved MinGW specific block to common because the macros + it concerns are tested there already. + +Mon Jan 16 09:01:20 UTC 2012 Martin Corino + + * ace/config-win32-mingw.h: + Fixed incorrectly placed macro test. + +Sun Jan 15 19:15:48 UTC 2012 Martin Corino + + * ace/config-win32-mingw.h: + Add some customizations and corrections to support using + --std=c++0x with MinGW32. + +Fri Jan 13 23:25:59 UTC 2012 Jeff Parsons + + * THANKS: + + Added Michael Frommberger + +Wed Jan 11 20:43:47 UTC 2012 Martin Corino + + * ace/config-freebsd.h: + * ace/config-win32-common.h: + * ace/config-win32-mingw.h: + * ace/os_include/os_signal.h: + Added ACE_LACKS_SIGSET_T to be able to distinguish between the + type and the functions being provided or not. + +Wed Jan 11 18:43:50 UTC 2012 Martin Corino + + * ace/config-win32-mingw.h: + Fixed typo. + +Wed Jan 11 15:41:00 UTC 2012 Simon Massey + + * ace/config-sunos5.10.h: + Is supposed to define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII and ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII + correctly for this platform. The old logic was "If already defined - redefine, but if not + defined don't define" and wrong. The point of providing the definition of these SIZE_T format + specifiers is to provide them if they are not set. + +Wed Jan 11 14:36:43 UTC 2012 Martin Corino + + * ace/config-win32-mingw.h: + * ace/os_include/os_signal.h: + Changes to support MinGW64 compiler. + +Mon Jan 9 11:07:54 UTC 2012 Johnny Willemsen + + * ace/Netlink_Addr.h: + * ace/Notification_Queue.h: + Doxygen fixes + + * tests/run_test.lst: + Removed several old config labels + +Fri Jan 6 11:16:03 UTC 2012 Johnny Willemsen + + * html/Stats/configuration.shtml: + * html/Stats/index.shtml: + * html/Stats/simple_footprint.shtml: + Extended data to be shown and updated links + +Fri Jan 6 10:28:35 UTC 2012 Johnny Willemsen + + * ace/Stream.cpp: + Fixed coverity errors + +Wed Jan 4 13:02:12 UTC 2012 Johnny Willemsen + + * bin/generate_compile_stats.sh: + Added link for DAnCE + +Wed Jan 4 11:45:43 UTC 2012 Johnny Willemsen + + * html/Stats/index.shtml: + Fixed link + +Wed Jan 4 11:42:13 UTC 2012 Johnny Willemsen + + * bin/generate_compile_stats.sh: + Work with flat layout and added DAnCE + +Wed Jan 4 11:06:50 UTC 2012 Johnny Willemsen + + * bin/generate_compile_stats.sh: + Updated title to include DAnCE + +Wed Jan 4 08:50:18 UTC 2012 Johnny Willemsen + + * bin/cleanbuilds.sh: + * bin/mail_test_stats.sh: + Accept date and email as arguments + +Tue Jan 3 18:47:23 UTC 2012 Johnny Willemsen + + * bin/performance_stats.sh: + * bin/topinfo_iorsize_stats.sh: + * bin/topinfo_simple_stats.sh: + * bin/topinfo_stats.sh: + Assume ACE_ROOT is set before running the script, simplified the usage + +Tue Jan 3 18:34:18 UTC 2012 Johnny Willemsen + + * bin/valgrind.supp: + Added default suppress file that can be used for valgrind when using + valgrind for ACE/TAO/CIAO/DAnCE + + * docs/bczar/bczar.html: + Added package + +Tue Jan 3 13:51:18 UTC 2012 Johnny Willemsen + + * bin/performance_stats.sh: + Create source directory + +Tue Jan 3 12:52:04 UTC 2012 Johnny Willemsen + + * bin/performance_stats.sh: + * bin/topinfo_iorsize_stats.sh: + * bin/topinfo_simple_stats.sh: + * bin/topinfo_stats.sh: + * bin/footprint_stats.sh: + Converting them to support a flat layout + +Tue Jan 3 12:40:43 UTC 2012 Johnny Willemsen + + * html/Stats/detailed_footprint.shtml: + * html/Stats/detailed_performance.shtml: + * html/Stats/footer.html: + * html/Stats/index.shtml: + * html/Stats/navigation.html: + Updated links, docu, status + + * html/Stats/compilation.shtml: + Removed this file. + +Sat Dec 31 22:12:53 UTC 2011 Douglas C. Schmidt + + * ace/Timer_Wheel_T.cpp: Changed the call to "delete root" in the + destructor to "this->free_node (root)" so the ACE_Timer_Wheel_T + will work properly when provided a custom allocator. Thanks to + Koh for reporting + this bug and providing a fix. + +Fri Dec 30 10:13:59 UTC 2011 Johnny Willemsen + + * ace/config-linux.h: + Added support for ulibc, thanks to Chong Wuk Pak + for providing the patch. This fixes + bugzilla 3999 + +Thu Dec 29 17:29:06 UTC 2011 Douglas C. Schmidt + + * ace/Mem_Map.cpp (ACE_Mem_Map::map_it): Fixed a missing '('. Thanks to Johnny for reporting this. + +Thu Dec 29 15:14:45 UTC 2011 Douglas C. Schmidt + + * ace/Mem_Map.cpp (ACE_Mem_Map::map_it): Further improved the + error checking. Thanks to JaeSung Lee for suggesting this. + +Tue Dec 27 15:19:56 UTC 2011 Douglas C. Schmidt + + * ace/Mem_Map.cpp (ACE_Mem_Map::map_it): mmap through character + device doesn't care about it's size, so map with /dev/* is done + with a special case. Thanks to JaeSung Lee for reporting this and providing a fix. + +Tue Dec 27 11:39:53 UTC 2011 Johnny Willemsen + + * NEWS: + * bin/diff-builds-and-group-fixed-tests-only.sh: + * docs/Download.html: + * docs/bczar/bczar.html: + * etc/index.html: + Updated for next release + +Tue Dec 27 10:06:28 CET 2011 Johnny Willemsen + + * ACE version 6.0.7 released. + +Wed Dec 21 11:25:49 UTC 2011 Marcel Smit + + * tests/Task_Wait_Test.cpp: + Fixed compile issue on Solaris 10. + +Wed Dec 21 09:41:54 UTC 2011 Martin Corino + + * examples/Timer_Queue/Reactor_Timer_Queue_Test.cpp: + + Added timer queue reset on global reactor instance. + +Tue Dec 20 15:43:39 UTC 2011 Steve Huston + + * tests/Task_Wait_Test.cpp: + * tests/tests.mpc: + * tests/run_test.lst: + New test program that tests the ACE_Thread_Manager::wait() from a + called-back ACE_Task::close() on thread exit. + +Tue Dec 20 15:36:24 UTC 2011 Steve Huston + + * ace/Thread.inl (disablecancel): Correct size pased to memset. + * ace/Thread_Manager.cpp (ACE_Thread_Descriptor::terminate): Don't + dereference potentially invalid pointer. + + Resolves Coverity warnings. + +Mon Dec 19 19:00:07 UTC 2011 Johnny Willemsen + + * docs/bczar/bczar.html: + Added another package + +Mon Dec 19 13:28:16 UTC 2011 Martin Corino + + * ace/Abstract_Timer_Queue.h: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_Adapters.inl: + * ace/Timer_Queue_Adapters.cpp: + * ace/Timer_Wheel_T.h: + * ace/Timer_Wheel_T.cpp: + + Added close() method. + + * ace/Dev_Poll_Reactor.cpp: + * ace/Proactor.cpp: + * ace/Select_Reactor_T.cpp: + * ace/WFMO_Reactor.cpp: + + Implemented support for timer queue close (). + + The rationale for these changes is that when using reactors with + user defined timer queues the reactor does not delete the timer queue + when being deleted itself. Without any other cleanup this created the + possibility (as encountered in TAO/tests/Bug_3837_Regression after + introduction of the TIME_POLICY changes) of outstanding timer handlers + in the queue being triggered and attempting to access the reactor after + the reactor has been destroyed. + Calling close () for timer queues the reactor does not delete solves + this potential problem. + +Mon Dec 19 12:12:37 UTC 2011 Johnny Willemsen + + * bin/fuzz.pl: + Simplified check + +Mon Dec 19 09:17:33 UTC 2011 Johnny Willemsen + + * ace/ace_for_tao.mpc: + Added missing files + +Sun Dec 18 11:56:00 UTC 2011 Johnny Willemsen + + * ace/Timer_Queue_T.h: + Fixed CentOS warning + +Sun Dec 18 11:41:56 UTC 2011 Johnny Willemsen + + * ace/ace_for_tao.mpc: + Removed obsolete file + +Sun Dec 18 11:35:18 UTC 2011 Johnny Willemsen + + * bin/generate_compile_stats.sh: + Fixed incorrect command + +Sun Dec 18 10:29:12 UTC 2011 Martin Corino + + * ace/Abstract_Timer_Queue.h: + + Added missing abstract method dump(). + +Fri Dec 16 08:03:07 UTC 2011 Marcel Smit + + * ace/Time_Policy_T.h: + No dllimport/export in template classes. + +Thu Dec 15 19:45:30 UTC 2011 Johnny Willemsen + + * ace/Countdown_Time_T.h: + No need for an export macro with a C++ template + +Thu Dec 15 13:22:07 UTC 2011 Marcel Smit + + * ace/Event_Handler_Handle_Timeout_Upcall.inl: + * tests/Timer_Queue_Test.cpp: + Fuzz. Removed tab character + +Thu Dec 15 13:12:39 UTC 2011 Marcel Smit + + * ace/Event_Handler_Handle_Timeout_Upcall.inl: + * ace/Event_Handler_Handle_Timeout_Upcall.cpp: + * ace/Proactor.cpp: + * ace/Timer_Hash.h: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap.h: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + * ace/Timer_List.h: + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_Adapters.cpp: + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Wheel.h: + * ace/Timer_Wheel_T.h: + Fuzz. Removed tab character + +Thu Dec 15 12:52:18 UTC 2011 Marcel Smit + + * ace/Abstract_Timer_Queue.h: + * ace/Abstract_Timer_Queue.cpp: + * ace/Event_Handler_Handle_Timeout_Upcall.h: + * ace/Timer_Queue_Iterator.h: + * ace/Timer_Queue_Iterator.cpp: + Fuzz. Added Id-tags. + +Thu Dec 15 11:00:00 UTC 2011 Martin Corino + + Merged timer_policy branch. + + === start changelog === + + Thu Dec 15 09:45:00 UTC 2011 Martin Corino + + * NEWS: + + Added description of new TIME_POLICY features. + + * tests/Timer_Queue_Test.cpp: + + Added explicit test of specific TIME_POLICY feature. + + Mon Dec 12 21:28:00 UTC 2011 Martin Corino + + * ace/Abstract_Timer_Queue.h: + * ace/Time_Policy.h: + * ace/Time_Policy.inl: + * ace/Time_Policy_T.h: + * ace/Time_Policy_T.inl: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Queue_T.h: + * tests/Timer_Queue_Test.cpp: + + Added backwards compatibility support. + + Mon Dec 05 10:26:00 UTC 2011 Martin Corino + + * ace/Time_Policy.inl + + Prevent setting delegate to null pointer. + + Sun Dec 04 15:40:00 UTC 2011 Martin Corino + + * ace/Countdown_Time.cpp: + * ace/Countdown_Time.inl: + + Renamed to *_T.* + + * ace/Countdown_Time.h + * ace/Countdown_Time_T.cpp + * ace/Countdown_Time_T.h + * ace/Countdown_Time_T.inl + + Changed ACE_Countdown_Time to TIME_POLICY based + template class ACE_Countdown_Time_T, + Created typedef for default template instantiation + as ACE_Countdown_Time. + + * ace/Time_Policy.cpp + * ace/Time_Policy.h + * ace/Time_Policy.inl + * ace/Time_Policy_T.cpp + * ace/Time_Policy_T.h + * ace/Time_Policy_T.inl + + Added support for dynamically loadable/shared time + policies. + + * ace/ace.mpc + + Updated for file changes. + + Fri Dec 02 11:48:00 UTC 2011 Martin Corino + + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + + Reverting set_time_policy() change. Interpretation error. + + Thu Dec 01 17:52:00 UTC 2011 Martin Corino + + * ace/Time_Policy.h: + * ace/Time_Policy.inl: + + Added ACE_HR_Time_Policy. + + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + + Replaced set_time_policy() by get_time_policy() since setting + the policy is not possible but configuring might be. + + Thu Dec 01 14:05:00 UTC 2011 Martin Corino + + * ace/Proactor.cpp: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Queue_T.h: + + Fixed compile errors. + + Thu Dec 01 13:34:00 UTC 2011 Martin Corino + + * ace/Timer_Hash_T.cpp: + * ace/Timer_Hash_T.h: + * ace/Timer_Heap_T.h: + * ace/Timer_Wheel_T.h: + + Small cleanup to prevent potential compiler warnings. + + Mon Aug 24 02:27:36 UTC 2009 Carlos O'Ryan + + * ace/Timer_Queue_T.cpp: + Need to release the internal timer queue lock before dispatching + calls in expire_single(), otherwise we get nasty deadlocks in + the TP_Reactor implementation. + + Thu Jul 2 02:55:09 UTC 2009 Carlos O'Ryan + + * ace/Abstract_Timer_Queue.h: + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + * ace/Timer_Queue_T.cpp: + I wanted to use gettimeofday() for the pure virtual function and + some other name for the inline function used in the timer queue + internals. + This is the second and final pass to get that change in. This + time, I renamed the internal function to gettimeofday_static(), + used the compiler (and grep) to find all uses. Once that + compiled I renamed the virtual function from + gettimeofday_abstract() to the gettimeofday() function. + I know it is convoluted, but it gets the job done without me + having to think too much. + + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Select_Reactor_T.cpp: + * ace/Dev_Poll_Reactor.cpp: + * ace/Proactor.cpp: + * ace/Timer_Queue_Adapters.cpp: + * tests/Timer_Queue_Reference_Counting_Test.cpp: + * tests/Timer_Queue_Test.cpp: + * examples/APG/Timers/Timers.cpp: + * examples/APG/Timers/TimerDispatcher.cpp: + * examples/C++NPv2/Logging_Event_Handler_Ex.cpp: + Fixed users and tests to use the real name for gettimeofday() in + ACE_Abstract_Timer_Queue<> + + Wed Jul 1 02:09:44 UTC 2009 Carlos O'Ryan + + * ace/ace.mpc: + * ace/Makefile.am: + * ace/Event_Handler_Handle_Timeout_Upcall.h: + * ace/Event_Handler_Handle_Timeout_Upcall.inl: + * ace/Event_Handler_Handle_Timeout_Upcall.cpp: + First I noticed that this class did not depend on the lock type + at all, this was fortunate because I wanted to use it in a + generic way. So, change the class from a template class to a + regular class. That required moving the class to its own file too. + + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Wheel_T.h: + * ace/Timer_Wheel_T.cpp: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + Fixed several inconsistencies across these classes, for example, + most of them had typedef as a shorthand for the base class, but + the name of this typedef was not consistent. + Likewise, not all of the classes made the TIME_POLICY parameter + a default template parameter. + + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + * ace/Timer_Queue_T.cpp: + Introduced an intermediate class between Abstract_Timer_Queue<> + and Timer_Queue_T<>. This is ugly, but the Proactor "needs" to + set a back-pointer from the FUNCTOR to the Proacter instance + whenever a timer queue is assigned to the Proactor. + This code smells funny. Either the API is wrong (the Proactor + should always create the functor with the backpointer,) or the + need for the back pointer is suspicious (I think there is a + thread in the Proactor that signals timers, but maybe it should + be contained in the Upcall object itself?) + The more I look here, the uglier the smell. + + * ace/Select_Reactor_T.cpp: + * ace/Timer_Queue_Adapters.cpp: + * tests/Timer_Queue_Reference_Counting_Test.cpp: + * tests/Timer_Queue_Test.cpp: + As a temporary measure, I appended "_abstract" to the + gettimeofday() function name in Abstract_Timer_Queue<>. + Shortly, I will change the Timer_Queue_T<> class to use + gettimeofday_non_virtual() or _static() or something similar. + Had to make the change in two steps to find all the uses of the + original function. + There was probably an easier/cleaner way to do this. + + * tests/Timer_Queue_Test.cpp: + Take advantage of the new ACE_Abstract_Timer_Queue<> to make the + different types of queues more compatible in ths test, including + queues with different time source policies. + + * ace/Proactor.h: + As with the Reactive version, I noticed that + ACE_Proactor_Handle_Timeout_Upcall did not depend on its + template parameter, so I changed the class to a non-template + version. + + * ace/Proactor.cpp: + Instead of making the Proactor a friend of the Timer_Handler + task, expose a safe interface to do what the proactor wants to + do. + The proactor needed access to timer queue internal details to + implement schedule(), but the reactor did not... hmmm... well, + turns out the Reactor had nicely refactor that work to the + upcall functor. So I did the same in the Proactor case. + + + * ace/Timer_List.h: + * ace/Timer_Wheel.h: + * ace/Timer_Hash.h: + * ace/Timer_Heap.h: + Use Event_Handler_Handle_Timeout_Upcall without the template + parameter. + + * ace/Abstract_Timer_Queue.h: + Remove the setter for getimeofday(), this is implemented by the + TIME_POLICY template parameter in Timer_Queue_T<> + + * tests/Reactor_Timer_Test.cpp: + * tests/Network_Adapters_Test.cpp: + * tests/Proactor_Timer_Test.cpp: + Use a different idiom to set the time policy for this test. + + * examples/Timer_Queue/Thread_Timer_Queue_Test.h: + * examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h: + * examples/APG/Timers/Timers.cpp: + * examples/APG/Timers/TimerDispatcher.cpp: + * examples/Reactor/Misc/test_timer_queue.cpp: + * examples/C++NPv2/Logging_Event_Handler_Ex.cpp: + Need an additional #include for ACE_Event_Handler_Handle_Timeout + Said class class is no longer a template class, so use it + correctly. + Changed name of gettimeofday() in timer queue to + gettimeofday_abstract() This is a temporary change to find all + the uses, will revert again soon. + + * Merged in changes from bug-3607 branch. + + * ace/ace.mpc: + * ace/Abstract_Timer_Queue.h: + * ace/Abstract_Timer_Queue.cpp: + * ace/Timer_Queue_Iterator.h: + * ace/Timer_Queue_Iterator.inl: + * ace/Timer_Queue_Iterator.cpp: + * ace/Timer_Queuefwd.h: + * ace/Timer_Queue.h: + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + * ace/Timer_Queue_T.cpp: + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Wheel_T.h: + * ace/Timer_Wheel_T.cpp: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + Heavy refactoring in ACE_Timer_Queue_T class and friends. + First, created a template base class (ACE_Abstract_Timer_Queue) that: + 1) Only depends on the type held by the timer queue, not to lock + or upcall strategy. + 2) It is a pure abstract class, i.e., none of its member + functions have any implementation. + 3) Provides new pure virtual functions to encapsulates some + logic that was spread between tests, TP_Reactor and + Dev_Poll_Reactor. + Then I re-wrote all the standard timer queue objects in terms of + this class. In particular, the reactors use only the abstract + interface. + I also re-factored the Timer_Queue_Iterator to only depend on + the type of objects held by the timer queue. The rest of the + parameters where not used either. + Implement functionality that was spread in Dev_Poll_Reactor, + TP_Reactor and a test into expire_single. + + * ace/Proactor.h: + * ace/TP_Reactor.cpp: + * ace/Dev_Poll_Reactor.cpp: + Both classes implemented the logic to dispatch a single timer + but release a mutex before the upcall. This was confusing as + well as required exposing too much detail about the Timer_Queue + classes. + The new mechanism is a single function in (expire_single) + ACE_Abstract_Timer_Queue<> (implemented in ACE_Timer_Queue_T<>) + which receives a command object to encapsulate the mutex release. + + * ace/Functor.h: + * ace/Functor.cpp: + * ace/Functor_T.h: + * ace/Functor_T.inl: + Add helper ACE_Command_* objects. One is a no-op, for the test + below. The other is a callback that ignores the silly void* + argument in the ACE_Command_Base::execute() member function. + + * tests/Timer_Queue_Reference_Counting_Test.cpp: + Re-factored test in terms of expire_single() + + Tue Jun 30 01:10:04 UTC 2009 Carlos O'Ryan + + * This is a temporary commit into the 3707 branch. I realized too + late that the changes from 3706 will be needed to make this work. + + * ace/ace.mpc: + * ace/Time_Policy.h: + * ace/Time_Policy.inl: + * ace/Time_Policy.cpp: + New classes to encapsulate how "now" is computed in the Timer + Queues. This will be an additional template parameter, so the + default configuration has zero overhead. + + * ace/Timer_Queuefwd.h: + * ace/Timer_List.h: + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + * ace/Timer_Queue_T.cpp: + * ace/Timer_Wheel.h: + * ace/Timer_Wheel_T.h: + * ace/Timer_Wheel_T.cpp: + * ace/Timer_Hash.h: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap.h: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + Re-factor timer queue classes to use new TIMER_POLICY + parameter. + + * tests/Timer_Queue_Test.cpp: + Modify test to use TIMER_POLICY. But here is the rub, the test + does not compile because all timer queue types are "different" + to each other. I need to introduce the base class from the + bug-3706 branch to make things work. + + Sun Jun 28 22:15:47 UTC 2009 Carlos O'Ryan + + * ace/ace.mpc: + * ace/Abstract_Timer_Queue.h: + * ace/Abstract_Timer_Queue.cpp: + * ace/Timer_Queue_Iterator.h: + * ace/Timer_Queue_Iterator.inl: + * ace/Timer_Queue_Iterator.cpp: + * ace/Timer_Queuefwd.h: + * ace/Timer_Queue.h: + * ace/Timer_Queue_T.h: + * ace/Timer_Queue_T.inl: + * ace/Timer_Queue_T.cpp: + * ace/Timer_List_T.h: + * ace/Timer_List_T.cpp: + * ace/Timer_Wheel_T.h: + * ace/Timer_Wheel_T.cpp: + * ace/Timer_Hash_T.h: + * ace/Timer_Hash_T.cpp: + * ace/Timer_Heap_T.h: + * ace/Timer_Heap_T.cpp: + Heavy refactoring in ACE_Timer_Queue_T class and friends. + First, created a template base class (ACE_Abstract_Timer_Queue) that: + 1) Only depends on the type held by the timer queue, not to lock + or upcall strategy. + 2) It is a pure abstract class, i.e., none of its member + functions have any implementation. + 3) Provides new pure virtual functions to encapsulates some + logic that was spread between tests, TP_Reactor and + Dev_Poll_Reactor. + Then I re-wrote all the standard timer queue objects in terms of + this class. In particular, the reactors use only the abstract + interface. + I also re-factored the Timer_Queue_Iterator to only depend on + the type of objects held by the timer queue. The rest of the + parameters where not used either. + Implement functionality that was spread in Dev_Poll_Reactor, + TP_Reactor and a test into expire_single. + + * ace/Proactor.h: + * ace/TP_Reactor.cpp: + * ace/Dev_Poll_Reactor.cpp: + Both classes implemented the logic to dispatch a single timer + but release a mutex before the upcall. This was confusing as + well as required exposing too much detail about the Timer_Queue + classes. + The new mechanism is a single function in (expire_single) + ACE_Abstract_Timer_Queue<> (implemented in ACE_Timer_Queue_T<>) + which receives a command object to encapsulate the mutex release. + + * ace/Functor.h: + * ace/Functor.cpp: + * ace/Functor_T.h: + * ace/Functor_T.inl: + Add helper ACE_Command_* objects. One is a no-op, for the test + below. The other is a callback that ignores the silly void* + argument in the ACE_Command_Base::execute() member function. + + * tests/Timer_Queue_Reference_Counting_Test.cpp: + Re-factored test in terms of expire_single() + + === end changelog === + +Wed Dec 14 16:09:22 UTC 2011 Johnny Willemsen + + * bin/auto_run_tests.pl: + Fixed DANCE_ROOT + +Mon Dec 12 19:04:55 UTC 2011 Johnny Willemsen + + * bin/MakeProjectCreator/config/vc11.features: + * bin/MakeProjectCreator/config/vc11nmake.mpb: + New files for vc11 + +Mon Dec 12 07:33:25 UTC 2011 Johnny Willemsen + + === start changelog === + + Fri Dec 9 10:41:02 UTC 2011 Marcel Smit + + * docs/svn/config: + Subversion should ignore *_svnt_T.*. + + === end changelog === + +Mon Dec 5 22:23:25 UTC 2011 Steve Huston + + * ace/DLL.h: + * ace/DLL_Manager.h: Corrected and expanded the descriptions of how + DLL/library names are handled, decorated, and located. + +Mon Dec 5 20:16:51 UTC 2011 Steve Huston + + * ace/Atomic_Op.{h inl}: + * ace/Atomic_Op_T.{h inl}: + * ace/Atomic_Op_GCC_T.{h inl}: + Added new method TYPE exchange (TYPE newval) which exchanges the + ACE_Atomic_Op's value with the specified new value. Thanks to John + Lilley for contributing this addition. + + * tests/Atomic_Op_Test.cpp: Added test for exchange(). + + * NEWS: Added description of the new exchange() method. + +Mon Dec 5 12:27:54 UTC 2011 Johnny Willemsen + + * ace/TTY_IO.h: + Doxygen fix + + * ace/config-linux.h: + Layout changes + + * tests/Cached_Accept_Conn_Test.h: + * tests/Cached_Accept_Conn_Test.cpp: + * tests/MEM_Stream_Test.cpp: + * tests/QtReactor_Test.cpp: + Layout changes and removed some ACE_UNUSED_ARG usage + +Mon Dec 5 11:25:31 UTC 2011 Johnny Willemsen + + * bin/cleanbuilds.sh: + * bin/mail_test_stats.sh: + Extended our daily test stats with another email, the failing tests + for today excluding the not fixed ones + +Mon Dec 5 08:35:54 UTC 2011 Johnny Willemsen + + * docs/Download.html: + Release has vc9/vc10 + +Mon Dec 5 08:22:11 UTC 2011 Johnny Willemsen + + * bin/diff-builds-and-group-fixed-tests-only.sh: + * docs/Download.html: + * etc/index.html: + Made 6.0.6 publicly available + + * docs/bczar/bczar.html: + Updated for next release and added wget step to get subversion config + file to make sure we checkout using commit timestamps Local Variables: mode: change-log diff --git a/dep/acelite/NEWS b/dep/acelite/NEWS index d648b09c237..cf60110b536 100644 --- a/dep/acelite/NEWS +++ b/dep/acelite/NEWS @@ -1,3 +1,186 @@ +USER VISIBLE CHANGES BETWEEN ACE-6.1.3 and ACE-6.1.4 +==================================================== + +. Added a new ACE_Time_Value derived template class (Time_Value_T.h): + + template class ACE_Time_Value_T + + This template class overloads 4 new virtual methods from + the ACE_Time_Value base class to provide time policy aware + time values: + to_relative_time () + to_absolute_time () + now () + duplicate () + +. Updated time policy classes to return ACE_Time_Value_T<> instantiations + for the corresponding time policy instead of 'common' time values. + +. Added new ACE_Monotonic_Time_Policy (Monotonic_Time_Policy.h). + This class provides a monotonic time source for supported + platforms (Windows and POSIX platforms providing the required + clock_gettime() time source; currently verified for Windows and + Linux) + +. Updated OS_NS_Thread to use the new time policy support in ACE_Time_Value + for (relative) time calculations and added new ACE_OS::condattr_setclock () + method. + +. Added TIME_POLICY support to ACE_Condition_Attributes to allow for + monotonic timer support for ACE_Condition. + +. Added TIME_POLICY support to ACE_Message_Queue-s, ACE_Task-s and + related classes to enable support for monotonic timers in the timed + wait methods (ACE_Condition based). See docs/ACE-monotonic-timer.html + for how to use this. + +. Added two new regression tests: + Monotonic_Task_Test + Monotonic_Message_Queue_Test + and updated the Bug_4055_Regression_Test to a fixed state. + +USER VISIBLE CHANGES BETWEEN ACE-6.1.2 and ACE-6.1.3 +==================================================== + +. Added support for Oracle Solaris Studio 12 Update 3 (SunCC 5.12) + +. Added new XML_Utils library which comes from DAnCE but is now also used + by OpenDDS + +USER VISIBLE CHANGES BETWEEN ACE-6.1.1 and ACE-6.1.2 +==================================================== + +. Added compile time support for Windows CE 7, no runtime testing has + been performed + +. The High Res Timer global scale factor on Windows is now 64bit, see bugzilla + 3703 for the background of this. If you use the gsf in your code, use the + new ACE_High_Res_Timer::global_scale_factor_type type trait to not get + any conversion warnings + +. Removed Tandem NSK v2/v3 support which resulted in cleanup throughout all + code. The emulations for ACE_INT64/ACE_UINT64 have been removed because no + platform is using them anymore + +USER VISIBLE CHANGES BETWEEN ACE-6.1.0 and ACE-6.1.1 +==================================================== + +. Minor bug fixes + +USER VISIBLE CHANGES BETWEEN ACE-6.0.8 and ACE-6.1.0 +==================================================== + +. Added compilation support for VxWorks 6.9, no runtime + testing has been performed + +. Added ACE Run-length encoding compressor + +. Fixed several Coverity reported issues + +USER VISIBLE CHANGES BETWEEN ACE-6.0.7 and ACE-6.0.8 +==================================================== + +. Added support for MPC's new feature that creates dependency files for IDL + files when generating '-type gnuace' projects. Turned off by default, it + can be enabled in a features file or on the command line with + '-features ace_idl_dependencies=1'. + +USER VISIBLE CHANGES BETWEEN ACE-6.0.6 and ACE-6.0.7 +==================================================== + +. Added a new method to ACE_Atomic_Op, TYPE exchange (TYPE newval) + which does an atomic exchange of the new value with ACE_Atomic_Op's value + and returns the old value. The tests/Atomic_Op_Test.cpp test program has a + test case that exemplifies its usage; see the Exchange_Tester class. + +. Added a new feature to timer queue templates classes: TIME_POLICY. + This feature is specified through a new template argument and provides the + timer queue with a policy for a timer (time of day) value. This feature is + intended to replace (in time) the gettimeofday setter method which has been + marked @deprecated. For now backwards compatibility is guaranteed. + The TIME_POLICY feature provides flexibility with regards to providing a timer + source to the timer queues as well as the possibility for a fully optimized + calling path. + A number of standard time policies are provided in ace/Time_Policy.h. + The tests/Timer_Queue_Test.cpp has been updated to reflect and exemplify these + changes. + +. Added the TIME_POLICY feature also to countdown time class which has now + become a template (ace/Countdown_Time_T.h) + +. Initial support for Microsoft Visual Studio 11 + +. Increased overall code quality by using Coverity and Klocwork + +USER VISIBLE CHANGES BETWEEN ACE-6.0.5 and ACE-6.0.6 +==================================================== + +. Removed autoconf support, only traditional way of + compilation is shipped from now + +. Add support for RHEL 6.1 64bit + +USER VISIBLE CHANGES BETWEEN ACE-6.0.4 and ACE-6.0.5 +==================================================== + +. Improved support for Android and added the ability to run all ACE/TAO tests + automatically using the Android emulator + +USER VISIBLE CHANGES BETWEEN ACE-6.0.3 and ACE-6.0.4 +==================================================== + +. Removed support for C++ Builder + +. Added support for building with the Android NDK, at least r5c. This + is currently available for linux host platforms. + +USER VISIBLE CHANGES BETWEEN ACE-6.0.2 and ACE-6.0.3 +==================================================== + +. Added support for GCC 4.6 + +USER VISIBLE CHANGES BETWEEN ACE-6.0.1 and ACE-6.0.2 +==================================================== + +. The ACE_wrappers/ace/OS.h file has been restored in order to ensure + build-time compatibility with older ACE versions. Its use will still + cause your build to incur more processing time than using the needed + ace/OS_NS_*.h files; however, you should be able to build OS.h-including + code without needing to replace it with OS_NS_* includes. + +. Improved and simplified QNX support + +. Changed rand_r() and getpwnam_r() to conform Single UNIX Specification. + +. Fixed performance of send_v on windows when individual iovec elements + are particularly large. + +USER VISIBLE CHANGES BETWEEN ACE-6.0.0 and ACE-6.0.1 +==================================================== + +. Added support for MinGW with GCC 4.5 + +USER VISIBLE CHANGES BETWEEN ACE-5.8.3 and ACE-6.0.0 +==================================================== + +. Changed the string format produced by ACE::timestamp() from the ctime + format "Day Mon dd hh:mm:ss yyyy" to ISO-8601 yyyy-mm-dd hh:mm:ss.mmmmmm. + This makes the time easier to collate and removes any dependence on locale. + The change affects the output from ACE_Log_Msg's %D format and both VERBOSE + and VERBOSE_LIGHT timestamps in addition to application-made direct calls + to ACE::timestamp(). + +. Removed GCC < 3 support + +. A new build system hook was added for users to include site-private rules + in a build. If a file named "rules.private.GNU" in located in any build + directory it will get included from + $ACE_ROOT/include/makeinclude/rules.local.GNU. The "private_rules_file" + make variable can be set to override the name and/or location of the file. + If no such rules file exists, its absence is silently ignored. This + facility can be used, for example, to integrate a specialized code checker + into the build process. + USER VISIBLE CHANGES BETWEEN ACE-5.8.2 and ACE-5.8.3 ==================================================== diff --git a/dep/acelite/README b/dep/acelite/README index 1b46d7fd6f4..35198116bf5 100644 --- a/dep/acelite/README +++ b/dep/acelite/README @@ -1,3 +1,5 @@ +$Id: README 94611 2011-10-06 11:54:28Z msmit $ + This document is also available at the following URL: http://www.cs.wustl.edu/~schmidt/ACE.html diff --git a/dep/acelite/THANKS b/dep/acelite/THANKS index a23b239e6b2..dd9480b47f8 100644 --- a/dep/acelite/THANKS +++ b/dep/acelite/THANKS @@ -1,8 +1,8 @@ ACKNOWLEDGEMENTS -ACE and TAO have been deeply influenced and improved by the following -members of my research group at Washington University in St. Louis, the -University of California at Irvine, and Vanderbilt University in Nashville. +ACE, TAO, CIAO, and DAnCE have been deeply influenced and improved by the +following members of my research group at Washington University in St. Louis, +the University of California at Irvine, and Vanderbilt University in Nashville. Everett Anderson Alexander Babu Arulanthu @@ -75,7 +75,7 @@ Torben Worm Ming Xiong I would also like to thank all the following people who have also -contributed to ACE and TAO over the years: +contributed to ACE, TAO, CIAO, and DAnCE over the years: Paul Stephenson Olaf Kruger @@ -411,7 +411,7 @@ Andrew Harbick Pavel Motuzenko Ross J. Lillie Sam Hauer -Frank J. Hodum +Frank J. Hodum David Miron Anton van Straaten Joe Covalesky @@ -2339,6 +2339,36 @@ Matthew Waller Elez Ranjit Hande Van Vuong +Mark +Wendsomde Yameogo +Shi John +Helmut Böing +Andrew Hill +Henk Jan Priester +Glenn Zickert +Chris Galli +Laura Autón García +Jonathan Saxton +Remko Duppen +Paul Fitzpatrick +Chad Beaulac +Jochen Meier +Thomas Pauli +Qiao Zhiqiang +JaeSung Lee +Chong Wuk Pak +Michael Frommberger +Andrey Karpov +Dmytro Ovdiienko +Andrea Sormanni +Thomas Stegemann +David Simmonds +Andreas Dröscher +Markus Manck +Deux deVille +Mohsin Zaidi +Milind Pangarkar +Ali Akbar Zarezadeh I would particularly like to thank Paul Stephenson, who worked with me at Ericsson in the early 1990's. Paul devised the recursive Makefile diff --git a/dep/acelite/VERSION b/dep/acelite/VERSION index 594af04e592..144300e4267 100644 --- a/dep/acelite/VERSION +++ b/dep/acelite/VERSION @@ -1,4 +1,4 @@ -This is ACE version 5.8.3, released Wed Oct 27 12:01:05 CEST 2010 +This is ACE version 6.1.4, released Wed Aug 29 08:16:04 CEST 2012 If you have any problems with or questions about ACE, please send e-mail to the ACE mailing list (ace-bugs@list.isis.vanderbilt.edu), diff --git a/dep/acelite/ace/ACE.cpp b/dep/acelite/ace/ACE.cpp index 433b5e3e788..a965eff09f6 100644 --- a/dep/acelite/ace/ACE.cpp +++ b/dep/acelite/ace/ACE.cpp @@ -1,4 +1,4 @@ -// $Id: ACE.cpp 92298 2010-10-21 11:15:17Z johnnyw $ +// $Id: ACE.cpp 96017 2012-08-08 22:18:09Z mitza $ #include "ace/ACE.h" @@ -25,10 +25,6 @@ #include "ace/OS_TLI.h" #include "ace/Truncate.h" -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) -extern "C" int maxFiles; -#endif /* ACE_VXWORKS */ - #if !defined (__ACE_INLINE__) #include "ace/ACE.inl" #endif /* __ACE_INLINE__ */ @@ -68,7 +64,7 @@ ACE::out_of_handles (int error) #elif defined (HPUX) // On HPUX, we need to check for EADDRNOTAVAIL also. error == EADDRNOTAVAIL || -#elif defined (linux) +#elif defined (ACE_LINUX) // On linux, we need to check for ENOENT also. error == ENOENT || // For RedHat5.2, need to check for EINVAL too. @@ -2308,7 +2304,7 @@ ACE::format_hexdump (const char *buffer, ACE_TEXT (" ")); ++obuf; } - textver[j] = ACE_OS::ace_isprint (c) ? c : '.'; + textver[j] = ACE_OS::ace_isprint (c) ? c : u_char ('.'); } textver[j] = 0; @@ -2340,7 +2336,7 @@ ACE::format_hexdump (const char *buffer, ACE_TEXT (" ")); ++obuf; } - textver[i] = ACE_OS::ace_isprint (c) ? c : '.'; + textver[i] = ACE_OS::ace_isprint (c) ? c : u_char ('.'); } for (i = size % 16; i < 16; i++) @@ -2371,7 +2367,8 @@ ACE::format_hexdump (const char *buffer, // 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. +// also stored in the beginning of the date_and_time array +// using ISO-8601 format. ACE_TCHAR * ACE::timestamp (ACE_TCHAR date_and_time[], @@ -2386,7 +2383,10 @@ ACE::timestamp (ACE_TCHAR date_and_time[], // Returns the given 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. +// also stored in the beginning of the date_and_time array +// using ISO-8601 format. +// 012345678901234567890123456 +// 2010-12-02 12:56:00.123456 ACE_TCHAR * ACE::timestamp (const ACE_Time_Value& time_value, @@ -2396,92 +2396,32 @@ ACE::timestamp (const ACE_Time_Value& time_value, { //ACE_TRACE ("ACE::timestamp"); - if (date_and_timelen < 35) + // This magic number is from the formatting statement + // farther down this routine. + if (date_and_timelen < 27) { errno = EINVAL; return 0; } -#if defined (WIN32) - if (time_value == ACE_Time_Value::zero) - { - // Emulate Unix. Win32 does NOT support all the UNIX versions - // below, so DO we need this ifdef. - static const ACE_TCHAR *day_of_week_name[] = - { - ACE_TEXT ("Sun"), - ACE_TEXT ("Mon"), - ACE_TEXT ("Tue"), - ACE_TEXT ("Wed"), - ACE_TEXT ("Thu"), - ACE_TEXT ("Fri"), - ACE_TEXT ("Sat") - }; - - static const ACE_TCHAR *month_name[] = - { - ACE_TEXT ("Jan"), - ACE_TEXT ("Feb"), - ACE_TEXT ("Mar"), - ACE_TEXT ("Apr"), - ACE_TEXT ("May"), - ACE_TEXT ("Jun"), - ACE_TEXT ("Jul"), - ACE_TEXT ("Aug"), - ACE_TEXT ("Sep"), - ACE_TEXT ("Oct"), - ACE_TEXT ("Nov"), - ACE_TEXT ("Dec") - }; - - SYSTEMTIME local; - ::GetLocalTime (&local); - - ACE_OS::sprintf (date_and_time, - ACE_TEXT ("%3s %3s %2d %04d %02d:%02d:%02d.%06d"), - day_of_week_name[local.wDayOfWeek], - month_name[local.wMonth - 1], - (int) local.wDay, - (int) local.wYear, - (int) local.wHour, - (int) local.wMinute, - (int) local.wSecond, - (int) (local.wMilliseconds * 1000)); - return &date_and_time[15 + (return_pointer_to_first_digit != 0)]; - } -#endif /* WIN32 */ - ACE_TCHAR timebuf[26]; // This magic number is based on the ctime(3c) man page. ACE_Time_Value cur_time = (time_value == ACE_Time_Value::zero) ? ACE_Time_Value (ACE_OS::gettimeofday ()) : time_value; time_t secs = cur_time.sec (); - - ACE_OS::ctime_r (&secs, - timebuf, - sizeof timebuf / sizeof (ACE_TCHAR)); - // date_and_timelen > sizeof timebuf! - ACE_OS::strsncpy (date_and_time, - timebuf, - date_and_timelen); - ACE_TCHAR yeartmp[5]; - ACE_OS::strsncpy (yeartmp, - &date_and_time[20], - 5); - ACE_TCHAR timetmp[9]; - ACE_OS::strsncpy (timetmp, - &date_and_time[11], - 9); - ACE_OS::sprintf (&date_and_time[11], -# if defined (ACE_USES_WCHAR) - ACE_TEXT ("%ls %ls.%06ld"), -# else - ACE_TEXT ("%s %s.%06ld"), -# endif /* ACE_USES_WCHAR */ - yeartmp, - timetmp, - cur_time.usec ()); - date_and_time[33] = '\0'; - return &date_and_time[15 + (return_pointer_to_first_digit != 0)]; + struct tm tms; + ACE_OS::localtime_r (&secs, &tms); + ACE_OS::snprintf (date_and_time, + date_and_timelen, + ACE_TEXT ("%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d.%06ld"), + tms.tm_year + 1900, + tms.tm_mon + 1, + tms.tm_mday, + tms.tm_hour, + tms.tm_min, + tms.tm_sec, + static_cast (cur_time.usec())); + date_and_time[date_and_timelen - 1] = '\0'; + return &date_and_time[10 + (return_pointer_to_first_digit != 0)]; } // This function rounds the request to a multiple of the page size. @@ -2866,9 +2806,7 @@ ACE::max_handles (void) #endif /* RLIMIT_NOFILE && !ACE_LACKS_RLIMIT */ #if defined (_SC_OPEN_MAX) - return ACE_OS::sysconf (_SC_OPEN_MAX); -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620) - return maxFiles; + return static_cast (ACE_OS::sysconf (_SC_OPEN_MAX)); #elif defined (FD_SETSIZE) return FD_SETSIZE; #else @@ -2915,7 +2853,7 @@ ACE::set_handle_limit (int new_limit, #if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE) rl.rlim_cur = new_limit; return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); -#elif defined (ACE_LACKS_RLIMIT_NOFILE) +#elif !defined (RLIMIT_NOFILE) return 0; #else // Must return EINVAL errno. @@ -3342,10 +3280,7 @@ ACE::strnew (const char *s) ACE_NEW_RETURN (t, char [ACE_OS::strlen (s) + 1], 0); - if (t == 0) - return 0; - else - return ACE_OS::strcpy (t, s); + return ACE_OS::strcpy (t, s); } #if defined (ACE_HAS_WCHAR) @@ -3358,10 +3293,7 @@ ACE::strnew (const wchar_t *s) ACE_NEW_RETURN (t, wchar_t[ACE_OS::strlen (s) + 1], 0); - if (t == 0) - return 0; - else - return ACE_OS::strcpy (t, s); + return ACE_OS::strcpy (t, s); } #endif /* ACE_HAS_WCHAR */ @@ -3400,7 +3332,7 @@ namespace // characters are allowed as the range endpoints. These characters // are the same values in both signed and unsigned chars so we // don't have to account for any "pathological cases." - for (char range = p[-1] + 1; range <= p[1]; ++range) + for (char range = static_cast (p[-1] + 1); range <= p[1]; ++range) { if (equal_char (s, range, case_sensitive)) { diff --git a/dep/acelite/ace/ACE.h b/dep/acelite/ace/ACE.h index 04b39a85652..58eb1f68947 100644 --- a/dep/acelite/ace/ACE.h +++ b/dep/acelite/ace/ACE.h @@ -4,7 +4,7 @@ /** * @file ACE.h * - * $Id: ACE.h 92060 2010-09-27 18:08:48Z johnnyw $ + * $Id: ACE.h 93276 2011-02-04 20:03:53Z olli $ * * This file contains value added ACE functions that extend the * behavior of the UNIX and Win32 OS calls. @@ -474,15 +474,23 @@ namespace ACE ACE_DIRECTORY_SEPARATOR_CHAR); /** - * Returns the given timestamp in the form - * "hour:minute:second:microsecond." The month, day, and year are - * also stored in the beginning of the @a date_and_time array, which - * is a user-supplied array of size @a time_len> @c ACE_TCHARs. - * Returns 0 if unsuccessful, else returns pointer to beginning of the - * "time" portion of @a date_and_time. If @a - * return_pointer_to_first_digit is 0 then return a pointer to the - * space before the time, else return a pointer to the beginning of - * the time portion. + * Translate the given timestamp to ISO-8601 format. + * + * @param time_value ACE_Time_Value to format. This is assumed to be + * an absolute time value. + * @param date_and_time Array to hold the timestamp. + * @param time_len Size of @a date_and_time in ACE_TCHARs. + * Must be greater than or equal to 27. + * @param return_pointer_to_first_digit If true, returned pointer value + * is to the first time digit, else to the space + * prior to the first time digit. See Return Values. + * + * @retval 0 if unsuccessful, with errno set. If @a time_len is less than + * 27 errno will be EINVAL. + * @retval If successful, pointer to beginning of the "time" portion of + * @a date_and_time. If @a return_pointer_to_first_digit is false + * the pointer is actually to the space before the time, else + * the pointer is to the first time digit. */ extern ACE_Export ACE_TCHAR *timestamp (const ACE_Time_Value& time_value, ACE_TCHAR date_and_time[], @@ -490,15 +498,21 @@ namespace ACE bool return_pointer_to_first_digit = false); /** - * Returns the current timestamp in the form - * "hour:minute:second:microsecond." The month, day, and year are - * also stored in the beginning of the @a date_and_time array, which - * is a user-supplied array of size @a time_len> @c ACE_TCHARs. - * Returns 0 if unsuccessful, else returns pointer to beginning of the - * "time" portion of @a date_and_time. If @a - * return_pointer_to_first_digit is 0 then return a pointer to the - * space before the time, else return a pointer to the beginning of - * the time portion. + * Translate the current time to ISO-8601 timestamp format. + * + * @param date_and_time Array to hold the timestamp. + * @param time_len Size of @a date_and_time in ACE_TCHARs. + * Must be greater than or equal to 27. + * @param return_pointer_to_first_digit If true, returned pointer value + * is to the first time digit, else to the space + * prior to the first time digit. See Return Values. + * + * @retval 0 if unsuccessful, with errno set. If @a time_len is less than + * 27 errno will be EINVAL. + * @retval If successful, pointer to beginning of the "time" portion of + * @a date_and_time. If @a return_pointer_to_first_digit is false + * the pointer is actually to the space before the time, else + * the pointer is to the first time digit. */ extern ACE_Export ACE_TCHAR *timestamp (ACE_TCHAR date_and_time[], size_t time_len, @@ -650,6 +664,14 @@ namespace ACE return !((a < b) || (a > b)); } + /// Helper to avoid comparing floating point values with != + /// (uses < and > operators). + template + bool is_inequal (const T& a, const T& b) + { + return !is_equal (a, b); + } + /// Hex conversion utility. extern ACE_Export ACE_TCHAR nibble2hex (u_int n); diff --git a/dep/acelite/ace/ACE.inl b/dep/acelite/ace/ACE.inl index e36e4f01f7b..95f45ee99d3 100644 --- a/dep/acelite/ace/ACE.inl +++ b/dep/acelite/ace/ACE.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: ACE.inl 91813 2010-09-17 07:52:52Z johnnyw $ +// $Id: ACE.inl 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_Thread.h" @@ -230,7 +230,7 @@ ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) ACE_INLINE ssize_t ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len) { -#if defined (ACE_WIN32) || defined (ACE_OPENVMS) || defined (ACE_TANDEM_T1248_PTHREADS) +#if defined (ACE_WIN32) || defined (ACE_OPENVMS) return ACE_OS::recv (handle, (char *) buf, len); #else return ACE_OS::read (handle, (char *) buf, len); diff --git a/dep/acelite/ace/ACE_crc_ccitt.cpp b/dep/acelite/ace/ACE_crc_ccitt.cpp index 7dfefa5c69d..c1455d79171 100644 --- a/dep/acelite/ace/ACE_crc_ccitt.cpp +++ b/dep/acelite/ace/ACE_crc_ccitt.cpp @@ -1,4 +1,4 @@ -// $Id: ACE_crc_ccitt.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: ACE_crc_ccitt.cpp 96017 2012-08-08 22:18:09Z mitza $ #include "ace/ACE.h" @@ -65,7 +65,7 @@ namespace /*****************************************************************/ } -#define COMPUTE(var, ch) (var) = (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) +#define COMPUTE(var, ch) (var) = static_cast (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) // Open versioned namespace, if enabled by the user. ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -82,13 +82,13 @@ ACE::crc_ccitt (const char *string) COMPUTE (crc, *p); } - return ~crc; + return static_cast (~crc); } ACE_UINT16 ACE::crc_ccitt (const void *buffer, size_t len, ACE_UINT16 crc) { - crc = ~crc; + crc = static_cast (~crc); for (const char *p = (const char *) buffer, *e = (const char *) buffer + len; @@ -98,13 +98,13 @@ ACE::crc_ccitt (const void *buffer, size_t len, ACE_UINT16 crc) COMPUTE (crc, *p); } - return ~crc; + return static_cast (~crc); } ACE_UINT16 ACE::crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc) { - crc = ~crc; + crc = static_cast (~crc); for (int i = 0; i < len; ++i) { @@ -115,7 +115,7 @@ ACE::crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc) COMPUTE (crc, *p); } - return ~crc; + return static_cast (~crc); } // Close versioned namespace, if enabled by the user. diff --git a/dep/acelite/ace/ARGV.cpp b/dep/acelite/ace/ARGV.cpp index 3b46459fe5b..e64c5d8696f 100644 --- a/dep/acelite/ace/ARGV.cpp +++ b/dep/acelite/ace/ARGV.cpp @@ -1,4 +1,4 @@ -// $Id: ARGV.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: ARGV.cpp 95630 2012-03-22 13:04:47Z johnnyw $ #ifndef ACE_ARGV_CPP #define ACE_ARGV_CPP @@ -167,6 +167,7 @@ ACE_ARGV_T::ACE_ARGV_T (CHAR_TYPE *first_argv[], CHAR_TYPE *first_buf = 0; CHAR_TYPE *second_buf = 0; + size_t buf_len = 1; // convert the first argv to a string if (first_argv != 0 && first_argv[0] != 0) @@ -175,6 +176,7 @@ ACE_ARGV_T::ACE_ARGV_T (CHAR_TYPE *first_argv[], first_buf, substitute_env_args, quote_args); + buf_len += ACE_OS::strlen (first_buf); } // convert the second argv to a string @@ -184,14 +186,12 @@ ACE_ARGV_T::ACE_ARGV_T (CHAR_TYPE *first_argv[], second_buf, substitute_env_args, quote_args); + buf_len += ACE_OS::strlen (second_buf); } // Add the number of arguments in both the argvs. this->argc_ = first_argc + second_argc; - size_t buf_len = - ACE_OS::strlen (first_buf) + ACE_OS::strlen (second_buf) + 1; - // Allocate memory to the lenght of the combined argv string. ACE_NEW (this->buf_, CHAR_TYPE[buf_len + 1]); diff --git a/dep/acelite/ace/ARGV.h b/dep/acelite/ace/ARGV.h index 66e71810a95..1c291bd6eda 100644 --- a/dep/acelite/ace/ARGV.h +++ b/dep/acelite/ace/ARGV.h @@ -4,7 +4,7 @@ /** * @file ARGV.h * - * $Id: ARGV.h 81156 2008-03-30 20:56:47Z iliyan $ + * $Id: ARGV.h 95972 2012-07-26 10:20:42Z johnnyw $ * * @author Doug Schmidt * @author Everett Anderson @@ -206,8 +206,8 @@ public: * * @param index Index to the desired element. * - * @retval Pointer to the indexed string. - * @retval 0 if @a index is out of bounds. + * @retval Pointer to the indexed string. + * @retval 0 if @a index is out of bounds. */ const CHAR_TYPE *operator[] (size_t index); diff --git a/dep/acelite/ace/ATM_Stream.inl b/dep/acelite/ace/ATM_Stream.inl index 007e25832a5..94de09004d4 100644 --- a/dep/acelite/ace/ATM_Stream.inl +++ b/dep/acelite/ace/ATM_Stream.inl @@ -1,6 +1,5 @@ // -*- C++ -*- -// -// $Id: ATM_Stream.inl 84262 2009-01-29 10:34:33Z johnnyw $ +// $Id: ATM_Stream.inl 92474 2010-11-02 13:29:39Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Abstract_Timer_Queue.cpp b/dep/acelite/ace/Abstract_Timer_Queue.cpp new file mode 100644 index 00000000000..3207733b24e --- /dev/null +++ b/dep/acelite/ace/Abstract_Timer_Queue.cpp @@ -0,0 +1,26 @@ +//$Id: Abstract_Timer_Queue.cpp 95334 2011-12-15 12:52:50Z msmit $ + +#ifndef ACE_ABSTRACT_TIMER_QUEUE_CPP +#define ACE_ABSTRACT_TIMER_QUEUE_CPP +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Abstract_Timer_Queue.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Even though the destructor is pure virtual you must provide an +// implementation. Most people know this, but sometimes we all +// forget, and we might be tempted to remove this code. +template +ACE_Abstract_Timer_Queue:: +~ACE_Abstract_Timer_Queue () +{ +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_ABSTRACT_TIMER_QUEUE_CPP */ diff --git a/dep/acelite/ace/Abstract_Timer_Queue.h b/dep/acelite/ace/Abstract_Timer_Queue.h new file mode 100644 index 00000000000..ddb8abf7f15 --- /dev/null +++ b/dep/acelite/ace/Abstract_Timer_Queue.h @@ -0,0 +1,230 @@ +//$Id: Abstract_Timer_Queue.h 95368 2011-12-19 13:38:49Z mcorino $ + +#ifndef ACE_ABSTRACT_TIMER_QUEUE_H +#define ACE_ABSTRACT_TIMER_QUEUE_H + +#include /**/ "ace/pre.h" +/** + * @file Abstract_Timer_Queue.h + * + * @author Carlos O'Ryan + * + * Based on classes and files developed by Doug Schmidt, Darrell + * Brunsch, Irfan Pyarali and a cast of thousands. + */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward declares +class ACE_Time_Value; +class ACE_Command_Base; +template class ACE_Timer_Queue_Iterator_T; +template class ACE_Timer_Node_T; + +/** + * @class ACE_Abstract_Timer_Queue + * + * @brief Base class for all timer queues of a single type. + * + * This is a base class for all the timer queues, regardless of + * locking strategy, upcall mechanism, internal implementation, etc. + * The class was motivated by bug 3706: + * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3706 + * In short, the Reactor (and potentially other classes) want to refer + * to timer queues regardless of the implementation internals. + */ +template +class ACE_Abstract_Timer_Queue +{ +public: + /// Destructor + virtual ~ACE_Abstract_Timer_Queue (void) = 0; + + /// True if queue is empty, else false. + virtual bool is_empty (void) const = 0; + + /// Returns the time of the earlier node in the Timer_Queue. Must + /// be called on a non-empty queue. + virtual const ACE_Time_Value &earliest_time (void) const = 0; + + /** + * Schedule @a type that will expire at @a future_time, which is + * specified in absolute time. If it expires then @a act is passed + * in as the value to the . If @a interval is != to + * ACE_Time_Value::zero then it is used to reschedule the @a type + * automatically, using relative time to the current . + * This method returns a that uniquely identifies the the + * @a type entry in an internal list. This can be used to + * cancel the timer before it expires. The cancellation ensures + * that are unique up to values of greater than 2 + * billion timers. As long as timers don't stay around longer than + * this there should be no problems with accidentally deleting the + * wrong timer. Returns -1 on failure (which is guaranteed never to + * be a valid ). + */ + virtual long schedule (const TYPE &type, + const void *act, + const ACE_Time_Value &future_time, + const ACE_Time_Value &interval = ACE_Time_Value::zero) = 0; + + /** + * Run the for all timers whose values are <= @a current_time. + * This does not account for . Returns the number of + * timers canceled. + */ + virtual int expire (const ACE_Time_Value ¤t_time) = 0; + + /** + * Run the for all timers whose values are <= + * . Also accounts for . + * + * Depending on the resolution of the underlying OS the system calls + * like select()/poll() might return at time different than that is + * specified in the timeout. Suppose the OS guarantees a resolution of t ms. + * The timeline will look like + * + * A B + * | | + * V V + * |-------------|-------------|-------------|-------------| + * t t t t t + * + * + * If you specify a timeout value of A, then the timeout will not occur + * at A but at the next interval of the timer, which is later than + * that is expected. Similarly, if your timeout value is equal to B, + * then the timeout will occur at interval after B. Now depending upon the + * resolution of your timeouts and the accuracy of the timeouts + * needed for your application, you should set the value of + * . In the above case, if you want the timeout A to fire + * no later than A, then you should specify your to be + * A % t. + * + * The timeout value should be specified via the macro ACE_TIMER_SKEW + * in your config.h file. The default value is zero. + * + * Things get interesting if the t before the timeout value B is zero + * i.e your timeout is less than the interval. In that case, you are + * almost sure of not getting the desired timeout behaviour. Maybe you + * should look for a better OS :-) + * + * Returns the number of timers canceled. + */ + virtual int expire (void) = 0; + + /** + * A couple of classes using Timer_Queues need to dispatch a single + * event at a time. But before they dispatch the event they need to + * release a lock, signal other threads, etc. + * + * This member function should be used in that case. The additional + * operations to be called just before dispatching the event, and + * only if an event will be dispatched, are encapsulated in the + * ACE_Command_Base object. + */ + virtual int expire_single(ACE_Command_Base & pre_dispatch_command) = 0; + + /** + * Resets the interval of the timer represented by @a timer_id to + * @a interval, which is specified in relative time to the current + * . If @a interval is equal to + * ACE_Time_Value::zero, the timer will become a non-rescheduling + * timer. Returns 0 if successful, -1 if not. + */ + virtual int reset_interval (long timer_id, + const ACE_Time_Value &interval) = 0; + + /** + * Cancel all timer associated with @a type. If + * @a dont_call_handle_close is 0 then the will be invoked, + * which typically invokes the hook. Returns number + * of timers cancelled. + */ + virtual int cancel (const TYPE &type, + int dont_call_handle_close = 1) = 0; + + /** + * Cancel the single timer that matches the @a timer_id value (which + * was returned from the method). If act is non-NULL + * then it will be set to point to the ``magic cookie'' argument + * passed in when the timer was registered. This makes it possible + * to free up the memory and avoid memory leaks. If + * @a dont_call_handle_close is 0 then the will be invoked, + * which typically calls the hook. Returns 1 if + * cancellation succeeded and 0 if the @a timer_id wasn't found. + */ + virtual int cancel (long timer_id, + const void **act = 0, + int dont_call_handle_close = 1) = 0; + + /** + * Close timer queue. Cancels all timers. + */ + virtual int close (void) = 0; + + /** + * Returns the current time of day. This method allows different + * implementations of the timer queue to use special high resolution + * timers. + */ + virtual ACE_Time_Value gettimeofday (void) = 0; + + /** + * Allows applications to control how the timer queue gets the time + * of day. + * @deprecated Use TIME_POLICY support instead. See Timer_Queue_T.h + */ + virtual void gettimeofday (ACE_Time_Value (*gettimeofday)(void)) = 0; + + /// Determine the next event to timeout. Returns @a max if there are + /// no pending timers or if all pending timers are longer than max. + /// This method acquires a lock internally since it modifies internal state. + virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max) = 0; + + /** + * Determine the next event to timeout. Returns @a max if there are + * no pending timers or if all pending timers are longer than max. + * should be a pointer to storage for the timeout value, + * and this value is also returned. This method does not acquire a + * lock internally since it doesn't modify internal state. If you + * need to call this method when the queue is being modified + * concurrently, however, you should make sure to acquire the + * externally before making the call. + */ + virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max, + ACE_Time_Value *the_timeout) = 0; + + /** + * Return the current time, using the right time policy and any + * timer skew defined in derived classes. + */ + virtual ACE_Time_Value current_time() = 0; + + /// Type of Iterator. + typedef ACE_Timer_Queue_Iterator_T ITERATOR; + + /// Returns a pointer to this ACE_Timer_Queue's iterator. + virtual ITERATOR & iter (void) = 0; + + /// Removes the earliest node from the queue and returns it + virtual ACE_Timer_Node_T *remove_first (void) = 0; + + /// Reads the earliest node from the queue and returns it. + virtual ACE_Timer_Node_T *get_first (void) = 0; + + /// Dump the state of a object. + virtual void dump (void) const = 0; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ace/Abstract_Timer_Queue.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Abstract_Timer_Queue.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#include /**/ "ace/post.h" +#endif /* ACE_ABSTRACT_TIMER_QUEUE_H */ diff --git a/dep/acelite/ace/Acceptor.cpp b/dep/acelite/ace/Acceptor.cpp index 236a35ba803..72bebfd78c4 100644 --- a/dep/acelite/ace/Acceptor.cpp +++ b/dep/acelite/ace/Acceptor.cpp @@ -1,4 +1,4 @@ -// $Id: Acceptor.cpp 91623 2010-09-06 09:30:59Z sma $ +// $Id: Acceptor.cpp 95730 2012-05-04 17:28:19Z johnnyw $ #ifndef ACE_ACCEPTOR_CPP #define ACE_ACCEPTOR_CPP @@ -900,7 +900,10 @@ ACE_Oneshot_Acceptor::open template ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor (void) - : delete_concurrency_strategy_ (false) + : svc_handler_ (0), + restart_ (false), + concurrency_strategy_ (0), + delete_concurrency_strategy_ (false) { ACE_TRACE ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"); this->reactor (0); @@ -911,7 +914,10 @@ ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr, ACE_Reactor *reactor, ACE_Concurrency_Strategy *cs) - : delete_concurrency_strategy_ (false) + : svc_handler_ (0), + restart_ (false), + concurrency_strategy_ (0), + delete_concurrency_strategy_ (false) { ACE_TRACE ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"); if (this->open (local_addr, reactor, cs) == -1) @@ -1010,7 +1016,7 @@ ACE_Oneshot_Acceptor::register_handler if (tv != 0 && this->reactor ()->schedule_timer (this, synch_options.arg (), - *tv) == 0) + *tv) == -1) return -1; else return this->reactor ()->register_handler diff --git a/dep/acelite/ace/Acceptor.h b/dep/acelite/ace/Acceptor.h index 64cf488b9d4..fdd00d5a04d 100644 --- a/dep/acelite/ace/Acceptor.h +++ b/dep/acelite/ace/Acceptor.h @@ -4,7 +4,7 @@ /** * @file Acceptor.h * - * $Id: Acceptor.h 88800 2010-02-01 23:18:34Z shuston $ + * $Id: Acceptor.h 93624 2011-03-22 21:14:05Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -193,9 +193,9 @@ protected: virtual int accept_svc_handler (SVC_HANDLER *svc_handler); /** - * Bridge method for activating a {svc_handler} with the appropriate + * Bridge method for activating a @a svc_handler with the appropriate * concurrency strategy. The default behavior of this method is to - * activate the SVC_HANDLER by calling its {open} method (which + * activate the SVC_HANDLER by calling its open() method (which * allows the SVC_HANDLER to define its own concurrency strategy). * However, subclasses can override this strategy to do more * sophisticated concurrency activations (such as making the diff --git a/dep/acelite/ace/Active_Map_Manager.h b/dep/acelite/ace/Active_Map_Manager.h index a6c167e5f88..7bade46aa5b 100644 --- a/dep/acelite/ace/Active_Map_Manager.h +++ b/dep/acelite/ace/Active_Map_Manager.h @@ -4,7 +4,7 @@ /** * @file Active_Map_Manager.h * - * $Id: Active_Map_Manager.h 91066 2010-07-12 11:05:04Z johnnyw $ + * $Id: Active_Map_Manager.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Irfan Pyarali */ @@ -68,7 +68,7 @@ public: void decode (const void *data); /// Encode state of the active key into @a data. @a data must be as - /// big as the value returned from . + /// big as the value returned from size(). void encode (void *data) const; /// Compare keys. diff --git a/dep/acelite/ace/Arg_Shifter.h b/dep/acelite/ace/Arg_Shifter.h index 57cd2b0f56c..123a70560cf 100644 --- a/dep/acelite/ace/Arg_Shifter.h +++ b/dep/acelite/ace/Arg_Shifter.h @@ -4,7 +4,7 @@ /** * @file Arg_Shifter.h * - * $Id: Arg_Shifter.h 91459 2010-08-25 09:51:01Z mcorino $ + * $Id: Arg_Shifter.h 95972 2012-07-26 10:20:42Z johnnyw $ * * @author Seth Widoff */ @@ -211,10 +211,10 @@ private: /// The index of in which we'll stick the next known /// argument. - int front_; - /* This is not really the "front" at all. It's the point after + /** This is not really the "front" at all. It's the point after * which the unknown arguments end and at which the known arguments begin. */ + int front_; }; typedef ACE_Arg_Shifter_T ACE_Arg_Shifter; diff --git a/dep/acelite/ace/Argv_Type_Converter.h b/dep/acelite/ace/Argv_Type_Converter.h index d41d839b671..0cf62fa089e 100644 --- a/dep/acelite/ace/Argv_Type_Converter.h +++ b/dep/acelite/ace/Argv_Type_Converter.h @@ -4,7 +4,7 @@ /** * @file Argv_Type_Converter.h * - * $Id: Argv_Type_Converter.h 83891 2008-11-28 11:01:50Z johnnyw $ + * $Id: Argv_Type_Converter.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Si Mong Park */ @@ -78,7 +78,7 @@ private: /// argv list. void align_wchar_with_char (void); - /// Clean up removed (comsumed) argv entries and reset the pass flags. + /// Clean up removed (consumed) argv entries and reset the pass flags. void cleanup (void); #endif // ACE_USES_WCHAR diff --git a/dep/acelite/ace/Array_Base.h b/dep/acelite/ace/Array_Base.h index 0d6620a6ca6..9276bf6ee38 100644 --- a/dep/acelite/ace/Array_Base.h +++ b/dep/acelite/ace/Array_Base.h @@ -4,7 +4,7 @@ /** * @file Array_Base.h * - * $Id: Array_Base.h 84477 2009-02-16 13:30:38Z johnnyw $ + * $Id: Array_Base.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Douglas C. Schmidt */ @@ -67,21 +67,21 @@ public: ACE_Array_Base (size_type size = 0, ACE_Allocator * the_allocator = 0); - /// Dynamically initialize the entire array to the . + /// Dynamically initialize the entire array to the @a default_value. ACE_Array_Base (size_type size, T const & default_value, ACE_Allocator * the_allocator = 0); /** * The copy constructor performs initialization by making an exact - * copy of the contents of parameter , i.e., *this == s will + * copy of the contents of parameter @a s, i.e., *this == s will * return true. */ ACE_Array_Base (ACE_Array_Base const & s); /** * Assignment operator performs an assignment by making an exact - * copy of the contents of parameter , i.e., *this == s will + * copy of the contents of parameter @a s, i.e., *this == s will * return true. Note that if the of is >= than * we can copy it without reallocating. However, if * is < we must delete the , diff --git a/dep/acelite/ace/Array_Map.cpp b/dep/acelite/ace/Array_Map.cpp index 5530a8b54b6..25b4e24579c 100644 --- a/dep/acelite/ace/Array_Map.cpp +++ b/dep/acelite/ace/Array_Map.cpp @@ -1,4 +1,4 @@ -// $Id: Array_Map.cpp 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Array_Map.cpp 92386 2010-10-28 07:44:37Z johnnyw $ #ifndef ACE_ARRAY_MAP_CPP #define ACE_ARRAY_MAP_CPP @@ -15,7 +15,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#ifndef ACE_LACKS_MEMBER_TEMPLATES template template ACE_Array_Map::ACE_Array_Map (InputIterator f, @@ -34,26 +33,6 @@ ACE_Array_Map::ACE_Array_Map (InputIterator f, // for (InputIterator i = f; i != l; ++i, ++n) // *n = *i; } -#else -template -ACE_Array_Map::ACE_Array_Map ( - typename ACE_Array_Map::const_iterator f, - typename ACE_Array_Map::const_iterator l) - : size_ (l - f) - , capacity_ (size_) - , nodes_ (size_ == 0 ? 0 : new value_type[size_]) -{ - (void) std::copy (f, - l, - ACE_make_checked_array_iterator (this->begin (), - this->size_)); - -// iterator n = this->begin (); - -// for (const_iterator i = f; i != l; ++i, ++n) -// *n = *i; -} -#endif /* !ACE_LACKS_MEMBER_TEMPLATES */ template ACE_Array_Map::ACE_Array_Map ( @@ -119,7 +98,6 @@ ACE_Array_Map::insert ( return std::make_pair (i, inserted); } -#ifndef ACE_LACKS_MEMBER_TEMPLATES template template void @@ -132,21 +110,6 @@ ACE_Array_Map::insert (InputIterator f, InputIterator l) (void) this->insert (*i); } } -#else -template -void -ACE_Array_Map::insert ( - typename ACE_Array_Map::const_iterator f, - typename ACE_Array_Map::const_iterator l) -{ - this->grow (l - f); // Preallocate storage. - - for (const_iterator i = f; i != l; ++i) - { - (void) this->insert (*i); - } -} -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ template void diff --git a/dep/acelite/ace/Array_Map.h b/dep/acelite/ace/Array_Map.h index 1515ea45529..0bd3b1ffeda 100644 --- a/dep/acelite/ace/Array_Map.h +++ b/dep/acelite/ace/Array_Map.h @@ -4,7 +4,7 @@ /** * @file Array_Map.h * - * $Id: Array_Map.h 84136 2009-01-12 11:01:17Z johnnyw $ + * $Id: Array_Map.h 92386 2010-10-28 07:44:37Z johnnyw $ * * Light weight array-based map with fast iteration but linear * (i.e. O(n)) search times. STL-style interface is exposed. @@ -110,12 +110,8 @@ public: */ ACE_Array_Map (size_type s = 0); -#ifndef ACE_LACKS_MEMBER_TEMPLATES template ACE_Array_Map (InputIterator f, InputIterator l); -#else - ACE_Array_Map (const_iterator f, const_iterator l); -#endif /* !ACE_LACKS_MEMBER_TEMPLATES */ ACE_Array_Map (ACE_Array_Map const & map); ACE_Array_Map & operator= (ACE_Array_Map const & map); @@ -181,14 +177,9 @@ public: */ std::pair insert (value_type const & x); -#ifndef ACE_LACKS_MEMBER_TEMPLATES /// Insert range of elements into map. template void insert (InputIterator f, InputIterator l); -#else - /// Insert range of elements into map. - void insert (const_iterator f, const_iterator l); -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ /// Remove element at position @a pos from the map. void erase (iterator pos); diff --git a/dep/acelite/ace/Asynch_Acceptor.cpp b/dep/acelite/ace/Asynch_Acceptor.cpp index 56af2f14056..916b250b7af 100644 --- a/dep/acelite/ace/Asynch_Acceptor.cpp +++ b/dep/acelite/ace/Asynch_Acceptor.cpp @@ -1,5 +1,5 @@ /* -*- C++ -*- */ -// $Id: Asynch_Acceptor.cpp 91693 2010-09-09 12:57:54Z johnnyw $ +// $Id: Asynch_Acceptor.cpp 95630 2012-03-22 13:04:47Z johnnyw $ #ifndef ACE_ASYNCH_ACCEPTOR_C #define ACE_ASYNCH_ACCEPTOR_C @@ -30,7 +30,8 @@ ACE_Asynch_Acceptor::ACE_Asynch_Acceptor (void) pass_addresses_ (false), validate_new_connection_ (false), reissue_accept_ (1), - bytes_to_read_ (0) + bytes_to_read_ (0), + addr_family_ (0) { } @@ -297,8 +298,10 @@ ACE_Asynch_Acceptor::handle_accept (const ACE_Asynch_Accept::Result &re // If no errors if (!error) { - // Update the Proactor. - new_handler->proactor (this->proactor ()); + // Update the Proactor unless make_handler() or constructed handler + // set up its own. + if (new_handler->proactor () == 0) + new_handler->proactor (this->proactor ()); // Pass the addresses if (this->pass_addresses_) diff --git a/dep/acelite/ace/Asynch_IO_Impl.h b/dep/acelite/ace/Asynch_IO_Impl.h index 06eb5c10a87..e820529dfb5 100644 --- a/dep/acelite/ace/Asynch_IO_Impl.h +++ b/dep/acelite/ace/Asynch_IO_Impl.h @@ -4,7 +4,7 @@ /** * @file Asynch_IO_Impl.h * - * $Id: Asynch_IO_Impl.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Asynch_IO_Impl.h 93359 2011-02-11 11:33:12Z mcorino $ * * * This class contains asbtract base classes for all the concrete @@ -81,7 +81,7 @@ public: /** * POSIX4 real-time signal number to be used for the - * operation. ranges from SIGRTMIN to SIGRTMAX. By + * operation. signal_number ranges from SIGRTMIN to SIGRTMAX. By * default, SIGRTMIN is used to issue calls. This is a no-op * on non-POSIX4 systems and returns 0. */ diff --git a/dep/acelite/ace/Atomic_Op.h b/dep/acelite/ace/Atomic_Op.h index 4dee35e6efb..e2f477fbbc7 100644 --- a/dep/acelite/ace/Atomic_Op.h +++ b/dep/acelite/ace/Atomic_Op.h @@ -4,7 +4,7 @@ /** * @file Atomic_Op.h * - * $Id: Atomic_Op.h 91523 2010-08-27 14:18:02Z johnnyw $ + * $Id: Atomic_Op.h 95225 2011-12-05 20:25:15Z shuston $ * * @author Douglas C. Schmidt */ @@ -124,6 +124,9 @@ public: /// Atomically assign to @c value_. ACE_Atomic_Op &operator= (const ACE_Atomic_Op &rhs); + /// Exchange value with @a newval. + long exchange (long newval); + /// Explicitly return @c value_. long value (void) const; @@ -221,6 +224,9 @@ public: /// Atomically assign to @c value_. ACE_Atomic_Op &operator= (const ACE_Atomic_Op &rhs); + /// Exchange value with @a newval. + unsigned long exchange (unsigned long newval); + /// Explicitly return @c value_. unsigned long value (void) const; diff --git a/dep/acelite/ace/Atomic_Op.inl b/dep/acelite/ace/Atomic_Op.inl index 564017aec62..e1f1ca21143 100644 --- a/dep/acelite/ace/Atomic_Op.inl +++ b/dep/acelite/ace/Atomic_Op.inl @@ -1,6 +1,5 @@ // -*- C++ -*- -// -// $Id: Atomic_Op.inl 91813 2010-09-17 07:52:52Z johnnyw $ +// $Id: Atomic_Op.inl 95225 2011-12-05 20:25:15Z shuston $ #if defined (ACE_HAS_INTRINSIC_INTERLOCKED) # include "ace/os_include/os_intrin.h" @@ -189,6 +188,22 @@ ACE_Atomic_Op::operator= ( return *this; } +ACE_INLINE long +ACE_Atomic_Op::exchange (long newval) +{ +#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) + return ::_InterlockedExchange (const_cast (&this->value_), newval); +#elif defined (WIN32) + return ::InterlockedExchange (const_cast (&this->value_), newval); +#elif defined (ACE_HAS_VXATOMICLIB) + return ::vxAtomicSet (reinterpret_cast (const_cast (&this->value_)), newval); +#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) + return ::atomic_swap_ulong (reinterpret_cast(&this->value_), newval); +#else /* WIN32 */ + return (*exchange_fn_) (&this->value_, newval); +#endif /* WIN32 */ +} + ACE_INLINE long ACE_Atomic_Op::value (void) const { @@ -373,6 +388,22 @@ ACE_Atomic_Op::operator= ( return *this; } +ACE_INLINE unsigned long +ACE_Atomic_Op::exchange (unsigned long newval) +{ +#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) + return ::_InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), newval); +#elif defined (WIN32) + return ::InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), newval); +#elif defined (ACE_HAS_VXATOMICLIB) + return ::vxAtomicSet (reinterpret_cast (const_cast (reinterpret_cast (&this->value_))), newval); +#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) + return ::atomic_swap_ulong (&this->value_, newval); +#else /* WIN32 */ + return (*exchange_fn_) (reinterpret_cast (&this->value_), newval); +#endif /* WIN32 */ +} + ACE_INLINE unsigned long ACE_Atomic_Op::value (void) const { diff --git a/dep/acelite/ace/Atomic_Op_GCC_T.h b/dep/acelite/ace/Atomic_Op_GCC_T.h index 92bc771dda6..f980f7f022e 100644 --- a/dep/acelite/ace/Atomic_Op_GCC_T.h +++ b/dep/acelite/ace/Atomic_Op_GCC_T.h @@ -4,7 +4,7 @@ /** * @file Atomic_Op_GCC_T.h * - * $Id: Atomic_Op_GCC_T.h 89339 2010-03-05 12:20:47Z johnnyw $ + * $Id: Atomic_Op_GCC_T.h 95225 2011-12-05 20:25:15Z shuston $ * * @author Johnny Willemsen ::operator= ( return *this; } +template +ACE_INLINE T +ACE_Atomic_Op_GCC::exchange (T newval) +{ + return __sync_val_compare_and_swap (&this->value_, this->value_, newval); +} + template ACE_INLINE T ACE_Atomic_Op_GCC::value (void) const diff --git a/dep/acelite/ace/Atomic_Op_T.h b/dep/acelite/ace/Atomic_Op_T.h index 7a20049ced8..944c0454c38 100644 --- a/dep/acelite/ace/Atomic_Op_T.h +++ b/dep/acelite/ace/Atomic_Op_T.h @@ -4,7 +4,7 @@ /** * @file Atomic_Op_T.h * - * $Id: Atomic_Op_T.h 92353 2010-10-25 06:34:35Z johnnyw $ + * $Id: Atomic_Op_T.h 95761 2012-05-15 18:23:04Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -88,22 +88,17 @@ struct ACE_Type_Traits typedef unsigned long parameter_type; }; -#ifndef ACE_LACKS_LONGLONG_T template<> struct ACE_Type_Traits { typedef long long parameter_type; }; -#endif /* !ACE_LACKS_LONGLONG_T */ -#if !defined (ACE_LACKS_LONGLONG_T) \ - && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) template<> struct ACE_Type_Traits { typedef unsigned long long parameter_type; }; -#endif /* !ACE_LACKS_LONGLONG_T && !ACE_LACKS_UNSIGNEDLONGLONG_T */ template<> struct ACE_Type_Traits @@ -207,6 +202,9 @@ public: ACE_Atomic_Op_Ex &operator= ( ACE_Atomic_Op_Ex const & rhs); + /// Exchange value with @a newval. + TYPE exchange (TYPE newval); + /// Explicitly return @c value_. TYPE value (void) const; @@ -318,6 +316,9 @@ public: /// Atomically check if @c value_ less than @a rhs. bool operator< (arg_type rhs) const; + /// Exchange value with @a newval. + TYPE exchange (TYPE newval); + /// Explicitly return @c value_. TYPE value (void) const; diff --git a/dep/acelite/ace/Atomic_Op_T.inl b/dep/acelite/ace/Atomic_Op_T.inl index 71ce1c1e267..87e6b55d7be 100644 --- a/dep/acelite/ace/Atomic_Op_T.inl +++ b/dep/acelite/ace/Atomic_Op_T.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Atomic_Op_T.inl 91688 2010-09-09 11:21:50Z johnnyw $ +// $Id: Atomic_Op_T.inl 95225 2011-12-05 20:25:15Z shuston $ #include "ace/Guard_T.h" @@ -152,6 +152,16 @@ ACE_Atomic_Op_Ex::operator= ( return *this; } +template +ACE_INLINE TYPE +ACE_Atomic_Op_Ex::exchange (TYPE newval) +{ + // ACE_TRACE ("ACE_Atomic_Op_Ex::exchange"); + ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); + std::swap (this->value_, newval); + return newval; +} + template ACE_INLINE TYPE ACE_Atomic_Op_Ex::value (void) const @@ -306,6 +316,13 @@ ACE_Atomic_Op::operator< ( return this->impl_ < rhs; } +template +ACE_INLINE TYPE +ACE_Atomic_Op::exchange (TYPE newval) +{ + return this->impl_.exchange (newval); +} + template ACE_INLINE TYPE ACE_Atomic_Op::value (void) const diff --git a/dep/acelite/ace/Auto_Functor.h b/dep/acelite/ace/Auto_Functor.h index 2c2b81eb265..393a11c73bc 100644 --- a/dep/acelite/ace/Auto_Functor.h +++ b/dep/acelite/ace/Auto_Functor.h @@ -3,7 +3,7 @@ /** * @file Auto_Functor.h * - * $Id: Auto_Functor.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Auto_Functor.h 92386 2010-10-28 07:44:37Z johnnyw $ * * @author Carlos O'Ryan */ @@ -69,13 +69,11 @@ public: Auto_Functor& operator= (Auto_Functor & rhs); // throw() -#if !defined(ACE_LACKS_MEMBER_TEMPLATES) template Auto_Functor(Auto_Functor& rhs); // throw() template Auto_Functor& operator= (Auto_Functor& rhs); // throw() -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ ~Auto_Functor(); // throw() @@ -97,13 +95,9 @@ public: Auto_Functor & operator=(Auto_Functor_Ref rhs); // throw() -#if !defined(ACE_LACKS_MEMBER_TEMPLATES) template operator Auto_Functor_Ref(); // throw() template operator Auto_Functor(); // throw() -#else - operator Auto_Functor_Ref(); // throw() -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ private: X * p_; diff --git a/dep/acelite/ace/Auto_Functor.inl b/dep/acelite/ace/Auto_Functor.inl index d4cb2cc0473..5e714e01410 100644 --- a/dep/acelite/ace/Auto_Functor.inl +++ b/dep/acelite/ace/Auto_Functor.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Auto_Functor.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Auto_Functor.inl 92386 2010-10-28 07:44:37Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -35,7 +35,6 @@ ACE_Utils::Auto_Functor:: operator=(Auto_Functor & rhs) return *this; } -#if !defined(ACE_LACKS_MEMBER_TEMPLATES) template template ACE_INLINE ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor& rhs) : p_(rhs.release()) @@ -50,7 +49,6 @@ ACE_Utils::Auto_Functor::operator=(Auto_Functor& rhs) reset(rhs.release()); return *this; } -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ template ACE_INLINE X & ACE_Utils::Auto_Functor::operator*() const @@ -107,8 +105,6 @@ ACE_Utils::Auto_Functor::operator=(Auto_Functor_Ref rhs) return *this; } -#if !defined(ACE_LACKS_MEMBER_TEMPLATES) - template template ACE_INLINE ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor_Ref() { @@ -121,14 +117,4 @@ ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor( return ACE_Utils::Auto_Functor(release(), f_); } -#else - -templateACE_INLINE -ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor_Ref() -{ - return ACE_Utils::Auto_Functor_Ref(release(), f_); -} - -#endif /* ACE_LACKS_MEMBER_TEMPLATES */ - ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Auto_Ptr.h b/dep/acelite/ace/Auto_Ptr.h index 3183019aceb..e9468a73bc7 100644 --- a/dep/acelite/ace/Auto_Ptr.h +++ b/dep/acelite/ace/Auto_Ptr.h @@ -4,7 +4,7 @@ /** * @file Auto_Ptr.h * - * $Id: Auto_Ptr.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Auto_Ptr.h 92580 2010-11-15 09:48:02Z johnnyw $ * * @author Doug Schmidt * @author Irfan Pyarali @@ -106,9 +106,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @brief Implements the draft C++ standard auto_ptr abstraction. - * This version can be used instead of auto_ptr, and obviates - * the need for the ACE_AUTO_PTR_RESET macro on platforms like - * VC6 where the auto_ptr is broken. + * This version can be used instead of auto_ptr */ template class ACE_Auto_Ptr : public ACE_Auto_Basic_Ptr @@ -209,18 +207,6 @@ ACE_auto_ptr_reset (AUTO_PTR_TYPE & ap, ACE_END_VERSIONED_NAMESPACE_DECL -// Some platforms have an older version of auto_ptr -// support, which lacks reset, and cannot be disabled -// easily. Portability to these platforms requires -// use of the following ACE_AUTO_PTR_RESET macro. -// -// The TYPE macro parameter is no longer necessary but we leave it -// around for backward compatibility. This is also the reason why the -// ACE_auto_ptr_reset function template is not called -// ACE_AUTO_PTR_RESET. -# define ACE_AUTO_PTR_RESET(AUTOPTR,NEWPTR,TYPE) \ - ACE_auto_ptr_reset (AUTOPTR, NEWPTR); - #if defined (__ACE_INLINE__) #include "ace/Auto_Ptr.inl" #endif /* __ACE_INLINE__ */ diff --git a/dep/acelite/ace/Barrier.h b/dep/acelite/ace/Barrier.h index 84d7b6492ff..e1e3815e190 100644 --- a/dep/acelite/ace/Barrier.h +++ b/dep/acelite/ace/Barrier.h @@ -4,7 +4,7 @@ /** * @file Barrier.h * - * $Id: Barrier.h 92069 2010-09-28 11:38:59Z johnnyw $ + * $Id: Barrier.h 93359 2011-02-11 11:33:12Z mcorino $ * * Moved from Synch.h. * @@ -101,7 +101,7 @@ public: const ACE_TCHAR *name = 0, void *arg = 0); - /// Default dtor. + /// Default destructor. ~ACE_Barrier (void); /// Block the caller until all @c count threads have called @c wait and @@ -170,7 +170,7 @@ public: /// Create a Thread_Barrier, passing in the optional @a name. ACE_Thread_Barrier (unsigned int count, const ACE_TCHAR *name = 0); - /// Default dtor. + /// Default destructor. ~ACE_Thread_Barrier (void); /// Dump the state of an object. diff --git a/dep/acelite/ace/Base_Thread_Adapter.cpp b/dep/acelite/ace/Base_Thread_Adapter.cpp index fd2629f1608..4b7b6a84c08 100644 --- a/dep/acelite/ace/Base_Thread_Adapter.cpp +++ b/dep/acelite/ace/Base_Thread_Adapter.cpp @@ -1,4 +1,4 @@ -// $Id: Base_Thread_Adapter.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Base_Thread_Adapter.cpp 95595 2012-03-07 13:33:25Z johnnyw $ #include "ace/Base_Thread_Adapter.h" @@ -29,12 +29,14 @@ ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter ( , ACE_SEH_EXCEPT_HANDLER selector , ACE_SEH_EXCEPT_HANDLER handler #endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ + , long cancel_flags ) : user_func_ (user_func) , arg_ (arg) , entry_point_ (entry_point) , thr_desc_ (td) , ctx_ (ACE_Service_Config::current()) + , flags_ (cancel_flags) { ACE_OS_TRACE ("ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter"); @@ -83,6 +85,10 @@ ACE_Base_Thread_Adapter::sync_log_msg (const ACE_TCHAR *prg) (*ACE_Base_Thread_Adapter::sync_log_msg_hook_) (prg); } +ACE_OS_Thread_Descriptor::~ACE_OS_Thread_Descriptor (void) +{ +} + ACE_OS_Thread_Descriptor * ACE_Base_Thread_Adapter::thr_desc_log_msg (void) { diff --git a/dep/acelite/ace/Base_Thread_Adapter.h b/dep/acelite/ace/Base_Thread_Adapter.h index b36d18e4f13..2075e9122ad 100644 --- a/dep/acelite/ace/Base_Thread_Adapter.h +++ b/dep/acelite/ace/Base_Thread_Adapter.h @@ -4,7 +4,7 @@ /** * @file Base_Thread_Adapter.h * - * $Id: Base_Thread_Adapter.h 81239 2008-04-04 22:28:48Z iliyan $ + * $Id: Base_Thread_Adapter.h 95595 2012-03-07 13:33:25Z johnnyw $ * * @author Nanbor Wang */ @@ -33,9 +33,8 @@ # define ACE_THREAD_ADAPTER_NAME ace_thread_adapter #endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ -// Run the thread entry point for the ACE_Thread_Adapter. This must -// be an extern "C" to make certain compilers happy... - +/// Run the thread entry point for the ACE_Thread_Adapter. This must +/// be an extern "C" to make certain compilers happy... extern "C" ACE_Export ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME (void *args); ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -44,7 +43,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * @class ACE_OS_Thread_Descriptor * * @brief Parent class of all ACE_Thread_Descriptor classes. - * = + * * Container for ACE_Thread_Descriptor members that are * used in ACE_OS. */ @@ -54,6 +53,8 @@ public: /// Get the thread creation flags. long flags (void) const; + virtual ~ACE_OS_Thread_Descriptor (void); + protected: /// For use by ACE_Thread_Descriptor. ACE_OS_Thread_Descriptor (long flags = 0); @@ -61,17 +62,14 @@ protected: /** * Keeps track of whether this thread was created "detached" or not. * If a thread is *not* created detached then if someone calls - * , we need to join with that thread (and + * ACE_Thread_Manager::wait(), we need to join with that thread (and * close down the handle). */ long flags_; }; - - class ACE_Service_Gestalt; - /** * @class ACE_Base_Thread_Adapter * @@ -126,6 +124,7 @@ protected: , ACE_SEH_EXCEPT_HANDLER selector = 0 , ACE_SEH_EXCEPT_HANDLER handler = 0 # endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ + , long cancel_flags = 0 ); /// Inherit the logging features if the parent thread has an /// ACE_Log_Msg. @@ -162,8 +161,8 @@ protected: /** * Optional thread descriptor. Passing this pointer in will force - * the spawned thread to cache this location in and wait - * until fills in all information in thread + * the spawned thread to cache this location in Log_Msg and wait + * until Thread_Manager fills in all information in thread * descriptor. */ ACE_OS_Thread_Descriptor *thr_desc_; @@ -171,7 +170,7 @@ protected: /// The ACE_Log_Msg attributes. ACE_OS_Log_Msg_Attributes log_msg_attributes_; - /// That is usefull for gprof, define itimerval + /// That is useful for gprof, define itimerval #ifdef ACE_USES_GPROF struct itimerval itimer_; #endif // ACE_USES_GPROF @@ -179,6 +178,11 @@ protected: /// Keep a reference to the configuration context that spawns the /// thread so the child can inherit it. ACE_Service_Gestalt * const ctx_; + + /// Pass through the thread-creation flags that can only be acted on by + /// the spawned thread. Currently this is only the cancellation-related + /// flags. + long flags_; }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Basic_Stats.cpp b/dep/acelite/ace/Basic_Stats.cpp index ae663abe221..93c4c0bdde8 100644 --- a/dep/acelite/ace/Basic_Stats.cpp +++ b/dep/acelite/ace/Basic_Stats.cpp @@ -1,4 +1,4 @@ -// $Id: Basic_Stats.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Basic_Stats.cpp 95743 2012-05-13 12:29:28Z johnnyw $ #include "ace/Basic_Stats.h" #include "ace/Log_Msg.h" @@ -42,7 +42,9 @@ ACE_Basic_Stats::accumulate (const ACE_Basic_Stats &rhs) } void -ACE_Basic_Stats::dump_results (const ACE_TCHAR *msg, ACE_UINT32 sf) const +ACE_Basic_Stats::dump_results ( + const ACE_TCHAR *msg, + ACE_Basic_Stats::scale_factor_type sf) const { #ifndef ACE_NLOGGING if (this->samples_count () == 0u) diff --git a/dep/acelite/ace/Basic_Stats.h b/dep/acelite/ace/Basic_Stats.h index bff1ff29f65..eb6c393b904 100644 --- a/dep/acelite/ace/Basic_Stats.h +++ b/dep/acelite/ace/Basic_Stats.h @@ -3,13 +3,12 @@ /** * @file Basic_Stats.h * - * $Id: Basic_Stats.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Basic_Stats.h 95743 2012-05-13 12:29:28Z johnnyw $ * * @author Carlos O'Ryan */ //============================================================================= - #ifndef ACE_BASIC_STATS_H #define ACE_BASIC_STATS_H #include /**/ "ace/pre.h" @@ -32,6 +31,12 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Basic_Stats { public: +#if !defined (ACE_WIN32) + typedef ACE_UINT32 scale_factor_type; +#else + typedef ACE_UINT64 scale_factor_type; +#endif + /// Constructor /** * The number of samples is pre-allocated, and cannot changes once @@ -56,7 +61,7 @@ public: * presented in microseconds. */ void dump_results (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const; + scale_factor_type scale_factor) const; /// The number of samples ACE_UINT32 samples_count_; diff --git a/dep/acelite/ace/Basic_Types.cpp b/dep/acelite/ace/Basic_Types.cpp index 6c161098f8d..c915dabee17 100644 --- a/dep/acelite/ace/Basic_Types.cpp +++ b/dep/acelite/ace/Basic_Types.cpp @@ -1,136 +1,3 @@ -// $Id: Basic_Types.cpp 91366 2010-08-16 12:42:35Z mhengstmengel $ +// $Id: Basic_Types.cpp 95763 2012-05-16 06:43:51Z johnnyw $ #include "ace/Basic_Types.h" - -#if !defined (__ACE_INLINE__) -# include "ace/Basic_Types.inl" -#endif /* ! __ACE_INLINE__ */ - - -#if defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -# include "ace/Log_Msg.h" -# include "ace/OS_NS_stdio.h" -# include "ace/OS_NS_string.h" -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) -// FUZZ: disable check_for_streams_include -# include "ace/streams.h" -# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_U_LongLong::output (FILE *file) const -{ - if (h_ () > 0) - ACE_OS::fprintf (file, "0x%lx%0*lx", h_ (), 2 * sizeof l_ (), l_ ()); - else - ACE_OS::fprintf (file, "0x%lx", l_ ()); -} - - -ACE_TCHAR * -ACE_U_LongLong::as_string (ACE_TCHAR *output, - unsigned int base, - unsigned int uppercase) const -{ - if (*this == 0) - { - ACE_OS::strcpy(output, "0"); - } - else - { - switch(base) - { - case 8: - { - unsigned int index = 0; - int bshift = 31; - while(bshift >= 1) - { - unsigned int sval = (this->h_ () >> bshift) & 7; - if (sval > 0 || index != 0) - { - output[index] = sval + '0'; - ++index; - } - bshift -= 3; - } - bshift = 30; - while(bshift >= 0) - { - unsigned int sval = (this->l_ () >> bshift) & 7; - // Combine the last bit of hi with the first 3-bit digit - if (bshift == 30) - { - sval |= (this->h_ () & 1) << 2; - } - if (sval > 0 || index != 0) - { - output[index] = sval + '0'; - ++index; - } - bshift -= 3; - } - output[index] = '\0'; - break; - } - case 10: - { - ACE_OS::sprintf(output, "%.0f", *this / 1.0); - break; - } - case 16: - { - if (this->h_ () != 0) - { - ACE_OS::sprintf(output, - (uppercase ? "%lX%0*lX" : "%lx%0*lx"), - this->h_ (), 2 * sizeof this->l_ (), - this->l_ ()); - } - else - { - ACE_OS::sprintf(output, - (uppercase ? "%lX" : "%lx"), this->l_ ()); - - } - break; - } - default: - { - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Unsupported base = %u\n"), base)); - output[0] = '\0'; - } - } - } - - return output; -} - - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) -ostream& -operator<< (ostream& os, const ACE_U_LongLong& ll) -{ -#ifdef __TANDEM && (__CPLUSPLUS_VERSION >= 3) - unsigned long flags = os.flags(); -#else - unsigned long flags = os.setf(0); -#endif - char buffer[32]; - - if ((flags & ios::oct) != 0) - os << ll.as_string (buffer, 8); - else if ((flags & ios::hex) != 0) - os << ll.as_string (buffer, 16, (flags & ios::uppercase)); - else - os << ll.as_string (buffer); - return os; -} -# endif - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_LONGLONG_T */ - diff --git a/dep/acelite/ace/Basic_Types.h b/dep/acelite/ace/Basic_Types.h index bc467fafb5c..fc275ee314b 100644 --- a/dep/acelite/ace/Basic_Types.h +++ b/dep/acelite/ace/Basic_Types.h @@ -4,7 +4,7 @@ /** * @file Basic_Types.h * - * $Id: Basic_Types.h 91161 2010-07-21 18:25:12Z schmidt $ + * $Id: Basic_Types.h 96017 2012-08-08 22:18:09Z mitza $ * * @author David L. Levine * @@ -25,7 +25,6 @@ * - ACE_SIZEOF_LONG_DOUBLE * * Wrappers for built-in types of specific sizes: - * - ACE_USHORT16 (For backward compatibility. Use ACE_UINT16 instead.) * - ACE_INT8 * - ACE_UINT8 * - ACE_INT16 @@ -33,13 +32,10 @@ * - ACE_INT32 * - ACE_UINT32 * - ACE_UINT64 - * (@note ACE_INT64 is partly defined, there is no ACE_LongLong for - * platforms that don't have a native 8-byte integer type.) + * - ACE_INT64 * * Byte-order (endian-ness) determination: * ACE_BYTE_ORDER, to either ACE_BIG_ENDIAN or ACE_LITTLE_ENDIAN - * - * */ //============================================================================= @@ -60,10 +56,6 @@ # include "ace/os_include/os_stdlib.h" // Other types # include "ace/os_include/os_stddef.h" // Get ptrdiff_t - see further comments below -# if defined(ACE_LACKS_LONGLONG_T) -# include "ace/os_include/os_stdio.h" // For long long emulation -# endif /* ACE_LACKS_LONGLONG_T */ - # include "ace/os_include/sys/os_types.h" # if !defined (ACE_LACKS_SYS_PARAM_H) @@ -100,15 +92,11 @@ typedef ACE::If_Then_Else< ACE::If_Then_Else< (sizeof (void*) == sizeof (signed long)), signed long, -#ifdef ACE_LACKS_LONGLONG_T - void /* Unknown. Force an invalid type */ -#else ACE::If_Then_Else< (sizeof (void*) == sizeof (signed long long)), signed long long, void /* Unknown. Force an invalid type */ >::result_type -#endif /* ACE_LACKS_LONGLONG_T */ >::result_type >::result_type intptr_t; @@ -118,15 +106,11 @@ typedef ACE::If_Then_Else< ACE::If_Then_Else< (sizeof (void*) == sizeof (unsigned long)), unsigned long, -#ifdef ACE_LACKS_UNSIGNEDLONGLONG_T - void /* Unknown. Force an invalid type */ -#else ACE::If_Then_Else< (sizeof (void*) == sizeof (unsigned long long)), unsigned long long, void /* Unknown. Force an invalid type */ >::result_type -#endif /* ACE_LACKS_UNSIGNEDLONGLONG_T */ >::result_type >::result_type uintptr_t; @@ -195,9 +179,7 @@ typedef ACE::If_Then_Else< // The number of bytes in a long long. # if !defined (ACE_SIZEOF_LONG_LONG) -# if defined (ACE_LACKS_LONGLONG_T) -# define ACE_SIZEOF_LONG_LONG 8 -# elif defined (ULLONG_MAX) +# if defined (ULLONG_MAX) # if ((ULLONG_MAX) == 4294967295ULL) # define ACE_SIZEOF_LONG_LONG 4 # elif ((ULLONG_MAX) == 18446744073709551615ULL) @@ -299,7 +281,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef int64_t ACE_INT64; #elif ACE_SIZEOF_LONG == 8 typedef long ACE_INT64; -#elif !defined (ACE_LACKS_LONGLONG_T) && ACE_SIZEOF_LONG_LONG == 8 +#elif ACE_SIZEOF_LONG_LONG == 8 # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. @@ -308,29 +290,22 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef long long ACE_INT64; #endif /* defined (ACE_INT64_TYPE) */ -#if !(defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)) -/* See matching #if around ACE_U_LongLong class declaration below */ - -# if defined (ACE_UINT64_TYPE) +#if defined (ACE_UINT64_TYPE) typedef ACE_UINT64_TYPE ACE_UINT64; -# elif defined (ACE_HAS_UINT64_T) +#elif defined (ACE_HAS_UINT64_T) typedef uint64_t ACE_UINT64; -# elif ACE_SIZEOF_LONG == 8 +#elif ACE_SIZEOF_LONG == 8 typedef unsigned long ACE_UINT64; -# elif ACE_SIZEOF_LONG_LONG == 8 +#elif ACE_SIZEOF_LONG_LONG == 8 # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. __extension__ # endif /* __GNUC__ */ typedef unsigned long long ACE_UINT64; -# endif /* defined (ACE_UINT64_TYPE) */ -#endif /* !(ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T) */ +#endif /* defined (ACE_UINT64_TYPE) */ - -typedef ACE_UINT16 ACE_USHORT16; // @@ Backward compatibility. - -// Define a generic byte for use in codecs +/// Define a generic byte for use in codecs typedef unsigned char ACE_Byte; // Define a pseudo wide character type when wchar is not supported so we @@ -428,240 +403,11 @@ ACE_END_VERSIONED_NAMESPACE_DECL # define ACE_NTOHS(x) x # endif /* ACE_LITTLE_ENDIAN */ -#if defined (ACE_LACKS_LONGLONG_T) - // This throws away the high 32 bits. It's very unlikely that a - // pointer will be more than 32 bits wide if the platform does not - // support 64-bit integers. # define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast (L.lo ()) -#elif defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast (static_cast (L)) -#else /* ! ACE_LACKS_LONGLONG_T */ -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast (static_cast (L)) -#endif /* ! ACE_LACKS_LONGLONG_T */ - -// If the platform lacks an unsigned long long, define one. -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -// Forward declaration for streams -# include "ace/iosfwd.h" + reinterpret_cast (static_cast (L)) ACE_BEGIN_VERSIONED_NAMESPACE_DECL -/** - * @class ACE_U_LongLong - * - * @brief Unsigned long long for platforms that don't have one. - * - * Provide our own unsigned long long. This is intended to be - * use with ACE_High_Res_Timer, so the division operator assumes - * that the quotient fits into a u_long. - * Please note that the constructor takes (optionally) two values. - * The high one contributes 0x100000000 times its value. So, - * for example, (0, 2) is _not_ 20000000000, but instead - * 0x200000000. To emphasize this, the default values are expressed - * in hex, and output () dumps the value in hex. - */ - class ACE_Export ACE_U_LongLong - { - public: - // = Initialization and termination methods. -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - ACE_U_LongLong (const long long value = 0x0); -#else - ACE_U_LongLong (const ACE_UINT32 lo = 0x0, const ACE_UINT32 hi = 0x0); -#endif - ACE_U_LongLong (const ACE_U_LongLong &); - ACE_U_LongLong &operator= (const ACE_U_LongLong &); - ACE_U_LongLong &operator= (const ACE_INT32 &); - ACE_U_LongLong &operator= (const ACE_UINT32 &); - ~ACE_U_LongLong (void); - - // = Overloaded relation operators. - bool operator== (const ACE_U_LongLong &) const; - bool operator== (const ACE_UINT32) const; - bool operator!= (const ACE_U_LongLong &) const; - bool operator!= (const ACE_UINT32) const; - bool operator< (const ACE_U_LongLong &) const; - bool operator< (const ACE_UINT32) const; - bool operator<= (const ACE_U_LongLong &) const; - bool operator<= (const ACE_UINT32) const; - bool operator> (const ACE_U_LongLong &) const; - bool operator> (const ACE_UINT32) const; - bool operator>= (const ACE_U_LongLong &) const; - bool operator>= (const ACE_UINT32) const; - - ACE_U_LongLong operator+ (const ACE_U_LongLong &) const; - ACE_U_LongLong operator+ (const ACE_UINT32) const; - ACE_U_LongLong operator- (const ACE_U_LongLong &) const; - ACE_U_LongLong operator- (const ACE_UINT32) const; - ACE_U_LongLong operator* (const ACE_UINT32) const; - ACE_U_LongLong &operator*= (const ACE_UINT32); - - ACE_U_LongLong operator<< (const unsigned int) const; - ACE_U_LongLong &operator<<= (const unsigned int); - ACE_U_LongLong operator>> (const unsigned int) const; - ACE_U_LongLong &operator>>= (const unsigned int); - - double operator/ (const double) const; - - ACE_U_LongLong &operator+= (const ACE_U_LongLong &); - ACE_U_LongLong &operator+= (const ACE_UINT32); - ACE_U_LongLong &operator-= (const ACE_U_LongLong &); - ACE_U_LongLong &operator-= (const ACE_UINT32); - ACE_U_LongLong &operator++ (); - ACE_U_LongLong &operator-- (); - const ACE_U_LongLong operator++ (int); - const ACE_U_LongLong operator-- (int); - ACE_U_LongLong &operator|= (const ACE_U_LongLong); - ACE_U_LongLong &operator|= (const ACE_UINT32); - ACE_U_LongLong &operator&= (const ACE_U_LongLong); - ACE_U_LongLong &operator&= (const ACE_UINT32); - - // Note that the following take ACE_UINT32 arguments. These are - // typical use cases, and easy to implement. But, they limit the - // return values to 32 bits as well. There are no checks for - // overflow. - ACE_UINT32 operator/ (const ACE_UINT32) const; - ACE_UINT32 operator% (const ACE_UINT32) const; - - // The following only operate on the lower 32 bits (they take only - // 32 bit arguments). - ACE_UINT32 operator| (const ACE_INT32) const; - ACE_UINT32 operator& (const ACE_INT32) const; - - // The following operators convert their arguments to - // ACE_UINT32. So, there may be information loss if they are - // used. - ACE_U_LongLong operator* (const ACE_INT32) const; - ACE_U_LongLong &operator*= (const ACE_INT32); - ACE_UINT32 operator/ (const ACE_INT32) const; -# if ACE_SIZEOF_INT == 4 - ACE_UINT32 operator/ (const unsigned long) const; - ACE_UINT32 operator/ (const long) const; -# else /* ACE_SIZEOF_INT != 4 */ - ACE_UINT32 operator/ (const unsigned int) const; - ACE_UINT32 operator/ (const int) const; -# endif /* ACE_SIZEOF_INT != 4 */ - - // = Helper methods. - /// Outputs the value to the FILE, in hex. - void output (FILE * = stdout) const; - - ACE_TCHAR *as_string (ACE_TCHAR *string, - unsigned int base = 10, - unsigned int uppercase = 0) const; - - ACE_UINT32 hi (void) const; - ACE_UINT32 lo (void) const; - - void hi (const ACE_UINT32 hi); - void lo (const ACE_UINT32 lo); - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - long long to_int64 (void) const; -# endif - - private: - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - long long data_; -#else - public: - struct ace_hi_lo_correct_endian - { -# if defined (ACE_BIG_ENDIAN) - /// High 32 bits. - ACE_UINT32 hi_; - /// Low 32 bits. - ACE_UINT32 lo_; - -# else - - /// Low 32 bits. - ACE_UINT32 lo_; - /// High 32 bits. - ACE_UINT32 hi_; -# endif /* ! ACE_BIG_ENDIAN */ - }; - private: - union - { - struct ace_hi_lo_correct_endian data_; - - /// To ensure alignment on 8-byte boundary. - double for_alignment_; - }; - - // @note the following four accessors are inlined here in - // order to minimize the extent of the data_ struct. It's - // only used here; the .i and .cpp files use the accessors. - - /// Internal utility function to hide access through struct. - const ACE_UINT32 &h_ () const { return data_.hi_; } - - /// Internal utility function to hide access through struct. - ACE_UINT32 &h_ () { return data_.hi_; } - - /// Internal utility function to hide access through struct. - const ACE_UINT32 &l_ () const { return data_.lo_; } - - /// Internal utility function to hide access through struct. - ACE_UINT32 &l_ () { return data_.lo_; } - - // @note the above four accessors are inlined here in - // order to minimize the extent of the data_ struct. It's - // only used here; the .inl and .cpp files use the accessors. - - /// These functions are used to implement multiplication. - ACE_UINT32 ul_shift (ACE_UINT32 a, - ACE_UINT32 c_in, - ACE_UINT32 *c_out) const; - ACE_U_LongLong ull_shift (ACE_U_LongLong a, - ACE_UINT32 c_in, - ACE_UINT32 *c_out) const; - ACE_U_LongLong ull_add (ACE_U_LongLong a, - ACE_U_LongLong b, - ACE_UINT32 *carry) const; - ACE_U_LongLong ull_mult (ACE_U_LongLong a, - ACE_UINT32 b, - ACE_UINT32 *carry) const; -#endif // ACE_LACKS_UNSIGNEDLONGLONG_T - }; - - typedef ACE_U_LongLong ACE_UINT64; - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - ostream &operator<< (ostream &, const ACE_U_LongLong &); -#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -# endif /* ACE_LACKS_LONGLONG_T */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Conversions from ACE_UINT64 to ACE_UINT32. ACE_CU64_TO_CU32 should -// be used on const ACE_UINT64's. -# if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -inline ACE_UINT32 -ACE_U64_TO_U32 (ACE_U_LongLong const & n) -{ - /** - * @note We could add a cast operator to ACE_U_LongLong but that may - * cause more problems than it solves. Force users to perform - * an explicit cast via ACE_{C}U64_TO_{C}U32. - */ - return n.lo (); -} - -inline ACE_UINT32 -ACE_CU64_TO_CU32 (ACE_U_LongLong const & n) -{ - return ACE_U64_TO_U32 (n); -} -# else /* ! ACE_LACKS_LONGLONG_T */ inline ACE_UINT32 ACE_U64_TO_U32 (ACE_UINT64 n) { @@ -673,32 +419,24 @@ ACE_CU64_TO_CU32 (ACE_UINT64 n) { return static_cast (n); } -# endif /* ! ACE_LACKS_LONGLONG_T */ ACE_END_VERSIONED_NAMESPACE_DECL -// 64-bit literals require special marking on some platforms. -# if defined (ACE_LACKS_LONGLONG_T) - // Can only specify 32-bit arguments. -# define ACE_UINT64_LITERAL(n) n ## UL - // This one won't really work, but it'll keep - // some compilers happy until we have better support -# define ACE_INT64_LITERAL(n) n ## L -# elif defined (ACE_WIN32) -# if defined (__MINGW32__) -# define ACE_UINT64_LITERAL(n) n ## ull -# define ACE_INT64_LITERAL(n) n ## ll -# else -# define ACE_UINT64_LITERAL(n) n ## ui64 -# define ACE_INT64_LITERAL(n) n ## i64 -# endif /* defined (__MINGW32__) */ -# elif defined (__TANDEM) +#if defined (ACE_WIN32) +# if defined (__MINGW32__) +# define ACE_UINT64_LITERAL(n) n ## ull +# define ACE_INT64_LITERAL(n) n ## ll +# else +# define ACE_UINT64_LITERAL(n) n ## ui64 +# define ACE_INT64_LITERAL(n) n ## i64 +# endif /* defined (__MINGW32__) */ +#elif defined (__TANDEM) # define ACE_UINT64_LITERAL(n) n ## LL # define ACE_INT64_LITERAL(n) n ## LL -# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#else /* ! ACE_WIN32 */ # define ACE_UINT64_LITERAL(n) n ## ull # define ACE_INT64_LITERAL(n) n ## ll -# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#endif /* ! ACE_WIN32*/ #if !defined (ACE_INT8_FORMAT_SPECIFIER_ASCII) # if defined (PRId8) @@ -839,6 +577,8 @@ ACE_END_VERSIONED_NAMESPACE_DECL #if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII) # if defined (ACE_WIN64) # define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%I64d" +# elif defined (_WRS_CONFIG_LP64) +# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" # else # define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%d" # endif /* ACE_WIN64 */ @@ -851,6 +591,8 @@ ACE_END_VERSIONED_NAMESPACE_DECL #if !defined (ACE_SIZE_T_FORMAT_SPECIFIER_ASCII) # if defined (ACE_WIN64) # define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%I64u" +# elif defined (_WRS_CONFIG_LP64) +# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" # else # define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%u" # endif /* ACE_WIN64 */ @@ -862,16 +604,11 @@ ACE_END_VERSIONED_NAMESPACE_DECL // Cast from UINT64 to a double requires an intermediate cast to INT64 // on some platforms. -# if defined (ACE_LACKS_LONGLONG_T) - // Only use the low 32 bits. -# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_U64_TO_U32 (n) -# elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -# define ACE_UINT64_DBLCAST_ADAPTER(n) ((n).to_int64 ()) -# elif defined (ACE_WIN32) -# define ACE_UINT64_DBLCAST_ADAPTER(n) static_cast<__int64> (n) -# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ -# define ACE_UINT64_DBLCAST_ADAPTER(n) (n) -# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#if defined (ACE_WIN32) +# define ACE_UINT64_DBLCAST_ADAPTER(n) static_cast<__int64> (n) +#else /* ! ACE_WIN32 && */ +# define ACE_UINT64_DBLCAST_ADAPTER(n) (n) +#endif /* ! ACE_WIN32 && */ // The number of bytes in a float. @@ -934,19 +671,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #define ACE_UINT32_MAX 0xFFFFFFFF #define ACE_INT64_MAX ACE_INT64_LITERAL(0x7FFFFFFFFFFFFFFF) #define ACE_INT64_MIN -(ACE_INT64_MAX)-1 - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -// ACE_U_LongLong's constructor accepts a "long long" in this -// case. Set it to ACE_U_LongLong (-1) since the bit pattern for long -// long (-1) is the same as the maximum unsigned long long value. -# define ACE_UINT64_MAX ACE_U_LongLong (ACE_INT64_LITERAL (0xFFFFFFFFFFFFFFFF)) -#elif defined (ACE_LACKS_LONGLONG_T) -// ACE_U_LongLong's constructor accepts an ACE_UINT32 low and high -// pair of parameters. -# define ACE_UINT64_MAX ACE_U_LongLong (0xFFFFFFFFu, 0xFFFFFFFFu) -#else -# define ACE_UINT64_MAX ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF) -#endif /* ACE_LACKS_UNSIGNEDLONGLONG_T */ +#define ACE_UINT64_MAX ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF) // These use ANSI/IEEE format. #define ACE_FLT_MAX 3.402823466e+38F @@ -954,9 +679,5 @@ ACE_END_VERSIONED_NAMESPACE_DECL #define ACE_DBL_MAX 1.7976931348623158e+308 #define ACE_DBL_MIN 2.2250738585072014e-308 -# if defined (__ACE_INLINE__) -# include "ace/Basic_Types.inl" -# endif /* __ACE_INLINE__ */ - # include /**/ "ace/post.h" #endif /* ACE_BASIC_TYPES_H */ diff --git a/dep/acelite/ace/Basic_Types.inl b/dep/acelite/ace/Basic_Types.inl deleted file mode 100644 index c6f0013d45e..00000000000 --- a/dep/acelite/ace/Basic_Types.inl +++ /dev/null @@ -1,954 +0,0 @@ -// -*- C++ -*- -// -// $Id: Basic_Types.inl 80826 2008-03-04 14:51:23Z wotte $ - -# if !defined (ACE_LACKS_LONGLONG_T) && defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Implementation for ACE_U_LongLong when we have signed long long -// but no unsigned long long. - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const long long value) - : data_ (value) -{ -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::hi (void) const -{ - return (data_ >> 32) & 0xFFFFFFFF; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::lo (void) const -{ - return data_ & 0xFFFFFFFF; -} - -ACE_INLINE void -ACE_U_LongLong::hi (const ACE_UINT32 hi) -{ - data_ = hi; - data_ <<= 32; -} - -ACE_INLINE void -ACE_U_LongLong::lo (const ACE_UINT32 lo) -{ - data_ = lo; -} - -ACE_INLINE long long -ACE_U_LongLong::to_int64 (void) const -{ - return data_; -} - -ACE_INLINE -ACE_U_LongLong::~ACE_U_LongLong (void) -{ -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const -{ - return data_ == n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_UINT32 n) const -{ - return data_ == n; -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_UINT32 n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const -{ - if (data_ > 0) - if (n.data_ > 0) - return data_ < n.data_; - else - return true; - else - if (n.data_ > 0) - return false; - else - return data_ < n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_UINT32 n) const -{ - return operator< (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const -{ - if (data_ == n.data_) return true; - - return data_ < n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_UINT32 n) const -{ - return operator<= (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const -{ - if (data_ > 0) - if (n.data_ > 0) - return data_ > n.data_; - else - return false; - else - if (n.data_ > 0) - return true; - else - return data_ > n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_UINT32 n) const -{ - return operator> (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const -{ - if (data_ == n.data_) return true; - - return data_ > n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_UINT32 n) const -{ - return operator>= (static_cast (n)); -} - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_U_LongLong &n) - : data_ (n.data_) -{ -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_U_LongLong &n) -{ - data_ = n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_INT32 &rhs) -{ - if (rhs >= 0) - { - data_ = rhs; - data_ &= 0xFFFFFFFF; - } - else - { - // We do not handle the case where a negative 32 bit integer is - // assigned to this representation of a 64 bit unsigned integer. - // The "undefined behavior" behavior performed by this - // implementation is to simply set all bits to zero. - data_ = 0; - } - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_UINT32 &rhs) -{ - data_ = rhs; - - return *this; -} - - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const -{ - return data_ + n.data_; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_UINT32 n) const -{ - return operator+ (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_U_LongLong &n) const -{ - return data_ - n.data_; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_UINT32 n) const -{ - return operator- (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator<< (const u_int n) const -{ - return data_ << n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator<<= (const u_int n) -{ - data_ <<= n; - - return *this; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator>> (const u_int n) const -{ - return data_ >> n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator>>= (const u_int n) -{ - data_ >>= n; - - return *this; -} - -ACE_INLINE double -ACE_U_LongLong::operator/ (const double n) const -{ - return data_ / n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_U_LongLong &n) -{ - data_ += n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_UINT32 n) -{ - return operator+= (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_UINT32 n) const -{ - return data_ * n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_UINT32 n) -{ - data_ *= n; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_U_LongLong &n) -{ - data_ -= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_UINT32 n) -{ - return operator-= (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator++ () -{ - ++data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-- () -{ - --data_; - - return *this; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator++ (int) -{ - // Post-increment operator should always be implemented in terms of - // the pre-increment operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - ++*this; - return temp; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator-- (int) -{ - // Post-decrement operator should always be implemented in terms of - // the pre-decrement operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - --*this; - return temp; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_U_LongLong n) -{ - data_ |= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_UINT32 n) -{ - return operator|= (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_U_LongLong n) -{ - data_ &= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_UINT32 n) -{ - return operator&= (static_cast (n)); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_UINT32 n) const -{ - return data_ / n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator% (const ACE_UINT32 n) const -{ - return data_ % n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator| (const ACE_INT32 n) const -{ - return data_ | n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator& (const ACE_INT32 n) const -{ - return data_ & n; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_INT32 n) const -{ - return operator* ((ACE_UINT32) n); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_INT32 n) -{ - return operator*= ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_INT32 n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#if ACE_SIZEOF_INT == 4 -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#else /* ACE_SIZEOF_INT != 4 */ -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_int n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const int n) const -{ - return operator/ ((ACE_UINT32) n); -} -#endif - -ACE_END_VERSIONED_NAMESPACE_DECL - -#elif defined (ACE_LACKS_LONGLONG_T) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_UINT32 lo, const ACE_UINT32 hi) -{ - h_ () = hi; - l_ () = lo; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::hi (void) const -{ - return h_ (); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::lo (void) const -{ - return l_ (); -} - -ACE_INLINE void -ACE_U_LongLong::hi (const ACE_UINT32 hi) -{ - h_ () = hi; -} - -ACE_INLINE void -ACE_U_LongLong::lo (const ACE_UINT32 lo) -{ - l_ () = lo; -} - -ACE_INLINE -ACE_U_LongLong::~ACE_U_LongLong (void) -{ -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const -{ - return h_ () == n.h_ () && l_ () == n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_UINT32 n) const -{ - return h_ () == 0 && l_ () == n; -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_UINT32 n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const -{ - return h_ () < n.h_ () ? 1 - : h_ () > n.h_ () ? 0 - : l_ () < n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_UINT32 n) const -{ - return operator< (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const -{ - return h_ () < n.h_ () ? 1 - : h_ () > n.h_ () ? 0 - : l_ () <= n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_UINT32 n) const -{ - return operator<= (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const -{ - return h_ () > n.h_ () ? 1 - : h_ () < n.h_ () ? 0 - : l_ () > n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_UINT32 n) const -{ - return operator> (static_cast (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const -{ - return h_ () > n.h_ () ? 1 - : h_ () < n.h_ () ? 0 - : l_ () >= n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_UINT32 n) const -{ - return operator>= (static_cast (n)); -} - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_U_LongLong &n) -{ - h_ () = n.h_ (); - l_ () = n.l_ (); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_U_LongLong &n) -{ - h_ () = n.h_ (); - l_ () = n.l_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_INT32 &rhs) -{ - if (rhs >= 0) - { - l_ () = static_cast (rhs); - h_ () = 0; - } - else - { - // We do not handle the case where a negative 32 bit integer is - // assigned to this representation of a 64 bit unsigned integer. - // The "undefined behavior" behavior performed by this - // implementation is to simply set all bits to zero. - l_ () = 0; - h_ () = 0; - } - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_UINT32 &rhs) -{ - l_ () = rhs; - h_ () = 0; - - return *this; -} - - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const -{ - ACE_U_LongLong ret (l_ () + n.l_ (), h_ () + n.h_ ()); - if (ret.l_ () < n.l_ ()) /* carry */ ++ret.h_ (); - - return ret; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_UINT32 n) const -{ - return operator+ (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_U_LongLong &n) const -{ - ACE_U_LongLong ret (l_ () - n.l_ (), h_ () - n.h_ ()); - if (l_ () < n.l_ ()) /* borrow */ --ret.h_ (); - - return ret; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_UINT32 n) const -{ - return operator- (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator<< (const u_int n) const -{ - const ACE_UINT32 carry_mask = l_ () >> (32 - n); - ACE_U_LongLong ret (n < 32 ? l_ () << n : 0, - n < 32 ? (h_ () << n) | carry_mask : carry_mask); - - return ret; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator<<= (const u_int n) -{ - const ACE_UINT32 carry_mask = l_ () >> (32 - n); - h_ () = n < 32 ? (h_ () << n) | carry_mask : carry_mask; - - // g++ 2.7.2.3/Solaris 2.5.1 doesn't modify l_ () if shifted by 32. - l_ () = n < 32 ? l_ () << n : 0; - - return *this; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator>> (const u_int n) const -{ - const ACE_UINT32 carry_mask = h_ () << (32 - n); - ACE_U_LongLong ret (n < 32 ? (l_ () >> n) | carry_mask : 0, - n < 32 ? h_ () >> n : 0); - - return ret; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator>>= (const u_int n) -{ - const ACE_UINT32 carry_mask = h_ () << (32 - n); - l_ () = n < 32 ? (l_ () >> n) | carry_mask : carry_mask; - h_ () = n < 32 ? h_ () >> n : 0; - - return *this; -} - -ACE_INLINE double -ACE_U_LongLong::operator/ (const double n) const -{ - // See the derivation above in operator/ (const ACE_UINT32). - - return ((double) 0xffffffffu - n + 1.0) / n * h_ () + - (double) h_ () + (double) l_ () / n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_U_LongLong &n) -{ - h_ () += n.h_ (); - l_ () += n.l_ (); - if (l_ () < n.l_ ()) /* carry */ ++h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_UINT32 n) -{ - return operator+= (static_cast (n)); -} - -#define ACE_HIGHBIT (~(~0UL >> 1)) - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::ul_shift (ACE_UINT32 a, ACE_UINT32 c_in, ACE_UINT32 *c_out) const -{ - const ACE_UINT32 b = (a << 1) | c_in; - *c_out = (*c_out << 1) + ((a & ACE_HIGHBIT) > 0); - - return b; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_shift (ACE_U_LongLong a, - ACE_UINT32 c_in, - ACE_UINT32 *c_out) const -{ - ACE_U_LongLong b; - - b.l_ () = (a.l_ () << 1) | c_in; - c_in = ((a.l_ () & ACE_HIGHBIT) > 0); - b.h_ () = (a.h_ () << 1) | c_in; - *c_out = (*c_out << 1) + ((a.h_ () & ACE_HIGHBIT) > 0); - - return b; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_add (ACE_U_LongLong a, ACE_U_LongLong b, ACE_UINT32 *carry) const -{ - ACE_U_LongLong r (0, 0); - ACE_UINT32 c1, c2, c3, c4; - - c1 = a.l_ () % 2; - c2 = b.l_ () % 2; - c3 = 0; - - r.l_ () = a.l_ ()/2 + b.l_ ()/2 + (c1+c2)/2; - r.l_ () = ul_shift (r.l_ (), (c1+c2)%2, &c3); - - c1 = a.h_ () % 2; - c2 = b.h_ () % 2; - c4 = 0; - - r.h_ () = a.h_ ()/2 + b.h_ ()/2 + (c1+c2+c3)/2; - r.h_ () = ul_shift (r.h_ (), (c1+c2+c3)%2, &c4); - - *carry = c4; - - return r; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_mult (ACE_U_LongLong a, ACE_UINT32 b, ACE_UINT32 *carry) const -{ - register ACE_UINT32 mask = ACE_HIGHBIT; - const ACE_U_LongLong zero (0, 0); - ACE_U_LongLong accum (0, 0); - ACE_UINT32 c; - - *carry = 0; - if (b > 0) - do - { - accum = ull_shift (accum, 0U, carry); - if (b & mask) - accum = ull_add (accum, a, &c); - else - accum = ull_add (accum, zero, &c); - *carry += c; - mask >>= 1; - } - while (mask > 0); - - return accum; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_UINT32 n) const -{ - ACE_UINT32 carry; // will throw the carry away - - return ull_mult (*this, n, &carry); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_UINT32 n) -{ - ACE_UINT32 carry; // will throw the carry away - - return *this = ull_mult (*this, n, &carry); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_U_LongLong &n) -{ - h_ () -= n.h_ (); - if (l_ () < n.l_ ()) /* borrow */ --h_ (); - l_ () -= n.l_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_UINT32 n) -{ - return operator-= (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator++ () -{ - ++l_ (); - if (l_ () == 0) /* carry */ ++h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-- () -{ - if (l_ () == 0) /* borrow */ --h_ (); - --l_ (); - - return *this; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator++ (int) -{ - // Post-increment operator should always be implemented in terms of - // the pre-increment operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - ++*this; - return temp; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator-- (int) -{ - // Post-decrement operator should always be implemented in terms of - // the pre-decrement operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - --*this; - return temp; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_U_LongLong n) -{ - l_ () |= n.l_ (); - h_ () |= n.h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_UINT32 n) -{ - return operator|= (static_cast (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_U_LongLong n) -{ - l_ () &= n.l_ (); - h_ () &= n.h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_UINT32 n) -{ - return operator&= (static_cast (n)); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_UINT32 n) const -{ - // This takes advantage of the fact that the return type has only 32 - // bits. Replace 0x100000000 with 0xffffffff + 1 because the former - // has 33 bits. - // Quotient = (0x100000000u * hi_ + lo_) / n - // = ((0x100000000u - n + n) * hi_ + lo_) / n - // = ((0x100000000u - n) / n * hi_ + hi_ * n / n + lo_ / n - // = (0x100000000u - n) / n * hi_ + hi_ + lo_ / n - // = (0xffffffffu - n + 1) / n * hi_ + hi_ + lo_ / n - - return (0xffffffffu - n + 1) / n * h_ () + h_ () + l_ () / n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator% (const ACE_UINT32 n) const -{ - // Because the argument is an ACE_UINT32, the result can never be - // bigger than 32 bits. Replace 0x100000000 with 0xffffffff + 1 - // because the former has 33 bits. - // Mod = (0x100000000u * hi_ + lo_) % n - // = (0x100000000u % n * hi_ + lo_ % n) % n - // = ((0x100000000u - n) % n * hi_ + lo_ % n) % n - // = ((0xffffffffu - n + 1) % n * hi_ + lo_ % n) % n - - return ((0xffffffff - n + 1) % n * h_ () + l_ () % n) % n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator| (const ACE_INT32 n) const -{ - return l_ () | n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator& (const ACE_INT32 n) const -{ - return l_ () & n; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_INT32 n) const -{ - return operator* ((ACE_UINT32) n); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_INT32 n) -{ - return operator*= ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_INT32 n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#if ACE_SIZEOF_INT == 4 -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#else /* ACE_SIZEOF_INT != 4 */ -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_int n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const int n) const -{ - return operator/ ((ACE_UINT32) n); -} -#endif /* ACE_SIZEOF_INT != 4 */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ diff --git a/dep/acelite/ace/CDR_Base.cpp b/dep/acelite/ace/CDR_Base.cpp index 0acf651d4d1..04e87f65c94 100644 --- a/dep/acelite/ace/CDR_Base.cpp +++ b/dep/acelite/ace/CDR_Base.cpp @@ -1,4 +1,4 @@ -// $Id: CDR_Base.cpp 91685 2010-09-09 09:35:14Z johnnyw $ +// $Id: CDR_Base.cpp 94251 2011-06-22 18:03:25Z parsons $ #include "ace/CDR_Base.h" diff --git a/dep/acelite/ace/CDR_Base.h b/dep/acelite/ace/CDR_Base.h index 66a6d885710..f324152253f 100644 --- a/dep/acelite/ace/CDR_Base.h +++ b/dep/acelite/ace/CDR_Base.h @@ -4,7 +4,7 @@ /** * @file CDR_Base.h * - * $Id: CDR_Base.h 91685 2010-09-09 09:35:14Z johnnyw $ + * $Id: CDR_Base.h 95761 2012-05-15 18:23:04Z johnnyw $ * * ACE Common Data Representation (CDR) basic types. * @@ -213,7 +213,7 @@ public: typedef long LongLong; # elif defined(__TANDEM) typedef long long LongLong; -# elif ACE_SIZEOF_LONG_LONG == 8 && !defined (ACE_LACKS_LONGLONG_T) +# elif ACE_SIZEOF_LONG_LONG == 8 # if defined (sun) && !defined (ACE_LACKS_U_LONGLONG_T) // sun #defines u_longlong_t, maybe other platforms do also. // Use it, at least with g++, so that its -pedantic doesn't diff --git a/dep/acelite/ace/CDR_Size.h b/dep/acelite/ace/CDR_Size.h index a0b3c462ca8..ccf45324929 100644 --- a/dep/acelite/ace/CDR_Size.h +++ b/dep/acelite/ace/CDR_Size.h @@ -4,7 +4,7 @@ /** * @file CDR_Size.h * - * $Id: CDR_Size.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: CDR_Size.h 93359 2011-02-11 11:33:12Z mcorino $ * * * ACE Common Data Representation (CDR) size-calculating stream. @@ -13,7 +13,7 @@ * The current implementation assumes that the host has 1-byte, * 2-byte and 4-byte integral types, and that it has single * precision and double precision IEEE floats. - * Those assumptions are pretty good these days, with Crays beign + * Those assumptions are pretty good these days, with Crays being * the only known exception. * * diff --git a/dep/acelite/ace/CDR_Stream.cpp b/dep/acelite/ace/CDR_Stream.cpp index cc58132ca82..0d674324f68 100644 --- a/dep/acelite/ace/CDR_Stream.cpp +++ b/dep/acelite/ace/CDR_Stream.cpp @@ -1,4 +1,4 @@ -// $Id: CDR_Stream.cpp 91373 2010-08-17 07:35:27Z mhengstmengel $ +// $Id: CDR_Stream.cpp 95896 2012-06-18 20:42:07Z hillj $ #include "ace/CDR_Stream.h" #include "ace/SString.h" @@ -723,6 +723,72 @@ ACE_OutputCDR::write_short_placeholder (void) return buf; } +char * +ACE_OutputCDR::write_boolean_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + +char * +ACE_OutputCDR::write_char_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + +char * +ACE_OutputCDR::write_octet_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + +char * +ACE_OutputCDR::write_longlong_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + +char * +ACE_OutputCDR::write_float_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + +char * +ACE_OutputCDR::write_double_placeholder (void) +{ + char *buf = 0; + if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) + *reinterpret_cast (buf) = 0; + else + buf = 0; + return buf; +} + ACE_CDR::Boolean ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc) { @@ -745,6 +811,27 @@ ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc) return true; } +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::ULong x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_4 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} ACE_CDR::Boolean ACE_OutputCDR::replace (ACE_CDR::Short x, char* loc) @@ -768,6 +855,148 @@ ACE_OutputCDR::replace (ACE_CDR::Short x, char* loc) return true; } +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::UShort x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_2 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::Boolean x, char* loc) +{ + if (this->find (loc) == 0) + return false; + + *reinterpret_cast (loc) = x; + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::Char x, char* loc) +{ + if (this->find (loc) == 0) + return false; + + *reinterpret_cast (loc) = x; + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::Octet x, char* loc) +{ + if (this->find (loc) == 0) + return false; + + *reinterpret_cast (loc) = x; + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::LongLong x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_8 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::ULongLong x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_8 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::Float x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_4 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} + +ACE_CDR::Boolean +ACE_OutputCDR::replace (ACE_CDR::Double x, char* loc) +{ + if (this->find (loc) == 0) + return false; + +#if !defined (ACE_ENABLE_SWAP_ON_WRITE) + *reinterpret_cast (loc) = x; +#else + if (!this->do_byte_swap_) + { + *reinterpret_cast (loc) = x; + } + else + { + ACE_CDR::swap_8 (reinterpret_cast (&x), loc); + } +#endif /* ACE_ENABLE_SWAP_ON_WRITE */ + + return true; +} int ACE_OutputCDR::consolidate (void) @@ -1682,7 +1911,17 @@ ACE_InputCDR::skip_string (void) ACE_CDR::ULong len = 0; if (this->read_ulong (len)) { - if (this->rd_ptr () + len <= this->wr_ptr ()) + if (static_cast (~0u) == len) + { + // Indirection, next Long in stream is signed offset to actual + // string location (backwards in same stream from here). + ACE_CDR::Long offset = 0; + if (this->read_long (offset)) + { + return true; + } + } + else if (this->rd_ptr () + len <= this->wr_ptr ()) { this->rd_ptr (len); return true; diff --git a/dep/acelite/ace/CDR_Stream.h b/dep/acelite/ace/CDR_Stream.h index 0a200dc56dd..256560dea7e 100644 --- a/dep/acelite/ace/CDR_Stream.h +++ b/dep/acelite/ace/CDR_Stream.h @@ -4,7 +4,7 @@ /** * @file CDR_Stream.h * - * $Id: CDR_Stream.h 84527 2009-02-19 14:01:42Z johnnyw $ + * $Id: CDR_Stream.h 95896 2012-06-18 20:42:07Z hillj $ * * ACE Common Data Representation (CDR) marshaling and demarshaling * classes. @@ -318,6 +318,12 @@ public: */ char* write_long_placeholder (void); char* write_short_placeholder (void); + char* write_boolean_placeholder (void); + char* write_char_placeholder (void); + char* write_longlong_placeholder (void); + char* write_octet_placeholder (void); + char* write_float_placeholder (void); + char* write_double_placeholder (void); /** * Writes a new value into a specific location. This is commonly @@ -336,7 +342,16 @@ public: * @sa write_long_placeholder(), write_short_placeholder () */ ACE_CDR::Boolean replace (ACE_CDR::Long x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::ULong x, char* loc); ACE_CDR::Boolean replace (ACE_CDR::Short x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::UShort x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::Boolean x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::Char x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::LongLong x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::ULongLong x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::Octet x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::Float x, char* loc); + ACE_CDR::Boolean replace (ACE_CDR::Double x, char* loc); //@} /** @@ -1224,7 +1239,7 @@ protected: const ACE_CDR::ULong *x); /// Efficiently read @a length elements of size @a size each from - /// into ; the data must be aligned to . + /// @a input into @a x; the data must be aligned to @a align. ACE_CDR::Boolean read_array (ACE_InputCDR& input, void* x, size_t size, @@ -1232,9 +1247,9 @@ protected: ACE_CDR::ULong length); /** - * Efficiently write @a length elements of size @a size from into - * . Before inserting the elements enough padding is added - * to ensure that the elements will be aligned to in the + * Efficiently write @a length elements of size @a size from @a x into + * @a output. Before inserting the elements enough padding is added + * to ensure that the elements will be aligned to @a align in the * stream. */ ACE_CDR::Boolean write_array (ACE_OutputCDR& output, @@ -1244,10 +1259,10 @@ protected: ACE_CDR::ULong length); /** - * Exposes the stream implementation of , this is useful in + * Exposes the stream implementation of @a adjust, this is useful in * many cases to minimize memory allocations during marshaling. * On success @a buf will contain a contiguous area in the CDR stream - * that can hold @a size bytes aligned to . + * that can hold @a size bytes aligned to @a align. * Results */ int adjust (ACE_OutputCDR& out, diff --git a/dep/acelite/ace/CE_Screen_Output.h b/dep/acelite/ace/CE_Screen_Output.h index ba2bc7c02b5..62d4deaa042 100644 --- a/dep/acelite/ace/CE_Screen_Output.h +++ b/dep/acelite/ace/CE_Screen_Output.h @@ -4,7 +4,7 @@ /** * @file CE_Screen_Output.h * - * $Id: CE_Screen_Output.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: CE_Screen_Output.h 94271 2011-06-23 14:52:31Z johnnyw $ * * @author Si Mong Park */ @@ -39,7 +39,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * This class allows standard text output to be displayed on * text window for Windows CE. Generally, all ACE output will - * go through under CE if and only if user uses WindozeCE + * go through under CE if and only if user uses Windows CE * implementation by using main_ce instead of main. * Also, for the easier debugging purpose, object pointer of * this class can be gotten from ACE_Log_Msg::msg_callback() diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt index 6b5d3d84b40..a0a590e0c30 100644 --- a/dep/acelite/ace/CMakeLists.txt +++ b/dep/acelite/ace/CMakeLists.txt @@ -46,6 +46,7 @@ set(ace_STAT_SRCS Codeset_IBM1047.cpp Codeset_Registry.cpp Codeset_Registry_db.cpp + Condition_Attributes.cpp Condition_Recursive_Thread_Mutex.cpp Condition_Thread_Mutex.cpp Configuration.cpp @@ -53,7 +54,6 @@ set(ace_STAT_SRCS Connection_Recycling_Strategy.cpp Containers.cpp Copy_Disabled.cpp - Countdown_Time.cpp Date_Time.cpp DEV.cpp DEV_Addr.cpp @@ -73,6 +73,7 @@ set(ace_STAT_SRCS Encoding_Converter_Factory.cpp Event.cpp Event_Handler.cpp + Event_Handler_Handle_Timeout_Upcall.cpp FIFO.cpp FIFO_Recv.cpp FIFO_Recv_Msg.cpp @@ -89,7 +90,6 @@ set(ace_STAT_SRCS Functor.cpp Functor_String.cpp Get_Opt.cpp - gethrtime.cpp Handle_Ops.cpp Handle_Set.cpp Hashable.cpp @@ -289,6 +289,7 @@ set(ace_STAT_SRCS Thread_Mutex.cpp Thread_Semaphore.cpp Throughput_Stats.cpp + Time_Policy.cpp Time_Value.cpp Timeprobe.cpp TLI.cpp diff --git a/dep/acelite/ace/Cache_Map_Manager_T.cpp b/dep/acelite/ace/Cache_Map_Manager_T.cpp index 4fb5b93cac8..1527bce646b 100644 --- a/dep/acelite/ace/Cache_Map_Manager_T.cpp +++ b/dep/acelite/ace/Cache_Map_Manager_T.cpp @@ -1,4 +1,4 @@ -// $Id: Cache_Map_Manager_T.cpp 92097 2010-09-30 05:41:49Z msmit $ +// $Id: Cache_Map_Manager_T.cpp 95790 2012-05-24 15:06:21Z shuston $ #ifndef ACE_CACHE_MAP_MANAGER_T_CPP #define ACE_CACHE_MAP_MANAGER_T_CPP @@ -24,11 +24,8 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Iterator) ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Reverse_Iterator) -#define ACE_T1 class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES -#define ACE_T2 KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES - -template -ACE_Cache_Map_Manager::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s, +template +ACE_Cache_Map_Manager::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s, size_t size, ACE_Allocator *alloc) : caching_strategy_ (caching_s) @@ -40,28 +37,28 @@ ACE_Cache_Map_Manager::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_ } -template -ACE_Cache_Map_Manager::~ACE_Cache_Map_Manager (void) +template +ACE_Cache_Map_Manager::~ACE_Cache_Map_Manager (void) { this->close (); } -template int -ACE_Cache_Map_Manager::open (size_t length, +template int +ACE_Cache_Map_Manager::open (size_t length, ACE_Allocator *alloc) { return this->map_.open (length, alloc); } -template int -ACE_Cache_Map_Manager::close (void) +template int +ACE_Cache_Map_Manager::close (void) { return this->map_.close (); } -template int -ACE_Cache_Map_Manager::bind (const KEY &key, +template int +ACE_Cache_Map_Manager::bind (const KEY &key, const VALUE &value) { // Insert an entry which has the and the which @@ -96,8 +93,8 @@ ACE_Cache_Map_Manager::bind (const KEY &key, } -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, +template int +ACE_Cache_Map_Manager::rebind (const KEY &key, const VALUE &value) { CACHE_VALUE cache_value (value, @@ -133,8 +130,8 @@ ACE_Cache_Map_Manager::rebind (const KEY &key, } -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, +template int +ACE_Cache_Map_Manager::rebind (const KEY &key, const VALUE &value, VALUE &old_value) { @@ -180,8 +177,8 @@ ACE_Cache_Map_Manager::rebind (const KEY &key, return rebind_result; } -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, +template int +ACE_Cache_Map_Manager::rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value) @@ -229,8 +226,8 @@ ACE_Cache_Map_Manager::rebind (const KEY &key, return rebind_result; } -template int -ACE_Cache_Map_Manager::trybind (const KEY &key, +template int +ACE_Cache_Map_Manager::trybind (const KEY &key, VALUE &value) { CACHE_VALUE cache_value (value, @@ -271,8 +268,8 @@ ACE_Cache_Map_Manager::trybind (const KEY &key, return trybind_result; } -template int -ACE_Cache_Map_Manager::find (const KEY &key, +template int +ACE_Cache_Map_Manager::find (const KEY &key, VALUE &value) { // Lookup the key and populate the . @@ -310,8 +307,8 @@ ACE_Cache_Map_Manager::find (const KEY &key, return find_result; } -template int -ACE_Cache_Map_Manager::find (const KEY &key) +template int +ACE_Cache_Map_Manager::find (const KEY &key) { // Lookup the key and populate the . CACHE_VALUE cache_value; @@ -323,7 +320,7 @@ ACE_Cache_Map_Manager::find (const KEY &key) { int result = this->caching_strategy_.notify_find (find_result, - cache_value.second ()); + cache_value.second); // Unless the find and notification operations go thru, this // method is not successful. @@ -348,8 +345,8 @@ ACE_Cache_Map_Manager::find (const KEY &key) } -template int -ACE_Cache_Map_Manager::unbind (const KEY &key) +template int +ACE_Cache_Map_Manager::unbind (const KEY &key) { // Remove the entry from the cache. CACHE_VALUE cache_value; @@ -371,8 +368,8 @@ ACE_Cache_Map_Manager::unbind (const KEY &key) return unbind_result; } -template int -ACE_Cache_Map_Manager::unbind (const KEY &key, +template int +ACE_Cache_Map_Manager::unbind (const KEY &key, VALUE &value) { // Remove the entry from the cache. @@ -397,8 +394,8 @@ ACE_Cache_Map_Manager::unbind (const KEY &key, return unbind_result; } -template void -ACE_Cache_Map_Manager::dump (void) const +template void +ACE_Cache_Map_Manager::dump (void) const { #if defined (ACE_HAS_DUMP) this->map_.dump (); @@ -407,9 +404,6 @@ ACE_Cache_Map_Manager::dump (void) const #endif /* ACE_HAS_DUMP */ } -#undef ACE_T1 -#undef ACE_T2 - template ACE_Cache_Map_Iterator::~ACE_Cache_Map_Iterator (void) { diff --git a/dep/acelite/ace/Cached_Connect_Strategy_T.cpp b/dep/acelite/ace/Cached_Connect_Strategy_T.cpp index 738155a5784..a6f8acc77a0 100644 --- a/dep/acelite/ace/Cached_Connect_Strategy_T.cpp +++ b/dep/acelite/ace/Cached_Connect_Strategy_T.cpp @@ -1,4 +1,4 @@ -//$Id: Cached_Connect_Strategy_T.cpp 92097 2010-09-30 05:41:49Z msmit $ +//$Id: Cached_Connect_Strategy_T.cpp 95630 2012-03-22 13:04:47Z johnnyw $ #ifndef ACE_CACHED_CONNECT_STRATEGY_T_CPP #define ACE_CACHED_CONNECT_STRATEGY_T_CPP @@ -15,13 +15,10 @@ #include "ace/Thread_Manager.h" #include "ace/WFMO_Reactor.h" -#define ACE_T1 class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX -#define ACE_T2 SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template -ACE_Cached_Connect_Strategy_Ex::ACE_Cached_Connect_Strategy_Ex +template +ACE_Cached_Connect_Strategy_Ex::ACE_Cached_Connect_Strategy_Ex (CACHING_STRATEGY &caching_s, ACE_Creation_Strategy *cre_s, ACE_Concurrency_Strategy *con_s, @@ -34,18 +31,18 @@ ACE_Cached_Connect_Strategy_Ex::ACE_Cached_Connect_Strategy_Ex if (this->open (cre_s, con_s, rec_s) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex\n"))); + ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex\n"))); } -template -ACE_Cached_Connect_Strategy_Ex::~ACE_Cached_Connect_Strategy_Ex (void) +template +ACE_Cached_Connect_Strategy_Ex::~ACE_Cached_Connect_Strategy_Ex (void) { cleanup (); } -template int -ACE_Cached_Connect_Strategy_Ex::check_hint_i +template int +ACE_Cached_Connect_Strategy_Ex::check_hint_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -134,8 +131,8 @@ ACE_Cached_Connect_Strategy_Ex::check_hint_i return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::find_or_create_svc_handler_i +template int +ACE_Cached_Connect_Strategy_Ex::find_or_create_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -250,8 +247,8 @@ ACE_Cached_Connect_Strategy_Ex::find_or_create_svc_handler_i return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::cached_connect (SVC_HANDLER *&sh, +template int +ACE_Cached_Connect_Strategy_Ex::cached_connect (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, @@ -312,8 +309,8 @@ ACE_Cached_Connect_Strategy_Ex::cached_connect (SVC_HANDLER *&sh, } -template int -ACE_Cached_Connect_Strategy_Ex::connect_svc_handler_i +template int +ACE_Cached_Connect_Strategy_Ex::connect_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -361,16 +358,19 @@ ACE_Cached_Connect_Strategy_Ex::connect_svc_handler_i entry->ext_id_.increment (); } - // For all successful cases: mark the in the cache - // as being . Therefore recyclable is BUSY. - entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY); + if (entry) + { + // For all successful cases: mark the in the cache + // as being . Therefore recyclable is BUSY. + entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY); + } return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::cache_i (const void *recycling_act) +template int +ACE_Cached_Connect_Strategy_Ex::cache_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -382,8 +382,8 @@ ACE_Cached_Connect_Strategy_Ex::cache_i (const void *recycling_act) return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act, +template int +ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act, ACE_Recyclable_State new_state) { // The wonders and perils of ACT @@ -396,8 +396,8 @@ ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_a return 0; } -template ACE_Recyclable_State -ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act) const +template ACE_Recyclable_State +ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act) const { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -407,8 +407,8 @@ ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_a return entry->ext_id_.recycle_state (); } -template int -ACE_Cached_Connect_Strategy_Ex::purge_i (const void *recycling_act) +template int +ACE_Cached_Connect_Strategy_Ex::purge_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -417,8 +417,8 @@ ACE_Cached_Connect_Strategy_Ex::purge_i (const void *recycling_act) } -template int -ACE_Cached_Connect_Strategy_Ex::mark_as_closed_i (const void *recycling_act) +template int +ACE_Cached_Connect_Strategy_Ex::mark_as_closed_i (const void *recycling_act) { // The wonders and perils of ACT CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; @@ -429,8 +429,8 @@ ACE_Cached_Connect_Strategy_Ex::mark_as_closed_i (const void *recycling_ return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::cleanup_hint_i (const void *recycling_act, +template int +ACE_Cached_Connect_Strategy_Ex::cleanup_hint_i (const void *recycling_act, void **act_holder) { // Reset the <*act_holder> in the confines and protection of the @@ -457,20 +457,20 @@ ACE_Cached_Connect_Strategy_Ex::cleanup_hint_i (const void *recycling_ac return 0; } -template int -ACE_Cached_Connect_Strategy_Ex::purge_connections (void) +template int +ACE_Cached_Connect_Strategy_Ex::purge_connections (void) { return this->connection_cache_.purge (); } -template CACHING_STRATEGY & -ACE_Cached_Connect_Strategy_Ex::caching_strategy (void) +template CACHING_STRATEGY & +ACE_Cached_Connect_Strategy_Ex::caching_strategy (void) { return this->connection_cache_.caching_strategy (); } -template int -ACE_Cached_Connect_Strategy_Ex::find (ACE_Refcounted_Hash_Recyclable &search_addr, +template int +ACE_Cached_Connect_Strategy_Ex::find (ACE_Refcounted_Hash_Recyclable &search_addr, ACE_Hash_Map_Entry, std::pair > *&entry) { typedef ACE_Hash_Map_Bucket_Iterator::find (ACE_Refcounted_Hash_Recyclable void -ACE_Cached_Connect_Strategy_Ex::cleanup (void) +template void +ACE_Cached_Connect_Strategy_Ex::cleanup (void) { // Excluded other threads from changing the cache while we cleanup ACE_GUARD (MUTEX, ace_mon, *this->lock_); @@ -560,8 +560,8 @@ ACE_Cached_Connect_Strategy_Ex::cleanup (void) ACE_ALLOC_HOOK_DEFINE(ACE_Cached_Connect_Strategy_Ex) ///////////////////////////////////////////////////////////////////////// -template -ACE_Bounded_Cached_Connect_Strategy::ACE_Bounded_Cached_Connect_Strategy +template +ACE_Bounded_Cached_Connect_Strategy::ACE_Bounded_Cached_Connect_Strategy (size_t max_size, CACHING_STRATEGY &caching_s, ACE_Creation_Strategy *cre_s, @@ -574,14 +574,14 @@ ACE_Bounded_Cached_Connect_Strategy::ACE_Bounded_Cached_Connect_Strategy { } -template -ACE_Bounded_Cached_Connect_Strategy::~ACE_Bounded_Cached_Connect_Strategy(void) +template +ACE_Bounded_Cached_Connect_Strategy::~ACE_Bounded_Cached_Connect_Strategy(void) { } -template +template int -ACE_Bounded_Cached_Connect_Strategy::find_or_create_svc_handler_i +ACE_Bounded_Cached_Connect_Strategy::find_or_create_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, @@ -727,7 +727,4 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Cached_Connect_Strategy) ACE_END_VERSIONED_NAMESPACE_DECL -#undef ACE_T1 -#undef ACE_T2 - #endif /* ACE_CACHED_CONNECT_STRATEGY_T_CPP */ diff --git a/dep/acelite/ace/Codeset_Registry.h b/dep/acelite/ace/Codeset_Registry.h index e72c435f82b..28bd629add0 100644 --- a/dep/acelite/ace/Codeset_Registry.h +++ b/dep/acelite/ace/Codeset_Registry.h @@ -3,7 +3,7 @@ /** * @file Codeset_Registry.h * - * $Id: Codeset_Registry.h 81348 2008-04-14 09:00:32Z johnnyw $ + * $Id: Codeset_Registry.h 93651 2011-03-28 08:49:11Z johnnyw $ * * ACE wrapper around access functions for the OSF's DCE codeset registry * access functions @@ -33,10 +33,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_HAS_DCE_CODESET_REGISTRY) -#include /**/ -#endif /* ACE_HAS_DCE_CODESET_REGISTRY */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Codeset_Registry diff --git a/dep/acelite/ace/Codeset_Registry.inl b/dep/acelite/ace/Codeset_Registry.inl index 4419cf5e7fc..a8348180009 100644 --- a/dep/acelite/ace/Codeset_Registry.inl +++ b/dep/acelite/ace/Codeset_Registry.inl @@ -3,7 +3,7 @@ /** * @file Codeset_Registry.inl * - * $Id: Codeset_Registry.inl 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Codeset_Registry.inl 93651 2011-03-28 08:49:11Z johnnyw $ * * ACE wrapper around access functions for the OSF's DCE codeset registry * access functions - the inline functions either call the system supplied @@ -23,20 +23,10 @@ ACE_Codeset_Registry::locale_to_registry(const ACE_CString &locale, ACE_CDR::UShort *num_sets, ACE_CDR::UShort **char_sets) { -#if defined (ACE_HAS_DCE_CODESET_REGISTRY) - error_status_t result; - dce_cs_loc_to_rgy (locale.c_str(), - &codeset_id, - num_sets, - char_sets, - &result); - return (result == dce_cs_c_ok) ? 1 : 0; -#else return ACE_Codeset_Registry::locale_to_registry_i (locale, codeset_id, num_sets, char_sets); -#endif /* ACE_HAS_DCE_CODESET_REGISTRY */ } // based on a registry value, find the locale string and optional codeset @@ -48,23 +38,10 @@ ACE_Codeset_Registry::registry_to_locale(ACE_CDR::ULong codeset_id, ACE_CDR::UShort *num_sets, ACE_CDR::UShort **char_sets) { -#if defined (ACE_HAS_DCE_CODESET_REGISTRY) - error_status_t result; - char *buffer; - dce_cs_rgy_to_loc (codeset_id, - &buffer, - num_sets, - char_sets, - &result); - locale.set(buffer); // does a copy :-( - free (buffer); - return (result == dce_cs_c_ok) ? 1 : 0; -#else return ACE_Codeset_Registry::registry_to_locale_i (codeset_id, locale, num_sets, char_sets); -#endif /* ACE_HAS_DCE_CODESET_REGISTRY */ } // Tell if two codesets are compatible. This wraps the @@ -74,13 +51,7 @@ int ACE_Codeset_Registry::is_compatible (ACE_CDR::ULong codeset_id, ACE_CDR::ULong other) { -#if defined (ACE_HAS_DCE_CODESET_REGISTRY) - error_status_t result; - rpc_cs_char_set_compat_check(codeset_id,other,&result); - return (result == rpc_s_ok) ? 1 : 0; -#else return ACE_Codeset_Registry::is_compatible_i (codeset_id,other); -#endif /* ACE_HAS_DCE_CODESET_REGISTRY */ } // Return the max number of bytes required to represent a single character. @@ -89,14 +60,7 @@ ACE_INLINE ACE_CDR::Short ACE_Codeset_Registry::get_max_bytes (ACE_CDR::ULong codeset_id) { -#if defined (ACE_HAS_DCE_CODESET_REGISTRY) - error_status_t result; - short max_bytes; - rpc_rgy_get_max_bytes(codeset_id,&max_bytes,&result); - return (result == rpc_s_ok) ? (short)max_bytes : 0; -#else return ACE_Codeset_Registry::get_max_bytes_i (codeset_id); -#endif /* ACE_HAS_DCE_CODESET_REGISTRY */ } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Compression/ACE_Compression_export.h b/dep/acelite/ace/Compression/ACE_Compression_export.h new file mode 100644 index 00000000000..119e14b16ea --- /dev/null +++ b/dep/acelite/ace/Compression/ACE_Compression_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id: ACE_Compression_export.h 95545 2012-02-23 07:57:08Z johnnyw $ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ACE_Compression +// ------------------------------ +#ifndef ACE_COMPRESSION_EXPORT_H +#define ACE_COMPRESSION_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_COMPRESSION_HAS_DLL) +# define ACE_COMPRESSION_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && ACE_COMPRESSION_HAS_DLL */ + +#if !defined (ACE_COMPRESSION_HAS_DLL) +# define ACE_COMPRESSION_HAS_DLL 1 +#endif /* ! ACE_COMPRESSION_HAS_DLL */ + +#if defined (ACE_COMPRESSION_HAS_DLL) && (ACE_COMPRESSION_HAS_DLL == 1) +# if defined (ACE_COMPRESSION_BUILD_DLL) +# define ACE_Compression_Export ACE_Proper_Export_Flag +# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ACE_COMPRESSION_BUILD_DLL */ +# define ACE_Compression_Export ACE_Proper_Import_Flag +# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ACE_COMPRESSION_BUILD_DLL */ +#else /* ACE_COMPRESSION_HAS_DLL == 1 */ +# define ACE_Compression_Export +# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) +# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ACE_COMPRESSION_HAS_DLL == 1 */ + +// Set ACE_COMPRESSION_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ACE_COMPRESSION_NTRACE) +# if (ACE_NTRACE == 1) +# define ACE_COMPRESSION_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ACE_COMPRESSION_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ACE_COMPRESSION_NTRACE */ + +#if (ACE_COMPRESSION_NTRACE == 1) +# define ACE_COMPRESSION_TRACE(X) +#else /* (ACE_COMPRESSION_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ACE_COMPRESSION_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ACE_COMPRESSION_NTRACE == 1) */ + +#endif /* ACE_COMPRESSION_EXPORT_H */ + +// End of auto generated file. diff --git a/dep/acelite/ace/Compression/Compressor.cpp b/dep/acelite/ace/Compression/Compressor.cpp new file mode 100644 index 00000000000..86d1a1f3dd2 --- /dev/null +++ b/dep/acelite/ace/Compression/Compressor.cpp @@ -0,0 +1,63 @@ +// $Id: Compressor.cpp 95556 2012-02-24 09:14:51Z johnnyw $ + +#include "Compressor.h" + +#if !defined (__ACE_INLINE__) +#include "Compressor.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Compressor::ACE_Compressor( ACE_CompressorId compressor_id, + ACE_UINT32 compression_level ) + : compressor_id_ (compressor_id) + , compression_level_ (compression_level) + , compressed_bytes_ (0) + , uncompressed_bytes_ (0) +{} + +ACE_Compressor::~ACE_Compressor () +{ +} + +ACE_UINT64 +ACE_Compressor::compressed_bytes(void) const +{ + ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0 ); + return this->compressed_bytes_; +} + +ACE_UINT64 +ACE_Compressor::uncompressed_bytes(void) const +{ + ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0 ); + return this->uncompressed_bytes_; +} + +void +ACE_Compressor::reset_stats(void) +{ + ACE_GUARD( ACE_SYNCH_MUTEX, ace_mon, this->mutex_ ); + this->compressed_bytes_ = 0; + this->uncompressed_bytes_ = 0; +} + +void +ACE_Compressor::update_stats(ACE_UINT64 uncompressed_bytes, ACE_UINT64 compressed_bytes) +{ + ACE_GUARD( ACE_SYNCH_MUTEX, ace_mon, this->mutex_ ); + this->compressed_bytes_ += compressed_bytes; + this->uncompressed_bytes_ += uncompressed_bytes; +} + +float +ACE_Compressor::compression_ratio(void) const +{ + ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0.0f ); + if (this->uncompressed_bytes_ > 0) { + return static_cast(this->compressed_bytes_) / this->uncompressed_bytes_; + } + return 0.0f; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Compression/Compressor.h b/dep/acelite/ace/Compression/Compressor.h new file mode 100644 index 00000000000..eb71167a5e0 --- /dev/null +++ b/dep/acelite/ace/Compression/Compressor.h @@ -0,0 +1,137 @@ +// -*- C++ -*- +//============================================================================= +/** + * @file Compressor.h + * + * $Id: Compressor.h + * + * @author ACE version by + * @author Derek Dominish + */ +//============================================================================= + +#ifndef ACE_COMPRESSOR_H +#define ACE_COMPRESSOR_H + +#include /**/ "ace/pre.h" + +#include /**/ "ACE_Compression_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Guard_T.h" +#include "ace/Thread_Mutex.h" +#include "ace/Synch_Traits.h" +#include "ace/Copy_Disabled.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * CompressorId from OMG Compression::CompressorId + * see $(TAO_ROOT)/tao/Compression.pidl + */ +enum ACE_CompressorId +{ + ACE_COMPRESSORID_NONE = 0, + ACE_COMPRESSORID_GZIP = 1, + ACE_COMPRESSORID_PKZIP = 2, + ACE_COMPRESSORID_BZIP2 = 3, + ACE_COMPRESSORID_ZLIB = 4, + ACE_COMPRESSORID_LZMA = 5, + ACE_COMPRESSORID_LZO = 6, + ACE_COMPRESSORID_RZIP = 7, + ACE_COMPRESSORID_7X = 8, + ACE_COMPRESSORID_XAR = 9, + ACE_COMPRESSORID_RLE = 10 +}; + +class ACE_Compression_Export ACE_Compressor : private ACE_Copy_Disabled +{ +public: + + ACE_CompressorId get_compressor_id(void) const; + + ACE_UINT32 get_compression_level(void) const; + + /** + * Compress the @a in_ptr buffer for @a in_len into the + * @a dest_ptr buffer with a maximum @a max_out_len. If the + * @a max_out_len is exhausted through the compress process + * then a value of -1 will be returned from the function, + * otherwise the return value will indicate the resultant + * @a out_ptr compressed buffer length. + * + * NOTE: it is advisable that the @max_out_len be slightly + * larger of the input @a in_len (i.e. x 1.1F) to cater + * for the possibility that a reduced compressed length + * is not possible. + */ + virtual ACE_UINT64 compress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ) = 0; + + /** + * DeCompress the @a in_ptr buffer for @a in_len into the + * @a out_ptr buffer with a maximum @a max_out_len. If the + * @a max_out_len is exhausted during decompression + * then a value of -1 will be returned from the function, + * otherwise the return value will indicate the resultant + * @a out_ptr decompressed buffer length. + */ + virtual ACE_UINT64 decompress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ) = 0; + + /** + * Return the current compressed bytes statistics counter. + */ + virtual ACE_UINT64 compressed_bytes(void) const; + + /** + * Return the current uncompressed bytes statistics counter. + */ + virtual ACE_UINT64 uncompressed_bytes(void) const; + + /** + * Return the current compression ratio statistics. + */ + virtual float compression_ratio(void) const; + + /** + * Reset the statistics to zero. + */ + virtual void reset_stats(void); + + virtual ~ACE_Compressor (void); + +protected: + ACE_Compressor(ACE_CompressorId compressor_id, + ACE_UINT32 compression_level = 0); // Must be inherited. + + virtual void update_stats( ACE_UINT64 uncompressed_bytes, + ACE_UINT64 compressed_bytes ); + +private: + ACE_CompressorId compressor_id_; + ACE_UINT32 compression_level_; + + // Ensure we can lock with imutability (i.e. const) + mutable ACE_SYNCH_MUTEX mutex_; + + ACE_UINT64 compressed_bytes_; + ACE_UINT64 uncompressed_bytes_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "Compressor.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" + +#endif // ACE_COMPRESSOR_H diff --git a/dep/acelite/ace/Compression/Compressor.inl b/dep/acelite/ace/Compression/Compressor.inl new file mode 100644 index 00000000000..b9809018e41 --- /dev/null +++ b/dep/acelite/ace/Compression/Compressor.inl @@ -0,0 +1,18 @@ +// -*- C++ -*- +// $Id: Compressor.inl 95545 2012-02-23 07:57:08Z johnnyw $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE ACE_CompressorId +ACE_Compressor::get_compressor_id(void) const +{ + return this->compressor_id_; +} + +ACE_INLINE ACE_UINT32 +ACE_Compressor::get_compression_level(void) const +{ + return this->compression_level_; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Compression/rle/ACE_RLECompression_export.h b/dep/acelite/ace/Compression/rle/ACE_RLECompression_export.h new file mode 100644 index 00000000000..f0364580879 --- /dev/null +++ b/dep/acelite/ace/Compression/rle/ACE_RLECompression_export.h @@ -0,0 +1,57 @@ +// -*- C++ -*- +// $Id: ACE_RLECompression_export.h 95545 2012-02-23 07:57:08Z johnnyw $ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ACE_RLECompression +// ------------------------------ +#ifndef ACE_RLECOMPRESSION_EXPORT_H +#define ACE_RLECOMPRESSION_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_RLECOMPRESSION_HAS_DLL) +# define ACE_RLECOMPRESSION_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && ACE_RLECOMPRESSION_HAS_DLL */ + +#if !defined (ACE_RLECOMPRESSION_HAS_DLL) +# define ACE_RLECOMPRESSION_HAS_DLL 1 +#endif /* ! ACE_RLECOMPRESSION_HAS_DLL */ + +#if defined (ACE_RLECOMPRESSION_HAS_DLL) && (ACE_RLECOMPRESSION_HAS_DLL == 1) +# if defined (ACE_RLECOMPRESSION_BUILD_DLL) +# define ACE_RLECompression_Export ACE_Proper_Export_Flag +# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ACE_RLECOMPRESSION_BUILD_DLL */ +# define ACE_RLECompression_Export ACE_Proper_Import_Flag +# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ACE_RLECOMPRESSION_BUILD_DLL */ +#else /* ACE_RLECOMPRESSION_HAS_DLL == 1 */ +# define ACE_RLECompression_Export +# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) +# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ACE_RLECOMPRESSION_HAS_DLL == 1 */ + +// Set ACE_RLECOMPRESSION_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ACE_RLECOMPRESSION_NTRACE) +# if (ACE_NTRACE == 1) +# define ACE_RLECOMPRESSION_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ACE_RLECOMPRESSION_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ACE_RLECOMPRESSION_NTRACE */ + +#if (ACE_RLECOMPRESSION_NTRACE == 1) +# define ACE_RLECOMPRESSION_TRACE(X) +#else /* (ACE_RLECOMPRESSION_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ACE_RLECOMPRESSION_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ACE_RLECOMPRESSION_NTRACE == 1) */ + +#endif /* ACE_RLECOMPRESSION_EXPORT_H */ + +// End of auto generated file. diff --git a/dep/acelite/ace/Compression/rle/RLECompressor.cpp b/dep/acelite/ace/Compression/rle/RLECompressor.cpp new file mode 100644 index 00000000000..423d8a0f0ac --- /dev/null +++ b/dep/acelite/ace/Compression/rle/RLECompressor.cpp @@ -0,0 +1,158 @@ +// $Id: RLECompressor.cpp 95560 2012-02-27 08:11:54Z johnnyw $ + +#include "RLECompressor.h" +#include "ace/OS_NS_string.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_RLECompressor::ACE_RLECompressor(void) + : ACE_Compressor(ACE_COMPRESSORID_RLE) +{ +} + +ACE_RLECompressor::~ACE_RLECompressor(void) +{ +} + +ACE_UINT64 +ACE_RLECompressor::compress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ) +{ + const ACE_UINT8 *in_p = static_cast(in_ptr); + ACE_UINT8 *out_p = static_cast(out_ptr); + + ACE_UINT64 src_len = in_len; // Save for stats + ACE_UINT64 out_len = 0; + ACE_UINT64 out_index = 0; + ACE_UINT64 out_base = 0; + + ACE_UINT32 run_count = 0; + ACE_UINT32 dup_count = 0; + + bool run_code = false; + + ACE_UINT8 nxt_byte, cur_byte; + + if (in_p && out_p) while (in_len-- > 0) { + + if (run_code) switch (run_count) { + + default: + + out_p[out_index = out_base] = ACE_UINT8(run_count++ | 0x80); + out_p[++out_index] = cur_byte = *in_p++; + + if (in_len ? cur_byte == (nxt_byte = *in_p) : true) { + continue; + } + + // Fall Through + + case 128: + + if (++out_index >= max_out_len) { + return ACE_UINT64(-1); // Output Exhausted + } else if (in_len == 0) { + continue; + } + + run_code = false; + out_p[out_base = out_index] = 0; + dup_count = run_count = 0; + continue; + } + + switch (run_count) { + + case 128: + + if (++out_index >= max_out_len) { + return ACE_UINT64(-1); // Output Exhausted + } + out_p[out_base = out_index] = 0; + dup_count = run_count = 0; + + // Fall Through + + default : + + cur_byte = *in_p++; + + if (in_len > 0) { + if (cur_byte == (nxt_byte = *in_p)) { + if (dup_count++ == 1) { + if (run_count >= dup_count) { + out_p[out_base] = static_cast(run_count - dup_count); + out_base += run_count; + } + run_code = true; + run_count = dup_count - 1; + dup_count = 0; + out_p[out_index = out_base] = static_cast(run_count++ | 0x80); + break; + } + } else dup_count = 0; + } + out_p[out_base] = char(run_count++); + break; + } + + if (++out_index >= max_out_len) { + return ACE_UINT64(-1); // Output Exhausted + } + + out_p[out_index] = cur_byte; + } + + out_len = ++out_index; // Update our output length + + this->update_stats(src_len, out_len); + + return out_len; +} + +// Decompress using Run Length Encoding (RLE) +ACE_UINT64 +ACE_RLECompressor::decompress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ) +{ + ACE_UINT64 out_len = 0; + + const ACE_UINT8 *in_p = static_cast(in_ptr); + ACE_UINT8 *out_p = static_cast(out_ptr); + + if (in_p && out_p) while(in_len-- > 0) { + + ACE_UINT8 cur_byte = *in_p++; + ACE_UINT32 cpy_len = ACE_UINT32((cur_byte & 0x7F) + 1); + + if (cpy_len > max_out_len) { + return ACE_UINT64(-1); // Output Exhausted + } else if ((cur_byte & 0x80) != 0) { // compressed + if (in_len-- > 0) { + ACE_OS::memset(out_p, *in_p++, cpy_len); + } else { + return ACE_UINT64(-1); // Output Exhausted + } + } else if (in_len >= cpy_len) { + ACE_OS::memcpy(out_p, in_p, cpy_len); + in_p += cpy_len; + in_len -= cpy_len; + } else { + return ACE_UINT64(-1); // Output Exhausted + } + + out_p += cpy_len; + max_out_len -= cpy_len; + out_len += cpy_len; + } + + return out_len; +} + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Compression/rle/RLECompressor.h b/dep/acelite/ace/Compression/rle/RLECompressor.h new file mode 100644 index 00000000000..7371d22bf50 --- /dev/null +++ b/dep/acelite/ace/Compression/rle/RLECompressor.h @@ -0,0 +1,108 @@ +// -*- C++ -*- +//============================================================================= +/** + * @file RLECompressor.h + * + * $Id: RLECompressor.h + * + * @author TAO version by + * @author Derek Dominish + * @author ACE version by + * @author Derek Dominish + * + * Run-length encoding (RLE) is a very simple form of data compression + * in which runs of data (that is, sequences in which the same data value + * occurs in many consecutive data elements) are stored as a single data + * value and count, rather than as the original run. This is most useful + * on data that contains many such runs: for example, simple graphic + * images such as icons, line drawings, and animations. It is not useful + * with files that don't have many runs as it could slightly increase the + * output size. + * ALGORITHM: This algorithm is an optimized version of the traditional + * RLE algorithm in that it behaves better with very few runs. + * + * With a run of a character where that run is >= 3 this is + * replaced with the repeat indicator 0X80 and then the repeat count OR'd + * over this ident. This repeat count is therefore has a maximum value + * of 127 (0x7F) which is to be interpreted as the next character repeated + * another 'repeat count' times (i.e. a maximum of 128 characters can be + * represented in any single dupal). if the repeat ident is not present + * then the count is to be interpreted as a copy of the next repeat count + * characters + 1. + * + * EXAMPLE: the following arbitary string of 67 bytes:- + * WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW + * will produce (as a HEXDUMP) of 14 bytes + * 8B 57 00 42 8B 57 82 42 97 57 00 42 8D 57 .W.B.W.B.W.B.W + */ +//============================================================================= + +#ifndef ACE_RLECOMPRESSOR_H +#define ACE_RLECOMPRESSOR_H + +#include /**/ "ace/pre.h" + +#include "ACE_RLECompression_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Compression/Compressor.h" +#include "ace/Singleton.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ACE_RLECompression_Export ACE_RLECompressor : public ACE_Compressor +{ +public: + /** + * Default constructor. Should use instance() to get global instance. + */ + ACE_RLECompressor(void); + + virtual ~ACE_RLECompressor(void); + + /** + * Compress the @a in_ptr buffer for @a in_len into the + * @a dest_ptr buffer with a maximum @a max_out_len using + * the Run Length Ecoding (RLE) algorithm. If the + * @a max_out_len is exhausted through the compress process + * then a value of -1 will be returned from the function, + * otherwise the return value will indicate the resultant + * @a out_ptr compressed buffer length. + * + * @note It is advisable that the @max_out_len be slightly + * larger of the input @a in_len (i.e. x 1.1F) to cater + * for the possibility that a reduced compressed length + * is not possible. + */ + virtual ACE_UINT64 compress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ); + + /** + * DeCompress the @a in_ptr buffer for @a in_len into the + * @a out_ptr buffer with a maximum @a max_out_len using + * the Run Length Ecoding (RLE) algorithm. If the + * @a max_out_len is exhausted during decompression + * then a value of -1 will be returned from the function, + * otherwise the return value will indicate the resultant + * @a out_ptr decompressed buffer length. + */ + virtual ACE_UINT64 decompress( const void *in_ptr, + ACE_UINT64 in_len, + void *out_ptr, + ACE_UINT64 max_out_len ); +}; + +ACE_RLECOMPRESSION_SINGLETON_DECLARE(ACE_Singleton, ACE_RLECompressor, ACE_SYNCH_MUTEX); + +typedef class ACE_Singleton ACE_RLECompression; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#endif // ACE_RLECOMPRESSOR_H diff --git a/dep/acelite/ace/Condition_Attributes.cpp b/dep/acelite/ace/Condition_Attributes.cpp new file mode 100644 index 00000000000..49a02635ba8 --- /dev/null +++ b/dep/acelite/ace/Condition_Attributes.cpp @@ -0,0 +1,21 @@ +/* -*- C++ -*- */ +/** + * @file Condition_Attributes.cpp + * + * $Id: Condition_Attributes.cpp 96061 2012-08-16 09:36:07Z mcorino $ + * + * Originally in Synch.cpp + * + * @author Douglas C. Schmidt + */ + +#include "ace/Condition_Thread_Mutex.h" +#include "ace/Condition_Attributes.h" + +#if defined (ACE_HAS_THREADS) + +#if !defined (__ACE_INLINE__) +#include "ace/Condition_Attributes.inl" +#endif /* __ACE_INLINE__ */ + +#endif /* ACE_HAS_THREADS */ diff --git a/dep/acelite/ace/Condition_Attributes.h b/dep/acelite/ace/Condition_Attributes.h new file mode 100644 index 00000000000..0d53b273285 --- /dev/null +++ b/dep/acelite/ace/Condition_Attributes.h @@ -0,0 +1,101 @@ +// -*- C++ -*- + +//========================================================================== +/** + * @file Condition_Attributes.h + * + * $Id: Condition_Attributes.h 96077 2012-08-20 08:13:23Z johnnyw $ + * + * Moved from Synch.h. + * + * @author Douglas C. Schmidt + */ +//========================================================================== + +#ifndef ACE_CONDITION_ATTRIBUTES_H +#define ACE_CONDITION_ATTRIBUTES_H +#include /**/ "ace/pre.h" + +#include /**/ "ace/ACE_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/OS_NS_Thread.h" + +#if defined (ACE_HAS_THREADS) + +// ACE platform supports some form of threading. + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ACE_Export ACE_Condition_Attributes +{ +public: + /// Constructor + ACE_Condition_Attributes (int type = ACE_DEFAULT_SYNCH_TYPE); + + /// Destructor + ~ACE_Condition_Attributes (void); + + /// Accessor for retrieving the current attributes + const ACE_condattr_t& attributes (void) const; + +protected: + /// The attributes + ACE_condattr_t attributes_; + +private: + // = Prevent assignment and initialization. + void operator= (const ACE_Condition_Attributes &); + ACE_Condition_Attributes (const ACE_Condition_Attributes &); +}; + +template +class ACE_Condition_Attributes_T : public ACE_Condition_Attributes +{ +public: + /// Constructor + ACE_Condition_Attributes_T (int type = ACE_DEFAULT_SYNCH_TYPE) + : ACE_Condition_Attributes (type) + {} + + /// Destructor + ~ACE_Condition_Attributes_T (void) {} + +private: + // = Prevent assignment and initialization. + void operator= (const ACE_Condition_Attributes_T &); + ACE_Condition_Attributes_T (const ACE_Condition_Attributes_T &); +}; + +class ACE_Monotonic_Time_Policy; + +template <> +class ACE_Export ACE_Condition_Attributes_T + : public ACE_Condition_Attributes +{ +public: + /// Constructor + ACE_Condition_Attributes_T (int type = ACE_DEFAULT_SYNCH_TYPE); + + /// Destructor + ~ACE_Condition_Attributes_T (void); + +private: + // = Prevent assignment and initialization. + void operator= (const ACE_Condition_Attributes_T &); + ACE_Condition_Attributes_T (const ACE_Condition_Attributes_T &); +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "ace/Condition_Attributes.inl" +#endif /* __ACE_INLINE__ */ + +#endif /* !ACE_HAS_THREADS */ + +#include /**/ "ace/post.h" +#endif /* ACE_CONDITION_ATTRIBUTES_H */ diff --git a/dep/acelite/ace/Condition_Attributes.inl b/dep/acelite/ace/Condition_Attributes.inl new file mode 100644 index 00000000000..12afde24c80 --- /dev/null +++ b/dep/acelite/ace/Condition_Attributes.inl @@ -0,0 +1,40 @@ +// -*- C++ -*- +// +// $Id: Condition_Attributes.inl 96096 2012-08-23 12:34:02Z johnnyw $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE +ACE_Condition_Attributes::ACE_Condition_Attributes (int type) +{ + (void) ACE_OS::condattr_init (this->attributes_, type); +} + +ACE_INLINE +ACE_Condition_Attributes::~ACE_Condition_Attributes (void) +{ + ACE_OS::condattr_destroy (this->attributes_); +} + +ACE_INLINE +const ACE_condattr_t& +ACE_Condition_Attributes::attributes (void) const +{ + return this->attributes_; +} + +ACE_INLINE +ACE_Condition_Attributes_T::ACE_Condition_Attributes_T (int type) + : ACE_Condition_Attributes (type) +{ +#if (defined (_POSIX_MONOTONIC_CLOCK) && !defined (ACE_LACKS_MONOTONIC_TIME)) || defined (ACE_HAS_CLOCK_GETTIME_MONOTONIC) + (void) ACE_OS::condattr_setclock (this->attributes_, CLOCK_MONOTONIC); +#endif +} + +ACE_INLINE +ACE_Condition_Attributes_T::~ACE_Condition_Attributes_T (void) +{ +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Condition_Recursive_Thread_Mutex.cpp b/dep/acelite/ace/Condition_Recursive_Thread_Mutex.cpp index 1f357589f55..74922b65c5d 100644 --- a/dep/acelite/ace/Condition_Recursive_Thread_Mutex.cpp +++ b/dep/acelite/ace/Condition_Recursive_Thread_Mutex.cpp @@ -3,7 +3,7 @@ /** * @file Condition_Recursive_Thread_Mutex.cpp * - * $Id: Condition_Recursive_Thread_Mutex.cpp 89127 2010-02-22 19:58:18Z schmidt $ + * $Id: Condition_Recursive_Thread_Mutex.cpp 96077 2012-08-20 08:13:23Z johnnyw $ * * Originally in Synch.cpp * @@ -14,9 +14,7 @@ #if defined (ACE_HAS_THREADS) -#if defined (ACE_HAS_DUMP) -# include "ace/Log_Msg.h" -#endif /* ACE_HAS_DUMP */ +#include "ace/Log_Msg.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -49,7 +47,19 @@ ACE_Condition::~ACE_Condition (void) ACE_Condition::ACE_Condition (ACE_Recursive_Thread_Mutex &m) : mutex_ (m) { - ACE_OS::cond_init (&this->cond_); + if (ACE_OS::cond_init (&this->cond_) != 0) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Condition::ACE_Condition"))); +} + +ACE_Condition::ACE_Condition (ACE_Recursive_Thread_Mutex &m, + const ACE_Condition_Attributes &attributes) + : mutex_ (m) +{ + if (ACE_OS::cond_init (&this->cond_, + const_cast (attributes.attributes ())) != 0) + ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Condition::ACE_Condition"))); } int @@ -118,12 +128,6 @@ ACE_Condition::mutex (void) return this->mutex_; } -ACE_Condition_Recursive_Thread_Mutex::ACE_Condition_Recursive_Thread_Mutex ( - ACE_Recursive_Thread_Mutex &m) : - ACE_Condition (m) -{ -} - ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_THREADS */ diff --git a/dep/acelite/ace/Condition_Recursive_Thread_Mutex.h b/dep/acelite/ace/Condition_Recursive_Thread_Mutex.h index ac3177da8c8..a313a7f7b6e 100644 --- a/dep/acelite/ace/Condition_Recursive_Thread_Mutex.h +++ b/dep/acelite/ace/Condition_Recursive_Thread_Mutex.h @@ -4,7 +4,7 @@ /** * @file Condition_Recursive_Thread_Mutex.h * - * $Id: Condition_Recursive_Thread_Mutex.h 86731 2009-09-17 12:23:48Z johnnyw $ + * $Id: Condition_Recursive_Thread_Mutex.h 96073 2012-08-17 13:39:55Z mcorino $ * * Moved from Synch.h. * @@ -26,11 +26,11 @@ # include "ace/Null_Condition.h" #else /* ACE_HAS_THREADS */ #include "ace/Recursive_Thread_Mutex.h" +#include "ace/Condition_Attributes.h" +#include "ace/Condition_T.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template class ACE_Condition; - /** * @brief ACE_Condition template specialization written using * @a ACE_Recursive_Thread_Mutex. This allows threads to block until @@ -43,6 +43,10 @@ public: /// Initialize the condition variable with a recursive mutex. ACE_Condition (ACE_Recursive_Thread_Mutex &m); + /// Initialize the condition variable. + ACE_Condition (ACE_Recursive_Thread_Mutex &m, + const ACE_Condition_Attributes &attributes); + /// Implicitly destroy the condition variable. ~ACE_Condition (void); @@ -65,7 +69,7 @@ public: * Block on condition or until absolute time-of-day has passed. If * abstime == 0 use "blocking" wait() semantics on the recursive @a mutex * passed as a parameter (this is useful if you need to store the - * in shared memory). Else, if != 0 and the + * in shared memory). Else, if @a abstime != 0 and the * call times out before the condition is signaled returns -1 * and sets errno to ETIME. */ @@ -100,13 +104,7 @@ private: }; -class ACE_Export ACE_Condition_Recursive_Thread_Mutex - : public ACE_Condition -{ -public: - /// Initialize the condition variable with a recursive mutex. - ACE_Condition_Recursive_Thread_Mutex (ACE_Recursive_Thread_Mutex &m); -}; +typedef ACE_Condition ACE_Condition_Recursive_Thread_Mutex; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Condition_T.cpp b/dep/acelite/ace/Condition_T.cpp index ae75d9ff359..4b5e32d09f9 100644 --- a/dep/acelite/ace/Condition_T.cpp +++ b/dep/acelite/ace/Condition_T.cpp @@ -1,4 +1,4 @@ -// $Id: Condition_T.cpp 89127 2010-02-22 19:58:18Z schmidt $ +// $Id: Condition_T.cpp 96077 2012-08-20 08:13:23Z johnnyw $ #ifndef ACE_CONDITION_T_CPP #define ACE_CONDITION_T_CPP @@ -15,6 +15,7 @@ #if !defined (__ACE_INLINE__) #include "ace/Condition_T.inl" +#include "ace/Time_Value.h" #endif /* __ACE_INLINE__ */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -71,6 +72,22 @@ ACE_Condition::ACE_Condition (MUTEX &m, ACE_TEXT ("ACE_Condition::ACE_Condition"))); } +template +ACE_Condition::ACE_Condition (MUTEX &m, + const ACE_Condition_Attributes &attributes, + const ACE_TCHAR *name, + void *arg) + : mutex_ (m) +{ +// ACE_TRACE ("ACE_Condition::ACE_Condition"); + if (ACE_OS::cond_init (&this->cond_, + const_cast (attributes.attributes ()), + name, arg) != 0) + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Condition::ACE_Condition"))); +} + template ACE_Condition::~ACE_Condition (void) { diff --git a/dep/acelite/ace/Condition_T.h b/dep/acelite/ace/Condition_T.h index 936ce821777..cbae002d7a2 100644 --- a/dep/acelite/ace/Condition_T.h +++ b/dep/acelite/ace/Condition_T.h @@ -4,7 +4,7 @@ /** * @file Condition_T.h * - * $Id: Condition_T.h 81462 2008-04-28 11:39:40Z johnnyw $ + * $Id: Condition_T.h 96061 2012-08-16 09:36:07Z mcorino $ * * Moved from Synch.h. * @@ -18,7 +18,7 @@ #include /**/ "ace/pre.h" #include "ace/OS_NS_Thread.h" -#include "ace/Lock.h" +#include "ace/Condition_Attributes.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -37,8 +37,8 @@ class ACE_Time_Value; * until shared data changes state. * * A condition variable enables threads to atomically block and - * test the condition under the protection of a mutual exclu- - * sion lock (mutex) until the condition is satisfied. That is, + * test the condition under the protection of a mutual exclusion + * lock (mutex) until the condition is satisfied. That is, * the mutex must have been held by the thread before calling * wait or signal on the condition. If the condition is false, * a thread blocks on a condition variable and atomically @@ -54,11 +54,16 @@ template class ACE_Condition { public: - // = Initialiation and termination methods. /// Initialize the condition variable. ACE_Condition (MUTEX &m, int type = USYNC_THREAD, const ACE_TCHAR *name = 0, void *arg = 0); + /// Initialize the condition variable. + ACE_Condition (MUTEX &m, + const ACE_Condition_Attributes &attributes, + const ACE_TCHAR *name = 0, + void *arg = 0); + /// Implicitly destroy the condition variable. ~ACE_Condition (void); @@ -67,7 +72,7 @@ public: * Block on condition, or until absolute time-of-day has passed. If * @a abstime == 0 use "blocking" semantics. Else, if @a abstime * != 0 and the call times out before the condition is signaled - * returns -1 and sets errno to ETIME. + * wait() returns -1 and sets errno to ETIME. */ int wait (const ACE_Time_Value *abstime); @@ -76,10 +81,10 @@ public: /** * Block on condition or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" wait() semantics on the + * @a abstime == 0 use "blocking" wait() semantics on the @a mutex * passed as a parameter (this is useful if you need to store the - * in shared memory). Else, if != 0 and the - * call times out before the condition is signaled returns -1 + * in shared memory). Else, if @a abstime != 0 and the + * call times out before the condition is signaled wait() returns -1 * and sets errno to ETIME. */ int wait (MUTEX &mutex, const ACE_Time_Value *abstime = 0); diff --git a/dep/acelite/ace/Condition_Thread_Mutex.cpp b/dep/acelite/ace/Condition_Thread_Mutex.cpp index 88e99702d0f..c3fcd7936b0 100644 --- a/dep/acelite/ace/Condition_Thread_Mutex.cpp +++ b/dep/acelite/ace/Condition_Thread_Mutex.cpp @@ -2,7 +2,7 @@ /** * @file Condition_Thread_Mutex.cpp * - * $Id: Condition_Thread_Mutex.cpp 91286 2010-08-05 09:04:31Z johnnyw $ + * $Id: Condition_Thread_Mutex.cpp 96077 2012-08-20 08:13:23Z johnnyw $ * * Originally in Synch.cpp * @@ -19,17 +19,15 @@ #include "ace/Log_Msg.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_ALLOC_HOOK_DEFINE(ACE_Condition_Thread_Mutex) +ACE_ALLOC_HOOK_DEFINE(ACE_Condition) void -ACE_Condition_Thread_Mutex::dump (void) const +ACE_Condition::dump (void) const { #if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Condition_Thread_Mutex::dump"); +// ACE_TRACE ("ACE_Condition::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); @@ -42,40 +40,40 @@ ACE_Condition_Thread_Mutex::dump (void) const #endif /* ACE_HAS_DUMP */ } -ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - const ACE_TCHAR *name, - void *arg) +ACE_Condition::ACE_Condition (ACE_Thread_Mutex &m, + const ACE_TCHAR *name, + void *arg) : mutex_ (m), removed_ (false) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"); +// ACE_TRACE ("ACE_Condition::ACE_Condition"); if (ACE_OS::cond_init (&this->cond_, (short) USYNC_THREAD, name, arg) != 0) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"))); + ACE_TEXT ("ACE_Condition::ACE_Condition"))); } -ACE_Condition_Thread_Mutex:: -ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name, - void *arg) +ACE_Condition::ACE_Condition (ACE_Thread_Mutex &m, + const ACE_Condition_Attributes &attributes, + const ACE_TCHAR *name, + void *arg) : mutex_ (m), removed_ (false) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"); - if (ACE_OS::cond_init (&this->cond_, attributes.attributes_, +// ACE_TRACE ("ACE_Condition::ACE_Condition"); + if (ACE_OS::cond_init (&this->cond_, + const_cast (attributes.attributes ()), name, arg) != 0) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"))); + ACE_TEXT ("ACE_Condition::ACE_Condition"))); } -ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (void) +ACE_Condition::~ACE_Condition (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex"); +// ACE_TRACE ("ACE_Condition::~ACE_Condition"); this->remove (); } @@ -84,40 +82,40 @@ ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (void) // using the function. int -ACE_Condition_Thread_Mutex::wait (void) +ACE_Condition::wait (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::wait"); - return ACE_OS::cond_wait (&this->cond_, &this->mutex_.lock_); +// ACE_TRACE ("ACE_Condition::wait"); + return ACE_OS::cond_wait (&this->cond_, &this->mutex_.lock ()); } int -ACE_Condition_Thread_Mutex::wait (ACE_Thread_Mutex &mutex, +ACE_Condition::wait (ACE_Thread_Mutex &mutex, const ACE_Time_Value *abstime) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::wait"); +// ACE_TRACE ("ACE_Condition::wait"); return ACE_OS::cond_timedwait (&this->cond_, - &mutex.lock_, + &mutex.lock (), const_cast (abstime)); } int -ACE_Condition_Thread_Mutex::wait (const ACE_Time_Value *abstime) +ACE_Condition::wait (const ACE_Time_Value *abstime) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::wait"); +// ACE_TRACE ("ACE_Condition::wait"); return this->wait (this->mutex_, abstime); } int -ACE_Condition_Thread_Mutex::signal (void) +ACE_Condition::signal (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::signal"); +// ACE_TRACE ("ACE_Condition::signal"); return ACE_OS::cond_signal (&this->cond_); } int -ACE_Condition_Thread_Mutex::broadcast (void) +ACE_Condition::broadcast (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::broadcast"); +// ACE_TRACE ("ACE_Condition::broadcast"); return ACE_OS::cond_broadcast (&this->cond_); } diff --git a/dep/acelite/ace/Condition_Thread_Mutex.h b/dep/acelite/ace/Condition_Thread_Mutex.h index 1ba866d2eb0..f39829cfe71 100644 --- a/dep/acelite/ace/Condition_Thread_Mutex.h +++ b/dep/acelite/ace/Condition_Thread_Mutex.h @@ -4,7 +4,7 @@ /** * @file Condition_Thread_Mutex.h * - * $Id: Condition_Thread_Mutex.h 92069 2010-09-28 11:38:59Z johnnyw $ + * $Id: Condition_Thread_Mutex.h 96073 2012-08-17 13:39:55Z mcorino $ * * Moved from Synch.h. * @@ -28,37 +28,17 @@ // ACE platform supports some form of threading. #include "ace/Thread_Mutex.h" +#include "ace/Condition_Attributes.h" +#include "ace/Condition_T.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Time_Value; -class ACE_Export ACE_Condition_Attributes -{ -public: - /// Constructor - ACE_Condition_Attributes (int type = ACE_DEFAULT_SYNCH_TYPE); - - /// Destructor - ~ACE_Condition_Attributes (void); - -private: - friend class ACE_Condition_Thread_Mutex; - - /// The attributes - ACE_condattr_t attributes_; - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Attributes &); - ACE_Condition_Attributes (const ACE_Condition_Attributes &); -}; - /** - * @class ACE_Condition_Thread_Mutex - * - * @brief ACE_Condition variable wrapper written using ACE_Mutexes This - * allows threads to block until shared data changes state. + * @brief ACE_Condition template specialization written using + * ACE_Mutexes. This allows threads to block until shared data + * changes state. * A condition variable enables threads to atomically block and * test the condition under the protection of a mutual exclu- * sion lock (mutex) until the condition is satisfied. That is, @@ -70,26 +50,24 @@ private: * up waiting threads by signaling the associated condition * variable. The waiting threads, upon awakening, reacquire the * mutex and re-evaluate the condition. - * - * This should be an instantiation of ACE_Condition but problems - * with compilers precludes this... */ -class ACE_Export ACE_Condition_Thread_Mutex +template <> +class ACE_Export ACE_Condition { public: /// Initialize the condition variable. - ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - const ACE_TCHAR *name = 0, - void *arg = 0); + ACE_Condition (ACE_Thread_Mutex &m, + const ACE_TCHAR *name = 0, + void *arg = 0); /// Initialize the condition variable. - ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name = 0, - void *arg = 0); + ACE_Condition (ACE_Thread_Mutex &m, + const ACE_Condition_Attributes &attributes, + const ACE_TCHAR *name = 0, + void *arg = 0); /// Implicitly destroy the condition variable. - ~ACE_Condition_Thread_Mutex (void); + ~ACE_Condition (void); /** * Explicitly destroy the condition variable. Note that only one @@ -111,7 +89,7 @@ public: /** * Block on condition or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" wait() semantics on the + * abstime == 0 use "blocking" wait() semantics on the @a mutex * passed as a parameter (this is useful if you need to store the * in shared memory). Else, if @a abstime != 0 and the * call times out before the condition is signaled returns -1 @@ -150,10 +128,12 @@ protected: private: // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Thread_Mutex &); - ACE_Condition_Thread_Mutex (const ACE_Condition_Thread_Mutex &); + void operator= (const ACE_Condition &); + ACE_Condition (const ACE_Condition &); }; +typedef ACE_Condition ACE_Condition_Thread_Mutex; + ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) diff --git a/dep/acelite/ace/Condition_Thread_Mutex.inl b/dep/acelite/ace/Condition_Thread_Mutex.inl index 712a8be0251..76cbc82ea82 100644 --- a/dep/acelite/ace/Condition_Thread_Mutex.inl +++ b/dep/acelite/ace/Condition_Thread_Mutex.inl @@ -1,25 +1,13 @@ // -*- C++ -*- // -// $Id: Condition_Thread_Mutex.inl 92069 2010-09-28 11:38:59Z johnnyw $ +// $Id: Condition_Thread_Mutex.inl 96061 2012-08-16 09:36:07Z mcorino $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_INLINE -ACE_Condition_Attributes::ACE_Condition_Attributes (int type) -{ - (void) ACE_OS::condattr_init (this->attributes_, type); -} - -ACE_INLINE -ACE_Condition_Attributes::~ACE_Condition_Attributes (void) -{ - ACE_OS::condattr_destroy (this->attributes_); -} - ACE_INLINE int -ACE_Condition_Thread_Mutex::remove (void) +ACE_Condition::remove (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::remove"); +// ACE_TRACE ("ACE_Condition::remove"); // is called in a loop if the condition variable is // BUSY. This avoids a condition where a condition is signaled and @@ -44,9 +32,9 @@ ACE_Condition_Thread_Mutex::remove (void) } ACE_INLINE ACE_Thread_Mutex & -ACE_Condition_Thread_Mutex::mutex (void) +ACE_Condition::mutex (void) { -// ACE_TRACE ("ACE_Condition_Thread_Mutex::mutex"); +// ACE_TRACE ("ACE_Condition::mutex"); return this->mutex_; } diff --git a/dep/acelite/ace/Configuration.cpp b/dep/acelite/ace/Configuration.cpp index 4e0a1749e92..85bbf1ca0c0 100644 --- a/dep/acelite/ace/Configuration.cpp +++ b/dep/acelite/ace/Configuration.cpp @@ -1,4 +1,4 @@ -// $Id: Configuration.cpp 91688 2010-09-09 11:21:50Z johnnyw $ +// $Id: Configuration.cpp 92828 2010-12-08 09:38:57Z mcorino $ #include "ace/Configuration.h" #include "ace/Auto_Ptr.h" #include "ace/SString.h" @@ -1632,7 +1632,7 @@ ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key // Now remove subkey from parent key ACE_Configuration_ExtId SubSExtId (sub_section); - SUBSECTION_HASH::ENTRY* subsection_entry; + SUBSECTION_HASH::ENTRY* subsection_entry = 0; if (((SUBSECTION_HASH*)ParentIntId.section_hash_map_)-> find (SubSExtId, subsection_entry)) return -1; diff --git a/dep/acelite/ace/Configuration_Import_Export.cpp b/dep/acelite/ace/Configuration_Import_Export.cpp index ae489f05dfa..15d869b8a09 100644 --- a/dep/acelite/ace/Configuration_Import_Export.cpp +++ b/dep/acelite/ace/Configuration_Import_Export.cpp @@ -1,4 +1,4 @@ -// $Id: Configuration_Import_Export.cpp 84565 2009-02-23 08:20:39Z johnnyw $ +// $Id: Configuration_Import_Export.cpp 96017 2012-08-08 22:18:09Z mitza $ #include "ace/Configuration_Import_Export.h" #include "ace/OS_Errno.h" @@ -138,7 +138,8 @@ ACE_Registry_ImpExp::import_config (const ACE_TCHAR* filename) // number type ACE_TCHAR* endptr = 0; unsigned long value = ACE_OS::strtoul (end + 6, &endptr, 16); - if (config_.set_integer_value (section, name, value)) + if (config_.set_integer_value (section, name, + static_cast (value))) { ACE_OS::fclose (in); delete [] buffer; diff --git a/dep/acelite/ace/Configuration_Import_Export.h b/dep/acelite/ace/Configuration_Import_Export.h index e93544bee29..9995d095d83 100644 --- a/dep/acelite/ace/Configuration_Import_Export.h +++ b/dep/acelite/ace/Configuration_Import_Export.h @@ -4,7 +4,7 @@ /** * @file Configuration_Import_Export.h * - * $Id: Configuration_Import_Export.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Configuration_Import_Export.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Jerry D. Odenwelder Jr. * Chris Hafey @@ -83,12 +83,12 @@ private: * using the Win32 Registry file export format. This format looks like * [Section] * "key"="String Data" - * "key"=dword: numeric data in hexidecimal format + * "key"=dword: numeric data in hexadecimal format * "key"=hex: binary data * * @todo * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed ammount (4096 bytes) + * importing of values greater than a fixed amount (4096 bytes) * */ class ACE_Export ACE_Registry_ImpExp : public ACE_Config_ImpExp_Base @@ -101,7 +101,7 @@ public: virtual ~ACE_Registry_ImpExp (void); /** - * Imports the configuration database from filename. + * Imports the configuration database from @a filename. * No existing data is removed. */ virtual int import_config (const ACE_TCHAR* filename); @@ -149,7 +149,7 @@ private: * Justification = left_justified * * The caller can then retrieve the string with the regular - * function and convert the string to the + * get_string_value() function and convert the string to the * desired data type. * * @todo @@ -157,7 +157,7 @@ private: * - Strings with embedded quotes " cause the import to fail * - Importing/exporting for values in the root section does not work * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed ammount (4096 bytes) + * importing of values greater than a fixed amount (4096 bytes) */ class ACE_Export ACE_Ini_ImpExp : public ACE_Config_ImpExp_Base { @@ -173,7 +173,7 @@ public: virtual ~ACE_Ini_ImpExp (void); /** - * Imports the configuration database from filename. + * Imports the configuration database from @a filename. * No existing data is removed. */ virtual int import_config (const ACE_TCHAR* filename); diff --git a/dep/acelite/ace/Connector.cpp b/dep/acelite/ace/Connector.cpp index 3a1edfc881a..a8399608ce5 100644 --- a/dep/acelite/ace/Connector.cpp +++ b/dep/acelite/ace/Connector.cpp @@ -1,4 +1,4 @@ -// $Id: Connector.cpp 91527 2010-08-27 15:03:31Z shuston $ +// $Id: Connector.cpp 93433 2011-02-23 10:34:01Z vzykov $ #ifndef ACE_CONNECTOR_CPP #define ACE_CONNECTOR_CPP @@ -829,7 +829,7 @@ ACE_Strategy_Connector::open else if (this->creation_strategy_ == 0) { ACE_NEW_RETURN (this->creation_strategy_, - CREATION_STRATEGY, + CREATION_STRATEGY (0, r), -1); this->delete_creation_strategy_ = true; } @@ -887,7 +887,8 @@ ACE_Strategy_Connector::ACE_Strategy_Connecto ACE_Connect_Strategy *conn_s, ACE_Concurrency_Strategy *con_s, int flags) - : creation_strategy_ (0), + : base_type (reactor), + creation_strategy_ (0), delete_creation_strategy_ (false), connect_strategy_ (0), delete_connect_strategy_ (false), diff --git a/dep/acelite/ace/Countdown_Time.cpp b/dep/acelite/ace/Countdown_Time.cpp deleted file mode 100644 index c964ab1138a..00000000000 --- a/dep/acelite/ace/Countdown_Time.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// $Id: Countdown_Time.cpp 91287 2010-08-05 10:30:49Z johnnyw $ - -#include "ace/Countdown_Time.h" -#include "ace/OS_NS_sys_time.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Countdown_Time.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Countdown_Time::ACE_Countdown_Time (ACE_Time_Value *max_wait_time) - : max_wait_time_ (max_wait_time), - stopped_ (false) -{ - this->start (); -} - -ACE_Countdown_Time::~ACE_Countdown_Time (void) -{ - this->stop (); -} - -void -ACE_Countdown_Time::start (void) -{ - if (this->max_wait_time_ != 0) - { - this->start_time_ = ACE_OS::gettimeofday (); - this->stopped_ = false; - } -} - -void -ACE_Countdown_Time::stop (void) -{ - if (this->max_wait_time_ != 0 && !this->stopped_) - { - ACE_Time_Value const elapsed_time = - ACE_OS::gettimeofday () - this->start_time_; - - if (elapsed_time >= ACE_Time_Value::zero && - *this->max_wait_time_ > elapsed_time) - { - *this->max_wait_time_ -= elapsed_time; - } - else - { - // Used all of timeout. - *this->max_wait_time_ = ACE_Time_Value::zero; - // errno = ETIME; - } - this->stopped_ = true; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Countdown_Time.h b/dep/acelite/ace/Countdown_Time.h index b9c9a467f62..b63228d606f 100644 --- a/dep/acelite/ace/Countdown_Time.h +++ b/dep/acelite/ace/Countdown_Time.h @@ -4,9 +4,10 @@ /** * @file Countdown_Time.h * - * $Id: Countdown_Time.h 85365 2009-05-18 08:27:42Z johnnyw $ + * $Id: Countdown_Time.h 95332 2011-12-15 11:09:41Z mcorino $ * * @author Douglas C. Schmidt + * @author Irfan Pyarali */ //============================================================================= @@ -15,67 +16,21 @@ #include /**/ "ace/pre.h" -#include /**/ "ace/ACE_export.h" - #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Time_Value.h" -#include "ace/Copy_Disabled.h" +#include "ace/Countdown_Time_T.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL -/** - * @class ACE_Countdown_Time - * - * @brief Keeps track of the amount of elapsed time. - * - * This class has a side-effect on the @c max_wait_time -- every - * time the stop() method is called the @c max_wait_time is - * updated. - */ -class ACE_Export ACE_Countdown_Time : private ACE_Copy_Disabled -{ -public: - /// Cache the @a max_wait_time and call @c start(). - ACE_Countdown_Time (ACE_Time_Value *max_wait_time); - - /// Destructor, makes sure the max_wait_time that got passed as pointer - /// to the constructor is updated with the time elapsed. - ~ACE_Countdown_Time (void); - - /// Cache the current time and enter a start state. - void start (void); - - /// Subtract the elapsed time from max_wait_time_ and enter a stopped - /// state. - void stop (void); - - /// Calls stop and then start. max_wait_time_ is modified by the - /// call to stop. - void update (void); - - /// Returns true if we've already been stopped, else false. - bool stopped (void) const; - -private: - /// Maximum time we were willing to wait. - ACE_Time_Value *max_wait_time_; - - /// Beginning of the start time. - ACE_Time_Value start_time_; - - /// Keeps track of whether we've already been stopped. - bool stopped_; -}; +// The following typedef is here for ease of use and backward +// compatibility. +typedef ACE_Countdown_Time_T + ACE_Countdown_Time; ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" -#if defined (__ACE_INLINE__) -#include "ace/Countdown_Time.inl" -#endif /* __ACE_INLINE__ */ - #endif /* ACE_COUNTDOWN_TIME_H */ diff --git a/dep/acelite/ace/Countdown_Time.inl b/dep/acelite/ace/Countdown_Time.inl deleted file mode 100644 index 4a9eb8e0e43..00000000000 --- a/dep/acelite/ace/Countdown_Time.inl +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -// -// $Id: Countdown_Time.inl 85368 2009-05-18 10:23:19Z johnnyw $ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE bool -ACE_Countdown_Time::stopped (void) const -{ - return stopped_; -} - -ACE_INLINE void -ACE_Countdown_Time::update (void) -{ - this->stop (); - this->start (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Countdown_Time_T.cpp b/dep/acelite/ace/Countdown_Time_T.cpp new file mode 100644 index 00000000000..fd9a466625f --- /dev/null +++ b/dep/acelite/ace/Countdown_Time_T.cpp @@ -0,0 +1,65 @@ +// $Id: Countdown_Time_T.cpp 95332 2011-12-15 11:09:41Z mcorino $ + +#ifndef ACE_COUNTDOWN_TIME_T_CPP +#define ACE_COUNTDOWN_TIME_T_CPP + +#include "ace/Countdown_Time_T.h" + +#if !defined (__ACE_INLINE__) +#include "ace/Countdown_Time_T.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template ACE_INLINE +ACE_Countdown_Time_T::ACE_Countdown_Time_T (ACE_Time_Value *max_wait_time, + TIME_POLICY const & time_policy) + : time_policy_ (time_policy), + max_wait_time_ (max_wait_time), + stopped_ (false) +{ + this->start (); +} + +template ACE_INLINE +ACE_Countdown_Time_T::~ACE_Countdown_Time_T (void) +{ + this->stop (); +} + +template ACE_INLINE void +ACE_Countdown_Time_T::start (void) +{ + if (this->max_wait_time_ != 0) + { + this->start_time_ = this->time_policy_ (); + this->stopped_ = false; + } +} + +template ACE_INLINE void +ACE_Countdown_Time_T::stop (void) +{ + if (this->max_wait_time_ != 0 && !this->stopped_) + { + ACE_Time_Value const elapsed_time = + this->time_policy_ () - this->start_time_; + + if (elapsed_time >= ACE_Time_Value::zero && + *this->max_wait_time_ > elapsed_time) + { + *this->max_wait_time_ -= elapsed_time; + } + else + { + // Used all of timeout. + *this->max_wait_time_ = ACE_Time_Value::zero; + // errno = ETIME; + } + this->stopped_ = true; + } +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_COUNTDOWN_TIME_T_CPP */ diff --git a/dep/acelite/ace/Countdown_Time_T.h b/dep/acelite/ace/Countdown_Time_T.h new file mode 100644 index 00000000000..74de8f27e1c --- /dev/null +++ b/dep/acelite/ace/Countdown_Time_T.h @@ -0,0 +1,100 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Countdown_Time_T.h + * + * $Id: Countdown_Time_T.h 95345 2011-12-15 19:46:06Z johnnyw $ + * + * @author Douglas C. Schmidt + */ +//============================================================================= + +#ifndef ACE_COUNTDOWN_TIME_T_H +#define ACE_COUNTDOWN_TIME_T_H + +#include /**/ "ace/pre.h" + +#include /**/ "ace/ACE_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Time_Value.h" +#include "ace/Time_Policy.h" +#include "ace/Copy_Disabled.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_Countdown_Time + * + * @brief Keeps track of the amount of elapsed time. + * + * This class has a side-effect on the @c max_wait_time -- every + * time the stop() method is called the @c max_wait_time is + * updated. + */ +template +class ACE_Countdown_Time_T : private ACE_Copy_Disabled +{ +public: + /// Cache the @a max_wait_time and call @c start(). + ACE_Countdown_Time_T (ACE_Time_Value *max_wait_time, + TIME_POLICY const & time_policy = TIME_POLICY()); + + /// Destructor, makes sure the max_wait_time that got passed as pointer + /// to the constructor is updated with the time elapsed. + ~ACE_Countdown_Time_T (void); + + /// Cache the current time and enter a start state. + void start (void); + + /// Subtract the elapsed time from max_wait_time_ and enter a stopped + /// state. + void stop (void); + + /// Calls stop and then start. max_wait_time_ is modified by the + /// call to stop. + void update (void); + + /// Returns true if we've already been stopped, else false. + bool stopped (void) const; + + /// Allows applications to control how the timer queue gets the time + /// of day. + void set_time_policy(TIME_POLICY const & time_policy); + +private: + /// The policy to return the current time of day + TIME_POLICY time_policy_; + + /// Maximum time we were willing to wait. + ACE_Time_Value *max_wait_time_; + + /// Beginning of the start time. + ACE_Time_Value start_time_; + + /// Keeps track of whether we've already been stopped. + bool stopped_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#if defined (__ACE_INLINE__) +#include "ace/Countdown_Time_T.inl" +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ace/Countdown_Time_T.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Countdown_Time_T.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + + +#endif /* ACE_COUNTDOWN_TIME_T_H */ diff --git a/dep/acelite/ace/Countdown_Time_T.inl b/dep/acelite/ace/Countdown_Time_T.inl new file mode 100644 index 00000000000..3d6e7a2f73d --- /dev/null +++ b/dep/acelite/ace/Countdown_Time_T.inl @@ -0,0 +1,26 @@ +// -*- C++ -*- +// +// $Id: Countdown_Time_T.inl 95332 2011-12-15 11:09:41Z mcorino $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template ACE_INLINE bool +ACE_Countdown_Time_T::stopped (void) const +{ + return stopped_; +} + +template ACE_INLINE void +ACE_Countdown_Time_T::update (void) +{ + this->stop (); + this->start (); +} + +template ACE_INLINE void +ACE_Countdown_Time_T::set_time_policy(TIME_POLICY const & time_policy) +{ + this->time_policy_ = time_policy; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/DLL.h b/dep/acelite/ace/DLL.h index 20d333db81a..4b1251eb704 100644 --- a/dep/acelite/ace/DLL.h +++ b/dep/acelite/ace/DLL.h @@ -4,7 +4,7 @@ /** * @file DLL.h * - * $Id: DLL.h 91064 2010-07-12 10:11:24Z johnnyw $ + * $Id: DLL.h 95913 2012-06-21 17:14:36Z johnnyw $ * * @author Kirthika Parameswaran */ @@ -88,24 +88,37 @@ public: /** * This method opens and dynamically links a specified DLL. - * @param dll_name The filename or path of the DLL to load. - * If a filename is given to @c open(), the @c ACE::ldfind() is used - * to locate DLLs via the following algorithms: (1) DLL filename - * expansion: @c ACE::ldfind() determines the name of the DLL by - * adding the appropriate prefix and suffix, e.g., it adds the @c lib - * prefix and @c .so suffix for Solaris and the @c .dll suffix for - * Windows and (2) DLL search path: @c ACE::ldfind() will also search - * for the designated DLL using the platform's DLL search path - * environment variable, e.g., it searches for DLLs using @c - * LD_LIBRARY_PATH on many UNIX systems and @c PATH on Windows. + * @param dll_name The filename or path of the DLL to load. ACE will + * attempt to apply the platform's standard library/DLL prefixes + * and suffixes, allowing a simple, unadorned name to be passed + * regardless of platform. The set of name transforms is listed + * below. A @i decorator is a platform's name designator for a debug + * vs release build. For example, on Windows it is usually "d". + * @li Prefix + name + decorator + suffix + * @li Prefix + name + suffix + * @li Name + decorator + suffix + * @li Name + suffix + * @li Name + * Note that the transforms with @i decorator will be avoided if + * ACE is built with the @c ACE_DISABLE_DEBUG_DLL_CHECK config macro. + * + * @Note There is another mode for locating library/DLL files that + * was used in old versions of ACE. The alternate method builds + * more combinations of pathname by combining the names transforms + * above with locations listed in the platform's standard "path" + * locations (e.g., @c LD_LIBRARY_PATH). It can be enabled by building + * ACE with the @c ACE_MUST_HELP_DLOPEN_SEARCH_PATH config macro. + * Use of this option is discouraged since it avoids the standard + * platform search options and security mechanisms. + * * @param open_mode Flags to alter the actions taken when loading the DLL. * The possible values are: * @li @c RTLD_LAZY (this the default): loads identifier symbols but * not the symbols for functions, which are loaded dynamically - * on-demand. + * on demand. * @li @c RTLD_NOW: performs all necessary relocations when * @a dll_name is first loaded - * @li RTLD_GLOBAL: makes symbols available for relocation + * @li @c RTLD_GLOBAL: makes symbols available for relocation * processing of any other DLLs. * @param close_handle_on_destruction Indicates whether or not the * close() method will be called to close an open DLL when this diff --git a/dep/acelite/ace/DLL_Manager.cpp b/dep/acelite/ace/DLL_Manager.cpp index 23e6f85520a..ebba7d64add 100644 --- a/dep/acelite/ace/DLL_Manager.cpp +++ b/dep/acelite/ace/DLL_Manager.cpp @@ -1,4 +1,4 @@ -// $Id: DLL_Manager.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: DLL_Manager.cpp 95913 2012-06-21 17:14:36Z johnnyw $ #include "ace/DLL_Manager.h" @@ -415,10 +415,10 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name, // 3. Build the combinations to try for this platform. // Try these combinations: - // - name with decorator and platform's suffix appended (if not supplied) - // - name with platform's suffix appended (if not supplied) // - name with platform's dll prefix (if it has one) and suffix // - name with platform's dll prefix, decorator, and suffix. + // - name with decorator and platform's suffix appended (if not supplied) + // - name with platform's suffix appended (if not supplied) // - name as originally given // We first try to find the file using the decorator so that when a // filename with and without decorator is used, we get the file with @@ -443,10 +443,10 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name, size_t const j = try_names.size (); switch (i) { - case 0: // Name + decorator + suffix - case 1: // Name + suffix - case 2: // Prefix + name + decorator + suffix - case 3: // Prefix + name + suffix + case 0: // Prefix + name + decorator + suffix + case 1: // Prefix + name + suffix + case 2: // Name + decorator + suffix + case 3: // Name + suffix if ( base_suffix.length () > 0 #if !(defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK)) @@ -455,7 +455,7 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name, ) break; try_this = base_dir; - if (i > 1) + if (i < 2) try_this += prefix; try_this += base_file; if (base_suffix.length () > 0) diff --git a/dep/acelite/ace/DLL_Manager.h b/dep/acelite/ace/DLL_Manager.h index 716e3299557..71d8f13c579 100644 --- a/dep/acelite/ace/DLL_Manager.h +++ b/dep/acelite/ace/DLL_Manager.h @@ -4,7 +4,7 @@ /** * @file DLL_Manager.h * - * $Id: DLL_Manager.h 91064 2010-07-12 10:11:24Z johnnyw $ + * $Id: DLL_Manager.h 95913 2012-06-21 17:14:36Z johnnyw $ * * @author Don Hinton */ @@ -68,14 +68,44 @@ public: const ACE_TCHAR *dll_name () const; /** - * This method opens and dynamically links @a dll_name. The default - * mode is @c RTLD_LAZY, which loads identifier symbols but not the - * symbols for functions, which are loaded dynamically on-demand. - * Other supported modes include: @c RTLD_NOW, which performs all - * necessary relocations when @a dll_name is first loaded and - * @c RTLD_GLOBAL, which makes symbols available for relocation - * processing of any other DLLs. Returns -1 on failure and 0 on - * success. + * This method opens and dynamically links a library/DLL. + * @param dll_name The filename or path of the DLL to load. ACE will + * attempt to apply the platform's standard library/DLL prefixes + * and suffixes, allowing a simple, unadorned name to be passed + * regardless of platform. The set of name transforms is listed + * below. A @i decorator is a platform's name designator for a debug + * vs release build. For example, on Windows it is usually "d". + * @li Prefix + name + decorator + suffix + * @li Prefix + name + suffix + * @li Name + decorator + suffix + * @li Name + suffix + * @li Name + * Note that the transforms with @i decorator will be avoided if + * ACE is built with the @c ACE_DISABLE_DEBUG_DLL_CHECK config macro. + * + * @Note There is another mode for locating library/DLL files that + * was used in old versions of ACE. The alternate method builds + * more combinations of pathname by combining the names transforms + * above with locations listed in the platform's standard "path" + * locations (e.g., @c LD_LIBRARY_PATH). It can be enabled by building + * ACE with the @c ACE_MUST_HELP_DLOPEN_SEARCH_PATH config macro. + * Use of this option is discouraged since it avoids the standard + * platform search options and security mechanisms. + * + * @param open_mode Flags to alter the actions taken when loading the DLL. + * The possible values are: + * @li @c RTLD_LAZY (this the default): loads identifier symbols but + * not the symbols for functions, which are loaded dynamically + * on demand. + * @li @c RTLD_NOW: performs all necessary relocations when + * @a dll_name is first loaded + * @li @c RTLD_GLOBAL: makes symbols available for relocation + * processing of any other DLLs. + * @param handle If a value other than @c ACE_INVALID_HANDLE is supplied, + * this object is assigned the specified handle instead of attempting + * to open the specified @a dll_name. + * @retval -1 On failure + * @retval 0 On success. */ int open (const ACE_TCHAR *dll_name, int open_mode, diff --git a/dep/acelite/ace/Default_Constants.h b/dep/acelite/ace/Default_Constants.h index c21c776eaa4..c15b7f9f40b 100644 --- a/dep/acelite/ace/Default_Constants.h +++ b/dep/acelite/ace/Default_Constants.h @@ -4,7 +4,7 @@ /** * @file Default_Constants.h * - * $Id: Default_Constants.h 91688 2010-09-09 11:21:50Z johnnyw $ + * $Id: Default_Constants.h 95517 2012-01-30 10:05:01Z sma $ * * @author Douglas C. Schmidt * @author Jesper S. M|ller @@ -392,7 +392,7 @@ /// Max udp packet size #if !defined (ACE_MAX_UDP_PACKET_SIZE) -#define ACE_MAX_UDP_PACKET_SIZE 65536 +#define ACE_MAX_UDP_PACKET_SIZE 65507 #endif /** diff --git a/dep/acelite/ace/Dev_Poll_Reactor.cpp b/dep/acelite/ace/Dev_Poll_Reactor.cpp index 5f18064ecbe..011fe7883a2 100644 --- a/dep/acelite/ace/Dev_Poll_Reactor.cpp +++ b/dep/acelite/ace/Dev_Poll_Reactor.cpp @@ -1,4 +1,4 @@ -// $Id: Dev_Poll_Reactor.cpp 92199 2010-10-11 11:58:35Z johnnyw $ +// $Id: Dev_Poll_Reactor.cpp 95738 2012-05-11 19:16:53Z shuston $ #include "ace/OS_NS_errno.h" #include "ace/Dev_Poll_Reactor.h" @@ -12,13 +12,13 @@ # include "ace/OS_NS_stropts.h" # if defined (ACE_HAS_DEV_POLL) -# if defined (linux) +# if defined (ACE_LINUX) # include /**/ # elif defined (HPUX_VERS) && HPUX_VERS < 1123 # include /**/ # else # include /**/ -# endif /* linux */ +# endif /* ACE_LINUX */ # endif /* ACE_HAS_DEV_POLL */ #if !defined (__ACE_INLINE__) @@ -39,6 +39,7 @@ #include "ace/Guard_T.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_sys_time.h" +#include "ace/Functor_T.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -801,12 +802,13 @@ ACE_Dev_Poll_Reactor::timer_queue (ACE_Timer_Queue *tq) { if (this->delete_timer_queue_) delete this->timer_queue_; + else if (this->timer_queue_) + this->timer_queue_->close (); this->timer_queue_ = tq; this->delete_timer_queue_ = false; return 0; - } ACE_Timer_Queue * @@ -858,6 +860,11 @@ ACE_Dev_Poll_Reactor::close (void) this->timer_queue_ = 0; this->delete_timer_queue_ = false; } + else if (this->timer_queue_) + { + this->timer_queue_->close (); + this->timer_queue_ = 0; + } if (this->notify_handler_ != 0) this->notify_handler_->close (); @@ -1007,7 +1014,10 @@ ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value *max_wait_time) return result; if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the mutex. ACE_MT (countdown.update ()); @@ -1087,37 +1097,10 @@ ACE_Dev_Poll_Reactor::dispatch (Token_Guard &guard) int ACE_Dev_Poll_Reactor::dispatch_timer_handler (Token_Guard &guard) { - if (this->timer_queue_->is_empty ()) - return 0; // Empty timer queue so cannot have any expired timers. + typedef ACE_Member_Function_Command Guard_Release; - // Get the current time - ACE_Time_Value cur_time (this->timer_queue_->gettimeofday () + - this->timer_queue_->timer_skew ()); - - // Look for a node in the timer queue whose timer <= the present - // time. - ACE_Timer_Node_Dispatch_Info info; - if (this->timer_queue_->dispatch_info (cur_time, info)) - { - const void *upcall_act = 0; - - // Preinvoke (handles refcount if needed, etc.) - this->timer_queue_->preinvoke (info, cur_time, upcall_act); - - // Release the token before expiration upcall. - guard.release_token (); - - // call the functor - this->timer_queue_->upcall (info, cur_time); - - // Postinvoke (undo refcount if needed, etc.) - this->timer_queue_->postinvoke (info, cur_time, upcall_act); - - // We have dispatched a timer - return 1; - } - - return 0; + Guard_Release release(guard, &Token_Guard::release_token); + return this->timer_queue_->expire_single(release); } #if 0 @@ -1950,7 +1933,7 @@ ACE_Dev_Poll_Reactor::resumable_handler (void) { // @@ Is this correct? - return 0; + return 1; } bool @@ -2395,8 +2378,8 @@ ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, // If a handle is closed, epoll removes it from the poll set // automatically - we may not know about it yet. If that's the // case, a mod operation will fail with ENOENT. Retry it as - // an add. - if (op == EPOLL_CTL_MOD && errno == ENOENT && + // an add. If it's any other failure, just fail outright. + if (op != EPOLL_CTL_MOD || errno != ENOENT || ::epoll_ctl (this->poll_fd_, EPOLL_CTL_ADD, handle, &epev) == -1) return -1; } diff --git a/dep/acelite/ace/Dev_Poll_Reactor.h b/dep/acelite/ace/Dev_Poll_Reactor.h index 00ae4c21801..b77d8b16a10 100644 --- a/dep/acelite/ace/Dev_Poll_Reactor.h +++ b/dep/acelite/ace/Dev_Poll_Reactor.h @@ -4,7 +4,7 @@ /** * @file Dev_Poll_Reactor.h * - * $Id: Dev_Poll_Reactor.h 91462 2010-08-25 20:29:17Z shuston $ + * $Id: Dev_Poll_Reactor.h 94549 2011-10-03 06:31:27Z johnnyw $ * * @c /dev/poll (or Linux @c sys_epoll) based Reactor implementation. * @@ -563,7 +563,7 @@ public: ACE_Event_Handler *event_handler, ACE_Reactor_Mask mask); - /// Register @a event_handler> with all the @a handles> in the @c + /// Register @a event_handler with all the @a handles in the @c /// Handle_Set. virtual int register_handler (const ACE_Handle_Set &handles, ACE_Event_Handler *event_handler, @@ -815,7 +815,7 @@ public: /// Wake up all threads waiting in the event loop. virtual void wakeup_all_threads (void); - /// Transfers ownership of Reactor_Impl to the new_owner. + /// Transfers ownership of Reactor_Impl to the @a new_owner. /** * @note There is no need to set the owner of the event loop for the * ACE_Dev_Poll_Reactor. Multiple threads may invoke the @@ -828,7 +828,7 @@ public: /** * @note There is no need to set the owner of the event loop for the * ACE_Dev_Poll_Reactor. Multiple threads may invoke the - * event loop simulataneously. As such, this method is a + * event loop simultaneously. As such, this method is a * no-op. */ virtual int owner (ACE_thread_t *owner); @@ -1123,7 +1123,7 @@ protected: /// 2) wait quietly for the token, not waking another thread. This /// is appropriate for cases where a thread wants to wait for and /// dispatch an event, not causing an existing waiter to relinquish the - /// token, and also queueing up behind other threads waiting to modify + /// token, and also queuing up behind other threads waiting to modify /// event records. int acquire_quietly (ACE_Time_Value *max_wait = 0); diff --git a/dep/acelite/ace/Dump.h b/dep/acelite/ace/Dump.h index 4ccd64adb95..fc1eca06dcd 100644 --- a/dep/acelite/ace/Dump.h +++ b/dep/acelite/ace/Dump.h @@ -4,7 +4,7 @@ /** * @file Dump.h * - * $Id: Dump.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Dump.h 94034 2011-05-09 19:11:03Z johnnyw $ * * * A prototype mechanism that allow all ACE objects to be registered @@ -149,7 +149,7 @@ private: /// and we'll have to check for that). const ACE_Dumpable_Ptr dumper_; - Tuple (void) : dumper_(0) {} + Tuple (void) : this_ (0), dumper_(0) {} }; /// Singleton instance of this class. diff --git a/dep/acelite/ace/Dynamic_Message_Strategy.h b/dep/acelite/ace/Dynamic_Message_Strategy.h index 090ad3a8f82..5ff102ef6ce 100644 --- a/dep/acelite/ace/Dynamic_Message_Strategy.h +++ b/dep/acelite/ace/Dynamic_Message_Strategy.h @@ -4,7 +4,7 @@ /** * @file Dynamic_Message_Strategy.h * - * $Id: Dynamic_Message_Strategy.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Dynamic_Message_Strategy.h 95839 2012-06-07 10:13:33Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -43,17 +43,15 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * priority field of 10 bits. This corresponds to the initial * values of the static class members. To provide a different * partitioning, assign a different set of values to the static - * class memebers before using the static member functions. + * class members before using the static member functions. */ class ACE_Export ACE_Dynamic_Message_Strategy { public: - // = Message priority status - - // Values are defined as bit flags so that status combinations may - // be specified easily. - + /// Message priority status + /// Values are defined as bit flags so that status combinations may + /// be specified easily. enum Priority_Status { /// Message can still make its deadline @@ -154,13 +152,13 @@ protected: class ACE_Export ACE_Deadline_Message_Strategy : public ACE_Dynamic_Message_Strategy { public: - /// Ctor, with all arguments defaulted. + /// Constructor with all arguments defaulted. ACE_Deadline_Message_Strategy (unsigned long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1 unsigned long static_bit_field_shift = 10, // 10 low order bits unsigned long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1 unsigned long dynamic_priority_offset = 0x200000UL); // 2^(22-1) - /// Virtual dtor. + /// Virtual destructor. virtual ~ACE_Deadline_Message_Strategy (void); /// Dynamic priority conversion function based on time to deadline. diff --git a/dep/acelite/ace/ETCL/ETCL_Constraint.cpp b/dep/acelite/ace/ETCL/ETCL_Constraint.cpp new file mode 100644 index 00000000000..638f7c50984 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Constraint.cpp @@ -0,0 +1,655 @@ +// -*- C++ -*- +// $Id: ETCL_Constraint.cpp 92173 2010-10-07 12:36:17Z olli $ + +#include "ace/ACE.h" + +#include "ace/ETCL/ETCL_Constraint.h" +#include "ace/ETCL/ETCL_Constraint_Visitor.h" + +#if ! defined (__ACE_INLINE__) +#include "ace/ETCL/ETCL_Constraint.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ETCL_Constraint::ETCL_Constraint (void) +{ +} + +ETCL_Constraint::~ETCL_Constraint (void) +{ +} + +int +ETCL_Constraint::accept (ETCL_Constraint_Visitor * /* visitor */) +{ + return 0; +} + +// **************************************************************** + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + const ETCL_Literal_Constraint & lit + ) + : ETCL_Constraint(), + type_ (ACE_ETCL_UNKNOWN) +{ + this->copy (lit); +} + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + ACE_CDR::ULong uinteger) : type_ (ACE_ETCL_UNSIGNED) +{ + this->op_.uinteger_ = uinteger; +} + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + ACE_CDR::Long integer) : type_ (ACE_ETCL_SIGNED) +{ + this->op_.integer_ = integer; +} + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + ACE_CDR::Boolean boolean + ) + : type_ (ACE_ETCL_BOOLEAN) +{ + this->op_.bool_ = boolean; +} + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + ACE_CDR::Double doub) : type_ (ACE_ETCL_DOUBLE) +{ + this->op_.double_ = doub; +} + +ETCL_Literal_Constraint::ETCL_Literal_Constraint ( + const char* str) : type_ (ACE_ETCL_STRING) +{ + this->op_.str_ = ACE::strnew (str); +} + +ETCL_Literal_Constraint::~ETCL_Literal_Constraint (void) +{ + if (this->type_ == ACE_ETCL_STRING) + { + ACE::strdelete (this->op_.str_); + } +} + +int +ETCL_Literal_Constraint::accept (ETCL_Constraint_Visitor* visitor) +{ + return visitor->visit_literal (this); +} + +Literal_Type +ETCL_Literal_Constraint::expr_type (void) const +{ + return this->type_; +} + +void +ETCL_Literal_Constraint::operator= (const ETCL_Literal_Constraint& co) +{ + this->copy (co); +} + +ETCL_Literal_Constraint::operator ACE_CDR::Boolean (void) const +{ + return (this->type_ == ACE_ETCL_BOOLEAN) ? this->op_.bool_ : false; +} + +ETCL_Literal_Constraint::operator ACE_CDR::ULong (void) const +{ + switch (this->type_) + { + case ACE_ETCL_UNSIGNED: + return this->op_.uinteger_; + case ACE_ETCL_SIGNED: + case ACE_ETCL_INTEGER: + return + (this->op_.integer_ > 0) ? (ACE_CDR::ULong) this->op_.integer_ : 0; + case ACE_ETCL_DOUBLE: + return + (this->op_.double_ > 0) ? + ((this->op_.double_ > ACE_UINT32_MAX) ? + ACE_UINT32_MAX : + (ACE_CDR::ULong) this->op_.double_) + : 0; + default: + return 0; + } +} + +ETCL_Literal_Constraint::operator ACE_CDR::Long (void) const +{ + switch (this->type_) + { + case ACE_ETCL_SIGNED: + case ACE_ETCL_INTEGER: + return this->op_.integer_; + case ACE_ETCL_UNSIGNED: + return + (this->op_.uinteger_ > (ACE_CDR::ULong) ACE_INT32_MAX) ? + ACE_INT32_MAX : (ACE_CDR::Long) this->op_.uinteger_; + case ACE_ETCL_DOUBLE: + return + (this->op_.double_ > 0) ? + ((this->op_.double_ > ACE_INT32_MAX) ? + ACE_INT32_MAX : + (ACE_CDR::Long) this->op_.double_) : + ((this->op_.double_ < ACE_INT32_MIN) ? + ACE_INT32_MIN : + (ACE_CDR::Long) this->op_.double_); + default: + return 0; + } +} + +ETCL_Literal_Constraint::operator ACE_CDR::Double (void) const +{ + switch (this->type_) + { + case ACE_ETCL_DOUBLE: + return this->op_.double_; + case ACE_ETCL_SIGNED: + case ACE_ETCL_INTEGER: + return (ACE_CDR::Double) this->op_.integer_; + case ACE_ETCL_UNSIGNED: + return (ACE_CDR::Double) this->op_.uinteger_; + default: + return 0.0; + } +} + +ETCL_Literal_Constraint::operator const char* (void) const +{ + switch (this->type_) + { + case ACE_ETCL_STRING: + return this->op_.str_; + default: + return 0; + } +} + +bool +ETCL_Literal_Constraint::operator== (const ETCL_Literal_Constraint & rhs) +{ + bool return_value = false; + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_STRING: + return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) == 0); + break; + case ACE_ETCL_DOUBLE: + return_value = ACE::is_equal ((ACE_CDR::Double) *this, (ACE_CDR::Double) rhs); + break; + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + return_value = (ACE_CDR::Long) *this == (ACE_CDR::Long) rhs; + break; + case ACE_ETCL_UNSIGNED: + return_value = (ACE_CDR::ULong) *this == (ACE_CDR::ULong) rhs; + break; + case ACE_ETCL_BOOLEAN: + return_value = (ACE_CDR::Boolean) *this == (ACE_CDR::Boolean) rhs; + break; + default: + break; + } + + return return_value; +} + +bool +ETCL_Literal_Constraint::operator< (const ETCL_Literal_Constraint & rhs) +{ + bool return_value = false; + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_STRING: + return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) < 0); + break; + case ACE_ETCL_DOUBLE: + return_value = (ACE_CDR::Double) *this < (ACE_CDR::Double) rhs; + break; + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + return_value = (ACE_CDR::Long) *this < (ACE_CDR::Long) rhs; + break; + case ACE_ETCL_UNSIGNED: + return_value = (ACE_CDR::ULong) *this < (ACE_CDR::ULong) rhs; + break; + case ACE_ETCL_BOOLEAN: + return_value = (ACE_CDR::Boolean) *this < (ACE_CDR::Boolean) rhs; + break; + default: + break; + } + + return return_value; +} + +bool +ETCL_Literal_Constraint::operator> (const ETCL_Literal_Constraint & rhs) +{ + bool return_value = false; + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_STRING: + return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) > 0); + break; + case ACE_ETCL_DOUBLE: + return_value = (ACE_CDR::Double) *this > (ACE_CDR::Double) rhs; + break; + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + return_value = (ACE_CDR::Long) *this > (ACE_CDR::Long) rhs; + break; + case ACE_ETCL_UNSIGNED: + return_value = (ACE_CDR::ULong) *this > (ACE_CDR::ULong) rhs; + break; + default: + break; + } + + return return_value; +} + +ETCL_Literal_Constraint +ETCL_Literal_Constraint::operator+ (const ETCL_Literal_Constraint & rhs) +{ + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_DOUBLE: + { + ACE_CDR::Double result = (ACE_CDR::Double) *this + (ACE_CDR::Double) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Double) result); + } + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + { + ACE_CDR::Long result = (ACE_CDR::Long) *this + (ACE_CDR::Long) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Long) result); + } + case ACE_ETCL_UNSIGNED: + { + ACE_CDR::ULong result = (ACE_CDR::ULong) *this + (ACE_CDR::ULong) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); + } + default: + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + } +} + +ETCL_Literal_Constraint +ETCL_Literal_Constraint::operator- (const ETCL_Literal_Constraint & rhs) +{ + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_DOUBLE: + { + ACE_CDR::Double result = (ACE_CDR::Double) *this - (ACE_CDR::Double) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Double) result); + } + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + { + ACE_CDR::Long result = (ACE_CDR::Long) *this - (ACE_CDR::Long) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Long) result); + } + case ACE_ETCL_UNSIGNED: + { + ACE_CDR::ULong result = (ACE_CDR::ULong) *this - (ACE_CDR::ULong) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); + } + default: + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + } +} + +ETCL_Literal_Constraint +ETCL_Literal_Constraint::operator* (const ETCL_Literal_Constraint & rhs) +{ + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_DOUBLE: + { + ACE_CDR::Double result = (ACE_CDR::Double) *this * (ACE_CDR::Double) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Double) result); + } + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + { + ACE_CDR::Long result = (ACE_CDR::Long) *this * (ACE_CDR::Long) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Long) result); + } + case ACE_ETCL_UNSIGNED: + { + ACE_CDR::ULong result = (ACE_CDR::ULong) *this * (ACE_CDR::ULong) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); + } + default: + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + } +} + +ETCL_Literal_Constraint +ETCL_Literal_Constraint::operator/ (const ETCL_Literal_Constraint & rhs) +{ + Literal_Type widest_type = this->widest_type (rhs); + + switch (widest_type) + { + case ACE_ETCL_DOUBLE: + { + if (ACE::is_equal ((ACE_CDR::Double) rhs, 0.0)) + return ETCL_Literal_Constraint ((ACE_CDR::Double) 0.0); + + ACE_CDR::Double result = (ACE_CDR::Double) *this / (ACE_CDR::Double) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Double) result); + } + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + { + if ((ACE_CDR::Long) rhs == 0) + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + + ACE_CDR::Long result = (ACE_CDR::Long) *this / (ACE_CDR::Long) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::Long) result); + } + case ACE_ETCL_UNSIGNED: + { + if ((ACE_CDR::ULong) rhs == 0) + return ETCL_Literal_Constraint ((ACE_CDR::ULong) 0); + + ACE_CDR::ULong result = (ACE_CDR::ULong) *this / (ACE_CDR::ULong) rhs; + return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); + } + default: + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + } +} + +ETCL_Literal_Constraint +ETCL_Literal_Constraint::operator- (void) +{ + switch (this->type_) + { + case ACE_ETCL_DOUBLE: + return ETCL_Literal_Constraint (- this->op_.double_); + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + return ETCL_Literal_Constraint (- this->op_.integer_); + case ACE_ETCL_UNSIGNED: + return ETCL_Literal_Constraint (- (ACE_CDR::Long) this->op_.uinteger_); + default: + return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); + } +} + +Literal_Type +ETCL_Literal_Constraint::widest_type (const ETCL_Literal_Constraint & rhs) +{ + Literal_Type rhs_type = rhs.expr_type (); + Literal_Type return_value = rhs_type; + + if (rhs_type != this->type_) + { + if (rhs_type > this->type_) + { + return_value = rhs_type; + } + else + { + return_value = this->type_; + } + } + + return return_value; +} + +void +ETCL_Literal_Constraint::copy (const ETCL_Literal_Constraint &lit) +{ + if (this->type_ == ACE_ETCL_STRING) + { + ACE::strdelete (this->op_.str_); + } + + this->type_ = lit.type_; + + switch (this->type_) + { + case ACE_ETCL_STRING: + this->op_.str_ = ACE::strnew (lit.op_.str_); + break; + case ACE_ETCL_DOUBLE: + this->op_.double_ = lit.op_.double_; + break; + case ACE_ETCL_UNSIGNED: + this->op_.uinteger_ = lit.op_.uinteger_; + break; + case ACE_ETCL_INTEGER: + case ACE_ETCL_SIGNED: + this->op_.integer_ = lit.op_.integer_; + break; + case ACE_ETCL_BOOLEAN: + this->op_.bool_ = lit.op_.bool_; + break; + default: + this->type_ = ACE_ETCL_UNKNOWN; + break; + } +} + +// **************************************************************** + +int +ETCL_Identifier::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_identifier (this); +} + +// **************************************************************** + +ETCL_Union_Value::~ETCL_Union_Value (void) +{ + delete this->string_; + delete this->integer_; +} + +int +ETCL_Union_Value::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_union_value (this); +} + +// **************************************************************** + +ETCL_Union_Pos::~ETCL_Union_Pos (void) +{ + delete this->component_; + delete this->union_value_; +} + +int +ETCL_Union_Pos::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_union_pos (this); +} + +// **************************************************************** + +ETCL_Component_Pos::~ETCL_Component_Pos (void) +{ + delete this->component_; + delete this->integer_; +} + +int +ETCL_Component_Pos::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_component_pos (this); +} + +// **************************************************************** + +ETCL_Component_Assoc::~ETCL_Component_Assoc (void) +{ + delete this->component_; + delete this->identifier_; +} + +int +ETCL_Component_Assoc::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_component_assoc (this); +} + +// **************************************************************** + +ETCL_Component_Array::~ETCL_Component_Array (void) +{ + delete this->component_; + delete this->integer_; +} + +int +ETCL_Component_Array::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_component_array (this); +} + +// **************************************************************** + +ETCL_Special::~ETCL_Special (void) +{} + +int +ETCL_Special::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_special (this); +} + +// **************************************************************** + +ETCL_Component::~ETCL_Component (void) +{ + delete this->component_; + delete this->identifier_; +} + +int +ETCL_Component::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_component (this); +} + +// **************************************************************** + +ETCL_Dot::~ETCL_Dot (void) +{ + delete this->component_; +} + +int +ETCL_Dot::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_dot (this); +} + +// **************************************************************** + +ETCL_Eval::~ETCL_Eval (void) +{ + delete this->component_; +} + +int +ETCL_Eval::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_eval (this); +} + +// **************************************************************** + +ETCL_Default::~ETCL_Default (void) +{ + delete this->component_; +} + +int +ETCL_Default::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_default (this); +} + +// **************************************************************** + +ETCL_Exist::~ETCL_Exist (void) +{ + delete this->component_; +} + +int +ETCL_Exist::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_exist (this); +} + +// **************************************************************** + +ETCL_Unary_Expr::~ETCL_Unary_Expr (void) +{ + delete this->subexpr_; +} + +int +ETCL_Unary_Expr::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_unary_expr (this); +} + +// **************************************************************** + +ETCL_Binary_Expr::~ETCL_Binary_Expr (void) +{ + delete this->lhs_; + delete this->rhs_; +} + +int +ETCL_Binary_Expr::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_binary_expr (this); +} + +// **************************************************************** + +ETCL_Preference::~ETCL_Preference (void) +{ + delete this->subexpr_; +} + +int +ETCL_Preference::accept (ETCL_Constraint_Visitor *visitor) +{ + return visitor->visit_preference (this); +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/ETCL/ETCL_Constraint.h b/dep/acelite/ace/ETCL/ETCL_Constraint.h new file mode 100644 index 00000000000..0762d190880 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Constraint.h @@ -0,0 +1,416 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ETCL_Constraint.h + * + * $Id: ETCL_Constraint.h 94030 2011-05-08 17:58:47Z johnnyw $ + * + * @author Carlos O'Ryan (coryan@cs.wustl.edu) + * @author Jeff Parsons (j.parsons@vanderbilt.edu) + */ +//============================================================================= + +#ifndef ACE_ETCL_CONSTRAINT_H +#define ACE_ETCL_CONSTRAINT_H + +#include /**/ "ace/pre.h" + +#include "ace/SString.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/CDR_Base.h" + +#include "ace/ETCL/ace_etcl_export.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +typedef unsigned long Literal_Type; + +class ETCL_Constraint_Visitor; + +class ACE_ETCL_Export ETCL_Constraint +{ +public: + /// Constructor and destructor + ETCL_Constraint (void); + virtual ~ETCL_Constraint (void); + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +protected: + enum + { + ACE_ETCL_STRING, + ACE_ETCL_DOUBLE, + ACE_ETCL_UNSIGNED, + ACE_ETCL_SIGNED, + ACE_ETCL_INTEGER, + ACE_ETCL_BOOLEAN, + ACE_ETCL_COMPONENT, + ACE_ETCL_UNKNOWN + }; +}; + +// **************************************************************** + +class ACE_ETCL_Export ETCL_Literal_Constraint + : public ETCL_Constraint +{ +public: + ETCL_Literal_Constraint (void); + + // = Constructors for each of the various types of literals. + + explicit ETCL_Literal_Constraint (ACE_CDR::ULong uinteger); + explicit ETCL_Literal_Constraint (ACE_CDR::Long integer); + explicit ETCL_Literal_Constraint (ACE_CDR::Boolean boolean); + explicit ETCL_Literal_Constraint (ACE_CDR::Double doub); + explicit ETCL_Literal_Constraint (const char* str); + + /// Copy constructor + ETCL_Literal_Constraint (const ETCL_Literal_Constraint& lit); + + /// Destructor. + virtual ~ETCL_Literal_Constraint(void); + + /// Visitor accept method. + virtual int accept (ETCL_Constraint_Visitor* visitor); + + Literal_Type expr_type (void) const; + + /// Assignment operator. + void operator= (const ETCL_Literal_Constraint& co); + + // Conversion routines. + operator ACE_CDR::Boolean (void) const; + operator ACE_CDR::ULong (void) const; + operator ACE_CDR::Long (void) const; + operator ACE_CDR::Double (void) const; + operator const char* (void) const; + + // Return the type represented by this MysteryOperand. + + // = Boolean operators. + + bool + operator< (const ETCL_Literal_Constraint& rhs); + + bool + operator<= (const ETCL_Literal_Constraint& rhs); + + bool + operator> (const ETCL_Literal_Constraint& rhs); + + bool + operator>= (const ETCL_Literal_Constraint& rhs); + + bool + operator== (const ETCL_Literal_Constraint& rhs); + + bool + operator!= (const ETCL_Literal_Constraint& rhs); + + // = Arithmetic operators. + + ETCL_Literal_Constraint + operator+ (const ETCL_Literal_Constraint& rhs); + + ETCL_Literal_Constraint + operator- (const ETCL_Literal_Constraint& rhs); + + ETCL_Literal_Constraint + operator* (const ETCL_Literal_Constraint& rhs); + + ETCL_Literal_Constraint + operator/ (const ETCL_Literal_Constraint& rhs); + + // Unary minus. + ETCL_Literal_Constraint + operator- (void); + + /// Ensure both operands are of the same simple numeric type. + virtual Literal_Type + widest_type (const ETCL_Literal_Constraint& rhs); + +protected: + /// Private copy method. + void copy (const ETCL_Literal_Constraint& co); + + /// Union of the possible literal types. + union + { + char* str_; + ACE_CDR::ULong uinteger_; + ACE_CDR::Long integer_; + ACE_CDR::Boolean bool_; + ACE_CDR::Double double_; + } op_; + + /// The actual types of the ETCL_Literal_Constraint. + Literal_Type type_; +}; + +// **************************************************************** + +class ACE_ETCL_Export ETCL_Identifier : public ETCL_Constraint +{ +public: + ETCL_Identifier (const char *value); + + /// Get the value + const char *value (void) const; + + // = The Constraint methods. + int accept (ETCL_Constraint_Visitor *visitor); + +private: + /// The value + ACE_CString string_; +}; + +// **************************************************************** + +class ACE_ETCL_Export ETCL_Union_Value : public ETCL_Constraint +{ +public: + ETCL_Union_Value (int sign, + ETCL_Constraint *integer); + explicit ETCL_Union_Value (ETCL_Constraint *string = 0); + virtual ~ETCL_Union_Value (void); + + int sign (void) const; + ETCL_Literal_Constraint *integer (void) const; + ETCL_Literal_Constraint *string (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + int sign_; + ETCL_Literal_Constraint *integer_; + ETCL_Literal_Constraint *string_; +}; + +class ACE_ETCL_Export ETCL_Union_Pos : public ETCL_Constraint +{ +public: + ETCL_Union_Pos (ETCL_Constraint *union_value = 0, + ETCL_Constraint *component = 0); + virtual ~ETCL_Union_Pos (void); + + ETCL_Union_Value *union_value (void) const; + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Union_Value *union_value_; + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Component_Pos : public ETCL_Constraint +{ +public: + ETCL_Component_Pos (ETCL_Constraint *integer = 0, + ETCL_Constraint *component = 0); + virtual ~ETCL_Component_Pos (void); + + ETCL_Literal_Constraint *integer (void) const; + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Literal_Constraint *integer_; + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Component_Assoc : public ETCL_Constraint +{ +public: + ETCL_Component_Assoc (ETCL_Constraint *identifier = 0, + ETCL_Constraint *component = 0); + virtual ~ETCL_Component_Assoc (void); + + ETCL_Identifier *identifier (void) const; + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Identifier *identifier_; + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Component_Array : public ETCL_Constraint +{ +public: + ETCL_Component_Array (ETCL_Constraint *integer = 0, + ETCL_Constraint *component = 0); + virtual ~ETCL_Component_Array (void); + + ETCL_Literal_Constraint *integer (void) const; + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Literal_Constraint *integer_; + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Special : public ETCL_Constraint +{ +public: + ETCL_Special (void); + ETCL_Special (int type); + virtual ~ETCL_Special (void); + + int type (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + int type_; +}; + +class ACE_ETCL_Export ETCL_Component : public ETCL_Constraint +{ +public: + ETCL_Component (ETCL_Constraint *identifier = 0, + ETCL_Constraint *component = 0); + virtual ~ETCL_Component (void); + + ETCL_Identifier *identifier (void) const; + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Identifier *identifier_; + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Dot : public ETCL_Constraint +{ +public: + explicit ETCL_Dot (ETCL_Constraint *component = 0); + virtual ~ETCL_Dot (void); + + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Eval : public ETCL_Constraint +{ +public: + explicit ETCL_Eval (ETCL_Constraint *component = 0); + virtual ~ETCL_Eval (void); + + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Default : public ETCL_Constraint +{ +public: + explicit ETCL_Default (ETCL_Constraint *component = 0); + virtual ~ETCL_Default (void); + + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Exist : public ETCL_Constraint +{ +public: + explicit ETCL_Exist (ETCL_Constraint *component = 0); + virtual ~ETCL_Exist (void); + + ETCL_Constraint *component (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + ETCL_Constraint *component_; +}; + +class ACE_ETCL_Export ETCL_Unary_Expr : public ETCL_Constraint +{ +public: + ETCL_Unary_Expr (int type, + ETCL_Constraint *subexpr); + virtual ~ETCL_Unary_Expr (void); + + int type (void) const; + ETCL_Constraint *subexpr (void) const; + + int accept (ETCL_Constraint_Visitor *visitor); + +private: + int type_; + ETCL_Constraint *subexpr_; +}; + +class ACE_ETCL_Export ETCL_Binary_Expr : public ETCL_Constraint +{ +public: + ETCL_Binary_Expr (int type, + ETCL_Constraint *lhs, + ETCL_Constraint *rhs); + virtual ~ETCL_Binary_Expr (void); + + int type (void) const; + ETCL_Constraint *rhs (void) const; + ETCL_Constraint *lhs (void) const; + + int accept (ETCL_Constraint_Visitor *visitor); + +private: + int type_; + ETCL_Constraint *lhs_; + ETCL_Constraint *rhs_; +}; + +class ACE_ETCL_Export ETCL_Preference : public ETCL_Constraint +{ +public: + ETCL_Preference (void); + ETCL_Preference (int type, + ETCL_Constraint *subexpr = 0); + virtual ~ETCL_Preference (void); + + int type (void) const; + ETCL_Constraint *subexpr (void) const; + + virtual int accept (ETCL_Constraint_Visitor *visitor); + +private: + int type_; + ETCL_Constraint *subexpr_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "ace/ETCL/ETCL_Constraint.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" + +#endif // ACE_ETCL_CONSTRAINT_H diff --git a/dep/acelite/ace/ETCL/ETCL_Constraint.inl b/dep/acelite/ace/ETCL/ETCL_Constraint.inl new file mode 100644 index 00000000000..a56cf39aa46 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Constraint.inl @@ -0,0 +1,349 @@ +// -*- C++ -*- +// $Id: ETCL_Constraint.inl 95595 2012-03-07 13:33:25Z johnnyw $ + +// **************************************************************** + +ACE_INLINE +ETCL_Literal_Constraint::ETCL_Literal_Constraint (void) + : type_ (ACE_ETCL_UNKNOWN) +{ +} + +// **************************************************************** + +ACE_INLINE +ETCL_Identifier::ETCL_Identifier (const char *value) + : string_ (value) +{ +} + +ACE_INLINE const char * +ETCL_Identifier::value (void) const +{ + return this->string_.c_str (); +} + + +// **************************************************************** + +ACE_INLINE +ETCL_Union_Value::ETCL_Union_Value (int sign, + ETCL_Constraint *integer) + : sign_ (sign), + string_ (0) +{ + this->integer_ = + dynamic_cast (integer); +} + +ACE_INLINE +ETCL_Union_Value::ETCL_Union_Value (ETCL_Constraint *string) + : sign_ (0), + integer_ (0) +{ + this->string_ = + dynamic_cast (string); +} + +ACE_INLINE int +ETCL_Union_Value::sign (void) const +{ + return this->sign_; +} + +ACE_INLINE ETCL_Literal_Constraint * +ETCL_Union_Value::integer (void) const +{ + return this->integer_; +} + +ACE_INLINE ETCL_Literal_Constraint * +ETCL_Union_Value::string (void) const +{ + return this->string_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Union_Pos::ETCL_Union_Pos (ETCL_Constraint *union_value, + ETCL_Constraint *component) + : component_ (component) +{ + this->union_value_ = + dynamic_cast (union_value); +} + +ACE_INLINE ETCL_Union_Value * +ETCL_Union_Pos::union_value (void) const +{ + return this->union_value_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Union_Pos::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Component_Pos::ETCL_Component_Pos ( + ETCL_Constraint *integer, + ETCL_Constraint *component) + : component_ (component) +{ + this->integer_ = + dynamic_cast (integer); +} + +ACE_INLINE ETCL_Literal_Constraint * +ETCL_Component_Pos::integer (void) const +{ + return this->integer_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Component_Pos::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Component_Assoc::ETCL_Component_Assoc ( + ETCL_Constraint *identifier, + ETCL_Constraint *component) + : component_ (component) +{ + this->identifier_ = + dynamic_cast (identifier); +} + +ACE_INLINE ETCL_Identifier * +ETCL_Component_Assoc::identifier (void) const +{ + return this->identifier_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Component_Assoc::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Component_Array::ETCL_Component_Array ( + ETCL_Constraint *integer, + ETCL_Constraint *component) + : component_ (component) +{ + this->integer_ = + dynamic_cast (integer); +} + +ACE_INLINE ETCL_Literal_Constraint * +ETCL_Component_Array::integer (void) const +{ + return this->integer_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Component_Array::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Special::ETCL_Special (void) + : type_ (0) +{} + +ACE_INLINE +ETCL_Special::ETCL_Special (int type) + : type_ (type) +{} + +ACE_INLINE int +ETCL_Special::type (void) const +{ + return this->type_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Component::ETCL_Component (ETCL_Constraint *identifier, + ETCL_Constraint *component) + : component_ (component) +{ + this->identifier_ = + dynamic_cast (identifier); +} + +ACE_INLINE ETCL_Identifier * +ETCL_Component::identifier (void) const +{ + return this->identifier_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Component::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Dot::ETCL_Dot (ETCL_Constraint *component) + : component_ (component) +{ +} + +ACE_INLINE ETCL_Constraint * +ETCL_Dot::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Eval::ETCL_Eval (ETCL_Constraint *component) + : component_ (component) +{ +} + +ACE_INLINE ETCL_Constraint * +ETCL_Eval::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Default::ETCL_Default (ETCL_Constraint *component) + : component_ (component) +{ +} + +ACE_INLINE ETCL_Constraint * +ETCL_Default::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Exist::ETCL_Exist (ETCL_Constraint *component) + : component_ (component) +{ +} + +ACE_INLINE ETCL_Constraint * +ETCL_Exist::component (void) const +{ + return this->component_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Unary_Expr::ETCL_Unary_Expr (int type, + ETCL_Constraint *subexpr) + : type_ (type), + subexpr_ (subexpr) +{} + +ACE_INLINE int +ETCL_Unary_Expr::type (void) const +{ + return this->type_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Unary_Expr::subexpr (void) const +{ + return this->subexpr_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Binary_Expr::ETCL_Binary_Expr (int type, + ETCL_Constraint *lhs, + ETCL_Constraint *rhs) + : type_ (type), + lhs_ (lhs), + rhs_ (rhs) +{} + +ACE_INLINE int +ETCL_Binary_Expr::type (void) const +{ + return this->type_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Binary_Expr::rhs (void) const +{ + return this->rhs_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Binary_Expr::lhs (void) const +{ + return this->lhs_; +} + +// **************************************************************** + +ACE_INLINE +ETCL_Preference::ETCL_Preference (void) +{} + +ACE_INLINE +ETCL_Preference::ETCL_Preference (int type, + ETCL_Constraint *subexpr) + : type_ (type), + subexpr_ (subexpr) +{} + +ACE_INLINE int +ETCL_Preference::type (void) const +{ + return this->type_; +} + +ACE_INLINE ETCL_Constraint * +ETCL_Preference::subexpr (void) const +{ + return this->subexpr_; +} + +ACE_INLINE bool +ETCL_Literal_Constraint::operator!= (const ETCL_Literal_Constraint & rhs) +{ + return !(*this == rhs); +} + +ACE_INLINE bool +ETCL_Literal_Constraint::operator<= (const ETCL_Literal_Constraint & rhs) +{ + return !(*this > rhs); +} + +ACE_INLINE bool +ETCL_Literal_Constraint::operator>= (const ETCL_Literal_Constraint & rhs) +{ + return !(*this < rhs); +} diff --git a/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp b/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp new file mode 100644 index 00000000000..66dbd8d09b8 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp @@ -0,0 +1,117 @@ +// -*- C++ -*- +//============================================================================= +/** + * @file ETCL_Constraint_Visitor.cpp + * + * $Id: ETCL_Constraint_Visitor.cpp 81653 2008-05-08 21:08:49Z parsons $ + * + * @author Jeff Parsons + */ +//============================================================================= + +#include "ace/ETCL/ETCL_Constraint_Visitor.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ETCL_Constraint_Visitor::~ETCL_Constraint_Visitor (void) +{ +} + +int +ETCL_Constraint_Visitor::visit_literal (ETCL_Literal_Constraint *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_identifier (ETCL_Identifier *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_union_value (ETCL_Union_Value *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_union_pos (ETCL_Union_Pos *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_component_pos (ETCL_Component_Pos *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_component_assoc (ETCL_Component_Assoc *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_component_array (ETCL_Component_Array *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_special (ETCL_Special *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_component (ETCL_Component *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_dot (ETCL_Dot *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_eval (ETCL_Eval *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_default (ETCL_Default *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_exist (ETCL_Exist *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_unary_expr (ETCL_Unary_Expr *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_binary_expr (ETCL_Binary_Expr *) +{ + return 0; +} + +int +ETCL_Constraint_Visitor::visit_preference (ETCL_Preference *) +{ + return 0; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + diff --git a/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.h b/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.h new file mode 100644 index 00000000000..2337f60e8c4 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Constraint_Visitor.h @@ -0,0 +1,70 @@ +// -*- C++ -*- +//============================================================================= +/** + * @file ETCL_Constraint_Visitor.h + * + * $Id: ETCL_Constraint_Visitor.h 81653 2008-05-08 21:08:49Z parsons $ + * + * @author Carlos O'Ryan + * @author Jeff Parsons + */ +//============================================================================= + +#ifndef ACE_ETCL_CONSTRAINT_VISITOR_H +#define ACE_ETCL_CONSTRAINT_VISITOR_H + +#include /**/ "ace/pre.h" + +#include "ace/ETCL/ace_etcl_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ETCL_Literal_Constraint; +class ETCL_Identifier; +class ETCL_Union_Value; +class ETCL_Union_Pos; +class ETCL_Component_Pos; +class ETCL_Component_Assoc; +class ETCL_Component_Array; +class ETCL_Special; +class ETCL_Component; +class ETCL_Dot; +class ETCL_Eval; +class ETCL_Default; +class ETCL_Exist; +class ETCL_Unary_Expr; +class ETCL_Binary_Expr; +class ETCL_Preference; + +class ACE_ETCL_Export ETCL_Constraint_Visitor +{ +public: + virtual ~ETCL_Constraint_Visitor (void); + + virtual int visit_literal (ETCL_Literal_Constraint *); + virtual int visit_identifier (ETCL_Identifier *); + virtual int visit_union_value (ETCL_Union_Value *); + virtual int visit_union_pos (ETCL_Union_Pos *); + virtual int visit_component_pos (ETCL_Component_Pos *); + virtual int visit_component_assoc (ETCL_Component_Assoc *); + virtual int visit_component_array (ETCL_Component_Array *); + virtual int visit_special (ETCL_Special *); + virtual int visit_component (ETCL_Component *); + virtual int visit_dot (ETCL_Dot *); + virtual int visit_eval (ETCL_Eval *); + virtual int visit_default (ETCL_Default *); + virtual int visit_exist (ETCL_Exist *); + virtual int visit_unary_expr (ETCL_Unary_Expr *); + virtual int visit_binary_expr (ETCL_Binary_Expr *); + virtual int visit_preference (ETCL_Preference *); +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#endif // ACE_ETCL_CONSTRAINT_VISITOR_H diff --git a/dep/acelite/ace/ETCL/ETCL_Interpreter.cpp b/dep/acelite/ace/ETCL/ETCL_Interpreter.cpp new file mode 100644 index 00000000000..727bd264672 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Interpreter.cpp @@ -0,0 +1,113 @@ +// -*- C++ -*- +// $Id: ETCL_Interpreter.cpp 91813 2010-09-17 07:52:52Z johnnyw $ + +#include "ace/Guard_T.h" +#include "ace/Truncate.h" + +#include "ace/ETCL/ETCL_Interpreter.h" +#include "ace/ETCL/ETCL_Constraint.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ETCL_Parser_Export ACE_SYNCH_MUTEX ETCL_Interpreter::parserMutex__; + +ETCL_Interpreter::ETCL_Interpreter (void) + : root_ (0) +{ +} + +ETCL_Interpreter::~ETCL_Interpreter (void) +{ + delete this->root_; +} + +int +ETCL_Interpreter::build_tree (const char* constraints) +{ + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, + guard, + ETCL_Interpreter::parserMutex__, + -1); + + Lex_String_Input::reset ((char*)constraints); + + yyval.constraint = 0; + int return_value = ::yyparse (); + + if (return_value == 0 && yyval.constraint != 0) + { + this->root_ = yyval.constraint; + } + else + { + this->root_ = 0; + } + + return return_value; +} + +int +ETCL_Interpreter::is_empty_string (const char* str) +{ + int return_value = 0; + + if (str != 0) + { + int i = 0; + + while (str[i] != '\0') + { + if (str[i] != ' ') + { + break; + } + + ++i; + } + + if (str[i] == '\0') + { + return_value = 1; + } + } + + return return_value; +} + +char* Lex_String_Input::string_ = 0; +char* Lex_String_Input::current_ = 0; +char* Lex_String_Input::end_ = 0; + +// Routine to have Lex read its input from the constraint string. + +int +Lex_String_Input::copy_into (char* buf, + int max_size) +{ + int const chars_left = + ACE_Utils::truncate_cast ( + Lex_String_Input::end_ - Lex_String_Input::current_); + + int const n = max_size > chars_left ? chars_left : max_size; + + if (n > 0) + { + ACE_OS::memcpy (buf, + Lex_String_Input::current_, + n); + Lex_String_Input::current_ += n; + } + + return n; +} + +void +Lex_String_Input::reset (char* input_string) +{ + Lex_String_Input::string_ = input_string; + Lex_String_Input::current_ = input_string; + Lex_String_Input::end_ = + input_string + ACE_OS::strlen (Lex_String_Input::string_); +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/ETCL/ETCL_Interpreter.h b/dep/acelite/ace/ETCL/ETCL_Interpreter.h new file mode 100644 index 00000000000..8553c9b3309 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_Interpreter.h @@ -0,0 +1,117 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file ETCL_Interpreter.h + * + * $Id: ETCL_Interpreter.h 82434 2008-07-28 11:40:36Z johnnyw $ + * + * @author Jeff Parsons based on previous work by + * @author Seth Widoff + */ +//============================================================================= + + +#ifndef ETCL_INTERPRETER_H +#define ETCL_INTERPRETER_H + +#include /**/ "ace/pre.h" + +#include "ace/Thread_Mutex.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Synch_Traits.h" + +#include "etcl_parser_export.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ETCL_Constraint; + +ACE_END_VERSIONED_NAMESPACE_DECL + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ETCL_Interpreter + * + * @brief ETCL_Interpreter is the superclass for all ETCL interpreters. + * Its build tree method invokes the yacc parser to parse a constraint + * or preference string. + */ +class ETCL_Parser_Export ETCL_Interpreter +{ +protected: + // = Initialization and termination methods. + /// Constructor. + ETCL_Interpreter (void); + + /// Destructor. + virtual ~ETCL_Interpreter (void); + + /// Using the Yacc generated parser, construct an expression tree + /// representing @a constraints from the tokens returned by it. + int build_tree (const char* constraints); + + static int is_empty_string (const char* str); + + /// The root of the expression tree, not equal to null if build_tree + /// successfully builds a tree from the constraints. + ETCL_Constraint* root_; +private: + /// This mutex protects the method from reentrance. + static ACE_SYNCH_MUTEX parserMutex__; +}; + + +// Functions we need for parsing. +extern int yyparse (void); +extern void yyrestart (FILE*); +extern int yylex (void); + +// Have yylex read from the constraint string, not from stdin. +#undef YY_INPUT +#define YY_INPUT(b, r, ms) (r = Lex_String_Input::copy_into(b, ms)) + +/** + * @class Lex_String_Input + * + * @brief Have Lex read from a string and not from stdin. Essentially, + * the interpreter needs to call yylex() until EOF, and call + * TAO_Lex_String_Input::reset() with the new string, prior to + * calling yyparse. + */ +class Lex_String_Input +{ +public: + /// Reset the lex input. + static void reset (char* input_string); + + /// Method lex will call to read from the input string. + static int copy_into (char* buf, int max_size); + +private: + + /// Pointers to keep track of the input string. + static char* string_; + static char* current_; + static char* end_; +}; + +/// The union used by lex and bison to build the Abstract Syntax Tree. +typedef union +{ + ACE_VERSIONED_NAMESPACE_NAME::ETCL_Constraint* constraint; +} YYSTYPE; + +extern YYSTYPE yylval; +extern YYSTYPE yyval; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#endif // ETCL_INTERPRETER_H diff --git a/dep/acelite/ace/ETCL/ETCL_l.cpp b/dep/acelite/ace/ETCL/ETCL_l.cpp new file mode 100644 index 00000000000..ed985de0035 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_l.cpp @@ -0,0 +1,1877 @@ + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + +#include "ace/ETCL/ETCL_Constraint.h" + +#ifdef __cplusplus + +#include "ace/OS_NS_unistd.h" +#include "ace/OS_NS_stdio.h" + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define 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 + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state +{ + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 +}; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 41 +#define YY_END_OF_BUFFER 42 +static yyconst short int yy_accept[118] = + { 0, + 0, 0, 42, 40, 39, 41, 40, 24, 40, 22, + 23, 14, 12, 13, 25, 15, 35, 16, 40, 18, + 38, 38, 38, 31, 40, 32, 40, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 11, 21, 0, + 37, 0, 36, 0, 35, 17, 20, 19, 38, 38, + 38, 38, 27, 0, 0, 0, 38, 38, 38, 38, + 10, 38, 38, 38, 9, 38, 38, 0, 0, 38, + 38, 38, 0, 0, 0, 8, 38, 38, 38, 2, + 1, 7, 38, 38, 0, 36, 38, 33, 0, 0, + 0, 38, 38, 38, 38, 5, 34, 0, 0, 0, + + 38, 6, 3, 38, 0, 0, 0, 38, 4, 30, + 0, 0, 26, 0, 28, 29, 0 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 1, 1, 5, 1, 1, 6, 7, + 8, 9, 10, 1, 11, 12, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, + 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, + 19, 19, 19, 19, 19, 22, 19, 19, 19, 19, + 19, 23, 24, 25, 26, 19, 19, 19, 19, 19, + 27, 28, 29, 1, 30, 1, 31, 19, 19, 32, + + 33, 34, 35, 36, 37, 19, 19, 38, 39, 40, + 41, 42, 19, 43, 44, 45, 46, 19, 47, 48, + 49, 19, 1, 1, 1, 50, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[51] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 1, 1, 1, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 + } ; + +static yyconst short int yy_base[122] = + { 0, + 0, 0, 146, 147, 147, 147, 129, 147, 45, 147, + 147, 147, 147, 147, 130, 147, 40, 127, 126, 125, + 0, 122, 116, 147, 0, 147, 21, 98, 104, 88, + 98, 94, 24, 92, 89, 100, 93, 147, 147, 50, + 147, 51, 48, 115, 46, 147, 147, 147, 0, 106, + 101, 0, 147, 93, 92, 75, 91, 88, 84, 77, + 0, 71, 78, 72, 0, 76, 70, 57, 60, 90, + 93, 0, 72, 69, 68, 0, 78, 64, 63, 0, + 0, 0, 74, 69, 90, 89, 82, 0, 66, 59, + 66, 52, 52, 51, 54, 0, 0, 49, 49, 54, + + 45, 0, 0, 43, 44, 47, 39, 30, 0, 147, + 35, 37, 0, 35, 147, 147, 147, 85, 87, 62, + 89 + } ; + +static yyconst short int yy_def[122] = + { 0, + 117, 1, 117, 117, 117, 117, 117, 117, 118, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 119, 119, 119, 117, 120, 117, 117, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 117, 117, 118, + 117, 117, 117, 117, 117, 117, 117, 117, 119, 119, + 119, 121, 117, 117, 117, 117, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 118, 117, 119, + 119, 121, 117, 117, 117, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 117, 117, 119, 119, 117, 117, + 117, 119, 119, 119, 119, 119, 119, 117, 117, 117, + + 119, 119, 119, 119, 117, 117, 117, 119, 119, 117, + 117, 117, 119, 117, 117, 117, 0, 117, 117, 117, + 117 + } ; + +static yyconst short int yy_nxt[198] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, + 22, 21, 21, 21, 23, 21, 24, 25, 26, 27, + 28, 29, 30, 31, 21, 21, 32, 21, 33, 34, + 35, 21, 36, 21, 21, 21, 37, 21, 21, 38, + 41, 44, 53, 45, 62, 41, 68, 44, 54, 45, + 63, 43, 41, 55, 52, 56, 116, 69, 115, 85, + 85, 114, 42, 86, 113, 112, 111, 42, 68, 110, + 69, 109, 108, 107, 42, 40, 40, 40, 49, 49, + 72, 72, 106, 105, 104, 103, 102, 101, 100, 99, + + 98, 97, 86, 86, 96, 95, 94, 93, 92, 91, + 90, 89, 88, 87, 84, 83, 82, 81, 80, 79, + 78, 77, 76, 75, 74, 73, 71, 70, 43, 67, + 66, 65, 64, 61, 60, 59, 58, 57, 51, 50, + 48, 47, 46, 43, 39, 117, 3, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117 + + } ; + +static yyconst short int yy_chk[198] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 9, 17, 27, 17, 33, 40, 42, 45, 27, 45, + 33, 43, 68, 27, 120, 27, 114, 43, 112, 69, + 69, 111, 9, 69, 108, 107, 106, 40, 42, 105, + 43, 104, 101, 100, 68, 118, 118, 118, 119, 119, + 121, 121, 99, 98, 95, 94, 93, 92, 91, 90, + + 89, 87, 86, 85, 84, 83, 79, 78, 77, 75, + 74, 73, 71, 70, 67, 66, 64, 63, 62, 60, + 59, 58, 57, 56, 55, 54, 51, 50, 44, 37, + 36, 35, 34, 32, 31, 30, 29, 28, 23, 22, + 20, 19, 18, 15, 7, 3, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117 + + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 + +ACE_END_VERSIONED_NAMESPACE_DECL + +//============================================================================= +/** + * @file ETCL_l.cpp + * + * $Id: ETCL_l.cpp 93651 2011-03-28 08:49:11Z johnnyw $ + * + * @author Carlos O'Ryan based on previous work by Seth Widoff + */ +//============================================================================= + + +#include "ace/ETCL/ETCL_Interpreter.h" +#include "ace/ETCL/ETCL_y.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +static const char* extract_string(char*); +//static const char * extract_string(char*); + +#define YY_LEX_DEBUG + +#ifdef CONSTRAINT_DEBUG +#define YY_LEX_DEBUG ACE_OS::fprintf(stderr, "%s\n", yytext) +#endif /* CONSTRAINT_DEBUG */ + +//#define YY_DECL int ETCL_yylex (ETCL_YYSTYPE *lvalp, void* state) + +#define YY_BREAK +#define YY_NO_UNPUT + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +ACE_END_VERSIONED_NAMESPACE_DECL + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +//FUZZ: disable check_for_lack_ACE_OS +#ifndef ETCL_ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ETCL_ECHO { size_t __dum_ret = fwrite( yytext, yyleng, 1, yyout ); (void) __dum_ret; } +#endif + //FUZZ: enable check_for_lack_ACE_OS + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = ACE_OS::getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = ACE_OS::fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp = 0; + register char *yy_bp = 0; + register int yy_act; + +//#line 50 "ETCL/ETCL.ll" + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 118 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 147 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +//#line 52 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_MIN; } + YY_BREAK +case 2: +YY_RULE_SETUP +//#line 53 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_MAX; } + YY_BREAK +case 3: +YY_RULE_SETUP +//#line 54 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_FIRST; } + YY_BREAK +case 4: +YY_RULE_SETUP +//#line 55 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_RANDOM; } + YY_BREAK +case 5: +YY_RULE_SETUP +//#line 56 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_WITH; } + YY_BREAK +case 6: +YY_RULE_SETUP +//#line 57 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_EXIST; } + YY_BREAK +case 7: +YY_RULE_SETUP +//#line 58 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_NOT; } + YY_BREAK +case 8: +YY_RULE_SETUP +//#line 59 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_AND; } + YY_BREAK +case 9: +YY_RULE_SETUP +//#line 60 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_OR; } + YY_BREAK +case 10: +YY_RULE_SETUP +//#line 61 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_IN; } + YY_BREAK +case 11: +YY_RULE_SETUP +//#line 62 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_TWIDDLE; } + YY_BREAK +case 12: +YY_RULE_SETUP +//#line 63 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_PLUS; } + YY_BREAK +case 13: +YY_RULE_SETUP +//#line 64 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_MINUS; } + YY_BREAK +case 14: +YY_RULE_SETUP +//#line 65 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_MULT; } + YY_BREAK +case 15: +YY_RULE_SETUP +//#line 66 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_DIV; } + YY_BREAK +case 16: +YY_RULE_SETUP +//#line 67 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_LT; } + YY_BREAK +case 17: +YY_RULE_SETUP +//#line 68 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_LE; } + YY_BREAK +case 18: +YY_RULE_SETUP +//#line 69 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_GT; } + YY_BREAK +case 19: +YY_RULE_SETUP +//#line 70 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_GE; } + YY_BREAK +case 20: +YY_RULE_SETUP +//#line 71 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_EQ; } + YY_BREAK +case 21: +YY_RULE_SETUP +//#line 72 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_NE; } + YY_BREAK +case 22: +YY_RULE_SETUP +//#line 73 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_LPAREN; } + YY_BREAK +case 23: +YY_RULE_SETUP +//#line 74 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_RPAREN; } + YY_BREAK +case 24: +YY_RULE_SETUP +//#line 75 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_DOLLAR; } + YY_BREAK +case 25: +YY_RULE_SETUP +//#line 76 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_DOT; } + YY_BREAK +case 26: +YY_RULE_SETUP +//#line 77 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_DEFAULT; } + YY_BREAK +case 27: +YY_RULE_SETUP +//#line 78 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_DISCRIMINANT; } + YY_BREAK +case 28: +YY_RULE_SETUP +//#line 79 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_TYPE_ID; } + YY_BREAK +case 29: +YY_RULE_SETUP +//#line 80 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_REPOS_ID; } + YY_BREAK +case 30: +YY_RULE_SETUP +//#line 81 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_LENGTH; } + YY_BREAK +case 31: +YY_RULE_SETUP +//#line 82 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_LBRA; } + YY_BREAK +case 32: +YY_RULE_SETUP +//#line 83 "ETCL/ETCL.ll" +{ YY_LEX_DEBUG; return ETCL_RBRA; } + YY_BREAK +case 33: +YY_RULE_SETUP +//#line 84 "ETCL/ETCL.ll" +{ + yylval.constraint = + new ETCL_Literal_Constraint ((ACE_CDR::Boolean) 1); + YY_LEX_DEBUG; return ETCL_BOOLEAN; + } + YY_BREAK +case 34: +YY_RULE_SETUP +//#line 89 "ETCL/ETCL.ll" +{ + yylval.constraint = + new ETCL_Literal_Constraint ((ACE_CDR::Boolean) 0); + YY_LEX_DEBUG; return ETCL_BOOLEAN; + } + YY_BREAK +case 35: +YY_RULE_SETUP +//#line 94 "ETCL/ETCL.ll" +{ + yylval.constraint = + new ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); + YY_LEX_DEBUG; return ETCL_INTEGER; + } + YY_BREAK +case 36: +YY_RULE_SETUP +//#line 99 "ETCL/ETCL.ll" +{ + double v; + sscanf (yytext, "%lf", &v); + yylval.constraint = + new ETCL_Literal_Constraint (v); + YY_LEX_DEBUG; return ETCL_FLOAT; + } + YY_BREAK +case 37: +YY_RULE_SETUP +//#line 106 "ETCL/ETCL.ll" +{ + yylval.constraint = + new ETCL_Literal_Constraint (extract_string(yytext)); + YY_LEX_DEBUG; return ETCL_STRING; + } + YY_BREAK +case 38: +YY_RULE_SETUP +//#line 111 "ETCL/ETCL.ll" +{ + yylval.constraint = + new ETCL_Identifier (yytext); + YY_LEX_DEBUG; return ETCL_IDENT; + } + YY_BREAK +case 39: +YY_RULE_SETUP +//#line 116 "ETCL/ETCL.ll" +{ + YY_LEX_DEBUG; break; // Ignore + } + YY_BREAK +case 40: +YY_RULE_SETUP +//#line 119 "ETCL/ETCL.ll" +{ + YY_LEX_DEBUG; break; // @@ TODO + } + YY_BREAK +case 41: +YY_RULE_SETUP +//#line 122 "ETCL/ETCL.ll" +ETCL_ECHO; + YY_BREAK +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 118 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 118 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 117); + + return yy_is_jam ? 0 : yy_current_state; + } + +#if 0 +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ +#endif /* 0 */ + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + + return c; + } + +void yyflush_current_buffer (void) +{ + YY_FLUSH_BUFFER; +} + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* 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->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if defined (ACE_HAS_WINCE) + // Mimic the behavior as WinCE does not have isatty(). + if ((file != 0) && (file == ACE_OS::fileno(file))) { + b->yy_is_interactive = 1; + } + else { + b->yy_is_interactive = 0; + } +#else + b->yy_is_interactive = file ? (ACE_OS::isatty( ACE_OS::fileno(file) ) > 0) : 0; +#endif // ACE_HAS_WINCE + + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) ACE_OS::fprintf( stderr, "%s\n", msg ); + ACE_OS::exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) ACE_OS::malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* 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 *) ACE_OS::realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + ACE_OS::free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +//#line 122 "ETCL/ETCL.ll" + + +const char* +extract_string(char* str) +{ + char *t = str; + for (char * i = str + 1; *i != '\''; ++i, ++t) + { + if (*i == '\\') + { + ++i; + if (*i == 0) + return 0; + else if (*i == 't') + *t = '\t'; + else if (*i == 'n') + *t = '\n'; + else if (*i == '\\') + *t = '\\'; + else + *t = *i; + continue; + } + + *t = *i; + } + + *t = '\0'; + return str; +} + +int +yywrap (void) +{ + return 1; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/ETCL/ETCL_y.cpp b/dep/acelite/ace/ETCL/ETCL_y.cpp new file mode 100644 index 00000000000..880b6300d6a --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_y.cpp @@ -0,0 +1,1288 @@ + +/* A Bison parser, made from ETCL/ETCL.yy + by GNU Bison version 1.28 */ + +#define YYBISON 1 /* Identify Bison output. */ + +#define ETCL_GT 257 +#define ETCL_GE 258 +#define ETCL_LT 259 +#define ETCL_LE 260 +#define ETCL_EQ 261 +#define ETCL_NE 262 +#define ETCL_EXIST 263 +#define ETCL_DEFAULT 264 +#define ETCL_AND 265 +#define ETCL_OR 266 +#define ETCL_NOT 267 +#define ETCL_IN 268 +#define ETCL_TWIDDLE 269 +#define ETCL_BOOLEAN 270 +#define ETCL_PLUS 271 +#define ETCL_MINUS 272 +#define ETCL_MULT 273 +#define ETCL_DIV 274 +#define ETCL_UMINUS 275 +#define ETCL_INTEGER 276 +#define ETCL_FLOAT 277 +#define ETCL_STRING 278 +#define ETCL_RPAREN 279 +#define ETCL_LPAREN 280 +#define ETCL_RBRA 281 +#define ETCL_LBRA 282 +#define ETCL_IDENT 283 +#define ETCL_UNSIGNED 284 +#define ETCL_SIGNED 285 +#define ETCL_DOUBLE 286 +#define ETCL_CONSTRAINT 287 +#define ETCL_COMPONENT 288 +#define ETCL_WITH 289 +#define ETCL_MAX 290 +#define ETCL_MIN 291 +#define ETCL_FIRST 292 +#define ETCL_RANDOM 293 +#define ETCL_DOLLAR 294 +#define ETCL_DOT 295 +#define ETCL_DISCRIMINANT 296 +#define ETCL_LENGTH 297 +#define ETCL_TYPE_ID 298 +#define ETCL_REPOS_ID 299 + + +//============================================================================= +/** + * @file ETCL_y.cpp + * + * $Id: ETCL_y.cpp 93651 2011-03-28 08:49:11Z johnnyw $ + * + * @author Carlos O'Ryan based on previous work by Seth Widoff + */ +//============================================================================= + + +#include "ace/ETCL/ETCL_y.h" +#include "ace/ETCL/ETCL_Constraint.h" +#include "ace/ETCL/ETCL_Interpreter.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +extern int yylex (void); +extern void yyflush_current_buffer (void); + +static void yyerror (const char *) +{ + // @@ TODO + // Ignore error messages +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif + + + +#define YYFINAL 114 +#define YYFLAG -32768 +#define YYNTBASE 46 + +#define YYTRANSLATE(x) ((unsigned)(x) <= 299 ? yytranslate[x] : 65) + +static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45 +}; + +#if YYDEBUG != 0 +static const short yyprhs[] = { 0, + 0, 2, 4, 7, 10, 13, 15, 17, 21, 23, + 27, 29, 33, 37, 41, 45, 49, 53, 55, 59, + 64, 66, 70, 72, 76, 80, 82, 86, 90, 92, + 95, 97, 101, 103, 106, 109, 111, 114, 117, 119, + 121, 124, 128, 132, 135, 137, 138, 141, 144, 146, + 148, 149, 152, 154, 156, 159, 161, 163, 165, 167, + 169, 171, 176, 181, 184, 189, 190, 192, 195, 198 +}; + +static const short yyrhs[] = { 48, + 0, 47, 0, 37, 48, 0, 36, 48, 0, 35, + 48, 0, 38, 0, 39, 0, 48, 12, 49, 0, + 49, 0, 49, 11, 50, 0, 50, 0, 51, 7, + 51, 0, 51, 8, 51, 0, 51, 3, 51, 0, + 51, 4, 51, 0, 51, 5, 51, 0, 51, 6, + 51, 0, 51, 0, 52, 14, 57, 0, 52, 14, + 40, 57, 0, 52, 0, 53, 15, 53, 0, 53, + 0, 53, 17, 54, 0, 53, 18, 54, 0, 54, + 0, 54, 19, 55, 0, 54, 20, 55, 0, 55, + 0, 13, 56, 0, 56, 0, 26, 48, 25, 0, + 22, 0, 17, 22, 0, 18, 22, 0, 23, 0, + 17, 23, 0, 18, 23, 0, 24, 0, 16, 0, + 9, 29, 0, 9, 40, 57, 0, 10, 40, 57, + 0, 40, 57, 0, 29, 0, 0, 41, 59, 0, + 29, 58, 0, 60, 0, 61, 0, 0, 41, 59, + 0, 60, 0, 61, 0, 29, 58, 0, 43, 0, + 42, 0, 44, 0, 45, 0, 62, 0, 63, 0, + 28, 22, 27, 58, 0, 26, 29, 25, 58, 0, + 22, 58, 0, 26, 64, 25, 58, 0, 0, 22, + 0, 17, 22, 0, 18, 22, 0, 24, 0 +}; + +#endif + +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 92, 93, 96, 98, 100, 102, 104, 108, 110, 113, + 115, 118, 120, 122, 124, 126, 128, 130, 133, 135, + 137, 140, 142, 145, 147, 149, 152, 154, 156, 159, + 161, 164, 166, 168, 170, 172, 174, 176, 178, 180, + 182, 184, 186, 188, 190, 194, 196, 199, 202, 203, + 206, 208, 211, 212, 215, 217, 219, 221, 223, 225, + 226, 229, 233, 237, 241, 245, 247, 249, 251, 253 +}; +#endif + + +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) + +static const char * const yytname[] = { "$","error","$undefined.","ETCL_GT", +"ETCL_GE","ETCL_LT","ETCL_LE","ETCL_EQ","ETCL_NE","ETCL_EXIST", +"ETCL_DEFAULT","ETCL_AND","ETCL_OR","ETCL_NOT","ETCL_IN", +"ETCL_TWIDDLE","ETCL_BOOLEAN","ETCL_PLUS","ETCL_MINUS","ETCL_MULT", +"ETCL_DIV","ETCL_UMINUS","ETCL_INTEGER","ETCL_FLOAT","ETCL_STRING", +"ETCL_RPAREN","ETCL_LPAREN","ETCL_RBRA","ETCL_LBRA","ETCL_IDENT", +"ETCL_UNSIGNED","ETCL_SIGNED","ETCL_DOUBLE","ETCL_CONSTRAINT", +"ETCL_COMPONENT","ETCL_WITH","ETCL_MAX","ETCL_MIN","ETCL_FIRST", +"ETCL_RANDOM","ETCL_DOLLAR","ETCL_DOT","ETCL_DISCRIMINANT","ETCL_LENGTH", +"ETCL_TYPE_ID","ETCL_REPOS_ID","constraint","preference","bool_or","bool_and", +"bool_compare","expr_in","expr_twiddle","expr","term","factor_not","factor", +"component","component_ext","component_dot","component_array","component_assoc", +"component_pos","union_pos","union_val", 0 +}; +#endif + +static const short yyr1[] = { 0, + 46, 46, 47, 47, 47, 47, 47, 48, 48, 49, + 49, 50, 50, 50, 50, 50, 50, 50, 51, 51, + 51, 52, 52, 53, 53, 53, 54, 54, 54, 55, + 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, + 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, + 59, 60, 61, 62, 63, 64, 64, 64, 64, 64 +}; + +static const short yyr2[] = { 0, + 1, 1, 2, 2, 2, 1, 1, 3, 1, 3, + 1, 3, 3, 3, 3, 3, 3, 1, 3, 4, + 1, 3, 1, 3, 3, 1, 3, 3, 1, 2, + 1, 3, 1, 2, 2, 1, 2, 2, 1, 1, + 2, 3, 3, 2, 1, 0, 2, 2, 1, 1, + 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 4, 4, 2, 4, 0, 1, 2, 2, 1 +}; + +static const short yydefact[] = { 0, + 0, 0, 0, 40, 0, 0, 33, 36, 39, 0, + 45, 0, 0, 0, 6, 7, 46, 2, 1, 9, + 11, 18, 21, 23, 26, 29, 31, 41, 46, 46, + 30, 34, 37, 35, 38, 0, 5, 4, 3, 0, + 0, 51, 0, 44, 49, 50, 0, 0, 0, 0, + 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, + 42, 43, 32, 0, 0, 0, 48, 53, 54, 51, + 66, 51, 57, 56, 58, 59, 47, 60, 61, 8, + 10, 14, 15, 16, 17, 12, 13, 46, 19, 22, + 24, 25, 27, 28, 51, 51, 52, 64, 0, 0, + 67, 70, 0, 55, 20, 63, 62, 68, 69, 51, + 65, 0, 0, 0 +}; + +static const short yydefgoto[] = { 112, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 44, 67, 77, 68, 69, 78, 79, 103 +}; + +static const short yypact[] = { 41, + -13, -39, 94,-32768, 38, 46,-32768,-32768,-32768, 73, +-32768, 73, 73, 73,-32768,-32768, -9,-32768, -6, 7, +-32768, 121, -5, 19, 55,-32768,-32768,-32768, -9, -9, +-32768,-32768,-32768,-32768,-32768, 21, -6, -6, -6, 6, + 25, -2, -1,-32768,-32768,-32768, 73, 73, 73, 73, + 73, 73, 73, 73, -18, 73, 73, 73, 73, 73, +-32768,-32768,-32768, 27, 29, -1,-32768,-32768,-32768, -2, + 31, -2,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 7, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, -9,-32768, 67, + 55, 55,-32768,-32768, -2, -2,-32768,-32768, 44, 50, +-32768,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768, -2, +-32768, 98, 100,-32768 +}; + +static const short yypgoto[] = {-32768, +-32768, 95, 54, 58, 86,-32768, 59, 30, 33, 111, + -26, -65, 53, -17, -15,-32768,-32768,-32768 +}; + + +#define YYLAST 140 + + +static const short yytable[] = { 45, + 30, 46, 61, 62, 98, 47, 104, 40, 55, 41, + 42, 45, 45, 46, 46, 28, 40, 48, 41, 42, + 70, 88, 43, 40, 71, 41, 29, 72, 89, 106, + 107, 43, 47, 56, 64, 57, 58, 45, 66, 46, + 73, 74, 75, 76, 111, 63, 65, 99, 100, 1, + 2, 95, 101, 3, 102, 96, 4, 5, 6, 32, + 33, 105, 7, 8, 9, 108, 10, 34, 35, 11, + 45, 109, 46, 59, 60, 12, 13, 14, 15, 16, + 17, 1, 2, 57, 58, 3, 91, 92, 4, 5, + 6, 93, 94, 110, 7, 8, 9, 113, 10, 114, + 80, 11, 1, 2, 36, 81, 37, 38, 39, 4, + 5, 6, 17, 31, 90, 7, 8, 9, 97, 10, + 0, 0, 11, 49, 50, 51, 52, 53, 54, 0, + 0, 0, 0, 17, 82, 83, 84, 85, 86, 87 +}; + +static const short yycheck[] = { 17, + 40, 17, 29, 30, 70, 12, 72, 26, 14, 28, + 29, 29, 30, 29, 30, 29, 26, 11, 28, 29, + 22, 40, 41, 26, 26, 28, 40, 29, 55, 95, + 96, 41, 12, 15, 29, 17, 18, 55, 41, 55, + 42, 43, 44, 45, 110, 25, 22, 17, 18, 9, + 10, 25, 22, 13, 24, 27, 16, 17, 18, 22, + 23, 88, 22, 23, 24, 22, 26, 22, 23, 29, + 88, 22, 88, 19, 20, 35, 36, 37, 38, 39, + 40, 9, 10, 17, 18, 13, 57, 58, 16, 17, + 18, 59, 60, 25, 22, 23, 24, 0, 26, 0, + 47, 29, 9, 10, 10, 48, 12, 13, 14, 16, + 17, 18, 40, 3, 56, 22, 23, 24, 66, 26, + -1, -1, 29, 3, 4, 5, 6, 7, 8, -1, + -1, -1, -1, 40, 49, 50, 51, 52, 53, 54 +}; +/* -*-C-*- Note some compilers choke on comments on `//#line' lines. */ +//#line 3 "/pkg/gnu/share/bison.simple" +/* This file comes from bison-1.28. */ + +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +#ifndef YYSTACK_USE_ALLOCA +#ifdef alloca +#define YYSTACK_USE_ALLOCA +#else /* alloca not defined */ +#ifdef __GNUC__ +#define YYSTACK_USE_ALLOCA +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386)) +#define YYSTACK_USE_ALLOCA +#include +#else /* not sparc */ +/* We think this test detects Watcom and Microsoft C. */ +/* This used to test MSDOS, but that is a bad idea + since that symbol is in the user namespace. */ +#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) +#if 0 /* No need for malloc.h, which pollutes the namespace; + instead, just don't use alloca. */ +#include +#endif +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +/* I don't know what this was needed for, but it pollutes the namespace. + So I turned it off. rms, 2 May 1997. */ +/* #include */ + #pragma alloca +#define YYSTACK_USE_ALLOCA +#else /* not MSDOS, or __TURBOC__, or _AIX */ +#if 0 +#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, + and on HPUX 10. Eventually we can turn this on. */ +#define YYSTACK_USE_ALLOCA +#define alloca __builtin_alloca +#endif /* __hpux */ +#endif +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc */ +#endif /* not GNU C */ +#endif /* alloca not defined */ +#endif /* YYSTACK_USE_ALLOCA not defined */ + +#ifdef YYSTACK_USE_ALLOCA +#define YYSTACK_ALLOC alloca +#else +#define YYSTACK_ALLOC malloc +#endif + +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +#ifndef YYPURE +#define YYLEX yylex() +#endif + +#ifdef YYPURE +#ifdef YYLSP_NEEDED +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ +#endif + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/* If nonreentrant, generate the variables here */ + +#ifndef YYPURE + +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ +YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ + + +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ +#endif + +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ + +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif + +/* YYINITDEPTH indicates the initial size of the parser's stacks */ + +#ifndef YYINITDEPTH +#define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ + +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif + +/* Define __yy_memcpy. Note that the size argument + should be passed with type unsigned int, because that is what the non-GCC + definitions require. With GCC, __builtin_memcpy takes an arg + of type size_t, but it can handle unsigned int. */ + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (to, from, count) + char *to; + char *from; + unsigned int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (char *to, char *from, unsigned int count) +{ + register char *t = to; + register char *f = from; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#endif +#endif + +//#line 217 "/pkg/gnu/share/bison.simple" + +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef YYPARSE_PARAM +#ifdef __cplusplus +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* not __cplusplus */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#endif /* not __cplusplus */ +#else /* not YYPARSE_PARAM */ +#define YYPARSE_PARAM_ARG +#define YYPARSE_PARAM_DECL +#endif /* not YYPARSE_PARAM */ + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else +int yyparse (void); +#endif +#endif + +int +yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +{ + register int yystate; + register int yyn; + register short *yyssp; + register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + +#ifdef YYLSP_NEEDED + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#else +#define YYPOPSTACK (yyvsp--, yyssp--) +#endif + + int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; + +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + + int yylen; + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Starting parse\n"); +#endif + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss - 1; + yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif + +/* Push a new state, which is found in yystate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +yynewstate: + + *++yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif + + /* Get the current used size of the three stacks, in elements. */ + int size = yyssp - yyss + 1; + +#ifdef yyoverflow + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); +#else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); +#endif + + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif +#else /* no yyoverflow */ + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + if (yyfree_stacks) + { + ACE_OS::free (yyss); + ACE_OS::free (yyvs); +#ifdef YYLSP_NEEDED + ACE_OS::free (yyls); +#endif + } + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; +#ifndef YYSTACK_USE_ALLOCA + yyfree_stacks = 1; +#endif + yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss, (char *)yyss1, + size * (unsigned int) sizeof (*yyssp)); + yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs, (char *)yyvs1, + size * (unsigned int) sizeof (*yyvsp)); +#ifdef YYLSP_NEEDED + yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls, (char *)yyls1, + size * (unsigned int) sizeof (*yylsp)); +#endif +#endif /* no yyoverflow */ + + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Entering state %d\n", yystate); +#endif + + goto yybackup; + yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Reading a token: "); +#endif + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Now at end of input.\n"); +#endif + } + else + { + yychar1 = YYTRANSLATE(yychar); + +#if YYDEBUG != 0 + if (yydebug) + { + ACE_OS::fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +#endif + ACE_OS::fprintf (stderr, ")\n"); + } +#endif + } + + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + goto yydefault; + + yyn = yytable[yyn]; + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrlab; + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; + + yystate = yyn; + goto yynewstate; + +/* Do the default action for the current state. */ +yydefault: + + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + +/* Do a reduction. yyn is the number of a rule to reduce with. */ +yyreduce: + yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ + +#if YYDEBUG != 0 + if (yydebug) + { + int i; + + ACE_OS::fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + ACE_OS::fprintf (stderr, "%s ", yytname[yyrhs[i]]); + ACE_OS::fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + + + switch (yyn) { + +case 3: +//#line 97 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Preference (ETCL_MIN, yyvsp[0].constraint); ; + break;} +case 4: +//#line 99 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Preference (ETCL_MAX, yyvsp[0].constraint); ; + break;} +case 5: +//#line 101 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Preference (ETCL_WITH, yyvsp[0].constraint); ; + break;} +case 6: +//#line 103 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Preference (ETCL_FIRST); ; + break;} +case 7: +//#line 105 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Preference (ETCL_RANDOM); ; + break;} +case 8: +//#line 109 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_OR, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 10: +//#line 114 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_AND, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 12: +//#line 119 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_EQ, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 13: +//#line 121 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_NE, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 14: +//#line 123 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_GT, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 15: +//#line 125 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_GE, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 16: +//#line 127 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_LT, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 17: +//#line 129 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_LE, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 19: +//#line 134 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_IN, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 20: +//#line 136 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_IN, yyvsp[-3].constraint, yyvsp[0].constraint); ; + break;} +case 22: +//#line 141 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_TWIDDLE, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 24: +//#line 146 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_PLUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 25: +//#line 148 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_MINUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 27: +//#line 153 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_MULT, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 28: +//#line 155 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Binary_Expr (ETCL_DIV, yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 30: +//#line 160 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Unary_Expr (ETCL_NOT, yyvsp[0].constraint); ; + break;} +case 32: +//#line 165 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[-1].constraint; ; + break;} +case 33: +//#line 167 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[0].constraint; ; + break;} +case 34: +//#line 169 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Unary_Expr (ETCL_PLUS, yyvsp[0].constraint); ; + break;} +case 35: +//#line 171 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Unary_Expr (ETCL_MINUS, yyvsp[0].constraint); ; + break;} +case 36: +//#line 173 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[0].constraint; ; + break;} +case 37: +//#line 175 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Unary_Expr (ETCL_PLUS, yyvsp[0].constraint); ; + break;} +case 38: +//#line 177 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Unary_Expr (ETCL_MINUS, yyvsp[0].constraint); ; + break;} +case 39: +//#line 179 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[0].constraint; ; + break;} +case 40: +//#line 181 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[0].constraint; ; + break;} +case 41: +//#line 183 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Exist (yyvsp[0].constraint); ; + break;} +case 42: +//#line 185 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Exist (yyvsp[0].constraint); ; + break;} +case 43: +//#line 187 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Default (yyvsp[0].constraint); ; + break;} +case 44: +//#line 189 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Eval (yyvsp[0].constraint); ; + break;} +case 45: +//#line 191 "ETCL/ETCL.yy" +{ yyval.constraint = yyvsp[0].constraint; ; + break;} +case 46: +//#line 195 "ETCL/ETCL.yy" +{ yyval.constraint = 0; ; + break;} +case 47: +//#line 197 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Dot (yyvsp[0].constraint); ; + break;} +case 48: +//#line 200 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; + break;} +case 51: +//#line 207 "ETCL/ETCL.yy" +{ yyval.constraint = 0; ; + break;} +case 52: +//#line 209 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Dot (yyvsp[0].constraint); ; + break;} +case 55: +//#line 216 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; + break;} +case 56: +//#line 218 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Special (ETCL_LENGTH); ; + break;} +case 57: +//#line 220 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Special (ETCL_DISCRIMINANT); ; + break;} +case 58: +//#line 222 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Special (ETCL_TYPE_ID); ; + break;} +case 59: +//#line 224 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Special (ETCL_REPOS_ID); ; + break;} +case 62: +//#line 230 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Component_Array (yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 63: +//#line 234 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Component_Assoc (yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 64: +//#line 238 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Component_Pos (yyvsp[-1].constraint, yyvsp[0].constraint); ; + break;} +case 65: +//#line 242 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Union_Pos (yyvsp[-2].constraint, yyvsp[0].constraint); ; + break;} +case 66: +//#line 246 "ETCL/ETCL.yy" +{ yyval.constraint = 0; ; + break;} +case 67: +//#line 248 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Union_Value (+1, yyvsp[0].constraint); ; + break;} +case 68: +//#line 250 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Union_Value (+1, yyvsp[0].constraint); ; + break;} +case 69: +//#line 252 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Union_Value (-1, yyvsp[0].constraint); ; + break;} +case 70: +//#line 254 "ETCL/ETCL.yy" +{ yyval.constraint = new ETCL_Union_Value (yyvsp[0].constraint); ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +//#line 543 "/pkg/gnu/share/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +#ifdef YYLSP_NEEDED + yylsp -= yylen; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + ACE_OS::fprintf (stderr, "state stack now"); + while (ssp1 != yyssp) + ACE_OS::fprintf (stderr, " %d", *++ssp1); + ACE_OS::fprintf (stderr, "\n"); + } +#endif + + *++yyvsp = yyval; + +#ifdef YYLSP_NEEDED + yylsp++; + if (yylen == 0) + { + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp-1)->last_line; + yylsp->last_column = (yylsp-1)->last_column; + yylsp->text = 0; + } + else + { + yylsp->last_line = (yylsp+yylen-1)->last_line; + yylsp->last_column = (yylsp+yylen-1)->last_column; + } +#endif + + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTBASE]; + + goto yynewstate; + +yyerrlab: /* here on detecting error */ + + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ + { + ++yynerrs; + +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += ACE_OS::strlen(yytname[x]) + 15, count++; + msg = (char *) ACE_OS::malloc(size + 15); + if (msg != 0) + { + ACE_OS::strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + ACE_OS::strcat(msg, count == 0 ? ", expecting `" : " or `"); + ACE_OS::strcat(msg, yytname[x]); + ACE_OS::strcat(msg, "'"); + count++; + } + } + yyerror(msg); + ACE_OS::free(msg); + } + else + yyerror ("parse error; also virtual memory exceeded"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror("parse error"); + } + + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ + + if (yyerrstatus == 3) + { + /* if just tried and failed to reuse lookahead token after an error, discard it. */ + + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif + + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +yyerrdefault: /* current state does not do anything special for the error token. */ + +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (yyn) goto yydefault; +#endif + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + ACE_OS::fprintf (stderr, "Error: state stack now"); + while (ssp1 != yyssp) + ACE_OS::fprintf (stderr, " %d", *++ssp1); + ACE_OS::fprintf (stderr, "\n"); + } +#endif + +yyerrhandle: + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrpop; + + if (yyn == YYFINAL) + YYACCEPT; + +#if YYDEBUG != 0 + if (yydebug) + ACE_OS::fprintf(stderr, "Shifting error token, "); +#endif + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + yystate = yyn; + goto yynewstate; + + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) + { + ACE_OS::free (yyss); + ACE_OS::free (yyvs); +#ifdef YYLSP_NEEDED + ACE_OS::free (yyls); +#endif + } + return 0; + + yyabortlab: + /* YYABORT comes here. */ + + /* Flush out yy_current_buffer before next parse. Since there is + no error recovery, the buffer could still contain tokens from this + parse. */ + yyflush_current_buffer(); + + if (yyfree_stacks) + { + ACE_OS::free (yyss); + ACE_OS::free (yyvs); +#ifdef YYLSP_NEEDED + ACE_OS::free (yyls); +#endif + } + return 1; +} +//#line 257 "ETCL/ETCL.yy" + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/ETCL/ETCL_y.h b/dep/acelite/ace/ETCL/ETCL_y.h new file mode 100644 index 00000000000..577296e9ee2 --- /dev/null +++ b/dep/acelite/ace/ETCL/ETCL_y.h @@ -0,0 +1,45 @@ +// $Id: ETCL_y.h 81458 2008-04-28 11:31:49Z johnnyw $ +#define ETCL_GT 257 +#define ETCL_GE 258 +#define ETCL_LT 259 +#define ETCL_LE 260 +#define ETCL_EQ 261 +#define ETCL_NE 262 +#define ETCL_EXIST 263 +#define ETCL_DEFAULT 264 +#define ETCL_AND 265 +#define ETCL_OR 266 +#define ETCL_NOT 267 +#define ETCL_IN 268 +#define ETCL_TWIDDLE 269 +#define ETCL_BOOLEAN 270 +#define ETCL_PLUS 271 +#define ETCL_MINUS 272 +#define ETCL_MULT 273 +#define ETCL_DIV 274 +#define ETCL_UMINUS 275 +#define ETCL_INTEGER 276 +#define ETCL_FLOAT 277 +#define ETCL_STRING 278 +#define ETCL_RPAREN 279 +#define ETCL_LPAREN 280 +#define ETCL_RBRA 281 +#define ETCL_LBRA 282 +#define ETCL_IDENT 283 +#define ETCL_UNSIGNED 284 +#define ETCL_SIGNED 285 +#define ETCL_DOUBLE 286 +#define ETCL_CONSTRAINT 287 +#define ETCL_COMPONENT 288 +#define ETCL_WITH 289 +#define ETCL_MAX 290 +#define ETCL_MIN 291 +#define ETCL_FIRST 292 +#define ETCL_RANDOM 293 +#define ETCL_DOLLAR 294 +#define ETCL_DOT 295 +#define ETCL_DISCRIMINANT 296 +#define ETCL_LENGTH 297 +#define ETCL_TYPE_ID 298 +#define ETCL_REPOS_ID 299 + diff --git a/dep/acelite/ace/ETCL/ace_etcl_export.h b/dep/acelite/ace/ETCL/ace_etcl_export.h new file mode 100644 index 00000000000..561d99f85be --- /dev/null +++ b/dep/acelite/ace/ETCL/ace_etcl_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id: ace_etcl_export.h 81458 2008-04-28 11:31:49Z johnnyw $ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef ACE_ETCL_EXPORT_H +#define ACE_ETCL_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) +# if !defined (ACE_ETCL_HAS_DLL) +# define ACE_ETCL_HAS_DLL 0 +# endif /* ! ACE_ETCL_HAS_DLL */ +#else +# if !defined (ACE_ETCL_HAS_DLL) +# define ACE_ETCL_HAS_DLL 1 +# endif /* ! ACE_ETCL_HAS_DLL */ +#endif + +#if defined (ACE_ETCL_HAS_DLL) && (ACE_ETCL_HAS_DLL == 1) +# if defined (ACE_ETCL_BUILD_DLL) +# define ACE_ETCL_Export ACE_Proper_Export_Flag +# define ACE_ETCL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ACE_ETCL_BUILD_DLL */ +# define ACE_ETCL_Export ACE_Proper_Import_Flag +# define ACE_ETCL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ACE_ETCL_BUILD_DLL */ +#else /* ACE_ETCL_HAS_DLL == 1 */ +# define ACE_ETCL_Export +# define ACE_ETCL_SINGLETON_DECLARATION(T) +# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ACE_ETCL_HAS_DLL == 1 */ + +#endif /* ACE_ETCL_EXPORT_H */ + +// End of auto generated file. diff --git a/dep/acelite/ace/ETCL/etcl_parser_export.h b/dep/acelite/ace/ETCL/etcl_parser_export.h new file mode 100644 index 00000000000..678d25b466a --- /dev/null +++ b/dep/acelite/ace/ETCL/etcl_parser_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id: etcl_parser_export.h 81640 2008-05-07 19:04:11Z parsons $ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef ETCL_PARSER_EXPORT_H +#define ETCL_PARSER_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) +# if !defined (ETCL_PARSER_HAS_DLL) +# define ETCL_PARSER_HAS_DLL 0 +# endif /* ! ETCL_PARSER_HAS_DLL */ +#else +# if !defined (ETCL_PARSER_HAS_DLL) +# define ETCL_PARSER_HAS_DLL 1 +# endif /* ! ETCL_PARSER_HAS_DLL */ +#endif + +#if defined (ETCL_PARSER_HAS_DLL) && (ETCL_PARSER_HAS_DLL == 1) +# if defined (ETCL_PARSER_BUILD_DLL) +# define ETCL_Parser_Export ACE_Proper_Export_Flag +# define ETCL_PARSER_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ETCL_PARSER_BUILD_DLL */ +# define ETCL_Parser_Export ACE_Proper_Import_Flag +# define ETCL_PARSER_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ETCL_PARSER_BUILD_DLL */ +#else /* ETCL_PARSER_HAS_DLL == 1 */ +# define ETCL_Parser_Export +# define ETCL_PARSER_SINGLETON_DECLARATION(T) +# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ETCL_PARSER_HAS_DLL == 1 */ + +#endif /* ETCL_PARSER_EXPORT_H */ + +// End of auto generated file. diff --git a/dep/acelite/ace/Env_Value_T.h b/dep/acelite/ace/Env_Value_T.h index c8b459b26c2..412baf935ed 100644 --- a/dep/acelite/ace/Env_Value_T.h +++ b/dep/acelite/ace/Env_Value_T.h @@ -4,7 +4,7 @@ /** * @file Env_Value_T.h * - * $Id: Env_Value_T.h 91626 2010-09-07 10:59:20Z johnnyw $ + * $Id: Env_Value_T.h 92712 2010-11-25 12:22:13Z johnnyw $ * * Template to encapsulate getting a value from an environment variable * and using a supplied default value if not in the environment. @@ -45,7 +45,7 @@ public: /** * Default constructor which isn't bound to a specific environment * variable name or a default value. Before being useful it must - * 'd. + * open()'d. */ ACE_Env_Value (void); diff --git a/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp new file mode 100644 index 00000000000..b16679a11ec --- /dev/null +++ b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp @@ -0,0 +1,99 @@ +// $Id: Event_Handler_Handle_Timeout_Upcall.cpp 95586 2012-03-03 20:45:57Z johnnyw $ + +#include "ace/Event_Handler_Handle_Timeout_Upcall.h" +#include "ace/Reactor_Timer_Interface.h" +#include "ace/Abstract_Timer_Queue.h" + +#if !defined(__ACE_INLINE__) +# include "ace/Event_Handler_Handle_Timeout_Upcall.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Event_Handler_Handle_Timeout_Upcall:: +ACE_Event_Handler_Handle_Timeout_Upcall (void) : + requires_reference_counting_ (0) +{ +} + +ACE_Event_Handler_Handle_Timeout_Upcall:: +~ACE_Event_Handler_Handle_Timeout_Upcall (void) +{ +} + +int +ACE_Event_Handler_Handle_Timeout_Upcall:: +timeout (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *event_handler, + const void *act, + int recurring_timer, + const ACE_Time_Value &cur_time) +{ + int requires_reference_counting = 0; + + if (!recurring_timer) + { + requires_reference_counting = + event_handler->reference_counting_policy ().value () == + ACE_Event_Handler::Reference_Counting_Policy::ENABLED; + } + + // Upcall to the s handle_timeout method. + if (event_handler->handle_timeout (cur_time, act) == -1) + { + if (event_handler->reactor_timer_interface ()) + event_handler->reactor_timer_interface ()->cancel_timer (event_handler, 0); + else + timer_queue.cancel (event_handler, 0); // 0 means "call handle_close()". + } + + if (!recurring_timer && + requires_reference_counting) + { + event_handler->remove_reference (); + } + + return 0; +} + +int +ACE_Event_Handler_Handle_Timeout_Upcall:: +cancel_type (ACE_Timer_Queue &, + ACE_Event_Handler *event_handler, + int dont_call, + int &requires_reference_counting) +{ + requires_reference_counting = + event_handler->reference_counting_policy ().value () == + ACE_Event_Handler::Reference_Counting_Policy::ENABLED; + + // Upcall to the s handle_close method + if (dont_call == 0) + event_handler->handle_close (ACE_INVALID_HANDLE, + ACE_Event_Handler::TIMER_MASK); + + return 0; +} + +int +ACE_Event_Handler_Handle_Timeout_Upcall:: +deletion (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *event_handler, + const void *) +{ + int requires_reference_counting = 0; + + this->cancel_type (timer_queue, + event_handler, + 0, + requires_reference_counting); + + this->cancel_timer (timer_queue, + event_handler, + 0, + requires_reference_counting); + + return 0; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h new file mode 100644 index 00000000000..0ce4a4dd9ca --- /dev/null +++ b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h @@ -0,0 +1,103 @@ +//$Id: Event_Handler_Handle_Timeout_Upcall.h 95334 2011-12-15 12:52:50Z msmit $ + +#ifndef ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H +#define ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H + +#include /**/ "ace/pre.h" + +/** + * @file Event_Handler_Handle_Timeout_Upcall.h + * + * @author Carlos O'Ryan + * + * Based on classes and files developed by Doug Schmidt, Darrell + * Brunsch, Irfan Pyarali and a cast of thousands. + */ + +#include "ace/Timer_Queuefwd.h" +#include "ace/Copy_Disabled.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ACE_Time_Value; + +/** + * @class ACE_Event_Handler_Handle_Timeout_Upcall + * + * @brief Functor for Timer_Queues. + * + * This class implements the functor required by the Timer + * Queue to call on ACE_Event_Handlers. + */ +class ACE_Export ACE_Event_Handler_Handle_Timeout_Upcall + : private ACE_Copy_Disabled +{ +public: + // = Initialization and termination methods. + /// Constructor. + ACE_Event_Handler_Handle_Timeout_Upcall (void); + + /// Destructor. + ~ACE_Event_Handler_Handle_Timeout_Upcall (void); + + /// This method is called when a timer is registered. + int registration (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + const void *arg); + + /// This method is called before the timer expires. + int preinvoke (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + const void *arg, + int recurring_timer, + const ACE_Time_Value &cur_time, + const void *&upcall_act); + + /// This method is called when the timer expires. + int timeout (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + const void *arg, + int recurring_timer, + const ACE_Time_Value &cur_time); + + /// This method is called after the timer expires. + int postinvoke (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + const void *arg, + int recurring_timer, + const ACE_Time_Value &cur_time, + const void *upcall_act); + + /// This method is called when a handler is cancelled + int cancel_type (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + int dont_call, + int &requires_reference_counting); + + /// This method is called when a timer is cancelled + int cancel_timer (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + int dont_call, + int requires_reference_counting); + + /// This method is called when the timer queue is destroyed and + /// the timer is still contained in it + int deletion (ACE_Timer_Queue &timer_queue, + ACE_Event_Handler *handler, + const void *arg); + +private: + + /// Flag indicating that reference counting is required for this + /// event handler upcall. + int requires_reference_counting_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined(__ACE_INLINE__) +# include "ace/Event_Handler_Handle_Timeout_Upcall.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" +#endif /* ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H */ diff --git a/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl new file mode 100644 index 00000000000..f52a7206c47 --- /dev/null +++ b/dep/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl @@ -0,0 +1,71 @@ +// $Id: Event_Handler_Handle_Timeout_Upcall.inl 95336 2011-12-15 13:22:33Z msmit $ + +#include "ace/Event_Handler.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE int +ACE_Event_Handler_Handle_Timeout_Upcall:: +registration (ACE_Timer_Queue &, + ACE_Event_Handler *event_handler, + const void *) +{ + event_handler->add_reference (); + return 0; +} + +ACE_INLINE int +ACE_Event_Handler_Handle_Timeout_Upcall:: +preinvoke (ACE_Timer_Queue &, + ACE_Event_Handler *event_handler, + const void *, + int, + const ACE_Time_Value &, + const void * & upcall_act) +{ + bool const requires_reference_counting = + event_handler->reference_counting_policy ().value () == + ACE_Event_Handler::Reference_Counting_Policy::ENABLED; + + if (requires_reference_counting) + { + event_handler->add_reference (); + + upcall_act = &this->requires_reference_counting_; + } + + return 0; +} + +ACE_INLINE int +ACE_Event_Handler_Handle_Timeout_Upcall:: +postinvoke (ACE_Timer_Queue & /* timer_queue */, + ACE_Event_Handler *event_handler, + const void * /* timer_act */, + int /* recurring_timer */, + const ACE_Time_Value & /* cur_time */, + const void *upcall_act) +{ + if (upcall_act == &this->requires_reference_counting_) + { + event_handler->remove_reference (); + } + + return 0; +} + +ACE_INLINE int +ACE_Event_Handler_Handle_Timeout_Upcall:: +cancel_timer (ACE_Timer_Queue &, + ACE_Event_Handler *event_handler, + int, + int requires_reference_counting) +{ + if (requires_reference_counting) + event_handler->remove_reference (); + + return 0; +} + + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/FIFO.cpp b/dep/acelite/ace/FIFO.cpp index b564a26c6b6..a4d7ba1d0b9 100644 --- a/dep/acelite/ace/FIFO.cpp +++ b/dep/acelite/ace/FIFO.cpp @@ -1,4 +1,4 @@ -// $Id: FIFO.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: FIFO.cpp 94034 2011-05-09 19:11:03Z johnnyw $ #include "ace/FIFO.h" @@ -12,8 +12,6 @@ #include "ace/OS_NS_sys_stat.h" #include "ace/OS_NS_fcntl.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_FIFO) diff --git a/dep/acelite/ace/FIFO_Recv_Msg.cpp b/dep/acelite/ace/FIFO_Recv_Msg.cpp index b8580ae317c..9d041d558cc 100644 --- a/dep/acelite/ace/FIFO_Recv_Msg.cpp +++ b/dep/acelite/ace/FIFO_Recv_Msg.cpp @@ -1,4 +1,4 @@ -// $Id: FIFO_Recv_Msg.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: FIFO_Recv_Msg.cpp 93359 2011-02-11 11:33:12Z mcorino $ #include "ace/FIFO_Recv_Msg.h" @@ -8,8 +8,6 @@ #include "ace/FIFO_Recv_Msg.inl" #endif /* __ACE_INLINE__ */ - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv_Msg) diff --git a/dep/acelite/ace/Filecache.cpp b/dep/acelite/ace/Filecache.cpp index 7a9615bb59d..65e548c75ec 100644 --- a/dep/acelite/ace/Filecache.cpp +++ b/dep/acelite/ace/Filecache.cpp @@ -1,4 +1,4 @@ -// $Id: Filecache.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Filecache.cpp 94034 2011-05-09 19:11:03Z johnnyw $ #include "ace/Filecache.h" #include "ace/Object_Manager.h" @@ -164,6 +164,7 @@ template <> ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (ACE_Filecache_Hash_Entry *next, ACE_Filecache_Hash_Entry *prev) : ext_id_ (0), + int_id_ (0), next_ (next), prev_ (prev) { diff --git a/dep/acelite/ace/FlReactor/ACE_FlReactor_export.h b/dep/acelite/ace/FlReactor/ACE_FlReactor_export.h new file mode 100644 index 00000000000..282adb6494d --- /dev/null +++ b/dep/acelite/ace/FlReactor/ACE_FlReactor_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id: ACE_FlReactor_export.h 80826 2008-03-04 14:51:23Z wotte $ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl -s ACE_FlReactor +// ------------------------------ +#ifndef ACE_FLREACTOR_EXPORT_H +#define ACE_FLREACTOR_EXPORT_H + +#include /**/ "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_FLREACTOR_HAS_DLL) +# define ACE_FLREACTOR_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && ACE_FLREACTOR_HAS_DLL */ + +#if !defined (ACE_FLREACTOR_HAS_DLL) +# define ACE_FLREACTOR_HAS_DLL 1 +#endif /* ! ACE_FLREACTOR_HAS_DLL */ + +#if defined (ACE_FLREACTOR_HAS_DLL) && (ACE_FLREACTOR_HAS_DLL == 1) +# if defined (ACE_FLREACTOR_BUILD_DLL) +# define ACE_FlReactor_Export ACE_Proper_Export_Flag +# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ACE_FLREACTOR_BUILD_DLL */ +# define ACE_FlReactor_Export ACE_Proper_Import_Flag +# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ACE_FLREACTOR_BUILD_DLL */ +#else /* ACE_FLREACTOR_HAS_DLL == 1 */ +# define ACE_FlReactor_Export +# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) +# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ACE_FLREACTOR_HAS_DLL == 1 */ + +// Set ACE_FLREACTOR_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ACE_FLREACTOR_NTRACE) +# if (ACE_NTRACE == 1) +# define ACE_FLREACTOR_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ACE_FLREACTOR_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ACE_FLREACTOR_NTRACE */ + +#if (ACE_FLREACTOR_NTRACE == 1) +# define ACE_FLREACTOR_TRACE(X) +#else /* (ACE_FLREACTOR_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ACE_FLREACTOR_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ACE_FLREACTOR_NTRACE == 1) */ + +#endif /* ACE_FLREACTOR_EXPORT_H */ + +// End of auto generated file. diff --git a/dep/acelite/ace/FlReactor/FlReactor.cpp b/dep/acelite/ace/FlReactor/FlReactor.cpp new file mode 100644 index 00000000000..4cab9c9df78 --- /dev/null +++ b/dep/acelite/ace/FlReactor/FlReactor.cpp @@ -0,0 +1,328 @@ +// $Id: FlReactor.cpp 95511 2012-01-27 09:40:38Z johnnyw $ + +#include "ace/FlReactor/FlReactor.h" + +#include /**/ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor) + +// Must be called with lock held +ACE_FlReactor::ACE_FlReactor (size_t size, + bool restart, + ACE_Sig_Handler *h) + : ACE_Select_Reactor (size, restart, h) +{ + // When the ACE_Select_Reactor is constructed it creates the notify + // pipe and registers it with the register_handler_i() method. The + // FlReactor overloads this method BUT because the + // register_handler_i occurs when constructing the base class + // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i() + // is called not the FlReactor register_handler_i(). This means + // that the notify pipe is registered with the ACE_Select_Reactor + // event handling code not the FlReactor and so notfications don't + // work. To get around this we simply close and re-opened the + // notification handler in the constructor of the FlReactor. + +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + this->notify_handler_->close (); + this->notify_handler_->open (this, 0); +#endif /* ACE_MT_SAFE */ +} + +ACE_FlReactor::~ACE_FlReactor (void) +{ +} + +// This is just the from ace/Reactor.cpp +// but we use the Fl functions to wait for an event, not , just use the Fl mechanism + // to wait for one or more events... + + // Wait for something to happen. + double t = 0; + if (max_wait_time != 0) + t = max_wait_time->sec () + max_wait_time->usec () / 1000000.0F; + + while (t > 0) { + t = Fl::wait (t); + } + + // Reset the width, in case it changed during the upcalls. + width = this->handler_rep_.max_handlep1 (); + + // Now actually read the result needed by the + // using + +int +ACE_FoxReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time) +{ + ACE_TRACE( "ACE_FoxReactor::wait_for_multiple_events" ); + + int nfound = 0; + do + { + max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time); + size_t width = this->handler_rep_.max_handlep1 (); + handle_set.rd_mask_ = this->wait_set_.rd_mask_; + handle_set.wr_mask_ = this->wait_set_.wr_mask_; + handle_set.ex_mask_ = this->wait_set_.ex_mask_; + + nfound = FoxWaitForMultipleEvents (width, + handle_set, + max_wait_time); + + } while( nfound == -1 && this->handle_error () > 0 ); + + if (nfound > 0) + { +#if !defined (ACE_WIN32) + handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); +#endif /* ACE_WIN32 */ + } + + return nfound; + // Timed out or input available +} + +int +ACE_FoxReactor::FoxWaitForMultipleEvents (int width, + ACE_Select_Reactor_Handle_Set &wait_set, + ACE_Time_Value */*max_wait_time*/) +{ + // Check to make sure our handle's are all usable. + ACE_Select_Reactor_Handle_Set temp_set = wait_set; + + if (ACE_OS::select (width, + temp_set.rd_mask_, + temp_set.wr_mask_, + temp_set.ex_mask_, + (ACE_Time_Value *) &ACE_Time_Value::zero ) == -1) + return -1; // Bad file arguments... + + // Qt processing. + this->fxapp->runOneEvent () ; + + // Reset the width, in case it changed during the upcalls. + width = handler_rep_.max_handlep1 (); + + // Now actually read the result needed by the using + // . + return ACE_OS::select(width, + orig_wait_set.rd_mask_, + orig_wait_set.wr_mask_, + orig_wait_set.ex_mask_, + (ACE_Time_Value *) &ACE_Time_Value::zero); +} + +// mbrudka: who needs wait_for_multiple_events? It seems it's cargo load now! +int +ACE_QtReactor::wait_for_multiple_events ( + ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time) +{ + ACE_TRACE ("ACE_QtReactor::wait_for_multiple_events"); + + int nfound = 0; + do + { + max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time); + size_t width = this->handler_rep_.max_handlep1 (); + handle_set.rd_mask_ = this->wait_set_.rd_mask_; + handle_set.wr_mask_ = this->wait_set_.wr_mask_; + handle_set.ex_mask_ = this->wait_set_.ex_mask_; + + nfound = QtWaitForMultipleEvents (width, + handle_set, + max_wait_time); + + } while( nfound == -1 && this->handle_error () > 0 ); + + if (nfound > 0) + { +#if !defined (ACE_WIN32) + handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); +#endif /* ACE_WIN32 */ + } + + return nfound; + // Timed out or input available +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/QtReactor/QtReactor.h b/dep/acelite/ace/QtReactor/QtReactor.h new file mode 100644 index 00000000000..72fe6d984e4 --- /dev/null +++ b/dep/acelite/ace/QtReactor/QtReactor.h @@ -0,0 +1,226 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file QtReactor.h + * + * $Id: QtReactor.h 94053 2011-05-11 13:44:41Z mhengstmengel $ + * + * @author Hamish Friedlander + * @author Balachandran Natarajan + */ +//============================================================================= + +#ifndef ACE_QTREACTOR_H +#define ACE_QTREACTOR_H + +#include /**/ "ace/pre.h" + +#include "ace/QtReactor/ACE_QtReactor_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Select_Reactor.h" +#include "ace/Map_Manager.h" + +#if defined (ACE_HAS_QT4) +# include "QtCore/qglobal.h" +#endif + +// QT toolkit specific includes. +#include /**/ +#include /**/ +#include /**/ +#include /**/ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_QtReactor + * + * @brief An object-oriented event demultiplexor and event handler + * dispatcher that uses the Qt Library. This class declaration + * also uses the extension facilities provided by the Qt. So, + * readers of the class declaration should not be upset with + * the appearence of the Keywords like Q_OBJECT, private slots + * etc. They are specific to Qt which uses these as a call back + * methods implementation mechanism. + * + * \note Marek Brudka : ACE_QtReactor was + * quickly bugfixed to meet ACE 5.4.2 (6.0.0?) deadline. + * While it passes QtReactor_Test now, there is a great + * room for improvements as the implementation is rather inefficient + * and obfuscated + * To be more specific: + * - reset_timeout always creates and removes qtimer after each + * timeout event! Obviously, for fast triggering timers this may + * lead to excessive memory management. + * - create/destroy_notifiers_for_handle may also be reworked to + * establish more clean relations between handles and QSocketNotifiers. + * - read/write_exception_event disable now SocketNotifier for a while + * to clear pending events. The cost of this operation is high: two hash + * acces in ACE and at least two next ones in Qt. This makes QtReator slow, + * but how clear pending events another way ? + * - there is qapplication() mutator, which sets new qapplication for + * QtReactor. This mutator violates implicit assumption about the + * relations between QTimer and QSocketNotifiers and QApplication for + * this reactor, namely one may expect that after qapplication(), none + * of QtReactor artifacts is bound to old qapplication. That's not true + * now, as QTimer and QSocketNotifiers are not reparent to new + * QApplication. As a result, the sequence: + * QApplication *old_qapp = new QApplication(..); + * QtReactor qreactor( old_qapp); + * // .. register handlers, schedule_timers etc + * QApplication *new_qapp = new QApplication(..); + * qreactor.qpplication( new_qapp ); + * delete old_qapp; + * almost always leads to problems and memory violation, because + * QSocketNotifiers are released by old_qapp. Therefore QtReactor + * should not be reparent now by setting new qapplication. + * - the lifecycle of Qt objects in ACE contects is rather mysterious + * and should be made more explicit. + * - valgrind reports a small memory leak in QtReactor_Test, though as for now + * it is not clear if the leak is introduced by QtReactor, or rather incorrect + * memory management in QtReactor_Test. + */ +class ACE_QtReactor_Export ACE_QtReactor + : public QObject, + public ACE_Select_Reactor +{ + + Q_OBJECT + +public: + /** \brief Constructor follows @ACE_Select_Reactor + \param QApplication *qapp, qapplication which runs events loop + */ + ACE_QtReactor (QApplication *qapp = 0, + ACE_Sig_Handler * = 0, + ACE_Timer_Queue * = 0, + int disable_notify_pipe = 0, + ACE_Reactor_Notify *notify = 0, + bool mask_signals = true, + int s_queue = ACE_SELECT_TOKEN::FIFO); + + /** \brief Constructor follows @ACE_Select_Reactor + \param QApplication *qapp, qapplication which runs events loop + */ + ACE_QtReactor (size_t size, + QApplication *qapp = 0, + bool restart = false, + ACE_Sig_Handler * = 0, + ACE_Timer_Queue * = 0, + int disable_notify_pipe = 0, + ACE_Reactor_Notify *notify = 0, + bool mask_signals = true, + int s_queue = ACE_SELECT_TOKEN::FIFO); + + virtual ~ACE_QtReactor (void); + + void qapplication (QApplication *qapp); + + // = Timer operations. + virtual long schedule_timer (ACE_Event_Handler *handler, + const void *arg, + const ACE_Time_Value &delay_time, + const ACE_Time_Value &interval); + + virtual int cancel_timer (ACE_Event_Handler *handler, + int dont_call_handle_close = 1); + + virtual int cancel_timer (long timer_id, + const void **arg = 0, + int dont_call_handle_close = 1); + +protected: + + // = Register timers/handles with Qt + + /// Register a single @a handler. + virtual int register_handler_i (ACE_HANDLE handle, + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask); + + /// Register a set of with Qt. + virtual int register_handler_i (const ACE_Handle_Set &handles, + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask); + + + /// Remove the associated with this @a handle. + virtual int remove_handler_i (ACE_HANDLE handle, + ACE_Reactor_Mask mask); + + /// Remove a set of . + virtual int remove_handler_i (const ACE_Handle_Set &handles, + ACE_Reactor_Mask mask); + + /// Wait for events to occur. + virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time); + + virtual int QtWaitForMultipleEvents (int width, + ACE_Select_Reactor_Handle_Set &wait_set, + ACE_Time_Value *max_wait_time); + + virtual int bit_ops (ACE_HANDLE handle, + ACE_Reactor_Mask mask, + ACE_Select_Reactor_Handle_Set &handle_set, + int ops); + + int set_enable_flag_by_mask (int flag_value, ACE_HANDLE handle, ACE_Reactor_Mask mask); + void create_notifiers_for_handle (ACE_HANDLE handle); + void destroy_notifiers_for_handle (ACE_HANDLE handle); + + // Wait for Qt events to occur + + /// Some Qt stuff that we need to have + QApplication *qapp_ ; + + /// Typedef of a map. + typedef ACE_Map_Manager MAP; + + /// A notifier for a read + MAP read_notifier_; + + /// A write notifier + MAP write_notifier_; + + /// An exception notifier + MAP exception_notifier_; + + /// The timer class that would provide timer-sgnals & single-shot timers + QTimer *qtime_ ; + +private: + /// This method ensures there's an Qt timeout for the first timeout + /// in the Reactor's Timer_Queue. + void reset_timeout (void); + /// reopens notification pipe to create SocketNotifier for it + void reopen_notification_pipe(void); + /// Deny access since member-wise won't work... + ACE_QtReactor (const ACE_QtReactor &); + ACE_QtReactor &operator= (const ACE_QtReactor &); + +private slots: + + // These are all part of the communication mechanism adopted in Qt. + /// Dispatch a Read Event + void read_event (int FD); + + /// Dispatch a Write Event + void write_event (int FD); + + /// Dispatch an exception event + void exception_event (int FD); + + /// Dispatch a timeout event + void timeout_event (void); +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* ACE_QTREACTOR_H */ diff --git a/dep/acelite/ace/RB_Tree.cpp b/dep/acelite/ace/RB_Tree.cpp index 0a6c8a08c8d..e9953b3ac68 100644 --- a/dep/acelite/ace/RB_Tree.cpp +++ b/dep/acelite/ace/RB_Tree.cpp @@ -1,4 +1,4 @@ -// $Id: RB_Tree.cpp 91813 2010-09-17 07:52:52Z johnnyw $ +// $Id: RB_Tree.cpp 94171 2011-06-09 01:49:08Z schmidt $ #ifndef ACE_RB_TREE_CPP #define ACE_RB_TREE_CPP @@ -49,8 +49,7 @@ ACE_RB_Tree::ACE_RB_Tree (ACE_Allocator : root_ (0), current_size_ (0) { - ACE_TRACE ("ACE_RB_Tree::" - "ACE_RB_Tree (ACE_Allocator *alloc)"); + ACE_TRACE ("ACE_RB_Tree::ACE_RB_Tree (ACE_Allocator *alloc)"); allocator_ = alloc; if (this->open (alloc) == -1) ACE_ERROR ((LM_ERROR, @@ -64,8 +63,7 @@ ACE_RB_Tree::ACE_RB_Tree (const ACE_RB_T : root_ (0), current_size_ (0) { - ACE_TRACE ("ACE_RB_Tree::" - "ACE_RB_Tree (const ACE_RB_Tree &rbt)"); + ACE_TRACE ("ACE_RB_Tree::ACE_RB_Tree (const ACE_RB_Tree &rbt)"); ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_); allocator_ = rbt.allocator_; @@ -85,6 +83,8 @@ ACE_RB_Tree::ACE_RB_Tree ( ACE_Allocator *alloc ) { + ACE_TRACE ("ACE_RB_Tree::ACE_RB_Tree (void *, ACE_Allocator *)"); + if (location != this) { this->root_ = 0; @@ -728,8 +728,7 @@ ACE_RB_Tree::insert_i (const EXT_ID &k, const INT_ID &t, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::insert_i (const EXT_ID &k, const INT_ID &t, " - "ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::insert_i"); // Find the closest matching node, if there is one. RB_SearchResult result = LEFT; diff --git a/dep/acelite/ace/RB_Tree.inl b/dep/acelite/ace/RB_Tree.inl index 7de889abf5b..6f085fd624e 100644 --- a/dep/acelite/ace/RB_Tree.inl +++ b/dep/acelite/ace/RB_Tree.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: RB_Tree.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: RB_Tree.inl 94310 2011-07-09 19:10:06Z schmidt $ #include "ace/Guard_T.h" #include "ace/Malloc_Base.h" @@ -194,8 +194,7 @@ ACE_RB_Tree::bind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::bind (const EXT_ID &ext_id, const INT_ID &int_id, " - "ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::bind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_RB_Tree_Node *&entry)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); return this->insert_i (ext_id, int_id, entry); @@ -238,8 +237,7 @@ ACE_RB_Tree::trybind (const EXT_ID &ext_ INT_ID &int_id, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id, " - "ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id, ACE_RB_Tree_Node *&entry)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); int result = this->insert_i (ext_id, int_id, entry); @@ -290,8 +288,7 @@ ACE_RB_Tree::rebind (const EXT_ID &ext_i const INT_ID &int_id, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, " - "ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_RB_Tree_Node *&entry)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); int result = this->insert_i (ext_id, int_id, entry); @@ -318,8 +315,7 @@ ACE_RB_Tree::rebind (const EXT_ID &ext_i const INT_ID &int_id, INT_ID &old_int_id) { - ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, " - "const INT_ID &int_id, INT_ID &old_int_id)"); + ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); ACE_RB_Tree_Node *entry; @@ -347,8 +343,7 @@ ACE_RB_Tree::rebind (const EXT_ID &ext_i INT_ID &old_int_id, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id," - "INT_ID &old_int_id, ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,INT_ID &old_int_id, ACE_RB_Tree_Node *&entry)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); int result = this->insert_i (ext_id, int_id, entry); @@ -380,8 +375,7 @@ ACE_RB_Tree::rebind (const EXT_ID &ext_i EXT_ID &old_ext_id, INT_ID &old_int_id) { - ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id," - "EXT_ID &old_ext_id, INT_ID &old_int_id)"); + ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,EXT_ID &old_ext_id, INT_ID &old_int_id)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); ACE_RB_Tree_Node *entry; @@ -411,9 +405,7 @@ ACE_RB_Tree::rebind (const EXT_ID &ext_i INT_ID &old_int_id, ACE_RB_Tree_Node *&entry) { - ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, " - "EXT_ID &old_ext_id, INT_ID &old_int_id, " - "ACE_RB_Tree_Node *&entry)"); + ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id, ACE_RB_Tree_Node *&entry)"); ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); int result = this->insert_i (ext_id, int_id, entry); diff --git a/dep/acelite/ace/README b/dep/acelite/ace/README index 6afb534a2bf..56321ab2aa4 100644 --- a/dep/acelite/ace/README +++ b/dep/acelite/ace/README @@ -1,4 +1,4 @@ -// $Id: README 92182 2010-10-08 08:21:27Z olli $ +// $Id: README 93588 2011-03-18 05:18:06Z olli $ ACE Portability Macros ---------------------- @@ -173,8 +173,6 @@ ACE_HAS_NONRECURSIVE_MUTEXES In addition to recursive mutexes, platform has non-recursive ones also. ACE_HAS_RECV_TIMEDWAIT Platform has the MIT pthreads APIs for -ACE_HAS_RECVFROM_TIMEDWAIT timed send/recv operations -ACE_HAS_RECVMSG_TIMEDWAIT ACE_HAS_RLIMIT_RESOURCE_ENUM Platform has enum instead of int for first argument to ::{get,set}rlimit (). The @@ -201,19 +199,12 @@ ACE_SCANDIR_CMP_USES_CONST_VOIDPTR The OS's scandir() comparator function const void*). ACE_SCANDIR_SEL_LACKS_CONST The OS's scandir() selector function is int (*selector)(ACE_DIRENT*) -ACE_HAS_SEND_TIMEDWAIT -ACE_HAS_SENDTO_TIMEDWAIT -ACE_HAS_SENDMSG_TIMEDWAIT ACE_HAS_STDARG_THR_DEST Platform has void (*)(...) prototype for pthread_key_create() destructor (e.g., LynxOS). ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS Platform/compiler supports Win32 structural exceptions -ACE_HAS_READ_TIMEDWAIT -ACE_HAS_READV_TIMEDWAIT -ACE_HAS_WRITE_TIMEDWAIT -ACE_HAS_WRITEV_TIMEDWAIT ACE_HAS_4_4BSD_SENDMSG_RECVMSG Platform has BSD 4.4 sendmsg()/recvmsg() APIs. ACE_HAS_P_READ_WRITE Platform has pread() and @@ -261,9 +252,6 @@ ACE_HAS_BROKEN_NESTED_TEMPLATES MSVC has trouble with defining structs and classes ACE_HAS_BROKEN_POSIX_TIME Platform defines struct timespec in -ACE_HAS_BROKEN_RANDR OS/compiler's header files are - inconsistent with libC - definition of rand_r(). ACE_HAS_BROKEN_T_ERROR Compiler/platform has the wrong prototype for t_error(), i.e., t_error(char *) rather than @@ -353,8 +341,6 @@ ACE_USES_IPV4_IPV6_MIGRATION Enable IPv6 support in ACE on turned on by default. ACE_HAS_IPV6_V6ONLY Platform supports the IPPROTO_IPV6 level IPV6_V6ONLY socket option. -ACE_HAS_IRIX62_THREADS Platform supports the very odd - IRIX 6.2 threads... ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager instance to be created in main (int, char *[]), instead of as @@ -482,12 +468,6 @@ ACE_HAS_PTHREADS Platform supports POSIX one. Also may need some ACE_HAS_... thing for extensions. -ACE_HAS_PTHREADS_DRAFT4 Platform's 'Pthreads' is .4a draft 4 -ACE_HAS_PTHREADS_DRAFT6 Platform's 'Pthreads' is .4a draft 6 -ACE_HAS_PTHREADS_DRAFT7 Platform's 'Pthreads' is .1c draft 7 -ACE_HAS_PTHREADS_STD Platform supports POSIX.1c-1995 threads - (This is the final standard - Pthreads). ACE_HAS_PTHREADS_UNIX98_EXT Platform has the UNIX98 extensions to Pthreads (rwlocks) ACE_HAS_PTHREAD_ATTR_SETCREATESUSPEND_NP Platform has @@ -694,9 +674,6 @@ ACE_HAS_UCONTEXT_T Platform supports ucontext_t ACE_HAS_UNION_WAIT The wait() system call takes a (union wait *) rather than int * -ACE_HAS_UNIXWARE_SVR4_SIGNAL_T Has inconsistent SVR4 signal - stuff, but not the same as the - other platforms ACE_HAS_VALGRIND Running with valgrind ACE_HAS_VERBOSE_NOTSUP Prints out console message in ACE_NOTSUP. Useful for @@ -969,7 +946,6 @@ ACE_LACKS_PWD_REENTRANT_FUNCTIONS Platform lacks getpwnam_r() ACE_LACKS_QSORT Compiler/platform lacks the standard C library qsort() function -ACE_LACKS_RAND_REENTRANT_FUNCTIONS Platform lacks rand_r() ACE_LACKS_READLINK Platform lacks the readlink() function. ACE_LACKS_READV Platform doesn't define readv, so use our own diff --git a/dep/acelite/ace/RW_Mutex.h b/dep/acelite/ace/RW_Mutex.h index aaaabdc0b96..99ba4c0d3fc 100644 --- a/dep/acelite/ace/RW_Mutex.h +++ b/dep/acelite/ace/RW_Mutex.h @@ -4,7 +4,7 @@ /** * @file RW_Mutex.h * - * $Id: RW_Mutex.h 83934 2008-12-01 13:47:06Z johnnyw $ + * $Id: RW_Mutex.h 93359 2011-02-11 11:33:12Z mcorino $ * * Moved from Synch.h. * @@ -92,7 +92,7 @@ public: /** * Note, for interface uniformity with other synchronization - * wrappers we include the method. This is implemented + * wrappers we include the tryacquire() method. This is implemented * as a write-lock to be safe... Returns -1 on failure. If we * "failed" because someone else already had the lock, @c errno is * set to @c EBUSY. @@ -115,11 +115,11 @@ protected: /// Readers/writer lock. ACE_rwlock_t lock_; - /// Keeps track of whether has been called yet to avoid - /// multiple calls, e.g., explicitly and implicitly in the - /// destructor. This flag isn't protected by a lock, so make sure + /// Keeps track of whether remove() has been called yet to avoid + /// multiple remove() calls, e.g., explicitly and implicitly in the + /// destructor. This flag isn't protected by a lock, so make sure /// that you don't have multiple threads simultaneously calling - /// on the same object, which is a bad idea anyway... + /// remove() on the same object, which is a bad idea anyway... bool removed_; private: diff --git a/dep/acelite/ace/Reactor.h b/dep/acelite/ace/Reactor.h index 6198b4ebcfc..57d2ec7ea91 100644 --- a/dep/acelite/ace/Reactor.h +++ b/dep/acelite/ace/Reactor.h @@ -4,7 +4,7 @@ /** * @file Reactor.h * - * $Id: Reactor.h 92345 2010-10-24 12:39:33Z johnnyw $ + * $Id: Reactor.h 95774 2012-05-17 15:45:58Z shuston $ * * @author Irfan Pyarali * @author Douglas C. Schmidt @@ -110,11 +110,11 @@ public: // i.e., the one returned from ACE_Reactor::instance(). /** * Run the event loop until the - * + * ACE_Reactor::handle_events()/ACE_Reactor::alertable_handle_events() * method returns -1 or the end_event_loop() method is invoked. * Note that this method can only be used by the singleton * ACE_Reactor::instance(). Thus, to run another reactor use - * . + * ACE_Reactor::run_reactor_event_loop(). * * @deprecated Use ACE_Reactor::instance()->run_reactor_event_loop() instead */ @@ -178,18 +178,23 @@ public: // These methods work with an instance of a reactor. /** - * Run the event loop until the - * ACE_Reactor::handle_events()/ACE_Reactor::alertable_handle_events() - * method returns -1 or the end_reactor_event_loop() method is invoked. + * Run the event loop until the ACE_Reactor::handle_events() or + * ACE_Reactor::alertable_handle_events() method returns -1 or + * the end_reactor_event_loop() method is invoked. */ int run_reactor_event_loop (REACTOR_EVENT_HOOK = 0); int run_alertable_reactor_event_loop (REACTOR_EVENT_HOOK = 0); /** * Run the event loop until the ACE_Reactor::handle_events() or - * methods returns -1, the + * ACE_Reactor::alertable_handle_events() method returns -1, the * end_reactor_event_loop() method is invoked, or the ACE_Time_Value - * expires. + * expires while the underlying event demultiplexer is waiting for + * events. + * Note that it is possible for events to continuously be available, + * avoiding the need to wait for events. In this situation the timeout + * value will not have an opportunity to expire until the next time + * the underlying event demultiplexer waits for events. */ int run_reactor_event_loop (ACE_Time_Value &tv, REACTOR_EVENT_HOOK = 0); @@ -559,13 +564,19 @@ public: * @see cancel_timer() * @see reset_timer_interval() * - * @param event_handler Event handler to schedule on reactor - * @param arg Argument passed to the handle_timeout() method of - * event_handler - * @param delay Time interval after which the timer will expire - * @param interval Time interval after which the timer will be automatically - * rescheduled - * @return -1 on failure, a timer_id value on success + * @param event_handler Event handler to schedule on reactor. The handler's + * handle_timeout() method will be called when this + * scheduled timer expires. + * @param arg Argument passed to the handle_timeout() method of + * event_handler. + * @param delay Time interval after which the timer will expire. + * @param interval Time interval for which the timer will be + * automatically rescheduled if the handle_timeout() + * callback does not return a value less than 0. + * + * @retval timer id, on success. The id can be used to + * cancel or reschedule this timer. + * @retval -1 on failure, with errno set. */ virtual long schedule_timer (ACE_Event_Handler *event_handler, const void *arg, diff --git a/dep/acelite/ace/Recursive_Thread_Mutex.h b/dep/acelite/ace/Recursive_Thread_Mutex.h index 6ddd04bd6bf..240d9ce60a0 100644 --- a/dep/acelite/ace/Recursive_Thread_Mutex.h +++ b/dep/acelite/ace/Recursive_Thread_Mutex.h @@ -4,7 +4,7 @@ /** * @file Recursive_Thread_Mutex.h * - * $Id: Recursive_Thread_Mutex.h 91688 2010-09-09 11:21:50Z johnnyw $ + * $Id: Recursive_Thread_Mutex.h 93359 2011-02-11 11:33:12Z mcorino $ * * Moved from Synch.h. * @@ -72,7 +72,7 @@ public: int acquire (ACE_Time_Value &tv); /** - * If @a tv == 0 the call directly. Otherwise, Block the + * If @a tv == 0 the call acquire() directly. Otherwise, Block the * thread until we acquire the mutex or until @a tv times out, in * which case -1 is returned with @c errno == @c ETIME. Note that * <*tv> is assumed to be in "absolute" rather than "relative" time. @@ -89,14 +89,14 @@ public: int tryacquire (void); /** - * Acquire mutex ownership. This calls and is only + * Acquire mutex ownership. This calls acquire() and is only * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ int acquire_read (void); /** - * Acquire mutex ownership. This calls and is only + * Acquire mutex ownership. This calls acquire() and is only * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ @@ -104,7 +104,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls - * and is only here to make the + * tryacquire() and is only here to make the * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to @@ -114,7 +114,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls - * and is only here to make the + * tryacquire() and is only here to make the * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to @@ -169,11 +169,11 @@ protected: /// Recursive mutex. ACE_recursive_thread_mutex_t lock_; - /// Keeps track of whether has been called yet to avoid - /// multiple calls, e.g., explicitly and implicitly in the + /// Keeps track of whether remove() has been called yet to avoid + /// multiple remove() calls, e.g., explicitly and implicitly in the /// destructor. This flag isn't protected by a lock, so make sure /// that you don't have multiple threads simultaneously calling - /// on the same object, which is a bad idea anyway... + /// remove() on the same object, which is a bad idea anyway... bool removed_; private: diff --git a/dep/acelite/ace/Registry_Name_Space.h b/dep/acelite/ace/Registry_Name_Space.h index eb9f77587f6..289e61039fa 100644 --- a/dep/acelite/ace/Registry_Name_Space.h +++ b/dep/acelite/ace/Registry_Name_Space.h @@ -4,7 +4,7 @@ /** * @file Registry_Name_Space.h * - * $Id: Registry_Name_Space.h 92345 2010-10-24 12:39:33Z johnnyw $ + * $Id: Registry_Name_Space.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Irfan Pyarali (irfan@cs.wustl.edu) */ @@ -67,13 +67,13 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Name_Space or bind a new name to the context, if it didn't - * exist yet. (Wide charcter strings interface). + * exist yet. (Wide character strings interface). */ int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in = ""); - /// Delete a name from a ACE_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Name_Space (Wide character strings /// Interface). int unbind (const ACE_NS_WString &name_in); diff --git a/dep/acelite/ace/Remote_Name_Space.h b/dep/acelite/ace/Remote_Name_Space.h index 683f36c7963..73c9272f07d 100644 --- a/dep/acelite/ace/Remote_Name_Space.h +++ b/dep/acelite/ace/Remote_Name_Space.h @@ -4,7 +4,7 @@ /** * @file Remote_Name_Space.h * - * $Id: Remote_Name_Space.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Remote_Name_Space.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Prashant Jain */ @@ -77,18 +77,18 @@ public: /** * Overwrite the value or type of an existing name in a * ACE_Remote_Name_Space or bind a new name to the context, if it - * didn't exist yet. (Wide charcter strings interface). + * didn't exist yet. (Wide character strings interface). */ virtual int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in = ""); - /// Delete a name from a ACE_Remote_Name_Space (Wide charcter strings + /// Delete a name from a ACE_Remote_Name_Space (Wide character strings /// Interface). virtual int unbind (const ACE_NS_WString &name_in); /// Get value and type of a given name binding (Wide chars). The - /// caller is responsible for deleting both and ! + /// caller is responsible for deleting both @a value_out and @a type_out! virtual int resolve (const ACE_NS_WString &name_in, ACE_NS_WString &value_out, char *&type_out); diff --git a/dep/acelite/ace/Remote_Tokens.h b/dep/acelite/ace/Remote_Tokens.h index 3c9ed94f561..3d09f7f2fc4 100644 --- a/dep/acelite/ace/Remote_Tokens.h +++ b/dep/acelite/ace/Remote_Tokens.h @@ -4,7 +4,7 @@ /** * @file Remote_Tokens.h * - * $Id: Remote_Tokens.h 92345 2010-10-24 12:39:33Z johnnyw $ + * $Id: Remote_Tokens.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) * @author Tim Harrison (harrison@cs.wustl.edu) @@ -42,7 +42,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * distributed token operations. It is similar to the * ACE_Token_Proxy. * @todo - * Distributed sleep_hooks have not been implemented. + * Distributed sleep_hooks have not been implemented. * is not implemented. */ class ACE_Export ACE_Remote_Token_Proxy : public ACE_Token_Proxy diff --git a/dep/acelite/ace/SOCK_Dgram.cpp b/dep/acelite/ace/SOCK_Dgram.cpp index 0530584b059..3706d780ad5 100644 --- a/dep/acelite/ace/SOCK_Dgram.cpp +++ b/dep/acelite/ace/SOCK_Dgram.cpp @@ -1,4 +1,4 @@ -// $Id: SOCK_Dgram.cpp 91622 2010-09-06 08:26:30Z sma $ +// $Id: SOCK_Dgram.cpp 95533 2012-02-14 22:59:17Z wotte $ #include "ace/SOCK_Dgram.h" @@ -320,7 +320,7 @@ ACE_SOCK_Dgram::send (const iovec iov[], // Determine the total length of all the buffers in . for (i = 0; i < n; i++) -#if ! (defined(__BORLANDC__) || defined(linux) || defined(ACE_HAS_RTEMS)) +#if ! (defined(__BORLANDC__) || defined(ACE_LINUX) || defined(ACE_HAS_RTEMS)) // The iov_len is unsigned on Linux, RTEMS and with Borland. If we go // ahead and try the if, it will emit a warning. if (iov[i].iov_len < 0) @@ -369,7 +369,7 @@ ACE_SOCK_Dgram::recv (iovec iov[], int i; for (i = 0; i < n; i++) -#if ! (defined(__BORLANDC__) || defined(linux) || defined(ACE_HAS_RTEMS)) +#if ! (defined(__BORLANDC__) || defined(ACE_LINUX) || defined(ACE_HAS_RTEMS)) // The iov_len is unsigned on Linux, RTEMS and with Borland. If we go // ahead and try the if, it will emit a warning. if (iov[i].iov_len < 0) @@ -596,7 +596,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq, 0, sizeof (lmreq)); -#if defined(__linux__) +#if defined(ACE_LINUX) if (net_if != 0) { lmreq.ipv6mr_interface = ACE_OS::if_nametoindex (ACE_TEXT_ALWAYS_CHAR(net_if)); @@ -674,6 +674,6 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq, return 0; } -#endif /* __linux__ && ACE_HAS_IPV6 */ +#endif /* ACE_LINUX && ACE_HAS_IPV6 */ ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/SOCK_Dgram.h b/dep/acelite/ace/SOCK_Dgram.h index c26c5ff2c35..3a8eba63da7 100644 --- a/dep/acelite/ace/SOCK_Dgram.h +++ b/dep/acelite/ace/SOCK_Dgram.h @@ -4,7 +4,7 @@ /** * @file SOCK_Dgram.h * - * $Id: SOCK_Dgram.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SOCK_Dgram.h 92580 2010-11-15 09:48:02Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -206,8 +206,7 @@ public: protected: /// Open is shared by this and by . - int shared_open (const ACE_Addr &local, - int protocol_family); + int shared_open (const ACE_Addr &local, int protocol_family); /// Create a multicast addr/if pair, in format useful for system calls. /// If mreq param is NULL, just verify the passed addr/interface specs. diff --git a/dep/acelite/ace/SOCK_Dgram_Bcast.cpp b/dep/acelite/ace/SOCK_Dgram_Bcast.cpp index fec4c39a259..f6226665e25 100644 --- a/dep/acelite/ace/SOCK_Dgram_Bcast.cpp +++ b/dep/acelite/ace/SOCK_Dgram_Bcast.cpp @@ -1,4 +1,4 @@ -// $Id: SOCK_Dgram_Bcast.cpp 91685 2010-09-09 09:35:14Z johnnyw $ +// $Id: SOCK_Dgram_Bcast.cpp 93359 2011-02-11 11:33:12Z mcorino $ #include "ace/SOCK_Dgram_Bcast.h" @@ -181,7 +181,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) // Silently skip link interfaces if (ifr->ifr_addr.sa_family == AF_LINK) continue; -#endif /* __QNX__ */ +#endif /* __QNX__ || ACE_VXWORKS */ // Compare host ip address with interface ip address. if (host_name) { diff --git a/dep/acelite/ace/SOCK_Dgram_Mcast.cpp b/dep/acelite/ace/SOCK_Dgram_Mcast.cpp index 5f31771b0f1..91167e0ac14 100644 --- a/dep/acelite/ace/SOCK_Dgram_Mcast.cpp +++ b/dep/acelite/ace/SOCK_Dgram_Mcast.cpp @@ -1,4 +1,4 @@ -// $Id: SOCK_Dgram_Mcast.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: SOCK_Dgram_Mcast.cpp 95679 2012-04-03 22:55:46Z shuston $ #include "ace/SOCK_Dgram_Mcast.h" @@ -8,14 +8,22 @@ #include "ace/os_include/net/os_if.h" #include "ace/os_include/arpa/os_inet.h" -#if defined (__linux__) && defined (ACE_HAS_IPV6) +#if defined (ACE_LINUX) && defined (ACE_HAS_IPV6) #include "ace/OS_NS_sys_socket.h" #endif -#if defined (ACE_HAS_IPV6) && defined (ACE_WIN32) +#if defined (ACE_WIN32) #include /**/ #endif +#if defined (ACE_HAS_GETIFADDRS) +# if defined (ACE_VXWORKS) +# include /**/ +# else +# include /**/ +# endif /*ACE_VXWORKS */ +#endif /* ACE_HAS_GETIFADDRS */ + #if !defined (__ACE_INLINE__) #include "ace/SOCK_Dgram_Mcast.inl" #endif /* __ACE_INLINE__ */ @@ -253,135 +261,135 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, if (ACE_BIT_ENABLED (this->opts_, OPT_NULLIFACE_ALL) && net_if == 0) { -#if defined (ACE_HAS_IPV6) - if (mcast_addr.get_type () == AF_INET6) + int family = mcast_addr.get_type (); + size_t nr_subscribed = 0; + +#if defined (ACE_HAS_GETIFADDRS) + + // Take advantage of the BSD getifaddrs function that simplifies + // access to connected interfaces. + struct ifaddrs *ifap = 0; + struct ifaddrs *p_if = 0; + + if (::getifaddrs (&ifap) != 0) + return -1; + + // Not every interface is for IP, and not all are up and multicast. + for (p_if = ifap; + p_if != 0; + p_if = p_if->ifa_next) { - size_t nr_subscribed = 0; -# if defined(__linux__) - struct if_nameindex *intf; + // Some OSes can return interfaces with no ifa_addr if the + // interface has no assigned address. + // If there is an address but it's not the family we want, ignore it. + if (p_if->ifa_addr == 0 || p_if->ifa_addr->sa_family != family) + continue; - intf = ACE_OS::if_nameindex (); + // Check to see if it's up and supports multicast. + unsigned int wanted = IFF_UP | IFF_MULTICAST; + if ((p_if->ifa_flags & wanted) != wanted) + continue; - if (intf == 0) - return -1; - - int index = 0; - while (intf[index].if_index != 0 || intf[index].if_name != 0) + // Sometimes the kernel returns 0.0.0.0 as the interface + // address, skip those... + if (p_if->ifa_addr->sa_family == PF_INET) { - if (this->join (mcast_addr, reuse_addr, - ACE_TEXT_CHAR_TO_TCHAR(intf[index].if_name)) == 0) - ++nr_subscribed; + struct sockaddr_in *addr = + reinterpret_cast (p_if->ifa_addr); - ++index; + if (addr->sin_addr.s_addr == INADDR_ANY) + continue; } +# if defined (ACE_HAS_IPV6) + else if (p_if->ifa_addr->sa_family == AF_INET6) + { + struct sockaddr_in6 *addr = + reinterpret_cast (p_if->ifa_addr); - ACE_OS::if_freenameindex (intf); + // Skip the ANY address + if (IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr)) + continue; + } +# endif /* ACE_HAS_IPV6 */ + + // Ok, now join on this interface. + if (this->join (mcast_addr, + reuse_addr, + ACE_TEXT_CHAR_TO_TCHAR(p_if->ifa_name)) == 0) + ++nr_subscribed; + } + + ::freeifaddrs (ifap); # elif defined (ACE_WIN32) - IP_ADAPTER_ADDRESSES tmp_addrs; - // Initial call to determine actual memory size needed - DWORD dwRetVal; - ULONG bufLen = 0; - if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, - 0, - 0, - &tmp_addrs, - &bufLen)) != ERROR_BUFFER_OVERFLOW) - return -1; // With output bufferlength 0 this can't be right. - - // Get required output buffer and retrieve info for real. - PIP_ADAPTER_ADDRESSES pAddrs; - char *buf; - ACE_NEW_RETURN (buf, - char[bufLen], - -1); - pAddrs = reinterpret_cast (buf); - if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, - 0, - 0, - pAddrs, - &bufLen)) != NO_ERROR) - { - delete[] buf; // clean up - return -1; - } - - while (pAddrs) - { - if (this->join (mcast_addr, reuse_addr, - ACE_TEXT_CHAR_TO_TCHAR(pAddrs->AdapterName)) == 0) - ++nr_subscribed; - - pAddrs = pAddrs->Next; - } - - delete[] buf; // clean up - -# endif /* ACE_WIN32 */ - - if (nr_subscribed == 0) - { - errno = ENODEV; - return -1; - } - - return 1; - } - else + IP_ADAPTER_ADDRESSES tmp_addrs; + // Initial call to determine actual memory size needed + DWORD dwRetVal; + ULONG bufLen = 0; + // Note... GetAdaptersAddresses returns different bufLen values depending + // on how many multicast joins there are on the system. To avoid this, + // specify that we don't want to know about multicast addresses. This + // does not avoid multicastable interfaces and makes the size-check + // more reliable across varying conditions. + DWORD flags = GAA_FLAG_SKIP_MULTICAST; + if ((dwRetVal = ::GetAdaptersAddresses (family, + flags, + 0, + &tmp_addrs, + &bufLen)) != ERROR_BUFFER_OVERFLOW) { - // Subscribe on all local multicast-capable network interfaces, by - // doing recursive calls with specific interfaces. + errno = dwRetVal; + return -1; // With output bufferlength 0 this can't be right. + } - ACE_INET_Addr *if_addrs = 0; - size_t if_cnt; + // Get required output buffer and retrieve info for real. + PIP_ADAPTER_ADDRESSES pAddrs; + char *buf; + ACE_NEW_RETURN (buf, + char[bufLen], + -1); + pAddrs = reinterpret_cast (buf); + if ((dwRetVal = ::GetAdaptersAddresses (family, + flags, + 0, + pAddrs, + &bufLen)) != NO_ERROR) + { + delete[] buf; // clean up + errno = dwRetVal; + return -1; + } - if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) - return -1; + for (; pAddrs; pAddrs = pAddrs->Next) + { + if (pAddrs->OperStatus != IfOperStatusUp) + continue; - size_t nr_subscribed = 0; - - if (if_cnt < 2) + // The ACE_SOCK_Dgram::make_multicast_ifaddr (IPv4), called by join(), + // can only deal with a dotted-decimal address, not an interface name. + if (family == AF_INET) { - if (this->join (mcast_addr, - reuse_addr, - ACE_TEXT ("0.0.0.0")) == 0) + ACE_INET_Addr intf_addr ((sockaddr_in*)(pAddrs->FirstUnicastAddress->Address.lpSockaddr), + pAddrs->FirstUnicastAddress->Address.iSockaddrLength); + char intf_addr_str[INET_ADDRSTRLEN]; + intf_addr.get_host_addr (intf_addr_str, sizeof (intf_addr_str)); + if (this->join (mcast_addr, reuse_addr, + ACE_TEXT_CHAR_TO_TCHAR(intf_addr_str)) == 0) ++nr_subscribed; } else { - // Iterate through all the interfaces, figure out which ones - // offer multicast service, and subscribe to them. - while (if_cnt > 0) - { - --if_cnt; - - // Convert to 0-based for indexing, next loop check. - if (if_addrs[if_cnt].get_type () != AF_INET || if_addrs[if_cnt].is_loopback ()) - continue; - char addr_buf[INET6_ADDRSTRLEN]; - if (this->join (mcast_addr, - reuse_addr, - ACE_TEXT_CHAR_TO_TCHAR - (if_addrs[if_cnt].get_host_addr (addr_buf, INET6_ADDRSTRLEN))) == 0) - ++nr_subscribed; - } + if (this->join (mcast_addr, reuse_addr, + ACE_TEXT_CHAR_TO_TCHAR(pAddrs->AdapterName)) == 0) + ++nr_subscribed; } - - delete [] if_addrs; - - if (nr_subscribed == 0) - { - errno = ENODEV; - return -1; - } - - // 1 indicates a "short-circuit" return. This handles the - // recursive behavior of checking all the interfaces. - return 1; - } -#else + + delete[] buf; // clean up + +# else + // Subscribe on all local multicast-capable network interfaces, by // doing recursive calls with specific interfaces. @@ -391,8 +399,6 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) return -1; - size_t nr_subscribed = 0; - if (if_cnt < 2) { if (this->join (mcast_addr, @@ -409,7 +415,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, --if_cnt; // Convert to 0-based for indexing, next loop check. - if (if_addrs[if_cnt].is_loopback ()) + if (if_addrs[if_cnt].get_type () != family || if_addrs[if_cnt].is_loopback ()) continue; char addr_buf[INET6_ADDRSTRLEN]; if (this->join (mcast_addr, @@ -422,18 +428,19 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, delete [] if_addrs; +# endif /* ACE_WIN32 */ + if (nr_subscribed == 0) { errno = ENODEV; return -1; } - // 1 indicates a "short-circuit" return. This handles the - // recursive behavior of checking all the interfaces. return 1; -#endif /* ACE_HAS_IPV6 */ } + // Subscribe on a specific interface, or on the default interface. + #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { @@ -441,6 +448,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, return -1; } else +#endif /* ACE_HAS_IPV6 - Fall into IPv4-only case */ { // Validate passed multicast addr and iface specifications. if (this->make_multicast_ifaddr (0, @@ -448,13 +456,6 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, net_if) == -1) return -1; } -#else - // Validate passed multicast addr and iface specifications. - if (this->make_multicast_ifaddr (0, - mcast_addr, - net_if) == -1) - return -1; -#endif /* ACE_HAS_IPV6 */ return 0; @@ -552,7 +553,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_i (const ACE_INET_Addr &mcast_addr, ip_mreq mreq; #if defined (ACE_HAS_IPV6) ipv6_mreq mreq6; -#endif /* __linux__ && ACE_HAS_IPV6 */ +#endif /* ACE_LINUX && ACE_HAS_IPV6 */ // Open the socket IFF this is the first ::subscribe and ::open // was not explicitly invoked. @@ -616,7 +617,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr, if (mcast_addr.get_type () == AF_INET6) { size_t nr_unsubscribed = 0; -# if defined(__linux__) +# if defined(ACE_LINUX) struct if_nameindex *intf; diff --git a/dep/acelite/ace/SOCK_Dgram_Mcast.h b/dep/acelite/ace/SOCK_Dgram_Mcast.h index 7c42e46e78a..a2e7def0fe6 100644 --- a/dep/acelite/ace/SOCK_Dgram_Mcast.h +++ b/dep/acelite/ace/SOCK_Dgram_Mcast.h @@ -4,7 +4,7 @@ /** * @file SOCK_Dgram_Mcast.h * - * $Id: SOCK_Dgram_Mcast.h 91626 2010-09-07 10:59:20Z johnnyw $ + * $Id: SOCK_Dgram_Mcast.h 96014 2012-08-08 15:30:01Z sma $ * * @author Irfan Pyrali * @author Tim Harrison @@ -46,50 +46,56 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * * Supports multiple simultaneous subscriptions, unsubscription from one or * all subscriptions, and independent send/recv address and interface - * specifications. Template parameters and/or ctor arguments determine - * per-instance optional functionality. + * specifications. Constructor arguments determine per-instance optional + * functionality. * - * Note that multicast semantics and implementation details are _very_ + * Note that multicast semantics and implementation details are @i very * environment-specific; this class is just a wrapper around the underlying * implementation and does not try to normalize the concept of multicast * communications. * * Usage Notes: - * - Send and Recv addresses and network interfaces, but not port#, are - * independent. While this instance is open, 1 send interface (and a default - * send address) is in effect and 0, 1, or multiple recv addresses/interfaces - * are in effect. - * - The first / invocation defines the network interface + * - Send and receive addresses and network interfaces, but not port number, + * are independent. While this instance is open, one send interface (and a + * default send address) is in effect and 0, 1, or multiple receive + * addresses/interfaces are in effect. + * - The first open()/subscribe() invocation defines the network interface * and default address used for all sends by this instance, defines the - * port# and optionally the multicast address bound to the underlying - * socket, and defines the (one) port# that is used for all subscribes - * (subsequent subscribes must pass the same port# or '0'). + * port number and optionally the multicast address bound to the underlying + * socket, and defines the (one) port number that is used for all subscribes + * (subsequent subscribes must pass the same port number or 0). * - The default loopback state is not explicitly set; the environment will - * determine the default state. Note that some environments (e.g. some Win32) - * do not allow the default to be changed, and that the semantics of - * loopback control are environment dependent (e.g. sender vs receiver - * control). + * determine the default state. Note that some environments (e.g. some + * Windows versions) do not allow the default to be changed, and that the + * semantics of loopback control are environment dependent (e.g. sender vs. + * receiver control). * - In general, due to multicast design and implementation quirks/bugs, it is * difficult to tell which address a received message was sent to or which * interface it was received on (even if only one subscription is active). - * However; there are filtering options that can be applied, to narrow it + * However, there are filtering options that can be applied, to narrow it * down considerably. * - * Interface specification notes (for and ): - * - If net_if == 0, the null_iface_opt option determines whether only the - * system "default" interface or all interfaces is affected. Specifying - * "all" interfaces is supported only for environments for which - * is properly implemented. + * Interface specification notes (for subscribe() and unsubscribe()): + * - If @a net_if == 0, the @c OPT_NULLIFACE_ALL and @c OPT_NULLIFACE_ONE + * options determine whether only the system default interface + * (if @c OPT_NULLIFACE_ONE is set) or all interfaces (if + * @c OPT_NULLIFACE_ALL is set) is affected. Specifying all interfaces + * functions correctly only on: + * + Windows + * + Platforms with the ACE_HAS_GETIFADDRS config setting (includes Linux) + * + Platforms which accept the IP address as an interface + * name/specification + * + Systems with only one non-loopback interface. + * Other platforms require additional supporting code. * - Multiple subscriptions for the same address but different interfaces is * normally supported, but re-subscription to an address/interface that is * already subscribed is normally not allowed. - * - The interface specification syntax is environment-specific. + * - The @a net_if interface specification syntax is environment-specific. * UNIX systems will normally use device specifications such as "le0" or * "elxl1", while other systems will use the IP address of the interface. * Some platforms, such as pSoS, support only cardinal numbers as network * interface specifications; for these platforms, just give these numbers in - * alphanumeric form and will convert them into numbers via - * ACE_OS::atoi(). + * string form and join() will convert them into numbers. */ class ACE_Export ACE_SOCK_Dgram_Mcast : public ACE_SOCK_Dgram { @@ -99,78 +105,88 @@ public: * @brief Option parameters. * * These control per-instance optional functionality. They are set via - * optional constructor arguments. + * an optional constructor argument. + * * @note Certain option values are not valid for all environments (see * comments in source file for environment-specific restrictions). Default * values are always valid values for the compilation environment. */ enum options { - // Define whether a specific (multicast) address (in addition to the port#) - // is bound to the socket. - // Notes: - // - Effect of doing this is stack/environment dependent, but in most - // environments can be used to filter out unwanted unicast, broadcast, and - // (other) multicast messages sent to the same port#. - // - Some IP stacks (e.g. some Win32) do not support binding multicast - // addresses. Using this option will always cause an error. - // - It's not strictly possible for user code to do this level of filtering - // w/out the bind; some environments support ways to determine which address - // a message was sent _to_, but this class interface does not support access - // to that info. - // - The address (and port#) passed to (or the first , if - // is not explicitly invoked) is the one that is bound. - // + /* Define whether a specific multicast address (in addition to the port + * number) is bound to the socket. + * @note: + * - Effect of doing this is stack/environment dependent, but in most + * environments can be used to filter out unwanted unicast, broadcast, + * and (other) multicast messages sent to the same port number. + * - Some IP stacks (e.g. some Windows) do not support binding multicast + * addresses. Using this option will always cause an open() error. + * - It's not strictly possible for user code to do this level of filtering + * without the bind; some environments support ways to determine which + * address a message was sent to, but this class interface does not + * support access to that information. + * - The address (and port number) passed to open() (or the first + * join(), if open() is not explicitly invoked) is the one that is bound. + */ + /// Disable address bind. (Bind only port.) - // Note that this might seem odd, but we need a way to distinquish between - // default behavior, which might or might not be to bind, and explicitely - // choosing to bind or not to bind--which "is the question." ;-) + /// @note This might seem odd, but we need a way to distinguish between + /// default behavior, which might or might not be to bind, and explicitly + /// choosing to bind or not to bind--which "is the question." ;-) OPT_BINDADDR_NO = 0, /// Enable address bind. (Bind port and address.) OPT_BINDADDR_YES = 1, /// Default value for BINDADDR option. (Environment-dependent.) #if defined (ACE_LACKS_PERFECT_MULTICAST_FILTERING) \ && (ACE_LACKS_PERFECT_MULTICAST_FILTERING == 1) - // Platforms that don't support perfect filtering. Note that perfect - // filtering only really applies to multicast traffic, not unicast - // or broadcast. + /// Platforms that don't support perfect filtering. Note that perfect + /// filtering only really applies to multicast traffic, not unicast + /// or broadcast. DEFOPT_BINDADDR = OPT_BINDADDR_YES, # else - // At least some Win32 OS's can not bind mcast addr, so disable it. - // General-purpose default behavior is 'disabled', since effect is - // environment-specific and side-effects might be surprising. + /// At least some Win32 OS's can not bind mcast addr, so disable it. + /// General-purpose default behavior is 'disabled', since effect is + /// environment-specific and side-effects might be surprising. DEFOPT_BINDADDR = OPT_BINDADDR_NO, #endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING = 1) */ - // - /// Define the interpretation of 'NULL' as a recv interface specification. - // If the interface part of a multicast address specification is NULL, it - // will be interpreted to mean either "the default interface" or "all - // interfaces", depending on the setting of this option. - // Notes: - // - The 'nulliface_all' option can not be used in environments which do - // not fully support the method - // (e.g. non-Windows). - // If it is, using NULL for iface will _always_ fail. - // - The default behavior in most IP stacks is to use the 'default' interface, - // where 'default' has rather ad-hoc semantics. - // - This applies only to receives, not sends (which always use only one - // interface; NULL means use the "system default" interface). - // Supported values: + + /* + * Define the interpretation of NULL as a join interface specification. + * If the interface part of a multicast address specification is NULL, it + * will be interpreted to mean either "the default interface" or "all + * interfaces", depending on the setting of this option. + * @note + * - The @c OPT_NULLIFACE_ALL option can be used only in the following + * environments: + * + Windows + * + Platforms with the ACE_HAS_GETIFADDRS config setting (includes + * Linux) + * + Platforms which accept the IP address as an interface + * name/specification and for which + * ACE_Sock_Connect::get_ip_interfaces() is fully implemented + * + Systems with only one non-loopback interface. + * Other platforms require additional supporting code. + * - The default behavior in most IP stacks is to use the default + * interface where "default" has rather ad-hoc semantics. + * - This applies only to receives, not sends (which always use only one + * interface; NULL means use the "system default" interface). + */ + /// Supported values: /// If (net_if==NULL), use default interface. - // Note that this might seem odd, but we need a way to distinquish between - // default behavior, which might or might not be to bind, and explicitely - // choosing to bind or not to bind--which "is the question." ;-) + /// @note This might seem odd, but we need a way to distinguish between + /// default behavior, which might or might not be to bind, and explicitly + /// choosing to bind or not to bind--which "is the question." ;-) OPT_NULLIFACE_ONE = 0, /// If (net_if==NULL), use all mcast interfaces. OPT_NULLIFACE_ALL = 2, /// Default value for NULLIFACE option. (Environment-dependent.) #ifdef ACE_WIN32 - // This is the (ad-hoc) legacy behavior for Win32/WinSock. - // Notice: Older version of WinSock/MSVC may not get all multicast-capable - // interfaces (e.g. PPP interfaces). + /// This is the (ad-hoc) legacy behavior for Win32/WinSock. + /// @note Older version of WinSock/MSVC may not get all multicast-capable + /// interfaces (e.g. PPP interfaces). DEFOPT_NULLIFACE = OPT_NULLIFACE_ALL, #else - // General-purpose default behavior (as per legacy behavior). + /// General-purpose default behavior (as per legacy behavior). DEFOPT_NULLIFACE = OPT_NULLIFACE_ONE, #endif /* ACE_WIN32 */ /// All default options. @@ -179,48 +195,53 @@ public: // = Initialization routines. - /// Ctor - Create an unitialized instance and define per-instance optional + /// Create an unitialized instance and define per-instance optional /// functionality. /** - * You must invoke or , to create/bind a socket and define + * You must invoke open() or join(), to create/bind a socket and define * operational parameters, before performing any I/O with this instance. */ ACE_SOCK_Dgram_Mcast (options opts = DEFOPTS); - /// Dtor - Release all resources and implicitly or explicitly unsubscribe + /// Release all resources and implicitly or explicitly unsubscribe /// from all currently subscribed groups. /** - * The OPT_DTORUNSUB_YES_ option defines whether an explicit is + * The OPT_DTORUNSUB_YES_ option defines whether an explicit unsubscribe() is * done by the destructor. If not, most systems will automatically * unsubscribe upon the close of the socket. */ ~ACE_SOCK_Dgram_Mcast (void); - /// Explicitly open/bind the socket and define the network interface - /// and default multicast address used for sending messages. /** - * This method is optional; if not explicitly invoked, it is invoked by - * the first , using the subscribed address/port# and network - * interface parameters. - * The @a mcast_addr parameter defines the default send address/port# and - * also the port# and, if the OPT_BINDADDR_YES option is used, - * the multicast address that is bound to this socket. - * If the parameter != 0, it defines the network interface - * used for all sends by this instance, otherwise the system "default" - * interface is used. (The parameter is ignored if this - * feature is not supported by the environment.) - * The port# in may be 0, in which case a system-assigned - * (ephemeral) port# is used for sending and receiving. - * If @a reuse_addr != 0, the SO_REUSEADDR option and, if it is supported, - * the SO_REUSEPORT option are enabled. + * Explicitly open/bind the socket and define the network interface + * and default multicast address used for sending messages. * - * Returns: -1 if the call fails. Failure can occur due to problems with - * the address, port#, and/or interface parameters or during system open() + * This method is optional; if not explicitly invoked, it is invoked by + * the first join(), using the subscribed address/port number and network + * interface parameters. + * + * @param mcast_addr Defines the default send address/port number and, + * if the @c OPT_BINDADDR_YES option is used, the multicast address + * that is bound to this socket. The port number in @a mcast_addr + * may be 0, in which case a system-assigned (ephemeral) port number + * is used for sending and receiving. + * + * @param net_if If @a net_if is not 0, it defines the network interface + * used for all sends by this instance, otherwise the system default + * interface is used. (The @a net_if parameter is ignored if this + * feature is not supported by the environment.) + * + * @param reuse_addr If @a reuse_addr is not 0, the @c SO_REUSEADDR option + * and, if it is supported, the SO_REUSEPORT option are enabled. + * + * @retval 0 on success + * @retval -1 if the call fails. Failure can occur due to problems with + * the address, port, and/or interface parameters or during system open() * or socket option processing. */ - int open (const ACE_INET_Addr &mcast_addr, // Bound & sendto address. - const ACE_TCHAR *net_if = 0, // Net interface for sends. - int reuse_addr = 1); // Reuse addr/port sock opt. + int open (const ACE_INET_Addr &mcast_addr, + const ACE_TCHAR *net_if = 0, + int reuse_addr = 1); // = Multicast group subscribe/unsubscribe routines. @@ -228,27 +249,27 @@ public: /// supported). /** * The given group is joined on the specified interface. If option - * OPT_NULLIFACE_ALL is used and is = 0, the group is joined on + * OPT_NULLIFACE_ALL is used and @a net_if is = 0, the group is joined on * all multicast capable interfaces (IFF supported). Multiple subscriptions * to various address and interface combinations are supported and tracked. - * If this is the first invocation of , and was not - * previously invoked, will be invoked using for binding - * the socket and as the interface for . + * If this is the first invocation of subscribe(), and open() was not + * previously invoked, open() will be invoked using @a mcast_addr for binding + * the socket and @a net_if as the interface for send(). * * Returns: -1 if the call fails. Failure can occur due to problems with * the address, port#, and/or interface parameters or during the subscription - * attempt. Once bind() has been invoked (by the first or - * ), returns errno of ENXIO if the port# is not 0 and does not + * attempt. Once bind() has been invoked (by the first open() or + * subscribe()), returns errno of ENXIO if the port# is not 0 and does not * match the bound port#, or if OPT_BINDADDR_YES option is used * and the address does not match the bound address. Returns errno of * ENODEV if the addr/port#/interface parameters appeared valid, but no * subscription(s) succeeded. An error is unconditionally returned if - * option OPT_NULLIFACE_ALL is used, is NULL, and - * is not implemented in this + * option OPT_NULLIFACE_ALL is used, @a net_if is NULL, and + * ACE_Sock_Connect::get_ip_interfaces() is not implemented in this * environment. * * Note that the optional @a reuse_addr parameter does not apply to - * subscriptions; it is only used if is implicitly invoked (see above). + * subscriptions; it is only used if open() is implicitly invoked (see above). * * Uses the mcast_addr to determine protocol_family, and protocol which * we always pass as 0 anyway. @@ -262,15 +283,15 @@ public: /// supported). /** * The specified group/interface combination is unsubscribed. If option - * OPT_NULLIFACE_ALL is used and is = 0, the group is unsubscribed + * OPT_NULLIFACE_ALL is used and @a net_if is = 0, the group is unsubscribed * from all interfaces (IFF supported). * * Returns: -1 if the unsubscribe failed. Most environments will return -1 * if there was no active subscription for this address/interface combination. * An error is unconditionally returned if option OPT_NULLIFACE_ALL is used, - * is = 0, and is not - * implemented in this environment (_even if_ the specifies a - * non- NULL ). + * @a net_if is = 0, and ACE_Sock_Connect::get_ip_interfaces() is not + * implemented in this environment (_even if_ the subscribe() specifies a + * non- NULL @a net_if). * * leave() replaces unsubscribe() and uses mcast_addr to determine * protocol_family, and protocol which we always pass as 0 anyway. @@ -281,13 +302,13 @@ public: // = Data transfer routines. /// Send @a n bytes in @a buf, using the multicast address and network interface - /// defined by the first or . + /// defined by the first open() or subscribe(). ssize_t send (const void *buf, size_t n, int flags = 0) const; - /// Send @a n , using the multicast address and network interface - /// defined by the first or . + /// Send @a n iovecs, using the multicast address and network interface + /// defined by the first open() or subscribe(). ssize_t send (const iovec iov[], int n, int flags = 0) const; @@ -318,6 +339,14 @@ public: /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; + /// Override write acessor for the constructor options (@see enum options above) + /// This class is typically default instantiated in a connection handler templated + /// framework so these cannot be specified on construction. + void opts (int opts); + + /// Read acessor for the constructor options (@see enum options above) + int opts () const; + private: /// Subscribe to a multicast address on one or more network interface(s). @@ -356,9 +385,9 @@ private: /// Per-instance options.. int opts_; - /// Multicast address to which local methods send datagrams. + /// Multicast address to which local send() methods send datagrams. ACE_INET_Addr send_addr_; - /// Network interface to which all methods send multicast datagrams. + /// Network interface to which all send() methods send multicast datagrams. ACE_TCHAR *send_net_if_; #if defined (ACE_SOCK_DGRAM_MCAST_DUMPABLE) diff --git a/dep/acelite/ace/SOCK_Dgram_Mcast.inl b/dep/acelite/ace/SOCK_Dgram_Mcast.inl index 75457d32d92..d5f1ecbd17d 100644 --- a/dep/acelite/ace/SOCK_Dgram_Mcast.inl +++ b/dep/acelite/ace/SOCK_Dgram_Mcast.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SOCK_Dgram_Mcast.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: SOCK_Dgram_Mcast.inl 96014 2012-08-08 15:30:01Z sma $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -49,4 +49,16 @@ ACE_SOCK_Dgram_Mcast::send (const iovec iov[], flags); } +ACE_INLINE void +ACE_SOCK_Dgram_Mcast::opts (int opts) +{ + this->opts_ = opts; +} + +ACE_INLINE int +ACE_SOCK_Dgram_Mcast::opts () const +{ + return this->opts_; +} + ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/SOCK_Stream.h b/dep/acelite/ace/SOCK_Stream.h index a96d7e664ef..97dc8f70858 100644 --- a/dep/acelite/ace/SOCK_Stream.h +++ b/dep/acelite/ace/SOCK_Stream.h @@ -4,7 +4,7 @@ /** * @file SOCK_Stream.h * - * $Id: SOCK_Stream.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SOCK_Stream.h 92956 2010-12-29 16:12:31Z shuston $ * * @author Douglas C. Schmidt */ @@ -78,7 +78,10 @@ public: * wait indefinitely or until an error occurs for the * specified number of bytes to be transferred. * To avoid any waiting, specify a timeout value with - * 0 seconds. + * 0 seconds. Note that the timeout period restarts on + * each retried operation issued; therefore, an operation + * that requires multiples retries may take longer than the + * specified timeout to complete. * @param bytes_transferred If non-0, points to a location which receives * the total number of bytes transferred before the method * returns, even if it's less than the number requested. diff --git a/dep/acelite/ace/SPIPE_Acceptor.h b/dep/acelite/ace/SPIPE_Acceptor.h index 84529c76582..a804670d061 100644 --- a/dep/acelite/ace/SPIPE_Acceptor.h +++ b/dep/acelite/ace/SPIPE_Acceptor.h @@ -4,7 +4,7 @@ /** * @file SPIPE_Acceptor.h * - * $Id: SPIPE_Acceptor.h 82723 2008-09-16 09:35:44Z johnnyw $ + * $Id: SPIPE_Acceptor.h 94007 2011-04-27 09:01:45Z johnnyw $ * * @author Douglas C. Schmidt * @author Prashant Jain @@ -148,7 +148,7 @@ private: DWORD pipe_mode_; // On Windows, the handle maintained in the ACE_IPC_SAP class is the - // event handle from event_. The pipe handle is useless for telling + // event handle from event. The pipe handle is useless for telling // when a pipe connect is done/ready, and it changes on each pipe // acceptance, quite unlike other acceptor-type classes in ACE. // This allows the get_handle()-obtained handle to be used for diff --git a/dep/acelite/ace/SPIPE_Stream.inl b/dep/acelite/ace/SPIPE_Stream.inl index d490f88f145..0aa53269079 100644 --- a/dep/acelite/ace/SPIPE_Stream.inl +++ b/dep/acelite/ace/SPIPE_Stream.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SPIPE_Stream.inl 88707 2010-01-25 18:49:25Z johnnyw $ +// $Id: SPIPE_Stream.inl 93061 2011-01-12 21:06:07Z wotte $ #include "ace/OS_NS_sys_uio.h" #include "ace/OS_NS_errno.h" @@ -139,7 +139,7 @@ ACE_SPIPE_Stream::send_handle (ACE_HANDLE handle) const } return 0; #else - handle = handle; + ACE_UNUSED_ARG (handle); ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_STREAM_PIPES */ } @@ -195,7 +195,7 @@ ACE_SPIPE_Stream::recv_handle (ACE_HANDLE &handle) const } return 0; #else - handle = handle; + ACE_UNUSED_ARG (handle); ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_STREAM_PIPES */ } diff --git a/dep/acelite/ace/SSL/SSL_Context.cpp b/dep/acelite/ace/SSL/SSL_Context.cpp index 992cdeff921..c6cf6adcdf8 100644 --- a/dep/acelite/ace/SSL/SSL_Context.cpp +++ b/dep/acelite/ace/SSL/SSL_Context.cpp @@ -1,4 +1,4 @@ -// $Id: SSL_Context.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: SSL_Context.cpp 93497 2011-03-07 09:43:36Z vzykov $ #include "SSL_Context.h" #include "sslconf.h" @@ -202,9 +202,6 @@ ACE_SSL_Context::ssl_library_fini (void) --ssl_library_init_count; if (ssl_library_init_count == 0) { - // Explicitly close the singleton - ACE_Unmanaged_Singleton::close(); - ::ERR_free_strings (); ::EVP_cleanup (); @@ -216,7 +213,6 @@ ACE_SSL_Context::ssl_library_fini (void) delete [] this->locks_; this->locks_ = 0; - #endif /* ACE_HAS_THREADS */ } } @@ -645,8 +641,8 @@ ACE_SSL_Context::dh_params (const char *file_name, #if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) -template ACE_Singleton * - ACE_Singleton::singleton_; +template ACE_Unmanaged_Singleton * + ACE_Unmanaged_Singleton::singleton_; #endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ diff --git a/dep/acelite/ace/SSL/SSL_Context.h b/dep/acelite/ace/SSL/SSL_Context.h index 003d6042c5b..4ad127557a1 100644 --- a/dep/acelite/ace/SSL/SSL_Context.h +++ b/dep/acelite/ace/SSL/SSL_Context.h @@ -1,17 +1,15 @@ // -*- C++ -*- - //============================================================================= /** * @file SSL_Context.h * - * $Id: SSL_Context.h 83916 2008-11-28 16:32:21Z johnnyw $ + * $Id: SSL_Context.h 96087 2012-08-21 12:26:44Z sma $ * * @author Carlos O'Ryan * @author Ossama Othman */ //============================================================================= - #ifndef ACE_SSL_CONTEXT_H #define ACE_SSL_CONTEXT_H @@ -31,13 +29,11 @@ #include - ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_SSL_Export ACE_SSL_Data_File { public: - /// Default constructor ACE_SSL_Data_File (void); @@ -52,7 +48,6 @@ public: int type (void) const; private: - /// The file name ACE_CString file_name_; @@ -62,6 +57,34 @@ private: // **************************************************************** +// NOTE: Solaris studio compilers amongst others will issue warnings if the +// the correct type of function pointer (i.e. extern "C" ) is not stored/used +// of the form: +// Warning (Anachronism): Formal argument callback of type +// extern "C" int(*)(int,x509_store_ctx_st*) in call to +// SSL_CTX_set_verify(ssl_ctx_st*, int, extern "C" int(*)(int,x509_store_ctx_st*)) +// is being passed int(*)(int,x509_store_ctx_st*) +// when C library routines are passed CallBack functions pointers that are +// actually C++ functions. +// +// Unfortunatly you can not specify extern "C" linkage anywhere inside a class +// declaration or inside a function prototype for individual parameters. I.e: +// class { extern "C" int (*callback_) (int, void *); }; +// to store a function pointer as a data member of the class is illegal as is: +// void function (extern "C" int (*callback) (int, void *); +// to declare function (or a class member) that takes a extern "C" function +// pointer as a parameter. +// +// Since we need an extern "C" function pointer as a parameter to be stored +// in the class and handled by member functions, we are forced to declare +// a typedef of that extern "C" function pointer that we can then use. +// Again unfortunatly you also are not allowed to simply add the extern "C" +// to the typedef itself, instead you have to place the typedef declaration +// inside an extern "C" block, thus: + +extern "C" { + typedef int (*extern_C_CallBackVerify_t) (int, X509_STORE_CTX *); +} /** * @class ACE_SSL_Context @@ -75,7 +98,6 @@ private: class ACE_SSL_Export ACE_SSL_Context { public: - #ifdef ACE_HAS_THREADS typedef ACE_SYNCH_MUTEX lock_type; #endif /* ACE_HAS_THREADS */ @@ -235,7 +257,6 @@ public: */ int have_trusted_ca (void) const; - /** * @todo Complete this documentation where elipses(...) are used * @@ -284,8 +305,8 @@ public: * inherited by all the ACE_SSL objects created using the context. * It can be overriden on a per-ACE_SSL object. */ - void default_verify_callback (int (*callback) (int, X509_STORE_CTX *)); - int (*default_verify_callback(void) const) (int,X509_STORE_CTX *); + void default_verify_callback (extern_C_CallBackVerify_t); + extern_C_CallBackVerify_t default_verify_callback (void) const; /** * @name OpenSSL Random Number Generator Seed Related Methods @@ -339,7 +360,6 @@ public: //@} private: - /// Verify if the context has been initialized or not. void check_context (void); @@ -354,7 +374,6 @@ private: //@} private: - /// The SSL_CTX structure SSL_CTX *context_; @@ -370,7 +389,7 @@ private: int default_verify_mode_; /// The default verify callback. - int (*default_verify_callback_)(int, X509_STORE_CTX *); + extern_C_CallBackVerify_t default_verify_callback_; /// count of successful CA load attempts int have_ca_; @@ -380,7 +399,6 @@ private: /// application is multithreaded. static lock_type * locks_; #endif /* ACE_HAS_THREADS */ - }; ACE_END_VERSIONED_NAMESPACE_DECL @@ -390,5 +408,4 @@ ACE_END_VERSIONED_NAMESPACE_DECL #endif /* __ACE_INLINE__ */ #include /**/ "ace/post.h" - #endif /* ACE_SSL_CONTEXT_H */ diff --git a/dep/acelite/ace/SSL/SSL_Context.inl b/dep/acelite/ace/SSL/SSL_Context.inl index 7ecb3e0627e..65370672a8e 100644 --- a/dep/acelite/ace/SSL/SSL_Context.inl +++ b/dep/acelite/ace/SSL/SSL_Context.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_Context.inl 83916 2008-11-28 16:32:21Z johnnyw $ +// $Id: SSL_Context.inl 96087 2012-08-21 12:26:44Z sma $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -100,12 +100,12 @@ ACE_SSL_Context::default_verify_mode (void) const } ACE_INLINE void -ACE_SSL_Context::default_verify_callback (int (*callback) (int, X509_STORE_CTX*)) +ACE_SSL_Context::default_verify_callback (extern_C_CallBackVerify_t callback) { this->default_verify_callback_ = callback; } -ACE_INLINE int (*ACE_SSL_Context::default_verify_callback(void) const)(int,X509_STORE_CTX *) +ACE_INLINE extern_C_CallBackVerify_t ACE_SSL_Context::default_verify_callback(void) const { return this->default_verify_callback_; } diff --git a/dep/acelite/ace/SSL/SSL_Initializer.cpp b/dep/acelite/ace/SSL/SSL_Initializer.cpp new file mode 100644 index 00000000000..4903e60815c --- /dev/null +++ b/dep/acelite/ace/SSL/SSL_Initializer.cpp @@ -0,0 +1,44 @@ +// $Id: SSL_Initializer.cpp 93497 2011-03-07 09:43:36Z vzykov $ + +#include "SSL_Initializer.h" +#include "SSL_Context.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +int +ACE_SSL_Initializer::static_init (void) +{ + ACE_Service_Config::process_directive (ace_svc_desc_ACE_SSL_Initializer); + return 0; +} + +int +ACE_SSL_Initializer::init (int, ACE_TCHAR *[]) +{ + // Initialize ACE_SSL_Context singleton. + ACE_SSL_Context * ssl_ctx = ACE_SSL_Context::instance (); + ACE_ASSERT (ssl_ctx != 0); + ACE_UNUSED_ARG (ssl_ctx); + + return 0; +} + +int +ACE_SSL_Initializer::fini (void) +{ + // Explicitly close the ACE_SSL_Context singleton. + ACE_Unmanaged_Singleton::close(); + + return 0; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +ACE_STATIC_SVC_DEFINE (ACE_SSL_Initializer, + ACE_TEXT ("ACE_SSL_Initializer"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (ACE_SSL_Initializer), + ACE_Service_Type::DELETE_THIS | + ACE_Service_Type::DELETE_OBJ, + 0) +ACE_FACTORY_DEFINE (ACE_SSL, ACE_SSL_Initializer) diff --git a/dep/acelite/ace/SSL/SSL_Initializer.h b/dep/acelite/ace/SSL/SSL_Initializer.h new file mode 100644 index 00000000000..1d15a73159c --- /dev/null +++ b/dep/acelite/ace/SSL/SSL_Initializer.h @@ -0,0 +1,52 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file SSL_Initializer.h + * + * $Id: SSL_Initializer.h 93497 2011-03-07 09:43:36Z vzykov $ + * + * @author Vladimir Zykov + */ +//============================================================================= + +#ifndef ACE_SSL_INITIALIZER_H +#define ACE_SSL_INITIALIZER_H + +#include /**/ "ace/pre.h" + +#include "SSL_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Service_Config.h" +#include "ace/Service_Object.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ACE_SSL_Export ACE_SSL_Initializer + : public ACE_Service_Object +{ +public: + /// Used to force the initialization of ACE_SSL. + static int static_init (void); + + /// Create ACE_SSL_Context singleton. + virtual int init (int argc, ACE_TCHAR *argv[]); + + /// Do cleanup of SSL library. + virtual int fini (void); +}; + +static int ACE_Force_ACE_SSL_Initializer = ACE_SSL_Initializer::static_init (); + +ACE_END_VERSIONED_NAMESPACE_DECL + +ACE_STATIC_SVC_DECLARE (ACE_SSL_Initializer) +ACE_FACTORY_DECLARE (ACE_SSL, ACE_SSL_Initializer) + +#include /**/ "ace/post.h" + +#endif /* ACE_SSL_INITIALIZER_H */ diff --git a/dep/acelite/ace/SString.cpp b/dep/acelite/ace/SString.cpp index 5a087e3e0a9..db66850fda4 100644 --- a/dep/acelite/ace/SString.cpp +++ b/dep/acelite/ace/SString.cpp @@ -1,4 +1,4 @@ -// $Id: SString.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: SString.cpp 92580 2010-11-15 09:48:02Z johnnyw $ #include "ace/Malloc_T.h" #include "ace/OS_Memory.h" @@ -79,7 +79,7 @@ ACE_NS_WString::char_rep (void) const } } -ACE_USHORT16 * +ACE_UINT16 * ACE_NS_WString::ushort_rep (void) const { ACE_TRACE ("ACE_NS_WString::ushort_rep"); @@ -87,16 +87,16 @@ ACE_NS_WString::ushort_rep (void) const return 0; else { - ACE_USHORT16 *t = 0; + ACE_UINT16 *t = 0; ACE_NEW_RETURN (t, - ACE_USHORT16[this->len_ + 1], + ACE_UINT16[this->len_ + 1], 0); for (size_type i = 0; i < this->len_; ++i) // Note that this cast may lose data if wide chars are // actually used! - t[i] = (ACE_USHORT16)this->rep_[i]; + t[i] = (ACE_UINT16)this->rep_[i]; t[this->len_] = 0; return t; @@ -125,7 +125,7 @@ ACE_NS_WString::ACE_NS_WString (const char *s, } #if defined (ACE_WSTRING_HAS_USHORT_SUPPORT) -ACE_NS_WString::ACE_NS_WString (const ACE_USHORT16 *s, +ACE_NS_WString::ACE_NS_WString (const ACE_UINT16 *s, size_type len, ACE_Allocator *alloc) : ACE_WString (alloc) diff --git a/dep/acelite/ace/SString.h b/dep/acelite/ace/SString.h index e7ff8ea7872..3c5f9957be7 100644 --- a/dep/acelite/ace/SString.h +++ b/dep/acelite/ace/SString.h @@ -4,7 +4,7 @@ /** * @file SString.h * - * $Id: SString.h 91058 2010-07-12 08:20:09Z johnnyw $ + * $Id: SString.h 92580 2010-11-15 09:48:02Z johnnyw $ * * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) */ @@ -75,7 +75,7 @@ public: #if defined (ACE_WSTRING_HAS_USHORT_SUPPORT) /// Constructor that takes in a ushort16 string (mainly used by the /// ACE Name_Space classes) - ACE_NS_WString (const ACE_USHORT16 *s, + ACE_NS_WString (const ACE_UINT16 *s, size_type len, ACE_Allocator *alloc = 0); #endif /* ACE_WSTRING_HAS_USHORT_SUPPORT */ @@ -102,7 +102,7 @@ public: /// Transform into a copy of a USHORT16 representation (caller must /// delete). Note, behavior is undefined when sizeof (wchar_t) != 2. - ACE_USHORT16 *ushort_rep (void) const; + ACE_UINT16 *ushort_rep (void) const; }; ACE_Export diff --git a/dep/acelite/ace/Sample_History.cpp b/dep/acelite/ace/Sample_History.cpp index 78a7558703f..5c9e24417d3 100644 --- a/dep/acelite/ace/Sample_History.cpp +++ b/dep/acelite/ace/Sample_History.cpp @@ -1,4 +1,4 @@ -// $Id: Sample_History.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Sample_History.cpp 95747 2012-05-13 17:14:12Z johnnyw $ #include "ace/Sample_History.h" @@ -10,9 +10,6 @@ #include "ace/Log_Msg.h" #include "ace/OS_Memory.h" - - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Sample_History::ACE_Sample_History (size_t max_samples) @@ -27,21 +24,10 @@ ACE_Sample_History::~ACE_Sample_History (void) delete[] this->samples_; } -size_t -ACE_Sample_History::max_samples (void) const -{ - return this->max_samples_; -} - -size_t -ACE_Sample_History::sample_count (void) const -{ - return this->sample_count_; -} - void -ACE_Sample_History::dump_samples (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const +ACE_Sample_History::dump_samples ( + const ACE_TCHAR *msg, + ACE_Sample_History::scale_factor_type scale_factor) const { #ifndef ACE_NLOGGING for (size_t i = 0; i != this->sample_count_; ++i) diff --git a/dep/acelite/ace/Sample_History.h b/dep/acelite/ace/Sample_History.h index 730deea4fab..c31c5692360 100644 --- a/dep/acelite/ace/Sample_History.h +++ b/dep/acelite/ace/Sample_History.h @@ -4,7 +4,7 @@ /** * @file Sample_History.h * - * $Id: Sample_History.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Sample_History.h 95747 2012-05-13 17:14:12Z johnnyw $ * * @author Carlos O'Ryan */ @@ -34,6 +34,12 @@ class ACE_Basic_Stats; class ACE_Export ACE_Sample_History { public: +#if !defined (ACE_WIN32) + typedef ACE_UINT32 scale_factor_type; +#else + typedef ACE_UINT64 scale_factor_type; +#endif + /// Constructor /** * The number of samples is pre-allocated, and cannot changes once @@ -62,7 +68,7 @@ public: * message. */ void dump_samples (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const; + scale_factor_type scale_factor) const; /// Collect the summary for all the samples void collect_basic_stats (ACE_Basic_Stats &) const; diff --git a/dep/acelite/ace/Sample_History.inl b/dep/acelite/ace/Sample_History.inl index 9945bfe14ec..8d7d7c9b5f7 100644 --- a/dep/acelite/ace/Sample_History.inl +++ b/dep/acelite/ace/Sample_History.inl @@ -1,6 +1,5 @@ // -*- C++ -*- -// -// $Id: Sample_History.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Sample_History.inl 95747 2012-05-13 17:14:12Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -23,4 +22,16 @@ ACE_Sample_History::get_sample (size_t i) const return this->samples_[i]; } +ACE_INLINE size_t +ACE_Sample_History::max_samples (void) const +{ + return this->max_samples_; +} + +ACE_INLINE size_t +ACE_Sample_History::sample_count (void) const +{ + return this->sample_count_; +} + ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Sched_Params.cpp b/dep/acelite/ace/Sched_Params.cpp index 5002f52a797..8aee95bfc58 100644 --- a/dep/acelite/ace/Sched_Params.cpp +++ b/dep/acelite/ace/Sched_Params.cpp @@ -3,7 +3,7 @@ /** * @file Sched_Params.cpp * - * $Id: Sched_Params.cpp 91286 2010-08-05 09:04:31Z johnnyw $ + * $Id: Sched_Params.cpp 95761 2012-05-15 18:23:04Z johnnyw $ * * @author David Levine */ @@ -84,9 +84,7 @@ ACE_Sched_Params::priority_min (const Policy policy, } } #elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ - defined (ACE_HAS_PTHREAD_SCHEDPARAM)) - + (!defined(ACE_LACKS_SETSCHED)) switch (scope) { case ACE_SCOPE_THREAD: @@ -192,7 +190,7 @@ ACE_Sched_Params::priority_max (const Policy policy, } } #elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) switch (scope) @@ -274,7 +272,7 @@ ACE_Sched_Params::next_priority (const Policy policy, return priority; // unknown priority: should never get here } #elif defined(ACE_HAS_THREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) // including STHREADS, and PTHREADS int const max = priority_max (policy, scope); @@ -318,7 +316,7 @@ ACE_Sched_Params::previous_priority (const Policy policy, return priority; // unknown priority: should never get here } #elif defined(ACE_HAS_THREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) // including STHREADS and PTHREADS int const min = priority_min (policy, scope); diff --git a/dep/acelite/ace/Select_Reactor_Base.cpp b/dep/acelite/ace/Select_Reactor_Base.cpp index 2165d6e16c2..d160c5c122e 100644 --- a/dep/acelite/ace/Select_Reactor_Base.cpp +++ b/dep/acelite/ace/Select_Reactor_Base.cpp @@ -1,4 +1,4 @@ -// $Id: Select_Reactor_Base.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Select_Reactor_Base.cpp 95574 2012-02-29 07:26:08Z johnnyw $ #include "ace/Select_Reactor_Base.h" #include "ace/Reactor.h" @@ -530,7 +530,8 @@ ACE_Select_Reactor_Handler_Repository::dump (void) const ACE_ALLOC_HOOK_DEFINE(ACE_Select_Reactor_Handler_Repository_Iterator) ACE_Select_Reactor_Notify::ACE_Select_Reactor_Notify (void) - : max_notify_iterations_ (-1) + : select_reactor_ (0) + , max_notify_iterations_ (-1) { } @@ -599,8 +600,7 @@ ACE_Select_Reactor_Notify::open (ACE_Reactor_Impl *r, if (disable_notify_pipe == 0) { - this->select_reactor_ = - dynamic_cast (r); + this->select_reactor_ = dynamic_cast (r); if (select_reactor_ == 0) { diff --git a/dep/acelite/ace/Select_Reactor_Base.h b/dep/acelite/ace/Select_Reactor_Base.h index 7902791624b..851fea0d662 100644 --- a/dep/acelite/ace/Select_Reactor_Base.h +++ b/dep/acelite/ace/Select_Reactor_Base.h @@ -4,7 +4,7 @@ /** * @file Select_Reactor_Base.h * - * $Id: Select_Reactor_Base.h 87252 2009-10-28 20:03:48Z cleeland $ + * $Id: Select_Reactor_Base.h 93792 2011-04-07 11:48:50Z mcorino $ * * @author Douglas C. Schmidt */ @@ -92,7 +92,6 @@ public: class ACE_Event_Tuple { public: - /// Default constructor. ACE_Event_Tuple (void); @@ -106,7 +105,6 @@ public: bool operator!= (const ACE_Event_Tuple &rhs) const; public: - /// Handle. ACE_HANDLE handle_; diff --git a/dep/acelite/ace/Select_Reactor_T.cpp b/dep/acelite/ace/Select_Reactor_T.cpp index b70b2d427c3..fde3ea3fcd1 100644 --- a/dep/acelite/ace/Select_Reactor_T.cpp +++ b/dep/acelite/ace/Select_Reactor_T.cpp @@ -1,4 +1,4 @@ -// $Id: Select_Reactor_T.cpp 92201 2010-10-11 19:07:59Z johnnyw $ +// $Id: Select_Reactor_T.cpp 95533 2012-02-14 22:59:17Z wotte $ #ifndef ACE_SELECT_REACTOR_T_CPP #define ACE_SELECT_REACTOR_T_CPP @@ -461,7 +461,14 @@ template int ACE_Select_Reactor_T::timer_queue (ACE_Timer_Queue *tq) { - delete this->timer_queue_; + if (this->delete_timer_queue_) + { + delete this->timer_queue_; + } + else if (this->timer_queue_) + { + this->timer_queue_->close (); + } this->timer_queue_ = tq; this->delete_timer_queue_ = false; return 0; @@ -495,6 +502,9 @@ ACE_Select_Reactor_T::ACE_Select_Reactor_T // determine the size at run-time by checking the process file // descriptor limit on platforms that support this feature. + // reset the errno so that subsequent checks are valid + errno = 0; + // There is no need to deallocate resources from previous open() // call since the open() method deallocates any resources prior // to exiting if an error was encountered. @@ -573,6 +583,11 @@ ACE_Select_Reactor_T::close (void) this->timer_queue_ = 0; this->delete_timer_queue_ = false; } + else if (this->timer_queue_) + { + this->timer_queue_->close (); + this->timer_queue_ = 0; + } if (this->notify_handler_ != 0) this->notify_handler_->close (); @@ -764,14 +779,14 @@ template int ACE_Select_Reactor_T::handle_error (void) { ACE_TRACE ("ACE_Select_Reactor_T::handle_error"); -#if defined (linux) && defined (ERESTARTNOHAND) +#if defined (ACE_LINUX) && defined (ERESTARTNOHAND) int const error = errno; // Avoid multiple TSS accesses. if (error == EINTR || error == ERESTARTNOHAND) return this->restart_; #else if (errno == EINTR) return this->restart_; -#endif /* linux && ERESTARTNOHAND */ +#endif /* ACE_LINUX && ERESTARTNOHAND */ #if defined (__MVS__) || defined (ACE_WIN32) || defined (ACE_VXWORKS) // On MVS Open Edition and Win32, there can be a number of failure // codes on a bad socket, so check_handles on anything other than @@ -1402,15 +1417,25 @@ ACE_Select_Reactor_T::handle_events ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1); - if (ACE_OS::thr_equal (ACE_Thread::self (), - this->owner_) == 0 || this->deactivated_) - return -1; + if (ACE_OS::thr_equal (ACE_Thread::self (), this->owner_) == 0) + { + errno = EACCES; + return -1; + } + if (this->deactivated_) + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the mutex. countdown.update (); #else if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } #endif /* ACE_MT_SAFE */ return this->handle_events_i (max_wait_time); diff --git a/dep/acelite/ace/Select_Reactor_T.h b/dep/acelite/ace/Select_Reactor_T.h index 9e7411ef985..a9737c1e872 100644 --- a/dep/acelite/ace/Select_Reactor_T.h +++ b/dep/acelite/ace/Select_Reactor_T.h @@ -4,7 +4,7 @@ /** * @file Select_Reactor_T.h * - * $Id: Select_Reactor_T.h 86495 2009-08-13 19:35:25Z johnnyw $ + * $Id: Select_Reactor_T.h 93359 2011-02-11 11:33:12Z mcorino $ * * @author Douglas C. Schmidt */ @@ -60,7 +60,7 @@ public: /// If @a disable_notify_pipe is non-0 then the reactor will /// not create a notification pipe, which will save two I/O handles - /// but will elide the feature. If @a mask_signals is + /// but will elide the notify() feature. If @a mask_signals is /// true the reactor is "signal-safe" when dispatching handlers to /// signal events, whereas if @a mask_signals is false the reactor will /// be more efficient, but not signal-safe (which may be perfectly @@ -106,7 +106,7 @@ public: * timer queue, respectively. If @arg disable_notify_pipe is non-0 the * notification pipe is not created, thereby saving two I/O handles. * - * @note On Unix platforms, the maximum_number_of_handles parameter + * @note On Unix platforms, the @a maximum_number_of_handles parameter * should be as large as the maximum number of file * descriptors allowed for a given process. This is necessary * since a file descriptor is used to directly index the array @@ -148,6 +148,7 @@ public: */ virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero); + //@{ /** * This event loop driver that blocks for @a max_wait_time before * returning. It will return earlier if timer events, I/O events, @@ -165,12 +166,14 @@ public: * that were dispatched, 0 if the @a max_wait_time elapsed without * dispatching any handlers, or -1 if something goes wrong. * - * Current is identical to - * . + * Current alertable_handle_events() is identical to + * handle_events(). */ virtual int handle_events (ACE_Time_Value *max_wait_time = 0); virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0); + //@} + //@{ /** * This method is just like the one above, except the * @a max_wait_time value is a reference and can therefore never be @@ -181,6 +184,7 @@ public: */ virtual int handle_events (ACE_Time_Value &max_wait_time); virtual int alertable_handle_events (ACE_Time_Value &max_wait_time); + //@} // = Event handling control. @@ -599,7 +603,7 @@ protected: virtual int any_ready (ACE_Select_Reactor_Handle_Set &handle_set); /// Implement the method, assuming that the Sig_Guard is - /// beign held + /// being held virtual int any_ready_i (ACE_Select_Reactor_Handle_Set &handle_set); /// Take corrective action when errors occur. diff --git a/dep/acelite/ace/Select_Reactor_T.inl b/dep/acelite/ace/Select_Reactor_T.inl index 30c8cbc6b7d..54542427f79 100644 --- a/dep/acelite/ace/Select_Reactor_T.inl +++ b/dep/acelite/ace/Select_Reactor_T.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Select_Reactor_T.inl 82723 2008-09-16 09:35:44Z johnnyw $ +// $Id: Select_Reactor_T.inl 96017 2012-08-08 22:18:09Z mitza $ #include "ace/Reactor.h" #include "ace/Signal.h" @@ -221,7 +221,7 @@ ACE_Select_Reactor_T::deactivate (int do_stop) ACE_MT (ACE_GUARD (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_)); - this->deactivated_ = do_stop; + this->deactivated_ = static_cast (do_stop); } this->wakeup_all_threads (); diff --git a/dep/acelite/ace/Service_Config.cpp b/dep/acelite/ace/Service_Config.cpp index d63f46c1b86..9149e98e43d 100644 --- a/dep/acelite/ace/Service_Config.cpp +++ b/dep/acelite/ace/Service_Config.cpp @@ -1,4 +1,4 @@ -// $Id: Service_Config.cpp 91693 2010-09-09 12:57:54Z johnnyw $ +// $Id: Service_Config.cpp 96017 2012-08-08 22:18:09Z mitza $ #include "ace/Service_Config.h" @@ -601,7 +601,8 @@ void ACE_Service_Config::reconfig_occurred (int config_occurred) { ACE_TRACE ("ACE_Service_Config::reconfig_occurred"); - ACE_Service_Config::reconfig_occurred_ = config_occurred; + ACE_Service_Config::reconfig_occurred_ = + static_cast (config_occurred); } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Service_Config.h b/dep/acelite/ace/Service_Config.h index 5269d8f367e..56be51fde10 100644 --- a/dep/acelite/ace/Service_Config.h +++ b/dep/acelite/ace/Service_Config.h @@ -4,7 +4,7 @@ /** * @file Service_Config.h * - * $Id: Service_Config.h 89501 2010-03-17 08:59:56Z vzykov $ + * $Id: Service_Config.h 94385 2011-08-10 12:19:36Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -159,8 +159,8 @@ template<> class ACE_Export ACE_Threading_Helper { public: - ACE_Threading_Helper (); - ~ACE_Threading_Helper (); + ACE_Threading_Helper (void); + ~ACE_Threading_Helper (void); void set (void*); void* get (void); @@ -178,8 +178,8 @@ template<> class ACE_Export ACE_Threading_Helper { public: - ACE_Threading_Helper (); - ~ACE_Threading_Helper (); + ACE_Threading_Helper (void); + ~ACE_Threading_Helper (void); void set (void*); void* get (void); diff --git a/dep/acelite/ace/Service_Gestalt.cpp b/dep/acelite/ace/Service_Gestalt.cpp index 29e2804b4b6..f177260ca4b 100644 --- a/dep/acelite/ace/Service_Gestalt.cpp +++ b/dep/acelite/ace/Service_Gestalt.cpp @@ -1,4 +1,4 @@ -// $Id: Service_Gestalt.cpp 92357 2010-10-25 14:11:44Z mesnier_p $ +// $Id: Service_Gestalt.cpp 95610 2012-03-13 11:26:31Z johnnyw $ #include "ace/Svc_Conf.h" #include "ace/Get_Opt.h" diff --git a/dep/acelite/ace/Service_Object.cpp b/dep/acelite/ace/Service_Object.cpp index 912fa39532c..4a9ace4029e 100644 --- a/dep/acelite/ace/Service_Object.cpp +++ b/dep/acelite/ace/Service_Object.cpp @@ -1,4 +1,4 @@ -// $Id: Service_Object.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Service_Object.cpp 93539 2011-03-13 09:40:44Z vzykov $ #include "ace/config-all.h" @@ -36,9 +36,9 @@ ACE_Service_Type::dump (void) const // the generated C++ code. ACE_OS::fprintf(stderr, "// [ST] dump, this=%p, name=%s, type=%p, so=%p, active=%d\n", - this, - this->name_, - this->type_, + static_cast (this), + ACE_TEXT_ALWAYS_CHAR (this->name_), + static_cast (this->type_), (this->type_ != 0) ? this->type_->object () : 0, this->active_); diff --git a/dep/acelite/ace/Service_Types.cpp b/dep/acelite/ace/Service_Types.cpp index b3f7d098054..b743536b304 100644 --- a/dep/acelite/ace/Service_Types.cpp +++ b/dep/acelite/ace/Service_Types.cpp @@ -1,4 +1,4 @@ -// $Id: Service_Types.cpp 91813 2010-09-17 07:52:52Z johnnyw $ +// $Id: Service_Types.cpp 95676 2012-04-03 16:32:27Z schmidt $ #include "ace/Service_Types.h" @@ -165,6 +165,7 @@ ACE_Module_Type::ACE_Module_Type (void *m, u_int f, int stype) : ACE_Service_Type_Impl (m, m_name, f, 0, stype) + , link_ (0) { ACE_TRACE ("ACE_Module_Type::ACE_Module_Type"); } @@ -181,12 +182,12 @@ ACE_Module_Type::init (int argc, ACE_TCHAR *argv[]) const void *obj = this->object (); MT_Module *mod = (MT_Module *) obj; // - // Change the Module's name to what's in the svc.conf file. - // We must do this so the names match up so everything shuts - // down properly during the call to ACE_Stream_Type::fini - // which calls MT_Stream::remove([name]) for all the modules. - // If the calls to remove fail, we end up with a double delete - // during shutdown. Bugzilla #3847 + // Change the Module's name to what's in the svc.conf file. We must + // do this so the names match up so everything shuts down properly + // during the call to ACE_Stream_Type::fini which calls + // MT_Stream::remove([name]) for all the modules. If the calls to + // remove fail, we end up with a double delete during + // shutdown. Bugzilla #3847 // mod->name (this->name_); MT_Task *reader = mod->reader (); diff --git a/dep/acelite/ace/Signal.h b/dep/acelite/ace/Signal.h index 736d62e5c08..5dc26ff7146 100644 --- a/dep/acelite/ace/Signal.h +++ b/dep/acelite/ace/Signal.h @@ -4,7 +4,7 @@ /** * @file Signal.h * - * $Id: Signal.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Signal.h 94454 2011-09-08 17:36:56Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -45,7 +45,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Sig_Set { public: - // = Initialization and termination methods. /// Initialize with @a sigset. If @a sigset == 0 then fill /// the set. ACE_Sig_Set (sigset_t *sigset); @@ -136,18 +135,6 @@ public: const ACE_Sig_Set &sigmask, int flags = 0); - - // @@ The next two methods have a parameter as "signalss". Please do - // not change the argument name as "signals". This causes the - // following problem as reported by - // . - - // In the file Signal.h two of the functions have and argument name - // of signals. signals is a Qt macro (to do with their meta object - // stuff. - // We could as well have it as "signal", but I am nost sure whether - // that would cause a problem with something else - Bala - /** * Assigns the various fields of a @c sigaction struct and registers * the @a handler to process all @a signalss via the @c sigaction @@ -236,7 +223,7 @@ class ACE_Export ACE_Sig_Guard public: // = Initialization and termination methods. /// This is kind of conditional Guard, needed when guard should be - /// activated only when a spcific condition met. When condition == + /// activated only when a specific condition met. When condition == /// true (default), Guard is activated ACE_Sig_Guard (ACE_Sig_Set *mask = 0, bool condition = true); diff --git a/dep/acelite/ace/Sock_Connect.cpp b/dep/acelite/ace/Sock_Connect.cpp index ce2a17d2bf5..77c5e4af93f 100644 --- a/dep/acelite/ace/Sock_Connect.cpp +++ b/dep/acelite/ace/Sock_Connect.cpp @@ -1,4 +1,4 @@ -// $Id: Sock_Connect.cpp 91685 2010-09-09 09:35:14Z johnnyw $ +// $Id: Sock_Connect.cpp 95628 2012-03-21 22:10:02Z shuston $ #include "ace/Sock_Connect.h" #include "ace/INET_Addr.h" @@ -29,33 +29,16 @@ # endif /* _AIX */ #endif /* ACE_HAS_IPV6 */ -# if defined (ACE_HAS_GETIFADDRS) -# if defined (ACE_VXWORKS) -# include /**/ -# else -# include /**/ -# endif /*ACE_VXWORKS */ -# endif /* ACE_HAS_GETIFADDRS */ +#if defined (ACE_HAS_GETIFADDRS) +# include "ace/os_include/os_ifaddrs.h" +#endif /* ACE_HAS_GETIFADDRS */ -#if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) -#include /**/ -#include /**/ -#if defined (ACE_HAS_IPV6) -#include /**/ -extern "C" { - extern struct in_ifaddr* in_ifaddr; - extern LIST_HEAD(in_ifaddrhashhead, in_ifaddr) *in_ifaddrhashtbl; -} -#endif /* ACE_HAS_IPV6 */ -#include "ace/OS_NS_stdio.h" -#endif /* ACE_VXWORKS < 0x600 */ - -#if defined (ACE_VXWORKS) && ((ACE_VXWORKS >= 0x630) && (ACE_VXWORKS <= 0x670)) && defined (__RTP__) && defined (ACE_HAS_IPV6) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) && defined (__RTP__) && defined (ACE_HAS_IPV6) const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; const struct in6_addr in6addr_nodelocal_allnodes = IN6ADDR_NODELOCAL_ALLNODES_INIT; const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT; const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; -#endif /* ACE_VXWORKS >= 0x630 && <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ +#endif /* ACE_VXWORKS <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ #if defined (ACE_HAS_WINCE) #include /**/ @@ -146,17 +129,6 @@ namespace # define SA_FAMILY sa_family #endif /* ACE_HAS_IPV6 */ -// This is a hack to work around a problem with Visual Age C++ 5 and 6 on AIX. -// Without this, the compiler auto-instantiates the ACE_Auto_Array_Ptr for -// ifreq (contained in this module) but only adds the #include for -// and not the one for which is also needed. Although we -// don't need the template defined here, it makes the compiler pull in -// and the build runs clean. -#if defined (AIX) && defined (__IBMCPP__) && (__IBMCPP__ >= 500) && (__IBMCPP__ < 700) -static ACE_Auto_Array_Ptr force_compiler_to_include_socket_h; -#endif /* AIX && __IBMCPP__ >= 500 */ - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Bind socket to an unused port. @@ -805,8 +777,14 @@ get_ip_interfaces_getifaddrs (size_t &count, p_if != 0; p_if = p_if->ifa_next) { - if (p_if->ifa_addr && - p_if->ifa_addr->sa_family == AF_INET) + if (p_if->ifa_addr == 0) + continue; + + // Check to see if it's up. + if ((p_if->ifa_flags & IFF_UP) != IFF_UP) + continue; + + if (p_if->ifa_addr->sa_family == AF_INET) { struct sockaddr_in *addr = reinterpret_cast (p_if->ifa_addr); @@ -822,8 +800,7 @@ get_ip_interfaces_getifaddrs (size_t &count, } } # if defined (ACE_HAS_IPV6) - else if (p_if->ifa_addr && - p_if->ifa_addr->sa_family == AF_INET6) + else if (p_if->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6 *addr = reinterpret_cast (p_if->ifa_addr); @@ -1094,64 +1071,7 @@ get_ip_interfaces_aix (size_t &count, return 0; } -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) && !defined (ACE_HAS_VXWORKS551_MEDUSA) -int -get_ip_interfaces_vxworks_lt600 (size_t &count, - ACE_INET_Addr *&addrs) -{ - count = 0; - // Loop through each address structure - -# if defined (ACE_HAS_IPV6) && defined (TAILQ_ENTRY) -# define ia_next ia_link.tqe_next -# endif /* TAILQ_ENTRY */ - - for (struct in_ifaddr* ia = in_ifaddr; ia != 0; ia = ia->ia_next) - { - ++count; - } - - // Now create and initialize output array. - ACE_NEW_RETURN (addrs, - ACE_INET_Addr[count], - -1); // caller must free - count = 0; - for (struct in_ifaddr* ia = in_ifaddr; ia != 0; ia = ia->ia_next) - { - struct ifnet* ifp = ia->ia_ifa.ifa_ifp; - if (ifp != 0) - { - // Get the current interface name - char interface[64]; - ACE_OS::sprintf(interface, "%s%d", ifp->if_name, ifp->if_unit); - - // Get the address for the current interface - char address [INET_ADDR_LEN]; - STATUS status = ifAddrGet(interface, address); - - if (status == OK) - { - // Concatenate a ':' at the end. This is because in - // ACE_INET_Addr::string_to_addr, the ip_address is - // obtained using ':' as the delimiter. Since, using - // ifAddrGet(), we just get the IP address, I am adding - // a ":" to get with the general case. - ACE_OS::strcat (address, ":"); - addrs[count].set (address); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("ACE::get_ip_interface failed\n") - ACE_TEXT ("Couldnt get the IP Address\n")), - -1); - } - ++count; - } - } - return 0; -} -#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX || ACE_VXWORKS < 0x600 +#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX // return an array of all configured IP interfaces on this host, count @@ -1174,8 +1094,6 @@ ACE::get_ip_interfaces (size_t &count, ACE_INET_Addr *&addrs) return get_ip_interfaces_hpux (count, addrs); #elif defined (_AIX) return get_ip_interfaces_aix (count, addrs); -#elif defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x600) && !defined (ACE_HAS_VXWORKS551_MEDUSA) - return get_ip_interfaces_vxworks_lt600 (count, addrs); #elif (defined (__unix) || defined (__unix__) || defined (ACE_OPENVMS) || (defined (ACE_VXWORKS) && !defined (ACE_HAS_GETIFADDRS)) || defined (ACE_HAS_RTEMS)) && !defined (ACE_LACKS_NETWORKING) // COMMON (SVR4 and BSD) UNIX CODE diff --git a/dep/acelite/ace/Stack_Trace.cpp b/dep/acelite/ace/Stack_Trace.cpp index 6c04e192886..353be81067b 100644 --- a/dep/acelite/ace/Stack_Trace.cpp +++ b/dep/acelite/ace/Stack_Trace.cpp @@ -2,7 +2,7 @@ /** * @file Stack_Trace.cpp * - * $Id: Stack_Trace.cpp 91286 2010-08-05 09:04:31Z johnnyw $ + * $Id: Stack_Trace.cpp 96017 2012-08-08 22:18:09Z mitza $ * * @brief Encapsulate string representation of stack trace. * @@ -197,7 +197,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, // See memEdrLib.c in VxWorks RTP sources for an example of stack tracing. -static STATUS ace_vx_rtp_pc_validate (INSTR *pc, TRC_OS_CTX *pOsCtx) +static STATUS ace_vx_rtp_pc_validate (INSTR *pc, TRC_OS_CTX *) { return ALIGNED (pc, sizeof (INSTR)) ? OK : ERROR; } @@ -222,7 +222,12 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, TRC_OS_CTX osCtx; osCtx.stackBase = desc.td_pStackBase; osCtx.stackEnd = desc.td_pStackEnd; +#if (ACE_VXWORKS < 0x690) osCtx.pcValidateRtn = reinterpret_cast (ace_vx_rtp_pc_validate); +#else + // reinterpret_cast causes an error + osCtx.pcValidateRtn = ace_vx_rtp_pc_validate; +#endif char *fp = _WRS_FRAMEP_FROM_JMP_BUF (regs); INSTR *pc = _WRS_RET_PC_FROM_JMP_BUF (regs); @@ -250,8 +255,19 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, const char *fnName = "(no symbols)"; static const int N_ARGS = 12; - int buf[N_ARGS]; - int *pArgs = 0; +#if (ACE_VXWORKS < 0x690) +# define ACE_VX_USR_ARG_T int +# define ACE_VX_ARG_FORMAT "%x" +#else +# define ACE_VX_USR_ARG_T _Vx_usr_arg_t +# ifdef _WRS_CONFIG_LP64 +# define ACE_VX_ARG_FORMAT "%lx" +# else +# define ACE_VX_ARG_FORMAT "%x" +# endif +#endif + ACE_VX_USR_ARG_T buf[N_ARGS]; + ACE_VX_USR_ARG_T *pArgs = 0; int numArgs = trcLibFuncs.lvlArgsGet (prevPc, prevFn, prevFp, buf, N_ARGS, &pArgs); @@ -262,7 +278,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, size_t len = ACE_OS::strlen (this->buf_); size_t space = SYMBUFSIZ - len - 1; char *cursor = this->buf_ + len; - size_t written = ACE_OS::snprintf (cursor, space, "%x %s", + size_t written = ACE_OS::snprintf (cursor, space, "%p %s", prevFn, fnName); cursor += written; space -= written; @@ -272,7 +288,9 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, { if (arg == 0) *cursor++ = '(', --space; written = ACE_OS::snprintf (cursor, space, - (arg < numArgs - 1) ? "%x, " : "%x", + (arg < numArgs - 1) ? + ACE_VX_ARG_FORMAT ", " : + ACE_VX_ARG_FORMAT, pArgs[arg]); cursor += written; space -= written; diff --git a/dep/acelite/ace/Stats.cpp b/dep/acelite/ace/Stats.cpp index 856d0e04db5..04bba5e86b1 100644 --- a/dep/acelite/ace/Stats.cpp +++ b/dep/acelite/ace/Stats.cpp @@ -1,4 +1,4 @@ -// $Id: Stats.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Stats.cpp 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/Stats.h" @@ -68,15 +68,8 @@ ACE_Stats::mean (ACE_Stats_Value &m, { if (number_of_samples_ > 0) { -#if defined ACE_LACKS_LONGLONG_T - // If ACE_LACKS_LONGLONG_T, then ACE_UINT64 is a user-defined class. - // To prevent having to construct a static of that class, declare it - // on the stack, and construct it, in each function that needs it. - const ACE_U_LongLong ACE_STATS_INTERNAL_OFFSET (0, 8); -#else /* ! ACE_LACKS_LONGLONG_T */ const ACE_UINT64 ACE_STATS_INTERNAL_OFFSET = ACE_UINT64_LITERAL (0x100000000); -#endif /* ! ACE_LACKS_LONGLONG_T */ ACE_UINT64 sum = ACE_STATS_INTERNAL_OFFSET; ACE_Unbounded_Queue_Iterator i (samples_); diff --git a/dep/acelite/ace/Strategies.h b/dep/acelite/ace/Strategies.h deleted file mode 100644 index 484ffa9a510..00000000000 --- a/dep/acelite/ace/Strategies.h +++ /dev/null @@ -1,33 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Strategies.h - * - * $Id: Strategies.h 80826 2008-03-04 14:51:23Z wotte $ - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_STRATEGIES_H -#define ACE_STRATEGIES_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/// Place holder for backward compatibility.. -#include "ace/Connection_Recycling_Strategy.h" -#include "ace/Hashable.h" -#include "ace/Notification_Strategy.h" -#include "ace/Reactor_Notification_Strategy.h" -#include "ace/Recyclable.h" -#include "ace/Refcountable.h" - - -#include /**/ "ace/post.h" -#endif /*ACE_STRATEGIES_H*/ diff --git a/dep/acelite/ace/Strategies_T.cpp b/dep/acelite/ace/Strategies_T.cpp index fbbc1a5bc93..28d786489ad 100644 --- a/dep/acelite/ace/Strategies_T.cpp +++ b/dep/acelite/ace/Strategies_T.cpp @@ -1,4 +1,4 @@ -// $Id: Strategies_T.cpp 89510 2010-03-17 12:21:14Z vzykov $ +// $Id: Strategies_T.cpp 95630 2012-03-22 13:04:47Z johnnyw $ #ifndef ACE_STRATEGIES_T_CPP #define ACE_STRATEGIES_T_CPP @@ -1011,12 +1011,15 @@ ACE_Cached_Connect_Strategy::connect_s return result; } - // For all successful cases: mark the in the cache - // as being . Therefore recyclable is BUSY. - entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY); + if (entry) + { + // For all successful cases: mark the in the cache + // as being . Therefore recyclable is BUSY. + entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY); - // And increment the refcount - entry->ext_id_.increment (); + // And increment the refcount + entry->ext_id_.increment (); + } return 0; } diff --git a/dep/acelite/ace/Stream.cpp b/dep/acelite/ace/Stream.cpp index 4d7a893a2fe..6f30f863661 100644 --- a/dep/acelite/ace/Stream.cpp +++ b/dep/acelite/ace/Stream.cpp @@ -1,5 +1,5 @@ // Stream.cpp -// $Id: Stream.cpp 90072 2010-05-04 21:34:39Z cbeaulac $ +// $Id: Stream.cpp 96070 2012-08-17 09:07:16Z mcorino $ #ifndef ACE_STREAM_CPP #define ACE_STREAM_CPP @@ -25,14 +25,14 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Stream) // Give some idea of what the heck is going on in a stream! -template void -ACE_Stream::dump (void) const +template void +ACE_Stream::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Stream::dump"); + ACE_TRACE ("ACE_Stream::dump"); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- module links --------\n"))); - for (ACE_Module *mp = this->stream_head_; + for (ACE_Module *mp = this->stream_head_; ; mp = mp->next ()) { @@ -43,7 +43,7 @@ ACE_Stream::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- writer links --------\n"))); - ACE_Task *tp; + ACE_Task *tp; for (tp = this->stream_head_->writer (); ; @@ -72,10 +72,10 @@ ACE_Stream::dump (void) const #endif /* ACE_HAS_DUMP */ } -template int -ACE_Stream::push (ACE_Module *new_top) +template int +ACE_Stream::push (ACE_Module *new_top) { - ACE_TRACE ("ACE_Stream::push"); + ACE_TRACE ("ACE_Stream::push"); if (this->push_module (new_top, this->stream_head_->next (), this->stream_head_) == -1) @@ -84,27 +84,27 @@ ACE_Stream::push (ACE_Module *new_top) return 0; } -template int -ACE_Stream::put (ACE_Message_Block *mb, ACE_Time_Value *tv) +template int +ACE_Stream::put (ACE_Message_Block *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Stream::put"); + ACE_TRACE ("ACE_Stream::put"); return this->stream_head_->writer ()->put (mb, tv); } -template int -ACE_Stream::get (ACE_Message_Block *&mb, ACE_Time_Value *tv) +template int +ACE_Stream::get (ACE_Message_Block *&mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Stream::get"); + ACE_TRACE ("ACE_Stream::get"); return this->stream_head_->reader ()->getq (mb, tv); } // Return the "top" ACE_Module in a ACE_Stream, skipping over the // stream_head. -template int -ACE_Stream::top (ACE_Module *&m) +template int +ACE_Stream::top (ACE_Module *&m) { - ACE_TRACE ("ACE_Stream::top"); + ACE_TRACE ("ACE_Stream::top"); if (this->stream_head_->next () == this->stream_tail_) return -1; else @@ -114,18 +114,18 @@ ACE_Stream::top (ACE_Module *&m) } } -template int -ACE_Stream::insert (const ACE_TCHAR *prev_name, - ACE_Module *mod) +template int +ACE_Stream::insert (const ACE_TCHAR *prev_name, + ACE_Module *mod) { - ACE_TRACE ("ACE_Stream::insert"); + ACE_TRACE ("ACE_Stream::insert"); - for (ACE_Module *prev_mod = this->stream_head_; + for (ACE_Module *prev_mod = this->stream_head_; prev_mod != 0; prev_mod = prev_mod->next ()) if (ACE_OS::strcmp (prev_mod->name (), prev_name) == 0) { - ACE_Module *next_mod = prev_mod->next (); + ACE_Module *next_mod = prev_mod->next (); // We can't insert a module below . if (next_mod == 0) @@ -146,20 +146,20 @@ ACE_Stream::insert (const ACE_TCHAR *prev_name, return -1; } -template int -ACE_Stream::replace (const ACE_TCHAR *replace_name, - ACE_Module *mod, +template int +ACE_Stream::replace (const ACE_TCHAR *replace_name, + ACE_Module *mod, int flags) { - ACE_TRACE ("ACE_Stream::replace"); - ACE_Module *prev_mod = 0; + ACE_TRACE ("ACE_Stream::replace"); + ACE_Module *prev_mod = 0; - for (ACE_Module *rep_mod = this->stream_head_; + for (ACE_Module *rep_mod = this->stream_head_; rep_mod != 0; rep_mod = rep_mod->next ()) if (ACE_OS::strcmp (rep_mod->name (), replace_name) == 0) { - ACE_Module *next_mod = rep_mod->next (); + ACE_Module *next_mod = rep_mod->next (); if (next_mod) mod->link (next_mod); @@ -184,7 +184,7 @@ ACE_Stream::replace (const ACE_TCHAR *replace_name, if (mod->writer ()->open (mod->arg ()) == -1) return -1; - if (flags != ACE_Module::M_DELETE_NONE) + if (flags != ACE_Module::M_DELETE_NONE) { rep_mod->close (flags); delete rep_mod; @@ -201,17 +201,17 @@ ACE_Stream::replace (const ACE_TCHAR *replace_name, // Remove the "top" ACE_Module in a ACE_Stream, skipping over the // stream_head. -template int -ACE_Stream::pop (int flags) +template int +ACE_Stream::pop (int flags) { - ACE_TRACE ("ACE_Stream::pop"); + ACE_TRACE ("ACE_Stream::pop"); if (this->stream_head_->next () == this->stream_tail_) return -1; else { // Skip over the ACE_Stream head. - ACE_Module *top_mod = this->stream_head_->next (); - ACE_Module *new_top = top_mod->next (); + ACE_Module *top_mod = this->stream_head_->next (); + ACE_Module *new_top = top_mod->next (); this->stream_head_->next (new_top); @@ -220,7 +220,7 @@ ACE_Stream::pop (int flags) top_mod->close (flags); // Don't delete the Module unless the flags request this. - if (flags != ACE_Module::M_DELETE_NONE) + if (flags != ACE_Module::M_DELETE_NONE) delete top_mod; this->stream_head_->writer ()->next (new_top->writer ()); @@ -232,14 +232,14 @@ ACE_Stream::pop (int flags) // Remove a named ACE_Module from an arbitrary place in the // ACE_Stream. -template int -ACE_Stream::remove (const ACE_TCHAR *name, +template int +ACE_Stream::remove (const ACE_TCHAR *name, int flags) { - ACE_TRACE ("ACE_Stream::remove"); - ACE_Module *prev = 0; + ACE_TRACE ("ACE_Stream::remove"); + ACE_Module *prev = 0; - for (ACE_Module *mod = this->stream_head_; + for (ACE_Module *mod = this->stream_head_; mod != 0; mod = mod->next ()) { @@ -247,7 +247,7 @@ ACE_Stream::remove (const ACE_TCHAR *name, if (ACE::debug ()) { ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE_Stream::remove comparing existing module :%s: with :%s:\n"), + ACE_TEXT ("ACE_Stream::remove - comparing existing module :%s: with :%s:\n"), mod->name (), name)); } @@ -260,11 +260,13 @@ ACE_Stream::remove (const ACE_TCHAR *name, else prev->link (mod->next ()); + // Close down the module. + mod->close (flags); + // Don't delete the Module unless the flags request this. - if (flags != ACE_Module::M_DELETE_NONE) + if (flags != ACE_Module::M_DELETE_NONE) { - // Close down the module and release the memory. - mod->close (flags); + // Release the memory. delete mod; } @@ -278,11 +280,11 @@ ACE_Stream::remove (const ACE_TCHAR *name, return -1; } -template ACE_Module * -ACE_Stream::find (const ACE_TCHAR *name) +template ACE_Module * +ACE_Stream::find (const ACE_TCHAR *name) { - ACE_TRACE ("ACE_Stream::find"); - for (ACE_Module *mod = this->stream_head_; + ACE_TRACE ("ACE_Stream::find"); + for (ACE_Module *mod = this->stream_head_; mod != 0; mod = mod->next ()) if (ACE_OS::strcmp (mod->name (), name) == 0) @@ -293,16 +295,16 @@ ACE_Stream::find (const ACE_TCHAR *name) // Actually push a module onto the stack... -template int -ACE_Stream::push_module (ACE_Module *new_top, - ACE_Module *current_top, - ACE_Module *head) +template int +ACE_Stream::push_module (ACE_Module *new_top, + ACE_Module *current_top, + ACE_Module *head) { - ACE_TRACE ("ACE_Stream::push_module"); - ACE_Task *nt_reader = new_top->reader (); - ACE_Task *nt_writer = new_top->writer (); - ACE_Task *ct_reader = 0; - ACE_Task *ct_writer = 0; + ACE_TRACE ("ACE_Stream::push_module"); + ACE_Task *nt_reader = new_top->reader (); + ACE_Task *nt_writer = new_top->writer (); + ACE_Task *ct_reader = 0; + ACE_Task *ct_writer = 0; if (current_top) { @@ -331,47 +333,45 @@ ACE_Stream::push_module (ACE_Module *new_top, return 0; } -template int -ACE_Stream::open (void *a, - ACE_Module *head, - ACE_Module *tail) +template int +ACE_Stream::open (void *a, + ACE_Module *head, + ACE_Module *tail) { - ACE_TRACE ("ACE_Stream::open"); + ACE_TRACE ("ACE_Stream::open"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1); - ACE_Task *h1 = 0, *h2 = 0; - ACE_Task *t1 = 0, *t2 = 0; + ACE_Task *h1 = 0, *h2 = 0; + ACE_Task *t1 = 0, *t2 = 0; if (head == 0) { - ACE_NEW_RETURN (h1, - ACE_Stream_Head, - -1); - ACE_NEW_RETURN (h2, - ACE_Stream_Head, - -1); - ACE_NEW_RETURN (head, - ACE_Module (ACE_TEXT ("ACE_Stream_Head"), - h1, h2, - a, - M_DELETE), - -1); + typedef ACE_Stream_Head STREAM_HEAD_TYPE; + ACE_NEW_NORETURN (h1, + STREAM_HEAD_TYPE); + ACE_NEW_NORETURN (h2, + STREAM_HEAD_TYPE); + typedef ACE_Module MODULE_TYPE; + ACE_NEW_NORETURN (head, + MODULE_TYPE (ACE_TEXT ("ACE_Stream_Head"), + h1, h2, + a, + M_DELETE)); } if (tail == 0) { - ACE_NEW_RETURN (t1, - ACE_Stream_Tail, - -1); - ACE_NEW_RETURN (t2, - ACE_Stream_Tail, - -1); - ACE_NEW_RETURN (tail, - ACE_Module (ACE_TEXT ("ACE_Stream_Tail"), - t1, t2, - a, - M_DELETE), - -1); + typedef ACE_Stream_Tail STREAM_TAIL_TYPE; + ACE_NEW_NORETURN (t1, + STREAM_TAIL_TYPE); + ACE_NEW_NORETURN (t2, + STREAM_TAIL_TYPE); + typedef ACE_Module MODULE_TYPE; + ACE_NEW_NORETURN (tail, + MODULE_TYPE (ACE_TEXT ("ACE_Stream_Tail"), + t1, t2, + a, + M_DELETE)); } // Make sure *all* the allocation succeeded! @@ -401,10 +401,10 @@ ACE_Stream::open (void *a, return 0; } -template int -ACE_Stream::close (int flags) +template int +ACE_Stream::close (int flags) { - ACE_TRACE ("ACE_Stream::close"); + ACE_TRACE ("ACE_Stream::close"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1); if (this->stream_head_ != 0 @@ -441,14 +441,14 @@ ACE_Stream::close (int flags) return 0; } -template int -ACE_Stream::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, +template int +ACE_Stream::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, void *a) { - ACE_TRACE ("ACE_Stream::control"); + ACE_TRACE ("ACE_Stream::control"); ACE_IO_Cntl_Msg ioc (cmd); - ACE_Message_Block *db; + ACE_Message_Block *db = 0; // Try to create a data block that contains the user-supplied data. ACE_NEW_RETURN (db, @@ -462,12 +462,11 @@ ACE_Stream::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, // field. ACE_Message_Block *cb = 0; - ACE_NEW_RETURN (cb, - ACE_Message_Block (sizeof ioc, - ACE_Message_Block::MB_IOCTL, - db, - (char *) &ioc), - -1); + ACE_NEW_NORETURN (cb, + ACE_Message_Block (sizeof ioc, + ACE_Message_Block::MB_IOCTL, + db, + (char *) &ioc)); // @@ Michael: The old semantic assumed that cb returns == 0 // if no memory was available. We will now return immediately // without release (errno is set to ENOMEM by the macro). @@ -501,15 +500,15 @@ ACE_Stream::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, // on the fact that the Stream head and Stream tail are non-NULL... // This must be called with locks held. -template int -ACE_Stream::link_i (ACE_Stream &us) +template int +ACE_Stream::link_i (ACE_Stream &us) { - ACE_TRACE ("ACE_Stream::link_i"); + ACE_TRACE ("ACE_Stream::link_i"); this->linked_us_ = &us; // Make sure the other side is also linked to us! us.linked_us_ = this; - ACE_Module *my_tail = this->stream_head_; + ACE_Module *my_tail = this->stream_head_; if (my_tail == 0) return -1; @@ -518,7 +517,7 @@ ACE_Stream::link_i (ACE_Stream &us) while (my_tail->next () != this->stream_tail_) my_tail = my_tail->next (); - ACE_Module *other_tail = us.stream_head_; + ACE_Module *other_tail = us.stream_head_; if (other_tail == 0) return -1; @@ -533,10 +532,10 @@ ACE_Stream::link_i (ACE_Stream &us) return 0; } -template int -ACE_Stream::link (ACE_Stream &us) +template int +ACE_Stream::link (ACE_Stream &us) { - ACE_TRACE ("ACE_Stream::link"); + ACE_TRACE ("ACE_Stream::link"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1); @@ -545,16 +544,16 @@ ACE_Stream::link (ACE_Stream &us) // Must be called with locks held... -template int -ACE_Stream::unlink_i (void) +template int +ACE_Stream::unlink_i (void) { - ACE_TRACE ("ACE_Stream::unlink_i"); + ACE_TRACE ("ACE_Stream::unlink_i"); // Only try to unlink if we are in fact still linked! if (this->linked_us_ != 0) { - ACE_Module *my_tail = this->stream_head_; + ACE_Module *my_tail = this->stream_head_; // Only relink if we still exist! if (my_tail) @@ -567,7 +566,7 @@ ACE_Stream::unlink_i (void) my_tail->writer ()->next (this->stream_tail_->writer ()); } - ACE_Module *other_tail = + ACE_Module *other_tail = this->linked_us_->stream_head_; // Only fiddle with the other side if it in fact still remains. @@ -590,42 +589,48 @@ ACE_Stream::unlink_i (void) return -1; } -template int -ACE_Stream::unlink (void) +template int +ACE_Stream::unlink (void) { - ACE_TRACE ("ACE_Stream::unlink"); + ACE_TRACE ("ACE_Stream::unlink"); ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1); return this->unlink_i (); } -template -ACE_Stream::ACE_Stream (void * a, - ACE_Module *head, - ACE_Module *tail) - : linked_us_ (0), +template +ACE_Stream::ACE_Stream (void * a, + ACE_Module *head, + ACE_Module *tail) + : stream_head_ (0), + stream_tail_ (0), + linked_us_ (0), +#if defined (ACE_HAS_THREADS) + final_close_ (lock_, cond_attr_) +#else final_close_ (lock_) +#endif { - ACE_TRACE ("ACE_Stream::ACE_Stream"); + ACE_TRACE ("ACE_Stream::ACE_Stream"); if (this->open (a, head, tail) == -1) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_Stream::open (%s, %s)\n"), + ACE_TEXT ("ACE_Stream::open (%s, %s)\n"), head->name (), tail->name ())); } -template -ACE_Stream::~ACE_Stream (void) +template +ACE_Stream::~ACE_Stream (void) { - ACE_TRACE ("ACE_Stream::~ACE_Stream"); + ACE_TRACE ("ACE_Stream::~ACE_Stream"); if (this->stream_head_ != 0) this->close (); } -template -ACE_Stream_Iterator::ACE_Stream_Iterator (const ACE_Stream &sr) +template +ACE_Stream_Iterator::ACE_Stream_Iterator (const ACE_Stream &sr) : next_ (sr.stream_head_) { - ACE_TRACE ("ACE_Stream_Iterator::ACE_Stream_Iterator"); + ACE_TRACE ("ACE_Stream_Iterator::ACE_Stream_Iterator"); } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Stream.h b/dep/acelite/ace/Stream.h index 9172485c132..a9dc401f046 100644 --- a/dep/acelite/ace/Stream.h +++ b/dep/acelite/ace/Stream.h @@ -4,7 +4,7 @@ /** * @file Stream.h * - * $Id: Stream.h 91058 2010-07-12 08:20:09Z johnnyw $ + * $Id: Stream.h 96070 2012-08-17 09:07:16Z mcorino $ * * @author Douglas C. Schmidt */ @@ -24,11 +24,14 @@ #include "ace/IO_Cntl_Msg.h" #include "ace/Message_Block.h" #include "ace/Module.h" +#if defined (ACE_HAS_THREADS) +# include "ace/Condition_Attributes.h" +#endif ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Forward decls. -template class ACE_Stream_Iterator; +template class ACE_Stream_Iterator; class ACE_Time_Value; /** @@ -45,11 +48,11 @@ class ACE_Time_Value; * won't be overridden properly unless you call it in a subclass * destructor. */ -template +template class ACE_Stream { public: - friend class ACE_Stream_Iterator; + friend class ACE_Stream_Iterator; enum { @@ -66,8 +69,8 @@ public: * @a arg is the value past in to the methods of the tasks. */ ACE_Stream (void *arg = 0, - ACE_Module *head = 0, - ACE_Module *tail = 0); + ACE_Module *head = 0, + ACE_Module *tail = 0); /** * Create a Stream consisting of @a head and @a tail as the Stream @@ -76,8 +79,8 @@ public: * @a arg is the value past in to the @c open() methods of the tasks. */ virtual int open (void *arg, - ACE_Module *head = 0, - ACE_Module *tail = 0); + ACE_Module *head = 0, + ACE_Module *tail = 0); /// Close down the stream and release all the resources. virtual int close (int flags = M_DELETE); @@ -90,7 +93,7 @@ public: /// Add a new module @a mod right below the Stream head. The /// @c open() hook methods of the @c ACE_Tasks in this ACE_Module /// are invoked to initialize the tasks. - virtual int push (ACE_Module *mod); + virtual int push (ACE_Module *mod); /// Remove the @a mod right below the Stream head and close it down. // The hook methods of the in this ACE_Module @@ -99,15 +102,15 @@ public: /// Return the top module on the stream (right below the stream /// head). - virtual int top (ACE_Module *&mod); + virtual int top (ACE_Module *&mod); /// Insert a new module @a mod below the named module @a prev_name. virtual int insert (const ACE_TCHAR *prev_name, - ACE_Module *mod); + ACE_Module *mod); /// Replace the named module @a replace_name with a new module @a mod. virtual int replace (const ACE_TCHAR *replace_name, - ACE_Module *mod, + ACE_Module *mod, int flags = M_DELETE); /// Remove the named module @a mod from the stream. This bypasses the @@ -116,16 +119,16 @@ public: int flags = M_DELETE); /// Return current stream head. - virtual ACE_Module *head (void); + virtual ACE_Module *head (void); /// Return current stream tail. - virtual ACE_Module *tail (void); + virtual ACE_Module *tail (void); /// Find a particular ACE_Module. - virtual ACE_Module *find (const ACE_TCHAR *mod); + virtual ACE_Module *find (const ACE_TCHAR *mod); /// Create a pipe between two Streams. - virtual int link (ACE_Stream &); + virtual int link (ACE_Stream &); /// Remove a pipe formed between two Streams. virtual int unlink (void); @@ -168,26 +171,34 @@ private: /// Actually perform the linking of two Streams (must be called with /// locks held). - int link_i (ACE_Stream &); + int link_i (ACE_Stream &); /// Must a new module onto the Stream. - int push_module (ACE_Module *, - ACE_Module * = 0, - ACE_Module * = 0); + int push_module (ACE_Module *, + ACE_Module * = 0, + ACE_Module * = 0); /// Pointer to the head of the stream. - ACE_Module *stream_head_; + ACE_Module *stream_head_; /// Pointer to the tail of the stream. - ACE_Module *stream_tail_; + ACE_Module *stream_tail_; /// Pointer to an adjoining linked stream. - ACE_Stream *linked_us_; + ACE_Stream *linked_us_; // = Synchronization objects used for thread-safe streams. /// Protect the stream against race conditions. ACE_SYNCH_MUTEX_T lock_; +#if defined (ACE_HAS_THREADS) + /// Attributes to initialize condition with. + /* We only need this because some crappy compilers can't + properly handle initializing the conditions with + temporary objects. */ + ACE_Condition_Attributes_T cond_attr_; +#endif + /// Use to tell all threads waiting on the close that we are done. ACE_SYNCH_CONDITION_T final_close_; }; @@ -197,18 +208,18 @@ private: * * @brief Iterate through an ACE_Stream. */ -template +template class ACE_Stream_Iterator { public: // = Initialization method. - ACE_Stream_Iterator (const ACE_Stream &sr); + ACE_Stream_Iterator (const ACE_Stream &sr); // = Iteration methods. /// Pass back the @a next_item that hasn't been seen in the set. /// Returns 0 when all items have been seen, else 1. - int next (const ACE_Module *&next_item); + int next (const ACE_Module *&next_item); /// Returns 1 when all items have been seen, else 0. int done (void) const; @@ -219,7 +230,7 @@ public: private: /// Next ACE_Module that we haven't yet seen. - ACE_Module *next_; + ACE_Module *next_; }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Stream.inl b/dep/acelite/ace/Stream.inl index 6263d431147..b1bd92a609f 100644 --- a/dep/acelite/ace/Stream.inl +++ b/dep/acelite/ace/Stream.inl @@ -1,49 +1,49 @@ // -*- C++ -*- // -// $Id: Stream.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Stream.inl 96061 2012-08-16 09:36:07Z mcorino $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template ACE_INLINE ACE_Module * -ACE_Stream::head (void) +template ACE_INLINE ACE_Module * +ACE_Stream::head (void) { - ACE_TRACE ("ACE_Stream::head"); + ACE_TRACE ("ACE_Stream::head"); return this->stream_head_; } -template ACE_INLINE ACE_Module * -ACE_Stream::tail (void) +template ACE_INLINE ACE_Module * +ACE_Stream::tail (void) { - ACE_TRACE ("ACE_Stream::tail"); + ACE_TRACE ("ACE_Stream::tail"); return this->stream_tail_; } -template ACE_INLINE int -ACE_Stream::wait (void) +template ACE_INLINE int +ACE_Stream::wait (void) { - ACE_TRACE ("ACE_Stream::wait"); + ACE_TRACE ("ACE_Stream::wait"); return this->final_close_.wait (); } -template ACE_INLINE int -ACE_Stream_Iterator::next (const ACE_Module *&mod) +template ACE_INLINE int +ACE_Stream_Iterator::next (const ACE_Module *&mod) { - ACE_TRACE ("ACE_Stream_Iterator::next"); + ACE_TRACE ("ACE_Stream_Iterator::next"); mod = this->next_; return this->next_ != 0; } -template ACE_INLINE int -ACE_Stream_Iterator::done (void) const +template ACE_INLINE int +ACE_Stream_Iterator::done (void) const { - ACE_TRACE ("ACE_Stream_Iterator::done"); + ACE_TRACE ("ACE_Stream_Iterator::done"); return this->next_ == 0; } -template int -ACE_Stream_Iterator::advance (void) +template int +ACE_Stream_Iterator::advance (void) { - ACE_TRACE ("ACE_Stream_Iterator::advance"); + ACE_TRACE ("ACE_Stream_Iterator::advance"); this->next_ = this->next_->next (); return this->next_ != 0; } diff --git a/dep/acelite/ace/Stream_Modules.cpp b/dep/acelite/ace/Stream_Modules.cpp index 8d11e5da1da..a071aa19f1d 100644 --- a/dep/acelite/ace/Stream_Modules.cpp +++ b/dep/acelite/ace/Stream_Modules.cpp @@ -1,4 +1,4 @@ -// $Id: Stream_Modules.cpp 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Stream_Modules.cpp 96061 2012-08-16 09:36:07Z mcorino $ #ifndef ACE_STREAM_MODULES_CPP #define ACE_STREAM_MODULES_CPP @@ -15,53 +15,53 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Head) -template -ACE_Stream_Head::ACE_Stream_Head (void) +template +ACE_Stream_Head::ACE_Stream_Head (void) { - ACE_TRACE ("ACE_Stream_Head::ACE_Stream_Head"); + ACE_TRACE ("ACE_Stream_Head::ACE_Stream_Head"); } -template -ACE_Stream_Head::~ACE_Stream_Head (void) +template +ACE_Stream_Head::~ACE_Stream_Head (void) { - ACE_TRACE ("ACE_Stream_Head::~ACE_Stream_Head"); + ACE_TRACE ("ACE_Stream_Head::~ACE_Stream_Head"); } -template void -ACE_Stream_Head::dump (void) const +template void +ACE_Stream_Head::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Stream_Head::dump"); + ACE_TRACE ("ACE_Stream_Head::dump"); #endif /* ACE_HAS_DUMP */ } // ACE_Module that act as the head and tail of a Stream. -template int -ACE_Stream_Head::open (void *) +template int +ACE_Stream_Head::open (void *) { - ACE_TRACE ("ACE_Stream_Head::open"); + ACE_TRACE ("ACE_Stream_Head::open"); return 0; } -template int -ACE_Stream_Head::close (u_long) +template int +ACE_Stream_Head::close (u_long) { - ACE_TRACE ("ACE_Stream_Head::close"); + ACE_TRACE ("ACE_Stream_Head::close"); return 0; } -template int -ACE_Stream_Head::svc (void) +template int +ACE_Stream_Head::svc (void) { - ACE_TRACE ("ACE_Stream_Head::svc"); + ACE_TRACE ("ACE_Stream_Head::svc"); return -1; } -template int -ACE_Stream_Head::control (ACE_Message_Block *mb) +template int +ACE_Stream_Head::control (ACE_Message_Block *mb) { - ACE_TRACE ("ACE_Stream_Head::control"); + ACE_TRACE ("ACE_Stream_Head::control"); ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; @@ -80,10 +80,10 @@ ACE_Stream_Head::control (ACE_Message_Block *mb) // Performs canonical flushing at the ACE_Stream Head. -template int -ACE_Stream_Head::canonical_flush (ACE_Message_Block *mb) +template int +ACE_Stream_Head::canonical_flush (ACE_Message_Block *mb) { - ACE_TRACE ("ACE_Stream_Head::canonical_flush"); + ACE_TRACE ("ACE_Stream_Head::canonical_flush"); char *cp = mb->rd_ptr (); if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR)) @@ -99,11 +99,11 @@ ACE_Stream_Head::canonical_flush (ACE_Message_Block *mb) return 0; } -template int -ACE_Stream_Head::put (ACE_Message_Block *mb, +template int +ACE_Stream_Head::put (ACE_Message_Block *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Stream_Head::put"); + ACE_TRACE ("ACE_Stream_Head::put"); int res = 0; if (mb->msg_type () == ACE_Message_Block::MB_IOCTL @@ -126,17 +126,17 @@ ACE_Stream_Head::put (ACE_Message_Block *mb, } } -template int -ACE_Stream_Head::init (int, ACE_TCHAR *[]) +template int +ACE_Stream_Head::init (int, ACE_TCHAR *[]) { - ACE_TRACE ("ACE_Stream_Head::init"); + ACE_TRACE ("ACE_Stream_Head::init"); return 0; } -template int -ACE_Stream_Head::info (ACE_TCHAR **strp, size_t length) const +template int +ACE_Stream_Head::info (ACE_TCHAR **strp, size_t length) const { - ACE_TRACE ("ACE_Stream_Head::info"); + ACE_TRACE ("ACE_Stream_Head::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) @@ -146,60 +146,60 @@ ACE_Stream_Head::info (ACE_TCHAR **strp, size_t length) const return static_cast (ACE_OS::strlen (name)); } -template int -ACE_Stream_Head::fini (void) +template int +ACE_Stream_Head::fini (void) { - ACE_TRACE ("ACE_Stream_Head::fini"); + ACE_TRACE ("ACE_Stream_Head::fini"); return 0; } ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Tail) -template -ACE_Stream_Tail::ACE_Stream_Tail (void) +template +ACE_Stream_Tail::ACE_Stream_Tail (void) { - ACE_TRACE ("ACE_Stream_Tail::ACE_Stream_Tail"); + ACE_TRACE ("ACE_Stream_Tail::ACE_Stream_Tail"); } -template -ACE_Stream_Tail::~ACE_Stream_Tail (void) +template +ACE_Stream_Tail::~ACE_Stream_Tail (void) { - ACE_TRACE ("ACE_Stream_Tail::~ACE_Stream_Tail"); + ACE_TRACE ("ACE_Stream_Tail::~ACE_Stream_Tail"); } -template void -ACE_Stream_Tail::dump (void) const +template void +ACE_Stream_Tail::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Stream_Tail::dump"); + ACE_TRACE ("ACE_Stream_Tail::dump"); #endif /* ACE_HAS_DUMP */ } -template int -ACE_Stream_Tail::open (void *) +template int +ACE_Stream_Tail::open (void *) { - ACE_TRACE ("ACE_Stream_Tail::open"); + ACE_TRACE ("ACE_Stream_Tail::open"); return 0; } -template int -ACE_Stream_Tail::close (u_long) +template int +ACE_Stream_Tail::close (u_long) { - ACE_TRACE ("ACE_Stream_Tail::close"); + ACE_TRACE ("ACE_Stream_Tail::close"); return 0; } -template int -ACE_Stream_Tail::svc (void) +template int +ACE_Stream_Tail::svc (void) { - ACE_TRACE ("ACE_Stream_Tail::svc"); + ACE_TRACE ("ACE_Stream_Tail::svc"); return -1; } -template int -ACE_Stream_Tail::control (ACE_Message_Block *mb) +template int +ACE_Stream_Tail::control (ACE_Message_Block *mb) { - ACE_TRACE ("ACE_Stream_Tail::control"); + ACE_TRACE ("ACE_Stream_Tail::control"); ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; @@ -217,16 +217,17 @@ ACE_Stream_Tail::control (ACE_Message_Block *mb) } default: mb->msg_type (ACE_Message_Block::MB_IOCNAK); + break; } return this->reply (mb); } // Perform flush algorithm as though we were the driver. -template int -ACE_Stream_Tail::canonical_flush (ACE_Message_Block *mb) +template int +ACE_Stream_Tail::canonical_flush (ACE_Message_Block *mb) { - ACE_TRACE ("ACE_Stream_Tail::canonical_flush"); + ACE_TRACE ("ACE_Stream_Tail::canonical_flush"); char *cp = mb->rd_ptr (); if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW)) @@ -246,11 +247,11 @@ ACE_Stream_Tail::canonical_flush (ACE_Message_Block *mb) return 0; } -template int -ACE_Stream_Tail::put (ACE_Message_Block *mb, +template int +ACE_Stream_Tail::put (ACE_Message_Block *mb, ACE_Time_Value *) { - ACE_TRACE ("ACE_Stream_Tail::put"); + ACE_TRACE ("ACE_Stream_Tail::put"); if (this->is_writer ()) { @@ -269,17 +270,17 @@ ACE_Stream_Tail::put (ACE_Message_Block *mb, return -1; } -template int -ACE_Stream_Tail::init (int, ACE_TCHAR *[]) +template int +ACE_Stream_Tail::init (int, ACE_TCHAR *[]) { - ACE_TRACE ("ACE_Stream_Tail::init"); + ACE_TRACE ("ACE_Stream_Tail::init"); return 0; } -template int -ACE_Stream_Tail::info (ACE_TCHAR **strp, size_t length) const +template int +ACE_Stream_Tail::info (ACE_TCHAR **strp, size_t length) const { - ACE_TRACE ("ACE_Stream_Tail::info"); + ACE_TRACE ("ACE_Stream_Tail::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) @@ -289,76 +290,76 @@ ACE_Stream_Tail::info (ACE_TCHAR **strp, size_t length) const return static_cast (ACE_OS::strlen (name)); } -template int -ACE_Stream_Tail::fini (void) +template int +ACE_Stream_Tail::fini (void) { - ACE_TRACE ("ACE_Stream_Tail::fini"); + ACE_TRACE ("ACE_Stream_Tail::fini"); return 0; } ACE_ALLOC_HOOK_DEFINE(ACE_Thru_Task) -template -ACE_Thru_Task::ACE_Thru_Task (void) +template +ACE_Thru_Task::ACE_Thru_Task (void) { - ACE_TRACE ("ACE_Thru_Task::ACE_Thru_Task"); + ACE_TRACE ("ACE_Thru_Task::ACE_Thru_Task"); } -template -ACE_Thru_Task::~ACE_Thru_Task (void) +template +ACE_Thru_Task::~ACE_Thru_Task (void) { - ACE_TRACE ("ACE_Thru_Task::~ACE_Thru_Task"); + ACE_TRACE ("ACE_Thru_Task::~ACE_Thru_Task"); } -template void -ACE_Thru_Task::dump (void) const +template void +ACE_Thru_Task::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Thru_Task::dump"); + ACE_TRACE ("ACE_Thru_Task::dump"); #endif /* ACE_HAS_DUMP */ } -template int -ACE_Thru_Task::open (void *) +template int +ACE_Thru_Task::open (void *) { - ACE_TRACE ("ACE_Thru_Task::open"); + ACE_TRACE ("ACE_Thru_Task::open"); return 0; } -template int -ACE_Thru_Task::close (u_long) +template int +ACE_Thru_Task::close (u_long) { - ACE_TRACE ("ACE_Thru_Task::close"); + ACE_TRACE ("ACE_Thru_Task::close"); return 0; } -template int -ACE_Thru_Task::svc (void) +template int +ACE_Thru_Task::svc (void) { - ACE_TRACE ("ACE_Thru_Task::svc"); + ACE_TRACE ("ACE_Thru_Task::svc"); return -1; } -template int -ACE_Thru_Task::put (ACE_Message_Block *msg, +template int +ACE_Thru_Task::put (ACE_Message_Block *msg, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Thru_Task::put"); + ACE_TRACE ("ACE_Thru_Task::put"); return this->put_next (msg, tv); } -template int -ACE_Thru_Task::init (int, ACE_TCHAR *[]) +template int +ACE_Thru_Task::init (int, ACE_TCHAR *[]) { - ACE_TRACE ("ACE_Thru_Task::init"); + ACE_TRACE ("ACE_Thru_Task::init"); return 0; } -template int -ACE_Thru_Task::info (ACE_TCHAR **strp, +template int +ACE_Thru_Task::info (ACE_TCHAR **strp, size_t length) const { - ACE_TRACE ("ACE_Thru_Task::info"); + ACE_TRACE ("ACE_Thru_Task::info"); const ACE_TCHAR *name = this->name (); if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0) @@ -368,10 +369,10 @@ ACE_Thru_Task::info (ACE_TCHAR **strp, return static_cast (ACE_OS::strlen (name)); } -template int -ACE_Thru_Task::fini (void) +template int +ACE_Thru_Task::fini (void) { - ACE_TRACE ("ACE_Thru_Task::fini"); + ACE_TRACE ("ACE_Thru_Task::fini"); return 0; } diff --git a/dep/acelite/ace/Stream_Modules.h b/dep/acelite/ace/Stream_Modules.h index 5bbc072ad4c..008bdecd52f 100644 --- a/dep/acelite/ace/Stream_Modules.h +++ b/dep/acelite/ace/Stream_Modules.h @@ -4,7 +4,7 @@ /** * @file Stream_Modules.h * - * $Id: Stream_Modules.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Stream_Modules.h 96061 2012-08-16 09:36:07Z mcorino $ * * @author Douglas C. Schmidt */ @@ -47,15 +47,15 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * stream. * - Writer: The block is passed to the next module in the stream. */ -template -class ACE_Stream_Head : public ACE_Task +template +class ACE_Stream_Head : public ACE_Task { public: /// Construction ACE_Stream_Head (void); /// Destruction - ~ACE_Stream_Head (void); + virtual ~ACE_Stream_Head (void); // = ACE_Task hooks virtual int open (void *a = 0); @@ -85,15 +85,15 @@ private: * * @brief Standard module that acts as the head of a stream. */ -template -class ACE_Stream_Tail : public ACE_Task +template +class ACE_Stream_Tail : public ACE_Task { public: /// Construction ACE_Stream_Tail (void); /// Destruction - ~ACE_Stream_Tail (void); + virtual ~ACE_Stream_Tail (void); // = ACE_Task hooks virtual int open (void *a = 0); @@ -124,15 +124,15 @@ private: * @brief Standard module that acts as a "no op", simply passing on all * data to its adjacent neighbor. */ -template -class ACE_Thru_Task : public ACE_Task +template +class ACE_Thru_Task : public ACE_Task { public: /// Construction ACE_Thru_Task (void); /// Destruction - ~ACE_Thru_Task (void); + virtual ~ACE_Thru_Task (void); // = ACE_Task hooks virtual int open (void *a = 0); diff --git a/dep/acelite/ace/String_Base.cpp b/dep/acelite/ace/String_Base.cpp index 8438cc6e59d..2373c578204 100644 --- a/dep/acelite/ace/String_Base.cpp +++ b/dep/acelite/ace/String_Base.cpp @@ -1,4 +1,4 @@ -// $Id: String_Base.cpp 88793 2010-02-01 17:50:34Z cleeland $ +// $Id: String_Base.cpp 93238 2011-02-01 14:30:38Z shuston $ #ifndef ACE_STRING_BASE_CPP #define ACE_STRING_BASE_CPP @@ -655,7 +655,9 @@ ACE_String_Base::operator+= (const ACE_CHAR_T c) { ACE_TRACE ("ACE_String_Base::operator+=(const ACE_CHAR_T)"); const size_type slen = 1; - return this->append (&c, slen); + // This temp is silly but it quiets an optimizer warning in IBM XL C++ 10. + ACE_String_Base& r = this->append (&c, slen); + return r; } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/String_Base.h b/dep/acelite/ace/String_Base.h index 128fe76a2b6..b02d786725a 100644 --- a/dep/acelite/ace/String_Base.h +++ b/dep/acelite/ace/String_Base.h @@ -4,7 +4,7 @@ /** * @file String_Base.h * - * $Id: String_Base.h 92057 2010-09-27 14:52:00Z johnnyw $ + * $Id: String_Base.h 95709 2012-04-24 01:19:24Z schmidt $ * * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) * @author Nanbor Wang diff --git a/dep/acelite/ace/Svc_Conf.y b/dep/acelite/ace/Svc_Conf.y index 8ddc6a8d3a7..ec3ed5c06c1 100644 --- a/dep/acelite/ace/Svc_Conf.y +++ b/dep/acelite/ace/Svc_Conf.y @@ -1,5 +1,5 @@ %{ -// $Id: Svc_Conf.y 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Svc_Conf.y 94034 2011-05-09 19:11:03Z johnnyw $ #include "ace/Svc_Conf.h" @@ -331,11 +331,10 @@ ace_get_module (ACE_Service_Type const * sr, ACE_TCHAR const * svc_name, int & yyerrno) { - ACE_Service_Type_Impl const * const type = sr->type (); ACE_Stream_Type const * const st = (sr == 0 ? 0 - : dynamic_cast (type)); + : dynamic_cast (sr->type ())); ACE_Module_Type const * const mt = (st == 0 ? 0 : st->find (svc_name)); if (sr == 0 || st == 0 || mt == 0) diff --git a/dep/acelite/ace/Svc_Conf_y.cpp b/dep/acelite/ace/Svc_Conf_y.cpp index e14286699cd..8aa656ff39f 100644 --- a/dep/acelite/ace/Svc_Conf_y.cpp +++ b/dep/acelite/ace/Svc_Conf_y.cpp @@ -1,4 +1,4 @@ -// $Id: Svc_Conf_y.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Svc_Conf_y.cpp 94034 2011-05-09 19:11:03Z johnnyw $ /* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C @@ -105,7 +105,7 @@ /* Copy the first part of user declarations. */ -// $Id: Svc_Conf_y.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Svc_Conf_y.cpp 94034 2011-05-09 19:11:03Z johnnyw $ #include "ace/Svc_Conf.h" @@ -1955,11 +1955,10 @@ ace_get_module (ACE_Service_Type const * sr, ACE_TCHAR const * svc_name, int & ace_yyerrno) { - ACE_Service_Type_Impl const * const type = sr->type (); ACE_Stream_Type const * const st = (sr == 0 ? 0 - : dynamic_cast (type)); + : dynamic_cast (sr->type ())); ACE_Module_Type const * const mt = (st == 0 ? 0 : st->find (svc_name)); if (sr == 0 || st == 0 || mt == 0) diff --git a/dep/acelite/ace/Svc_Handler.cpp b/dep/acelite/ace/Svc_Handler.cpp index a4f22c98ce4..565d96c5c34 100644 --- a/dep/acelite/ace/Svc_Handler.cpp +++ b/dep/acelite/ace/Svc_Handler.cpp @@ -1,4 +1,4 @@ -// $Id: Svc_Handler.cpp 89432 2010-03-10 10:34:51Z vzykov $ +// $Id: Svc_Handler.cpp 94310 2011-07-09 19:10:06Z schmidt $ #ifndef ACE_SVC_HANDLER_CPP #define ACE_SVC_HANDLER_CPP @@ -95,8 +95,7 @@ template void ACE_Svc_Handler::operator delete (void *p, const ACE_nothrow_t&) throw() { - ACE_TRACE - ("ACE_Svc_Handler::operator delete(nothrow)"); + ACE_TRACE("ACE_Svc_Handler::operator delete(nothrow)"); ::delete [] static_cast (p); } #endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */ diff --git a/dep/acelite/ace/Synch_Traits.h b/dep/acelite/ace/Synch_Traits.h index 785b9fd0eec..a841039a223 100644 --- a/dep/acelite/ace/Synch_Traits.h +++ b/dep/acelite/ace/Synch_Traits.h @@ -4,7 +4,7 @@ /** * @file Synch_Traits.h * - * $Id: Synch_Traits.h 91626 2010-09-07 10:59:20Z johnnyw $ + * $Id: Synch_Traits.h 96073 2012-08-17 13:39:55Z mcorino $ * * Moved from Synch.h. * @@ -27,17 +27,19 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Forward decl class ACE_Null_Mutex; -class ACE_Null_Condition; class ACE_Null_Semaphore; class ACE_Null_Mutex; class ACE_Thread_Mutex; class ACE_Process_Mutex; class ACE_Recursive_Thread_Mutex; class ACE_RW_Thread_Mutex; -class ACE_Condition_Thread_Mutex; -class ACE_Condition_Recursive_Thread_Mutex; class ACE_Thread_Semaphore; +template class ACE_Condition; +typedef ACE_Condition ACE_Null_Condition; +typedef ACE_Condition ACE_Condition_Thread_Mutex; +typedef ACE_Condition ACE_Condition_Recursive_Thread_Mutex; + /** * @class ACE_NULL_SYNCH * @@ -62,7 +64,6 @@ public: #if defined (ACE_HAS_THREADS) class ACE_Process_Mutex; -class ACE_Condition_Recursive_Thread_Mutex; /** * @class ACE_MT_SYNCH diff --git a/dep/acelite/ace/TLI.inl b/dep/acelite/ace/TLI.inl index 001d8c65292..1d7e196b198 100644 --- a/dep/acelite/ace/TLI.inl +++ b/dep/acelite/ace/TLI.inl @@ -1,10 +1,8 @@ // -*- C++ -*- -// -// $Id: TLI.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: TLI.inl 93359 2011-02-11 11:33:12Z mcorino $ #include "ace/TLI.h" - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE diff --git a/dep/acelite/ace/TP_Reactor.cpp b/dep/acelite/ace/TP_Reactor.cpp index 683dfd58622..70998e60497 100644 --- a/dep/acelite/ace/TP_Reactor.cpp +++ b/dep/acelite/ace/TP_Reactor.cpp @@ -1,10 +1,11 @@ -// $Id: TP_Reactor.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: TP_Reactor.cpp 95332 2011-12-15 11:09:41Z mcorino $ #include "ace/TP_Reactor.h" #include "ace/Thread.h" #include "ace/Timer_Queue.h" #include "ace/Sig_Handler.h" #include "ace/Log_Msg.h" +#include "ace/Functor_T.h" #include "ace/OS_NS_sys_time.h" #if !defined (__ACE_INLINE__) @@ -161,7 +162,10 @@ ACE_TP_Reactor::handle_events (ACE_Time_Value *max_wait_time) // After getting the lock just just for deactivation.. if (this->deactivated_) - return -1; + { + errno = ESHUTDOWN; + return -1; + } // Update the countdown to reflect time waiting for the token. countdown.update (); @@ -303,40 +307,10 @@ int ACE_TP_Reactor::handle_timer_events (int & /*event_count*/, ACE_TP_Token_Guard &guard) { - if (this->timer_queue_ == 0 || this->timer_queue_->is_empty()) - { // Empty timer queue so cannot have any expired timers. - return 0; - } + typedef ACE_Member_Function_Command Guard_Release; - // Get the current time - ACE_Time_Value cur_time (this->timer_queue_->gettimeofday () + - this->timer_queue_->timer_skew ()); - - // Look for a node in the timer queue whose timer <= the present - // time. - ACE_Timer_Node_Dispatch_Info info; - - if (this->timer_queue_->dispatch_info (cur_time, info)) - { - const void *upcall_act = 0; - - // Preinvoke. - this->timer_queue_->preinvoke (info, cur_time, upcall_act); - - // Release the token before dispatching notifies... - guard.release_token (); - - // call the functor - this->timer_queue_->upcall (info, cur_time); - - // Postinvoke - this->timer_queue_->postinvoke (info, cur_time, upcall_act); - - // We have dispatched a timer - return 1; - } - - return 0; + Guard_Release release(guard, &ACE_TP_Token_Guard::release_token); + return this->timer_queue_->expire_single(release); } int diff --git a/dep/acelite/ace/TP_Reactor.h b/dep/acelite/ace/TP_Reactor.h index 33e00c2e57f..965b6dfcc91 100644 --- a/dep/acelite/ace/TP_Reactor.h +++ b/dep/acelite/ace/TP_Reactor.h @@ -4,7 +4,7 @@ /** * @file TP_Reactor.h * - * $Id: TP_Reactor.h 82723 2008-09-16 09:35:44Z johnnyw $ + * $Id: TP_Reactor.h 94454 2011-09-08 17:36:56Z johnnyw $ * * The ACE_TP_Reactor (aka, Thread Pool Reactor) uses the * Leader/Followers pattern to demultiplex events among a pool of @@ -131,7 +131,7 @@ private: /// Flag that indicate whether the thread that created this object /// owns the token or not. A value of false indicates that this class - /// hasnt got the token (and hence the thread) and a value of true + /// hasn't got the token (and hence the thread) and a value of true /// vice-versa. bool owner_; diff --git a/dep/acelite/ace/TSS_Adapter.cpp b/dep/acelite/ace/TSS_Adapter.cpp index 748ad1c13e6..e51ca303511 100644 --- a/dep/acelite/ace/TSS_Adapter.cpp +++ b/dep/acelite/ace/TSS_Adapter.cpp @@ -1,7 +1,7 @@ /** * @file TSS_Adapter.cpp * - * $Id: TSS_Adapter.cpp 91286 2010-08-05 09:04:31Z johnnyw $ + * $Id: TSS_Adapter.cpp 93792 2011-04-07 11:48:50Z mcorino $ * * Originally in Synch.cpp * @@ -10,30 +10,25 @@ #include "ace/TSS_Adapter.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_TSS_Adapter::ACE_TSS_Adapter (void *object, ACE_THR_DEST f) : ts_obj_ (object), func_ (f) { - // ACE_TRACE ("ACE_TSS_Adapter::ACE_TSS_Adapter"); } void ACE_TSS_Adapter::cleanup (void) { - // ACE_TRACE ("ACE_TSS_Adapter::cleanup"); (*this->func_)(this->ts_obj_); // call cleanup routine for ts_obj_ } ACE_END_VERSIONED_NAMESPACE_DECL -extern "C" void +extern "C" ACE_Export void ACE_TSS_C_cleanup (void *object) { - // ACE_TRACE ("ACE_TSS_C_cleanup"); if (object != 0) { ACE_TSS_Adapter * const tss_adapter = (ACE_TSS_Adapter *) object; diff --git a/dep/acelite/ace/TSS_Adapter.h b/dep/acelite/ace/TSS_Adapter.h index b8ff85e3210..b806422365f 100644 --- a/dep/acelite/ace/TSS_Adapter.h +++ b/dep/acelite/ace/TSS_Adapter.h @@ -4,7 +4,7 @@ /** * @file TSS_Adapter.h * - * $Id: TSS_Adapter.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: TSS_Adapter.h 93792 2011-04-07 11:48:50Z mcorino $ * * Originally in Synch.h * @@ -30,8 +30,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * @brief This class encapsulates a TSS object and its associated * C++ destructor function. It is used by the ACE_TSS... * methods (in Synch_T.cpp) in order to allow an extern - * "C" cleanup routine to be used. Needed by the "frigging" - * MVS C++ compiler. + * "C" cleanup routine to be used. * * Objects of this class are stored in thread specific * storage. ts_obj_ points to the "real" object and diff --git a/dep/acelite/ace/TSS_T.cpp b/dep/acelite/ace/TSS_T.cpp index 9cc112f3ec7..8c6f30e1116 100644 --- a/dep/acelite/ace/TSS_T.cpp +++ b/dep/acelite/ace/TSS_T.cpp @@ -1,4 +1,4 @@ -// $Id: TSS_T.cpp 91693 2010-09-09 12:57:54Z johnnyw $ +// $Id: TSS_T.cpp 93792 2011-04-07 11:48:50Z mcorino $ #ifndef ACE_TSS_T_CPP #define ACE_TSS_T_CPP @@ -28,7 +28,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_TSS) #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) # if defined (ACE_HAS_THR_C_DEST) -extern "C" void ACE_TSS_C_cleanup (void *); +extern "C" ACE_Export void ACE_TSS_C_cleanup (void *); # endif /* ACE_HAS_THR_C_DEST */ #endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */ diff --git a/dep/acelite/ace/TTY_IO.h b/dep/acelite/ace/TTY_IO.h index 1029966e56c..39de5f8d236 100644 --- a/dep/acelite/ace/TTY_IO.h +++ b/dep/acelite/ace/TTY_IO.h @@ -4,7 +4,7 @@ /** * @file TTY_IO.h * - * $Id: TTY_IO.h 82271 2008-07-09 09:23:03Z olli $ + * $Id: TTY_IO.h 95212 2011-12-05 12:29:55Z johnnyw $ * * @author Douglas C. Schmidt */ @@ -46,7 +46,7 @@ public: { Serial_Params (void); - /** Specifies the baudrate at which the communnication port operates. */ + /** Specifies the baudrate at which the communication port operates. */ int baudrate; /** Specifies the minimum number of bytes in input buffer before XON char is sent. Negative value indicates that default value should diff --git a/dep/acelite/ace/Task.cpp b/dep/acelite/ace/Task.cpp index c570fc0dc89..1d159ad84b7 100644 --- a/dep/acelite/ace/Task.cpp +++ b/dep/acelite/ace/Task.cpp @@ -1,4 +1,4 @@ -// $Id: Task.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Task.cpp 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/Task.h" #include "ace/Module.h" @@ -15,21 +15,15 @@ ACE_Task_Base::ACE_Task_Base (ACE_Thread_Manager *thr_man) thr_mgr_ (thr_man), flags_ (0), grp_id_ (-1) -#if !(defined (ACE_MVS) || defined(__TANDEM)) ,last_thread_id_ (0) -#endif /* !defined (ACE_MVS) */ { -#if (defined (ACE_MVS) || defined(__TANDEM)) - ACE_OS::memset( &this->last_thread_id_, '\0', sizeof( this->last_thread_id_ )); -#endif /* defined (ACE_MVS) */ } ACE_Task_Base::~ACE_Task_Base (void) { } -// Default ACE_Task service routine - +/// Default ACE_Task service routine int ACE_Task_Base::svc (void) { @@ -37,8 +31,7 @@ ACE_Task_Base::svc (void) return 0; } -// Default ACE_Task open routine - +/// Default ACE_Task open routine int ACE_Task_Base::open (void *) { @@ -46,8 +39,7 @@ ACE_Task_Base::open (void *) return 0; } -// Default ACE_Task close routine - +/// Default ACE_Task close routine int ACE_Task_Base::close (u_long) { @@ -55,17 +47,15 @@ ACE_Task_Base::close (u_long) return 0; } -// Forward the call to close() so that existing applications don't -// break. - +/// Forward the call to close() so that existing applications don't +/// break. int ACE_Task_Base::module_closed (void) { return this->close (1); } -// Default ACE_Task put routine. - +/// Default ACE_Task put routine. int ACE_Task_Base::put (ACE_Message_Block *, ACE_Time_Value *) { @@ -73,8 +63,7 @@ ACE_Task_Base::put (ACE_Message_Block *, ACE_Time_Value *) return 0; } -// Wait for all threads running in a task to exit. - +/// Wait for all threads running in a task to exit. int ACE_Task_Base::wait (void) { @@ -88,7 +77,7 @@ ACE_Task_Base::wait (void) return 0; } -// Suspend a task. +/// Suspend a task. int ACE_Task_Base::suspend (void) { @@ -100,7 +89,7 @@ ACE_Task_Base::suspend (void) return 0; } -// Resume a suspended task. +/// Resume a suspended task. int ACE_Task_Base::resume (void) { @@ -195,11 +184,11 @@ ACE_Task_Base::activate (long flags, if (this->grp_id_ == -1) this->grp_id_ = grp_spawned; -#if defined (ACE_MVS) || defined(__TANDEM) +#if defined(ACE_TANDEM_T1248_PTHREADS) ACE_OS::memcpy( &this->last_thread_id_, '\0', sizeof(this->last_thread_id_)); #else this->last_thread_id_ = 0; // Reset to prevent inadvertant match on ID -#endif /* defined (ACE_MVS) */ +#endif /* defined (ACE_TANDEM_T1248_PTHREADS) */ return 0; diff --git a/dep/acelite/ace/Task_Ex_T.cpp b/dep/acelite/ace/Task_Ex_T.cpp index de97e5ba6b4..bcc0ff0bed3 100644 --- a/dep/acelite/ace/Task_Ex_T.cpp +++ b/dep/acelite/ace/Task_Ex_T.cpp @@ -1,4 +1,4 @@ -// $Id: Task_Ex_T.cpp 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Task_Ex_T.cpp 96061 2012-08-16 09:36:07Z mcorino $ #ifndef ACE_TASK_EX_T_CPP #define ACE_TASK_EX_T_CPP @@ -19,11 +19,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template void -ACE_Task_Ex::dump (void) const +template void +ACE_Task_Ex::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Task_Ex::dump"); + ACE_TRACE ("ACE_Task_Ex::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_)); this->msg_queue_->dump (); @@ -44,31 +44,31 @@ ACE_Task_Ex::dump (void) const // If the user doesn't supply a ACE_Message_Queue_Ex pointer then we'll // allocate one dynamically. Otherwise, we'll use the one they give. -template -ACE_Task_Ex::ACE_Task_Ex (ACE_Thread_Manager *thr_man, - ACE_Message_Queue_Ex *mq) +template +ACE_Task_Ex::ACE_Task_Ex (ACE_Thread_Manager *thr_man, + ACE_Message_Queue_Ex *mq) : ACE_Task_Base (thr_man), msg_queue_ (0), delete_msg_queue_ (false), mod_ (0), next_ (0) { - ACE_TRACE ("ACE_Task_Ex::ACE_Task_Ex"); + ACE_TRACE ("ACE_Task_Ex::ACE_Task_Ex"); if (mq == 0) { ACE_NEW (mq, - (ACE_Message_Queue_Ex)); + (ACE_Message_Queue_Ex)); this->delete_msg_queue_ = true; } this->msg_queue_ = mq; } -template -ACE_Task_Ex::~ACE_Task_Ex (void) +template +ACE_Task_Ex::~ACE_Task_Ex (void) { - ACE_TRACE ("ACE_Task_Ex::~ACE_Task_Ex"); + ACE_TRACE ("ACE_Task_Ex::~ACE_Task_Ex"); if (this->delete_msg_queue_) delete this->msg_queue_; @@ -77,10 +77,10 @@ ACE_Task_Ex::~ACE_Task_Ex (void) this->delete_msg_queue_ = false; } -template ACE_Task * -ACE_Task_Ex::sibling (void) +template ACE_Task * +ACE_Task_Ex::sibling (void) { - ACE_TRACE ("ACE_Task_Ex::sibling"); + ACE_TRACE ("ACE_Task_Ex::sibling"); /// @todo FIXME Need to impl ACE_Moudle to support ACE_Task as well. /// Now always return 0 for sibling return 0; @@ -92,20 +92,20 @@ ACE_Task_Ex::sibling (void) */ } -template const ACE_TCHAR * -ACE_Task_Ex::name (void) const +template const ACE_TCHAR * +ACE_Task_Ex::name (void) const { - ACE_TRACE ("ACE_Task_Ex::name"); + ACE_TRACE ("ACE_Task_Ex::name"); if (this->mod_ == 0) return 0; else return this->mod_->name (); } -template ACE_Module * -ACE_Task_Ex::module (void) const +template ACE_Module * +ACE_Task_Ex::module (void) const { - ACE_TRACE ("ACE_Task_Ex::module"); + ACE_TRACE ("ACE_Task_Ex::module"); return this->mod_; } diff --git a/dep/acelite/ace/Task_Ex_T.h b/dep/acelite/ace/Task_Ex_T.h index 70a97247b04..04eadb794e3 100644 --- a/dep/acelite/ace/Task_Ex_T.h +++ b/dep/acelite/ace/Task_Ex_T.h @@ -4,7 +4,7 @@ /** * @file Task_Ex_T.h * - * $Id: Task_Ex_T.h 91688 2010-09-09 11:21:50Z johnnyw $ + * $Id: Task_Ex_T.h 96061 2012-08-16 09:36:07Z mcorino $ * * @author Kobi Cohen-Arazi */ @@ -26,7 +26,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Forward decls... -template class ACE_Module; +template class ACE_Module; /** * @class ACE_Task_Ex @@ -57,14 +57,14 @@ template class ACE_Module; * When User (and legacy code) write ACE_Task, specialized ACE_Task * code is in action. */ -template +template class ACE_Task_Ex : public ACE_Task_Base, private ACE_Copy_Disabled { public: - friend class ACE_Module; + friend class ACE_Module; friend class ACE_Module_Type; - typedef ACE_Message_Queue_Ex MESSAGE_QUEUE_EX; + typedef ACE_Message_Queue_Ex MESSAGE_QUEUE_EX; // = Initialization/termination methods. /** @@ -133,16 +133,16 @@ public: // Should be protected: // = Pointers to next ACE_Task_Base (if ACE is part of an ACE_Stream). /// Get next Task pointer. - ACE_Task *next (void); + ACE_Task *next (void); /// Set next Task pointer. - void next (ACE_Task *); + void next (ACE_Task *); /// Alwasy return 0. @todo FIXME - ACE_Task *sibling (void); + ACE_Task *sibling (void); /// Return the Task's Module if there is one, else returns 0. - ACE_Module *module (void) const; + ACE_Module *module (void) const; /** * Flush the task's queue, i.e., free all of the enqueued @@ -164,10 +164,10 @@ public: // Should be protected: bool delete_msg_queue_; /// Back-pointer to the enclosing module. - ACE_Module *mod_; + ACE_Module *mod_; /// Pointer to adjacent ACE_Task. - ACE_Task *next_; + ACE_Task *next_; /// Dump the state of an object. void dump (void) const; diff --git a/dep/acelite/ace/Task_Ex_T.inl b/dep/acelite/ace/Task_Ex_T.inl index 9b5c864c6ad..543e107efac 100644 --- a/dep/acelite/ace/Task_Ex_T.inl +++ b/dep/acelite/ace/Task_Ex_T.inl @@ -1,55 +1,55 @@ // -*- C++ -*- // -// $Id: Task_Ex_T.inl 91688 2010-09-09 11:21:50Z johnnyw $ +// $Id: Task_Ex_T.inl 96061 2012-08-16 09:36:07Z mcorino $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template ACE_INLINE void -ACE_Task_Ex::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, +template ACE_INLINE void +ACE_Task_Ex::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, size_t wm_size) { - ACE_TRACE ("ACE_Task_Ex::water_marks"); + ACE_TRACE ("ACE_Task_Ex::water_marks"); if (cmd == ACE_IO_Cntl_Msg::SET_LWM) this->msg_queue_->low_water_mark (wm_size); else /* cmd == ACE_IO_Cntl_Msg::SET_HWM */ this->msg_queue_->high_water_mark (wm_size); } -template ACE_INLINE int -ACE_Task_Ex::getq (ACE_MESSAGE_TYPE *&mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task_Ex::getq (ACE_MESSAGE_TYPE *&mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task_Ex::getq"); + ACE_TRACE ("ACE_Task_Ex::getq"); return this->msg_queue_->dequeue_head (mb, tv); } -template ACE_INLINE int -ACE_Task_Ex::putq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task_Ex::putq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task_Ex::putq"); + ACE_TRACE ("ACE_Task_Ex::putq"); return this->msg_queue_->enqueue_tail (mb, tv); } -template ACE_INLINE int -ACE_Task_Ex::ungetq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task_Ex::ungetq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task_Ex::ungetq"); + ACE_TRACE ("ACE_Task_Ex::ungetq"); return this->msg_queue_->enqueue_head (mb, tv); } -template ACE_INLINE int -ACE_Task_Ex::flush (u_long flag) +template ACE_INLINE int +ACE_Task_Ex::flush (u_long flag) { - ACE_TRACE ("ACE_Task_Ex::flush"); + ACE_TRACE ("ACE_Task_Ex::flush"); if (ACE_BIT_ENABLED (flag, ACE_Task_Flags::ACE_FLUSHALL)) return this->msg_queue_ != 0 && this->msg_queue_->close (); else return -1; // Note, need to be more careful about what we free... } -template ACE_INLINE void -ACE_Task_Ex::msg_queue (ACE_Message_Queue_Ex *mq) +template ACE_INLINE void +ACE_Task_Ex::msg_queue (ACE_Message_Queue_Ex *mq) { - ACE_TRACE ("ACE_Task_Ex::msg_queue"); + ACE_TRACE ("ACE_Task_Ex::msg_queue"); if (this->delete_msg_queue_) { delete this->msg_queue_; @@ -58,44 +58,44 @@ ACE_Task_Ex::msg_queue (ACE_Message_Queue_Exmsg_queue_ = mq; } -template ACE_Message_Queue_Ex * -ACE_Task_Ex::msg_queue (void) +template ACE_Message_Queue_Ex * +ACE_Task_Ex::msg_queue (void) { - ACE_TRACE ("ACE_Task_Ex::msg_queue"); + ACE_TRACE ("ACE_Task_Ex::msg_queue"); return this->msg_queue_; } -template ACE_INLINE int -ACE_Task_Ex::reply (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task_Ex::reply (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task_Ex::reply"); + ACE_TRACE ("ACE_Task_Ex::reply"); ACE_UNUSED_ARG (mb); ACE_UNUSED_ARG (tv); return -1 ; // this->sibling ()->put_next (mb, tv); } -template ACE_INLINE ACE_Task * -ACE_Task_Ex::next (void) +template ACE_INLINE ACE_Task * +ACE_Task_Ex::next (void) { - ACE_TRACE ("ACE_Task_Ex::next"); + ACE_TRACE ("ACE_Task_Ex::next"); return this->next_; } -template ACE_INLINE void -ACE_Task_Ex::next (ACE_Task *q) +template ACE_INLINE void +ACE_Task_Ex::next (ACE_Task *q) { - ACE_TRACE ("ACE_Task_Ex::next"); + ACE_TRACE ("ACE_Task_Ex::next"); this->next_ = q; } // Transfer msg to the next ACE_Task_Ex. -template ACE_INLINE int -ACE_Task_Ex::put_next ( +template ACE_INLINE int +ACE_Task_Ex::put_next ( ACE_MESSAGE_TYPE * /* msg */, ACE_Time_Value * /* tv */) { - ACE_TRACE ("ACE_Task_Ex::put_next"); + ACE_TRACE ("ACE_Task_Ex::put_next"); return -1; // this->next_ == 0 ? -1 : this->next_->put (msg, tv); } diff --git a/dep/acelite/ace/Task_T.cpp b/dep/acelite/ace/Task_T.cpp index 08b36f82f08..e2481ae2bc6 100644 --- a/dep/acelite/ace/Task_T.cpp +++ b/dep/acelite/ace/Task_T.cpp @@ -1,4 +1,4 @@ -// $Id: Task_T.cpp 80826 2008-03-04 14:51:23Z wotte $ +// $Id: Task_T.cpp 96061 2012-08-16 09:36:07Z mcorino $ #ifndef ACE_TASK_T_CPP #define ACE_TASK_T_CPP @@ -18,11 +18,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template void -ACE_Task::dump (void) const +template void +ACE_Task::dump (void) const { #if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Task::dump"); + ACE_TRACE ("ACE_Task::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_)); this->msg_queue_->dump (); @@ -43,31 +43,32 @@ ACE_Task::dump (void) const // If the user doesn't supply a ACE_Message_Queue pointer then we'll // allocate one dynamically. Otherwise, we'll use the one they give. -template -ACE_Task::ACE_Task (ACE_Thread_Manager *thr_man, - ACE_Message_Queue *mq) +template +ACE_Task::ACE_Task (ACE_Thread_Manager *thr_man, + ACE_Message_Queue *mq) : ACE_Task_Base (thr_man), msg_queue_ (0), delete_msg_queue_ (false), mod_ (0), next_ (0) { - ACE_TRACE ("ACE_Task::ACE_Task"); + ACE_TRACE ("ACE_Task::ACE_Task"); if (mq == 0) { + typedef ACE_Message_Queue QUEUE_TYPE; ACE_NEW (mq, - ACE_Message_Queue); + QUEUE_TYPE); this->delete_msg_queue_ = true; } this->msg_queue_ = mq; } -template -ACE_Task::~ACE_Task (void) +template +ACE_Task::~ACE_Task (void) { - ACE_TRACE ("ACE_Task::~ACE_Task"); + ACE_TRACE ("ACE_Task::~ACE_Task"); if (this->delete_msg_queue_) delete this->msg_queue_; @@ -76,30 +77,30 @@ ACE_Task::~ACE_Task (void) this->delete_msg_queue_ = false; } -template ACE_Task * -ACE_Task::sibling (void) +template ACE_Task * +ACE_Task::sibling (void) { - ACE_TRACE ("ACE_Task::sibling"); + ACE_TRACE ("ACE_Task::sibling"); if (this->mod_ == 0) return 0; else return this->mod_->sibling (this); } -template const ACE_TCHAR * -ACE_Task::name (void) const +template const ACE_TCHAR * +ACE_Task::name (void) const { - ACE_TRACE ("ACE_Task::name"); + ACE_TRACE ("ACE_Task::name"); if (this->mod_ == 0) return 0; else return this->mod_->name (); } -template ACE_Module * -ACE_Task::module (void) const +template ACE_Module * +ACE_Task::module (void) const { - ACE_TRACE ("ACE_Task::module"); + ACE_TRACE ("ACE_Task::module"); return this->mod_; } diff --git a/dep/acelite/ace/Task_T.h b/dep/acelite/ace/Task_T.h index 1946f45cfe5..9b0cd9e2c6f 100644 --- a/dep/acelite/ace/Task_T.h +++ b/dep/acelite/ace/Task_T.h @@ -4,7 +4,7 @@ /** * @file Task_T.h * - * $Id: Task_T.h 91688 2010-09-09 11:21:50Z johnnyw $ + * $Id: Task_T.h 96061 2012-08-16 09:36:07Z mcorino $ * * @author Douglas C. Schmidt */ @@ -27,7 +27,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Forward decls... -template class ACE_Module; +template class ACE_Module; /** * @class ACE_Task @@ -38,11 +38,11 @@ template class ACE_Module; * This class serves as the basis for passive and active objects * in ACE. */ -template +template class ACE_Task : public ACE_Task_Base { public: - friend class ACE_Module; + friend class ACE_Module; friend class ACE_Module_Type; // = Initialization/termination methods. @@ -53,16 +53,24 @@ public: * one passed as a parameter. */ ACE_Task (ACE_Thread_Manager *thr_mgr = 0, - ACE_Message_Queue *mq = 0); + ACE_Message_Queue *mq = 0); /// Destructor. virtual ~ACE_Task (void); /// Gets the message queue associated with this task. - ACE_Message_Queue *msg_queue (void); + ACE_Message_Queue *msg_queue (void); /// Sets the message queue associated with this task. - void msg_queue (ACE_Message_Queue *); + void msg_queue (ACE_Message_Queue *); + + /// Get the current time of day according to the queue's TIME_POLICY. + /// Allows users to initialize timeout values using correct time policy. + ACE_Time_Value_T gettimeofday (void) const; + + /// Allows applications to control how the timer queue gets the time + /// of day. + void set_time_policy (TIME_POLICY const & time_policy); public: // Should be protected: // = Message queue manipulation methods. @@ -118,17 +126,17 @@ public: // Should be protected: // = Pointers to next ACE_Task_Base (if ACE is part of an ACE_Stream). /// Get next Task pointer. - ACE_Task *next (void); + ACE_Task *next (void); /// Set next Task pointer. - void next (ACE_Task *); + void next (ACE_Task *); /// Return the Task's sibling if there's one associated with the /// Task's Module, else returns 0. - ACE_Task *sibling (void); + ACE_Task *sibling (void); /// Return the Task's Module if there is one, else returns 0. - ACE_Module *module (void) const; + ACE_Module *module (void) const; /** * Flush the task's queue, i.e., free all of the enqueued @@ -144,16 +152,16 @@ public: // Should be protected: void water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds, size_t); /// Queue of messages on the ACE_Task.. - ACE_Message_Queue *msg_queue_; + ACE_Message_Queue *msg_queue_; /// true if should delete Message_Queue, false otherwise. bool delete_msg_queue_; /// Back-pointer to the enclosing module. - ACE_Module *mod_; + ACE_Module *mod_; /// Pointer to adjacent ACE_Task. - ACE_Task *next_; + ACE_Task *next_; /// Dump the state of an object. void dump (void) const; @@ -164,8 +172,8 @@ public: // Should be protected: private: // = Disallow these operations. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Task &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Task (const ACE_Task &)) + ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Task &)) + ACE_UNIMPLEMENTED_FUNC (ACE_Task (const ACE_Task &)) }; #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT diff --git a/dep/acelite/ace/Task_T.inl b/dep/acelite/ace/Task_T.inl index 5eda4c2bf90..34ad25b0c6b 100644 --- a/dep/acelite/ace/Task_T.inl +++ b/dep/acelite/ace/Task_T.inl @@ -1,55 +1,55 @@ // -*- C++ -*- // -// $Id: Task_T.inl 91688 2010-09-09 11:21:50Z johnnyw $ +// $Id: Task_T.inl 96066 2012-08-16 12:45:46Z mcorino $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template ACE_INLINE void -ACE_Task::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, +template ACE_INLINE void +ACE_Task::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd, size_t wm_size) { - ACE_TRACE ("ACE_Task::water_marks"); + ACE_TRACE ("ACE_Task::water_marks"); if (cmd == ACE_IO_Cntl_Msg::SET_LWM) this->msg_queue_->low_water_mark (wm_size); else /* cmd == ACE_IO_Cntl_Msg::SET_HWM */ this->msg_queue_->high_water_mark (wm_size); } -template ACE_INLINE int -ACE_Task::getq (ACE_Message_Block *&mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task::getq (ACE_Message_Block *&mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task::getq"); + ACE_TRACE ("ACE_Task::getq"); return this->msg_queue_->dequeue_head (mb, tv); } -template ACE_INLINE int -ACE_Task::putq (ACE_Message_Block *mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task::putq (ACE_Message_Block *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task::putq"); + ACE_TRACE ("ACE_Task::putq"); return this->msg_queue_->enqueue_tail (mb, tv); } -template ACE_INLINE int -ACE_Task::ungetq (ACE_Message_Block *mb, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task::ungetq (ACE_Message_Block *mb, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task::ungetq"); + ACE_TRACE ("ACE_Task::ungetq"); return this->msg_queue_->enqueue_head (mb, tv); } -template ACE_INLINE int -ACE_Task::flush (u_long flag) +template ACE_INLINE int +ACE_Task::flush (u_long flag) { - ACE_TRACE ("ACE_Task::flush"); + ACE_TRACE ("ACE_Task::flush"); if (ACE_BIT_ENABLED (flag, ACE_Task_Flags::ACE_FLUSHALL)) return this->msg_queue_ != 0 && this->msg_queue_->close (); else return -1; // Note, need to be more careful about what we free... } -template ACE_INLINE void -ACE_Task::msg_queue (ACE_Message_Queue *mq) +template ACE_INLINE void +ACE_Task::msg_queue (ACE_Message_Queue *mq) { - ACE_TRACE ("ACE_Task::msg_queue"); + ACE_TRACE ("ACE_Task::msg_queue"); if (this->delete_msg_queue_) { delete this->msg_queue_; @@ -58,40 +58,58 @@ ACE_Task::msg_queue (ACE_Message_Queue *mq) this->msg_queue_ = mq; } -template ACE_Message_Queue * -ACE_Task::msg_queue (void) +template ACE_Message_Queue * +ACE_Task::msg_queue (void) { - ACE_TRACE ("ACE_Task::msg_queue"); + ACE_TRACE ("ACE_Task::msg_queue"); return this->msg_queue_; } -template ACE_INLINE int -ACE_Task::reply (ACE_Message_Block *mb, ACE_Time_Value *tv) +template +ACE_Time_Value_T +ACE_Task::gettimeofday (void) const { - ACE_TRACE ("ACE_Task::reply"); + if (this->msg_queue_ != 0) + return this->msg_queue_->gettimeofday (); + + return ACE_Time_Value_T (ACE_Time_Value::zero); +} + +template +void +ACE_Task::set_time_policy (TIME_POLICY const & rhs) +{ + if (this->msg_queue_ != 0) + this->msg_queue_->set_time_policy (rhs); +} + +template ACE_INLINE int +ACE_Task::reply (ACE_Message_Block *mb, ACE_Time_Value *tv) +{ + ACE_TRACE ("ACE_Task::reply"); return this->sibling ()->put_next (mb, tv); } -template ACE_INLINE ACE_Task * -ACE_Task::next (void) +template ACE_INLINE ACE_Task * +ACE_Task::next (void) { - ACE_TRACE ("ACE_Task::next"); + ACE_TRACE ("ACE_Task::next"); return this->next_; } -template ACE_INLINE void -ACE_Task::next (ACE_Task *q) +template ACE_INLINE void +ACE_Task::next (ACE_Task *q) { - ACE_TRACE ("ACE_Task::next"); + ACE_TRACE ("ACE_Task::next"); this->next_ = q; } // Transfer msg to the next ACE_Task. -template ACE_INLINE int -ACE_Task::put_next (ACE_Message_Block *msg, ACE_Time_Value *tv) +template ACE_INLINE int +ACE_Task::put_next (ACE_Message_Block *msg, ACE_Time_Value *tv) { - ACE_TRACE ("ACE_Task::put_next"); + ACE_TRACE ("ACE_Task::put_next"); return this->next_ == 0 ? -1 : this->next_->put (msg, tv); } diff --git a/dep/acelite/ace/Thread.inl b/dep/acelite/ace/Thread.inl index b1fd120a261..5e08bd34d7e 100644 --- a/dep/acelite/ace/Thread.inl +++ b/dep/acelite/ace/Thread.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Thread.inl 91693 2010-09-09 12:57:54Z johnnyw $ +// $Id: Thread.inl 95376 2011-12-20 15:39:02Z shuston $ #include "ace/OS_NS_string.h" @@ -171,7 +171,7 @@ ACE_Thread::disablecancel (struct cancel_state *old_state) { ACE_OS::memset (old_state, 0, - sizeof (old_state)); + sizeof (*old_state)); old_state->cancelstate = old_cstate; } diff --git a/dep/acelite/ace/Thread_Adapter.cpp b/dep/acelite/ace/Thread_Adapter.cpp index 754691857a0..0afb322e731 100644 --- a/dep/acelite/ace/Thread_Adapter.cpp +++ b/dep/acelite/ace/Thread_Adapter.cpp @@ -1,4 +1,4 @@ -// $Id: Thread_Adapter.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Thread_Adapter.cpp 92682 2010-11-23 23:41:19Z shuston $ #include "ace/Thread_Adapter.h" #include "ace/Thread_Manager.h" @@ -22,6 +22,7 @@ ACE_Thread_Adapter::ACE_Thread_Adapter (ACE_THR_FUNC user_func, , ACE_SEH_EXCEPT_HANDLER selector, ACE_SEH_EXCEPT_HANDLER handler #endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ + , long cancel_flags ) : ACE_Base_Thread_Adapter ( user_func @@ -32,6 +33,7 @@ ACE_Thread_Adapter::ACE_Thread_Adapter (ACE_THR_FUNC user_func, , selector , handler #endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ + , cancel_flags ) , thr_mgr_ (tm) { @@ -105,6 +107,9 @@ ACE_Thread_Adapter::invoke_i (void) ACE_OS_Thread_Descriptor *thr_desc = this->thr_desc_; #endif /* ACE_WIN32 && ACE_HAS_MFC && (ACE_HAS_MFC != 0) */ + // Pick up the cancel-related flags before deleting this. + long cancel_flags = this->flags_; + // Delete ourselves since we don't need anymore. Make sure // not to access anywhere below this point. delete this; @@ -125,6 +130,17 @@ ACE_Thread_Adapter::invoke_i (void) ACE_OS::thr_setprio (prio); #endif /* ACE_NEEDS_LWP_PRIO_SET */ + if (cancel_flags != 0) + { + // If both flags are set, ignore this. + int old = 0; + int val = cancel_flags & (THR_CANCEL_ENABLE | THR_CANCEL_DISABLE); + if (val == THR_CANCEL_ENABLE || val == THR_CANCEL_DISABLE) + ACE_OS::thr_setcancelstate (val, &old); + val = cancel_flags & (THR_CANCEL_DEFERRED | THR_CANCEL_ASYNCHRONOUS); + if (val == THR_CANCEL_DEFERRED || val == THR_CANCEL_ASYNCHRONOUS) + ACE_OS::thr_setcanceltype (val, &old); + } ACE_THR_FUNC_RETURN status = 0; diff --git a/dep/acelite/ace/Thread_Adapter.h b/dep/acelite/ace/Thread_Adapter.h index d7ab4056de4..6880e2cb2cd 100644 --- a/dep/acelite/ace/Thread_Adapter.h +++ b/dep/acelite/ace/Thread_Adapter.h @@ -4,7 +4,7 @@ /** * @file Thread_Adapter.h * - * $Id: Thread_Adapter.h 92060 2010-09-27 18:08:48Z johnnyw $ + * $Id: Thread_Adapter.h 92682 2010-11-23 23:41:19Z shuston $ * * @author Carlos O'Ryan */ @@ -56,6 +56,7 @@ public: , ACE_SEH_EXCEPT_HANDLER selector = 0, ACE_SEH_EXCEPT_HANDLER handler = 0 # endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ + , long cancel_flags = 0 ); /** diff --git a/dep/acelite/ace/Thread_Control.cpp b/dep/acelite/ace/Thread_Control.cpp index 2f38849e339..4046c07eef7 100644 --- a/dep/acelite/ace/Thread_Control.cpp +++ b/dep/acelite/ace/Thread_Control.cpp @@ -1,4 +1,4 @@ -// $Id: Thread_Control.cpp 91688 2010-09-09 11:21:50Z johnnyw $ +// $Id: Thread_Control.cpp 94054 2011-05-11 18:28:20Z johnnyw $ #include "ace/Thread_Control.h" #include "ace/Thread_Manager.h" @@ -18,7 +18,7 @@ ACE_Thread_Control::dump (void) const } int -ACE_Thread_Control::insert (ACE_Thread_Manager *tm, int insert) +ACE_Thread_Control::insert (ACE_Thread_Manager *tm, bool insert) { ACE_OS_TRACE ("ACE_Thread_Control::insert"); @@ -33,7 +33,6 @@ ACE_Thread_Control::insert (ACE_Thread_Manager *tm, int insert) } // Initialize the thread controller. - ACE_Thread_Control::ACE_Thread_Control (ACE_Thread_Manager *t, int insert) : tm_ (t), @@ -50,7 +49,6 @@ ACE_Thread_Control::ACE_Thread_Control (ACE_Thread_Manager *t, } // Automatically kill thread on exit. - ACE_Thread_Control::~ACE_Thread_Control (void) { ACE_OS_TRACE ("ACE_Thread_Control::~ACE_Thread_Control"); @@ -63,7 +61,6 @@ ACE_Thread_Control::~ACE_Thread_Control (void) } // Exit from thread (but clean up first). - ACE_THR_FUNC_RETURN ACE_Thread_Control::exit (ACE_THR_FUNC_RETURN exit_status, int do_thr_exit) { diff --git a/dep/acelite/ace/Thread_Control.h b/dep/acelite/ace/Thread_Control.h index 3eb5185c84c..392eb7a62e0 100644 --- a/dep/acelite/ace/Thread_Control.h +++ b/dep/acelite/ace/Thread_Control.h @@ -4,13 +4,12 @@ /** * @file Thread_Control.h * - * $Id: Thread_Control.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Thread_Control.h 94054 2011-05-11 18:28:20Z johnnyw $ * * @author Carlos O'Ryan */ //============================================================================= - #ifndef ACE_THREAD_CONTROL_H #define ACE_THREAD_CONTROL_H #include /**/ "ace/pre.h" @@ -48,7 +47,7 @@ public: ACE_Thread_Control (ACE_Thread_Manager *tm = 0, int insert = 0); - /// Remove the thread from its associated and exit + /// Remove the thread from its associated Thread_Manager and exit /// the thread if is enabled. ~ACE_Thread_Control (void); @@ -57,15 +56,15 @@ public: ACE_THR_FUNC_RETURN exit (ACE_THR_FUNC_RETURN status, int do_thr_exit); - /// Store the and use it to register ourselves for + /// Store the Thread_Manager and use it to register ourselves for /// correct shutdown. - int insert (ACE_Thread_Manager *tm, int insert = 0); + int insert (ACE_Thread_Manager *tm, bool insert = false); - /// Returns the current . + /// Returns the current Thread_Manager. ACE_Thread_Manager *thr_mgr (void); - /// Atomically set a new and return the old - /// . + /// Atomically set a new Thread_Manager and return the old + /// Thread_Manager. ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *); /// Set the exit status (and return existing status). diff --git a/dep/acelite/ace/Thread_Exit.cpp b/dep/acelite/ace/Thread_Exit.cpp index b85d48d1701..8f6484093ad 100644 --- a/dep/acelite/ace/Thread_Exit.cpp +++ b/dep/acelite/ace/Thread_Exit.cpp @@ -1,12 +1,10 @@ -// $Id: Thread_Exit.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Thread_Exit.cpp 92580 2010-11-15 09:48:02Z johnnyw $ #include "ace/Thread_Exit.h" #include "ace/Managed_Object.h" #include "ace/Thread_Manager.h" #include "ace/Guard_T.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL bool ACE_Thread_Exit::is_constructed_ = false; diff --git a/dep/acelite/ace/Thread_Hook.cpp b/dep/acelite/ace/Thread_Hook.cpp index 1121e4b44ae..03b2fd74cdb 100644 --- a/dep/acelite/ace/Thread_Hook.cpp +++ b/dep/acelite/ace/Thread_Hook.cpp @@ -1,10 +1,8 @@ -// $Id: Thread_Hook.cpp 91286 2010-08-05 09:04:31Z johnnyw $ +// $Id: Thread_Hook.cpp 94054 2011-05-11 18:28:20Z johnnyw $ #include "ace/Thread_Hook.h" #include "ace/Object_Manager_Base.h" - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Thread_Hook::~ACE_Thread_Hook () @@ -12,8 +10,7 @@ ACE_Thread_Hook::~ACE_Thread_Hook () } ACE_THR_FUNC_RETURN -ACE_Thread_Hook::start (ACE_THR_FUNC func, - void *arg) +ACE_Thread_Hook::start (ACE_THR_FUNC func, void *arg) { return (func) (arg); } diff --git a/dep/acelite/ace/Thread_Hook.h b/dep/acelite/ace/Thread_Hook.h index 7bc3bcce492..df0d0293cc4 100644 --- a/dep/acelite/ace/Thread_Hook.h +++ b/dep/acelite/ace/Thread_Hook.h @@ -4,13 +4,12 @@ /** * @file Thread_Hook.h * - * $Id: Thread_Hook.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Thread_Hook.h 94054 2011-05-11 18:28:20Z johnnyw $ * * @author Carlos O'Ryan */ //============================================================================= - #ifndef ACE_THREAD_HOOK_H #define ACE_THREAD_HOOK_H #include /**/ "ace/pre.h" @@ -34,9 +33,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL */ class ACE_Export ACE_Thread_Hook { - public: - /// Destructor. virtual ~ACE_Thread_Hook (void); @@ -51,7 +48,7 @@ public: virtual ACE_THR_FUNC_RETURN start (ACE_THR_FUNC func, void *arg); - /// sets the system wide thread hook, returns the previous thread + /// Sets the system wide thread hook, returns the previous thread /// hook or 0 if none is set. static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *hook); diff --git a/dep/acelite/ace/Thread_Manager.cpp b/dep/acelite/ace/Thread_Manager.cpp index 587636b6776..f26c7adbde9 100644 --- a/dep/acelite/ace/Thread_Manager.cpp +++ b/dep/acelite/ace/Thread_Manager.cpp @@ -1,4 +1,4 @@ -// $Id: Thread_Manager.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $ +// $Id: Thread_Manager.cpp 96067 2012-08-16 13:45:10Z mcorino $ #include "ace/TSS_T.h" #include "ace/Thread_Manager.h" @@ -188,9 +188,16 @@ ACE_Thread_Descriptor::terminate () } #endif /* !ACE_HAS_VXTHREADS */ - // Remove thread descriptor from the table. + // Remove thread descriptor from the table. 'this' is invalid + // upon return. if (this->tm_ != 0) - tm_->remove_thr (this, close_handle); + { + // remove_thr makes use of 'this' invalid on return. + // Code below will free log_msg, so clear our pointer + // now - it's already been saved in log_msg. + this->log_msg_ = 0; + tm_->remove_thr (this, close_handle); + } } // Check if we need delete ACE_Log_Msg instance @@ -203,9 +210,6 @@ ACE_Thread_Descriptor::terminate () } else { - // Thread_Descriptor is the owner of the Log_Msg instance!! - // deleted. - this->log_msg_ = 0; delete log_msg; } } @@ -257,6 +261,7 @@ ACE_Thread_Descriptor::dump (void) const ACE_Thread_Descriptor::ACE_Thread_Descriptor (void) : log_msg_ (0), at_exit_list_ (0), + tm_ (0), terminated_ (false) { ACE_TRACE ("ACE_Thread_Descriptor::ACE_Thread_Descriptor"); @@ -369,6 +374,25 @@ ACE_Thread_Manager::ACE_Thread_Manager (size_t prealloc, ACE_TRACE ("ACE_Thread_Manager::ACE_Thread_Manager"); } +ACE_Thread_Manager::ACE_Thread_Manager (const ACE_Condition_Attributes &attributes, + size_t prealloc, + size_t lwm, + size_t inc, + size_t hwm) + : grp_id_ (1), + automatic_wait_ (1) +#if defined (ACE_HAS_THREADS) + , zero_cond_ (lock_, attributes) +#endif /* ACE_HAS_THREADS */ + , thread_desc_freelist_ (ACE_FREE_LIST_WITH_POOL, + prealloc, lwm, hwm, inc) +{ +#if !defined (ACE_HAS_THREADS) + ACE_UNUSED_ARG (attributes); +#endif /* ACE_HAS_THREADS */ + ACE_TRACE ("ACE_Thread_Manager::ACE_Thread_Manager"); +} + #if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) ACE_Thread_Manager * ACE_Thread_Manager::instance (void) @@ -525,10 +549,11 @@ ace_thread_manager_adapter (void *args) exit_hook.thr_mgr (thread_args->thr_mgr ()); // Invoke the user-supplied function with the args. - void *status = thread_args->invoke (); + ACE_THR_FUNC_RETURN status = thread_args->invoke (); delete static_cast (thread_args); - return status; + + return reinterpret_cast (status); } #endif @@ -571,7 +596,8 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func, this, new_thr_desc.get (), ACE_OS_Object_Manager::seh_except_selector(), - ACE_OS_Object_Manager::seh_except_handler()), + ACE_OS_Object_Manager::seh_except_handler(), + flags), -1); # else ACE_NEW_RETURN (thread_args, @@ -579,7 +605,8 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func, args, (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, this, - new_thr_desc.get ()), + new_thr_desc.get (), + flags), -1); # endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ auto_ptr auto_thread_args (static_cast (thread_args)); @@ -1600,13 +1627,16 @@ ACE_Thread_Manager::wait (const ACE_Time_Value *timeout, { ACE_TRACE ("ACE_Thread_Manager::wait"); - ACE_Time_Value local_timeout; + ACE_Auto_Ptr local_timeout; // Check to see if we're using absolute time or not. if (use_absolute_time == false && timeout != 0) { - local_timeout = *timeout; - local_timeout += ACE_OS::gettimeofday (); - timeout = &local_timeout; + // create time value duplicate (preserves time policy) + local_timeout.reset (timeout->duplicate ()); + // convert time value to absolute time + (*local_timeout) = local_timeout->to_absolute_time (); + // replace original time by abs time duplicate + timeout = local_timeout.get (); } #if !defined (ACE_HAS_VXTHREADS) diff --git a/dep/acelite/ace/Thread_Manager.h b/dep/acelite/ace/Thread_Manager.h index 650287277d7..59d81fd1981 100644 --- a/dep/acelite/ace/Thread_Manager.h +++ b/dep/acelite/ace/Thread_Manager.h @@ -4,7 +4,7 @@ /** * @file Thread_Manager.h * - * $Id: Thread_Manager.h 83956 2008-12-03 07:57:38Z johnnyw $ + * $Id: Thread_Manager.h 96061 2012-08-16 09:36:07Z mcorino $ * * @author Douglas C. Schmidt */ @@ -174,7 +174,7 @@ class ACE_Export ACE_Thread_Descriptor_Base : public ACE_OS_Thread_Descriptor friend class ACE_Double_Linked_List_Iterator; public: ACE_Thread_Descriptor_Base (void); - ~ACE_Thread_Descriptor_Base (void); + virtual ~ACE_Thread_Descriptor_Base (void); // = We need the following operators to make Borland happy. @@ -437,6 +437,11 @@ public: size_t lwm = ACE_DEFAULT_THREAD_MANAGER_LWM, size_t inc = ACE_DEFAULT_THREAD_MANAGER_INC, size_t hwm = ACE_DEFAULT_THREAD_MANAGER_HWM); + ACE_Thread_Manager (const ACE_Condition_Attributes &attributes, + size_t preaolloc = ACE_DEFAULT_THREAD_MANAGER_PREALLOC, + size_t lwm = ACE_DEFAULT_THREAD_MANAGER_LWM, + size_t inc = ACE_DEFAULT_THREAD_MANAGER_INC, + size_t hwm = ACE_DEFAULT_THREAD_MANAGER_HWM); ~ACE_Thread_Manager (void); #if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) diff --git a/dep/acelite/ace/Thread_Mutex.h b/dep/acelite/ace/Thread_Mutex.h index 7bda270e5d3..71fff2db17b 100644 --- a/dep/acelite/ace/Thread_Mutex.h +++ b/dep/acelite/ace/Thread_Mutex.h @@ -4,7 +4,7 @@ /** * @file Thread_Mutex.h * - * $Id: Thread_Mutex.h 92060 2010-09-27 18:08:48Z johnnyw $ + * $Id: Thread_Mutex.h 96061 2012-08-16 09:36:07Z mcorino $ * * Moved from Synch.h. * @@ -49,7 +49,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL */ class ACE_Export ACE_Thread_Mutex { - friend class ACE_Condition_Thread_Mutex; public: /// Constructor. ACE_Thread_Mutex (const ACE_TCHAR *name = 0, diff --git a/dep/acelite/ace/Thread_Semaphore.h b/dep/acelite/ace/Thread_Semaphore.h index d7013d9c3f2..c9843a919ad 100644 --- a/dep/acelite/ace/Thread_Semaphore.h +++ b/dep/acelite/ace/Thread_Semaphore.h @@ -4,7 +4,7 @@ /** * @file Thread_Semaphore.h * - * $Id: Thread_Semaphore.h 86731 2009-09-17 12:23:48Z johnnyw $ + * $Id: Thread_Semaphore.h 95807 2012-06-01 12:44:19Z johnnyw $ * * Moved from Synch.h. * @@ -47,7 +47,7 @@ public: void * = 0, int max = 0x7FFFFFFF); - /// Default dtor. + /// Default destructor. ~ACE_Thread_Semaphore (void); /// Dump the state of an object. diff --git a/dep/acelite/ace/Throughput_Stats.cpp b/dep/acelite/ace/Throughput_Stats.cpp index 87a63c715ef..f8e27fba837 100644 --- a/dep/acelite/ace/Throughput_Stats.cpp +++ b/dep/acelite/ace/Throughput_Stats.cpp @@ -1,4 +1,4 @@ -// $Id: Throughput_Stats.cpp 92069 2010-09-28 11:38:59Z johnnyw $ +// $Id: Throughput_Stats.cpp 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/Throughput_Stats.h" @@ -24,10 +24,6 @@ ACE_Throughput_Stats::sample (ACE_UINT64 throughput, this->ACE_Basic_Stats::sample (latency); if (this->samples_count () == 1u) - { - this->throughput_last_ = throughput; - } - else { this->throughput_last_ = throughput; } @@ -53,7 +49,7 @@ ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs) void ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg, - ACE_UINT32 sf) + ACE_Basic_Stats::scale_factor_type sf) { if (this->samples_count () == 0u) { @@ -71,20 +67,13 @@ ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg, void ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, - ACE_UINT32 sf, + ACE_Basic_Stats::scale_factor_type sf, ACE_UINT64 elapsed_time, ACE_UINT32 samples_count) { #ifndef ACE_NLOGGING double seconds = -# if defined ACE_LACKS_LONGLONG_T - elapsed_time / sf; -#elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - static_cast (ACE_UINT64_DBLCAST_ADAPTER ( - ACE_U_LongLong(elapsed_time / sf))); -# else /* ! ACE_LACKS_LONGLONG_T */ static_cast (ACE_UINT64_DBLCAST_ADAPTER (elapsed_time / sf)); -# endif /* ! ACE_LACKS_LONGLONG_T */ seconds /= ACE_HR_SCALE_CONVERSION; const double t_avg = samples_count / seconds; diff --git a/dep/acelite/ace/Throughput_Stats.h b/dep/acelite/ace/Throughput_Stats.h index f9a97122aae..0911e8d4b8d 100644 --- a/dep/acelite/ace/Throughput_Stats.h +++ b/dep/acelite/ace/Throughput_Stats.h @@ -4,7 +4,7 @@ /** * @file Throughput_Stats.h * - * $Id: Throughput_Stats.h 92069 2010-09-28 11:38:59Z johnnyw $ + * $Id: Throughput_Stats.h 95743 2012-05-13 12:29:28Z johnnyw $ * * @author David L. Levine */ @@ -55,11 +55,11 @@ public: void accumulate (const ACE_Throughput_Stats &throughput); /// Print down the stats - void dump_results (const ACE_TCHAR* msg, ACE_UINT32 scale_factor); + void dump_results (const ACE_TCHAR* msg, scale_factor_type scale_factor); /// Dump the average throughput stats. static void dump_throughput (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor, + scale_factor_type scale_factor, ACE_UINT64 elapsed_time, ACE_UINT32 samples_count); private: diff --git a/dep/acelite/ace/Time_Policy.cpp b/dep/acelite/ace/Time_Policy.cpp new file mode 100644 index 00000000000..c44daa7fe96 --- /dev/null +++ b/dep/acelite/ace/Time_Policy.cpp @@ -0,0 +1,34 @@ +// $Id: Time_Policy.cpp 96061 2012-08-16 09:36:07Z mcorino $ + +#include "ace/Time_Policy.h" + +#if !defined(__ACE_INLINE__) +# include "ace/Time_Policy.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Dynamic_Time_Policy_Base::~ACE_Dynamic_Time_Policy_Base () +{ +} + + +class NULL_Time_Policy : public ACE_Dynamic_Time_Policy_Base +{ +protected: + virtual ACE_Time_Value_T gettimeofday () const; +}; + +ACE_Time_Value_T NULL_Time_Policy::gettimeofday () const +{ + return ACE_Time_Value_T (ACE_Time_Value::zero); +} + +static NULL_Time_Policy null_policy_; + +ACE_Delegating_Time_Policy::ACE_Delegating_Time_Policy (ACE_Dynamic_Time_Policy_Base const * delegate) + : delegate_ (delegate != 0 ? delegate : &null_policy_) +{ +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Time_Policy.h b/dep/acelite/ace/Time_Policy.h new file mode 100644 index 00000000000..a94dd9591c7 --- /dev/null +++ b/dep/acelite/ace/Time_Policy.h @@ -0,0 +1,172 @@ +#ifndef ACE_TIME_POLICY_H +#define ACE_TIME_POLICY_H +// -*- C++ -*- +/** + * @file Time_Policy.h + * + * $Id: Time_Policy.h 96061 2012-08-16 09:36:07Z mcorino $ + * + * @author Carlos O'Ryan + * @author Martin Corino + */ +#include /**/ "ace/pre.h" + +#include /**/ "ace/config-all.h" + +#include /**/ "ace/Time_Value_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_System_Time_Policy + * + * @brief Implement the system time policy for ACE. + * + * The most common time policy is to simply use + * ACE_OS::gettimeofday(), this class implements that policy, i.e., it + * simply calls that function. + */ +class ACE_Export ACE_System_Time_Policy +{ +public: + /// Return the current time according to this policy + ACE_Time_Value_T operator() () const; + + /// Noop. Just here to satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +}; + +/** + * @class ACE_HR_Time_Policy + * + * @brief Implement a time policy based on the ACE Highres timer. + * + */ +class ACE_Export ACE_HR_Time_Policy +{ +public: + /// Return the current time according to this policy + ACE_Time_Value_T operator() () const; + + /// Noop. Just here to satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +}; + +/** + * @class ACE_FPointer_Timer_Policy + * + * @brief Implement a time policy based on a function pointer. + * + * This time policy allows dynamic changes to the source of time by + * using a function pointer. + */ +class ACE_Export ACE_FPointer_Time_Policy +{ +public: + /** + * @brief Default constructor uses ACE_OS::gettimeofday() + * + * ACE_T requires a default constructor that leaves the + * policy in a functional state. Therefore, a null pointer would + * not be desirable, in other words, we need a non-trivial default + * constructor. + */ + ACE_FPointer_Time_Policy(); + + /** + * @typedef FPtr + * + * Short-hand for the right type of pointer to function. + */ + typedef ACE_Time_Value (*FPtr)(); + + /** + * @brief Constructor from a pointer to function. + * + * Construct from a pointer to function. + */ + ACE_FPointer_Time_Policy(FPtr f); + + /// Return the current time according to this policy + ACE_Time_Value_T operator()() const; + + /// Satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +private: + FPtr function_; +}; + +class ACE_Dynamic_Time_Policy_Base; // forward decl + +/** + * @class ACE_Delegating_Time_Policy + * + * @brief Implement a time policy that delegates to a dynamic + * time policy. + */ +class ACE_Export ACE_Delegating_Time_Policy +{ +public: + ACE_Delegating_Time_Policy (ACE_Dynamic_Time_Policy_Base const * delegate = 0); + + /// Return the current time according to this policy + ACE_Time_Value_T operator()() const; + + /// Set delegate + void set_delegate (ACE_Dynamic_Time_Policy_Base const * delegate); + + /// Copy policy + ACE_Delegating_Time_Policy& operator =(ACE_Delegating_Time_Policy const & pol); + + /// Noop. Just here to satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +private: + ACE_Dynamic_Time_Policy_Base const * delegate_; +}; + +/** + * @class ACE_Dynamic_Time_Policy_base + * + * @brief Abstract base class for dynamically loaded and/or shared + * time policies. + * + */ +class ACE_Export ACE_Dynamic_Time_Policy_Base +{ +public: + virtual ~ACE_Dynamic_Time_Policy_Base (); + + /// Return the current time according to this policy + ACE_Time_Value_T operator()() const; + + /// Noop. Just here to satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +protected: + /// Return the current time according to policy implementation. + virtual ACE_Time_Value_T gettimeofday () const = 0; +}; + +/// Temporarily, for backwards compatibility reasons, this will +/// be the default time policy. In time to be replaced by +/// ACE_System_Time_Policy. +typedef ACE_FPointer_Time_Policy ACE_Default_Time_Policy; + +#if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT +template class ACE_Export ACE_Time_Value_T; +template class ACE_Export ACE_Time_Value_T; +template class ACE_Export ACE_Time_Value_T; +template class ACE_Export ACE_Time_Value_T; +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "ace/Time_Policy.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" +#endif /* ACE_TIME_POLICY_H */ diff --git a/dep/acelite/ace/Time_Policy.inl b/dep/acelite/ace/Time_Policy.inl new file mode 100644 index 00000000000..b59a0f675d2 --- /dev/null +++ b/dep/acelite/ace/Time_Policy.inl @@ -0,0 +1,95 @@ +// -*- C++ -*- +// +// $Id: Time_Policy.inl 96061 2012-08-16 09:36:07Z mcorino $ + +#include "ace/OS_NS_sys_time.h" +#include "ace/High_Res_Timer.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE ACE_Time_Value_T +ACE_System_Time_Policy::operator()() const +{ + return ACE_Time_Value_T (ACE_OS::gettimeofday()); +} + +ACE_INLINE void +ACE_System_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void)) +{ +} + +ACE_INLINE ACE_Time_Value_T +ACE_HR_Time_Policy::operator()() const +{ + return ACE_Time_Value_T (ACE_High_Res_Timer::gettimeofday_hr ()); +} + +ACE_INLINE void +ACE_HR_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void)) +{ +} + +ACE_INLINE +ACE_FPointer_Time_Policy::ACE_FPointer_Time_Policy() + : function_(ACE_OS::gettimeofday) +{ +} + +ACE_INLINE +ACE_FPointer_Time_Policy:: +ACE_FPointer_Time_Policy(ACE_FPointer_Time_Policy::FPtr f) + : function_(f) +{ +} + +ACE_INLINE ACE_Time_Value_T +ACE_FPointer_Time_Policy::operator()() const +{ + return ACE_Time_Value_T ((*this->function_)(), *this); +} + +ACE_INLINE void +ACE_FPointer_Time_Policy::set_gettimeofday (ACE_Time_Value (*f)(void)) +{ + this->function_ = f; +} + +ACE_INLINE ACE_Time_Value_T +ACE_Dynamic_Time_Policy_Base::operator()() const +{ + return this->gettimeofday (); +} + +ACE_INLINE void +ACE_Dynamic_Time_Policy_Base::set_gettimeofday (ACE_Time_Value (*)(void)) +{ +} + +ACE_INLINE ACE_Time_Value_T +ACE_Delegating_Time_Policy::operator()() const +{ + return (*this->delegate_) (); +} + +ACE_INLINE void +ACE_Delegating_Time_Policy::set_gettimeofday (ACE_Time_Value (*)(void)) +{ +} + +ACE_INLINE void +ACE_Delegating_Time_Policy::set_delegate (ACE_Dynamic_Time_Policy_Base const * delegate) +{ + if (delegate != 0) + { + this->delegate_ = delegate; + } +} + +ACE_INLINE ACE_Delegating_Time_Policy& +ACE_Delegating_Time_Policy::operator =(ACE_Delegating_Time_Policy const & pol) +{ + this->delegate_ = pol.delegate_; + return *this; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Time_Policy_T.cpp b/dep/acelite/ace/Time_Policy_T.cpp new file mode 100644 index 00000000000..6845131aa21 --- /dev/null +++ b/dep/acelite/ace/Time_Policy_T.cpp @@ -0,0 +1,27 @@ +// $Id: Time_Policy_T.cpp 96061 2012-08-16 09:36:07Z mcorino $ + +#ifndef ACE_TIME_POLICY_T_CPP +#define ACE_TIME_POLICY_T_CPP + +#include "ace/Time_Policy_T.h" + +#if !defined (__ACE_INLINE__) +#include "ace/Time_Policy_T.inl" +#endif /* __ACE_INLINE__ */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template +ACE_Time_Policy_T::~ACE_Time_Policy_T () +{ +} + +template ACE_Time_Value_T +ACE_Time_Policy_T::gettimeofday () const +{ + return ACE_Time_Value_T (this->time_policy_ (), ACE_Delegating_Time_Policy (this)); +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_TIME_POLICY_T_CPP */ diff --git a/dep/acelite/ace/Time_Policy_T.h b/dep/acelite/ace/Time_Policy_T.h new file mode 100644 index 00000000000..bde0c5c45bc --- /dev/null +++ b/dep/acelite/ace/Time_Policy_T.h @@ -0,0 +1,77 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Time_Policy_T.h + * + * $Id: Time_Policy_T.h 96061 2012-08-16 09:36:07Z mcorino $ + * + * @author Martin Corino + */ +//============================================================================= + +#ifndef ACE_TIME_POLICY_T_H +#define ACE_TIME_POLICY_T_H + +#include /**/ "ace/pre.h" + +#include /**/ "ace/ACE_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Time_Policy.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_Time_Policy_T + * + * @brief Template class implementing a dynamic time policy based on + * another time policy + * + */ +template +class ACE_Time_Policy_T : public ACE_Dynamic_Time_Policy_Base +{ +public: + ACE_Time_Policy_T (TIME_POLICY const & time_policy = TIME_POLICY()); + virtual ~ACE_Time_Policy_T (); + + /// Return the current time according to this policy + ACE_Time_Value_T operator()() const; + + /// Allows applications to control how the timer queue gets the time + /// of day. + void set_time_policy(TIME_POLICY const & time_policy); + + /// Noop. Just here to satisfy backwards compatibility demands. + void set_gettimeofday (ACE_Time_Value (*gettimeofday)(void)); +protected: + /// Return the current time according to policy implementation. + virtual ACE_Time_Value_T gettimeofday () const; + +private: + /// The policy to return the current time of day + TIME_POLICY time_policy_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" + +#if defined (__ACE_INLINE__) +#include "ace/Time_Policy_T.inl" +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ace/Time_Policy_T.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Time_Policy_T.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + + +#endif /* ACE_TIME_POLICY_T_H */ diff --git a/dep/acelite/ace/Time_Policy_T.inl b/dep/acelite/ace/Time_Policy_T.inl new file mode 100644 index 00000000000..23a07813a6c --- /dev/null +++ b/dep/acelite/ace/Time_Policy_T.inl @@ -0,0 +1,32 @@ +// -*- C++ -*- +// +// $Id: Time_Policy_T.inl 96066 2012-08-16 12:45:46Z mcorino $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template +ACE_INLINE +ACE_Time_Policy_T::ACE_Time_Policy_T (TIME_POLICY const & time_policy) + : time_policy_ (time_policy) +{ +} + +template +ACE_INLINE ACE_Time_Value_T +ACE_Time_Policy_T::operator() () const +{ + return this->gettimeofday (); +} + +template ACE_INLINE void +ACE_Time_Policy_T::set_gettimeofday (ACE_Time_Value (*)(void)) +{ +} + +template ACE_INLINE void +ACE_Time_Policy_T::set_time_policy(TIME_POLICY const & time_policy) +{ + this->time_policy_ = time_policy; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/dep/acelite/ace/Time_Value.cpp b/dep/acelite/ace/Time_Value.cpp index 045df4d4e66..0b13cdedac9 100644 --- a/dep/acelite/ace/Time_Value.cpp +++ b/dep/acelite/ace/Time_Value.cpp @@ -1,4 +1,4 @@ -// $Id: Time_Value.cpp 92069 2010-09-28 11:38:59Z johnnyw $ +// $Id: Time_Value.cpp 96061 2012-08-16 09:36:07Z mcorino $ #include "ace/Time_Value.h" @@ -9,6 +9,7 @@ #include "ace/Numeric_Limits.h" #include "ace/If_Then_Else.h" #include "ace/OS_NS_math.h" +#include "ace/Time_Policy.h" #ifdef ACE_HAS_CPP98_IOSTREAMS #include @@ -33,6 +34,9 @@ const ACE_Time_Value ACE_Time_Value::max_time ( ACE_ALLOC_HOOK_DEFINE (ACE_Time_Value) +ACE_Time_Value::~ACE_Time_Value() +{} + /// Increment microseconds (the only reason this is here is to allow /// the use of ACE_Atomic_Op with ACE_Time_Value). ACE_Time_Value @@ -81,13 +85,8 @@ ACE_Time_Value::operator -- (void) /// /// In the beginning (Jan. 1, 1601), there was no time and no computer. /// And Bill said: "Let there be time," and there was time.... -# if defined (ACE_LACKS_LONGLONG_T) -const ACE_U_LongLong ACE_Time_Value::FILETIME_to_timval_skew = -ACE_U_LongLong (0xd53e8000, 0x19db1de); -# else const DWORDLONG ACE_Time_Value::FILETIME_to_timval_skew = ACE_INT64_LITERAL (0x19db1ded53e8000); -# endif /// Initializes the ACE_Time_Value object from a Win32 FILETIME ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) @@ -98,15 +97,7 @@ ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) void ACE_Time_Value::set (const FILETIME &file_time) { - // Initializes the ACE_Time_Value object from a Win32 FILETIME -#if defined (ACE_LACKS_LONGLONG_T) - ACE_U_LongLong LL_100ns(file_time.dwLowDateTime, file_time.dwHighDateTime); - LL_100ns -= ACE_Time_Value::FILETIME_to_timval_skew; - // Convert 100ns units to seconds; - this->tv_.tv_sec = (long) (LL_100ns / ((double) (10000 * 1000))); - // Convert remainder to microseconds; - this->tv_.tv_usec = (suseconds_t)((LL_100ns % ((ACE_UINT32)(10000 * 1000))) / 10); -#else + // Initializes the ACE_Time_Value object from a Win32 FILETIME // Don't use a struct initializer, gcc don't like it. ULARGE_INTEGER _100ns; _100ns.LowPart = file_time.dwLowDateTime; @@ -115,10 +106,10 @@ void ACE_Time_Value::set (const FILETIME &file_time) _100ns.QuadPart -= ACE_Time_Value::FILETIME_to_timval_skew; // Convert 100ns units to seconds; - this->tv_.tv_sec = (long) (_100ns.QuadPart / (10000 * 1000)); + this->tv_.tv_sec = (time_t) (_100ns.QuadPart / (10000 * 1000)); // Convert remainder to microseconds; this->tv_.tv_usec = (suseconds_t) ((_100ns.QuadPart % (10000 * 1000)) / 10); -#endif // ACE_LACKS_LONGLONG_T + this->normalize (); } @@ -128,15 +119,6 @@ ACE_Time_Value::operator FILETIME () const FILETIME file_time; // ACE_OS_TRACE ("ACE_Time_Value::operator FILETIME"); -#if defined (ACE_LACKS_LONGLONG_T) - ACE_U_LongLong LL_sec(this->tv_.tv_sec); - ACE_U_LongLong LL_usec(this->tv_.tv_usec); - ACE_U_LongLong LL_100ns = LL_sec * (ACE_UINT32)(10000 * 1000) + - LL_usec * (ACE_UINT32)10 + - ACE_Time_Value::FILETIME_to_timval_skew; - file_time.dwLowDateTime = LL_100ns.lo(); - file_time.dwHighDateTime = LL_100ns.hi(); -#else ULARGE_INTEGER _100ns; _100ns.QuadPart = (((DWORDLONG) this->tv_.tv_sec * (10000 * 1000) + this->tv_.tv_usec * 10) + @@ -144,13 +126,40 @@ ACE_Time_Value::operator FILETIME () const file_time.dwLowDateTime = _100ns.LowPart; file_time.dwHighDateTime = _100ns.HighPart; -#endif //ACE_LACKS_LONGLONG_T return file_time; } - #endif /* ACE_WIN32 */ +ACE_Time_Value +ACE_Time_Value::now () const +{ + ACE_System_Time_Policy systp; + return systp (); +} + +ACE_Time_Value +ACE_Time_Value::to_relative_time () const +{ + ACE_System_Time_Policy systp; + return (*this) - systp (); +} + +ACE_Time_Value +ACE_Time_Value::to_absolute_time () const +{ + ACE_System_Time_Policy systp; + return (*this) + systp (); +} + +ACE_Time_Value * +ACE_Time_Value::duplicate () const +{ + ACE_Time_Value * tmp = 0; + ACE_NEW_RETURN (tmp, ACE_Time_Value (*this), 0); + return tmp; +} + void ACE_Time_Value::dump (void) const { @@ -213,13 +222,13 @@ ACE_Time_Value::normalize (bool saturate) this->tv_.tv_usec += ACE_ONE_SECOND_IN_USECS; } // tv_sec in qnxnto is unsigned -#if !defined ( __QNXNTO__) +#if !defined ( __QNX__) else if (this->tv_.tv_sec < 0 && this->tv_.tv_usec > 0) { ++this->tv_.tv_sec; this->tv_.tv_usec -= ACE_ONE_SECOND_IN_USECS; } -#endif /* __QNXNTO__ */ +#endif /* __QNX__ */ } diff --git a/dep/acelite/ace/Time_Value.h b/dep/acelite/ace/Time_Value.h index f92c8c7f7f5..522b1e0b0ae 100644 --- a/dep/acelite/ace/Time_Value.h +++ b/dep/acelite/ace/Time_Value.h @@ -4,7 +4,7 @@ /** * @file Time_Value.h * - * $Id: Time_Value.h 90683 2010-06-17 22:07:42Z shuston $ + * $Id: Time_Value.h 96061 2012-08-16 09:36:07Z mcorino $ * * @author Douglas C. Schmidt */ @@ -35,17 +35,7 @@ suseconds_t const ACE_ONE_SECOND_IN_USECS = 1000000; // needed to determine if iostreams are present #include "ace/iosfwd.h" -// This forward declaration is needed by the set() and FILETIME() functions -#if defined (ACE_LACKS_LONGLONG_T) ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Export ACE_U_LongLong; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_LACKS_LONGLONG_T */ - -// ------------------------------------------------------------------- - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - /** * @class ACE_Time_Value @@ -90,6 +80,9 @@ public: /// Construct the ACE_Time_Value object from a timespec_t. explicit ACE_Time_Value (const timespec_t &t); + /// Destructor + virtual ~ACE_Time_Value (); + # if defined (ACE_WIN32) /// Construct the ACE_Time_Value object from a Win32 FILETIME explicit ACE_Time_Value (const FILETIME &ft); @@ -250,7 +243,7 @@ public: /// Subtract @a tv to this. ACE_Time_Value &operator -= (const ACE_Time_Value &tv); - /// Substract @a tv to this. + /// Subtract @a tv to this. ACE_Time_Value &operator -= (time_t tv); /** @@ -330,6 +323,51 @@ public: double d); //@} + /// Get current time of day. + /** + * @return Time value representing current time of day. + * + * @note This method is overloaded in the time policy based template + * instantiations derived from this class. Allows for time policy + * aware time values. + */ + virtual ACE_Time_Value now () const; + + /// Converts absolute time value to time value relative to current time of day. + /** + * @return Relative time value. + * + * @note This method is overloaded in the time policy based template + * instantiations derived from this class. Allows for time policy + * aware time values. + * The developer is responsible for making sure this is an absolute + * time value compatible with the active time policy (which is system + * time for the base class). + */ + virtual ACE_Time_Value to_relative_time () const; + + /// Converts relative time value to absolute time value based on current time of day. + /** + * @return Absolute time value. + * + * @note This method is overloaded in the time policy based template + * instantiations derived from this class. Allows for time policy + * aware time values. + * The developer is responsible for making sure this is a relative + * time value. Current time of day is determined based on time policy + * (which is system time for the base class). + */ + virtual ACE_Time_Value to_absolute_time () const; + + /// Duplicates this time value (incl. time policy). + /** + * @return Dynamically allocated time value copy. + * + * @note The caller is responsible for freeing the copy when it's not needed + * anymore. + */ + virtual ACE_Time_Value * duplicate () const; + /// Dump is a no-op. /** * The dump() method is a no-op. It's here for backwards compatibility @@ -341,11 +379,7 @@ public: # if defined (ACE_WIN32) /// Const time difference between FILETIME and POSIX time. -# if defined (ACE_LACKS_LONGLONG_T) - static const ACE_U_LongLong FILETIME_to_timval_skew; -# else static const DWORDLONG FILETIME_to_timval_skew; -# endif // ACE_LACKS_LONGLONG_T # endif /* ACE_WIN32 */ private: diff --git a/dep/acelite/ace/Time_Value.inl b/dep/acelite/ace/Time_Value.inl index 8f7bf23d837..c0a16c1b50c 100644 --- a/dep/acelite/ace/Time_Value.inl +++ b/dep/acelite/ace/Time_Value.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Time_Value.inl 90689 2010-06-18 11:14:47Z shuston $ +// $Id: Time_Value.inl 95761 2012-05-15 18:23:04Z johnnyw $ #include "ace/Truncate.h" @@ -58,23 +58,11 @@ ACE_INLINE void ACE_Time_Value::set (time_t sec, suseconds_t usec) { // ACE_OS_TRACE ("ACE_Time_Value::set"); -# if defined (_WIN32_WCE) && (_WIN32_WCE == 0x600) && !defined (_USE_32BIT_TIME_T) && defined (_MSC_VER) - // The WinCE 6.0 SDK ships with a timeval tv_sec member that uses long as type - // not time_t. This resolves in compilation warnings because time_t - // can be 64bit. Disable at this momemt the warning for just this method - // else we get a compile warnings each time this inline file is included - // this file. -# pragma warning (push) -# pragma warning (disable: 4244) -# endif this->tv_.tv_sec = sec; -# if defined (_WIN32_WCE) && (_WIN32_WCE == 0x600) && !defined (_USE_32BIT_TIME_T) && defined (_MSC_VER) -# pragma warning (pop) -# endif this->tv_.tv_usec = usec; -#if __GNUC__ - if (__builtin_constant_p(sec) && - __builtin_constant_p(usec) && +#if __GNUC__ && !(__GNUC__ == 3 && __GNUC_MINOR__ == 4) + if ((__builtin_constant_p(sec) & + __builtin_constant_p(usec)) && (sec >= 0 && usec >= 0 && usec < ACE_ONE_SECOND_IN_USECS)) return; #endif @@ -85,7 +73,7 @@ ACE_INLINE void ACE_Time_Value::set (double d) { // ACE_OS_TRACE ("ACE_Time_Value::set"); - long l = (long) d; + time_t l = (time_t) d; this->tv_.tv_sec = l; this->tv_.tv_usec = (suseconds_t) ((d - (double) l) * ACE_ONE_SECOND_IN_USECS + .5); this->normalize (); @@ -131,7 +119,7 @@ ACE_INLINE void ACE_Time_Value::sec (time_t sec) { // ACE_OS_TRACE ("ACE_Time_Value::sec"); - this->tv_.tv_sec = ACE_Utils::truncate_cast (sec); + this->tv_.tv_sec = sec; } /// Converts from Time_Value format into milli-seconds format. @@ -222,15 +210,7 @@ ACE_INLINE void ACE_Time_Value::to_usec (ACE_UINT64 & usec) const { // ACE_OS_TRACE ("ACE_Time_Value::to_usec"); - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - usec = ACE_U_LongLong (static_cast (this->tv_.tv_sec)); -#elif defined (ACE_LACKS_LONGLONG_T) - // No native 64-bit type, meaning time_t is most likely 32 bits. - usec = ACE_U_LongLong (this->tv_.tv_sec); -#else usec = static_cast (this->tv_.tv_sec); -#endif /* ACE_LACKS_LONGLONG_T */ usec *= 1000000; usec += this->tv_.tv_usec; } diff --git a/dep/acelite/ace/Time_Value_T.cpp b/dep/acelite/ace/Time_Value_T.cpp new file mode 100644 index 00000000000..e7fdec98762 --- /dev/null +++ b/dep/acelite/ace/Time_Value_T.cpp @@ -0,0 +1,52 @@ +// $Id: Time_Value_T.cpp 96061 2012-08-16 09:36:07Z mcorino $ + +#ifndef ACE_TIME_VALUE_T_CPP +#define ACE_TIME_VALUE_T_CPP + +#include "ace/Time_Value_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if !defined (__ACE_INLINE__) +#include "ace/Time_Value_T.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/OS_Memory.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template +ACE_Time_Value +ACE_Time_Value_T::now () const +{ + return this->time_policy_ (); +} + +template +ACE_Time_Value +ACE_Time_Value_T::to_relative_time () const +{ + return (*this) - this->time_policy_ (); +} + +template +ACE_Time_Value +ACE_Time_Value_T::to_absolute_time () const +{ + return (*this) + this->time_policy_ (); +} + +template +ACE_Time_Value * +ACE_Time_Value_T::duplicate () const +{ + ACE_Time_Value_T * tmp = 0; + ACE_NEW_RETURN (tmp, ACE_Time_Value_T (*this), 0); + return tmp; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_TIME_VALUE_T_CPP */ diff --git a/dep/acelite/ace/Time_Value_T.h b/dep/acelite/ace/Time_Value_T.h new file mode 100644 index 00000000000..615d5820a50 --- /dev/null +++ b/dep/acelite/ace/Time_Value_T.h @@ -0,0 +1,194 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Time_Value_T.h + * + * $Id: Time_Value_T.h 96061 2012-08-16 09:36:07Z mcorino $ + * + * @author Martin Corino + */ +//============================================================================= + +#ifndef ACE_TIME_VALUE_T_H +#define ACE_TIME_VALUE_T_H + +#include /**/ "ace/pre.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Time_Value.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_Time_Value + * + * @brief Operations on "timeval" structures, which express time in + * seconds (secs) and microseconds (usecs). + * + * This class centralizes all the time related processing in + * ACE. These time values are typically used in conjunction with OS + * mechanisms like + +int +ACE_TkReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time) +{ + ACE_TRACE ("ACE_TkReactor::wait_for_multiple_events"); + int nfound; + + do + { + max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time); + + size_t width = this->handler_rep_.max_handlep1 (); + handle_set.rd_mask_ = this->wait_set_.rd_mask_; + handle_set.wr_mask_ = this->wait_set_.wr_mask_; + handle_set.ex_mask_ = this->wait_set_.ex_mask_; + nfound = TkWaitForMultipleEvents (width, + handle_set, + max_wait_time); + + } while (nfound == -1 && this->handle_error () > 0); + + if (nfound > 0) + { +#if !defined (ACE_WIN32) + handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); +#endif /* ACE_WIN32 */ + } + return nfound; // Timed out or input available +} + +void +ACE_TkReactor::TimerCallbackProc (ClientData cd) +{ + ACE_TkReactor *self = (ACE_TkReactor *) cd; + self->timeout_ = 0; + + // Deal with any timer events + ACE_Select_Reactor_Handle_Set handle_set; + self->dispatch (0, handle_set); + self->reset_timeout (); +} + +/** + * @todo the unused mask argument is probably quite useful, but we + * ignore it, why? In fact the following comment probably + * relates to that: + * This could be made shorter if we know which *kind* of event + * we were about to get. Here we use , just use the Tk mechanism to + // wait for a single event. + + // Wait for something to happen. + ::Tcl_DoOneEvent (0); + + // Reset the width, in case it changed during the upcalls. + width = this->handler_rep_.max_handlep1 (); + + // Now actually read the result needed by the using + // + +int +ACE_XtReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time) +{ + ACE_TRACE ("ACE_XtReactor::wait_for_multiple_events"); + int nfound; + + do + { + max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time); + + size_t width = this->handler_rep_.max_handlep1 (); + handle_set.rd_mask_ = this->wait_set_.rd_mask_; + handle_set.wr_mask_ = this->wait_set_.wr_mask_; + handle_set.ex_mask_ = this->wait_set_.ex_mask_; + nfound = XtWaitForMultipleEvents (width, + handle_set, + max_wait_time); + + } while (nfound == -1 && this->handle_error () > 0); + + if (nfound > 0) + { +#if !defined (ACE_WIN32) + handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ()); + handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); +#endif /* ACE_WIN32 */ + } + return nfound; // Timed out or input available +} + +void +ACE_XtReactor::TimerCallbackProc (XtPointer closure, XtIntervalId * /* id */) +{ + ACE_XtReactor *self = (ACE_XtReactor *) closure; + self->timeout_ = 0; + + // Deal with any timer events + ACE_Select_Reactor_Handle_Set handle_set; + self->dispatch (0, handle_set); + self->reset_timeout (); +} + +// This could be made shorter if we know which *kind* of event we were +// about to get. Here we use , just use the Xt mechanism to + // wait for a single event. + + // Wait for something to happen. + ::XtAppProcessEvent (this->context_, XtIMAll); + + // Reset the width, in case it changed during the upcalls. + width = this->handler_rep_.max_handlep1 (); + + // Now actually read the result needed by the using + //