diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-04-06 22:35:48 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-04-06 22:35:48 +0000 |
commit | d63be4c7e06a2e4c335fdd433d8877e7dfef3265 (patch) | |
tree | 93752382bdc8909c061d8af78fa63eba996746f3 /ace | |
parent | 14749e5208889c2e98c7e3124e42e8391dce6343 (diff) | |
download | ATCD-d63be4c7e06a2e4c335fdd433d8877e7dfef3265.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 9 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.h | 2 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 157 | ||||
-rw-r--r-- | ace/OS.cpp | 1 | ||||
-rw-r--r-- | ace/OS.h | 59 | ||||
-rw-r--r-- | ace/Process.cpp | 94 | ||||
-rw-r--r-- | ace/Process.h | 21 | ||||
-rw-r--r-- | ace/README | 1 | ||||
-rw-r--r-- | ace/Reactor.h | 4 | ||||
-rw-r--r-- | ace/Service_Config.cpp | 84 | ||||
-rw-r--r-- | ace/Signal.cpp | 12 | ||||
-rw-r--r-- | ace/TLI_Acceptor.h | 4 | ||||
-rw-r--r-- | ace/TLI_Stream.h | 3 | ||||
-rw-r--r-- | ace/Task_T.cpp | 2 | ||||
-rw-r--r-- | ace/XtReactor.cpp | 7 | ||||
-rw-r--r-- | ace/XtReactor.h | 5 | ||||
-rw-r--r-- | ace/config-hpux-10.x-aCC.h | 14 | ||||
-rw-r--r-- | ace/config-hpux-10.x-g++.h | 4 | ||||
-rw-r--r-- | ace/config-hpux-10.x.h | 4 | ||||
-rw-r--r-- | ace/config-hpux-9.x-orbix.h | 4 | ||||
-rw-r--r-- | ace/config-hpux-9.x.h | 4 | ||||
-rw-r--r-- | ace/config-irix6.2-sgic++.h | 30 |
22 files changed, 344 insertions, 181 deletions
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 338db6205fb..fe91a3b4c5c 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -111,7 +111,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::shared_bind (const ACE_WString &name { return this->shared_bind_i (name, value, type, rebind); } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) + ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) { } } @@ -368,9 +368,10 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::create_manager_i (void) // Use process name as the file name. size_t len = ACE_OS::strlen (dir); + len += ACE_OS::strlen (ACE_DIRECTORY_SEPARATOR_STR); len += ACE_OS::strlen (database) + 1; - if (len >= MAXNAMELEN) + if (len >= MAXNAMELEN + MAXPATHLEN) { errno = ENAMETOOLONG; return -1; @@ -382,8 +383,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::create_manager_i (void) ACE_MEM_POOL_OPTIONS options (this->name_options_->base_address ()); - TCHAR lock_name_for_local_name_space [MAXNAMELEN]; - TCHAR lock_name_for_backing_store [MAXNAMELEN]; + TCHAR lock_name_for_local_name_space [MAXNAMELEN + MAXPATHLEN]; + TCHAR lock_name_for_backing_store [MAXPATHLEN + MAXNAMELEN]; LPCTSTR postfix = database; size_t length = 0; diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h index f16375433f4..07b14b0b6fc 100644 --- a/ace/Local_Name_Space_T.h +++ b/ace/Local_Name_Space_T.h @@ -228,7 +228,7 @@ private: ACE_Name_Options *name_options_; // Keep track of the options such as database name etc - TCHAR context_file_[MAXNAMELEN]; + TCHAR context_file_[MAXPATHLEN + MAXNAMELEN]; // Name of the file used as the backing store. LOCK *lock_; diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index b7a90fea42d..8ff54615de6 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -63,101 +63,102 @@ static ACE_thread_key_t key_; typedef ACE_Unbounded_Set<ACE_Log_Msg *> ACE_Log_Msg_Set; -// Synchronize output operations. class ACE_Log_Msg_Manager + // = TITLE + // Synchronize output operations. { public: - static ACE_Thread_Mutex *get_lock(void); + static ACE_Thread_Mutex *get_lock (void); #if defined (VXWORKS) - static void atexit (WIND_TCB *); + static void atexit (WIND_TCB *); #else - static void atexit (void); + static void atexit (void); - static void insert (ACE_Log_Msg*); - static int remove (ACE_Log_Msg*); - // remove returns true when the last ACE_Log_Msg instance has - // been deleted + static void insert (ACE_Log_Msg*); + static int remove (ACE_Log_Msg*); + // Remove returns true when the last ACE_Log_Msg instance has been + // deleted. #endif /* VXWORKS */ private: - static ACE_Thread_Mutex *lock_; + static ACE_Thread_Mutex *lock_; - // Holds a list of all logmsg instances. - // instances_ requires global construction/destruction. If - // that's a problem, could change it to a pointer and allocate - // it dynamically when lock_ is allocated. -#if ! defined (VXWORKS) - static ACE_Log_Msg_Set instances_; + // Holds a list of all logmsg instances. instances_ requires global + // construction/destruction. If that's a problem, could change it + // to a pointer and allocate it dynamically when lock_ is allocated. +#if !defined (VXWORKS) + static ACE_Log_Msg_Set instances_; #endif /* VXWORKS */ }; ACE_Thread_Mutex *ACE_Log_Msg_Manager::lock_ = 0; ACE_Thread_Mutex * -ACE_Log_Msg_Manager::get_lock(void) +ACE_Log_Msg_Manager::get_lock (void) { - if (ACE_Log_Msg_Manager::lock_ == 0) - { - ACE_NO_HEAP_CHECK; + if (ACE_Log_Msg_Manager::lock_ == 0) + { + ACE_NO_HEAP_CHECK; - ACE_NEW_RETURN_I (ACE_Log_Msg_Manager::lock_, ACE_Thread_Mutex, 0); - } + ACE_NEW_RETURN_I (ACE_Log_Msg_Manager::lock_, ACE_Thread_Mutex, 0); + } - return ACE_Log_Msg_Manager::lock_; + return ACE_Log_Msg_Manager::lock_; } #if defined (VXWORKS) void ACE_Log_Msg_Manager::atexit (WIND_TCB *tcb) { - // The task is exiting, so its ACE_Log_Msg instance. - delete tcb->spare1; + // The task is exiting, so its ACE_Log_Msg instance. + delete tcb->spare1; - // ugly, ugly, but don't know a better way - delete ACE_Log_Msg_Manager::lock_; - ACE_Log_Msg_Manager::lock_ = 0; + // Ugly, ugly, but don't know a better way. + delete ACE_Log_Msg_Manager::lock_; + ACE_Log_Msg_Manager::lock_ = 0; } #else ACE_Log_Msg_Set ACE_Log_Msg_Manager::instances_; void -ACE_Log_Msg_Manager::insert(ACE_Log_Msg* log_msg) +ACE_Log_Msg_Manager::insert (ACE_Log_Msg *log_msg) { - ACE_Log_Msg_Manager::instances_.insert(log_msg); + ACE_Log_Msg_Manager::instances_.insert (log_msg); } int -ACE_Log_Msg_Manager::remove(ACE_Log_Msg* log_msg) +ACE_Log_Msg_Manager::remove (ACE_Log_Msg *log_msg) { - ACE_Log_Msg_Manager::instances_.remove(log_msg); + ACE_Log_Msg_Manager::instances_.remove (log_msg); - return ! ACE_Log_Msg_Manager::instances_.size(); + return !ACE_Log_Msg_Manager::instances_.size (); } void -ACE_Log_Msg_Manager::atexit () +ACE_Log_Msg_Manager::atexit (void) { - // The program is exiting, so delete all ACE_Log_Msg instances. - ACE_Unbounded_Set_Iterator <ACE_Log_Msg *> i (instances_); - ACE_Log_Msg **log_msg; + // The program is exiting, so delete all ACE_Log_Msg instances. + ACE_Unbounded_Set_Iterator <ACE_Log_Msg *> i (instances_); - while (i.next (log_msg) != 0) - { - // Advance the iterator first because it needs to read - // the next field of the ACE_Set_Node that will be deleted - // as a result of the following call to remove the node. - i.advance (); + for (ACE_Log_Msg **log_msg; + i.next (log_msg) != 0; + ) + { + // Advance the iterator first because it needs to read the next + // field of the ACE_Set_Node that will be deleted as a result of + // the following call to remove the node. + i.advance (); - // Causes a call to ACE_Log_Msg_Manager::remove. - delete *log_msg; - } + // Causes a call to ACE_Log_Msg_Manager::remove. + delete *log_msg; + } - ACE_OS::thr_keyfree(key_); + ACE_OS::thr_keyfree (key_); - // ugly, ugly, but don't know a better way - delete ACE_Log_Msg_Manager::lock_; - ACE_Log_Msg_Manager::lock_ = 0; + // Ugly, ugly, but don't know a better way. + delete ACE_Log_Msg_Manager::lock_; + ACE_Log_Msg_Manager::lock_ = 0; } #endif /* ! VXWORKS */ @@ -168,13 +169,13 @@ extern "C" void ACE_TSS_cleanup (void *ptr) { - delete (ACE_Log_Msg *)ptr; + delete (ACE_Log_Msg *) ptr; } #endif /* ACE_MT_SAFE */ /* static */ int -ACE_Log_Msg::exists(void) +ACE_Log_Msg::exists (void) { #if defined (ACE_MT_SAFE) #if defined (VXWORKS) @@ -222,8 +223,9 @@ ACE_Log_Msg::instance (void) // initialized to 0, which holds true for VxWorks 5.2-5.3. if (*(int **) tss_log_msg == 0) { - // Allocate the Singleton lock. Note that this isn't thread-safe. - ACE_Log_Msg_Manager::get_lock(); + // Allocate the Singleton lock. Note that this isn't + // thread-safe. + ACE_Log_Msg_Manager::get_lock (); // Register cleanup handler. ::taskDeleteHookAdd ((FUNCPTR) ACE_Log_Msg_Manager::atexit); @@ -252,7 +254,7 @@ ACE_Log_Msg::instance (void) if (key_created_ == 0) { // Allocate the Singleton lock. - ACE_Log_Msg_Manager::get_lock(); + ACE_Log_Msg_Manager::get_lock (); { ACE_NO_HEAP_CHECK; @@ -283,24 +285,23 @@ ACE_Log_Msg::instance (void) // Allocate memory off the heap and store it in a pointer in // thread-specific storage (on the stack...). - // Must protect access to lock managers list - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock(), 0)); + // Must protect access to lock managers list + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock (), 0)); - // Stop heap checking, the memory will always - // be freed in atexit. This prevents from getting - // these blocks reported as memory leaks - { - ACE_NO_HEAP_CHECK; + // Stop heap checking, the memory will always be freed in + // atexit. This prevents from getting these blocks reported as + // memory leaks + { + ACE_NO_HEAP_CHECK; - ACE_NEW_RETURN_I (tss_log_msg, ACE_Log_Msg, 0); - ACE_Log_Msg_Manager::insert(tss_log_msg); + ACE_NEW_RETURN_I (tss_log_msg, ACE_Log_Msg, 0); + ACE_Log_Msg_Manager::insert(tss_log_msg); - // Store the dynamically allocated pointer in thread-specific - // storage. - if (ACE_OS::thr_setspecific (key_, - (void *) tss_log_msg) != 0) - return 0; // Major problems, this should *never* happen! - } + // Store the dynamically allocated pointer in thread-specific + // storage. + if (ACE_OS::thr_setspecific (key_, (void *) tss_log_msg) != 0) + return 0; // Major problems, this should *never* happen! + } } return tss_log_msg; @@ -366,7 +367,7 @@ ACE_Log_Msg::flags (void) { ACE_TRACE ("ACE_Log_Msg::flags"); u_long result; - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock(), 0)); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock (), 0)); result = ACE_Log_Msg::flags_; return result; @@ -376,7 +377,7 @@ void ACE_Log_Msg::set_flags (u_long flgs) { ACE_TRACE ("ACE_Log_Msg::set_flags"); - ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock())); + ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock ())); ACE_SET_BITS (ACE_Log_Msg::flags_, flgs); } @@ -385,7 +386,7 @@ void ACE_Log_Msg::clr_flags (u_long flgs) { ACE_TRACE ("ACE_Log_Msg::clr_flags"); - ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock())); + ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock ())); ACE_CLR_BITS (ACE_Log_Msg::flags_, flgs); } @@ -395,7 +396,7 @@ ACE_Log_Msg::acquire (void) { ACE_TRACE ("ACE_Log_Msg::acquire"); #if defined (ACE_MT_SAFE) - return ACE_Log_Msg_Manager::get_lock()->acquire (); + return ACE_Log_Msg_Manager::get_lock ()->acquire (); #else return 0; #endif /* ACE_MT_SAFE */ @@ -421,7 +422,7 @@ ACE_Log_Msg::release (void) ACE_TRACE ("ACE_Log_Msg::release"); #if defined (ACE_MT_SAFE) - return ACE_Log_Msg_Manager::get_lock()->release (); + return ACE_Log_Msg_Manager::get_lock ()->release (); #else return 0; #endif /* ACE_MT_SAFE */ @@ -460,7 +461,7 @@ ACE_Log_Msg::~ACE_Log_Msg() // because this destructor can't tell when the last thread in the program // exits. #if ! defined (VXWORKS) - ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock())); + ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock ())); // Last instance ? if ( ACE_Log_Msg_Manager::remove(this) ) @@ -488,7 +489,7 @@ ACE_Log_Msg::open (const char *prog_name, LPCTSTR logger_key) { ACE_TRACE ("ACE_Log_Msg::open"); - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock(), -1)); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock (), -1)); #if defined (VXWORKS) // To avoid memory leak, don't copy the input string. It had better @@ -895,7 +896,7 @@ ACE_Log_Msg::log (const char *format_str, #endif /* ACE_WIN32 */ // Make sure that the lock is held during all this. - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock(), -1)); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *ACE_Log_Msg_Manager::get_lock (), -1)); if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR) && abort_prog == 0) // We'll get this further down. @@ -1017,7 +1018,7 @@ ACE_Log_Msg::dump (void) const ACE_DEBUG ((LM_DEBUG, "\nmsg_off_ = %d\n", this->msg_off_)); message_queue_.dump (); #if defined (ACE_MT_SAFE) - ACE_Log_Msg_Manager::get_lock()->dump (); + ACE_Log_Msg_Manager::get_lock ()->dump (); // Synchronize output operations. #endif /* ACE_MT_SAFE */ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); diff --git a/ace/OS.cpp b/ace/OS.cpp index a2acf7190e6..2c8e975d361 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -589,7 +589,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params) return -1; } - return 0; #elif defined (ACE_WIN32) if (sched_params.scope () != ACE_SCOPE_PROCESS || @@ -133,23 +133,23 @@ // block is left. The old state will then be restored // Only used for Win32 (in the moment). #if defined(ACE_WIN32) - #if defined (_DEBUG) - class ACE_No_Heap_Check { - int old_state; - public: - ACE_No_Heap_Check() - : old_state( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG )) - { _CrtSetDbgFlag( old_state & ~_CRTDBG_ALLOC_MEM_DF );} - ~ACE_No_Heap_Check () { _CrtSetDbgFlag( old_state );} - }; - - #define ACE_NO_HEAP_CHECK ACE_No_Heap_Check ____no_heap; - #else /* !_DEBUG*/ - #define ACE_NO_HEAP_CHECK - #endif /* _DEBUG*/ - +#if defined (_DEBUG) +class ACE_No_Heap_Check +{ +public: + ACE_No_Heap_Check() + : old_state (_CrtSetDbgFlag (_CRTDBG_REPORT_FLAG)) + { _CrtSetDbgFlag (old_state & ~_CRTDBG_ALLOC_MEM_DF);} + ~ACE_No_Heap_Check (void) { _CrtSetDbgFlag (old_state);} +private: + int old_state; +}; +#define ACE_NO_HEAP_CHECK ACE_No_Heap_Check ____no_heap; +#else /* !_DEBUG*/ +#define ACE_NO_HEAP_CHECK +#endif /* _DEBUG*/ #else /* !ACE_WIN32 */ - #define ACE_NO_HEAP_CHECK +#define ACE_NO_HEAP_CHECK #endif /* ACE_WIN32 */ // Increase the range of "address families". @@ -185,7 +185,7 @@ // GreenHills C++ 1.8.8 complains that the (a) expression has no effect. But, // it doesn't complain about unused args, so don't bother with them. #define ACE_UNUSED_ARG(a) -#elif defined (__GNUC__) || defined (ACE_HAS_IRIX_GETTIMEOFDAY) +#elif defined (__GNUC__) || defined (__sgi) // Some compilers complain about "statement with no effect" with (a). // This eliminates the warnings, and no code is generated for the null // conditional statement. @@ -453,28 +453,36 @@ public: void operator -= (const ACE_Time_Value &tv); // Subtract <tv> to this. - friend ACE_Export ACE_Time_Value operator + (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export ACE_Time_Value operator + (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // Adds two ACE_Time_Value objects together, returns the sum. - friend ACE_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // Subtracts two ACE_Time_Value objects, returns the difference. - friend ACE_Export int operator < (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator < (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 < tv2. - friend ACE_Export int operator > (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator > (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 > tv2. - friend ACE_Export int operator <= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator <= (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 <= tv2. - friend ACE_Export int operator >= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator >= (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 >= tv2. - friend ACE_Export int operator == (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator == (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 == tv2. - friend ACE_Export int operator != (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); + friend ACE_Export int operator != (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2); // True if tv1 != tv2. void dump (void) const; @@ -1854,7 +1862,6 @@ typedef void (*__sighandler_t)(int); // keep Signal compilation happy #endif /* VXWORKS */ #include /**/ <sys/ioctl.h> #include /**/ <dirent.h> -#include /**/ <sys/stat.h> #include /**/ <unistd.h> #if !defined (ACE_LACKS_PARAM_H) diff --git a/ace/Process.cpp b/ace/Process.cpp index 49d89ef5636..d81f3915427 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -29,27 +29,30 @@ ACE_Process::ACE_Process (void) #endif /* ACE_WIN32 */ { #if defined (ACE_WIN32) - ACE_OS::memset ((void *) &startup_info_, 0, sizeof startup_info_); - ACE_OS::memset ((void *) &process_info_, 0, sizeof process_info_); - startup_info_.cb = sizeof startup_info_; + ACE_OS::memset ((void *) &this->startup_info_, + 0, sizeof this->startup_info_); + ACE_OS::memset ((void *) &this->process_info_, + 0, sizeof this->process_info_); + this->startup_info_.cb = sizeof this->startup_info_; #endif /* ACE_WIN32 */ + this->cwd_[0] = '\0'; } ACE_Process::~ACE_Process (void) { #if defined (ACE_WIN32) - // Just in case start wasn't called. - if (set_handles_called_) + // Just in case <start> wasn't called. + if (this->set_handles_called_) { - ::CloseHandle (startup_info_.hStdInput); - ::CloseHandle (startup_info_.hStdOutput); - ::CloseHandle (startup_info_.hStdOutput); - set_handles_called_ = 0; + ::CloseHandle (this->startup_info_.hStdInput); + ::CloseHandle (this->startup_info_.hStdOutput); + ::CloseHandle (this->startup_info_.hStdOutput); + this->set_handles_called_ = 0; } // Free resources allocated in kernel. - ACE_OS::close (process_info_.hThread); - ACE_OS::close (process_info_.hProcess); + ACE_OS::close (this->process_info_.hThread); + ACE_OS::close (this->process_info_.hProcess); #endif /* ACE_WIN32 */ } @@ -60,10 +63,10 @@ ACE_Process::set_handles (ACE_HANDLE std_in, ACE_HANDLE std_err) { #if defined (ACE_WIN32) - set_handles_called_ = 1; + this->set_handles_called_ = 1; // Tell the new process to use our std handles. - startup_info_.dwFlags = STARTF_USESTDHANDLES; + this->startup_info_.dwFlags = STARTF_USESTDHANDLES; if (std_in == ACE_INVALID_HANDLE) std_in = ACE_STDIN; @@ -75,7 +78,7 @@ ACE_Process::set_handles (ACE_HANDLE std_in, if (!::DuplicateHandle (::GetCurrentProcess(), std_in, ::GetCurrentProcess(), - &startup_info_.hStdInput, + &this->startup_info_.hStdInput, NULL, TRUE, DUPLICATE_SAME_ACCESS)) @@ -84,7 +87,7 @@ ACE_Process::set_handles (ACE_HANDLE std_in, if (!::DuplicateHandle (::GetCurrentProcess(), std_out, ::GetCurrentProcess(), - &startup_info_.hStdOutput, + &this->startup_info_.hStdOutput, NULL, TRUE, DUPLICATE_SAME_ACCESS)) @@ -93,22 +96,31 @@ ACE_Process::set_handles (ACE_HANDLE std_in, if (!::DuplicateHandle (::GetCurrentProcess(), std_err, ::GetCurrentProcess(), - &startup_info_.hStdError, + &this->startup_info_.hStdError, NULL, TRUE, DUPLICATE_SAME_ACCESS)) return -1; #else /* ACE_WIN32 */ - stdin_ = std_in; - stdout_ = std_out; - stderr_ = std_err; + this->stdin_ = std_in; + this->stdout_ = std_out; + this->stderr_ = std_err; #endif /* ACE_WIN32 */ return 0; // Success. } int -ACE_Process::start (char *argv[]) +ACE_Process::set_cwd (const TCHAR *cwd) +{ + ACE_OS::strncpy (this->cwd_, cwd, MAXPATHLEN); + // This is for paranoia... + this->cwd_[MAXPATHLEN] = '\0'; + return 0; +} + +int +ACE_Process::start (char *argv[], char *envp[]) { #if defined (ACE_WIN32) ACE_ARGV argv_buf (argv); @@ -122,20 +134,20 @@ ACE_Process::start (char *argv[]) ::CreateProcess (NULL, buf, NULL, // No process attributes. - NULL, // No thread attributes. + NULL, // No thread attributes. TRUE, // Allow handle inheritance. NULL, // CREATE_NEW_CONSOLE, // Create a new console window. - NULL, // No environment. - NULL, // No current directory. - &startup_info_, - &process_info_); + envp, // Environment. + this->cwd_, // Current directory to start in. + &this->startup_info_, + &this->process_info_); if (set_handles_called_) { - ::CloseHandle (startup_info_.hStdInput); - ::CloseHandle (startup_info_.hStdOutput); - ::CloseHandle (startup_info_.hStdOutput); - set_handles_called_ = 0; + ::CloseHandle (this->startup_info_.hStdInput); + ::CloseHandle (this->startup_info_.hStdOutput); + ::CloseHandle (this->startup_info_.hStdOutput); + this->set_handles_called_ = 0; } if (fork_result) // If success. @@ -163,8 +175,19 @@ ACE_Process::start (char *argv[]) && ACE_OS::dup2 (stderr_, ACE_STDERR) == -1) return -1; + // If we must, set the working directory for the child process. + if (this->cwd_[0] != '\0') + ::chdir (cwd_); + // Child process executes the command. - if (ACE_OS::execv (argv[0], argv) == -1) + int result; + + if (envp == 0) + result = ACE_OS::execv (argv[0], argv); + else + result = ACE_OS::execv (argv[0], argv, envp); + + if (result == -1) // If the execv fails, this child needs to exit. ACE_OS::exit (errno); default: @@ -187,10 +210,15 @@ ACE_Process::ACE_Process (char *argv[], #endif /* ACE_WIN32 */ { #if defined (ACE_WIN32) - ACE_OS::memset ((void *) &startup_info_, 0, sizeof startup_info_); - ACE_OS::memset ((void *) &process_info_, 0, sizeof process_info_); - startup_info_.cb = sizeof startup_info_; + ACE_OS::memset ((void *) &this->startup_info_, + 0, + sizeof this->startup_info_); + ACE_OS::memset ((void *) &this->process_info_, + 0, + sizeof this->process_info_); + this->startup_info_.cb = sizeof this->startup_info_; #endif /* ACE_WIN32 */ + this->cwd_[0] = '\0'; if (this->set_handles (std_in, std_out, std_err) == -1) ACE_ERROR ((LM_ERROR, "%p\n", "set_handles")); diff --git a/ace/Process.h b/ace/Process.h index 4ebf1cab0a9..4cddc1289f5 100644 --- a/ace/Process.h +++ b/ace/Process.h @@ -44,7 +44,7 @@ public: ACE_HANDLE std_out = ACE_INVALID_HANDLE, ACE_HANDLE std_err = ACE_INVALID_HANDLE); // Set the standard handles of the new process to the respective - // handles and start the new process. -argv- must be specified. It + // handles and start the new process. <argv> must be specified. It // should be of the following form: argv = { // "c:\full\path\to\foo.exe", "-a", "arg1", "etc", 0 } Returns the // new process id on success, -1 on failure. If you want to affect @@ -62,11 +62,15 @@ public: // sure to set the others to ACE_INVALID_HANDLE. Returns 0 on // success, -1 on failure. - int start (char *argv[]); - // Start the new process. -argv- must be specified. It should be + int set_cwd (const TCHAR *cwd); + // Set the working directory for the process. + + int start (char *argv[], char *envp[]); + // Start the new process. <argv> must be specified. It should be // of the following form: argv = { "c:\full\path\to\foo.exe", "-a", - // "arg1", "etc", 0 } Returns the new process id on success, -1 on - // failure. + // "arg1", "etc", 0 }. If <envp> is specified, it is passed as the + // environment for the new process, according to the rules for + // execve(). Returns the new process id on success, -1 on failure. int wait (void); // Wait for the process we just created to exit. @@ -81,13 +85,20 @@ private: #if defined (ACE_WIN32) PROCESS_INFORMATION process_info_; STARTUPINFO startup_info_; + int set_handles_called_; // Is 1 if stdhandles was called. + #else /* ACE_WIN32 */ ACE_HANDLE stdin_; ACE_HANDLE stdout_; ACE_HANDLE stderr_; + pid_t child_id_; + // Process id of the child. + + TCHAR cwd_[MAXPATHLEN + 1]; + // The current working directory. #endif /* ACE_WIN32 */ }; diff --git a/ace/README b/ace/README index a62cb0cb4b3..1831b812baf 100644 --- a/ace/README +++ b/ace/README @@ -24,6 +24,7 @@ ACE_HAS_AUTOMATIC_INIT_FINI Compiler/platform correctly calls init()/fini() fo ACE_HAS_BROKEN_BITSHIFT Compiler has integer overflow problem with bit-shift operations. ACE_HAS_BROKEN_CONVERSIONS Compiler can't handle calls like foo->operator T *() ACE_HAS_BROKEN_CTIME Compiler/platform uses macro for ctime (e.g., MVS) +ACE_HAS_BROKEN_HPUX_TEMPLATES Earlier versions of HP/UX C++ are damned... ACE_HAS_BROKEN_MSG_H Platform headers don't support <msg.h> prototypes ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the mmap(2) header files with extern "C". ACE_HAS_BROKEN_POSIX_TIME Platform defines struct timespec in <sys/timers.h> diff --git a/ace/Reactor.h b/ace/Reactor.h index 7d9b0bfcf77..bc062242ec3 100644 --- a/ace/Reactor.h +++ b/ace/Reactor.h @@ -600,8 +600,8 @@ protected: // held by the public methods that call down to them. virtual int register_handler_i (ACE_HANDLE handle, - ACE_Event_Handler *eh, - ACE_Reactor_Mask mask); + ACE_Event_Handler *eh, + ACE_Reactor_Mask mask); // Do the work of actually binding the <handle> and <eh> with the // <mask>. diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index b418a1d6726..d409ad467c8 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -19,6 +19,11 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Service_Config) +#if defined (ACE_MT_SAFE) +// Lock the creation of the Singletons. +static ACE_Thread_Mutex ace_service_config_lock_; +#endif /* ACE_MT_SAFE */ + void ACE_Service_Config::dump (void) const { @@ -126,12 +131,19 @@ ACE_Allocator * ACE_Service_Config::alloc (void) { ACE_TRACE ("ACE_Service_Config::allocator"); + if (ACE_Service_Config::allocator_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::allocator_, - ACE_New_Allocator, - 0); - ACE_Service_Config::delete_allocator_ = 1; + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + + if (ACE_Service_Config::allocator_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::allocator_, + ACE_New_Allocator, + 0); + ACE_Service_Config::delete_allocator_ = 1; + } } return ACE_Service_Config::allocator_; } @@ -140,7 +152,7 @@ ACE_Allocator * ACE_Service_Config::alloc (ACE_Allocator *r) { ACE_TRACE ("ACE_Service_Config::allocator"); - + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); ACE_Allocator *t = ACE_Service_Config::allocator_; // We can't safely delete it since we don't know who created it! @@ -154,10 +166,17 @@ ACE_Reactor * ACE_Service_Config::reactor (void) { ACE_TRACE ("ACE_Service_Config::reactor"); + if (ACE_Service_Config::reactor_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::reactor_, ACE_Reactor, 0); - ACE_Service_Config::delete_reactor_ = 1; + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + + if (ACE_Service_Config::reactor_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::reactor_, ACE_Reactor, 0); + ACE_Service_Config::delete_reactor_ = 1; + } } return ACE_Service_Config::reactor_; } @@ -167,6 +186,7 @@ ACE_Service_Config::reactor (ACE_Reactor *r) { ACE_TRACE ("ACE_Service_Config::reactor"); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); ACE_Reactor *t = ACE_Service_Config::reactor_; // We can't safely delete it since we don't know who created it! ACE_Service_Config::delete_reactor_ = 0; @@ -179,10 +199,17 @@ ACE_Proactor * ACE_Service_Config::proactor (size_t threads) { ACE_TRACE ("ACE_Service_Config::proactor"); + if (ACE_Service_Config::proactor_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::proactor_, ACE_Proactor (threads), 0); - ACE_Service_Config::delete_proactor_ = 1; + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + + if (ACE_Service_Config::proactor_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::proactor_, ACE_Proactor (threads), 0); + ACE_Service_Config::delete_proactor_ = 1; + } } return ACE_Service_Config::proactor_; } @@ -192,6 +219,8 @@ ACE_Service_Config::proactor (ACE_Proactor *r) { ACE_TRACE ("ACE_Service_Config::proactor"); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + ACE_Proactor *t = ACE_Service_Config::proactor_; // We can't safely delete it since we don't know who created it! ACE_Service_Config::delete_proactor_ = 0; @@ -204,10 +233,17 @@ ACE_ReactorEx * ACE_Service_Config::reactorEx (void) { ACE_TRACE ("ACE_Service_Config::reactorEx"); + if (ACE_Service_Config::reactorEx_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::reactorEx_, ACE_ReactorEx, 0); - ACE_Service_Config::delete_reactorEx_ = 1; + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + + if (ACE_Service_Config::reactorEx_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::reactorEx_, ACE_ReactorEx, 0); + ACE_Service_Config::delete_reactorEx_ = 1; + } } return ACE_Service_Config::reactorEx_; @@ -218,6 +254,7 @@ ACE_Service_Config::reactorEx (ACE_ReactorEx *r) { ACE_TRACE ("ACE_Service_Config::reactorEx"); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); ACE_ReactorEx *t = ACE_Service_Config::reactorEx_; // We can't safely delete it since we don't know who created it! ACE_Service_Config::delete_reactorEx_ = 0; @@ -233,10 +270,15 @@ ACE_Service_Config::svc_rep (void) if (ACE_Service_Config::svc_rep_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::svc_rep_, ACE_Service_Repository, 0); - ACE_Service_Config::delete_svc_rep_ = 1; - } + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + if (ACE_Service_Config::svc_rep_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::svc_rep_, ACE_Service_Repository, 0); + ACE_Service_Config::delete_svc_rep_ = 1; + } + } return ACE_Service_Config::svc_rep_; } @@ -244,6 +286,7 @@ ACE_Service_Repository * ACE_Service_Config::svc_rep (ACE_Service_Repository *s) { ACE_TRACE ("ACE_Service_Config::svc_rep"); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); ACE_Service_Repository *t = ACE_Service_Config::svc_rep_; // We can't safely delete it since we don't know who created it! @@ -260,8 +303,14 @@ ACE_Service_Config::thr_mgr (void) if (ACE_Service_Config::thr_mgr_ == 0) { - ACE_NEW_RETURN (ACE_Service_Config::thr_mgr_, ACE_Thread_Manager, 0); - ACE_Service_Config::delete_thr_mgr_ = 1; + // Perform Double-Checked Locking Optimization. + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + + if (ACE_Service_Config::thr_mgr_ == 0) + { + ACE_NEW_RETURN (ACE_Service_Config::thr_mgr_, ACE_Thread_Manager, 0); + ACE_Service_Config::delete_thr_mgr_ = 1; + } } return ACE_Service_Config::thr_mgr_; @@ -272,6 +321,8 @@ ACE_Service_Config::thr_mgr (ACE_Thread_Manager *tm) { ACE_TRACE ("ACE_Service_Config::thr_mgr"); + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, ace_service_config_lock_, 0)); + ACE_Thread_Manager *t = ACE_Service_Config::thr_mgr_; // We can't safely delete it since we don't know who created it! ACE_Service_Config::delete_thr_mgr_ = 0; @@ -662,6 +713,7 @@ ACE_Service_Config::run_reactor_event_loop (ACE_Time_Value &tv) while (ACE_Service_Config::end_reactor_event_loop_ == 0) { int result = ACE_Service_Config::reactor ()->handle_events (tv); + if (ACE_Service_Config::reconfig_occurred_) ACE_Service_Config::reconfigure (); else if (result <= 0) diff --git a/ace/Signal.cpp b/ace/Signal.cpp index ad682c2e715..8ca57238c6d 100644 --- a/ace/Signal.cpp +++ b/ace/Signal.cpp @@ -20,7 +20,7 @@ ace_sig_handler_dispatch (int signum, siginfo_t *info, ucontext_t *context) static ACE_SignalHandler ace_signal_handler_dispatcher = ACE_SignalHandler (ace_sig_handler_dispatch); -#if !defined (HPUX) +#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES) extern "C" void ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context) { @@ -29,14 +29,14 @@ ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context) } static ACE_SignalHandler ace_signal_handlers_dispatcher = ACE_SignalHandler (ace_sig_handlers_dispatch); -#endif /* HPUX */ +#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ #else static ACE_SignalHandler ace_signal_handler_dispatcher = ACE_SignalHandler (ACE_Sig_Handler::dispatch); -#if !defined (HPUX) +#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES) static ACE_SignalHandler ace_signal_handlers_dispatcher = ACE_SignalHandler (ACE_Sig_Handlers::dispatch); -#endif /* HPUX */ +#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ #endif /* ACE_HAS_SIG_C_FUNC */ #if defined (ACE_MT_SAFE) @@ -346,7 +346,7 @@ ACE_Sig_Adapter::handle_signal (int signum, // There are bugs with HP/UX's C++ compiler that prevents this stuff // from compiling... -#if !defined (HPUX) +#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES) #define ACE_MAX_SIGNAL_HANDLERS size_t (20) // Keeps track of the id that uniquely identifies each registered @@ -665,4 +665,4 @@ ACE_MT (template class ACE_Guard<ACE_Recursive_Thread_Mutex>); template class ACE_Fixed_Set<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>; template class ACE_Fixed_Set_Iterator<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>; #endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ -#endif /* HPUX */ +#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ diff --git a/ace/TLI_Acceptor.h b/ace/TLI_Acceptor.h index 374216c5a18..af795234662 100644 --- a/ace/TLI_Acceptor.h +++ b/ace/TLI_Acceptor.h @@ -77,6 +77,10 @@ public: // block forever, a <timeout> of {0, 0} means poll. <restart> == 1 // means "restart if interrupted." + // = Meta-type info + typedef ACE_INET_Addr PEER_ADDR; + typedef ACE_TLI_Stream PEER_STREAM; + void dump (void) const; // Dump the state of an object. diff --git a/ace/TLI_Stream.h b/ace/TLI_Stream.h index 73a7391a3fd..e001958b91e 100644 --- a/ace/TLI_Stream.h +++ b/ace/TLI_Stream.h @@ -72,6 +72,9 @@ public: ssize_t recv_n (void *buf, size_t n) const; // Recv n bytes, keep trying until n are received (uses read (2)). + // = Meta-type info + typedef ACE_INET_Addr PEER_ADDR; + void dump (void) const; // Dump the state of an object. diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp index 489ec46371b..0295d644ce4 100644 --- a/ace/Task_T.cpp +++ b/ace/Task_T.cpp @@ -6,7 +6,9 @@ #define ACE_BUILD_DLL #include "ace/Task_T.h" +#if !defined(HPUX) || defined(__GNUG_) #include "ace/Module.h" +#endif /* !defined(HPUX) || defined(__GNUG__) #include "ace/Service_Config.h" #if !defined (__ACE_INLINE__) diff --git a/ace/XtReactor.cpp b/ace/XtReactor.cpp index 4ac86c8e0de..62eb55ece09 100644 --- a/ace/XtReactor.cpp +++ b/ace/XtReactor.cpp @@ -242,6 +242,13 @@ ACE_XtReactor::register_handler_i (ACE_HANDLE handle, return 0; } +int +ACE_XtReactor::register_handler_i (const ACE_Handle_Set &handles, + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask) +{ + return ACE_Reactor::register_handler_i (handles, handler, mask); +} int ACE_XtReactor::remove_handler_i (ACE_HANDLE handle, diff --git a/ace/XtReactor.h b/ace/XtReactor.h index bbb787edbc6..f9d289e70d2 100644 --- a/ace/XtReactor.h +++ b/ace/XtReactor.h @@ -54,6 +54,11 @@ public: ACE_Event_Handler *handler, ACE_Reactor_Mask mask); + virtual int register_handler_i (const ACE_Handle_Set &handles, + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask); + // Register a set of <handles>. + virtual int remove_handler_i (ACE_HANDLE handle, ACE_Reactor_Mask mask); virtual int schedule_timer (ACE_Event_Handler *handler, diff --git a/ace/config-hpux-10.x-aCC.h b/ace/config-hpux-10.x-aCC.h index d22caadddbc..de121fa323c 100644 --- a/ace/config-hpux-10.x-aCC.h +++ b/ace/config-hpux-10.x-aCC.h @@ -3,7 +3,7 @@ // The following configuration file is designed to work for HP // platforms running HP/UX 10.x. For using HP C++ compiler with -// templates you should have patch PHSS_6246. +// platforms running HP/UX 10.x and using the HP/aCC compiler. #if !defined (ACE_CONFIG_H) #define ACE_CONFIG_H @@ -13,6 +13,10 @@ #define HPUX #endif /* HPUX */ +#if __cplusplus < 199707L +#define ACE_HAS_BROKEN_HPUX_TEMPLATES +#endif /* __cplusplus < 199707L */ + #define _HPUX_SOURCE #include /**/ <sys/stdsyms.h> #include /**/ <sched.h> /* pthread.h doesn't include this */ @@ -22,6 +26,8 @@ // They forgot a const in the prototype of const_timewait... #define ACE_LACKS_CONST_TIMESPEC_PTR +#define ACE_HAS_EXCEPTIONS + #define ACE_HAS_TYPENAME_KEYWORD #define ACE_HAS_TEMPLATE_TYPEDEFS #define ACE_TEMPLATES_REQUIRE_SOURCE @@ -83,9 +89,13 @@ // iostream header lacks ipfx (), isfx (), etc., declarations #define ACE_LACKS_IOSTREAM_FX +// streambuf class lacks linebuffered() method. +#define ACE_LACKS_LINEBUFFERED_STREAMBUF + // Compiler/platform supports struct strbuf. #define ACE_HAS_STRBUF_T -#include /**/ <stropts.h> /* for struct strbuf */ +#define ACE_HAS_STREAM_PIPES +#define ACE_HAS_STREAMS // Compiler supports the ssize_t typedef. #define ACE_HAS_SSIZE_T diff --git a/ace/config-hpux-10.x-g++.h b/ace/config-hpux-10.x-g++.h index a53956ce198..265221695e3 100644 --- a/ace/config-hpux-10.x-g++.h +++ b/ace/config-hpux-10.x-g++.h @@ -82,10 +82,8 @@ #define ACE_HAS_GETRUSAGE #define ACE_HAS_SIGINFO_T -#define ACE_LACKS_UCONTEXT_T -#define ACE_LACKS_UCONTEXT_H +#define ACE_HAS_UCONTEXT_T #define _CLOCKID_T -#define ACE_SELECT_USES_INT #define ACE_LACKS_SI_ADDR // Platform has the XLI version of ACE_TLI. diff --git a/ace/config-hpux-10.x.h b/ace/config-hpux-10.x.h index 6a38fac16ca..594f6efa045 100644 --- a/ace/config-hpux-10.x.h +++ b/ace/config-hpux-10.x.h @@ -13,6 +13,10 @@ #define HPUX #endif /* HPUX */ +#if __cplusplus < 199707L +#define ACE_HAS_BROKEN_HPUX_TEMPLATES +#endif /* __cplusplus < 199707L */ + #define _HPUX_SOURCE #include /**/ <sys/stdsyms.h> #include /**/ <sched.h> /* pthread.h doesn't include this */ diff --git a/ace/config-hpux-9.x-orbix.h b/ace/config-hpux-9.x-orbix.h index c46cb00548e..8684a385aab 100644 --- a/ace/config-hpux-9.x-orbix.h +++ b/ace/config-hpux-9.x-orbix.h @@ -12,6 +12,10 @@ #define HPUX #endif /* HPUX */ +#if __cplusplus < 199707L +#define ACE_HAS_BROKEN_HPUX_TEMPLATES +#endif /* __cplusplus < 199707L */ + #define ACE_HAS_BROKEN_CONVERSIONS // They forgot a const in the prototype of const_timewait... diff --git a/ace/config-hpux-9.x.h b/ace/config-hpux-9.x.h index 0679c810161..fa609b51e7d 100644 --- a/ace/config-hpux-9.x.h +++ b/ace/config-hpux-9.x.h @@ -12,6 +12,10 @@ #define HPUX #endif /* HPUX */ +#if __cplusplus < 199707L +#define ACE_HAS_BROKEN_HPUX_TEMPLATES +#endif /* __cplusplus < 199707L */ + #define ACE_HAS_BROKEN_CONVERSIONS // They forgot a const in the prototype of const_timewait... diff --git a/ace/config-irix6.2-sgic++.h b/ace/config-irix6.2-sgic++.h index 299cd50914c..953b2599917 100644 --- a/ace/config-irix6.2-sgic++.h +++ b/ace/config-irix6.2-sgic++.h @@ -58,8 +58,20 @@ // even though it supports pthreads! (like Irix 6.2) #define ACE_LACKS_CONDATTR_PSHARED -// IRIX 6.2 supports some variant of POSIX Pthreads, is it stock DCE? +// Platform lacks pthread_thr_sigsetmask (e.g., MVS, HP/UX, OSF/1 3.2, +// Irix 6.2) +#define ACE_LACKS_PTHREAD_THR_SIGSETMASK + +// IRIX 6.2 supports a variant of POSIX Pthreads, supposedly POSIX 1c #define ACE_HAS_PTHREADS + +// Platform has pthread_equal(). +#define ACE_HAS_PTHREAD_EQUAL + +// Platform has pthread_t defined. +#define ACE_HAS_PTHREAD_T + +// Platform lacks readers/writer locks. #define ACE_LACKS_RWLOCK_T // Platform/compiler has the sigwait(2) prototype @@ -77,6 +89,16 @@ // Compiler/platform contains the <sys/syscall.h> file. #define ACE_HAS_SYSCALL_H +// Platform provides <sysent.h> header +#define ACE_HAS_SYSENT_H + +// Platform supports system configuration information +#define ACE_HAS_SYSINFO + +// Compiler implements templates that support typedefs inside of +// classes used as formal arguments to a template class. +// #define ACE_HAS_TEMPLATE_TYPEDEFS + // Compiler/platform supports alloca() #define ACE_HAS_ALLOCA @@ -143,15 +165,15 @@ // Prototypes for both signal() and struct sigaction are consistent. #define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES -// Compiler/platform supports sys_siglist array. -#define ACE_HAS_SYS_SIGLIST - // Platform provides <sys/filio.h> header. #define ACE_HAS_SYS_FILIO_H // Compiler/platform defines a union semun for SysV shared memory. #define ACE_HAS_SEMUN +// Compiler/platform defines the F_SETOWN macro +#define ACE_HAS_SETOWN + // Platform supports IP multicast #define ACE_HAS_IP_MULTICAST |