diff options
69 files changed, 3165 insertions, 1377 deletions
@@ -1,6 +1,9 @@ USER VISIBLE CHANGES BETWEEN ACE-6.5.5 and ACE-6.5.6 ==================================================== +. On Linux, the ACE_Log_Msg format specifier `%t` is now replaced with the + system thread id provided by gettid(), instead of the much longer pthread id. + USER VISIBLE CHANGES BETWEEN ACE-6.5.4 and ACE-6.5.5 ==================================================== diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 7a26dff2913..bc2cc405335 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -2793,7 +2793,7 @@ ACE::fork (const ACE_TCHAR *program_name, { case 0: // grandchild returns 0. return 0; - case -1: // assumes all errnos are < 256 + case static_cast<pid_t>(-1): // assumes all errnos are < 256 ACE_OS::_exit (errno); default: // child terminates, orphaning grandchild ACE_OS::_exit (0); diff --git a/ACE/ace/ACE.inl b/ACE/ace/ACE.inl index f95982d7357..3da4d87fd13 100644 --- a/ACE/ace/ACE.inl +++ b/ACE/ace/ACE.inl @@ -217,7 +217,7 @@ ACE::sendv_n (ACE_HANDLE handle, ACE_INLINE ssize_t ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) { -#if defined (ACE_WIN32) || defined (HPUX) +#if defined (ACE_WIN32) || defined (HPUX) || defined (ACE_MQX) return ACE_OS::send (handle, (const char *) buf, len); #else return ACE_OS::write (handle, (const char *) buf, len); @@ -227,7 +227,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) +#if defined (ACE_WIN32) || defined (ACE_OPENVMS) || defined (ACE_MQX) return ACE_OS::recv (handle, (char *) buf, len); #else return ACE_OS::read (handle, (char *) buf, len); diff --git a/ACE/ace/Acceptor.h b/ACE/ace/Acceptor.h index f4c7754f88b..5deb1d172fd 100644 --- a/ACE/ace/Acceptor.h +++ b/ACE/ace/Acceptor.h @@ -68,7 +68,7 @@ public: /// "Do-nothing" constructor. ACE_Acceptor (ACE_Reactor * = 0, - int use_select = 1); + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT); /** * Open the contained @c PEER_ACCEPTOR object to begin listening, and @@ -106,7 +106,7 @@ public: ACE_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, ACE_Reactor *reactor = ACE_Reactor::instance (), int flags = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /** @@ -148,7 +148,7 @@ public: virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, ACE_Reactor *reactor = ACE_Reactor::instance (), int flags = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /// Close down the Acceptor's resources. @@ -302,7 +302,7 @@ public: /// Default constructor. ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0, const ACE_TCHAR service_description[] = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /** @@ -319,7 +319,7 @@ public: ACE_Scheduling_Strategy<SVC_HANDLER> * = 0, const ACE_TCHAR service_name[] = 0, const ACE_TCHAR service_description[] = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /** @@ -359,7 +359,7 @@ public: virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, ACE_Reactor *reactor, int flags = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /** @@ -376,7 +376,7 @@ public: ACE_Scheduling_Strategy<SVC_HANDLER> * = 0, const ACE_TCHAR *service_name = 0, const ACE_TCHAR *service_description = 0, - int use_select = 1, + int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT, int reuse_addr = 1); /// Close down the Strategy_Acceptor's resources. diff --git a/ACE/ace/Basic_Types.h b/ACE/ace/Basic_Types.h index b9feefb5ea4..f621ce65c8c 100644 --- a/ACE/ace/Basic_Types.h +++ b/ACE/ace/Basic_Types.h @@ -393,8 +393,14 @@ ACE_END_VERSIONED_NAMESPACE_DECL # define ACE_IDL_NSTOHL(X) ((X) << 16) # endif /* ACE_LITTLE_ENDIAN */ -#define ACE_HTONS(x) htons(x) -#define ACE_NTOHS(x) ntohs(x) +// MQX doesn't define these macros correctly. +# if defined (ACE_LITTLE_ENDIAN) && defined (ACE_MQX) +# define ACE_HTONS(x) x +# define ACE_NTOHS(x) x +# else +# define ACE_HTONS(x) htons(x) +# define ACE_NTOHS(x) ntohs(x) +# endif # define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ reinterpret_cast<PTR_TYPE> (static_cast<intptr_t> (L)) diff --git a/ACE/ace/Default_Constants.h b/ACE/ace/Default_Constants.h index 6a8d4acc8ec..383679a1eac 100644 --- a/ACE/ace/Default_Constants.h +++ b/ACE/ace/Default_Constants.h @@ -584,5 +584,9 @@ # define ACE_SYSCALL_FAILED -1 # endif /* ACE_WIN32 */ +#if !defined (ACE_DEFAULT_ACCEPTOR_USE_SELECT) +# define ACE_DEFAULT_ACCEPTOR_USE_SELECT 1 +#endif /* ACE_DEFAULT_ACCEPTOR_USE_SELECT */ + #include /**/ "ace/post.h" #endif /*ACE_DEFAULT_CONSTANTS_H*/ diff --git a/ACE/ace/Handle_Set.cpp b/ACE/ace/Handle_Set.cpp index 0643de5dc9e..8f1831757ee 100644 --- a/ACE/ace/Handle_Set.cpp +++ b/ACE/ace/Handle_Set.cpp @@ -16,12 +16,12 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set) // ACE_MSB_MASK is only used here. // This needs to go here to avoid overflow problems on some compilers. -#if defined (ACE_WIN32) - // Does ACE_WIN32 have an fd_mask? +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) + // Do we have an fd_mask? # define ACE_MSB_MASK (~(1 << (NFDBITS - 1))) -#else /* ! ACE_WIN32 */ +#else /* ! ACE_HANDLE_SET_USES_FD_ARRAY */ # define ACE_MSB_MASK (~((fd_mask) 1 << (NFDBITS - 1))) -#endif /* ! ACE_WIN32 */ +#endif /* ! ACE_HANDLE_SET_USES_FD_ARRAY */ #if defined (ACE_LINUX) && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !defined (_XOPEN_SOURCE) // XPG4.2 requires the fds_bits member name, so it is not enabled by @@ -44,14 +44,14 @@ ACE_Handle_Set::dump (void) const ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmax_handle_ = %d"), this->max_handle_)); ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n[ "))); -#if defined (ACE_WIN32) +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) for (size_t i = 0; i < (size_t) this->mask_.fd_count + 1; i++) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" %x "), this->mask_.fd_array[i])); -#else /* !ACE_WIN32 */ +#else /* !ACE_HANDLE_SET_USES_FD_ARRAY */ for (ACE_HANDLE i = 0; i < this->max_handle_ + 1; i++) if (this->is_set (i)) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" %d "), i)); -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" ]\n"))); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); @@ -104,12 +104,12 @@ ACE_Handle_Set::ACE_Handle_Set (const fd_set &fd_mask) ACE_OS::memcpy ((void *) &this->mask_, (void *) &fd_mask, sizeof this->mask_); -#if !defined (ACE_WIN32) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) this->sync (ACE_Handle_Set::MAXSIZE); #if defined (ACE_HAS_BIG_FD_SET) this->min_handle_ = 0; #endif /* ACE_HAS_BIG_FD_SET */ -#endif /* !ACE_WIN32 */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY */ } // Counts the number of bits enabled in N. Uses a table lookup to @@ -193,7 +193,7 @@ void ACE_Handle_Set::sync (ACE_HANDLE max) { ACE_TRACE ("ACE_Handle_Set::sync"); -#if !defined (ACE_WIN32) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) fd_mask *maskp = (fd_mask *)(this->mask_.fds_bits); this->size_ = 0; @@ -205,7 +205,7 @@ ACE_Handle_Set::sync (ACE_HANDLE max) this->set_max (max); #else ACE_UNUSED_ARG (max); -#endif /* !ACE_WIN32 */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY */ } // Resets the MAX_FD after a clear of the original MAX_FD. @@ -214,7 +214,7 @@ void ACE_Handle_Set::set_max (ACE_HANDLE current_max) { ACE_TRACE ("ACE_Handle_Set::set_max"); -#if !defined(ACE_WIN32) +#if !defined(ACE_HANDLE_SET_USES_FD_ARRAY) fd_mask * maskp = (fd_mask *)(this->mask_.fds_bits); if (this->size_ == 0) @@ -239,7 +239,7 @@ ACE_Handle_Set::set_max (ACE_HANDLE current_max) this->max_handle_ = ACE_Handle_Set::MAXSIZE - 1; #else ACE_UNUSED_ARG (current_max); -#endif /* !ACE_WIN32 */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY */ } ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set_Iterator) @@ -251,7 +251,7 @@ ACE_Handle_Set_Iterator::dump (void) const ACE_TRACE ("ACE_Handle_Set_Iterator::dump"); ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); -#if defined(ACE_WIN32) || !defined(ACE_HAS_BIG_FD_SET) +#if defined(ACE_HANDLE_SET_USES_FD_ARRAY) || !defined(ACE_HAS_BIG_FD_SET) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhandle_index_ = %d"), this->handle_index_)); #elif defined(ACE_HAS_BIG_FD_SET) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nword_max_ = %d"), this->word_max_)); @@ -266,14 +266,14 @@ ACE_HANDLE ACE_Handle_Set_Iterator::operator () (void) { ACE_TRACE ("ACE_Handle_Set_Iterator::operator"); -#if defined (ACE_WIN32) +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) if (this->handle_index_ < this->handles_.mask_.fd_count) // Return the handle and advance the iterator. return (ACE_HANDLE) this->handles_.mask_.fd_array[this->handle_index_++]; else return ACE_INVALID_HANDLE; -#elif !defined (ACE_HAS_BIG_FD_SET) /* !ACE_WIN32 */ +#elif !defined (ACE_HAS_BIG_FD_SET) /* !ACE_HANDLE_SET_USES_FD_ARRAY */ // No sense searching further than the max_handle_ + 1; ACE_HANDLE maxhandlep1 = this->handles_.max_handle_ + 1; @@ -400,12 +400,12 @@ ACE_Handle_Set_Iterator::operator () (void) } return this->handle_index_; -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ } ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) : handles_ (hs), -#if !defined (ACE_HAS_BIG_FD_SET) || defined (ACE_WIN32) +#if !defined (ACE_HAS_BIG_FD_SET) || defined (ACE_HANDLE_SET_USES_FD_ARRAY) handle_index_ (0), word_num_ (-1) #elif defined (ACE_HAS_BIG_FD_SET) @@ -417,7 +417,7 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) #endif /* ACE_HAS_BIG_FD_SET */ { ACE_TRACE ("ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator"); -#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && !defined (ACE_HAS_BIG_FD_SET) // No sense searching further than the max_handle_ + 1; ACE_HANDLE maxhandlep1 = this->handles_.max_handle_ + 1; @@ -446,7 +446,7 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) +#elif !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { this->word_num_ = -1; @@ -458,7 +458,7 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) ACE_DIV_BY_WORDSIZE (this->handles_.min_handle_) - 1; this->word_val_ = 0; } -#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY && !ACE_HAS_BIG_FD_SET */ } void @@ -466,7 +466,7 @@ ACE_Handle_Set_Iterator::reset_state (void) { ACE_TRACE ("ACE_Handle_Set_Iterator::reset_state"); -#if !defined (ACE_HAS_BIG_FD_SET) || defined (ACE_WIN32) +#if !defined (ACE_HAS_BIG_FD_SET) || defined (ACE_HANDLE_SET_USES_FD_ARRAY) this->handle_index_ = 0; this->word_num_ = -1; #elif defined (ACE_HAS_BIG_FD_SET) @@ -476,7 +476,7 @@ ACE_Handle_Set_Iterator::reset_state (void) : ((ACE_DIV_BY_WORDSIZE (this->handles_.max_handle_)) + 1); #endif /* ACE_HAS_BIG_FD_SET */ -#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && !defined (ACE_HAS_BIG_FD_SET) // No sense searching further than the max_handle_ + 1; ACE_HANDLE maxhandlep1 = this->handles_.max_handle_ + 1; @@ -505,7 +505,7 @@ ACE_Handle_Set_Iterator::reset_state (void) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) +#elif !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { this->word_num_ = -1; @@ -517,7 +517,7 @@ ACE_Handle_Set_Iterator::reset_state (void) ACE_DIV_BY_WORDSIZE (this->handles_.min_handle_) - 1; this->word_val_ = 0; } -#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY && !ACE_HAS_BIG_FD_SET */ } ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Handle_Set.h b/ACE/ace/Handle_Set.h index 21b239e42a0..a12d06f41be 100644 --- a/ACE/ace/Handle_Set.h +++ b/ACE/ace/Handle_Set.h @@ -36,6 +36,10 @@ # define ACE_DEFAULT_SELECT_REACTOR_SIZE ACE_FD_SETSIZE #endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */ +#if defined (ACE_WIN32) || defined (ACE_MQX) +# define ACE_HANDLE_SET_USES_FD_ARRAY +#endif + ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** @@ -139,9 +143,9 @@ private: enum { WORDSIZE = NFDBITS, -#if !defined (ACE_WIN32) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) NUM_WORDS = howmany (MAXSIZE, NFDBITS), -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ NBITS = 256 }; @@ -201,14 +205,14 @@ private: const ACE_Handle_Set &handles_; /// Index of the bit we're examining in the current word_num_() word. -#if defined (ACE_WIN32) +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) u_int handle_index_; #elif !defined (ACE_HAS_BIG_FD_SET) int handle_index_; #elif defined (ACE_HAS_BIG_FD_SET) int handle_index_; u_long oldlsb_; -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ /// Number of the word we're iterating over (typically between 0..7). int word_num_; @@ -218,13 +222,13 @@ private: int word_max_; #endif /* ACE_HAS_BIG_FD_SET */ -#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && !defined (ACE_HAS_BIG_FD_SET) /// Value of the bits in the word we're iterating on. fd_mask word_val_; -#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) +#elif !defined (ACE_HANDLE_SET_USES_FD_ARRAY) && defined (ACE_HAS_BIG_FD_SET) /// Value of the bits in the word we're iterating on. u_long word_val_; -#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY && !ACE_HAS_BIG_FD_SET */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Handle_Set.inl b/ACE/ace/Handle_Set.inl index d3cfe6d3822..db76152f168 100644 --- a/ACE/ace/Handle_Set.inl +++ b/ACE/ace/Handle_Set.inl @@ -86,11 +86,11 @@ ACE_Handle_Set::set_bit (ACE_HANDLE handle) if ((handle != ACE_INVALID_HANDLE) && (!this->is_set (handle))) { -#if defined (ACE_WIN32) +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) FD_SET ((SOCKET) handle, &this->mask_); ++this->size_; -#else /* ACE_WIN32 */ +#else /* ACE_HANDLE_SET_USES_FD_ARRAY */ #if defined (ACE_HAS_BIG_FD_SET) if (this->size_ == 0) FD_ZERO (&this->mask_); @@ -105,7 +105,7 @@ ACE_Handle_Set::set_bit (ACE_HANDLE handle) if (handle > this->max_handle_) this->max_handle_ = handle; -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ } } @@ -123,10 +123,10 @@ ACE_Handle_Set::clr_bit (ACE_HANDLE handle) &this->mask_); --this->size_; -#if !defined (ACE_WIN32) +#if !defined (ACE_HANDLE_SET_USES_FD_ARRAY) if (handle == this->max_handle_) this->set_max (this->max_handle_); -#endif /* !ACE_WIN32 */ +#endif /* !ACE_HANDLE_SET_USES_FD_ARRAY */ } } @@ -136,11 +136,11 @@ ACE_INLINE int ACE_Handle_Set::num_set (void) const { ACE_TRACE ("ACE_Handle_Set::num_set"); -#if defined (ACE_WIN32) +#if defined (ACE_HANDLE_SET_USES_FD_ARRAY) return this->mask_.fd_count; -#else /* !ACE_WIN32 */ +#else /* !ACE_HANDLE_SET_USES_FD_ARRAY */ return this->size_; -#endif /* ACE_WIN32 */ +#endif /* ACE_HANDLE_SET_USES_FD_ARRAY */ } // Returns a pointer to the underlying fd_set. diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 60a034399d2..9e3f3949e52 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -19,7 +19,7 @@ #include "ace/os_include/os_typeinfo.h" #if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0) -# include "ace/Object_Manager_Base.h" +# include "ace/Object_Manager.h" #endif /* ! ACE_MT_SAFE */ #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) @@ -999,7 +999,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, #else // External decls. - typedef void (*PTF)(...); + typedef void (*PointerToFunction)(...); // Check if there were any conditional values set. bool const conditional_values = this->conditional_values_.is_set_; @@ -1671,7 +1671,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, } ACE_Log_Msg::msg_off_ = bp - this->msg_; - (*va_arg (argp, PTF))(); + (*va_arg (argp, PointerToFunction))(); if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::SILENT) && @@ -1790,16 +1790,27 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, ACE_OS::sprintf (bp, format, static_cast <unsigned> (ACE_Thread::self ())); -#elif defined ACE_USES_WCHAR +#else + +# ifdef ACE_HAS_GETTID +# define ACE_LOG_MSG_GET_THREAD_ID ACE_OS::thr_gettid +# define ACE_LOG_MSG_GET_THREAD_ID_BUFFER_SIZE 8 +# else +# define ACE_LOG_MSG_GET_THREAD_ID ACE_OS::thr_id +# define ACE_LOG_MSG_GET_THREAD_ID_BUFFER_SIZE 32 +# endif + +# if defined ACE_USES_WCHAR { - char tid_buf[32] = {}; - ACE_OS::thr_id (tid_buf, sizeof tid_buf); + char tid_buf[ACE_LOG_MSG_GET_THREAD_ID_BUFFER_SIZE] = {}; + ACE_LOG_MSG_GET_THREAD_ID (tid_buf, sizeof tid_buf); this_len = ACE_OS::strlen (tid_buf); ACE_OS::strncpy (bp, ACE_TEXT_CHAR_TO_TCHAR (tid_buf), bspace); } -#else - this_len = ACE_OS::thr_id (bp, bspace); +# else + this_len = ACE_LOG_MSG_GET_THREAD_ID (bp, bspace); +# endif /* ACE_USES_WCHAR */ #endif /* ACE_WIN32 */ ACE_UPDATE_COUNT (bspace, this_len); break; diff --git a/ACE/ace/MQX_Filesystem.cpp b/ACE/ace/MQX_Filesystem.cpp new file mode 100644 index 00000000000..f04303d8675 --- /dev/null +++ b/ACE/ace/MQX_Filesystem.cpp @@ -0,0 +1,551 @@ +#include "MQX_Filesystem.h" + +#ifdef ACE_MQX + +#include "ace/OS_NS_unistd.h" +#include "ace/OS_NS_sys_stat.h" + +#include <mqx.h> +#include <fio.h> +#include <mfs.h> + +#include <string.h> + +#ifndef FOPEN_MAX +# error "FOPEN_MAX, the max number of open files, must be defined" +#endif +#if FOPEN_MAX < 3 +# error "FOPEN_MAX is less than 3, no room for standard streams, let alone other files descriptors" +#endif + +#define MQX_FILE_ERROR static_cast<size_t>(-1) + +MQX_Filesystem MQX_Filesystem::instance_; + +MQX_Filesystem::MQX_Filesystem () + : current_fs_ (0) + , current_fs_name_len_ (0) + , max_fd_ (255) + , last_fd_ (-1) +{ + current_fs_name_[0] = '\0'; + + // Initialize files_ + for (unsigned i = 0; i < FOPEN_MAX; i++) + { + files_[i].fd = -1; + files_[i].mqx_file = 0; + } +} + +void MQX_Filesystem::complete_initialization () +{ + // Set the Standard Streams + files_[0] = {ACE_STDIN, (MQX_FILE_PTR) _io_get_handle (IO_STDIN), true}; + files_[1] = {ACE_STDOUT, (MQX_FILE_PTR) _io_get_handle (IO_STDOUT), true}; + files_[2] = {ACE_STDERR, (MQX_FILE_PTR) _io_get_handle (IO_STDERR), true}; + + /* + * Try to set the current filesystem. Ignore the error return because if + * we're missing a filesystem now, it's okay because a filesystem might be + * added later. + */ + reset_state (); +} + +bool +MQX_Filesystem::check_state () +{ + if (!_io_is_fs_valid (current_fs_)) + { + if (reset_state ()) + { + errno = ENODEV; + return true; + } + } + return false; +} + +bool +MQX_Filesystem::reset_state () +{ + update_fs (_io_get_first_valid_fs ()); + if (current_fs_ != 0) + chdir ("\\"); + return current_fs_ == 0; +} + +void +MQX_Filesystem::update_fs (MQX_FILE_PTR fs) +{ + current_fs_ = fs; + bool invalid = false; + if (fs == 0) + invalid = true; + else if (_io_get_fs_name (fs, current_fs_name_, IOCFG_FS_MAX_DEVLEN) != MQX_OK) + invalid = true; + else + current_fs_name_len_ = strlen (current_fs_name_); + + if (invalid) + { + current_fs_ = 0; + current_fs_name_[0] = '\0'; + current_fs_name_len_ = 0; + } +} + +int +MQX_Filesystem::open (const char *path, int mode) +{ + if (check_state ()) return -1; + + // Convert open mode to fopen mode + bool r = ACE_BIT_DISABLED (mode, O_RDONLY); + bool w = ACE_BIT_ENABLED (mode, O_WRONLY); + bool rw = ACE_BIT_ENABLED (mode, O_RDWR); + bool a = ACE_BIT_ENABLED (mode, O_CREAT | O_APPEND); + bool t = ACE_BIT_ENABLED (mode, O_CREAT | O_TRUNC); + if (!(r || (w && (a || t)) || rw)) + { + errno = EINVAL; + return -1; + } + char cstdlib_mode[4] = {0}; // r/w/a, t/b, +?, null terminator + cstdlib_mode[0] = r ? 'r' : a ? 'a' : 'w'; + cstdlib_mode[1] = 'b'; + cstdlib_mode[2] = rw ? '+' : '\0'; + + /// Get Absolute Path + char cwd[FS_FILENAME_SIZE]; + int mqx_error = _io_ioctl (current_fs_, IO_IOCTL_GET_CURRENT_DIR, (uint32_t*) cwd); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + char abspath[ACE_MQX_ABS_PATH_SIZE]; + mqx_error = _io_rel2abs (abspath, cwd, path, ACE_MQX_ABS_PATH_SIZE, current_fs_name_); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + + // Set up a new File Entry + File *file = get_new_file (); + if (file == 0) return -1; + + // Call into MQX + file->mqx_file = _io_fopen (abspath, cstdlib_mode); + if (file->mqx_file == 0) + { + file->fd = -1; // Free File in Our Array + errno = ACE_OS::mqx_error_to_errno (_task_get_error()); + if (_task_get_error() == FS_FILE_NOT_FOUND) + _task_set_error(MQX_OK); + } + + return file->fd; +} + +int +MQX_Filesystem::close (int fd) +{ + File *file = get_file (fd); + if (file == 0) return -1; + int mqx_error = _io_fclose (file->mqx_file); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +size_t +MQX_Filesystem::read (int fd, unsigned char *buffer, size_t size) +{ + File *file = get_file (fd); + if (file == 0) return MQX_FILE_ERROR; + int result = _io_read (file->mqx_file, buffer, size); + if (result == IO_ERROR) + { + errno = EIO; + return MQX_FILE_ERROR; + } + return result; +} + +size_t +MQX_Filesystem::write (int fd, const unsigned char *buffer, size_t size) +{ + File *file = get_file (fd); + if (file == 0) return MQX_FILE_ERROR; + int result = _io_write (file->mqx_file, const_cast<unsigned char *> (buffer), size); + if (result == IO_ERROR) + { + errno = EIO; + return MQX_FILE_ERROR; + } + return result; +} + +long +MQX_Filesystem::lseek (int fd, long offset, int whence) +{ + switch (whence) + { + case SEEK_SET: + whence = IO_SEEK_SET; + break; + case SEEK_CUR: + whence = IO_SEEK_CUR; + break; + case SEEK_END: + whence = IO_SEEK_END; + break; + default: + errno = EINVAL; + return -1; + } + File *file = get_file (fd); + if (file == 0) return -1; + return _io_fseek (file->mqx_file, offset, whence) == MQX_OK ? 0 : -1; +} + +char* +MQX_Filesystem::getcwd (char *buf, size_t size) +{ + if (check_state ()) return 0; + if (buf == 0) + { + errno = EINVAL; + return 0; + } + + char curdirtmp[FS_FILENAME_SIZE]; + int mqx_error = _io_ioctl (current_fs_, IO_IOCTL_GET_CURRENT_DIR, (uint32_t*) curdirtmp); + if (mqx_error != MFS_NO_ERROR) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return 0; + } + if ((current_fs_name_len_ + strlen (curdirtmp) + 1) > size) + { + errno = ERANGE; + return 0; + } + strcpy (buf, current_fs_name_); + strcat (buf, curdirtmp); + return buf; +} + +MQX_FILE_PTR +MQX_Filesystem::resolve_fs (const char *path, int *fs_name_len) +{ + if (check_state ()) return 0; + + if (fs_name_len == 0 || path == 0 || path[0] == '\0') + { + errno = EINVAL; + return 0; + } + MQX_FILE_PTR fs; + char fs_name[IOCFG_FS_MAX_DEVLEN]; + bool fs_in_path; + *fs_name_len = _io_get_dev_for_path ( + fs_name, &fs_in_path, IOCFG_FS_MAX_DEVLEN, path, current_fs_name_); + if (fs_in_path) + { + fs = _io_get_fs_by_name (fs_name); + } + else if (*fs_name_len) + { + fs = current_fs_; + *fs_name_len = 0; + } + else + { + errno = EINVAL; + fs = 0; + } + return fs; +} + +int +MQX_Filesystem::mkdir (const char *path) +{ + int fs_name_len; + MQX_FILE_PTR fs = resolve_fs (path, &fs_name_len); + if (fs == 0) return -1; + int mqx_error = _io_ioctl ( + fs, IO_IOCTL_CREATE_SUBDIR, (uint32_t*) (path + fs_name_len)); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +int +MQX_Filesystem::chdir (const char *path) +{ + int fs_name_len; + MQX_FILE_PTR fs = resolve_fs (path, &fs_name_len); + if (fs == 0) return -1; + if (fs != current_fs_) update_fs(fs); + int mqx_error = _io_ioctl (fs, IO_IOCTL_CHANGE_CURRENT_DIR, + (uint32_t*) (path + fs_name_len)); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +int +MQX_Filesystem::rmdir (const char *path) +{ + int fs_name_len; + MQX_FILE_PTR fs = resolve_fs (path, &fs_name_len); + if (fs == 0) return -1; + int mqx_error = _io_ioctl (fs, IO_IOCTL_REMOVE_SUBDIR, + (uint32_t*) (path + fs_name_len)); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +int +MQX_Filesystem::unlink (const char *path) +{ + int fs_name_len; + MQX_FILE_PTR fs = resolve_fs (path, &fs_name_len); + if (fs == 0) return -1; + int mqx_error = _io_ioctl (fs, IO_IOCTL_DELETE_FILE, + (uint32_t*) (path + fs_name_len)); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +int +MQX_Filesystem::rename (const char *oldpath, const char *newpath) +{ + // TODO: Handle Moving Directories? + int old_fs_name_len; + MQX_FILE_PTR fs = resolve_fs (oldpath, &old_fs_name_len); + int new_fs_name_len; + MQX_FILE_PTR other_fs = resolve_fs (newpath, &new_fs_name_len); + if (fs == 0 || other_fs == 0) return -1; + if (fs != other_fs) + { + errno = EXDEV; + return -1; + } + + ACE_stat file_status; + if (this->stat (newpath, &file_status) == 0) + { + // New path already exists... + if (file_status.st_mode & S_IFREG) + { + // It's a file, we can delete it. + if (this->unlink (newpath)) + { + return -1; + } + } + else if (file_status.st_mode & S_IFDIR) + { + // It's a directory, we can't delete that. + errno = EEXIST; + return -1; + } + else + { + // Unknown type, error + errno = EINVAL; + return -1; + } + } + + MFS_RENAME_PARAM mfs_rename; + char oldtmp[FS_FILENAME_SIZE]; + strcpy (oldtmp, oldpath + old_fs_name_len); + mfs_rename.OLD_PATHNAME = oldtmp; + char newtmp[FS_FILENAME_SIZE]; + strcpy (newtmp, newpath + new_fs_name_len); + mfs_rename.NEW_PATHNAME = newtmp; + + int mqx_error = _io_ioctl (fs, IO_IOCTL_RENAME_FILE, (uint32_t*) &mfs_rename); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + return 0; +} + +MQX_Filesystem::File * +MQX_Filesystem::get_file (int fd) +{ + for (int i = 0; i < FOPEN_MAX; i++) + { + if (files_[i].fd == fd) return &files_[i]; + } + errno = EBADF; + return 0; +} + +MQX_Filesystem::File * +MQX_Filesystem::get_new_file () +{ + // Get Unused File Struct + File *file = get_file (-1); + if (file != 0) + { + file->mqx_file = 0; + // Get Unused File Descriptor + for (int fd = last_fd_ + 1; fd != last_fd_; fd++) + { + if (get_file (fd) == 0) + { + file->fd = fd; + last_fd_ = fd; + return file; + } + if (fd == max_fd_) fd = 0; + } + } + errno = ENFILE; + return 0; +} + +static inline int +mfs_file_attrs_to_stat_mode (int attributes) +{ + int mode = (attributes & MFS_ATTR_DIR_NAME) ? S_IFDIR : S_IFREG; + return mode; +} + +int +MQX_Filesystem::stat (const char * path, ACE_stat *statbuf) +{ + if (statbuf == 0) + { + errno = EINVAL; + return -1; + } + + int fs_name_len; + MQX_FILE_PTR fs = resolve_fs (path, &fs_name_len); + if (fs == 0) return -1; + + statbuf->st_size = 0; + statbuf->st_mtime = 0; + statbuf->st_mode = 0; + statbuf->st_nlink = 0; + + MFS_SEARCH_PARAM search; + search.ATTRIBUTE = MFS_SEARCH_ANY; + char tmppath[ACE_MQX_ABS_PATH_SIZE]; + strcpy (&tmppath[0], path); + search.WILDCARD = &tmppath[fs_name_len]; + MFS_SEARCH_DATA search_results; + search.SEARCH_DATA_PTR = &search_results; + int mqx_error = _io_ioctl (fs, IO_IOCTL_FIND_FIRST_FILE, (uint32_t *) &search); + if (mqx_error == MFS_NO_ERROR) + { + statbuf->st_size = search_results.FILE_SIZE; + statbuf->st_mode = mfs_file_attrs_to_stat_mode (search_results.ATTRIBUTE); + statbuf->st_nlink = 1; + // TODO: statbuf->st_mtime + return 0; + } + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; +} + +int +MQX_Filesystem::fstat (int fd, ACE_stat *statbuf) +{ + if (statbuf == 0) + { + errno = EINVAL; + return -1; + } + + File *file = get_file (fd); + if (file == 0) return -1; + + statbuf->st_size = 0; + statbuf->st_mtime = 0; + statbuf->st_mode = 0; + statbuf->st_nlink = 0; + + if (file->chardev_file) + { + statbuf->st_mode &= S_IFCHR; + return 0; + } + + int attributes = 0; + int mqx_error = _io_ioctl (file->mqx_file, IO_IOCTL_GET_FILE_ATTR, (uint32_t *) &attributes); + if (mqx_error != MQX_OK) + { + errno = ACE_OS::mqx_error_to_errno (mqx_error); + return -1; + } + statbuf->st_mode = mfs_file_attrs_to_stat_mode (attributes); + statbuf->st_nlink = 1; + + // TODO: statbuf->st_mtime + + return 0; +} + +/* The following are the function definitions that DLib will use to access MQX + * IO through MQX_Filesystem. + */ + +extern "C" { + +int __open (const char *filename, int mode) +{ + return MQX_Filesystem::inst ().open (filename, mode); +} + +size_t __read (int handle, unsigned char *buffer, size_t size) +{ + return MQX_Filesystem::inst ().read (handle, buffer, size); +} + +size_t __write (int handle, const unsigned char *buffer, size_t size) +{ + return MQX_Filesystem::inst ().write (handle, buffer, size); +} + +long __lseek (int handle, long offset, int whence) +{ + return MQX_Filesystem::inst ().lseek (handle, offset, whence); +} + +int __close (int handle) +{ + return MQX_Filesystem::inst ().close (handle); +} + +} // extern "C" + +#endif // ACE_MQX diff --git a/ACE/ace/MQX_Filesystem.h b/ACE/ace/MQX_Filesystem.h new file mode 100644 index 00000000000..2bc32cb24a4 --- /dev/null +++ b/ACE/ace/MQX_Filesystem.h @@ -0,0 +1,260 @@ +/** + * @file MQX_Filesystem.h + * + * @author Frederick Hornsey <hornseyf@objectcomputing.com> + */ + +#ifndef MQX_FILESYSTEM_HEADER +#define MQX_FILESYSTEM_HEADER + +#include "ace/config-all.h" + +#ifdef ACE_MQX + +#include <mqx.h> +#include <fio.h> + +#if !defined (FOPEN_MAX) +# define FOPEN_MAX 20 +#endif + +#if !defined (ACE_MQX_DLIB_FULL) +# undef read +# undef write +#endif + +struct stat; +typedef struct stat ACE_stat; + +#define ACE_MQX_ABS_PATH_SIZE (IOCFG_FS_MAX_DEVLEN + FS_FILENAME_SIZE - 1) + +/** + * Since MQX has an unusual filesystem API, this class is provided to try to + * normalize it by managing the current working directory on a global context + * instead of a device by device context provided by MQX. It also tries to make + * these functions act more like their UNIX counterparts to some extent. + * + * This class is also the interface between the DLib IO functions and MQX file + * IO. It does this by implementing the classic UNIX IO functions below. + * + * WARNING: This is already being done in the ACE_TMAIN macro, but + * complete_initialization() should be called before using DLib or ACE file IO + * functions, but after MQX has been initialized. Either way, standard streams + * will not work properly, or some other behavior depending on the what + * functions are called in what order. + */ +class MQX_Filesystem { +public: + /// Get the singleton instance of the class + inline static MQX_Filesystem &inst() { + return instance_; + } + + /** + * Initialize the Standard Streams and the Current Filesystem + * + * This must be done after MQX has been initialized. See warning in class + * documenting comment. + */ + void complete_initialization (); + + /** + * Attempt to reset the cwd state by asking MQX for the first valid filesystem + * and "cd-ing" into the root of it. + */ + bool reset_state (); + + /** + * @name Unix-like File Functions + * + * Classic UNIX-like Operations Implemented for for DLib + */ + ///@{ + /** + * Open a file and return the file descriptor. + * + * Returns the file descriptor if successful, -1 otherwise. + * + * Known Limitations: + * - Mode is being converted from DLib Unix-like mode to MQX cstdlib mode. + * This is not perfected yet and is limited by the common denominator of + * what is supported by both systems. + */ + int open (const char *path, int mode); + int close (int fd); + size_t read (int fd, unsigned char *buffer, size_t size); + size_t write (int fd, const unsigned char *buffer, size_t size); + long lseek (int fd, long offset, int whence); + ///@} + + /** + * @name Unix-like Filesystem Functions + */ + ///@{ + /** + * Put the current directory path in buf of size. + * + * Returns NULL if an error occurred, otherwise buf. + */ + char *getcwd (char *buf, size_t size); + + /** + * Create a directory at path. + * + * Returns -1 if an error occurred, otherwise 0. + */ + int mkdir (const char *path); + + /** + * Change to the directory at path. + * + * Returns -1 if an error occurred, otherwise 0. + */ + int chdir (const char *path); + + /** + * Remove the empty directory at path. + * + * Returns -1 if an error occurred, otherwise 0. + */ + int rmdir (const char *path); + + /** + * Unlink the file at path. + * + * Returns -1 if an error occurred, otherwise 0. + */ + int unlink (const char *path); + + /** + * Rename or move the file or rename the directory from newpath to oldpath. + * + * Returns -1 if an error occurred, otherwise 0. + * + * As standard rename does, this sets errno to EXDEV if you try to move a + * file across filesystems. It also overwrites regular files that occupy the + * new path. + * + * Known Limitations: + * - Can only rename directories, will refuse to move them. This is MFS's + * IO_IOCTL_RENAME_FILE refusing to do this. This could be implemented by + * the function, but would involve either manually copying the file tree + * or refusing to move nonempty directories. + */ + int rename (const char *oldpath, const char *newpath); + + /** + * Get status of file given by path. + * + * Returns -1 if an error occurred, otherwise 0. + * + * Known Limitations: + * - st_mtime is currently not implemented and is set to 0. + * - st_mode is limited to + * - S_IFDIR: file is a directory + * - S_IFREG: file is a regular file + */ + int stat (const char * path, ACE_stat *statbuf); + + /** + * Get status of file given by file descriptor. + * + * Returns -1 if an error occurred, otherwise 0. + * + * Known Limitations: + * - st_mtime is currently not implemented and returns 0 + * - In MFS there seems to be no direct way to get st_msize from a MQX file + * alone. The only way to get a file size using the documented API seems + * to be IO_IOCTL_FIND_FIRST_FILE, which requires the path. For now this + * will be set to 0. + * - st_mode is limited to + * - S_IFDIR: file is a directory + * - S_IFREG: file is a regular file + * - S_IFCHR: file is a special character device file, (e.g. ACE_STDOUT) + */ + int fstat (int fd, ACE_stat *statbuf); + ///@} + +private: + /// The singleton instance of the class + static MQX_Filesystem instance_; + + MQX_Filesystem(); + + /** + * @name Current Filesystem for resolving relative paths. + */ + ///@{ + MQX_FILE_PTR current_fs_; + char current_fs_name_[IOCFG_FS_MAX_DEVLEN]; + unsigned current_fs_name_len_; + ///@} + + /** + * @name Manage open files using file descriptors. + */ + ///@{ + struct File { + /// DLib File Descriptor. Invalid if -1. + int fd; + /// MQX File + MQX_FILE_PTR mqx_file; + /// Mark this as special character device file (Standard Streams) + bool chardev_file; + }; + File files_[FOPEN_MAX]; + + /** + * Last file descriptor created. + */ + int last_fd_; + + /** + * Max VALUE for File Descriptors. + * + * NOTE: Max open file count is FOPEN_MAX, defined by DLib. This creates a + * limit on the number of unique file descriptor values. + */ + int max_fd_; + + /** + * Get a File struct for the file descriptor. + * + * Returns NULL and sets EBADF if no such file exists + */ + File *get_file (int fd); + + /** + * Get a File struct pointer to use for a new file. + * + * Returns NULL and sets ENFILE if exceeded max number of open files. + */ + File *get_new_file (); + ///@} + + /** + * Check to see if the current filesystem is valid, if not reset it. + * + * Returns true if reseting failed, otherwise false. Failure would probably + * mean no filesystems are mounted. + */ + bool check_state (); + + /** + * Set the supplied pointer as the filesystem of the current working + * directory. + */ + void update_fs (MQX_FILE_PTR fs); + + /** + * Resolve the filesystem of the supplied path and return it. + * + * This will be the filesystem of the current working directory if the path + * is relative. Sets the fs_name_len to the length of the device name in the + * path. This would be 0 if the path is relative. + */ + MQX_FILE_PTR resolve_fs (const char *path, int *fs_name_len); +}; + +#endif // ACE_MQX +#endif // MQX_FILESYSTEM_HEADER diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index 8a052271775..5fbdf5add9b 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -17,6 +17,9 @@ #include "ace/Thread_Mutex.h" #include "ace/Condition_Thread_Mutex.h" #include "ace/Guard_T.h" +#ifdef ACE_HAS_GETTID +# include "ace/OS_NS_sys_resource.h" // syscall for gettid impl +#endif extern "C" void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args) @@ -1153,7 +1156,7 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv) result = -1; // Wait for all the awakened threads to acquire their part of // the counting semaphore. -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) || defined (ACE_MQX) else if (ACE_OS::sema_wait (&cv->waiters_done_) == -1) # else else if (ACE_OS::event_wait (&cv->waiters_done_) == -1) @@ -1177,7 +1180,7 @@ ACE_OS::cond_destroy (ACE_cond_t *cv) # if defined (ACE_HAS_THREADS) # if defined (ACE_HAS_WTHREADS) ACE_OS::event_destroy (&cv->waiters_done_); -# elif defined (ACE_VXWORKS) +# elif defined (ACE_VXWORKS) || defined (ACE_MQX) ACE_OS::sema_destroy (&cv->waiters_done_); # endif /* ACE_VXWORKS */ int result = 0; @@ -1227,7 +1230,7 @@ ACE_OS::cond_init (ACE_cond_t *cv, short type, const char *name, void *arg) result = -1; else if (ACE_OS::thread_mutex_init (&cv->waiters_lock_) == -1) result = -1; -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) || defined (ACE_MQX) else if (ACE_OS::sema_init (&cv->waiters_done_, 0, type) == -1) # else else if (ACE_OS::event_init (&cv->waiters_done_) == -1) @@ -1257,7 +1260,7 @@ ACE_OS::cond_init (ACE_cond_t *cv, short type, const wchar_t *name, void *arg) result = -1; else if (ACE_OS::thread_mutex_init (&cv->waiters_lock_) == -1) result = -1; -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) || defined (ACE_MQX) else if (ACE_OS::sema_init (&cv->waiters_done_, 0, type) == -1) # else else if (ACE_OS::event_init (&cv->waiters_done_) == -1) @@ -1388,7 +1391,7 @@ ACE_OS::cond_wait (ACE_cond_t *cv, // If we're the last waiter thread during this particular broadcast // then let all the other threads proceed. else if (last_waiter) -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) || defined (ACE_MQX) ACE_OS::sema_post (&cv->waiters_done_); # else ACE_OS::event_signal (&cv->waiters_done_); @@ -1416,7 +1419,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, // Handle the easy case first. if (timeout == 0) return ACE_OS::cond_wait (cv, external_mutex); -# if defined (ACE_HAS_WTHREADS) || defined (ACE_VXWORKS) +# if defined (ACE_HAS_WTHREADS) || defined (ACE_VXWORKS) || defined (ACE_MQX) // Prevent race conditions on the <waiters_> count. if (ACE_OS::thread_mutex_lock (&cv->waiters_lock_) != 0) @@ -1478,6 +1481,8 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, int const ticks_per_sec = ::sysClkRateGet (); int const ticks = msec_timeout * ticks_per_sec / ACE_ONE_SECOND_IN_MSECS; result = ::semTake (cv->sema_.sema_, ticks); +# else + result = ACE_OS::sema_wait (&cv->sema_, timeout); # endif /* ACE_WIN32 || VXWORKS */ } @@ -4806,6 +4811,16 @@ ACE_OS::unique_name (const void *object, } #endif +pid_t +ACE_OS::thr_gettid () +{ +#ifdef ACE_HAS_GETTID + return syscall (SYS_gettid); +#else + ACE_NOTSUP_RETURN (-1); +#endif +} + ACE_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_VXWORKS) && !defined (__RTP__) diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h index f932a701cea..98a24079307 100644 --- a/ACE/ace/OS_NS_Thread.h +++ b/ACE/ace/OS_NS_Thread.h @@ -356,7 +356,7 @@ public: /// Queue up threads waiting for the condition to become signaled. ACE_sema_t sema_; -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS) || defined (ACE_MQX) /** * A semaphore used by the broadcast/signal thread to wait for all * the waiting thread(s) to wake up and be released from the @@ -391,10 +391,12 @@ struct ACE_Export ACE_condattr_t int type; }; +#if !defined (ACE_MQX) struct ACE_Export ACE_mutexattr_t { int type; }; +#endif ACE_END_VERSIONED_NAMESPACE_DECL @@ -1754,6 +1756,26 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION ssize_t thr_id (char buffer[], size_t buffer_length); + /** + * For systems that support it (Only Linux as of writing), this is a wrapper + * for pid_t gettid(). + * + * It returns the system-wide thread id (TID) for the current thread. These + * are similar to PIDs and, for x86 Linux at least, are much shorter than + * what is returned from thr_self(), which is an address. + * + * For older Linux (pre 2.4.11) and other systems that don't have gettid(), + * this uses ACE_NOTSUP_RETURN (-1). + */ + pid_t thr_gettid (); + + /** + * Puts the string representation of pid_t thr_gettid() into the buffer and + * returns number of bytes added. + */ + ACE_NAMESPACE_INLINE_FUNCTION + ssize_t thr_gettid (char buffer[], size_t buffer_length); + /// State is THR_CANCEL_ENABLE or THR_CANCEL_DISABLE ACE_NAMESPACE_INLINE_FUNCTION int thr_setcancelstate (int new_state, int *old_state); diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index d4023d05704..65a7fba0482 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -1679,6 +1679,7 @@ ACE_OS::sema_init (ACE_sema_t *s, # if defined (ACE_LACKS_NAMED_POSIX_SEM) s->new_sema_ = true; # endif /* ACE_LACKS_NAMED_POSIX_SEM */ + ACE_OS::memset(s->sema_, 0, sizeof(*s->sema_)); ACE_OSCALL_RETURN (::sem_init (s->sema_, type != USYNC_THREAD, count), int, -1); @@ -3184,6 +3185,13 @@ ACE_OS::thr_id (char buffer[], size_t buffer_length) #endif /* WIN32 */ } +ACE_INLINE ssize_t +ACE_OS::thr_gettid (char buffer[], size_t buffer_length) +{ + return ACE_OS::snprintf (buffer, buffer_length, "%d", + static_cast<int> (ACE_OS::thr_gettid ())); +} + ACE_INLINE ACE_thread_t ACE_OS::thr_self (void) { diff --git a/ACE/ace/OS_NS_dirent.inl b/ACE/ace/OS_NS_dirent.inl index 6e31c21a13e..145ccb17970 100644 --- a/ACE/ace/OS_NS_dirent.inl +++ b/ACE/ace/OS_NS_dirent.inl @@ -14,7 +14,7 @@ ACE_INLINE void closedir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) -# if defined (ACE_WIN32) && defined (ACE_LACKS_CLOSEDIR) +# if (defined (ACE_WIN32) || defined (ACE_MQX)) && defined (ACE_LACKS_CLOSEDIR) ACE_OS::closedir_emulation (d); delete [] d->directory_name_; delete d; @@ -33,7 +33,7 @@ ACE_INLINE ACE_DIR * opendir (const ACE_TCHAR *filename) { #if defined (ACE_HAS_DIRENT) -# if defined (ACE_WIN32) && defined (ACE_LACKS_OPENDIR) +# if (defined (ACE_WIN32) || defined(ACE_MQX)) && defined (ACE_LACKS_OPENDIR) return ::ACE_OS::opendir_emulation (filename); # elif defined (ACE_HAS_WOPENDIR) && defined (ACE_USES_WCHAR) return ::wopendir (filename); @@ -52,7 +52,7 @@ ACE_INLINE struct ACE_DIRENT * readdir (ACE_DIR *d) { #if defined (ACE_HAS_DIRENT) -# if defined (ACE_WIN32) && defined (ACE_LACKS_READDIR) +# if (defined (ACE_WIN32) || defined (ACE_MQX)) && defined (ACE_LACKS_READDIR) return ACE_OS::readdir_emulation (d); # elif defined (ACE_HAS_WREADDIR) && defined (ACE_USES_WCHAR) return ::wreaddir (d); diff --git a/ACE/ace/OS_NS_errno.cpp b/ACE/ace/OS_NS_errno.cpp index f84975d40af..537b3259257 100644 --- a/ACE/ace/OS_NS_errno.cpp +++ b/ACE/ace/OS_NS_errno.cpp @@ -5,3 +5,146 @@ # include "ace/OS_NS_errno.inl" #endif /* ACE_HAS_INLINED_OSCALLS */ + +#ifdef ACE_MQX +int +ACE_OS::mqx_error_to_errno(int mqx_error) +{ + switch (mqx_error) + { + // Not really an error. + case FS_EOF: + return 0; + + case FS_INVALID_FUNCTION_CODE: + case FS_INVALID_PARAMETER: + case FS_INVALID_HANDLE: + case FS_ERROR_INVALID_DRIVE_HANDLE: + case FS_ERROR_INVALID_FILE_HANDLE: + case MQX_INVALID_POINTER: + case MQX_INVALID_PARAMETER: + case FS_INVALID_MEMORY_BLOCK_ADDRESS: + case MQX_INVALID_SIZE: + case MQX_INVALID_MEMORY_BLOCK: + case MQX_INVALID_TASK_PRIORITY: + case MQX_INVALID_TASK_STATE: + case MQX_INVALID_TASK_ID: + case MQX_INVALID_PROCESSOR_NUMBER: + case MQX_INVALID_VECTORED_INTERRUPT: + case MQX_INVALID_TEMPLATE_INDEX: + case MQX_INVALID_CONFIGURATION: + case MQX_INVALID_COMPONENT_HANDLE: + case MQX_INVALID_COMPONENT_BASE: + case MQX_INVALID_COMPONENT_NAME: + case MQX_INVALID_HANDLE: + case MQX_INVALID_TASK_QUEUE: + case MQX_INVALID_LWSEM: + case MQX_SCHED_INVALID_POLICY: + case MQX_SCHED_INVALID_PARAMETER_PTR: + case MQX_SCHED_INVALID_PARAMETER: + case MQX_SCHED_INVALID_TASK_ID: + case MQX_INVALID_IO_CHANNEL: + case MQX_INVALID_DEVICE: + case MQX_INVALID_CLOCK_SPEED: + case MQX_IPC_INVALID_MESSAGE: + case MQX_MEM_POOL_INVALID: + case MQX_LWMEM_POOL_INVALID: + case MQX_LWEVENT_INVALID: + case MQX_LWTIMER_INVALID: + return EINVAL; + case FS_FILE_NOT_FOUND: + case FS_PATH_NOT_FOUND: + return ENOENT; + case FS_ACCESS_DENIED: + case FS_OPERATION_NOT_ALLOWED: + case FS_SHARING_VIOLATION: + case MQX_NOT_RESOURCE_OWNER: + case MQX_ACCESS_ERROR: + return EPERM; + case FS_INSUFFICIENT_MEMORY: + case FS_PMGR_INSUF_MEMORY: + case MQX_OUT_OF_MEMORY: + case MQX_KERNEL_MEMORY_TOO_SMALL: + case MQX_MEM_POOL_TOO_SMALL: + case MQX_OUT_OF_MMU_PAGE_TABLES: + return ENOMEM; + case FS_FILE_EXISTS: + case MQX_COMPONENT_EXISTS: + case MQX_IPC_ROUTE_EXISTS: + case MQX_MMU_CONTEXT_EXISTS: + case FS_ALREADY_ASSIGNED: + return EEXIST; + case FS_DISK_FULL: + case FS_ROOT_DIR_FULL: + return ENOSPC; + case FS_DISK_IS_WRITE_PROTECTED: + return EROFS; + case FS_BAD_DISK_UNIT: + case FS_INVALID_LENGTH_IN_DISK_OPERATION: + case FS_NOT_A_DOS_DISK: + case FS_SECTOR_NOT_FOUND: + case FS_WRITE_FAULT: + case FS_READ_FAULT: + case FS_NOT_INITIALIZED: + case FS_ERROR_UNKNOWN_FS_VERSION: + case FS_LOST_CHAIN: + case FS_INVALID_DEVICE: + case FS_INVALID_CLUSTER_NUMBER: + case FS_FAILED_TO_DELETE_LFN: + case FS_BAD_LFN_ENTRY: + case FS_PMGR_INVALID_PARTITION: + case FS_PMGR_UNKNOWN_PARTITION: + case FS_PMGR_INVALID_PARTTABLE: + case FS_PMGR_EXFAT_PARTITION: + case MQX_IO_OPERATION_NOT_AVAILABLE: + return EIO; + case FS_CANNOT_CREATE_DIRECTORY: + return ENOTDIR; + case MQX_LWSEM_WAIT_TIMEOUT: + return ETIME; + + // These seem like generic errors + case MQX_MMU_ERROR: + case MQX_ERROR: + + // Need more info to categorize + case FS_ATTEMPT_TO_REMOVE_CURRENT_DIR: + case MQX_INVALID_CHECKSUM: + case MQX_OUT_OF_TASK_DESCRIPTORS: + case MQX_CANNOT_CALL_FUNCTION_FROM_ISR: + case MQX_TASK_QUEUE_EMPTY: + case MQX_NO_TASK_TEMPLATE: + case MQX_COMPONENT_DOES_NOT_EXIST: + case MQX_COULD_NOT_CREATE_IPC_TASK: + case MQX_TOO_MANY_PRIORITY_LEVELS: + case MQX_TOO_MANY_INTERRUPTS: + case MQX_DUPLICATE_TASK_TEMPLATE_INDEX: + case MQX_TIMER_ISR_INSTALL_FAIL: + case MQX_INTER_PROCESSOR_INIT_FAILED: + case MQX_IPC_SERVICE_NOT_AVAILABLE: + case MQX_MMU_CONTEXT_DOES_NOT_EXIST: + case MQX_MMU_PARENT_TASK_CANNOT_BE_MMU: + case MQX_RTC_UNLOCK_FAILED: + case MQX_NO_USER_TASKS: + case MQX_TOO_MANY_USER_TASKS: + case MQX_TASKQ_CREATE_FAILED: + case MQX_INVALD_INT_ENABLE: + case MQX_UNABLE_TO_CREATE_COMPONENT: + case MQX_CLOCK_TRIM_FAILED: + + /* These are serious and should definitely return EFAULT unless there is a + * more appropriate error code. + */ + case MQX_CORRUPT_MEMORY_SYSTEM: + case MQX_CORRUPT_STORAGE_POOL: + case MQX_CORRUPT_STORAGE_POOL_FREE_LIST: + case MQX_CORRUPT_STORAGE_POOL_POINTERS: + case MQX_CORRUPT_QUEUE: + case MQX_CORRUPT_INTERRUPT_STACK: + case MQX_UNHANDLED_INTERRUPT: + + default: + return EFAULT; + } +} +#endif diff --git a/ACE/ace/OS_NS_errno.h b/ACE/ace/OS_NS_errno.h index 821bb7d09a8..a240a7fa9ff 100644 --- a/ACE/ace/OS_NS_errno.h +++ b/ACE/ace/OS_NS_errno.h @@ -47,6 +47,10 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION int set_errno_to_wsa_last_error (void); +#ifdef ACE_MQX + int mqx_error_to_errno(int mqx_error); +#endif + } /* namespace ACE_OS */ #if defined (ACE_HAS_WINCE_BROKEN_ERRNO) diff --git a/ACE/ace/OS_NS_fcntl.cpp b/ACE/ace/OS_NS_fcntl.cpp index 54786876551..d530a27ecc8 100644 --- a/ACE/ace/OS_NS_fcntl.cpp +++ b/ACE/ace/OS_NS_fcntl.cpp @@ -125,6 +125,10 @@ ACE_OS::open (const char *filename, else { ACE_OSCALL_RETURN (::open (filename, mode, perms), ACE_HANDLE, -1); } +#elif defined (ACE_MQX) + ACE_UNUSED_ARG (perms); + ACE_UNUSED_ARG (sa); + return MQX_Filesystem::inst ().open (filename, mode); #else ACE_UNUSED_ARG (sa); ACE_OSCALL_RETURN (::open (filename, mode, perms), ACE_HANDLE, ACE_INVALID_HANDLE); diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h index 8895c77b018..a7705077d04 100644 --- a/ACE/ace/OS_NS_stdio.h +++ b/ACE/ace/OS_NS_stdio.h @@ -26,6 +26,7 @@ #include "ace/os_include/os_stdio.h" #include "ace/os_include/os_fcntl.h" #include "ace/os_include/os_inttypes.h" +#include "ace/os_include/os_errno.h" #include /**/ "ace/ACE_export.h" /* OPENVMS needs unistd for cuserid() */ @@ -126,6 +127,9 @@ inline ACE_HANDLE ace_fileno_helper (FILE *fp) # if defined (fileno) return (ACE_HANDLE)fileno (fp); # undef fileno +# elif defined (ACE_LACKS_FILENO) + ACE_UNUSED_ARG (fp); + ACE_NOTSUP_RETURN (ACE_INVALID_HANDLE); # else return (ACE_HANDLE)(intptr_t)ACE_STD_NAMESPACE::fileno (fp); # endif /* defined (fileno) */ diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index 28da671eae6..57349ea9873 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -17,6 +17,10 @@ # include "ace/Malloc_Base.h" #endif /* ACE_HAS_ALLOC_HOOKS */ +#ifdef ACE_MQX +# include "ace/MQX_Filesystem.h" +#endif + /*****************************************************************************/ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -752,6 +756,11 @@ ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) ACE_TEXT_ALWAYS_WCHAR (mode), stream), FILE *, 0); +#elif defined (ACE_LACKS_FREOPEN) + ACE_UNUSED_ARG (filename); + ACE_UNUSED_ARG (mode); + ACE_UNUSED_ARG (stream); + ACE_NOTSUP_RETURN (0); #else ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::freopen (ACE_TEXT_ALWAYS_CHAR (filename), @@ -895,6 +904,8 @@ ACE_OS::rename (const char *old_name, if (::MoveFileExA (old_name, new_name, flags) == 0) ACE_FAIL_RETURN (-1); return 0; +#elif defined (ACE_RENAME_EQUIVALENT) + ACE_OSCALL_RETURN (ACE_RENAME_EQUIVALENT (old_name, new_name), int, -1); # else ACE_UNUSED_ARG (flags); ACE_OSCALL_RETURN (::rename (old_name, new_name), int, -1); @@ -941,7 +952,7 @@ ACE_OS::rename (const wchar_t *old_name, ACE_INLINE void ACE_OS::rewind (FILE *fp) { -#if !defined (ACE_HAS_WINCE) +#if !defined (ACE_HAS_WINCE) && !defined (ACE_MQX) ACE_OS_TRACE ("ACE_OS::rewind"); # if defined (ACE_LACKS_REWIND) ACE_UNUSED_ARG (fp); diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl index cb59874b3cf..26fa3b0ab93 100644 --- a/ACE/ace/OS_NS_stdlib.inl +++ b/ACE/ace/OS_NS_stdlib.inl @@ -27,6 +27,8 @@ ACE_OS::_exit (int status) ::exit (status); #elif defined (ACE_HAS_WINCE) ::TerminateProcess (::GetCurrentProcess (), status); +#elif defined (ACE_MQX) + _mqx_exit (status); #elif !defined (ACE_LACKS__EXIT) ::_exit (status); #else diff --git a/ACE/ace/OS_NS_stropts.inl b/ACE/ace/OS_NS_stropts.inl index 919ac531c0e..6f433a441ce 100644 --- a/ACE/ace/OS_NS_stropts.inl +++ b/ACE/ace/OS_NS_stropts.inl @@ -123,6 +123,9 @@ ACE_OS::ioctl (ACE_HANDLE handle, #elif defined (ACE_HAS_IOCTL_INT_3_PARAM) ACE_OSCALL_RETURN (::ioctl (handle, cmd, reinterpret_cast<int> (val)), int, -1); +#elif defined (ACE_MQX) + // TBD: See if there is a way to provide this functionality + ACE_NOTSUP_RETURN (0); #else ACE_OSCALL_RETURN (::ioctl (handle, cmd, val), int, -1); #endif /* ACE_WIN32 */ diff --git a/ACE/ace/OS_NS_sys_select.inl b/ACE/ace/OS_NS_sys_select.inl index 396ffe729ca..a7dfcc462b0 100644 --- a/ACE/ace/OS_NS_sys_select.inl +++ b/ACE/ace/OS_NS_sys_select.inl @@ -35,6 +35,9 @@ ACE_OS::select (int width, ACE_UNUSED_ARG (efds); ACE_UNUSED_ARG (timeout); ACE_NOTSUP_RETURN (-1); +#elif defined (ACE_MQX) + ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, timeout->msec()), + int, -1); #else ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, timep), int, -1); @@ -61,6 +64,9 @@ ACE_OS::select (int width, ACE_UNUSED_ARG (efds); ACE_UNUSED_ARG (timeout); ACE_NOTSUP_RETURN (-1); +#elif defined (ACE_MQX) + ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, timeout.msec()), + int, -1); #else ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, ___ACE_TIMEOUT), int, -1); diff --git a/ACE/ace/OS_NS_sys_socket.inl b/ACE/ace/OS_NS_sys_socket.inl index 3055da01876..54aa02395c3 100644 --- a/ACE/ace/OS_NS_sys_socket.inl +++ b/ACE/ace/OS_NS_sys_socket.inl @@ -128,7 +128,7 @@ ACE_INLINE int ACE_OS::closesocket (ACE_HANDLE handle) { ACE_OS_TRACE ("ACE_OS::closesocket"); -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) || defined (ACE_MQX) // @note Do not shutdown the write end here. Doing so will break // applications that duplicate a handle on fork(), for // example, and expect to continue writing in the fork()ed @@ -274,6 +274,10 @@ ACE_OS::getsockname (ACE_HANDLE handle, #endif /* ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO */ } +#if !defined(ACE_SOCKOPT_LEN) +#define ACE_SOCKOPT_LEN ACE_SOCKET_LEN +#endif + ACE_INLINE int ACE_OS::getsockopt (ACE_HANDLE handle, int level, @@ -294,7 +298,7 @@ ACE_OS::getsockopt (ACE_HANDLE handle, level, optname, optval, - (ACE_SOCKET_LEN *) optlen), + (ACE_SOCKOPT_LEN *) optlen), int, -1); #endif /* ACE_LACKS_GETSOCKOPT */ @@ -589,7 +593,11 @@ ACE_OS::send (ACE_HANDLE handle, const char *buf, size_t len, int flags) return result; #else +# if defined (ACE_MQX) + ssize_t const ace_result_ = ::send ((ACE_SOCKET) handle, (void*)buf, len, flags); +#else ssize_t const ace_result_ = ::send ((ACE_SOCKET) handle, buf, len, flags); +#endif # if !(defined (EAGAIN) && defined (EWOULDBLOCK) && EAGAIN == EWOULDBLOCK) // Optimize this code out if we can detect that EAGAIN == @@ -686,6 +694,14 @@ ACE_OS::sendto (ACE_HANDLE handle, const_cast<struct sockaddr *> (addr), addrlen), ssize_t, -1); +#elif defined (ACE_MQX) + ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, + (void*)buf, + len, + flags, + const_cast<struct sockaddr *> (addr), + addrlen), + ssize_t, -1); #else ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, buf, @@ -823,6 +839,40 @@ ACE_OS::sendv (ACE_HANDLE handle, return (ssize_t) bytes_sent; +#elif defined (ACE_MQX) + ssize_t bytes_sent = 0; + for (int i = 0; i < n; ++i) + { + ssize_t result = ACE_OS::send (handle, buffers[i].iov_base, + buffers[i].iov_len, 0); + + if (result == -1) + { + // There is a subtle difference in behaviour depending on + // whether or not any data was sent. If no data was sent, + // then always return -1. Otherwise return bytes_sent. + // This gives the caller an opportunity to keep track of + // bytes that have already been sent. + if (bytes_sent > 0) + break; + else + { + // errno should already be set from the ACE_OS::send call. + return -1; + } + } + else + { + // Gets ignored on error anyway + bytes_sent += result; + + // If the transfer isn't complete just drop out of the loop. + if (result < buffers[i].iov_len) + break; + } + } + + return bytes_sent; #elif defined (ACE_HAS_SOCK_BUF_SIZE_MAX) // Platform limits the maximum socket message size. Pare down the diff --git a/ACE/ace/OS_NS_sys_stat.inl b/ACE/ace/OS_NS_sys_stat.inl index 93e321dd177..cd0ef6eb770 100644 --- a/ACE/ace/OS_NS_sys_stat.inl +++ b/ACE/ace/OS_NS_sys_stat.inl @@ -4,6 +4,10 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_macros.h" +#ifdef ACE_MQX +# include "ace/MQX_Filesystem.h" +#endif + ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE_OS @@ -13,7 +17,7 @@ namespace ACE_OS creat (const ACE_TCHAR *filename, mode_t mode) { ACE_OS_TRACE ("ACE_OS::creat"); -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) || defined (ACE_MQX) return ACE_OS::open (filename, O_CREAT|O_TRUNC|O_WRONLY, mode); #else ACE_OSCALL_RETURN (::creat (ACE_TEXT_ALWAYS_CHAR (filename), mode), @@ -56,14 +60,18 @@ namespace ACE_OS (fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? S_IFDIR : S_IFREG); } return 0; +#elif defined (ACE_LACKS_FSTAT) + ACE_NOTSUP_RETURN (-1); +#elif defined (ACE_MQX) + return MQX_Filesystem::inst ().fstat (handle, stp); #else -# if defined (ACE_OPENVMS) +# if defined (ACE_OPENVMS) //FUZZ: disable check_for_lack_ACE_OS ::fsync(handle); //FUZZ: enable check_for_lack_ACE_OS - #endif +# endif ACE_OSCALL_RETURN (::fstat (handle, stp), int, -1); -# endif /* !ACE_HAS_X86_STAT_MACROS */ +#endif /* !ACE_HAS_X86_STAT_MACROS */ } // This function returns the number of bytes in the file referenced by @@ -197,6 +205,8 @@ namespace ACE_OS ACE_OS_TRACE ("ACE_OS::stat"); #if defined (ACE_HAS_NONCONST_STAT) ACE_OSCALL_RETURN (::stat (const_cast <char *> (file), stp), int, -1); +#elif defined (ACE_LACKS_STAT) + ACE_NOTSUP_RETURN (-1); #elif defined (ACE_HAS_WINCE) ACE_TEXT_WIN32_FIND_DATA fdata; @@ -229,6 +239,8 @@ namespace ACE_OS // Solaris for intel uses an macro for stat(), this macro is a // wrapper for _xstat(). ACE_OSCALL_RETURN (::_xstat (_STAT_VER, file, stp), int, -1); +#elif defined (ACE_MQX) + return MQX_Filesystem::inst ().stat (file, stp); #else ACE_OSCALL_RETURN (ACE_STAT_FUNC_NAME (file, stp), int, -1); #endif /* ACE_HAS_NONCONST_STAT */ diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl index acaf2f9f424..488e6a1f205 100644 --- a/ACE/ace/OS_NS_sys_time.inl +++ b/ACE/ace/OS_NS_sys_time.inl @@ -13,7 +13,7 @@ ACE_OS::gettimeofday (void) { // ACE_OS_TRACE ("ACE_OS::gettimeofday"); -#if !defined (ACE_WIN32) +#if !defined (ACE_WIN32) && !defined (ACE_LACKS_GETTIMEOFDAY) timeval tv; int result = 0; #endif // !defined (ACE_WIN32) @@ -59,6 +59,11 @@ ACE_OS::gettimeofday (void) ACE_OSCALL (ACE_OS::clock_gettime (CLOCK_REALTIME, &ts), int, -1, result); tv.tv_sec = ts.tv_sec; tv.tv_usec = ts.tv_nsec / 1000L; // timespec has nsec, but timeval has usec +# elif defined (ACE_MQX) + TIME_STRUCT ts; + _time_get(&ts); + tv.tv_sec = ts.SECONDS; + tv.tv_usec = ts.MILLISECONDS * 1000; # else # if defined (ACE_LACKS_GETTIMEOFDAY) ACE_NOTSUP_RETURN (ACE_Time_Value ((time_t)-1)); @@ -67,7 +72,7 @@ ACE_OS::gettimeofday (void) # endif /* ACE_LACKS_GETTIMEOFDAY */ # endif /* ACE_HAS_SVR4_GETTIMEOFDAY */ #endif /* 0 */ -#if !defined (ACE_WIN32) +#if !defined (ACE_WIN32) && !defined (ACE_LACKS_GETTIMEOFDAY) if (result == -1) return ACE_Time_Value ((time_t)-1); else diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index 1bf7a4cdc4b..f316b888c51 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -357,7 +357,7 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) switch (result) { - case -1: + case static_cast<pid_t>(-1): // Error. return -1; case 0: diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 9019916acae..035f19baf11 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -28,6 +28,10 @@ # endif #endif +#ifdef ACE_MQX +# include "ace/MQX_Filesystem.h" +#endif + ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE int @@ -191,6 +195,8 @@ ACE_OS::close (ACE_HANDLE handle) ACE_OS_TRACE ("ACE_OS::close"); #if defined (ACE_WIN32) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (handle), ace_result_), int, -1); +#elif defined (ACE_MQX) + return MQX_Filesystem::inst ().close (handle); #else ACE_OSCALL_RETURN (::close (handle), int, -1); #endif /* ACE_WIN32 */ @@ -397,6 +403,8 @@ ACE_OS::ftruncate (ACE_HANDLE handle, ACE_OFF_T offset) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle), ace_result_), int, -1); else ACE_FAIL_RETURN (-1); +#elif defined (ACE_LACKS_FTRUNCATE) + ACE_NOTSUP_RETURN (-1); #else ACE_OSCALL_RETURN (::ftruncate (handle, offset), int, -1); #endif /* ACE_WIN32 */ @@ -410,12 +418,10 @@ ACE_OS::getcwd (char *buf, size_t size) ACE_UNUSED_ARG (buf); ACE_UNUSED_ARG (size); ACE_NOTSUP_RETURN (0); -#elif defined (ACE_WIN32) -# if defined (ACE_GETCWD_EQUIVALENT) +#elif defined (ACE_GETCWD_EQUIVALENT) return ACE_GETCWD_EQUIVALENT (buf, static_cast<int> (size)); -# else +#elif defined (ACE_WIN32) return ::getcwd (buf, static_cast<int> (size)); -# endif #else ACE_OSCALL_RETURN (::getcwd (buf, size), char *, 0); #endif /* ACE_LACKS_GETCWD */ @@ -573,6 +579,17 @@ ACE_OS::hostname (char name[], size_t maxnamelen) LPDWORD (&maxnamelen)), ace_result_), int, -1); } +#elif defined (ACE_MQX) + const int enet_device = 0; + IPCFG_IP_ADDRESS_DATA ip_data; + if (ipcfg_get_ip (enet_device, &ip_data)) + { + ACE_OS::snprintf(name, maxnamelen, "%d.%d.%d.%d", IPBYTES(ip_data.ip)); + return 0; + } + return -1; +#elif defined (ACE_LACKS_GETHOSTNAME) + ACE_NOTSUP_RETURN (-1); #else /* ACE_HAS_PHARLAP */ ACE_utsname host_info; @@ -675,6 +692,23 @@ ACE_OS::lseek (ACE_HANDLE handle, ACE_OFF_T offset, int whence) ACE_FAIL_RETURN (static_cast<ACE_OFF_T> (-1)); else return result; +#elif defined (ACE_MQX) + switch (whence) + { + case SEEK_SET: + whence = IO_SEEK_SET; + break; + case SEEK_CUR: + whence = IO_SEEK_CUR; + break; + case SEEK_END: + whence = IO_SEEK_END; + break; + default: + errno = EINVAL; + return static_cast<ACE_OFF_T> (-1); + } + return static_cast<ACE_OFF_T> (MQX_Filesystem::inst ().lseek (handle, offset, whence)); #else ACE_OSCALL_RETURN (::lseek (handle, offset, whence), ACE_OFF_T, -1); #endif /* ACE_WIN32 */ @@ -737,6 +771,10 @@ ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len) return (ssize_t) ok_len; else ACE_FAIL_RETURN (-1); + +#elif defined (ACE_MQX) + return MQX_Filesystem::inst ().read (handle, reinterpret_cast<unsigned char *> (buf), len); + #else ssize_t result; @@ -945,6 +983,9 @@ ACE_OS::sleep (u_int seconds) #elif defined (ACE_WIN32) ::Sleep (seconds * ACE_ONE_SECOND_IN_MSECS); return 0; +#elif defined (ACE_MQX) + _time_delay (seconds * ACE_ONE_SECOND_IN_MSECS); + return 0; #else ACE_OSCALL_RETURN (::sleep (seconds), int, -1); #endif /* ACE_WIN32 */ @@ -957,6 +998,9 @@ ACE_OS::sleep (const ACE_Time_Value &tv) #if defined (ACE_WIN32) ::Sleep (tv.msec ()); return 0; +#elif defined (ACE_MQX) + _time_delay (tv.msec ()); + return 0; #elif defined (ACE_HAS_CLOCK_GETTIME) timespec_t rqtp = tv; //FUZZ: disable check_for_lack_ACE_OS @@ -1220,6 +1264,8 @@ ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte) return (ssize_t) bytes_written; else ACE_FAIL_RETURN (-1); +#elif defined (ACE_MQX) + return MQX_Filesystem::inst ().write (handle, reinterpret_cast<const unsigned char *> (buf), nbyte); #else # if defined (ACE_HAS_CHARPTR_SOCKOPT) ACE_OSCALL_RETURN (::write (handle, static_cast <char *> (const_cast <void *> (buf)), nbyte), ssize_t, -1); diff --git a/ACE/ace/OS_main.h b/ACE/ace/OS_main.h index b1ffac914a5..4dd48ffa794 100644 --- a/ACE/ace/OS_main.h +++ b/ACE/ace/OS_main.h @@ -23,6 +23,10 @@ # pragma once # endif /* ACE_LACKS_PRAGMA_ONCE */ +#if defined (ACE_MQX) +# include "ace/MQX_Filesystem.h" +#endif + # if !defined (ACE_DOESNT_DEFINE_MAIN) # if defined (ACE_HAS_RTEMS) @@ -55,7 +59,7 @@ extern char* rtems_progname; return ace_main_i (argc, wide_argv.get_TCHAR_argv ()); \ } \ int ace_main_i -# else +# elif !defined (ACE_MQX) # define ACE_TMAIN main # endif /* ACE_USES_WCHAR */ # endif @@ -301,6 +305,31 @@ int ace_main_i # endif /* ACE_PSOSIM */ # endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ +# ifdef ACE_MQX +# include <iar_dynamic_init.h> +# include "ace/MQX_Filesystem.h" +# define ACE_TMAIN \ +ace_main_i(int argc, ACE_TCHAR *argv[]); \ +static void main_task(uint32_t param) { \ + __iar_dynamic_initialization(); \ + RTCS_create(); \ + MQX_Filesystem::inst ().complete_initialization (); \ + ace_main_i(0, 0); \ +} \ +static TASK_TEMPLATE_STRUCT MQX_template_list[] = { \ + {1, main_task, 25000, 9, "Main", MQX_AUTO_START_TASK, 0, 0 }, { 0 } \ +}; \ +static const MQX_INITIALIZATION_STRUCT MQX_init_struct = { \ + BSP_DEFAULT_PROCESSOR_NUMBER, BSP_DEFAULT_START_OF_KERNEL_MEMORY, \ + BSP_DEFAULT_END_OF_KERNEL_MEMORY, BSP_DEFAULT_INTERRUPT_STACK_SIZE, \ + MQX_template_list, BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX, \ + BSP_DEFAULT_MAX_MSGPOOLS, BSP_DEFAULT_MAX_MSGQS, \ + BSP_DEFAULT_IO_CHANNEL, (char const*)BSP_DEFAULT_IO_OPEN_MODE, 0, 0 \ +}; \ +int main() { return _mqx( (MQX_INITIALIZATION_STRUCT_PTR) &MQX_init_struct ); } \ +int ace_main_i +# endif /* ACE_MQX */ + #endif /* ACE_DOESNT_DEFINE_MAIN */ # include /**/ "ace/post.h" diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index 6cf5433c0e0..ed29ffd5c5a 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -453,7 +453,7 @@ ACE_Process::spawn (ACE_Process_Options &options) switch (this->child_id_) { - case -1: + case static_cast<pid_t>(-1): // Error. return ACE_INVALID_PID; case 0: diff --git a/ACE/ace/SOCK_Dgram.cpp b/ACE/ace/SOCK_Dgram.cpp index 3c5d4739922..95b213b24d3 100644 --- a/ACE/ace/SOCK_Dgram.cpp +++ b/ACE/ace/SOCK_Dgram.cpp @@ -466,13 +466,16 @@ ssize_t ACE_SOCK_Dgram::recv (iovec iov[], int n, ACE_Addr &addr, - int flags) const + int flags, + ACE_INET_Addr *to_addr) const { ACE_TRACE ("ACE_SOCK_Dgram::recv"); ssize_t length = 0; int i; + ACE_UNUSED_ARG (to_addr); + for (i = 0; i < n; i++) #if ! (defined(__BORLANDC__) || defined(ACE_LINUX) || defined(ACE_HAS_RTEMS)) // The iov_len is unsigned on Linux, RTEMS and with Borland. If we go diff --git a/ACE/ace/SOCK_SEQPACK_Association.cpp b/ACE/ace/SOCK_SEQPACK_Association.cpp index 8c3f2a001cf..e1921645f2a 100644 --- a/ACE/ace/SOCK_SEQPACK_Association.cpp +++ b/ACE/ace/SOCK_SEQPACK_Association.cpp @@ -49,10 +49,8 @@ ACE_SOCK_SEQPACK_Association::abort (void) // setsockopt() SO_LINGER configures socket to reap immediately. // Normal close then aborts the association. // - linger slinger; - + linger slinger = { 0, 0 }; slinger.l_onoff = 1; - slinger.l_linger = 0; if (-1 == ACE_OS::setsockopt (this->get_handle (), SOL_SOCKET, diff --git a/ACE/ace/Select_Reactor_Base.cpp b/ACE/ace/Select_Reactor_Base.cpp index f5d5252dec6..62b116907d6 100644 --- a/ACE/ace/Select_Reactor_Base.cpp +++ b/ACE/ace/Select_Reactor_Base.cpp @@ -12,9 +12,9 @@ #include "ace/Select_Reactor_Base.inl" #endif /* __ACE_INLINE__ */ -#ifndef ACE_WIN32 +#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP # include <algorithm> -#endif /* !ACE_WIN32 */ +#endif /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -26,11 +26,11 @@ template<typename iterator> inline ACE_Event_Handler * ACE_SELECT_REACTOR_EVENT_HANDLER (iterator i) { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP return (*i).item (); #else return (*i); -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ } // Performs sanity checking on the ACE_HANDLE. @@ -39,14 +39,14 @@ bool ACE_Select_Reactor_Handler_Repository::invalid_handle (ACE_HANDLE handle) { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::invalid_handle"); -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) // It's too expensive to perform more exhaustive validity checks on // Win32 due to the way that they implement SOCKET HANDLEs. if (handle == ACE_INVALID_HANDLE) -#else /* !ACE_WIN32 */ +#else /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ if (handle < 0 || static_cast<size_type> (handle) >= this->event_handlers_.size ()) -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ { errno = EINVAL; return true; @@ -61,13 +61,13 @@ bool ACE_Select_Reactor_Handler_Repository::handle_in_range (ACE_HANDLE handle) { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::handle_in_range"); -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) // It's too expensive to perform more exhaustive validity checks on // Win32 due to the way that they implement SOCKET HANDLEs. if (handle != ACE_INVALID_HANDLE) -#else /* !ACE_WIN32 */ +#else /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ if (handle >= 0 && handle < this->max_handlep1_) -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ { return true; } @@ -84,7 +84,7 @@ ACE_Select_Reactor_Handler_Repository::open (size_type size) { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::open"); -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) if (this->event_handlers_.open (size) == -1) return -1; #else @@ -97,7 +97,7 @@ ACE_Select_Reactor_Handler_Repository::open (size_type size) static_cast<ACE_Event_Handler *> (0)); this->max_handlep1_ = 0; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ // Try to increase the number of handles if <size> is greater than // the current limit. @@ -108,9 +108,9 @@ ACE_Select_Reactor_Handler_Repository::open (size_type size) ACE_Select_Reactor_Handler_Repository::ACE_Select_Reactor_Handler_Repository (ACE_Select_Reactor_Impl &select_reactor) : select_reactor_ (select_reactor), -#ifndef ACE_WIN32 +#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP max_handlep1_ (0), -#endif /* !ACE_WIN32 */ +#endif /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ event_handlers_ () { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::ACE_Select_Reactor_Handler_Repository"); @@ -120,7 +120,7 @@ int ACE_Select_Reactor_Handler_Repository::unbind_all (void) { // Unbind all of the <handle, ACE_Event_Handler>s. -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP map_type::iterator const end = this->event_handlers_.end (); for (map_type::iterator pos = this->event_handlers_.begin (); pos != end; @@ -152,7 +152,7 @@ ACE_Select_Reactor_Handler_Repository::unbind_all (void) ACE_Event_Handler::ALL_EVENTS_MASK); ++pos; } -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ return 0; } @@ -173,14 +173,14 @@ ACE_Select_Reactor_Handler_Repository::find_eh (ACE_HANDLE handle) map_type::iterator pos (this->event_handlers_.end ()); // this code assumes the handle is in range. -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) this->event_handlers_.find (handle, pos); #else map_type::iterator const tmp = &this->event_handlers_[handle]; if (*tmp != 0) pos = tmp; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ return pos; } @@ -205,7 +205,7 @@ ACE_Select_Reactor_Handler_Repository::bind (ACE_HANDLE handle, // Is this handle already in the Reactor? bool existing_handle = false; -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) map_type::ENTRY * entry = 0; @@ -253,7 +253,7 @@ ACE_Select_Reactor_Handler_Repository::bind (ACE_HANDLE handle, if (this->max_handlep1_ < handle + 1) this->max_handlep1_ = handle + 1; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ if (this->select_reactor_.is_suspended_i (handle)) { @@ -333,7 +333,7 @@ ACE_Select_Reactor_Handler_Repository::unbind ( if (!has_any_wait_mask && !has_any_suspend_mask) { -#if defined (ACE_WIN32) +#if defined (ACE_SELECT_REACTOR_BASE_USES_HASH_MAP) if (event_handler != 0 && this->event_handlers_.unbind (pos) == -1) return -1; // Should not happen! #else @@ -375,7 +375,7 @@ ACE_Select_Reactor_Handler_Repository::unbind ( ++this->max_handlep1_; } -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ // The handle has been completely removed. complete_removal = true; @@ -408,7 +408,7 @@ ACE_Select_Reactor_Handler_Repository_Iterator::ACE_Select_Reactor_Handler_Repos : rep_ (s), current_ (s->event_handlers_.begin ()) { -#ifndef ACE_WIN32 +#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP // Don't use ACE_Array_Base::end() since it may be larger than // event_handlers[max_handlep1_]. const_base_iterator const end = @@ -444,7 +444,7 @@ ACE_Select_Reactor_Handler_Repository_Iterator::next ( bool ACE_Select_Reactor_Handler_Repository_Iterator::advance (void) { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP // No need to explicitly limit search to "current" to // max_handlep1_ range. const_base_iterator const end = this->rep_->event_handlers_.end (); @@ -453,18 +453,18 @@ ACE_Select_Reactor_Handler_Repository_Iterator::advance (void) // event_handlers[max_handlep1_]. const_base_iterator const end = &this->rep_->event_handlers_[this->rep_->max_handlep1 ()]; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ if (this->current_ != end) ++this->current_; -#ifndef ACE_WIN32 +#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP // Advance to the next element containing a non-zero event handler. // There's no need to do this for the Windows case since the hash // map will only contain non-zero event handlers. while (this->current_ != end && (*(this->current_) == 0)) ++this->current_; -#endif /* !ACE_WIN32 */ +#endif /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ return this->current_ != end; } @@ -479,12 +479,12 @@ ACE_Select_Reactor_Handler_Repository_Iterator::dump (void) const ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("rep_ = %u"), this->rep_)); -# ifdef ACE_WIN32 +# ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = "))); this->current_.dump (); # else ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %@"), this->current_)); -# endif /* ACE_WIN32 */ +# endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } @@ -495,13 +495,13 @@ ACE_Select_Reactor_Handler_Repository::dump (void) const #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::dump"); -# ifdef ACE_WIN32 +# ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP # define ACE_HANDLE_FORMAT_SPECIFIER ACE_TEXT("%@") # define ACE_MAX_HANDLEP1_FORMAT_SPECIFIER ACE_TEXT("%u") # else # define ACE_HANDLE_FORMAT_SPECIFIER ACE_TEXT("%d") # define ACE_MAX_HANDLEP1_FORMAT_SPECIFIER ACE_TEXT("%d") -# endif /* ACE_WIN32 */ +# endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACELIB_DEBUG ((LM_DEBUG, diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h index 54f3f45f21d..8a686341cd5 100644 --- a/ACE/ace/Select_Reactor_Base.h +++ b/ACE/ace/Select_Reactor_Base.h @@ -28,14 +28,18 @@ # include "ace/Notification_Queue.h" #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -#ifdef ACE_WIN32 +#if defined (ACE_WIN32) || defined (ACE_MQX) +# define ACE_SELECT_REACTOR_BASE_USES_HASH_MAP +#endif + +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP # include "ace/Null_Mutex.h" # include "ace/Hash_Map_Manager_T.h" # include "ace/Functor.h" /* For ACE_Hash<void *> */ # include <functional> /* For std::equal_to<> */ #else # include "ace/Array_Base.h" -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ #if !defined (ACE_DISABLE_NOTIFY_PIPE_DEFAULT) # define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 0 @@ -289,7 +293,7 @@ public: typedef ACE_Event_Handler * value_type; // = The mapping from <HANDLES> to <Event_Handlers>. -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP /** * The NT version implements this via a hash map * @c ACE_Event_Handler*. Since NT implements @c ACE_HANDLE @@ -311,7 +315,7 @@ public: */ typedef ACE_Array_Base<value_type> map_type; typedef ACE_HANDLE max_handlep1_type; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ typedef map_type::size_type size_type; @@ -395,11 +399,11 @@ private: /// Reference to our @c Select_Reactor. ACE_Select_Reactor_Impl &select_reactor_; -#ifndef ACE_WIN32 +#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP /// The highest currently active handle, plus 1 (ranges between 0 and /// @c max_size_. max_handlep1_type max_handlep1_; -#endif /* !ACE_WIN32 */ +#endif /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ /// Underlying table of event handlers. map_type event_handlers_; diff --git a/ACE/ace/Select_Reactor_Base.inl b/ACE/ace/Select_Reactor_Base.inl index 3993e9ff75e..68933bb2e04 100644 --- a/ACE/ace/Select_Reactor_Base.inl +++ b/ACE/ace/Select_Reactor_Base.inl @@ -6,21 +6,21 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Select_Reactor_Handler_Repository::size_type ACE_Select_Reactor_Handler_Repository::size (void) const { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP return this->event_handlers_.total_size (); #else return this->event_handlers_.size (); -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ } ACE_INLINE ACE_Select_Reactor_Handler_Repository::max_handlep1_type ACE_Select_Reactor_Handler_Repository::max_handlep1 (void) const { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP return this->event_handlers_.current_size (); #else return this->max_handlep1_; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ } ACE_INLINE int @@ -50,11 +50,11 @@ ACE_Select_Reactor_Handler_Repository::find (ACE_HANDLE handle) if (pos != this->event_handlers_.end ()) { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP eh = (*pos).item (); #else eh = *pos; -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ } } // Don't bother setting errno. It isn't used in the select()-based @@ -72,12 +72,12 @@ ACE_Select_Reactor_Handler_Repository::find (ACE_HANDLE handle) ACE_INLINE bool ACE_Select_Reactor_Handler_Repository_Iterator::done (void) const { -#ifdef ACE_WIN32 +#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP return this->current_ == this->rep_->event_handlers_.end (); #else return this->current_ == (this->rep_->event_handlers_.begin () + this->rep_->max_handlep1 ()); -#endif /* ACE_WIN32 */ +#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */ } // ------------------------------------------------------------------ diff --git a/ACE/ace/Strategies_T.cpp b/ACE/ace/Strategies_T.cpp index 761ca762da1..723bc1e2749 100644 --- a/ACE/ace/Strategies_T.cpp +++ b/ACE/ace/Strategies_T.cpp @@ -436,7 +436,7 @@ ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handle // If <flags_> is non-0 then we won't create zombies. switch (ACE::fork (ACE_TEXT ("child"), this->flags_)) { - case -1: + case static_cast<pid_t>(-1): { ACE_Errno_Guard error (errno); svc_handler->close (); diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc index dac0888baef..07fc18646bf 100644 --- a/ACE/ace/ace.mpc +++ b/ACE/ace/ace.mpc @@ -121,6 +121,7 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, Message_Queue_Vx.cpp Method_Request.cpp MMAP_Memory_Pool.cpp + MQX_Filesystem.cpp Msg_WFMO_Reactor.cpp Monitor_Admin.cpp Monitor_Admin_Manager.cpp diff --git a/ACE/ace/ace_for_tao.mpc b/ACE/ace/ace_for_tao.mpc index 1c5cfcb4dff..f1667345ede 100644 --- a/ACE/ace/ace_for_tao.mpc +++ b/ACE/ace/ace_for_tao.mpc @@ -91,6 +91,7 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Monitor_Control_Types.cpp Monitor_Control_Action.cpp Monotonic_Time_Policy.cpp + MQX_Filesystem.cpp Mutex.cpp Notification_Strategy.cpp Notification_Queue.cpp @@ -328,6 +329,7 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Mem_Map.h Min_Max.h Monotonic_Time_Policy.h + MQX_Filesystem.h Null_Barrier.h Null_Condition.h Null_Mutex.h diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index 4cb908207ff..c30389f1f64 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -21,6 +21,8 @@ #define ACE_ANDROID #define ACE_PLATFORM_CONFIG config-android.h +#include "ace/config-linux-common.h" + /* * Android NDK Revision Macros * @@ -86,12 +88,26 @@ # define ACE_HAS_SEMUN #endif +#if ACE_ANDROID_NDK_LESS_THAN(15, 0) && __ANDROID_API__ < 21 +// NOTE: The && is correct, SYS_GETTID is present in API 16 in r15 onwards +# ifdef ACE_HAS_GETTID +# undef ACE_HAS_GETTID +# endif +#endif + // NDK has telldir() and seekdir() by 15c #if ACE_ANDROID_NDK_LESS_THAN(15, 2) || __ANDROID_API__ < 23 # define ACE_LACKS_TELLDIR # define ACE_LACKS_SEEKDIR #endif +// strbuf was added by r16 +#if ACE_ANDROID_NDK_LESS_THAN(16, 0) +# ifdef ACE_HAS_STRBUF_T +# undef ACE_HAS_STRBUF_T +# endif +#endif + // fd_mask was added in r17c #if ACE_ANDROID_NDK_LESS_THAN(17, 2) # define ACE_LACKS_FD_MASK @@ -102,6 +118,9 @@ # define ACE_LACKS_WCSTOLL # define ACE_LACKS_WCSTOULL # define ACE_LACKS_CONDATTR_SETCLOCK +# ifdef ACE_HAS_EVENT_POLL +# undef ACE_HAS_EVENT_POLL +# endif #endif // These were available before r18, but in r18 they are restricted to API >= 28 ¯\_(ツ)_/¯ @@ -110,11 +129,12 @@ # define ACE_LACKS_ENDHOSTENT #endif -#define ACE_HAS_SSIZE_T +#if !defined(ACE_HAS_GLIBC_2_2_3) && (ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21) +# define ACE_HAS_CPU_SET_T +#endif // system errorno is a volatile int #define ACE_HAS_VOLATILE_ERRNO - #define ACE_ERRNO_TYPE volatile int // Android doesn't check is sig is out of range. @@ -153,15 +173,6 @@ // Used in tests/Sequence_Unit_Tests/string_sequence_tester.hpp # define TAO_LACKS_WCHAR_CXX_STDLIB -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -#endif - -// Needed to differentiate between libc 5 and libc 6 (aka glibc). -#include <features.h> - -#include "ace/config-posix.h" - // @todo JW, test if this works // #define ACE_HAS_POSIX_SEM // #define ACE_HAS_POSIX_SEM_TIMEOUT @@ -174,231 +185,17 @@ # undef ACE_HAS_AIO_CALLS #endif -// First the machine specific part -#if defined (__powerpc__) || defined (__x86_64__) -# if !defined (ACE_DEFAULT_BASE_ADDR) -# define ACE_DEFAULT_BASE_ADDR ((char *) 0x40000000) -# endif /* ! ACE_DEFAULT_BASE_ADDR */ -#endif /* ! __powerpc__ && ! __ia64 */ - #define ACE_HAS_SIGINFO_T #define ACE_HAS_SOCKLEN_T #define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#define ACE_HAS_LSEEK64 -//#define ACE_LACKS_LSEEK64_PROTOTYPE - -#define ACE_HAS_P_READ_WRITE -// Use ACE's alternate cuserid() implementation since the use of the -// system cuserid() is discouraged. #define ACE_LACKS_CUSERID -#define ACE_HAS_ALT_CUSERID - -#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) -# define ACE_HAS_ISASTREAM_PROTOTYPE -# define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE -# define ACE_HAS_CPU_SET_T -#elif ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21 -# define ACE_HAS_CPU_SET_T -#endif /* __GLIBC__ > 2 || __GLIBC__ === 2 && __GLIBC_MINOR__ >= 3) */ - -// Then the compiler specific parts - -#if defined (__GNUG__) - // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so - // this must appear before its #include. -# define ACE_HAS_STRING_CLASS -# include "ace/config-g++-common.h" -#elif defined (__GNUC__) -/** - * GNU C compiler. - * - * We need to recognize the GNU C compiler since TAO has at least one - * C source header and file - * (TAO/orbsvcs/orbsvcs/SSLIOP/params_dup.{h,c}) that may indirectly - * include this - */ -#else /* ! __GNUG__ && !__DECCXX && !__INTEL_COMPILER && && !__PGI */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-android.h -# endif /* __cplusplus */ -#endif /* ! __GNUG__*/ - -// Completely common part :-) - -// Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -#define ACE_HAS_SIGSUSPEND - -#define ACE_HAS_STRSIGNAL - -#ifndef ACE_HAS_POSIX_REALTIME_SIGNALS -# define ACE_HAS_POSIX_REALTIME_SIGNALS -#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR -#define ACE_HAS_VFWPRINTF - -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_ISWASCII - -#define ACE_HAS_3_PARAM_WCSTOK - -#define ACE_HAS_3_PARAM_READDIR_R - -#if !defined (ACE_DEFAULT_BASE_ADDR) -# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000) -#endif /* ! ACE_DEFAULT_BASE_ADDR */ - -#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H -#define ACE_HAS_SYS_SYSINFO_H -#define ACE_HAS_LINUX_SYSINFO - -// Compiler/platform has the getrusage() system call. -#define ACE_HAS_GETRUSAGE -#define ACE_HAS_GETRUSAGE_PROTOTYPE - -#define ACE_HAS_BYTESWAP_H -#define ACE_HAS_BSWAP_16 -#define ACE_HAS_BSWAP_32 -#define ACE_HAS_BSWAP_64 - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// ONLY define this if you have config'd multicast into a 2.0.34 or -// prior kernel. It is enabled by default in 2.0.35 kernels. -#if !defined (ACE_HAS_IP_MULTICAST) -# define ACE_HAS_IP_MULTICAST -#endif /* ! ACE_HAS_IP_MULTICAST */ - -// At least for IPv4, Linux lacks perfect filtering. -#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING -# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */ - -#define ACE_HAS_BIG_FD_SET - -// Linux defines struct msghdr in /usr/include/socket.h -#define ACE_HAS_MSG - -// Linux "improved" the interface to select() so that it modifies -// the struct timeval to reflect the amount of time not slept -// (see NOTES in Linux's select(2) man page). -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535 - -#define ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE 1 - -#define ACE_HAS_GETPAGESIZE 1 - -// Platform defines struct timespec but not timespec_t -#define ACE_LACKS_TIMESPEC_T - -// Platform supplies scandir() -#define ACE_HAS_SCANDIR #define ACE_MMAP_NO_ZERO -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -#define ACE_HAS_POSIX_TIME - -#define ACE_HAS_GPERF - -#define ACE_HAS_DIRENT - -// Starting with FC9 rawhide this file is not available anymore but -// this define is set -#if defined _XOPEN_STREAMS && _XOPEN_STREAMS == -1 -# define ACE_LACKS_STROPTS_H -# define ACE_LACKS_STRRECVFD -#endif - -#if !defined (ACE_LACKS_STROPTS_H) -# define ACE_HAS_STRBUF_T -#endif - -#if defined (__ia64) || defined(__alpha) || defined (__x86_64__) || defined(__powerpc64__) -// On 64 bit platforms, the "long" type is 64-bits. Override the -// default 32-bit platform-specific format specifiers appropriately. -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%lu" -# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" -# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" -#endif /* __ia64 */ - -#define ACE_SIZEOF_WCHAR 4 - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Linux implements sendfile(). -#define ACE_HAS_SENDFILE 1 - -#define ACE_HAS_VOIDPTR_MMAP - -#define ACE_HAS_VASPRINTF - -#define ACE_LACKS_PTHREAD_SCOPE_PROCESS - -// 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. -#define ACE_HAS_IP_MULTICAST_TTL_AS_INT 1 -#define ACE_HAS_IPV6_MULTICAST_LOOP_AS_BOOL 1 -#define ACE_HAS_IP_MULTICAST_LOOP_AS_INT 1 - #define ACE_HAS_NETLINK #define ACE_HAS_SIOCGIFCONF -#if !defined (ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO) -// Detect if getsockname() and getpeername() returns random values in -// the sockaddr_in::sin_zero field by evaluation of the kernel -// version. Since version 2.5.47 this problem is fixed. -# if !defined (ACE_LACKS_LINUX_VERSION_H) -# include <linux/version.h> -# endif /* !ACE_LACKS_LINUX_VERSION_H */ -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47)) -# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 0 -# else -# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 1 -# endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,47)) */ -#endif /* ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO */ - -#if !defined (ACE_HAS_EVENT_POLL) && !defined (ACE_HAS_DEV_POLL) -# if !defined (ACE_LACKS_LINUX_VERSION_H) -# include <linux/version.h> -# endif /* !ACE_LACKS_LINUX_VERSION_H */ -#endif - -#define ACE_HAS_SVR4_DYNAMIC_LINKING -#define ACE_HAS_AUTOMATIC_INIT_FINI -#define ACE_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE -#define ACE_HAS_RECURSIVE_MUTEXES -#define ACE_HAS_THREAD_SPECIFIC_STORAGE -#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -#define ACE_HAS_REENTRANT_FUNCTIONS -#define ACE_HAS_TIMEZONE - #if !defined ACE_DEFAULT_TEMP_DIR # define ACE_DEFAULT_TEMP_DIR "/data/tmp" #endif @@ -407,6 +204,8 @@ # define TEST_DIR "/data" #endif +#define ACE_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE + #if !defined (ACE_AS_STATIC_LIBS) # if (__GNUC__ == 4 && __GNUC_MINOR__ == 4) # error Shared library support is not possible with GCC 4.4.x diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h new file mode 100644 index 00000000000..b9d112602ad --- /dev/null +++ b/ACE/ace/config-linux-common.h @@ -0,0 +1,255 @@ +/** + * Common configuration for platforms using the Linux Kernel, specifically + * ACE_LINUX and ACE_ANDROID as of writing. config-android.h was originally + * based off config-linux.h and this file was created from the common parts of + * both. + */ +#ifndef ACE_CONFIG_LINUX_COMMON_H +#define ACE_CONFIG_LINUX_COMMON_H + +#if !defined (ACE_MT_SAFE) +# define ACE_MT_SAFE 1 +#endif + +// Compiler supports the ssize_t typedef. +#define ACE_HAS_SSIZE_T + +// Needed to differentiate between libc 5 and libc 6 (aka glibc). +#include <features.h> + +#include "ace/config-posix.h" + +#ifndef ACE_DEFAULT_BASE_ADDR +# if defined (__powerpc__) || defined (__x86_64__) +# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char* >(0x40000000)) +# elif defined (__ia64) +// Zero base address should work fine for Linux of IA-64: it just lets +// the kernel to choose the right value. +# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char*>(0x0000000000000000)) +# else +# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char* >(0x80000000)) +# endif +#endif /* ! ACE_DEFAULT_BASE_ADDR */ + +#define ACE_HAS_LSEEK64 + +#define ACE_HAS_P_READ_WRITE +// Use ACE's alternate cuserid() implementation since the use of the +// system cuserid() is discouraged. +#define ACE_HAS_ALT_CUSERID + +#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) +# define ACE_HAS_ISASTREAM_PROTOTYPE +# define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE +# define ACE_HAS_CPU_SET_T +# define ACE_HAS_GLIBC_2_2_3 +#endif /* __GLIBC__ > 2 || __GLIBC__ === 2 && __GLIBC_MINOR__ >= 3) */ + +#if defined (__INTEL_COMPILER) +# include "ace/config-icc-common.h" +#elif defined (__GNUG__) + // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so + // this must appear before its #include. +# define ACE_HAS_STRING_CLASS +# include "ace/config-g++-common.h" +#elif defined (__SUNCC_PRO) || defined (__SUNPRO_CC) +# include "ace/config-suncc-common.h" +#elif defined (__PGI) +// Portable group compiler +# define ACE_HAS_CPLUSPLUS_HEADERS +# define ACE_HAS_STDCPP_STL_INCLUDES +# define ACE_HAS_STANDARD_CPP_LIBRARY 1 +# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +# define ACE_LACKS_SWAB +#elif defined (__GNUC__) +/** + * GNU C compiler. + * + * We need to recognize the GNU C compiler since TAO has at least one + * C source header and file + * (TAO/orbsvcs/orbsvcs/SSLIOP/params_dup.{h,c}) that may indirectly + * include this + */ +#else /* ! __GNUG__ && !__DECCXX && !__INTEL_COMPILER && && !__PGI */ +# ifdef __cplusplus /* Let it slide for C compilers. */ +# error unsupported compiler in ace/config-linux.h +# endif /* __cplusplus */ +#endif /* ! __GNUG__*/ + +// Platform/compiler has the sigwait(2) prototype +#define ACE_HAS_SIGWAIT + +#define ACE_HAS_SIGSUSPEND + +#define ACE_HAS_STRSIGNAL + +#ifndef ACE_HAS_POSIX_REALTIME_SIGNALS +# define ACE_HAS_POSIX_REALTIME_SIGNALS +#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ + +#define ACE_HAS_XPG4_MULTIBYTE_CHAR +#define ACE_HAS_VFWPRINTF + +#define ACE_LACKS_ITOW +#define ACE_LACKS_WCSICMP +#define ACE_LACKS_WCSNICMP +#define ACE_LACKS_ISWASCII + +#define ACE_HAS_3_PARAM_WCSTOK + +#define ACE_HAS_3_PARAM_READDIR_R + +#define ACE_HAS_ALLOCA + +// Compiler/platform has <alloca.h> +#define ACE_HAS_ALLOCA_H +#define ACE_HAS_SYS_SYSINFO_H +#define ACE_HAS_LINUX_SYSINFO + +// Compiler/platform has the getrusage() system call. +#define ACE_HAS_GETRUSAGE +#define ACE_HAS_GETRUSAGE_PROTOTYPE + +#define ACE_HAS_BYTESWAP_H +#define ACE_HAS_BSWAP_16 +#define ACE_HAS_BSWAP_32 + +#if defined (__GNUC__) +# define ACE_HAS_BSWAP_64 +#endif + +#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES + +// Optimize ACE_Handle_Set for select(). +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT + +// ONLY define this if you have config'd multicast into a 2.0.34 or +// prior kernel. It is enabled by default in 2.0.35 kernels. +#if !defined (ACE_HAS_IP_MULTICAST) +# define ACE_HAS_IP_MULTICAST +#endif /* ! ACE_HAS_IP_MULTICAST */ + +// At least for IPv4, Linux lacks perfect filtering. +#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING +# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 +#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */ + +#define ACE_HAS_BIG_FD_SET + +// Linux defines struct msghdr in /usr/include/socket.h +#define ACE_HAS_MSG + +// Linux "improved" the interface to select() so that it modifies +// the struct timeval to reflect the amount of time not slept +// (see NOTES in Linux's select(2) man page). +#define ACE_HAS_NONCONST_SELECT_TIMEVAL + +#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535 + +#define ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE 1 + +#define ACE_HAS_GETPAGESIZE 1 + +// Platform defines struct timespec but not timespec_t +#define ACE_LACKS_TIMESPEC_T + +// Platform supplies scandir() +#define ACE_HAS_SCANDIR + +// Compiler/platform contains the <sys/syscall.h> file. +#define ACE_HAS_SYS_SYSCALL_H + +#define ACE_HAS_TIMEZONE +#define ACE_HAS_TIMEZONE_GETTIMEOFDAY + +// Compiler/platform defines the sig_atomic_t typedef. +#define ACE_HAS_SIG_ATOMIC_T + +#define ACE_HAS_POSIX_TIME + +#define ACE_HAS_GPERF + +#define ACE_HAS_DIRENT + +// Starting with FC9 rawhide this file is not available anymore but +// this define is set +#if defined _XOPEN_STREAMS && _XOPEN_STREAMS == -1 +# define ACE_LACKS_STROPTS_H +# define ACE_LACKS_STRRECVFD +#endif + +#if !defined (ACE_LACKS_STROPTS_H) +# define ACE_HAS_STRBUF_T +#endif + +#if defined (__ia64) || defined(__alpha) || defined (__x86_64__) || defined(__powerpc64__) || (defined(__mips__) && defined(__LP64__)) || defined (__aarch64__) +// On 64 bit platforms, the "long" type is 64-bits. Override the +// default 32-bit platform-specific format specifiers appropriately. +# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%lu" +# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" +# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" +#endif /* __ia64 */ + +#define ACE_SIZEOF_WCHAR 4 + +// Platform has POSIX terminal interface. +#define ACE_HAS_TERMIOS + +// Linux implements sendfile(). +#define ACE_HAS_SENDFILE 1 + +#define ACE_HAS_VOIDPTR_MMAP + +#define ACE_HAS_VASPRINTF + +#define ACE_LACKS_PTHREAD_SCOPE_PROCESS + +// 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 +#define ACE_HAS_IP_MULTICAST_TTL_AS_INT 1 +#define ACE_HAS_IP_MULTICAST_LOOP_AS_INT 1 + +#define ACE_HAS_SVR4_DYNAMIC_LINKING +#define ACE_HAS_AUTOMATIC_INIT_FINI +#define ACE_HAS_RECURSIVE_MUTEXES +#define ACE_HAS_THREAD_SPECIFIC_STORAGE +#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS +#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R +#define ACE_HAS_REENTRANT_FUNCTIONS + +/* =========================================================================== + * By Kernel API Version + * =========================================================================== + */ + +#if !defined (ACE_LACKS_LINUX_VERSION_H) +# include <linux/version.h> +#endif /* !ACE_LACKS_LINUX_VERSION_H */ + +#if !defined (ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO) +// Detect if getsockname() and getpeername() returns random values in +// the sockaddr_in::sin_zero field by evaluation of the kernel +// version. Since version 2.5.47 this problem is fixed. +# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47)) +# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 0 +# else +# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 1 +# endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,47)) */ +#endif /* ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO */ + +#if !defined (ACE_HAS_EVENT_POLL) && !defined (ACE_HAS_DEV_POLL) +# if (LINUX_VERSION_CODE > KERNEL_VERSION (2,6,0)) +# define ACE_HAS_EVENT_POLL +# endif +#endif + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION (2,4,11)) +# define ACE_HAS_GETTID // See ACE_OS::thr_gettid() +#endif + +#endif diff --git a/ACE/ace/config-linux.h b/ACE/ace/config-linux.h index e248aea30b3..954d61f091d 100644 --- a/ACE/ace/config-linux.h +++ b/ACE/ace/config-linux.h @@ -10,10 +10,6 @@ #define ACE_LINUX #endif /* ACE_LINUX */ -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 -#endif - #if !defined (__ACE_INLINE__) # define __ACE_INLINE__ #endif /* ! __ACE_INLINE__ */ @@ -22,17 +18,14 @@ #define ACE_PLATFORM_CONFIG config-linux.h #endif -#define ACE_HAS_BYTESEX_H +#include "ace/config-linux-common.h" -// Needed to differentiate between libc 5 and libc 6 (aka glibc). -#include <features.h> +#define ACE_HAS_BYTESEX_H #if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) # define ACE_HAS_PTHREADS_UNIX98_EXT #endif /* _XOPEN_SOURCE - 0 >= 500 */ -# include "ace/config-posix.h" - #if !defined (ACE_LACKS_LINUX_NPTL) // Temporary fix because NPTL kernels do have shm_open but there is a problem @@ -65,20 +58,6 @@ # undef ACE_HAS_AIO_CALLS #endif -// First the machine specific part - -#if defined (__powerpc__) || defined (__x86_64__) -# if !defined (ACE_DEFAULT_BASE_ADDR) -# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char* >(0x40000000)) -# endif /* ! ACE_DEFAULT_BASE_ADDR */ -#elif defined (__ia64) -# if !defined (ACE_DEFAULT_BASE_ADDR) -// Zero base address should work fine for Linux of IA-64: it just lets -// the kernel to choose the right value. -# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char*>(0x0000000000000000)) -# endif /* ! ACE_DEFAULT_BASE_ADDR */ -#endif /* ! __powerpc__ && ! __ia64 */ - // Then glibc/libc5 specific parts #if defined(__GLIBC__) || defined (__INTEL_COMPILER) @@ -123,144 +102,14 @@ # define ACE_LACKS_MSG_ACCRIGHTS #endif /* ! __GLIBC__ */ -#define ACE_HAS_LSEEK64 -//#define ACE_LACKS_LSEEK64_PROTOTYPE - -#define ACE_HAS_P_READ_WRITE -// Use ACE's alternate cuserid() implementation since the use of the -// system cuserid() is discouraged. -#define ACE_HAS_ALT_CUSERID - -#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) -# define ACE_HAS_ISASTREAM_PROTOTYPE -# define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE -# define ACE_HAS_CPU_SET_T -#endif /* __GLIBC__ > 2 || __GLIBC__ === 2 && __GLIBC_MINOR__ >= 3) */ - -// Then the compiler specific parts - -#if defined (__INTEL_COMPILER) -# include "ace/config-icc-common.h" -#elif defined (__GNUG__) - // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so - // this must appear before its #include. -# define ACE_HAS_STRING_CLASS -# include "ace/config-g++-common.h" -#elif defined (__SUNCC_PRO) || defined (__SUNPRO_CC) -# include "ace/config-suncc-common.h" -#elif defined (__PGI) -// Portable group compiler -# define ACE_HAS_CPLUSPLUS_HEADERS -# define ACE_HAS_STDCPP_STL_INCLUDES -# define ACE_HAS_STANDARD_CPP_LIBRARY 1 -# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 -# define ACE_LACKS_SWAB -#elif defined (__GNUC__) -/** - * GNU C compiler. - * - * We need to recognize the GNU C compiler since TAO has at least one - * C source header and file - * (TAO/orbsvcs/orbsvcs/SSLIOP/params_dup.{h,c}) that may indirectly - * include this - */ -#else /* ! __GNUG__ && !__DECCXX && !__INTEL_COMPILER && && !__PGI */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler in ace/config-linux.h -# endif /* __cplusplus */ -#endif /* ! __GNUG__*/ - // Completely common part :-) -// Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -#define ACE_HAS_SIGSUSPEND - #define ACE_HAS_UALARM -#define ACE_HAS_STRSIGNAL - -#ifndef ACE_HAS_POSIX_REALTIME_SIGNALS -# define ACE_HAS_POSIX_REALTIME_SIGNALS -#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */ - -#define ACE_HAS_XPG4_MULTIBYTE_CHAR -#define ACE_HAS_VFWPRINTF - -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP -#define ACE_LACKS_ISWASCII - -#define ACE_HAS_3_PARAM_WCSTOK - -#define ACE_HAS_3_PARAM_READDIR_R - -#if !defined (ACE_DEFAULT_BASE_ADDR) -# define ACE_DEFAULT_BASE_ADDR (reinterpret_cast< char* >(0x80000000)) -#endif /* ! ACE_DEFAULT_BASE_ADDR */ - -#define ACE_HAS_ALLOCA - -// Compiler/platform has <alloca.h> -#define ACE_HAS_ALLOCA_H -#define ACE_HAS_SYS_SYSINFO_H -#define ACE_HAS_LINUX_SYSINFO - -// Compiler/platform has the getrusage() system call. -#define ACE_HAS_GETRUSAGE -#define ACE_HAS_GETRUSAGE_PROTOTYPE - -#define ACE_HAS_BYTESWAP_H -#define ACE_HAS_BSWAP_16 -#define ACE_HAS_BSWAP_32 - -#if defined (__GNUC__) -# define ACE_HAS_BSWAP_64 -#endif - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// ONLY define this if you have config'd multicast into a 2.0.34 or -// prior kernel. It is enabled by default in 2.0.35 kernels. -#if !defined (ACE_HAS_IP_MULTICAST) -# define ACE_HAS_IP_MULTICAST -#endif /* ! ACE_HAS_IP_MULTICAST */ - -// At least for IPv4, Linux lacks perfect filtering. -#if !defined ACE_LACKS_PERFECT_MULTICAST_FILTERING -# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#endif /* ACE_LACKS_PERFECT_MULTICAST_FILTERING */ - -#define ACE_HAS_BIG_FD_SET - -// Linux defines struct msghdr in /usr/include/socket.h -#define ACE_HAS_MSG - -// Linux "improved" the interface to select() so that it modifies -// the struct timeval to reflect the amount of time not slept -// (see NOTES in Linux's select(2) man page). -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535 - -#define ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE 1 - -#define ACE_HAS_GETPAGESIZE 1 - -// Platform defines struct timespec but not timespec_t -#define ACE_LACKS_TIMESPEC_T - -// Platform supplies scandir() -#define ACE_HAS_SCANDIR #if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10) // Although the scandir man page says otherwise, this setting is correct. // The setting was fixed in 2.10, so do not use the hack after that. -#define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR +# define ACE_SCANDIR_CMP_USES_CONST_VOIDPTR #endif // A conflict appears when including both <ucontext.h> and @@ -270,82 +119,19 @@ // Platform supports System V IPC (most versions of UNIX, but not Win32) #define ACE_HAS_SYSV_IPC -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform/compiler supports global timezone variable. -#define ACE_HAS_TIMEZONE - -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - // Compiler/platform defines a union semun for SysV shared memory. #define ACE_HAS_SEMUN -#define ACE_HAS_POSIX_TIME - -#define ACE_HAS_GPERF - -#define ACE_HAS_DIRENT - -// Starting with FC9 rawhide this file is not available anymore but -// this define is set -#if defined _XOPEN_STREAMS && _XOPEN_STREAMS == -1 -# define ACE_LACKS_STROPTS_H -# define ACE_LACKS_STRRECVFD -#endif - -#if !defined (ACE_LACKS_STROPTS_H) -# define ACE_HAS_STRBUF_T -#endif - -#if defined (__ia64) || defined(__alpha) || defined (__x86_64__) || defined(__powerpc64__) || (defined(__mips__) && defined(__LP64__)) || defined (__aarch64__) -// On 64 bit platforms, the "long" type is 64-bits. Override the -// default 32-bit platform-specific format specifiers appropriately. -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%lu" -# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" -# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" -#endif /* __ia64 */ - -#define ACE_SIZEOF_WCHAR 4 - #if defined (__powerpc__) && !defined (ACE_SIZEOF_LONG_DOUBLE) // 32bit PowerPC Linux uses 128bit long double # define ACE_SIZEOF_LONG_DOUBLE 16 #endif -#define ACE_LACKS_PTHREAD_SCOPE_PROCESS - #define ACE_LACKS_GETIPNODEBYADDR #define ACE_LACKS_GETIPNODEBYNAME -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -// Linux implements sendfile(). -#define ACE_HAS_SENDFILE 1 - -#define ACE_HAS_VOIDPTR_MMAP - #define ACE_HAS_ICMP_SUPPORT 1 -#define ACE_HAS_VASPRINTF - -// 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 -#define ACE_HAS_IP_MULTICAST_TTL_AS_INT 1 -#define ACE_HAS_IP_MULTICAST_LOOP_AS_INT 1 - #if defined (ACE_LACKS_NETWORKING) # include "ace/config-posix-nonetworking.h" #else @@ -353,27 +139,6 @@ # define ACE_HAS_GETIFADDRS #endif -#if !defined (ACE_LACKS_LINUX_VERSION_H) -# include <linux/version.h> -#endif /* !ACE_LACKS_LINUX_VERSION_H */ - -#if !defined (ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO) -// Detect if getsockname() and getpeername() returns random values in -// the sockaddr_in::sin_zero field by evaluation of the kernel -// version. Since version 2.5.47 this problem is fixed. -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47)) -# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 0 -# else -# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 1 -# endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,47)) */ -#endif /* ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO */ - -#if !defined (ACE_HAS_EVENT_POLL) && !defined (ACE_HAS_DEV_POLL) -# if (LINUX_VERSION_CODE > KERNEL_VERSION (2,6,0)) -# define ACE_HAS_EVENT_POLL -# endif -#endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8)) # define ACE_HAS_SCHED_GETAFFINITY 1 # define ACE_HAS_SCHED_SETAFFINITY 1 @@ -384,21 +149,11 @@ // we have no choice. // RHEL4 fails (2.6.9) while RHEL5 works (2.6.18) #if !defined (ACE_LACKS_CONDATTR_SETCLOCK) -# if !defined (ACE_LACKS_LINUX_VERSION_H) -# include <linux/version.h> -# endif /* !ACE_LACKS_LINUX_VERSION_H */ # if (LINUX_VERSION_CODE < KERNEL_VERSION (2,6,18)) # define ACE_LACKS_CONDATTR_SETCLOCK # endif #endif -#define ACE_HAS_SVR4_DYNAMIC_LINKING -#define ACE_HAS_AUTOMATIC_INIT_FINI -#define ACE_HAS_RECURSIVE_MUTEXES -#define ACE_HAS_THREAD_SPECIFIC_STORAGE -#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R -#define ACE_HAS_REENTRANT_FUNCTIONS #define ACE_HAS_MNTENT // To support UCLIBC diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index cbeae46908e..dc292523ffb 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -271,7 +271,7 @@ # endif /* ghs || __GNUC__ || ..... */ #endif /* !ACE_UNUSED_ARG */ -#if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (ACE_RM544) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || defined (__TANDEM) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) +#if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (ACE_RM544) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || defined (__TANDEM) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) || defined (__IAR_SYSTEMS_ICC__) # define ACE_NOTREACHED(a) #else /* ghs || ..... */ # define ACE_NOTREACHED(a) a diff --git a/ACE/ace/config-mqx.h b/ACE/ace/config-mqx.h new file mode 100644 index 00000000000..da4c5b2ab3b --- /dev/null +++ b/ACE/ace/config-mqx.h @@ -0,0 +1,509 @@ +#ifndef CONFIG_MQX_H +#define CONFIG_MQX_H + +// This macro is required in order to build the SOCK_Connector_Test +#define ACE_LACKS_GETHOSTENT + +#if defined(ACE_MQX_DLIB_FULL) +# define MQX_SUPPRESS_FILE_DEF 1 +# define MQX_SUPPRESS_STDIO_MACROS 1 +#endif + +#define MQX_STD_TIME_API 0 + +#include <time32.h> +#define _SIGNAL + +#include <mfs.h> +#include <rtcs.h> +#include <mutex.h> +#include <fio.h> + +// These headers do not have the proper guards for C++ +extern "C" { +// Allowing p_time.h to be included causes conflicts +// with time.h +#define __p_time_h__ + +#include <sys_types.h> +#include <p_pthread.h> +#include <p_signal.h> +#include <p_semaphore.h> +} + +#if MQX_STD_TIME_API == 0 +# define ACE_LACKS_LOCALTIME_R +#endif + +#if !defined (ACE_DEFAULT_MAP_SIZE) +# define ACE_DEFAULT_MAP_SIZE 64 +#endif /* ACE_DEFAULT_MAP_SIZE */ + +#if !defined (ACE_MAXLOGMSGLEN) +# define ACE_MAXLOGMSGLEN 1024 +#endif /* ACE_MAXLOGMSGLEN */ + +#if !defined (ACE_DEFAULT_ACCEPTOR_USE_SELECT) +# define ACE_DEFAULT_ACCEPTOR_USE_SELECT 0 +#endif /* ACE_DEFAULT_ACCEPTOR_USE_SELECT */ + +#define ACE_CHDIR_EQUIVALENT MQX_Filesystem::inst().chdir +#define ACE_RMDIR_EQUIVALENT MQX_Filesystem::inst().rmdir +#define ACE_GETCWD_EQUIVALENT MQX_Filesystem::inst().getcwd +#define ACE_UNLINK_EQUIVALENT MQX_Filesystem::inst().unlink +#define ACE_MKDIR_EQUIVALENT MQX_Filesystem::inst().mkdir +#define ACE_RENAME_EQUIVALENT MQX_Filesystem::inst().rename + +#define ACE_MQX +#define ACE_TEMPLATES_REQUIRE_SOURCE +#define ACE_PAGE_SIZE 4096 +#define ACE_SOCKET_LEN uint16_t +#define ACE_SOCKOPT_LEN socklen_t +typedef int SOCKET; + +#define ACE_UNUSED_ARG(X) + +// Add a check for null pointer before calling free(). This is not +// completely necessary, but MQX will set a task error of MQX_INVALID_POINTER +// if we call free with a null pointer. +#define ACE_FREE_FUNC(X) if ((X) != 0) ::free(X) + +#define ACE_USES_SOCKET_H + +#define ACE_LACKS_SIGINFO_H +#define ACE_LACKS_NEW_H +#define ACE_LACKS_UNISTD_H +#define ACE_LACKS_FCNTL_H +#define ACE_LACKS_UCONTEXT_H +#define ACE_LACKS_SEARCH_H +#define ACE_LACKS_PWD_H +#define ACE_LACKS_PTHREAD_H +#define ACE_LACKS_SCHED_H +#define ACE_LACKS_SEMAPHORE_H +#define ACE_LACKS_STROPTS_H +#define ACE_LACKS_DLFCN_H +#define ACE_LACKS_NETDB_H +#define ACE_LACKS_DIRENT_H +#define ACE_LACKS_STRINGS_H +#define ACE_LACKS_SYSLOG_H +#define ACE_LACKS_POLL_H +#define ACE_LACKS_REGEX_H + +#define ACE_LACKS_SYS_TYPES_H +#define ACE_LACKS_SYS_STAT_H +#define ACE_LACKS_SYS_PARAM_H +#define ACE_LACKS_SYS_TIME_H +#define ACE_LACKS_SYS_RESOURCE_H +#define ACE_LACKS_SYS_WAIT_H +#define ACE_LACKS_SYS_UTSNAME_H +#define ACE_LACKS_SYS_MMAN_H +#define ACE_LACKS_SYS_IPC_H +#define ACE_LACKS_SYS_SEM_H +#define ACE_LACKS_SYS_UIO_H +#define ACE_LACKS_SYS_SOCKET_H +#define ACE_LACKS_SYS_IOCTL_H +#define ACE_LACKS_SYS_SELECT_H +#define ACE_LACKS_SYS_UN_H +#define ACE_LACKS_SYS_MSG_H +#define ACE_LACKS_SYS_SHM_H +#define ACE_LACKS_SYS_SYSCTL_H + +#define ACE_LACKS_NETINET_IN_H +#define ACE_LACKS_NETINET_TCP_H +#define ACE_LACKS_NET_IF_H +#define ACE_LACKS_ARPA_INET_H + +#define ACE_HAS_THREADS +#define ACE_HAS_PTHREADS +#define ACE_LACKS_COND_T +#define ACE_LACKS_RWLOCK_T +#define ACE_MT_SAFE 1 +#define ACE_LACKS_SIGPROCMASK +#define ACE_LACKS_CONDATTR +#define ACE_LACKS_PTHREAD_CLEANUP +#define ACE_HAS_SIGINFO_T +#define ACE_HAS_POSIX_SEM +#define ACE_HAS_POSIX_SEM_TIMEOUT +#define ACE_LACKS_PTHREAD_CANCEL +#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES +#define ACE_HAS_THREAD_SPECIFIC_STORAGE +#define ACE_LACKS_NAMED_POSIX_SEM +#define ACE_DEFAULT_SEM_KEY { 1234 } +// MQX POSIX has this, but it doesn't appear to work +#define ACE_LACKS_SETINHERITSCHED +typedef pthread_mutex_t ACE_mutex_t; +typedef pthread_mutexattr_t ACE_mutexattr_t; + +#if !defined(ACE_MQX_DLIB_FULL) +#define ACE_LACKS_FGETWC +#define ACE_LACKS_FGETWS +#define ACE_LACKS_FPUTWS +#define ACE_LACKS_FGETPOS +#define ACE_LACKS_FSETPOS +#define ACE_LACKS_FREOPEN +#define ACE_LACKS_FDOPEN +#define ACE_LACKS_FILENO +#define ACE_LACKS_LOCALECONV + +#define BUFSIZ 512 + +#undef ungetc +#undef sscanf +#undef snprintf +#undef vsnprintf +#undef getchar +#undef putchar +#undef status + +#define getc(X) _io_fgetc(X) +#define ungetc(X,Y) _io_fungetc(X,Y) + +#ifdef fgetc +#undef fgetc +inline int fgetc(FILE* f) { + return _io_fgetc(f); +} +#endif +#ifdef fread +#undef fread +inline size_t fread(void* ptr, size_t so, size_t no,FILE* f) { + return (_io_read((f),(ptr),(so)*(no))/(so)); +} +#endif +#ifdef fwrite +#undef fwrite +inline size_t fwrite(const void* ptr, size_t so, size_t no, FILE* f) { + return (_io_write((f),(void*)(ptr),(so)*(no))/(so)); +} +#endif +#ifdef puts +#undef puts +#define def_puts +#endif +#ifdef getline +#undef getline +inline int getline(char* x, int y) { + return _io_fgetline(stdin, x, y); +} +#endif +#ifdef read +#undef read +inline int read(FILE* f, const void* b, int a) { + return _io_read(f, (void*)b, a); +} +#endif +#ifdef write +#undef write +inline int write(FILE* f, void* b, int a) { + return _io_write(f, b, a); +} +#endif +#ifdef printf +#undef printf +#define def_printf +#endif +#ifdef sprintf +#undef sprintf +#define def_sprintf +#endif +#ifdef fprintf +#undef fprintf +inline int fprintf(FILE* s, const char* f, ...) { + va_list argp; + va_start(argp, f); + const int r = _io_vfprintf(s, f, argp); + va_end (argp); + return r; +} +#endif +#ifdef vprintf +#undef vprintf +#define def_vprintf +#endif +#ifdef vsprintf +#undef vsprintf +#define def_vsprintf +#endif +#ifdef vfprintf +#undef vfprintf +inline int vfprintf(FILE* s, const char* f, va_list argp) { + return _io_vfprintf(s, f, argp); +} +#endif +#ifdef fclose +#undef fclose +inline int fclose(FILE* f) { + return _io_fclose(f); +} +#endif +#ifdef fflush +#undef fflush +inline int fflush(FILE* f) { + return _io_fflush(f); +} +#endif +#ifdef fgets +#undef fgets +inline char* fgets(char* b, int a, FILE* f) { + return _io_fgets(b, a, f); +} +#endif +#ifdef fputs +#undef fputs +inline int fputs(const char* s, FILE* f) { + return _io_fputs(s, f); +} +#endif +#ifdef fopen +#undef fopen +inline FILE* fopen(const char* f, const char* m) { + return _io_fopen(f, m); +} +#endif +#ifdef fseek +#undef fseek +inline int fseek(FILE* f, long o, int s) { + return _io_fseek(f, o, s); +} +#endif +#ifdef ftell +#undef ftell +inline int ftell(FILE* f) { + return _io_ftell(f); +} +#endif +#ifdef ioctl +#undef ioctl +inline int ioctl(FILE* f, unsigned int r, void* p) +{ + return _io_ioctl(f, r, p); +} +#endif + +#include <stdio.h> + +#ifdef def_printf +#undef def_printf +inline int printf(const char* f, ...) { + va_list argp; + va_start(argp, f); + const int r = _io_vprintf(f, argp); + va_end (argp); + return r; +} +#endif +#ifdef def_sprintf +#undef def_sprintf +inline int sprintf(char* s, const char* f, ...) { + va_list argp; + va_start(argp, f); + const int r = _io_vsprintf(s, f, argp); + va_end (argp); + return r; +} +#endif +#ifdef def_vprintf +#undef def_vprintf +inline int vprintf(const char* f, va_list argp) { + return _io_vprintf(f, argp); +} +#endif +#ifdef def_vsprintf +#undef def_vsprintf +inline int vsprintf(char* s, const char* f, va_list argp) { + return _io_vsprintf(s, f, argp); +} +#endif +#ifdef def_puts +#undef def_puts +inline int puts(const char* str) { + return _io_fputs(str, stdout); +} +#endif +#endif + +#define ACE_HAS_LINGER_MS +#define ACE_HAS_WCHAR +#define ACE_SIZEOF_WCHAR 4 +#define ACE_HAS_SSIZE_T +#define ACE_HAS_SIG_ATOMIC_T +#define ACE_HAS_POSIX_TIME +#define ACE_HAS_SOCKLEN_T +#define ACE_HAS_DIRENT + +#define ACE_NEW_THROWS_EXCEPTIONS +#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB +#define ACE_TEXT_WIN32_FIND_DATA MFS_SEARCH_DATA + +#define ACE_LACKS_UNIX_SIGNALS +#define ACE_LACKS_SO_DONTROUTE +#define ACE_LACKS_WCSDUP +#define ACE_LACKS_WCSTOK +#define ACE_LACKS_ITOW +#define ACE_LACKS_WCSICMP +#define ACE_LACKS_WCSNICMP +#define ACE_LACKS_INET_NTOA +#define ACE_LACKS_RAND_R +#define ACE_LACKS_PUTENV +#define ACE_LACKS_PWD_FUNCTIONS +#define ACE_LACKS_SETSID +#define ACE_LACKS_SETGID +#define ACE_LACKS_GETEGID +#define ACE_LACKS_GETGID +#define ACE_LACKS_GETEUID +#define ACE_LACKS_SETEGID +#define ACE_LACKS_SETEUID +#define ACE_LACKS_SETREUID +#define ACE_LACKS_SETREGID +#define ACE_LACKS_SETUID +#define ACE_LACKS_GETUID +#define ACE_LACKS_GETPGID +#define ACE_LACKS_SETPGID +#define ACE_LACKS_GETPPID +#define ACE_LACKS_GETPID +#define ACE_LACKS_EXEC +#define ACE_LACKS_FORK +#define ACE_LACKS_GETOPT +#define ACE_LACKS_SBRK +#define ACE_LACKS_PIPE +#define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 1 +#define ACE_LACKS_ISATTY +#define ACE_LACKS_ALARM +#define ACE_LACKS_SYSCONF +#define ACE_LACKS_SWAB +#define ACE_LACKS_CADDR_T +#define ACE_LACKS_SETENV +#define ACE_LACKS_UNSETENV +#define ACE_LACKS_CUSERID +#define ACE_LACKS_MADVISE +#define ACE_LACKS_MMAP +#define ACE_LACKS_MPROTECT +#define ACE_LACKS_MSYNC +#define ACE_LACKS_MUNMAP +#define ACE_LACKS_STRPTIME +#define ACE_LACKS_GMTIME_R +#define ACE_LACKS_ASCTIME_R +#define ACE_LACKS_TZSET +#define ACE_LACKS_IOVEC +#define ACE_LACKS_ISASCII +#define ACE_LACKS_ISCTYPE +#define ACE_LACKS_READV +#define ACE_LACKS_WRITEV +#define ACE_LACKS_RECVMSG +#define ACE_LACKS_SENDMSG +#define ACE_LACKS_SOCKETPAIR +#define ACE_LACKS_GETHOSTBYADDR +#define ACE_LACKS_GETHOSTBYADDR_R +#define ACE_LACKS_GETHOSTBYNAME +#define ACE_LACKS_GETSERVBYNAME +#define ACE_LACKS_GETSERVBYNAME_R +#define ACE_LACKS_GAI_STRERROR +#define ACE_LACKS_GETPROTOBYNUMBER +#define ACE_LACKS_GETPROTOBYNUMBER_R +#define ACE_LACKS_GETPROTOBYNAME +#define ACE_LACKS_GETPROTOBYNAME_R +#define ACE_LACKS_STRUCT_DIR +#define ACE_LACKS_HOSTENT +#define ACE_LACKS_PROTOENT +#define ACE_LACKS_SERVENT +#define ACE_LACKS_RLIMIT +#define ACE_LACKS_WAIT +#define ACE_LACKS_WAITPID +#define ACE_LACKS_SIGEMPTYSET +#define ACE_LACKS_SIGADDSET +#define ACE_LACKS_IOSTREAM_TOTALLY +#define ACE_LACKS_ACE_IOSTREAM +#define ACE_LACKS_UNIX_SYSLOG +#define ACE_LACKS_UNAME +#define ACE_LACKS_IFCONF +#define ACE_LACKS_IFREQ +#define ACE_LACKS_STRRECVFD +#define ACE_MKDIR_LACKS_MODE + +// POSIX +#define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE +#define ACE_LACKS_SEMBUF_T +#define ACE_LACKS_UNIX_DOMAIN_SOCKETS +#define ACE_LACKS_KILL +#define NSIG 64 +#define FD_SETSIZE RTCSCFG_FD_SETSIZE +#define FD_SET RTCS_FD_SET +#define FD_CLR RTCS_FD_CLR +#define FD_ZERO RTCS_FD_ZERO +#define FD_ISSET RTCS_FD_ISSET +#define NFDBITS (sizeof (fd_mask) * 8) +typedef long fd_mask; +struct fd_set: public rtcs_fd_set { + fd_set() + : fds_bits(fd_array) { + } + uint32_t* fds_bits; +}; + +// File System Related +#define ACE_LACKS_MKTEMP +#define ACE_LACKS_MKSTEMP +#define ACE_LACKS_ACCESS +#define ACE_LACKS_REALPATH +#define ACE_LACKS_LSTAT +#define ACE_LACKS_MKFIFO +#define ACE_LACKS_UMASK +#define ACE_LACKS_DUP +#define ACE_LACKS_DUP2 +#define ACE_LACKS_FSYNC +#define ACE_LACKS_FTRUNCATE +#define ACE_LACKS_READLINK +#define ACE_LACKS_TRUNCATE +#define ACE_LACKS_TEMPNAM +#define ACE_LACKS_FCNTL +#define ACE_LACKS_REWINDDIR +#define ACE_LACKS_OPENDIR +#define ACE_LACKS_READDIR +#define ACE_LACKS_SEEKDIR +#define ACE_LACKS_TELLDIR +#define ACE_LACKS_CLOSEDIR +#define ACE_LACKS_ALPHASORT + +#define ACE_DEFINE_MISSING_ERRNOS + +#define O_NDELAY 1 + +struct stat +{ + long st_size; + long st_mtime; + long st_mode; + long st_nlink; +}; + +typedef unsigned int uid_t; +typedef unsigned int gid_t; +typedef long off_t; +typedef long loff_t; +typedef unsigned int mode_t; +typedef struct timespec timespec_t; + +struct timeval +{ + int tv_sec; + suseconds_t tv_usec; +}; + +#define MAXSYMLINKS 1 + +#define FIONBIO 0 + +#define S_IFMT 00170000 +#define S_IFREG 00100000 +#define S_IFDIR 00040000 +#define S_IFCHR 00020000 +#define ACE_LACKS_MODE_MASKS + +#define IP_TTL 0 +#define IP_TOS 0 + +#define ACE_IPPROTO_TCP SOL_TCP +#define TCP_NODELAY OPT_NOWAIT + +#endif + diff --git a/ACE/ace/os_include/netinet/os_in.h b/ACE/ace/os_include/netinet/os_in.h index 4c82df46183..f71e757532b 100644 --- a/ACE/ace/os_include/netinet/os_in.h +++ b/ACE/ace/os_include/netinet/os_in.h @@ -43,7 +43,7 @@ extern "C" # if defined (ACE_HAS_PHARLAP_RT) # define ACE_IPPROTO_TCP SOL_SOCKET -# else +# elif !defined (ACE_IPPROTO_TCP) # define ACE_IPPROTO_TCP IPPROTO_TCP # endif /* ACE_HAS_PHARLAP_RT */ diff --git a/ACE/ace/os_include/os_dirent.h b/ACE/ace/os_include/os_dirent.h index b5ce357e866..650fb402d96 100644 --- a/ACE/ace/os_include/os_dirent.h +++ b/ACE/ace/os_include/os_dirent.h @@ -64,8 +64,10 @@ struct ACE_DIR { /// The name of the directory we are looking into ACE_TCHAR *directory_name_; +#if !defined (ACE_MQX) /// Remember the handle between calls. HANDLE current_handle_; +#endif /// The struct for the results ACE_DIRENT *dirent_; diff --git a/ACE/ace/os_include/os_errno.h b/ACE/ace/os_include/os_errno.h index c083e7407ee..d132d73882c 100644 --- a/ACE/ace/os_include/os_errno.h +++ b/ACE/ace/os_include/os_errno.h @@ -31,6 +31,10 @@ #include /**/ <errnoLib.h> #endif /* ACE_VXWORKS */ +#ifndef ACE_CUSTOM_ERRNO_BASE +# define ACE_CUSTOM_ERRNO_BASE 1000 +#endif + // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" @@ -281,7 +285,7 @@ extern "C" void herror (const char *str); #endif /* ACE_HAS_H_ERRNO */ -#if defined (ACE_LACKS_ERRNO_H) +#if defined (ACE_LACKS_ERRNO_H) || defined (ACE_DEFINE_MISSING_ERRNOS) # if !defined (EPERM) # define EPERM 1 # endif /* EPERM */ @@ -378,7 +382,7 @@ void herror (const char *str); # if !defined (ERANGE) # define ERANGE 34 # endif /* ERANGE */ -# if !defined (EDEADLK) +# if !defined (EDEADLK) && !defined (ACE_MQX) // Conflicts with EILSEQ # define EDEADLK 36 # endif /* EDEADLK */ # if !defined (ENAMETOOLONG) @@ -393,7 +397,38 @@ void herror (const char *str); # if !defined (ENOTEMPTY) # define ENOTEMPTY 41 # endif /* ENOTEMPTY */ -#endif /* ACE_LACKS_ERRNO_H */ +# ifndef ETIME +# define ETIME 62 +# endif +# ifndef ECOMM +# define ECOMM 70 +# endif +# ifndef EAFNOSUPPORT +# define EAFNOSUPPORT 97 +# endif +# ifndef EADDRIUNSE +# define EADDRINUSE 98 +# endif +# ifndef ENETUNREACH +# define ENETUNREACH 101 +# endif +# ifndef ECONNRESET +# define ECONNRESET 104 +# endif +# ifndef ENOBUFS +# define ENOBUFS 105 +# endif +# ifndef EISCONN +# define EISCONN 106 +# endif +# ifndef ECONNREFUSED +# define ECONNREFUSED 111 +# endif +# ifndef EINPROGRESS +# define EINPROGRESS 115 +# endif + +#endif /* ACE_DEFINE_MISSING_ERRNOS */ #if defined (ACE_LACKS_T_ERRNO) extern int t_errno; @@ -425,7 +460,7 @@ extern int t_errno; #endif /* ECOMM */ #if !defined (EDEADLK) -# define EDEADLK 1000 /* Some large number.... */ +# define EDEADLK (ACE_CUSTOM_ERRNO_BASE) + 1 #endif /* !EDEADLK */ #if !defined (ENXIO) /* Needed in SOCK_Dgram_Mcast */ @@ -452,6 +487,11 @@ extern int t_errno; #define ESHUTDOWN ECANCELED #endif +#ifdef ACE_MQX +# define EWOULDBLOCK EAGAIN +# define ELOOP (ACE_CUSTOM_ERRNO_BASE) + 2 +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h index 6b2582b21c8..5693cb880e2 100644 --- a/ACE/ace/os_include/os_pthread.h +++ b/ACE/ace/os_include/os_pthread.h @@ -292,7 +292,7 @@ # define THR_EXPLICIT_SCHED 0x00800000 # define THR_SCHED_IO 0x01000000 -# if !defined (ACE_HAS_STHREADS) +# if !defined (ACE_HAS_STHREADS) && !defined (ACE_MQX) # if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_USES_FIFO_SEM) // This needs to be moved out of here. diff --git a/ACE/ace/os_include/os_unistd.h b/ACE/ace/os_include/os_unistd.h index 942a40c431f..55235d30398 100644 --- a/ACE/ace/os_include/os_unistd.h +++ b/ACE/ace/os_include/os_unistd.h @@ -51,6 +51,18 @@ # include /**/ <hostLib.h> #endif /* ACE_VXWORKS */ +#ifdef ACE_MQX +# if !defined (STDIN_FILENO) && defined (_LLIO_STDIN) +# define STDIN_FILENO (_LLIO_STDIN) +# endif +# if !defined (STDOUT_FILENO) && defined (_LLIO_STDOUT) +# define STDOUT_FILENO (_LLIO_STDOUT) +# endif +# if !defined (STDERR_FILENO) && defined (_LLIO_STDERR) +# define STDERR_FILENO (_LLIO_STDERR) +# endif +#endif + // Place all additions (especially function declarations) within extern "C" {} #ifdef __cplusplus extern "C" diff --git a/ACE/ace/os_include/sys/os_socket.h b/ACE/ace/os_include/sys/os_socket.h index 19b0eadb7cf..dbdba632729 100644 --- a/ACE/ace/os_include/sys/os_socket.h +++ b/ACE/ace/os_include/sys/os_socket.h @@ -28,6 +28,10 @@ # include /**/ <sys/socket.h> #endif /* !ACE_LACKS_SYS_SOCKET_H */ +#if defined (ACE_USES_SOCKET_H) +# include /**/ <socket.h> +#endif /* ACE_USES_SOCKET_H */ + #if defined (ACE_USES_SOCKLIB_H) # include /**/ <sockLib.h> #endif /* ACE_USES_SOCKLIB_H */ @@ -215,6 +219,7 @@ extern "C" #define ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE SSIZE_MAX #endif /* ACE_HAS_SOCK_BUF_SIZE_MAX_VALUE */ +#if !defined (ACE_SOCKET_LEN) #if defined (ACE_HAS_SOCKLEN_T) # if defined (__hpux) /* @@ -240,6 +245,7 @@ typedef size_t ACE_SOCKET_LEN; #else typedef int ACE_SOCKET_LEN; #endif /* ACE_HAS_SIZET_SOCKET_LEN */ +#endif /* ACE_SOCKET_LEN */ #if defined (ACE_HAS_NETLINK) # include /**/ <asm/types.h> diff --git a/ACE/bin/MakeProjectCreator/templates/gnu.mpd b/ACE/bin/MakeProjectCreator/templates/gnu.mpd index c00cab2da08..92ad6c02dc0 100644 --- a/ACE/bin/MakeProjectCreator/templates/gnu.mpd +++ b/ACE/bin/MakeProjectCreator/templates/gnu.mpd @@ -771,6 +771,8 @@ __postbuild__: $(VBIN) $(INSTALL) <%else%> <%if(sharedname || staticname)%> __postbuild__: $(VLIBS) $(INSTALL) +<%else%> +__postbuild__: $(GENERATED_DIRTY) <%endif%> <%endif%> diff --git a/ACE/include/makeinclude/platform_mqx_icc.GNU b/ACE/include/makeinclude/platform_mqx_icc.GNU new file mode 100644 index 00000000000..7d5559b384a --- /dev/null +++ b/ACE/include/makeinclude/platform_mqx_icc.GNU @@ -0,0 +1,90 @@ +# This file should allow ACE to be built on Windows, using the IAR compiler. + +MQX_CPU = PSP_CPU_MK70F120M +MQX_CPU_INC = cortex_m + +ifndef MQX_ROOT + $(error Please set MQX_ROOT to the toplevel directory of the MQX code.) +endif + +MQX_CONFIG_COMMON_DIR ?= "$(MQX_ROOT)/config/common" + +ifndef MQX_USER_CONFIG_DIR + $(error Please set MQX_USER_CONFIG_DIR to the directory containing the MQX user_config.h.) +endif + +ACE_PLATFORM_CONFIG ?= config-mqx.h +debug ?= 1 +optimize ?= 1 +threads ?= 1 +static_libs_only = 1 +gruntimelibselect ?= 1 + +AR = iarchive +ARFLAGS = -o +RANLIB = @true +AR.cc.override = $(RM) $@; echo $(filter %.o, $^) | xargs $(AR) $(ARFLAGS) $@ $(AREXTRA) + +fast ?= 0 + +IAR_PLATFORM ?= arm + +CC = icc$(IAR_PLATFORM) +CXX = icc$(IAR_PLATFORM) --c++ + +ifndef CXX_VERSION + CXX_VERSION := $(shell $(CXX) --version) +endif + +no_hidden_visibility ?= 1 + +ifeq ($(inline),0) + CPPFLAGS += --no_inline +endif + +ifeq ($(gruntimelibselect),1) + CFLAGS += --dlib_config DLib_Config_Normal.h +endif +ifeq ($(gruntimelibselect),2) + CFLAGS += --dlib_config DLib_Config_Full.h -DACE_MQX_DLIB_FULL +endif +ifeq ($(gruntimelibselect),3) + CFLAGS += --dlib_config $(DLIB_CONFIG) +endif + +CFLAGS += -I$(MQX_CONFIG_COMMON_DIR) -I$(MQX_USER_CONFIG_DIR) +MQX_IO_DIR=$(MQX_ROOT)/mqx/source/io +CFLAGS += -DMQX_CPU=$(MQX_CPU) --enable_restrict -I$(MQX_ROOT)/mqx/source/include -I$(MQX_ROOT)/mqx/source/psp/$(MQX_CPU_INC) -I$(MQX_ROOT)/mqx/source/psp/$(MQX_CPU_INC)/cpu -I$(MQX_ROOT)/mqx/source/psp/$(MQX_CPU_INC)/compiler/iar -I$(MQX_ROOT)/rtcs/source/include -I$(MQX_ROOT)/mqx/source/bsp/twrk70f120m -I$(MQX_IO_DIR)/adc -I$(MQX_IO_DIR)/asrc -I$(MQX_IO_DIR)/can -I$(MQX_IO_DIR)/cm -I$(MQX_IO_DIR)/core_mutex -I$(MQX_IO_DIR)/dcu4 -I$(MQX_IO_DIR)/debug -I$(MQX_IO_DIR)/dma -I$(MQX_IO_DIR)/enet -I$(MQX_IO_DIR)/esai -I$(MQX_IO_DIR)/esdhc -I$(MQX_IO_DIR)/fbdev -I$(MQX_IO_DIR)/flashx -I$(MQX_IO_DIR)/flextimer -I$(MQX_IO_DIR)/ftm -I$(MQX_IO_DIR)/gpio -I$(MQX_IO_DIR)/hmi -I$(MQX_IO_DIR)/hwtimer -I$(MQX_IO_DIR)/i2c -I$(MQX_IO_DIR)/i2s -I$(MQX_IO_DIR)/imxrt -I$(MQX_IO_DIR)/int_ctrl -I$(MQX_IO_DIR)/io_expander -I$(MQX_IO_DIR)/io_mem -I$(MQX_IO_DIR)/io_null -I$(MQX_IO_DIR)/lcd -I$(MQX_IO_DIR)/lpm -I$(MQX_IO_DIR)/lpm_mcore -I$(MQX_IO_DIR)/lwadc -I$(MQX_IO_DIR)/lwgpio -I$(MQX_IO_DIR)/mcg -I$(MQX_IO_DIR)/mu -I$(MQX_IO_DIR)/nandflash -I$(MQX_IO_DIR)/pcb -I$(MQX_IO_DIR)/pccard -I$(MQX_IO_DIR)/pcflash -I$(MQX_IO_DIR)/pipe -I$(MQX_IO_DIR)/qspi -I$(MQX_IO_DIR)/rnga -I$(MQX_IO_DIR)/rtc -I$(MQX_IO_DIR)/sai -I$(MQX_IO_DIR)/sdcard -I$(MQX_IO_DIR)/sdram -I$(MQX_IO_DIR)/sensor -I$(MQX_IO_DIR)/serial -I$(MQX_IO_DIR)/sim -I$(MQX_IO_DIR)/spi -I$(MQX_IO_DIR)/spi_legacy -I$(MQX_IO_DIR)/spi_slave -I$(MQX_IO_DIR)/tchres -I$(MQX_IO_DIR)/tfs -I$(MQX_IO_DIR)/timer -I$(MQX_IO_DIR)/usb -I$(MQX_IO_DIR)/usb_dcd -I$(MQX_IO_DIR)/gpio/kgpio -I$(MQX_IO_DIR)/sdcard/sdcard_spi -I$(MQX_IO_DIR)/sdcard/sdcard_esdhc -I$(MQX_IO_DIR)/flashx/freescale -I$(MQX_IO_DIR)/enet/macnet -I$(MQX_IO_DIR)/adc/kadc -I$(MQX_ROOT)/mfs/source/include -I$(MQX_ROOT)/posix/source/include + +ifeq ($(threads),1) + CPPFLAGS += -D_REENTRANT +endif # threads + +CCFLAGS += $(CFLAGS) +DCFLAGS += --debug +DLD = ilinkarm +LD = ilinkarm + +MQX_LIB_DIR ?= $(MQX_ROOT)/lib/twrk70f120m.iar/debug + +LDFLAGS += --config $(MQX_LIB_DIR)/bsp/intflash_sramdata.icf --redirect __iar_dlmalloc=malloc \ + --redirect __iar_dlcalloc=calloc --redirect __iar_dlfree=free --manual_dynamic_initialization +SYSTEM_LIBS = -L$(MQX_LIB_DIR)/bsp bsp.a \ + -L$(MQX_LIB_DIR)/psp psp.a \ + -L$(MQX_LIB_DIR)/mfs mfs.a \ + -L$(MQX_LIB_DIR)/rtcs rtcs.a \ + -L$(MQX_LIB_DIR)/posix posix.a + +LINK.cc.override = $(PURELINK) $(PRELINK) $(LD) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(SYSTEM_LIBS) $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK) + +OCFLAGS += -O + +ifeq ($(optimize),0) + # Disable all optimizing in code + CPPFLAGS += -On +endif + +SOFLAGS += $(CPPFLAGS) -shared +SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \ + $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o +PRELIB = @true diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp index bf1101c1c77..65115e9b27b 100644 --- a/ACE/tests/OS_Test.cpp +++ b/ACE/tests/OS_Test.cpp @@ -548,6 +548,9 @@ string_emulation_test (void) // ======================================================================== // Test strtok (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strtok (wchar_t version)\n"))); +# ifdef ACE_LACKS_WCSTOK + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" Skipped because platform lacks wcstok\n"))); +# else //FUZZ: enable check_for_lack_ACE_OS wchar_t strtok_r1[] = ACE_TEXT_WIDE ("A string of tokens"); @@ -565,6 +568,7 @@ string_emulation_test (void) ACE_TEXT_WIDE (" ")), ACE_TEXT_WIDE ("tokens") ) == 0); THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL (ACE_OS::strtok (0, ACE_TEXT_WIDE (" ")) == 0); +# endif /* ACE_LACKS_WCSTOK */ } diff --git a/ACE/tests/test_config.h b/ACE/tests/test_config.h index 1d1feaa3547..e606f048a21 100644 --- a/ACE/tests/test_config.h +++ b/ACE/tests/test_config.h @@ -88,36 +88,43 @@ size_t const ACE_MAX_THREADS = 4; #endif /* ACE_END_TEST */ #endif /* ACE_HAS_CONSOLE_TEST_OUTPUT */ -#ifndef ACE_START_TEST -#define ACE_START_TEST(NAME) \ +#ifdef ACE_TEST_LOG_TO_STDERR +# define ACE_TEST_LOG_MSG_FLAGS ACE_Log_Msg::STDERR | ACE_Log_Msg::VERBOSE_LITE +# define ACE_TEST_SET_OUTPUT(APPEND) +# define ACE_CLOSE_TEST_LOG +#else +# define ACE_TEST_LOG_MSG_FLAGS ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE +# define ACE_TEST_SET_OUTPUT(APPEND) \ + if (ace_file_stream::instance ()->set_output (program, APPEND) != 0) \ + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); +# define ACE_CLOSE_TEST_LOG ace_file_stream::instance ()->close () +#endif + +#define ACE_START_TEST_TEMPLATE(NAME, APPEND) \ const ACE_TCHAR *program = NAME; \ - if (ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE) != 0) \ + if (ACE_LOG_MSG->open (program, ACE_TEST_LOG_MSG_FLAGS) != 0) \ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open log_msg failed")), -1); \ - if (ace_file_stream::instance()->set_output (program) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_TEST_SET_OUTPUT (APPEND); \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) + +#ifndef ACE_START_TEST +# define ACE_START_TEST(NAME) ACE_START_TEST_TEMPLATE (NAME, 0) #endif /* ACE_START_TEST */ #ifndef ACE_END_TEST #define ACE_END_TEST \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ - ace_file_stream::instance()->close () + ACE_CLOSE_TEST_LOG; #endif /* ACE_END_TEST */ -#define ACE_CLOSE_TEST_LOG ace_file_stream::instance()->close () - -#define ACE_APPEND_LOG(NAME) \ - const ACE_TCHAR *program = NAME; \ - if (ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open log_msg failed")), -1); \ - if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); +#ifndef ACE_APPEND_LOG +# define ACE_APPEND_LOG(NAME) ACE_START_TEST_TEMPLATE (NAME, 1) +#endif /* ACE_APPEND_LOG */ #define ACE_END_LOG \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ ACE_LOG_MSG->set_flags(ACE_Log_Msg::SILENT); \ - ace_file_stream::instance()->close (); + ACE_CLOSE_TEST_LOG; #if defined (ACE_VXWORKS) // This is the only way I could figure out to avoid an error diff --git a/TAO/TAO_IDL/ast/ast_annotation_decl.cpp b/TAO/TAO_IDL/ast/ast_annotation_decl.cpp index 5ccaba059f2..45eab38d7d6 100644 --- a/TAO/TAO_IDL/ast/ast_annotation_decl.cpp +++ b/TAO/TAO_IDL/ast/ast_annotation_decl.cpp @@ -46,6 +46,7 @@ IMPL_NARROW_FROM_SCOPE (AST_Annotation_Decl) void AST_Annotation_Decl::escape_name (Identifier *name) { + FE_Utils::original_local_name (name); // Annotations can't clash with C++ keywords char *old_name = name->get_string (); char *new_name = new char [ACE_OS::strlen (old_name) + 2]; // '@' and '\0' if (new_name) diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp index e62a79fdf33..81411d16f63 100644 --- a/TAO/TAO_IDL/ast/ast_decl.cpp +++ b/TAO/TAO_IDL/ast/ast_decl.cpp @@ -1603,8 +1603,8 @@ void AST_Decl::dump_annotations (ACE_OSTREAM_TYPE &o, bool print_inline) { AST_Annotation_Appls::iterator - i = annotation_appls_->begin (), - finished = annotation_appls_->end (); + i = annotation_appls ().begin (), + finished = annotation_appls ().end (); for (; i != finished; ++i) { AST_Annotation_Appl* a = i->get (); diff --git a/TAO/TAO_IDL/docs/annotations.md b/TAO/TAO_IDL/docs/annotations.md index 6a9bac46b4e..052c5aabc50 100644 --- a/TAO/TAO_IDL/docs/annotations.md +++ b/TAO/TAO_IDL/docs/annotations.md @@ -7,7 +7,7 @@ compiler that uses `tao_idl`.** * [IDL Annotations](#idl-annotations) * [Special Cases of Annotations](#special-cases-of-annotations) - * [Unions Discriminators](#unions-discriminators) + * [Union Discriminators](#union-discriminators) * [Base Types in Sequences](#base-types-in-sequences) * [Base Types in Arrays](#base-types-in-arrays) * [Defining Annotations](#defining-annotations) @@ -17,7 +17,7 @@ compiler that uses `tao_idl`.** * [Reading `@document` Annotations](#reading-document-annotations) * [Reading Annotations Manually](#reading-annotations-manually) * [Reading Special Cases of Annotations](#reading-special-cases-of-annotations) - * [Unions Discriminators](#unions-discriminators-1) + * [Union Discriminators](#union-discriminators-1) * [Base Types in Sequences](#base-types-in-sequences-1) * [Base Types in Arrays](#base-types-in-arrays-1) * [Limitations](#limitations) @@ -65,7 +65,7 @@ struct Report { unsigned long index; @optional - Expiration_t expiration; + Time_t expiration; @optional Urgency_t urgency; @@ -87,15 +87,15 @@ compiler use these kinds of annotations. #### Union Discriminators -**[See Compiler Example](#unions-discriminators-1)** +**[See Compiler Example](#union-discriminators-1)** ``` -enum GradeType { +enum GradingSystem_t { PASS_FAIL, PASS_70, PASS_80 }; -union Grade switch (@key GradeType) { +union Grade_t switch (@key GradingSystem_t) { case PASS_FAIL: boolean pass; case PASS_70: @@ -289,9 +289,12 @@ inside it. To get the annotations for most nodes types, use `node->annotations ().find (annotation_decl)` where `annotation_decl` can be the -annotation declaration or its canonical name. This will return the last -`AST_Annotation_Appl*` of that type on the node or `NULL` if there no -annotation of that type. +`AST_Annotation_Decl` object or its canonical internal TAO IDL name (see next +paragraph). This will return the last `AST_Annotation_Appl*` of that type on +the node or `NULL` if there no annotation of that type. Because +`AST_Annotation_Appls::find` can take a `AST_Annotation_Decl`, they can be looked +up after `idl_eval` creates them and cached for a slightly faster +`find`. Internally, annotation local names are prefixed with `@` to prevent clashes with other elements in IDL with the same name. For example when trying to use @@ -304,11 +307,14 @@ the root module. In IDL, this annotation's full name would be `@foo::bar`or After that check, you can use index operators `[const char*]` on the annotation to get the individual members and `value()` to get the value. -The last part is not straightforward, as the value is a `AST_Expression` object +The last part is not straightforward, as the value is an `AST_Expression` object and `AST_Expression` is a complex class that handles constant values in TAO\_IDL. There are examples below but see `AST_Expression::AST_ExprValue` for how values can be accessed. +See `include/ast_expression.h` and `ast/ast_expression.cpp` for how +to use `AST_Expression`. + ### Reading `@document` Annotations In this example we will use the [`@document` annotation defined @@ -463,13 +469,14 @@ grammar and special handling in the API. The following cases show how to get the last annotation called `anno` from these special cases. -If a type is `typedef`-ed, resolve it completely using `AST_Type -*primitive_base_type ()` and `dynamic_cast` to the correct type before trying -to read these special cases. +To access these methods on a type that has been "`typedef`-ed", it must be +resolved completely using `AST_Type *primitive_base_type ()` and a +`dynamic_cast` to the correct type as these methods are specific to these +classes. -#### Unions Discriminators +#### Union Discriminators -**[See IDL Example](#unions-discriminators)** +**[See IDL Example](#union-discriminators)** ```C++ AST_Union *node = /* ... */; @@ -519,3 +526,8 @@ to fix memory leaks caused by annotations. This change involved replacing `typedef ACE_Vector<AST_Annotation_Appl> AST_Annotation_Appls` with a class of the same name. This also allowed for moving `UTL_find_annotation` into `AST_Annotation_Appls` as `find` for a nicer design. + +### TAO 2.5.6 + +The TAO IDL Frontend no longer internally prefixes annotation names and +annotation member names with `_cxx_` if they are also a C++ keyword. diff --git a/TAO/TAO_IDL/fe/fe_lookup.cpp b/TAO/TAO_IDL/fe/fe_lookup.cpp index 02e266926e7..9379a9bc8c1 100644 --- a/TAO/TAO_IDL/fe/fe_lookup.cpp +++ b/TAO/TAO_IDL/fe/fe_lookup.cpp @@ -2,7 +2,7 @@ #include "ace/OS_NS_string.h" /* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /mnt/arch/data/work/oci/ace_tao/tao_idl_fixes/ACE_TAO/ACE/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */ +/* Command-line: /home/fred/oci/ace_tao/tao_idl_fixes/ACE_TAO/ACE/bin/ace_gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */ unsigned int TAO_IDL_CPP_Keyword_Table::hash (const char *str, unsigned int len) { diff --git a/TAO/TAO_IDL/fe/idl.tab.cpp b/TAO/TAO_IDL/fe/idl.tab.cpp index ec67661f415..d38d0c5e995 100644 --- a/TAO/TAO_IDL/fe/idl.tab.cpp +++ b/TAO/TAO_IDL/fe/idl.tab.cpp @@ -668,46 +668,46 @@ static const yytype_uint16 yyrline[] = 2014, 2026, 2027, 2036, 2045, 2057, 2058, 2067, 2076, 2088, 2146, 2147, 2154, 2158, 2163, 2170, 2174, 2178, 2183, 2187, 2191, 2195, 2202, 2271, 2270, 2297, 2298, 2302, 2303, 2304, - 2306, 2305, 2314, 2315, 2319, 2373, 2377, 2384, 2397, 2407, - 2415, 2414, 2497, 2501, 2508, 2517, 2524, 2532, 2538, 2545, - 2556, 2555, 2564, 2568, 2572, 2576, 2602, 2610, 2609, 2681, - 2682, 2686, 2693, 2694, 2720, 2721, 2722, 2723, 2724, 2725, - 2726, 2727, 2731, 2732, 2733, 2734, 2738, 2739, 2740, 2744, - 2745, 2749, 2761, 2759, 2784, 2791, 2792, 2796, 2808, 2806, - 2831, 2838, 2854, 2872, 2873, 2877, 2881, 2885, 2892, 2896, - 2900, 2907, 2911, 2915, 2922, 2929, 2933, 2940, 2947, 2954, - 2961, 2969, 2968, 2982, 3013, 3017, 2981, 3034, 3037, 3038, - 3042, 3060, 3064, 3059, 3122, 3121, 3134, 3133, 3146, 3150, - 3183, 3187, 3246, 3250, 3145, 3272, 3279, 3292, 3301, 3308, - 3309, 3418, 3421, 3422, 3427, 3431, 3426, 3467, 3466, 3478, - 3488, 3506, 3514, 3513, 3527, 3531, 3526, 3547, 3546, 3597, - 3622, 3646, 3650, 3681, 3685, 3645, 3709, 3714, 3712, 3718, - 3722, 3762, 3766, 3760, 3854, 3925, 3934, 3924, 3948, 3958, - 3962, 3956, 4007, 4033, 4042, 4046, 4040, 4082, 4108, 4116, - 4115, 4162, 4172, 4190, 4198, 4202, 4197, 4262, 4263, 4268, - 4272, 4276, 4280, 4267, 4347, 4351, 4355, 4359, 4346, 4435, - 4439, 4468, 4472, 4434, 4488, 4492, 4558, 4562, 4486, 4597, - 4602, 4607, 4614, 4615, 4626, 4631, 4674, 4625, 4694, 4693, - 4702, 4701, 4712, 4717, 4715, 4721, 4726, 4730, 4725, 4769, - 4768, 4777, 4776, 4787, 4792, 4790, 4796, 4801, 4805, 4800, - 4850, 4857, 4858, 4859, 4966, 4970, 4974, 4982, 4986, 4981, - 4995, 5003, 5007, 5002, 5016, 5024, 5028, 5023, 5037, 5045, - 5049, 5044, 5058, 5065, 5077, 5075, 5098, 5105, 5133, 5170, - 5171, 5175, 5204, 5243, 5247, 5203, 5264, 5268, 5262, 5309, - 5308, 5316, 5323, 5324, 5329, 5328, 5337, 5336, 5345, 5344, - 5353, 5352, 5361, 5360, 5369, 5368, 5377, 5376, 5386, 5476, - 5482, 5507, 5613, 5622, 5626, 5632, 5704, 5776, 5850, 5849, - 5897, 5901, 5905, 5909, 5913, 5917, 5896, 5970, 5969, 5977, - 5984, 5989, 5997, 6001, 5996, 6011, 6012, 6016, 6018, 6017, - 6026, 6025, 6038, 6061, 6036, 6087, 6114, 6085, 6138, 6139, - 6140, 6144, 6145, 6149, 6176, 6206, 6250, 6254, 6204, 6269, - 6278, 6296, 6307, 6306, 6344, 6393, 6397, 6342, 6412, 6416, - 6423, 6427, 6431, 6435, 6439, 6443, 6447, 6451, 6455, 6459, - 6467, 6498, 6511, 6518, 6543, 6561, 6568, 6583, 6590, 6600, - 6604, 6624, 6628, 6599, 6641, 6647, 6650, 6657, 6656, 6663, - 6662, 6669, 6668, 6678, 6747, 6797, 6813, 6826, 6833, 6892, - 6897, 6901, 6896, 6962, 6966, 6961, 6979, 6980, 6985, 6984, - 6993, 6992, 7001, 7000, 7009, 7008 + 2306, 2305, 2314, 2315, 2319, 2375, 2379, 2386, 2399, 2409, + 2417, 2416, 2499, 2503, 2510, 2519, 2526, 2534, 2540, 2547, + 2560, 2559, 2568, 2572, 2576, 2580, 2606, 2614, 2613, 2685, + 2686, 2690, 2697, 2698, 2724, 2725, 2726, 2727, 2728, 2729, + 2730, 2731, 2735, 2736, 2737, 2738, 2742, 2743, 2744, 2748, + 2749, 2753, 2765, 2763, 2788, 2795, 2796, 2800, 2812, 2810, + 2835, 2842, 2858, 2876, 2877, 2881, 2885, 2889, 2896, 2900, + 2904, 2911, 2915, 2919, 2926, 2933, 2937, 2944, 2951, 2958, + 2965, 2973, 2972, 2986, 3017, 3021, 2985, 3038, 3041, 3042, + 3046, 3064, 3068, 3063, 3126, 3125, 3138, 3137, 3150, 3154, + 3187, 3191, 3250, 3254, 3149, 3276, 3283, 3296, 3305, 3312, + 3313, 3422, 3425, 3426, 3431, 3435, 3430, 3471, 3470, 3482, + 3492, 3510, 3518, 3517, 3531, 3535, 3530, 3551, 3550, 3601, + 3626, 3650, 3654, 3685, 3689, 3649, 3713, 3718, 3716, 3722, + 3726, 3766, 3770, 3764, 3858, 3929, 3938, 3928, 3952, 3962, + 3966, 3960, 4011, 4037, 4046, 4050, 4044, 4086, 4112, 4120, + 4119, 4166, 4176, 4194, 4202, 4206, 4201, 4266, 4267, 4272, + 4276, 4280, 4284, 4271, 4351, 4355, 4359, 4363, 4350, 4439, + 4443, 4472, 4476, 4438, 4492, 4496, 4562, 4566, 4490, 4601, + 4606, 4611, 4618, 4619, 4630, 4635, 4678, 4629, 4698, 4697, + 4706, 4705, 4716, 4721, 4719, 4725, 4730, 4734, 4729, 4773, + 4772, 4781, 4780, 4791, 4796, 4794, 4800, 4805, 4809, 4804, + 4854, 4861, 4862, 4863, 4970, 4974, 4978, 4986, 4990, 4985, + 4999, 5007, 5011, 5006, 5020, 5028, 5032, 5027, 5041, 5049, + 5053, 5048, 5062, 5069, 5081, 5079, 5102, 5109, 5137, 5174, + 5175, 5179, 5208, 5247, 5251, 5207, 5268, 5272, 5266, 5313, + 5312, 5320, 5327, 5328, 5333, 5332, 5341, 5340, 5349, 5348, + 5357, 5356, 5365, 5364, 5373, 5372, 5381, 5380, 5390, 5480, + 5486, 5511, 5617, 5626, 5630, 5636, 5708, 5780, 5854, 5853, + 5901, 5905, 5909, 5913, 5917, 5921, 5900, 5974, 5973, 5981, + 5988, 5993, 6001, 6005, 6000, 6015, 6016, 6020, 6022, 6021, + 6030, 6029, 6042, 6065, 6040, 6091, 6118, 6089, 6142, 6143, + 6144, 6148, 6149, 6153, 6180, 6210, 6254, 6258, 6208, 6273, + 6282, 6300, 6311, 6310, 6348, 6397, 6401, 6346, 6416, 6420, + 6427, 6431, 6435, 6439, 6443, 6447, 6451, 6455, 6459, 6463, + 6471, 6502, 6515, 6522, 6547, 6565, 6572, 6587, 6594, 6604, + 6608, 6628, 6632, 6603, 6645, 6651, 6654, 6661, 6660, 6667, + 6666, 6673, 6672, 6682, 6751, 6801, 6817, 6830, 6837, 6896, + 6901, 6905, 6900, 6966, 6970, 6965, 6983, 6984, 6989, 6988, + 6997, 6996, 7005, 7004, 7013, 7012 }; #endif @@ -4684,6 +4684,8 @@ yyreduce: AST_Expression::ExprType type = (yyvsp[-3].etval); Identifier *name = (yyvsp[-2].idval); + // Annotation Member Names Can't Clash with C++ keywords + FE_Utils::original_local_name (name); UTL_ScopedName *scoped_name = new UTL_ScopedName (name, 0); AST_Expression *default_value = (yyvsp[-1].exval); @@ -4728,27 +4730,27 @@ yyreduce: delete result; } } -#line 4732 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4734 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 205: -#line 2374 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2376 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.exval) = (yyvsp[0].exval); } -#line 4740 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4742 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 206: -#line 2378 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2380 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.exval) = 0; } -#line 4748 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4750 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 207: -#line 2385 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2387 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val); AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val); @@ -4758,11 +4760,11 @@ yyreduce: } (yyval.annotations_val) = annotations; } -#line 4762 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4764 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 208: -#line 2398 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2400 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val); AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val); @@ -4772,19 +4774,19 @@ yyreduce: } (yyval.annotations_val) = annotations; } -#line 4776 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4778 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 209: -#line 2408 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2410 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.annotations_val) = new AST_Annotation_Appls (); } -#line 4784 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4786 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 210: -#line 2415 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2417 "fe/idl.ypp" /* yacc.c:1651 */ { if (idl_global->idl_version_ < IDL_VERSION_4) { @@ -4837,11 +4839,11 @@ yyreduce: (yyval.annotation_decl_val) = decl; } -#line 4841 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4843 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 211: -#line 2468 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2470 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->ignore_lookup_errors_ = false; AST_Annotation_Appl *appl = 0; @@ -4868,27 +4870,27 @@ yyreduce: (yyval.annotation_val) = appl; } -#line 4872 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4874 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 212: -#line 2498 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2500 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.annotation_params_val) = (yyvsp[-1].annotation_params_val); } -#line 4880 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4882 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 213: -#line 2502 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2504 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.annotation_params_val) = 0; } -#line 4888 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4890 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 214: -#line 2509 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2511 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params; AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param; @@ -4897,99 +4899,101 @@ yyreduce: params->push (param); (yyval.annotation_params_val) = params; } -#line 4901 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4903 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 215: -#line 2518 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2520 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.annotation_params_val) = (yyvsp[0].annotation_params_val); } -#line 4909 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4911 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 216: -#line 2525 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2527 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val); params->push ((yyvsp[-1].annotation_param_val)); (yyval.annotation_params_val) = params; } -#line 4919 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4921 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 217: -#line 2533 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2535 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val); params->push ((yyvsp[-1].annotation_param_val)); (yyval.annotation_params_val) = params; } -#line 4929 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4931 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 218: -#line 2539 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2541 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.annotation_params_val) = new AST_Annotation_Appl::Params; } -#line 4937 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4939 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 219: -#line 2546 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2548 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param; param->id = (yyvsp[-2].idval); + // Annotation Member Names Can't Clash with C++ keywords + FE_Utils::original_local_name (param->id); param->expr = (yyvsp[0].exval); (yyval.annotation_param_val) = param; } -#line 4948 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4952 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 220: -#line 2556 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2560 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen); idl_global->in_typedef (true); } -#line 4957 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4961 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 221: -#line 2561 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2565 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = (yyvsp[0].dcval); } -#line 4965 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4969 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 222: -#line 2565 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2569 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = (yyvsp[0].dcval); } -#line 4973 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4977 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 223: -#line 2569 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2573 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = (yyvsp[0].dcval); } -#line 4981 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4985 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 224: -#line 2573 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2577 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = (yyvsp[0].dcval); } -#line 4989 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 4993 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 225: -#line 2577 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2581 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Native *node = 0; @@ -5015,27 +5019,27 @@ yyreduce: delete (yyvsp[0].deval); (yyvsp[0].deval) = 0; } -#line 5019 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5023 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 226: -#line 2603 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2607 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = 0; } -#line 5027 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5031 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 227: -#line 2610 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2614 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen); } -#line 5035 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5039 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 228: -#line 2614 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2618 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); FE_Declarator *d = 0; @@ -5100,22 +5104,22 @@ yyreduce: (yyval.dcval) = t; } -#line 5104 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5108 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 231: -#line 2687 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2691 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ( (yyvsp[0].etval) ); } -#line 5115 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5119 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 233: -#line 2695 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2699 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = 0; @@ -5138,30 +5142,30 @@ yyreduce: (yyval.dcval) = d; } -#line 5142 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5146 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 251: -#line 2750 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2754 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.dlval), UTL_DeclList ((yyvsp[-1].deval), (yyvsp[0].dlval)), 1); } -#line 5153 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5157 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 252: -#line 2761 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2765 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen); } -#line 5161 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5165 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 253: -#line 2765 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2769 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen); @@ -5181,38 +5185,38 @@ yyreduce: (yyval.dlval) = (yyvsp[-3].dlval); } } -#line 5185 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5189 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 254: -#line 2785 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2789 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dlval) = 0; } -#line 5193 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5197 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 257: -#line 2797 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2801 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.dlval), UTL_DeclList ((yyvsp[-1].deval), (yyvsp[0].dlval)), 1); } -#line 5204 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5208 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 258: -#line 2808 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2812 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen); } -#line 5212 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5216 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 259: -#line 2812 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2816 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen); @@ -5232,19 +5236,19 @@ yyreduce: (yyval.dlval) = (yyvsp[-3].dlval); } } -#line 5236 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5240 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 260: -#line 2832 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2836 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dlval) = 0; } -#line 5244 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5248 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 261: -#line 2839 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2843 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_ScopedName *sn = 0; ACE_NEW_RETURN (sn, @@ -5257,11 +5261,11 @@ yyreduce: 0), 1); } -#line 5261 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5265 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 262: -#line 2855 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2859 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_ScopedName *sn = 0; ACE_NEW_RETURN (sn, @@ -5276,156 +5280,156 @@ yyreduce: (yyvsp[0].dcval)), 1); } -#line 5280 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5284 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 265: -#line 2878 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2882 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_long; } -#line 5288 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5292 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 266: -#line 2882 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2886 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_longlong; } -#line 5296 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5300 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 267: -#line 2886 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2890 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_short; } -#line 5304 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5308 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 268: -#line 2893 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2897 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_ulong; } -#line 5312 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5316 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 269: -#line 2897 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2901 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_ulonglong; } -#line 5320 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5324 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 270: -#line 2901 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2905 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_ushort; } -#line 5328 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5332 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 271: -#line 2908 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2912 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_double; } -#line 5336 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5340 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 272: -#line 2912 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2916 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_float; } -#line 5344 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5348 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 273: -#line 2916 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2920 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_longdouble; } -#line 5352 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5356 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 274: -#line 2923 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2927 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_fixed; } -#line 5360 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5364 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 275: -#line 2930 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2934 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_char; } -#line 5368 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5372 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 276: -#line 2934 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2938 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_wchar; } -#line 5376 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5380 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 277: -#line 2941 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2945 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_octet; } -#line 5384 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5388 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 278: -#line 2948 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2952 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_bool; } -#line 5392 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5396 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 279: -#line 2955 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2959 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_any; } -#line 5400 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5404 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 280: -#line 2962 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2966 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.etval) = AST_Expression::EV_object; } -#line 5408 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5412 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 281: -#line 2969 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2973 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen); } -#line 5416 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5420 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 282: -#line 2973 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2977 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen); (yyval.idval) = (yyvsp[0].idval); } -#line 5425 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5429 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 283: -#line 2982 "fe/idl.ypp" /* yacc.c:1651 */ +#line 2986 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), 0); @@ -5456,27 +5460,27 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 5460 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5464 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 284: -#line 3013 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3017 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen); } -#line 5468 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5472 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 285: -#line 3017 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3021 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen); } -#line 5476 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5480 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 286: -#line 3021 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3025 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen); @@ -5488,11 +5492,11 @@ yyreduce: ); idl_global->scopes ().pop (); } -#line 5492 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5496 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 290: -#line 3043 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3047 "fe/idl.ypp" /* yacc.c:1651 */ { AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val); AST_Decls *members = (yyvsp[0].decls_val); @@ -5506,27 +5510,27 @@ yyreduce: delete annotations; delete members; } -#line 5510 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5514 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 291: -#line 3060 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3064 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen); } -#line 5518 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5522 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 292: -#line 3064 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3068 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen); } -#line 5526 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5530 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 293: -#line 3068 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3072 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); FE_Declarator *d = 0; @@ -5580,53 +5584,53 @@ yyreduce: (yyval.decls_val) = members; } -#line 5584 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5588 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 294: -#line 3122 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3126 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->err()->syntax_error (idl_global->parse_state ()); } -#line 5592 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5596 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 295: -#line 3126 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3130 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); yyerrok; } -#line 5601 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5605 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 296: -#line 3134 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3138 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen); } -#line 5609 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5613 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 297: -#line 3138 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3142 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen); (yyval.idval) = (yyvsp[0].idval); } -#line 5618 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5622 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 298: -#line 3146 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3150 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen); } -#line 5626 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5630 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 299: -#line 3150 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3154 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[-3].idval), 0); @@ -5659,19 +5663,19 @@ yyreduce: * Don't delete $1 yet; we'll need it a bit later. */ } -#line 5663 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5667 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 300: -#line 3183 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3187 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen); } -#line 5671 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5675 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 301: -#line 3187 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3191 "fe/idl.ypp" /* yacc.c:1651 */ { /* * The top of the scopes must be an empty union we added after we @@ -5730,27 +5734,27 @@ yyreduce: delete disc_annotations; } -#line 5734 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5738 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 302: -#line 3246 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3250 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen); } -#line 5742 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5746 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 303: -#line 3250 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3254 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen); } -#line 5750 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5754 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 304: -#line 3254 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3258 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen); @@ -5766,22 +5770,22 @@ yyreduce: idl_global->scopes ().pop (); } } -#line 5770 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5774 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 305: -#line 3273 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3277 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ( (yyvsp[0].etval) ); } -#line 5781 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5785 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 306: -#line 3280 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3284 "fe/idl.ypp" /* yacc.c:1651 */ { /* wchars are not allowed. */ if ((yyvsp[0].etval) == AST_Expression::EV_wchar) @@ -5794,11 +5798,11 @@ yyreduce: (yyvsp[0].etval) ); } -#line 5798 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5802 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 307: -#line 3293 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3297 "fe/idl.ypp" /* yacc.c:1651 */ { /* octets are not allowed. */ idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE); @@ -5807,22 +5811,22 @@ yyreduce: (yyvsp[0].etval) ); } -#line 5811 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5815 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 308: -#line 3302 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3306 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ( (yyvsp[0].etval) ); } -#line 5822 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5826 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 310: -#line 3310 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3314 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = 0; @@ -5929,27 +5933,27 @@ yyreduce: delete (yyvsp[0].idlist); (yyvsp[0].idlist) = 0; } -#line 5933 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5937 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 314: -#line 3427 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3431 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen); } -#line 5941 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5945 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 315: -#line 3431 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3435 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen); } -#line 5949 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5953 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 316: -#line 3435 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3439 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_UnionBranch *b = 0; @@ -5981,39 +5985,39 @@ yyreduce: delete annotations; } -#line 5985 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5989 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 317: -#line 3467 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3471 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->err()->syntax_error (idl_global->parse_state()); } -#line 5993 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 5997 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 318: -#line 3471 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3475 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); yyerrok; } -#line 6002 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6006 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 319: -#line 3479 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3483 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.llval), UTL_LabelList ((yyvsp[-1].ulval), (yyvsp[0].llval)), 1); } -#line 6013 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6017 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 320: -#line 3489 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3493 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_LabelList *ll = 0; ACE_NEW_RETURN (ll, @@ -6031,27 +6035,27 @@ yyreduce: (yyval.llval) = (yyvsp[-1].llval); } } -#line 6035 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6039 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 321: -#line 3507 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3511 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.llval) = 0; } -#line 6043 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6047 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 322: -#line 3514 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3518 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen); } -#line 6051 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6055 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 323: -#line 3518 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3522 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen); @@ -6060,27 +6064,27 @@ yyreduce: 0 ); } -#line 6064 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6068 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 324: -#line 3527 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3531 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen); } -#line 6072 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6076 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 325: -#line 3531 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3535 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen); } -#line 6080 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6084 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 326: -#line 3535 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3539 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen); @@ -6089,19 +6093,19 @@ yyreduce: (yyvsp[-2].exval) ); } -#line 6093 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6097 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 327: -#line 3547 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3551 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen); } -#line 6101 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6105 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 328: -#line 3551 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3555 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen); @@ -6145,11 +6149,11 @@ yyreduce: (yyvsp[0].deval) = 0; } } -#line 6149 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6153 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 329: -#line 3598 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3602 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -6171,11 +6175,11 @@ yyreduce: (yyval.dcval) = d; } -#line 6175 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6179 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 330: -#line 3623 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3627 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -6195,19 +6199,19 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 6199 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6203 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 331: -#line 3646 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3650 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen); } -#line 6207 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6211 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 332: -#line 3650 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3654 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), 0); @@ -6238,27 +6242,27 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 6242 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6246 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 333: -#line 3681 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3685 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen); } -#line 6250 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6254 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 334: -#line 3685 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3689 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen); } -#line 6258 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6262 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 335: -#line 3689 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3693 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen); @@ -6277,19 +6281,19 @@ yyreduce: idl_global->scopes ().pop (); } } -#line 6281 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6285 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 337: -#line 3714 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3718 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen); } -#line 6289 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6293 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 340: -#line 3723 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3727 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val); @@ -6324,27 +6328,27 @@ yyreduce: delete annotations; } -#line 6328 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6332 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 341: -#line 3762 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3766 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen); } -#line 6336 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6340 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 342: -#line 3766 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3770 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen); } -#line 6344 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6348 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 343: -#line 3770 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3774 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen); @@ -6429,11 +6433,11 @@ yyreduce: ev = 0; (yyval.dcval) = seq; } -#line 6433 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6437 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 344: -#line 3856 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3860 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen); @@ -6499,11 +6503,11 @@ yyreduce: delete type_annotations; (yyval.dcval) = seq; } -#line 6503 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6507 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 345: -#line 3925 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3929 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen); @@ -6512,19 +6516,19 @@ yyreduce: */ idl_global->scopes ().push (0); } -#line 6516 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6520 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 346: -#line 3934 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3938 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen); } -#line 6524 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6528 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 347: -#line 3938 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3942 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen); Decl_Annotations_Pair *seq_head = new Decl_Annotations_Pair; @@ -6532,36 +6536,36 @@ yyreduce: seq_head->annotations = (yyvsp[-1].annotations_val); (yyval.decl_annotations_pair_val) = seq_head; } -#line 6536 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6540 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 348: -#line 3949 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3953 "fe/idl.ypp" /* yacc.c:1651 */ { (yyvsp[-1].exval)->evaluate (AST_Expression::EK_positive_int); (yyval.dcval) = idl_global->gen ()->create_fixed ((yyvsp[-3].exval), (yyvsp[-1].exval)); } -#line 6545 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6549 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 349: -#line 3958 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3962 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen); } -#line 6553 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6557 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 350: -#line 3962 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3966 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen); } -#line 6561 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6565 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 351: -#line 3966 "fe/idl.ypp" /* yacc.c:1651 */ +#line 3970 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen); @@ -6603,11 +6607,11 @@ yyreduce: delete ev; ev = 0; } -#line 6607 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6611 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 352: -#line 4008 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4012 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted); @@ -6630,35 +6634,35 @@ yyreduce: (yyval.dcval) = tao_string_decl; } -#line 6634 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6638 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 353: -#line 4034 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4038 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen); } -#line 6642 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6646 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 354: -#line 4042 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4046 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen); } -#line 6650 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6654 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 355: -#line 4046 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4050 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen); } -#line 6658 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6662 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 356: -#line 4050 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4054 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen); @@ -6691,11 +6695,11 @@ yyreduce: (yyval.dcval) = string; } } -#line 6695 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6699 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 357: -#line 4083 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4087 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted); @@ -6718,27 +6722,27 @@ yyreduce: (yyval.dcval) = string; } -#line 6722 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6726 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 358: -#line 4109 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4113 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen); } -#line 6730 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6734 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 359: -#line 4116 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4120 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen); } -#line 6738 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6742 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 360: -#line 4120 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4124 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted); @@ -6778,22 +6782,22 @@ yyreduce: (yyval.dcval) = array; } -#line 6782 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6786 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 361: -#line 4163 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4167 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.elval), UTL_ExprList ((yyvsp[-1].exval), (yyvsp[0].elval)), 1); } -#line 6793 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6797 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 362: -#line 4173 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4177 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_ExprList *el = 0; ACE_NEW_RETURN (el, @@ -6811,35 +6815,35 @@ yyreduce: (yyval.elval) = (yyvsp[-1].elval); } } -#line 6815 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6819 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 363: -#line 4191 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4195 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.elval) = 0; } -#line 6823 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6827 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 364: -#line 4198 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4202 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen); } -#line 6831 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6835 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 365: -#line 4202 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4206 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen); } -#line 6839 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6843 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 366: -#line 4206 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4210 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen); @@ -6893,43 +6897,43 @@ yyreduce: delete ev; ev = 0; } -#line 6897 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6901 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 369: -#line 4268 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4272 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen); } -#line 6905 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6909 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 370: -#line 4272 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4276 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen); } -#line 6913 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6917 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 371: -#line 4276 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4280 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen); } -#line 6921 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6925 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 372: -#line 4280 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4284 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen); } -#line 6929 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6933 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 373: -#line 4284 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4288 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Attribute *a = 0; @@ -6989,43 +6993,43 @@ yyreduce: delete (yyvsp[-2].dlval); (yyvsp[-2].dlval) = 0; } -#line 6993 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 6997 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 374: -#line 4347 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4351 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen); } -#line 7001 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7005 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 375: -#line 4351 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4355 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen); } -#line 7009 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7013 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 376: -#line 4355 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4359 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen); } -#line 7017 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7021 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 377: -#line 4359 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4363 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseCompleted); } -#line 7025 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7029 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 378: -#line 4363 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4367 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Attribute *a = 0; @@ -7094,19 +7098,19 @@ yyreduce: delete (yyvsp[-4].dlval); (yyvsp[-4].dlval) = 0; } -#line 7098 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7102 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 379: -#line 4435 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4439 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen); } -#line 7106 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7110 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 380: -#line 4439 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4443 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -7135,27 +7139,27 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 7139 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7143 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 381: -#line 4468 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4472 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen); } -#line 7147 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7151 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 382: -#line 4472 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4476 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen); } -#line 7155 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7159 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 383: -#line 4476 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4480 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen); /* @@ -7163,19 +7167,19 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 7167 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7171 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 384: -#line 4488 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4492 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen); } -#line 7175 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7179 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 385: -#line 4492 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4496 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); Identifier id ((yyvsp[0].strval)); @@ -7241,27 +7245,27 @@ yyreduce: delete (yyvsp[-1].annotations_val); } -#line 7245 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7249 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 386: -#line 4558 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4562 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted); } -#line 7253 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7257 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 387: -#line 4562 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4566 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted); } -#line 7261 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7265 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 388: -#line 4566 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4570 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Operation *o = 0; @@ -7290,57 +7294,57 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 7294 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7298 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 389: -#line 4598 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4602 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen); (yyval.ofval) = AST_Operation::OP_oneway; } -#line 7303 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7307 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 390: -#line 4603 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4607 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen); (yyval.ofval) = AST_Operation::OP_idempotent; } -#line 7312 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7316 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 391: -#line 4608 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4612 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ofval) = AST_Operation::OP_noflags; } -#line 7320 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7324 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 393: -#line 4616 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4620 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ( AST_Expression::EV_void ); } -#line 7331 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7335 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 394: -#line 4626 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4630 "fe/idl.ypp" /* yacc.c:1651 */ { //@@ PS_FactorySeen? idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen); } -#line 7340 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7344 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 395: -#line 4631 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4635 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); @@ -7383,19 +7387,19 @@ yyreduce: delete (yyvsp[-1].annotations_val); } -#line 7387 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7391 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 396: -#line 4674 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4678 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted); } -#line 7395 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7399 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 397: -#line 4678 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4682 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted); @@ -7408,67 +7412,67 @@ yyreduce: idl_global->scopes ().pop (); } -#line 7412 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7416 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 398: -#line 4694 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4698 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen); } -#line 7420 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7424 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 399: -#line 4698 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4702 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen); } -#line 7428 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7432 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 400: -#line 4702 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4706 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen); } -#line 7436 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7440 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 401: -#line 4707 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4711 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen); } -#line 7444 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7448 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 403: -#line 4717 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4721 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen); } -#line 7452 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7456 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 406: -#line 4726 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4730 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen); } -#line 7460 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7464 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 407: -#line 4730 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4734 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen); } -#line 7468 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7472 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 408: -#line 4734 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4738 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Argument *a = 0; @@ -7500,67 +7504,67 @@ yyreduce: delete (yyvsp[0].deval); (yyvsp[0].deval) = 0; } -#line 7504 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7508 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 409: -#line 4769 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4773 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen); } -#line 7512 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7516 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 410: -#line 4773 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4777 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen); } -#line 7520 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7524 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 411: -#line 4777 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4781 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen); } -#line 7528 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7532 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 412: -#line 4782 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4786 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen); } -#line 7536 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7540 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 414: -#line 4792 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4796 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen); } -#line 7544 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7548 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 417: -#line 4801 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4805 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen); } -#line 7552 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7556 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 418: -#line 4805 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4809 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen); } -#line 7560 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7564 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 419: -#line 4809 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4813 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Argument *a = 0; @@ -7599,22 +7603,22 @@ yyreduce: delete (yyvsp[0].deval); (yyvsp[0].deval) = 0; } -#line 7603 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7607 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 420: -#line 4851 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4855 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ( (yyvsp[0].etval) ); } -#line 7614 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7618 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 423: -#line 4860 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4864 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = 0; @@ -7718,186 +7722,186 @@ yyreduce: (yyval.dcval) = d; } -#line 7722 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7726 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 424: -#line 4967 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4971 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dival) = AST_Argument::dir_IN; } -#line 7730 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7734 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 425: -#line 4971 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4975 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dival) = AST_Argument::dir_OUT; } -#line 7738 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7742 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 426: -#line 4975 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4979 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.dival) = AST_Argument::dir_INOUT; } -#line 7746 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7750 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 427: -#line 4982 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4986 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen); } -#line 7754 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7758 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 428: -#line 4986 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4990 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen); } -#line 7762 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7766 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 429: -#line 4991 "fe/idl.ypp" /* yacc.c:1651 */ +#line 4995 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen); (yyval.nlval) = (yyvsp[-1].nlval); } -#line 7771 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7775 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 430: -#line 4996 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5000 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.nlval) = 0; } -#line 7779 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7783 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 431: -#line 5003 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5007 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSeen); } -#line 7787 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7791 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 432: -#line 5007 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5011 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSqSeen); } -#line 7795 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7799 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 433: -#line 5012 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5016 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseQsSeen); (yyval.nlval) = (yyvsp[-1].nlval); } -#line 7804 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7808 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 434: -#line 5017 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5021 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.nlval) = 0; } -#line 7812 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7816 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 435: -#line 5024 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5028 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSeen); } -#line 7820 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7824 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 436: -#line 5028 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5032 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSqSeen); } -#line 7828 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7832 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 437: -#line 5033 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5037 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseQsSeen); (yyval.nlval) = (yyvsp[-1].nlval); } -#line 7837 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7841 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 438: -#line 5038 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5042 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.nlval) = 0; } -#line 7845 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7849 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 439: -#line 5045 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5049 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen); } -#line 7853 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7857 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 440: -#line 5049 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5053 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen); } -#line 7861 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7865 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 441: -#line 5054 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5058 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen); (yyval.slval) = (yyvsp[-1].slval); } -#line 7870 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7874 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 442: -#line 5059 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5063 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.slval) = 0; } -#line 7878 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7882 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 443: -#line 5066 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5070 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.slval), UTL_StrList ((yyvsp[-1].sval), (yyvsp[0].slval)), 1); } -#line 7889 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7893 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 444: -#line 5077 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5081 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen); } -#line 7897 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7901 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 445: -#line 5081 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5085 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_StrList *sl = 0; ACE_NEW_RETURN (sl, @@ -7915,19 +7919,19 @@ yyreduce: (yyval.slval) = (yyvsp[-3].slval); } } -#line 7919 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7923 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 446: -#line 5099 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5103 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.slval) = 0; } -#line 7927 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7931 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 447: -#line 5106 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5110 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = @@ -7952,11 +7956,11 @@ yyreduce: delete (yyvsp[0].sval); (yyvsp[0].sval) = 0; } -#line 7956 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7960 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 448: -#line 5134 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5138 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Decl *d = ScopeAsDecl (s); @@ -7990,11 +7994,11 @@ yyreduce: delete (yyvsp[0].sval); (yyvsp[0].sval) = 0; } -#line 7994 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 7998 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 451: -#line 5177 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5181 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -8018,11 +8022,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8022 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8026 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 452: -#line 5204 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5208 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Component *c = 0; @@ -8061,27 +8065,27 @@ yyreduce: */ idl_global->scopes ().push (c); } -#line 8065 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8069 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 453: -#line 5243 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5247 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSqSeen); } -#line 8073 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8077 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 454: -#line 5247 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5251 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ComponentBodySeen); } -#line 8081 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8085 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 455: -#line 5251 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5255 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ComponentQsSeen); @@ -8090,27 +8094,27 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 8094 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8098 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 456: -#line 5264 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5268 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ComponentIDSeen); } -#line 8102 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8106 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 457: -#line 5268 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5272 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen); } -#line 8110 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8114 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 458: -#line 5272 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5276 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen); @@ -8144,147 +8148,147 @@ yyreduce: (yyvsp[-2].idlist) = 0; } } -#line 8148 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8152 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 459: -#line 5309 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5313 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen); } -#line 8156 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8160 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 460: -#line 5313 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5317 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = (yyvsp[0].idlist); } -#line 8164 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8168 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 461: -#line 5317 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5321 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = 0; } -#line 8172 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8176 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 464: -#line 5329 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5333 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen); } -#line 8180 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8184 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 465: -#line 5333 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5337 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8188 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8192 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 466: -#line 5337 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5341 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen); } -#line 8196 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8200 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 467: -#line 5341 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5345 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8204 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8208 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 468: -#line 5345 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5349 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EmitsDeclSeen); } -#line 8212 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8216 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 469: -#line 5349 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5353 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8220 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8224 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 470: -#line 5353 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5357 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PublishesDeclSeen); } -#line 8228 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8232 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 471: -#line 5357 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5361 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8236 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8240 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 472: -#line 5361 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5365 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConsumesDeclSeen); } -#line 8244 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8248 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 473: -#line 5365 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5369 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8252 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8256 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 474: -#line 5369 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5373 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen); } -#line 8260 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8264 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 475: -#line 5373 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5377 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8268 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8272 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 476: -#line 5377 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5381 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen); } -#line 8276 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8280 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 477: -#line 5381 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5385 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8284 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8288 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 478: -#line 5387 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5391 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; @@ -8371,21 +8375,21 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8375 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8379 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 479: -#line 5477 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5481 "fe/idl.ypp" /* yacc.c:1651 */ { // Lookups and checking are done where the 'interface_type' // token is used, in 'provides_decl' and 'uses_decl'. (yyval.idlist) = (yyvsp[0].idlist); } -#line 8385 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8389 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 480: -#line 5483 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5487 "fe/idl.ypp" /* yacc.c:1651 */ { Identifier *corba_id = 0; @@ -8408,11 +8412,11 @@ yyreduce: conc_name), 1); } -#line 8412 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8416 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 481: -#line 5508 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5512 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; @@ -8515,37 +8519,37 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8519 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8523 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 482: -#line 5614 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5618 "fe/idl.ypp" /* yacc.c:1651 */ { // We use this extra rule here to use in both uses_decl and // extended_uses_decl, so the LALR(1) parser can avoid conflicts. (yyval.bval) = (yyvsp[0].bval); } -#line 8529 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8533 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 483: -#line 5623 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5627 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.bval) = true; } -#line 8537 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8541 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 484: -#line 5627 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5631 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.bval) = false; } -#line 8545 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8549 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 485: -#line 5633 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5637 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; @@ -8615,11 +8619,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8619 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8623 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 486: -#line 5705 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5709 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; @@ -8689,11 +8693,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8693 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8697 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 487: -#line 5777 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5781 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); bool so_far_so_good = true; @@ -8763,11 +8767,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 8767 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8771 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 488: -#line 5850 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5854 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Home *h = 0; @@ -8804,70 +8808,70 @@ yyreduce: */ idl_global->scopes ().push (h); } -#line 8808 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8812 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 489: -#line 5887 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5891 "fe/idl.ypp" /* yacc.c:1651 */ { /* * Done with this component - pop it off the scopes stack. */ idl_global->scopes ().pop (); } -#line 8819 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8823 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 490: -#line 5897 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5901 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_HomeSeen); } -#line 8827 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8831 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 491: -#line 5901 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5905 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_HomeIDSeen); } -#line 8835 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8839 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 492: -#line 5905 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5909 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen); } -#line 8843 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8847 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 493: -#line 5909 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5913 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen); } -#line 8851 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8855 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 494: -#line 5913 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5917 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ManagesSeen); } -#line 8859 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8863 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 495: -#line 5917 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5921 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ManagesIDSeen); } -#line 8867 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8871 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 496: -#line 5921 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5925 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PrimaryKeySpecSeen); @@ -8913,107 +8917,107 @@ yyreduce: (yyvsp[-6].nlval) = 0; } } -#line 8917 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8921 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 497: -#line 5970 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5974 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen); } -#line 8925 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8929 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 498: -#line 5974 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5978 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = (yyvsp[0].idlist); } -#line 8933 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8937 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 499: -#line 5978 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5982 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = 0; } -#line 8941 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8945 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 500: -#line 5986 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5990 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = (yyvsp[0].idlist); } -#line 8949 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8953 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 501: -#line 5990 "fe/idl.ypp" /* yacc.c:1651 */ +#line 5994 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idlist) = 0; } -#line 8957 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8961 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 502: -#line 5997 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6001 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_HomeSqSeen); } -#line 8965 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8969 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 503: -#line 6001 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6005 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_HomeBodySeen); } -#line 8973 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8977 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 504: -#line 6005 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6009 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_HomeQsSeen); } -#line 8981 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8985 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 508: -#line 6018 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6022 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_FactoryDeclSeen); } -#line 8989 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 8993 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 509: -#line 6022 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6026 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 8997 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9001 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 510: -#line 6026 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6030 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_FinderDeclSeen); } -#line 9005 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9009 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 511: -#line 6030 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6034 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 9013 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9017 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 512: -#line 6038 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6042 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -9036,19 +9040,19 @@ yyreduce: */ idl_global->scopes ().push (f); } -#line 9040 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9044 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 513: -#line 6061 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6065 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted); } -#line 9048 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9052 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 514: -#line 6065 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6069 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted); @@ -9066,11 +9070,11 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 9070 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9074 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 515: -#line 6087 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6091 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -9097,19 +9101,19 @@ yyreduce: */ idl_global->scopes ().push (f); } -#line 9101 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9105 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 516: -#line 6114 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6118 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted); } -#line 9109 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9113 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 517: -#line 6118 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6122 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted); @@ -9127,11 +9131,11 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 9131 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9135 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 523: -#line 6151 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6155 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -9154,11 +9158,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 9158 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9162 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 524: -#line 6179 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6183 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); UTL_ScopedName n ((yyvsp[0].idval), @@ -9181,11 +9185,11 @@ yyreduce: delete (yyvsp[0].idval); (yyvsp[0].idval) = 0; } -#line 9185 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9189 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 525: -#line 6206 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6210 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_EventType *e = 0; @@ -9229,27 +9233,27 @@ yyreduce: delete (yyvsp[-1].idval); (yyvsp[-1].idval) = 0; } -#line 9233 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9237 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 526: -#line 6250 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6254 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen); } -#line 9241 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9245 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 527: -#line 6254 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6258 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen); } -#line 9249 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9253 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 528: -#line 6258 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6262 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen); @@ -9258,19 +9262,19 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 9262 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9266 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 529: -#line 6272 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6276 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idval) = (yyvsp[0].idval); } -#line 9270 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9274 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 530: -#line 6281 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6285 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen); @@ -9283,29 +9287,29 @@ yyreduce: ACE_TEXT (" custom yet\n"))); (yyval.idval) = 0; } -#line 9287 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9291 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 531: -#line 6298 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6302 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen); (yyval.idval) = (yyvsp[0].idval); } -#line 9297 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9301 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 532: -#line 6307 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6311 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen); } -#line 9305 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9309 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 533: -#line 6311 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6315 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen); @@ -9334,11 +9338,11 @@ yyreduce: (yyvsp[-2].nlval) = 0; } } -#line 9338 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9342 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 534: -#line 6344 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6348 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_EventType *e = 0; @@ -9387,27 +9391,27 @@ yyreduce: */ idl_global->scopes ().push (e); } -#line 9391 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9395 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 535: -#line 6393 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6397 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen); } -#line 9399 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9403 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 536: -#line 6397 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6401 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen); } -#line 9407 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9411 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 537: -#line 6401 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6405 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen); @@ -9416,108 +9420,108 @@ yyreduce: */ idl_global->scopes ().pop (); } -#line 9420 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9424 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 538: -#line 6413 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6417 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idval) = (yyvsp[0].idval); } -#line 9428 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9432 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 539: -#line 6417 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6421 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.idval) = (yyvsp[0].idval); } -#line 9436 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9440 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 540: -#line 6424 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6428 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_type; } -#line 9444 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9448 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 541: -#line 6428 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6432 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_struct; } -#line 9452 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9456 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 542: -#line 6432 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6436 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_union; } -#line 9460 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9464 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 543: -#line 6436 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6440 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_eventtype; } -#line 9468 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9472 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 544: -#line 6440 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6444 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_sequence; } -#line 9476 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9480 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 545: -#line 6444 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6448 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_interface; } -#line 9484 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9488 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 546: -#line 6448 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6452 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_valuetype; } -#line 9492 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9496 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 547: -#line 6452 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6456 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_enum; } -#line 9500 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9504 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 548: -#line 6456 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6460 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_except; } -#line 9508 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9512 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 549: -#line 6460 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6464 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.ntval) = AST_Decl::NT_const; t_param_const_type = (yyvsp[0].etval); } -#line 9517 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9521 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 550: -#line 6468 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6472 "fe/idl.ypp" /* yacc.c:1651 */ { if ((yyvsp[0].plval) == 0) { @@ -9545,11 +9549,11 @@ yyreduce: (yyval.plval) = (yyvsp[0].plval); } -#line 9549 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9553 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 551: -#line 6499 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6503 "fe/idl.ypp" /* yacc.c:1651 */ { if ((yyvsp[-2].plval) == 0) { @@ -9562,19 +9566,19 @@ yyreduce: delete (yyvsp[0].pival); (yyvsp[0].pival) = 0; } -#line 9566 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9570 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 552: -#line 6512 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6516 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.plval) = 0; } -#line 9574 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9578 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 553: -#line 6519 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6523 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.pival), @@ -9599,11 +9603,11 @@ yyreduce: tao_enum_constant_decl = 0; } } -#line 9603 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9607 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 554: -#line 6544 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6548 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.pival), FE_Utils::T_Param_Info, @@ -9618,19 +9622,19 @@ yyreduce: ACE::strdelete ((yyvsp[0].strval)); (yyvsp[0].strval) = 0; } -#line 9622 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9626 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 555: -#line 6562 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6566 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.slval), UTL_StrList ((yyvsp[-1].sval), (yyvsp[0].slval)), 1); } -#line 9630 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9634 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 556: -#line 6569 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6573 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_StrList *sl = 0; ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), 0), 1); @@ -9645,37 +9649,37 @@ yyreduce: (yyval.slval) = (yyvsp[-2].slval); } } -#line 9649 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9653 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 557: -#line 6584 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6588 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.slval) = 0; } -#line 9657 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9661 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 558: -#line 6591 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6595 "fe/idl.ypp" /* yacc.c:1651 */ { ACE_NEW_RETURN ((yyval.sval), UTL_String ((yyvsp[0].strval), true), 1); } -#line 9667 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9671 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 559: -#line 6600 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6604 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSeen); } -#line 9675 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9679 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 560: -#line 6604 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6608 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeIDSeen); UTL_Scope *s = idl_global->scopes ().top_non_null (); @@ -9695,102 +9699,102 @@ yyreduce: delete (yyvsp[-1].annotations_val); } -#line 9699 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9703 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 561: -#line 6624 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6628 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSqSeen); } -#line 9707 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9711 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 562: -#line 6628 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6632 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeBodySeen); } -#line 9715 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9719 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 563: -#line 6632 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6636 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen); // Done with this port type - pop it off the scopes stack. idl_global->scopes ().pop (); } -#line 9726 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9730 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 564: -#line 6642 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6646 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9733 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9737 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 565: -#line 6648 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6652 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9740 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9744 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 566: -#line 6651 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6655 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9747 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9751 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 567: -#line 6657 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6661 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9754 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9758 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 568: -#line 6660 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6664 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9761 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9765 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 569: -#line 6663 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6667 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9768 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9772 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 570: -#line 6666 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6670 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9775 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9779 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 571: -#line 6669 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6673 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen); } -#line 9783 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9787 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 572: -#line 6673 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6677 "fe/idl.ypp" /* yacc.c:1651 */ { } -#line 9790 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9794 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 573: -#line 6679 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6683 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen); UTL_Scope *s = idl_global->scopes ().top_non_null (); @@ -9859,11 +9863,11 @@ yyreduce: delete (yyvsp[-1].idlist); (yyvsp[-1].idlist) = 0; } -#line 9863 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9867 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 574: -#line 6748 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6752 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_MirrorPortDeclSeen); UTL_Scope *s = idl_global->scopes ().top_non_null (); @@ -9910,11 +9914,11 @@ yyreduce: delete (yyvsp[-1].idlist); (yyvsp[-1].idlist) = 0; } -#line 9914 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9918 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 575: -#line 6798 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6802 "fe/idl.ypp" /* yacc.c:1651 */ { if ((yyvsp[0].alval) == 0) { @@ -9927,11 +9931,11 @@ yyreduce: (yyvsp[0].alval)->enqueue_head ((yyvsp[-1].dcval)); (yyval.alval) = (yyvsp[0].alval); } -#line 9931 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9935 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 576: -#line 6814 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6818 "fe/idl.ypp" /* yacc.c:1651 */ { if ((yyvsp[-3].alval) == 0) { @@ -9944,19 +9948,19 @@ yyreduce: (yyvsp[-3].alval)->enqueue_tail ((yyvsp[0].dcval)); (yyval.alval) = (yyvsp[-3].alval); } -#line 9948 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9952 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 577: -#line 6827 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6831 "fe/idl.ypp" /* yacc.c:1651 */ { (yyval.alval) = 0; } -#line 9956 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 9960 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 578: -#line 6834 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6838 "fe/idl.ypp" /* yacc.c:1651 */ { // To avoid grammar conflicts with this LALR(1) parser, // we take advantage of the fact that an expression can @@ -10012,27 +10016,27 @@ yyreduce: 0); } } -#line 10016 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10020 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 580: -#line 6897 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6901 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSeen); } -#line 10024 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10028 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 581: -#line 6901 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6905 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorIDSeen); } -#line 10032 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10036 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 582: -#line 6905 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6909 "fe/idl.ypp" /* yacc.c:1651 */ { UTL_Scope *s = idl_global->scopes ().top_non_null (); AST_Connector *parent = 0; @@ -10086,102 +10090,102 @@ yyreduce: delete (yyvsp[-3].annotations_val); } -#line 10090 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10094 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 583: -#line 6962 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6966 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSqSeen); } -#line 10098 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10102 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 584: -#line 6966 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6970 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorBodySeen); } -#line 10106 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10110 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 585: -#line 6970 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6974 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorQsSeen); // Done with this connector - pop it off the scope stack. idl_global->scopes ().pop (); } -#line 10117 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10121 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 588: -#line 6985 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6989 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen); } -#line 10125 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10129 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 589: -#line 6989 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6993 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 10133 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10137 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 590: -#line 6993 "fe/idl.ypp" /* yacc.c:1651 */ +#line 6997 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen); } -#line 10141 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10145 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 591: -#line 6997 "fe/idl.ypp" /* yacc.c:1651 */ +#line 7001 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 10149 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10153 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 592: -#line 7001 "fe/idl.ypp" /* yacc.c:1651 */ +#line 7005 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen); } -#line 10157 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10161 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 593: -#line 7005 "fe/idl.ypp" /* yacc.c:1651 */ +#line 7009 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 10165 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10169 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 594: -#line 7009 "fe/idl.ypp" /* yacc.c:1651 */ +#line 7013 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen); } -#line 10173 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10177 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; case 595: -#line 7013 "fe/idl.ypp" /* yacc.c:1651 */ +#line 7017 "fe/idl.ypp" /* yacc.c:1651 */ { idl_global->set_parse_state (IDL_GlobalData::PS_NoState); } -#line 10181 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10185 "fe/idl.tab.cpp" /* yacc.c:1651 */ break; -#line 10185 "fe/idl.tab.cpp" /* yacc.c:1651 */ +#line 10189 "fe/idl.tab.cpp" /* yacc.c:1651 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -10409,7 +10413,7 @@ yyreturn: #endif return yyresult; } -#line 7018 "fe/idl.ypp" /* yacc.c:1910 */ +#line 7022 "fe/idl.ypp" /* yacc.c:1910 */ /* programs */ diff --git a/TAO/TAO_IDL/fe/idl.ypp b/TAO/TAO_IDL/fe/idl.ypp index f0b51967b8b..87715d364ec 100644 --- a/TAO/TAO_IDL/fe/idl.ypp +++ b/TAO/TAO_IDL/fe/idl.ypp @@ -2323,6 +2323,8 @@ annotation_member AST_Expression::ExprType type = $1; Identifier *name = $2; + // Annotation member names can't clash with C++ keywords + FE_Utils::original_local_name (name); UTL_ScopedName *scoped_name = new UTL_ScopedName (name, 0); AST_Expression *default_value = $3; @@ -2546,6 +2548,8 @@ named_annotation_appl_param { AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param; param->id = $1; + // Annotation Member Names Can't Clash with C++ keywords + FE_Utils::original_local_name (param->id); param->expr = $3; $$ = param; } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index 50ca6ae1667..4d5b68919d8 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -299,7 +299,7 @@ TAO::PG_Group_Factory::groups_at_location ( const PortableGroup::Location & the_location) { Group_Map & group_map = this->get_group_map (); - size_t upper_limit = group_map.current_size (); + CORBA::ULong const upper_limit = static_cast<CORBA::ULong> (group_map.current_size ()); PortableGroup::ObjectGroups * result = 0; ACE_NEW_THROW_EX ( result, @@ -308,7 +308,7 @@ TAO::PG_Group_Factory::groups_at_location ( result->length(upper_limit); - size_t group_count = 0; + CORBA::ULong group_count = 0; for (Group_Map_Iterator it = group_map.begin (); it != group_map.end (); ++it) @@ -328,7 +328,7 @@ PortableGroup::ObjectGroups * TAO::PG_Group_Factory::all_groups (void) { Group_Map & group_map = this->get_group_map (); - size_t upper_limit = group_map.current_size (); + CORBA::ULong const upper_limit = static_cast<CORBA::ULong> (group_map.current_size ()); PortableGroup::ObjectGroups * result = 0; ACE_NEW_THROW_EX ( result, @@ -337,7 +337,7 @@ TAO::PG_Group_Factory::all_groups (void) result->length(upper_limit); - size_t group_count = 0; + CORBA::ULong group_count = 0; for (Group_Map_Iterator it = group_map.begin (); it != group_map.end (); ++it) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp index 266859dfd9f..566182384dd 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp @@ -601,7 +601,7 @@ TAO::PG_Object_Group_Storable::write (TAO::Storable_Base & stream) stream << properties_cdr; ///// members_ ///// - int num_members = this->members_.current_size (); + size_t const num_members = this->members_.current_size (); stream << num_members; for (MemberMap_Iterator it = this->members_.begin (); it != this->members_.end (); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp index 858e3b1e703..590c5faa2d7 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp @@ -40,9 +40,9 @@ void TAO_PG::Properties_Encoder::encode ( PortableGroup::Properties * property_set) const { ACE_ASSERT (property_set != 0); - size_t count = values_.size(); + CORBA::ULong const count = static_cast<CORBA::ULong> (values_.size()); property_set->length(count); - for( size_t nItem = 0; nItem < count; ++nItem ) + for( CORBA::ULong nItem = 0; nItem < count; ++nItem ) { const NamedValue & nv = values_[nItem]; PortableGroup::Property & property = (*property_set)[nItem]; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp index e074d429f4f..bf18a767a8a 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp @@ -54,8 +54,8 @@ TAO::PG_Property_Set::decode (const PortableGroup::Properties & property_set) { ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->internals_); - size_t count = property_set.length (); - for (size_t nItem = 0; nItem < count; ++nItem) + CORBA::ULong const count = property_set.length (); + for (CORBA::ULong nItem = 0; nItem < count; ++nItem) { const PortableGroup::Property & property = property_set[nItem]; const CosNaming::Name & nsName = property.nam; @@ -112,8 +112,8 @@ void TAO::PG_Property_Set::clear () void TAO::PG_Property_Set::remove (const PortableGroup::Properties & property_set) { ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->internals_); - size_t count = property_set.length (); - for (size_t nItem = 0; nItem < count; ++nItem) + CORBA::ULong const count = property_set.length (); + for (CORBA::ULong nItem = 0; nItem < count; ++nItem) { const PortableGroup::Property & property = property_set[nItem]; const CosNaming::Name & nsName = property.nam; @@ -170,9 +170,9 @@ void TAO::PG_Property_Set::export_properties(PortableGroup::Properties & propert ValueMap merged_values; this->merge_properties (merged_values); - property_set.length (merged_values.current_size ()); + property_set.length (static_cast<CORBA::ULong> (merged_values.current_size ())); - size_t pos = 0; + CORBA::ULong pos = 0; for (ValueMapIterator it = merged_values.begin (); it != merged_values.end (); ++it) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp index 54a4d77aad0..869c727e0ed 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp @@ -38,7 +38,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length, { // Let the caller use the first part of this // message block. - block.iov_len = max_length; + block.iov_len = static_cast<u_long> (max_length); block.iov_base = this->iov_[this->iov_index_].iov_base; // Break up the block. @@ -57,7 +57,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length, if (this->iov_len_left_ <= max_length) { // Return everything that's left in the block. - block.iov_len = this->iov_len_left_; + block.iov_len = static_cast<u_long> (this->iov_len_left_); block.iov_base = this->iov_ptr_; // Go to the next block. @@ -71,7 +71,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length, else { // Split a little more off the block. - block.iov_len = max_length; + block.iov_len = static_cast<u_long> (max_length); block.iov_base = this->iov_ptr_; this->iov_len_left_ -= max_length; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp index f41d5f3116a..5090520c7c5 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp @@ -94,7 +94,7 @@ TAO_UIPMC_Profile::decode (TAO_InputCDR& cdr) { // The following is a selective reproduction of TAO_Profile::decode - CORBA::ULong encap_len = cdr.length (); + CORBA::ULong const encap_len = static_cast<CORBA::ULong> (cdr.length ()); // Read and verify major, minor versions, ignoring profiles // whose versions we don't understand. diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 32eebdc1b99..3a7f2807b69 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -462,7 +462,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr, this->creation_strategy_, this->accept_strategy_, this->concurrency_strategy_, - 0, 0, 0, 1, + 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT, this->reuse_addr_) == -1) { if (TAO_debug_level > 0) @@ -498,7 +498,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr, this->creation_strategy_, this->accept_strategy_, this->concurrency_strategy_, - 0, 0, 0, 1, + 0, 0, 0, ACE_DEFAULT_ACCEPTOR_USE_SELECT, this->reuse_addr_) != -1) { found_a_port = true; diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index c9f13c78cff..552eff0856b 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -380,7 +380,11 @@ TAO_IIOP_Connection_Handler::close_connection (void) { struct linger lval; lval.l_onoff = 1; +#if defined(ACE_HAS_LINGER_MS) + lval.l_linger_ms = linger * 1000; +#else lval.l_linger = (u_short)linger; +#endif if (this->peer ().set_option(SOL_SOCKET, SO_LINGER, (void*) &lval, @@ -662,9 +666,8 @@ TAO_IIOP_Connection_Handler::set_dscp_codepoint (CORBA::Boolean set_network_prio void TAO_IIOP_Connection_Handler::abort (void) { - struct linger lval; + struct linger lval = { 0, 0 }; lval.l_onoff = 1; - lval.l_linger = 0; if (this->peer ().set_option(SOL_SOCKET, SO_LINGER, diff --git a/TAO/tests/IDLv4/annotations/be_init.cpp b/TAO/tests/IDLv4/annotations/be_init.cpp index cdde0a1562e..d0082601d3d 100644 --- a/TAO/tests/IDLv4/annotations/be_init.cpp +++ b/TAO/tests/IDLv4/annotations/be_init.cpp @@ -82,7 +82,8 @@ public: ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Annotation Test: %C: ") ACE_TEXT ("FAILED because of syntax error in:\n%C\n") - ACE_TEXT ("Check Syntax Error Message Above For More Infomation\n"), + ACE_TEXT ("Check syntax error message above for more information.\n"), + ACE_TEXT ("Failures beyond this might be false positives.\n"), name_, idl_)); ++failed_test_count; } @@ -712,6 +713,21 @@ BE_post_init (char *[], long) t.assert_annotation_member_value (value, constant_annotation_x); } catch (Failed const &) {} + AST_Annotation_Decl *boolean_annotation = 0; + try { + Annotation_Test t ("Annotation Declaration with Single Boolean"); + boolean_annotation = t.run ( + "@annotation boolean_annotation {\n" + " boolean value default TRUE;\n" + "};\n" + ).assert_annotation_decl ("@boolean_annotation"); + t.assert_annotation_member_count (boolean_annotation, 1); + AST_Annotation_Member *value = + t.get_annotation_member (boolean_annotation, "value"); + t.assert_annotation_member_type (value, AST_Expression::EV_bool); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> (value, true); + } catch (Failed const &) {} + /* ------------------------------------------------------------------------- * Annotations Applications * ------------------------------------------------------------------------- @@ -1169,6 +1185,62 @@ BE_post_init (char *[], long) } } catch (Failed const &) {} + try { + Annotation_Test t ("Annotation Application with Single Boolean"); + t.run ( + "struct struct13 {\n" + " @boolean_annotation\n" + " short test_member_1;\n" + " @boolean_annotation (TRUE)\n" + " short test_member_2;\n" + " @boolean_annotation (FALSE)\n" + " short test_member_3;\n" + " @boolean_annotation (value = TRUE)\n" + " short test_member_4;\n" + " @boolean_annotation (value = FALSE)\n" + " short test_member_5;\n" + "};\n" + ); + + AST_Decl *struct_member = 0; + AST_Annotation_Appl *appl = 0; + + struct_member = t.assert_node ("struct13::test_member_1"); + t.assert_annotation_appl_count (struct_member, 1); + appl = t.assert_annotation_appl (struct_member, 0, boolean_annotation); + t.assert_annotation_member_count (appl, 1); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> ( + t.get_annotation_member (appl, "value"), true); + + struct_member = t.assert_node ("struct13::test_member_2"); + t.assert_annotation_appl_count (struct_member, 1); + appl = t.assert_annotation_appl (struct_member, 0, boolean_annotation); + t.assert_annotation_member_count (appl, 1); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> ( + t.get_annotation_member (appl, "value"), true); + + struct_member = t.assert_node ("struct13::test_member_3"); + t.assert_annotation_appl_count (struct_member, 1); + appl = t.assert_annotation_appl (struct_member, 0, boolean_annotation); + t.assert_annotation_member_count (appl, 1); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> ( + t.get_annotation_member (appl, "value"), false); + + struct_member = t.assert_node ("struct13::test_member_4"); + t.assert_annotation_appl_count (struct_member, 1); + appl = t.assert_annotation_appl (struct_member, 0, boolean_annotation); + t.assert_annotation_member_count (appl, 1); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> ( + t.get_annotation_member (appl, "value"), true); + + struct_member = t.assert_node ("struct13::test_member_5"); + t.assert_annotation_appl_count (struct_member, 1); + appl = t.assert_annotation_appl (struct_member, 0, boolean_annotation); + t.assert_annotation_member_count (appl, 1); + t.assert_annotation_member_value<bool, ACE_CDR::Boolean> ( + t.get_annotation_member (appl, "value"), false); + } catch (Failed const &) {} + /* ------------------------------------------------------------------------- * Annotation Names * ------------------------------------------------------------------------- |