diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-02-04 19:50:28 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-02-04 19:50:28 +0000 |
commit | 0a5c8f1f8c5ba158170c7626b00db5141eac3f4e (patch) | |
tree | 055e235432462e72abda83bd87b75937802d3fb4 /ACE/ace | |
parent | 77c574eb7667c13c270942faf46a0636e1e79fdf (diff) | |
download | ATCD-0a5c8f1f8c5ba158170c7626b00db5141eac3f4e.tar.gz |
Mon Feb 4 19:48:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Naming_Context.cpp | 50 | ||||
-rw-r--r-- | ACE/ace/Naming_Context.h | 10 | ||||
-rw-r--r-- | ACE/ace/Naming_Context.inl | 44 | ||||
-rw-r--r-- | ACE/ace/Obstack_T.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Select_Reactor_Base.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/config-vxworks6.6.h | 329 |
6 files changed, 75 insertions, 377 deletions
diff --git a/ACE/ace/Naming_Context.cpp b/ACE/ace/Naming_Context.cpp index 47076fc7f6e..71602de6b44 100644 --- a/ACE/ace/Naming_Context.cpp +++ b/ACE/ace/Naming_Context.cpp @@ -16,6 +16,10 @@ ACE_RCSID(ace, Naming_Context, "$Id$") +#if !defined (__ACE_INLINE__) +#include "ace/Naming_Context.inl" +#endif /* __ACE_INLINE__ */ + ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Make life easier later on... @@ -411,7 +415,7 @@ ACE_Naming_Context::fini (void) ACE_Name_Options::ACE_Name_Options (void) : debugging_ (0), verbosity_ (0), - use_registry_ (0), + use_registry_ (false), nameserver_port_ (ACE_DEFAULT_SERVER_PORT), nameserver_host_ (ACE_OS::strdup (ACE_DEFAULT_SERVER_HOST)), process_name_ (0), @@ -536,48 +540,6 @@ ACE_Name_Options::context (ACE_Naming_Context::Context_Scope_Type context) this->context_ = context; } -const ACE_TCHAR * -ACE_Name_Options::process_name (void) -{ - ACE_TRACE ("ACE_Name_Options::process_name"); - return this->process_name_; -} - -const ACE_TCHAR * -ACE_Name_Options::namespace_dir (void) -{ - ACE_TRACE ("ACE_Name_Options::namespace_dir"); - return this->namespace_dir_; -} - -int -ACE_Name_Options::debug (void) -{ - ACE_TRACE ("ACE_Name_Options::debug"); - return this->debugging_; -} - -int -ACE_Name_Options::use_registry (void) -{ - ACE_TRACE ("ACE_Name_Options::use_registry"); - return this->use_registry_; -} - -void -ACE_Name_Options::use_registry (int x) -{ - ACE_TRACE ("ACE_Name_Options::use_registry"); - this->use_registry_ = x; -} - -int -ACE_Name_Options::verbose (void) -{ - ACE_TRACE ("ACE_Name_Options::verbose"); - return this->verbosity_; -} - void ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[]) { @@ -619,7 +581,7 @@ ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[]) this->debugging_ = 1; break; case 'r': - this->use_registry_ = 1; + this->use_registry_ = true; break; case 'h': this->nameserver_host (get_opt.opt_arg ()); diff --git a/ACE/ace/Naming_Context.h b/ACE/ace/Naming_Context.h index ffd365be089..6cd91e3e212 100644 --- a/ACE/ace/Naming_Context.h +++ b/ACE/ace/Naming_Context.h @@ -331,10 +331,10 @@ public: char *base_address (void); /// Get use of registry in naming - int use_registry (void); + bool use_registry (void) const; /// Set use of registry in naming - void use_registry (int); + void use_registry (bool x); /// Return debug status int debug (void); @@ -350,7 +350,7 @@ private: int verbosity_; /// Use Win32 Registry - int use_registry_; + bool use_registry_; /// Port to connect to nameserver process. int nameserver_port_; @@ -376,6 +376,10 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL +#if defined (__ACE_INLINE__) +#include "ace/Naming_Context.inl" +#endif /* __ACE_INLINE__ */ + ACE_FACTORY_DECLARE (ACE, ACE_Naming_Context) ACE_STATIC_SVC_DECLARE_EXPORT (ACE, ACE_Naming_Context) diff --git a/ACE/ace/Naming_Context.inl b/ACE/ace/Naming_Context.inl new file mode 100644 index 00000000000..4c90343c1ee --- /dev/null +++ b/ACE/ace/Naming_Context.inl @@ -0,0 +1,44 @@ +// $Id$ + +ACE_INLINE bool +ACE_Name_Options::use_registry (void) const +{ + ACE_TRACE ("ACE_Name_Options::use_registry"); + return this->use_registry_; +} + +ACE_INLINE void +ACE_Name_Options::use_registry (bool x) +{ + ACE_TRACE ("ACE_Name_Options::use_registry"); + this->use_registry_ = x; +} + +ACE_INLINE int +ACE_Name_Options::verbose (void) +{ + ACE_TRACE ("ACE_Name_Options::verbose"); + return this->verbosity_; +} + +ACE_INLINE const ACE_TCHAR * +ACE_Name_Options::process_name (void) +{ + ACE_TRACE ("ACE_Name_Options::process_name"); + return this->process_name_; +} + +ACE_INLINE const ACE_TCHAR * +ACE_Name_Options::namespace_dir (void) +{ + ACE_TRACE ("ACE_Name_Options::namespace_dir"); + return this->namespace_dir_; +} + +ACE_INLINE int +ACE_Name_Options::debug (void) +{ + ACE_TRACE ("ACE_Name_Options::debug"); + return this->debugging_; +} + diff --git a/ACE/ace/Obstack_T.cpp b/ACE/ace/Obstack_T.cpp index a54120fc8cc..ecce0636b2d 100644 --- a/ACE/ace/Obstack_T.cpp +++ b/ACE/ace/Obstack_T.cpp @@ -110,7 +110,7 @@ ACE_Obstack_T<CHAR>::new_chunk (void) { ACE_TRACE ("ACE_Obstack_T<CHAR>::new_chunk"); - ACE_Obchunk *temp; + ACE_Obchunk *temp = 0; ACE_NEW_MALLOC_RETURN (temp, static_cast<ACE_Obchunk *> (this->allocator_strategy_->malloc @@ -181,9 +181,7 @@ ACE_Obstack_T<CHAR>::unwind (void* obj) template <class CHAR> void ACE_Obstack_T<CHAR>::unwind_i (void* obj) { - ACE_Obchunk* curr; - - curr = this->head_; + ACE_Obchunk* curr = this->head_; while (curr != 0 && (curr->contents_ > obj || curr->end_ < obj)) curr = curr->next_; if (curr) diff --git a/ACE/ace/Select_Reactor_Base.cpp b/ACE/ace/Select_Reactor_Base.cpp index 6fad8f4cc2a..08b4c599968 100644 --- a/ACE/ace/Select_Reactor_Base.cpp +++ b/ACE/ace/Select_Reactor_Base.cpp @@ -87,20 +87,17 @@ ACE_Select_Reactor_Handler_Repository::open (size_t size) { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::open"); -#if defined (ACE_WIN32) if (this->event_handlers_.open (size) == -1) return -1; -#else - if (this->event_handlers_.size (size) == -1) - return -1; +#if !defined (ACE_WIN32) // Initialize the ACE_Event_Handler pointers to 0. std::fill (this->event_handlers_.begin (), this->event_handlers_.end (), static_cast<ACE_Event_Handler *> (0)); this->max_handlep1_ = 0; -#endif /* ACE_WIN32 */ +#endif /* !ACE_WIN32 */ // Try to increase the number of handles if <size> is greater than // the current limit. @@ -653,8 +650,10 @@ ACE_Select_Reactor_Notify::close (void) r > 0; r = read_notify_pipe(notification_pipe_.read_handle(), b)) { - if (b.eh_ == 0) continue; - b.eh_->remove_reference(); + if (b.eh_ != 0) + { + b.eh_->remove_reference(); + } } } #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ diff --git a/ACE/ace/config-vxworks6.6.h b/ACE/ace/config-vxworks6.6.h index ec479bc574f..8704bbc4f4a 100644 --- a/ACE/ace/config-vxworks6.6.h +++ b/ACE/ace/config-vxworks6.6.h @@ -2,7 +2,7 @@ // $Id$ // The following configuration file is designed to work for VxWorks -// 6.4 platforms using one of these compilers: +// 6.6 platforms using one of these compilers: // 1) The GNU g++ compiler that is shipped with VxWorks 6.6 // 2) The Diab compiler that is shipped with VxWorks 6.6 @@ -10,331 +10,22 @@ #define ACE_CONFIG_VXWORKS_6_6_H #include /**/ "ace/pre.h" -#if ! defined (VXWORKS) -# define VXWORKS -#endif /* ! VXWORKS */ - -#if ! defined (ACE_VXWORKS) +#if !defined (ACE_VXWORKS) # define ACE_VXWORKS 0x660 #endif /* ! ACE_VXWORKS */ -#if !defined (__RTP__) - // Fix for wrong typedef of time_t in kernel mode - #ifndef _TIME_T - #define _TIME_T - typedef long time_t; - #endif -#endif - -#if ! defined (__ACE_INLINE__) -# define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -// Compiler-specific configuration. -#if defined (__GNUG__) -# include "ace/config-g++-common.h" - -# define ACE_LACKS_IOSTREAM_FX -# define ACE_LACKS_LINEBUFFERED_STREAMBUF - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) - // GNU 3.3+ toolchain supports long long types but fails to define this so STL - // skips some definitions -# if !defined (_GLIBCPP_USE_LONG_LONG) -# define _GLIBCPP_USE_LONG_LONG -# endif -# endif /* (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) */ - -#elif defined (__DCC__) -# define ACE_HAS_STANDARD_CPP_LIBRARY 1 -# define ACE_TEMPLATES_REQUIRE_SOURCE -#else /* ! __GNUG__ && ! ghs && !__DCC__ */ -# ifdef __cplusplus /* Let it slide for C compilers. */ -# error unsupported compiler on VxWorks -# endif /* __cplusplus */ -#endif /* ! __GNUG__ && ! ghs */ - -// Needed include to get all VxWorks CPU types -#include "types/vxCpu.h" -#if defined __RTP__ - #if defined (_VX_CPU) && (_VX_CPU == _VX_PENTIUM || _VX_CPU == _VX_PENTIUM2 || _VX_CPU == _VX_PENTIUM3 || _VX_CPU == _VX_PENTIUM4) - // If running an Intel Pentium the - // ACE_OS::gethrtime () can use the RDTSC instruction. - # define ACE_HAS_PENTIUM - // We seem to lack log2 also on pentium with rtp - # define ACE_LACKS_LOG2 - #endif -#else - #if defined (CPU) && (CPU == PENTIUM || CPU == PENTIUM2 || CPU == PENTIUM3 || CPU == PENTIUM4) - // If running an Intel Pentium the - // ACE_OS::gethrtime () can use the RDTSC instruction. - # define ACE_HAS_PENTIUM - #endif -#endif - -#if !defined __RTP__ -# if defined (TOOL) && (TOOL == gnu) -# if defined (CPU) && (CPU == PPC85XX || CPU == PPC604 || CPU == PPC603) -// These PPC's do lack log2 in kernel mode -# define ACE_LACKS_LOG2 -# endif -# endif -#endif - -// OS-specific configuration -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#define ACE_HAS_3_PARAM_READDIR_R -#define ACE_HAS_NONCONST_GETBY -#define ACE_HAS_NONCONST_SWAB -#define ACE_LACKS_UNIX_SYSLOG -#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 32768 -#define ACE_DEFAULT_THREAD_KEYS 16 -#define ACE_HAS_BROKEN_ACCEPT_ADDR -#define ACE_HAS_NONCONST_SENDMSG -#define ACE_HAS_NONCONST_WRITEV -#define ACE_HAS_CHARPTR_DL -#define ACE_HAS_CLOCK_GETTIME -#define ACE_HAS_CLOCK_SETTIME -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -#define ACE_HAS_CPLUSPLUS_HEADERS -#define ACE_HAS_DIRENT -#define ACE_HAS_DLL 0 -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT -#define ACE_HAS_MSG -#define ACE_HAS_NONCONST_READV -#define ACE_HAS_NONCONST_SELECT_TIMEVAL -#define ACE_HAS_NONSTATIC_OBJECT_MANAGER -#define ACE_HAS_POSIX_NONBLOCK -#define ACE_HAS_POSIX_TIME -#define ACE_HAS_REENTRANT_FUNCTIONS -#define ACE_HAS_SIGACTION_CONSTP2 -#define ACE_HAS_SIGINFO_T -#define ACE_HAS_SIGWAIT -#define ACE_HAS_SIG_ATOMIC_T -#define ACE_HAS_SOCKADDR_IN_SIN_LEN -#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN -#define ACE_HAS_STRERROR -#define ACE_HAS_THREADS -#define ACE_HAS_SYSCTL -#define ACE_LACKS_ALPHASORT -#define ACE_LACKS_EXEC -#define ACE_LACKS_RLIMIT -#define ACE_LACKS_FILELOCKS -#define ACE_LACKS_FORK -#define ACE_LACKS_GETHOSTENT -#define ACE_LACKS_GETSERVBYNAME -#define ACE_LACKS_GETPROTOBYNAME -#define ACE_LACKS_GETPROTOBYNUMBER -#define ACE_LACKS_GETIPNODEBYADDR -#define ACE_LACKS_GETIPNODEBYNAME_IPV6 -#define ACE_LACKS_LSTAT -#define ACE_LACKS_MADVISE -#define ACE_LACKS_MALLOC_H -#define ACE_LACKS_MEMORY_H -#define ACE_LACKS_MKFIFO -#define ACE_LACKS_MKSTEMP -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS -#define ACE_LACKS_SYS_PARAM_H -#define ACE_LACKS_PWD_FUNCTIONS -#define ACE_LACKS_READLINK -#define ACE_LACKS_REALPATH -#define ACE_LACKS_PIPE -#define ACE_LACKS_RWLOCK_T -#define ACE_LACKS_SBRK -#define ACE_LACKS_SEEKDIR -#define ACE_LACKS_SEMBUF_T -#define ACE_LACKS_SIGINFO_H -#define ACE_LACKS_SI_ADDR -#define ACE_LACKS_SOCKETPAIR -#define ACE_LACKS_STRRECVFD -#define ACE_LACKS_SYSV_SHMEM -#define ACE_LACKS_TELLDIR -#define ACE_LACKS_TIMESPEC_T -#define ACE_LACKS_TRUNCATE -#define ACE_LACKS_UCONTEXT_H -#define ACE_LACKS_USECONDS_T -#define ACE_LACKS_UMASK -#define ACE_LACKS_STRPTIME -#define ACE_LACKS_MKTEMP -#define ACE_LACKS_TEMPNAM -#define ACE_PAGE_SIZE 4096 -#define ACE_THR_PRI_FIFO_DEF 101 -#define ACE_THR_PRI_OTHER_DEF ACE_THR_PRI_FIFO_DEF -#define ACE_HAS_SIGTIMEDWAIT -#define ACE_HAS_SIGSUSPEND +#include "ace/config-vxworks6.5.h" -#define ACE_LACKS_SETEGID -#define ACE_LACKS_SETPGID -#define ACE_LACKS_SETREGID -#define ACE_LACKS_SETREUID -#define ACE_LACKS_SETSID -#define ACE_LACKS_SETUID -#define ACE_LACKS_SETEUID -#define ACE_LACKS_GETEUID -#define ACE_LACKS_GETUID -#define ACE_LACKS_GETPGID -#define ACE_LACKS_GETEGID -#define ACE_LACKS_GETGID -#define ACE_LACKS_SETGID - -#define ACE_LACKS_SYS_UIO_H -#define ACE_LACKS_SYS_IPC_H -#define ACE_LACKS_SYS_SEM_H -#define ACE_LACKS_STROPTS_H -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_PWD_H -#define ACE_LACKS_SYS_SHM_H -#define ACE_LACKS_TERMIOS_H -#define ACE_LACKS_POLL_H -#define ACE_LACKS_FCNTL - -// Some string things -#define ACE_LACKS_ITOW -#define ACE_LACKS_WCSDUP -#define ACE_LACKS_WCSICMP -#define ACE_LACKS_WCSNICMP - -#define ACE_HAS_CHARPTR_SOCKOPT -#define ACE_LACKS_SYMLINKS - -#if defined __RTP__ - // We are building for RTP mode - #if !defined (ACE_AS_STATIC_LIBS) - # define ACE_HAS_SVR4_DYNAMIC_LINKING - #endif - #define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R - #define ACE_LACKS_REGEX_H - #if defined ACE_HAS_PENTIUM - // Bug to workaround VxWorks 6.4 x86 - # define ACE_LACKS_PUTENV - #endif - #define ACE_HAS_SETENV - #define ACE_LACKS_STRCASECMP - #define ACE_HAS_3_PARAM_WCSTOK - #define ACE_HAS_WCHAR - #define ACE_HAS_VFWPRINTF - #define ACE_SIZEOF_WCHAR 2 - #define ACE_HAS_SHM_OPEN - #if defined (ACE_AS_STATIC_LIBS) - # define ACE_HAS_AIO_CALLS - #endif - // VxWorks seems to either not define this or define as zero up till now - #if !defined (IOV_MAX) || (IOV_MAX == 0) - #define ACE_IOV_MAX 16 - #endif -#else - // We are building for kernel mode - #define ACE_HAS_GETIFADDRS - #define ACE_LACKS_SUSECONDS_T - #define ACE_LACKS_INTPTR_T - #define ACE_LACKS_INTTYPES_H - #define ACE_LACKS_STDINT_H - #define ACE_LACKS_UNAME - #define ACE_LACKS_UTSNAME_T - #define ACE_LACKS_RAND_REENTRANT_FUNCTIONS - #define ACE_LACKS_DLFCN_H - #define ACE_LACKS_WAIT - #define ACE_LACKS_WAITPID - #define ACE_LACKS_SYS_TIME_H - #define ACE_LACKS_SYS_SELECT_H - #define ACE_MKDIR_LACKS_MODE - #define ACE_HAS_SIZET_PTR_ASCTIME_R_AND_CTIME_R - #define ACE_LACKS_SEARCH_H - #define ACE_LACKS_SYSCONF - #define ACE_LACKS_GETPPID - #define ACE_LACKS_WCHAR_H - #define ACE_LACKS_WCTYPE_H - #define ACE_LACKS_WCSCAT - #define ACE_LACKS_WCSCHR - #define ACE_LACKS_WCSCMP - #define ACE_LACKS_WCSCPY - #define ACE_LACKS_WCSCSPN - #define ACE_LACKS_WCSLEN - #define ACE_LACKS_WCSNCAT - #define ACE_LACKS_WCSNCMP - #define ACE_LACKS_WCSNCPY - #define ACE_LACKS_WCSPBRK - #define ACE_LACKS_WCSRCHR - #define ACE_LACKS_WCSSPN - #define ACE_LACKS_WCSSTR - #define ACE_LACKS_WCSTOK - #define ACE_LACKS_TOWLOWER - #define ACE_LACKS_TOWUPPER - #define ACE_LACKS_WCSTOD - #define ACE_LACKS_WCSTOL - #define ACE_LACKS_WCSTOUL - #define ACE_LACKS_FGETWC - #define ACE_LACKS_FGETWS - #define ACE_LACKS_FPUTWS - #define ACE_LACKS_MMAP - #define ACE_LACKS_MSYNC - #define ACE_LACKS_MPROTECT - #if !defined (ACE_MAIN) - # define ACE_MAIN ace_main - #endif /* ! ACE_MAIN */ -#endif - -// It is possible to enable pthread support with VxWorks, when the user decides -// to use this, we need some more defines -#if defined ACE_HAS_PTHREADS -# define ACE_HAS_THREAD_SPECIFIC_STORAGE -# if !defined __RTP__ -# define ACE_LACKS_PTHREAD_ATTR_SETSTACK -# endif -# define ACE_HAS_PTHREAD_ATTR_SETNAME -# define ACE_HAS_POSIX_SEM -# define ACE_LACKS_MUTEXATTR_PSHARED -# define ACE_LACKS_CONDATTR_PSHARED -// Include this file, the sys/stat.h file shipped with VxWorks has old types -// and without this include we get a lot of compile errors. A TSR has been filed -// so that hopefully in the future we can zap this include -#include "types/vxTypesOld.h" -#else -# define ACE_LACKS_PTHREAD_H -# define ACE_HAS_VXTHREADS -# if !defined __RTP__ -// Only when building for kernel mode we can use TSS emulation, in rtp mode -// we can't use the WIND_TCB struct anymore -# define ACE_HAS_TSS_EMULATION -# if !defined (ACE_VXWORKS_SPARE) -# define ACE_VXWORKS_SPARE spare4 -# endif /* ! ACE_VXWORKS_SPARE */ +# if !defined (_HAS_C9X) +// Workaround for the fact that the log2 method can't be used +// without this define set, see TSR605078 +# define _C99 # endif -// VxWorks has no recursive mutexes. This was set in the past but it doesn't -// work with the pthread support, so only set it for the time being when pthread -// is disabled -# define ACE_HAS_RECURSIVE_MUTEXES -# define ACE_LACKS_COND_T -# define ACE_HAS_MUTEX_TIMEOUTS -#endif -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 +#if !defined (__RTP__) +# undef ACE_HAS_IOCTL_INT_3_PARAM #endif -// VxWorks defines the CPU define MAP, undef it to prevent problems with -// application code -#if defined (MAP) -#undef MAP -#endif /* MAP */ - -#if !defined (ACE_NEEDS_HUGE_THREAD_STACKSIZE) -# define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536 -#endif /* ACE_NEEDS_HUGE_THREAD_STACKSIZE */ - -#if !defined (ACE_NTRACE) -# define ACE_NTRACE 1 -#endif /* ACE_NTRACE */ - -// By default, don't include RCS Id strings in object code. -#if !defined (ACE_USE_RCSID) -#define ACE_USE_RCSID 0 -#endif /* !ACE_USE_RCSID */ - -#if defined (ACE_HAS_IP_MULTICAST) -# define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 -#endif /* ACE_HAS_IP_MULTICAST */ - #include /**/ "ace/post.h" -#endif /* ACE_CONFIG_VXWORKS_6_4_H */ +#endif /* ACE_CONFIG_VXWORKS_6_6_H */ |