summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-18 03:51:37 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-18 03:51:37 +0000
commita0a5ab621183f0511113fdc1e52f8a59b6a09be3 (patch)
tree489def2dac3b00b5d510d0c248b53367ce3b0364 /ace
parentce1286e8df11451a6d016fa34e00727831dc5637 (diff)
downloadATCD-a0a5ab621183f0511113fdc1e52f8a59b6a09be3.tar.gz
whoopie!!
whoopie, more new stuff, more things will break!!
Diffstat (limited to 'ace')
-rw-r--r--ace/Log_Msg.cpp2
-rw-r--r--ace/Log_Msg.h15
-rw-r--r--ace/Log_Record.cpp45
-rw-r--r--ace/Log_Record.h19
-rw-r--r--ace/Log_Record.i22
-rw-r--r--ace/Malloc_T.cpp35
-rw-r--r--ace/Malloc_T.h7
-rw-r--r--ace/Map_Manager.cpp30
-rw-r--r--ace/OS.cpp1
-rw-r--r--ace/OS.h4
-rw-r--r--ace/OS.i38
-rw-r--r--ace/README1
-rw-r--r--ace/SOCK_Stream.cpp2
-rw-r--r--ace/Service_Config.cpp4
-rw-r--r--ace/System_Time.cpp1
-rw-r--r--ace/TLI.cpp10
-rw-r--r--ace/Time_Value.cpp28
-rw-r--r--ace/Time_Value.h4
-rw-r--r--ace/Time_Value.i30
-rw-r--r--ace/Token_Request_Reply.cpp4
-rw-r--r--ace/UNIX_Addr.cpp7
-rw-r--r--ace/config-aix-3.2.5.h2
-rw-r--r--ace/config-aix-4.1.x.h1
-rw-r--r--ace/config-osf1-4.0-g++.h209
-rw-r--r--ace/config-osf1-4.0.h11
-rw-r--r--ace/config-unixware-2.01-g++.h1
-rw-r--r--ace/config-win32-msvc4.0.h1
27 files changed, 403 insertions, 131 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 8b4cdab22a1..a50cde5b021 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -365,7 +365,7 @@ ACE_Log_Msg::log (const char *format_str,
return 0;
ACE_Log_Record log_record (log_priority,
- ACE_OS::time ((time_t *) 0),
+ ACE_OS::gettimeofday (),
this->getpid ());
char *bp = this->msg ();
int abort_prog = 0;
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index b9b2ea73b5b..3c4a784754d 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -98,18 +98,19 @@ class ACE_Export ACE_Log_Msg
// communicate errors between framework methods and callers.
{
public:
- enum /* Logger Flags */
+ // Logger Flags.
+ enum
{
- STDERR = 01,
+ STDERR = 01,
// Write messages to stderr.
- LOGGER = 02,
+ LOGGER = 02,
// Write messages to the local client logger deamon.
- OSTREAM = 04,
+ OSTREAM = 04,
// Write messages to the ostream * stored in thread-specific
// storage.
- VERBOSE = 010,
- // Display messages in a verbose manner
- SILENT = 020
+ VERBOSE = 010,
+ // Display messages in a verbose manner.
+ SILENT = 020
// Do not print messages at all (just leave in thread-specific
// storage for later inspection).
};
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
index 17a72d61761..014ed77aa4d 100644
--- a/ace/Log_Record.cpp
+++ b/ace/Log_Record.cpp
@@ -15,8 +15,8 @@ ACE_Log_Record::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, "type_ = %d\n", this->type_));
ACE_DEBUG ((LM_DEBUG, "\nlength_ = %d\n", this->length_));
- ACE_DEBUG ((LM_DEBUG, "\nlength_ = %d\n", this->time_stamp_));
- ACE_DEBUG ((LM_DEBUG, "\ntime_stamp_ = %s\n", this->pid_));
+ ACE_DEBUG ((LM_DEBUG, "\ntime_stamp_ = (%d, %d)\n", this->time_stamp_.sec (), this->time_stamp_.usec ()));
+ ACE_DEBUG ((LM_DEBUG, "\npid_ = %s\n", this->pid_));
ACE_DEBUG ((LM_DEBUG, "\nmsg_data_ = %s\n", this->msg_data_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
@@ -30,7 +30,18 @@ ACE_Log_Record::msg_data (const char *data)
}
ACE_Log_Record::ACE_Log_Record (ACE_Log_Priority lp,
- long ts,
+ long ts_sec,
+ long p)
+ : type_ (long (lp)),
+ length_ (0),
+ time_stamp_ (ts_sec),
+ pid_ (p)
+{
+ // ACE_TRACE ("ACE_Log_Record::ACE_Log_Record");
+}
+
+ACE_Log_Record::ACE_Log_Record (ACE_Log_Priority lp,
+ const ACE_Time_Value &ts,
long p)
: type_ (long (lp)),
length_ (0),
@@ -74,7 +85,7 @@ ACE_Log_Record::print (const char host_name[],
if (verbose)
{
- time_t now = this->time_stamp_;
+ time_t now = this->time_stamp_.sec ();
char ctp[26]; // 26 is a magic number...
if (ACE_OS::ctime_r (&now, ctp, sizeof ctp) == 0)
@@ -83,14 +94,20 @@ ACE_Log_Record::print (const char host_name[],
/* 01234567890123456789012345 */
/* Wed Oct 18 14:25:36 1989n0 */
- ctp[24] = '\0';
+ ctp[19] = '\0'; // NUL-terminate after the time.
+ ctp[24] = '\0'; // NUL-terminate after the date.
if (host_name == 0)
host_name = "<local_host>";
- return ACE_OS::fprintf (fp, "%s@%s@%d@%d@%s",
- ctp + 4, host_name, this->pid_,
- this->type_, this->msg_data_);
+ return ACE_OS::fprintf (fp, "%s.%d%s@%s@%d@%d@%s",
+ ctp + 4,
+ this->time_stamp_.usec () / 1000,
+ ctp + 20,
+ host_name,
+ this->pid_,
+ this->type_,
+ this->msg_data_);
}
else
return ACE_OS::fprintf (fp, "%s", this->msg_data_);
@@ -105,20 +122,26 @@ ACE_Log_Record::print (const char host_name[],
if (verbose)
{
- time_t now = this->time_stamp_;
+ time_t now = this->time_stamp_.sec ();
char ctp[26]; // 26 is a magic number...
+
if (ACE_OS::ctime_r (&now, ctp, sizeof ctp) == 0)
return -1;
/* 01234567890123456789012345 */
/* Wed Oct 18 14:25:36 1989n0 */
- ctp[24] = '\0';
+ ctp[19] = '\0'; // NUL-terminate after the time.
+ ctp[24] = '\0'; // NUL-terminate after the date.
if (host_name == 0)
host_name = "<local_host>";
- s << (ctp + 4)
+ s << (ctp + 4) << '.'
+ // The following line isn't portable, so I've commented it out...
+ // << setw (3) << setfill ('0') << this->time_stamp_.usec () / 1000 << ' '
+ << this->time_stamp_.usec () / 1000 << ' '
+ << (ctp + 20)
<< '@'
<< host_name
<< '@'
diff --git a/ace/Log_Record.h b/ace/Log_Record.h
index 2a93650f330..48aa06513bf 100644
--- a/ace/Log_Record.h
+++ b/ace/Log_Record.h
@@ -54,6 +54,11 @@ friend ostream &operator << (ostream &, ACE_Log_Record &);
long pid);
// Create a <Log_Record> and set its priority, time stamp, and
// process id.
+ ACE_Log_Record (ACE_Log_Priority lp,
+ const ACE_Time_Value &time_stamp,
+ long pid);
+ // Create a <Log_Record> and set its priority, time stamp, and
+ // process id.
int print (const char host_name[],
int verbose = 1,
@@ -88,10 +93,10 @@ friend ostream &operator << (ostream &, ACE_Log_Record &);
void length (long);
// Set the length of the <Log_Record>.
- long time_stamp (void) const;
+ const ACE_Time_Value &time_stamp (void) const;
// Get the time stamp of the <Log_Record>.
- void time_stamp (long);
+ void time_stamp (const ACE_Time_Value &);
// Set the time stamp of the <Log_Record>.
long pid (void) const;
@@ -120,16 +125,16 @@ private:
// Round up to the alignment restrictions.
long type_;
- // Type of logging record
+ // Type of logging record.
long length_;
- // length of the logging record
+ // Total length of the logging record in bytes.
- long time_stamp_;
- // Time logging record generated
+ ACE_Time_Value time_stamp_;
+ // Time that the logging record was generated.
long pid_;
- // Id of process that generated the record
+ // Id of process that generated the logging record.
char msg_data_[MAXLOGMSGLEN];
// Logging record data
diff --git a/ace/Log_Record.i b/ace/Log_Record.i
index 8ddba60122d..a8ba7ef0ae3 100644
--- a/ace/Log_Record.i
+++ b/ace/Log_Record.i
@@ -7,20 +7,22 @@ inline void
ACE_Log_Record::encode (void)
{
ACE_TRACE ("ACE_Log_Record::encode");
- this->type_ = htonl (this->type_);
- this->length_ = htonl (this->length_);
- this->time_stamp_ = htonl (this->time_stamp_);
- this->pid_ = htonl (this->pid_);
+ this->type_ = htonl (this->type_);
+ this->length_ = htonl (this->length_);
+ this->time_stamp_ = ACE_Time_Value (htonl (this->time_stamp_.sec ()),
+ htonl (this->time_stamp_.usec ()));
+ this->pid_ = htonl (this->pid_);
}
inline void
ACE_Log_Record::decode (void)
{
ACE_TRACE ("ACE_Log_Record::decode");
- this->type_ = ntohl (this->type_);
- this->time_stamp_ = ntohl (this->time_stamp_);
- this->pid_ = ntohl (this->pid_);
- this->length_ = ntohl (this->length_);
+ this->type_ = ntohl (this->type_);
+ this->time_stamp_ = ACE_Time_Value (ntohl (this->time_stamp_.sec()),
+ ntohl (this->time_stamp_.usec()));
+ this->pid_ = ntohl (this->pid_);
+ this->length_ = ntohl (this->length_);
}
inline long
@@ -51,7 +53,7 @@ ACE_Log_Record::length (long l)
this->length_ = l;
}
-inline long
+inline const ACE_Time_Value &
ACE_Log_Record::time_stamp (void) const
{
ACE_TRACE ("ACE_Log_Record::time_stamp");
@@ -59,7 +61,7 @@ ACE_Log_Record::time_stamp (void) const
}
inline void
-ACE_Log_Record::time_stamp (long ts)
+ACE_Log_Record::time_stamp (const ACE_Time_Value &ts)
{
ACE_TRACE ("ACE_Log_Record::time_stamp");
this->time_stamp_ = ts;
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index 6e8d9a99132..d3f3ebe3313 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -402,7 +402,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::trybind (const char *name,
void *&pointer)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::trybind");
- ACE_Write_Guard<LOCK> mon (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
ACE_Name_Node *node = this->shared_find (name);
if (node == 0)
@@ -418,11 +418,11 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::trybind (const char *name,
template <ACE_MEM_POOL_1, class LOCK> int
ACE_Malloc<ACE_MEM_POOL_2, LOCK>::bind (const char *name,
- void *pointer,
- int duplicates)
+ void *pointer,
+ int duplicates)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::bind");
- ACE_Write_Guard<LOCK> mon (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
if (duplicates == 0 && this->shared_find (name) != 0)
// If we're not allowing duplicates, then if the name is already
@@ -440,7 +440,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::find (const char *name, void *&pointer)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::find");
- ACE_Read_Guard<LOCK> mon (this->lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
ACE_Name_Node *node = this->shared_find (name);
@@ -453,21 +453,26 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::find (const char *name, void *&pointer)
}
}
+// Returns a count of the number of available chunks that can hold
+// <size> byte allocations.
+
template <ACE_MEM_POOL_1, class LOCK> size_t
-ACE_Malloc<ACE_MEM_POOL_2, LOCK>::avail_chunks (const size_t size) const
+ACE_Malloc<ACE_MEM_POOL_2, LOCK>::avail_chunks (size_t size) const
{
- ACE_Read_Guard<LOCK> mon (this->lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, (LOCK &) this->lock_, 0);
- static const size_t mal_size = sizeof (ACE_Malloc_Header);
size_t count = 0;
- const size_t sizeof_oversize_ = mal_size / size;
+ // Avoid dividing by 0...
+ size = size == 0 ? 1 : size;
+ const size_t sizeof_oversize = sizeof (ACE_Malloc_Header) / size;
for (ACE_Malloc_Header *currp = this->cb_ptr_->freep_->s_.next_block_;
- ; currp = currp->s_.next_block_)
+ ;
+ currp = currp->s_.next_block_)
{
- if (currp->s_.size_ * sizeof (ACE_Malloc_Header) >= size_)
- count += currp->s_.size_ * sizeof_oversize_;
- // How many will fit in this block.
+ if (currp->s_.size_ * sizeof (ACE_Malloc_Header) >= sizeof_oversize)
+ // How many will fit in this block.
+ count += currp->s_.size_ * sizeof_oversize;
if (currp == this->cb_ptr_->freep_)
break;
@@ -481,7 +486,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::find (const char *name)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::find");
- ACE_Read_Guard<LOCK> mon (this->lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->shared_find (name) == 0 ? -1 : 0;
}
@@ -490,7 +495,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::unbind (const char *name, void *&pointer)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::unbind");
- ACE_Write_Guard<LOCK> mon (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
ACE_Name_Node *prev = 0;
for (ACE_Name_Node *curr = this->cb_ptr_->name_head_;
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
index 5dfe6be0ad3..7573a05fba7 100644
--- a/ace/Malloc_T.h
+++ b/ace/Malloc_T.h
@@ -126,9 +126,6 @@ public:
// Change the protection of the pages of the mapped region to <prot>
// starting at <addr> up to <len> bytes.
- size_t avail_chunks (const size_t size) const;
- // Returns a count of the number of available chunks.
-
ALLOCATOR &alloc (void);
// Returns the underlying allocator.
@@ -265,6 +262,10 @@ public:
// Change the protection of the pages of the mapped region to <prot>
// starting at <addr> up to <len> bytes.
+ size_t avail_chunks (size_t size) const;
+ // Returns a count of the number of available chunks that can hold
+ // <size> byte allocations.
+
#if defined (ACE_MALLOC_STATS)
void print_stats (void);
// Dump statistics of how malloc is behaving.
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index d4e7512946b..ffa07a3d750 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -85,7 +85,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::close (void)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::close");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->close_i ();
}
@@ -104,7 +104,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::open (size_t size,
ACE_Allocator *alloc)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::open");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
if (alloc == 0)
alloc = ACE_Service_Config::alloc ();
@@ -272,7 +272,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::trybind (const EXT_ID &ext_id,
INT_ID &int_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::trybind");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->trybind_i (ext_id, int_id);
}
@@ -290,7 +290,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::find (const EXT_ID &ext_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::find");
- ACE_Read_Guard<LOCK> m (this->lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->find_i (ext_id);
}
@@ -449,7 +449,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::unbind (const EXT_ID &ext_id,
INT_ID &int_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::unbind");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->unbind_i (ext_id, int_id);
}
@@ -459,7 +459,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind (const EXT_ID &ext_id,
const INT_ID &int_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->bind_i (ext_id, int_id);
}
@@ -471,7 +471,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::rebind (const EXT_ID &ext_id,
INT_ID &old_int_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::rebind");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id);
}
@@ -481,7 +481,7 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::find (const EXT_ID &ext_id,
INT_ID &int_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::find");
- ACE_Read_Guard<LOCK> m (this->lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->find_i (ext_id, int_id);
}
@@ -501,7 +501,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::unbind (const EXT_ID &ext_id)
{
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::unbind");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->unbind_i (ext_id) == -1 ? -1 : 0;
}
@@ -509,7 +509,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::current_size (void)
{
ACE_TRACE ("ACE_Map_Manager::current_size");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->cur_size_;
}
@@ -517,7 +517,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::total_size (void)
{
ACE_TRACE ("ACE_Map_Manager::total_size");
- ACE_Write_Guard<LOCK> m (this->lock_);
+ ACE_WRITE_GUARD_RETURN (LOCK, ace_mon, this->lock_, -1);
return this->max_size_;
}
@@ -546,7 +546,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> *&mm)
{
ACE_TRACE ("ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::next");
- ACE_Read_Guard<LOCK> m (this->map_man_.lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
// Note that this->next_ is never negative at this point...
if (size_t (this->next_) < this->map_man_.cur_size_)
@@ -562,7 +562,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::advance (void)
{
ACE_TRACE ("ACE_Map_Iterator<EXT_ID, INT_ID, LOCK>::advance");
- ACE_Read_Guard<LOCK> m (this->map_man_.lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
for (++this->next_;
size_t (this->next_) < this->map_man_.cur_size_
@@ -597,7 +597,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> *&mm)
{
ACE_TRACE ("ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::next");
- ACE_Read_Guard<LOCK> m (this->map_man_.lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
if (this->next_ >= 0)
{
@@ -612,7 +612,7 @@ template <class EXT_ID, class INT_ID, class LOCK> int
ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::advance (void)
{
ACE_TRACE ("ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, LOCK>::advance");
- ACE_Read_Guard<LOCK> m (this->map_man_.lock_);
+ ACE_READ_GUARD_RETURN (LOCK, ace_mon, this->map_man_.lock_, -1);
for (--this->next_;
this->next_ >= 0
diff --git a/ace/OS.cpp b/ace/OS.cpp
index ec2cee57ef8..454309f1c11 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -505,6 +505,7 @@ ACE_Win32_Thread_Adapter::svc_run (ACE_Win32_Thread_Adapter *thread_args)
status = (*func) (arg); // Call thread entry point.
}
ACE_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) {
+ ACE_DEBUG ((LM_DEBUG, "(%t) Win32 structured exception exiting outermost svc_run\n"));
// Here's where we might want to provide a hook to report this...
// As it stands now, we just catch all Win32 structured exceptions
// so that we can make sure to clean up correctly when the thread
diff --git a/ace/OS.h b/ace/OS.h
index 687ab5a263b..160e3971b53 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -1417,6 +1417,10 @@ extern "C" int sigwait (sigset_t *set);
#include <tiuser.h>
#endif /* ACE_HAS_TIUSER_H */
+#if defined (ACE_HAS_BROKEN_T_ERRNO)
+undef t_errno
+#endif /* ACE_HAS_BROKEN_T_ERRNO */
+
#if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
#include <dlfcn.h>
#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
diff --git a/ace/OS.i b/ace/OS.i
index a8402405d67..77d7f41b43f 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -2177,7 +2177,7 @@ ACE_OS::getprotobyname_r (const char *name,
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) && !defined (UNIXWARE)
-#if !defined (AIX)
+#if !defined (AIX) || !defined (DIGITAL_UNIX)
ACE_SOCKCALL_RETURN (::getprotobyname_r (name, result, buffer, sizeof (ACE_PROTOENT_DATA)),
struct protoent *, 0);
#else
@@ -2211,7 +2211,7 @@ ACE_OS::getprotobynumber_r (int proto,
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) && !defined (UNIXWARE)
-#if !defined (AIX)
+#if !defined (AIX) || !defined (DIGITAL_UNIX)
ACE_SOCKCALL_RETURN (::getprotobynumber_r (proto, result, buffer, sizeof (ACE_PROTOENT_DATA)),
struct protoent *, 0);
#else
@@ -2426,7 +2426,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, int length, int type,
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) && !defined (UNIXWARE)
-#if !defined (AIX)
+#if !defined (AIX) || !defined (DIGITAL_UNIX)
ACE_SOCKCALL_RETURN (::gethostbyaddr_r (addr, length, type, result,
buffer, sizeof (ACE_HOSTENT_DATA),
h_errnop),
@@ -2463,7 +2463,7 @@ ACE_OS::gethostbyname_r (const char *name, hostent *result,
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) && !defined (UNIXWARE)
-#if !defined (AIX)
+#if !defined (AIX) || !defined (DIGITAL_UNIX)
ACE_SOCKCALL_RETURN (::gethostbyname_r (name, result, buffer,
sizeof (ACE_HOSTENT_DATA), h_errnop),
struct hostent *, 0);
@@ -2502,7 +2502,7 @@ ACE_OS::getservbyname_r (const char *svc, const char *proto,
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (0);
#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) && !defined (UNIXWARE)
-#if !defined (AIX)
+#if !defined (AIX) || !defined (DIGITAL_UNIX)
ACE_SOCKCALL_RETURN (::getservbyname_r (svc, proto, result, buf,
sizeof (ACE_SERVENT_DATA)),
struct servent *, 0);
@@ -3227,6 +3227,7 @@ ACE_OS::thr_sigsetmask (int how,
// commented this out since nothing appropriate
// found in the man pages...
ACE_NOTSUP_RETURN (-1);
+
#elif defined (ACE_HAS_DCETHREADS)
#if defined (ACE_HAS_PTHREADS_1003_DOT_1C)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigaction (how, nsm, osm),
@@ -4600,23 +4601,21 @@ ACE_INLINE char *
ACE_OS::ctime_r (const time_t *t, char *buf, int buflen)
{
// ACE_TRACE ("ACE_OS::ctime_r");
- char *result;
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
-#if !defined (AIX) && !defined (UNIXWARE)
- ACE_OSCALL (::ctime_r (t, buf, buflen), char *, 0, result);
-#elif defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
+#if defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
char *result;
ACE_OSCALL (::ctime_r (t, buf), char *, 0, result);
- ::strncpy (buf, result, TIMELEN);
+ ::strncpy (buf, result, buflen);
return buf;
#else
- ACE_OSCALL (::ctime_r (t, buf), char *, 0, result);
+ ACE_OSCALL_RETURN (::ctime_r (t, buf, buflen), char *, 0);
#endif /* !defined (AIX) */
#else
+ char *result;
ACE_OSCALL (::ctime (t), char *, 0, result);
-#endif
::strncpy (buf, result, buflen);
return buf;
+#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) */
}
ACE_INLINE struct tm *
@@ -4649,19 +4648,20 @@ ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen)
{
// ACE_TRACE ("ACE_OS::asctime_r");
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
-#if !defined (AIX) && !defined (UNIXWARE)
- ACE_OSCALL_RETURN (::asctime_r (t, buf, buflen), char *, 0);
-#elif defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
+#if defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
char *result;
ACE_OSCALL (::asctime_r (t, buf), char *, 0, result);
- ::strncpy (buf, result, TIMELEN);
+ ::strncpy (buf, result, buflen);
return buf;
#else
- ACE_OSCALL_RETURN (::asctime_r (t, buf), char *, 0);
-#endif /* !defined (AIX) */
+ ACE_OSCALL_RETURN (::asctime_r (t, buf, buflen), char *, 0);
+#endif /* ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R */
#else
+ char *result;
ACE_OSCALL_RETURN (::asctime (t), char *, 0);
-#endif
+ ::strncpy (buf, result, buflen);
+ return buf;
+#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) */
}
ACE_INLINE int
diff --git a/ace/README b/ace/README
index 0fbc0ed35df..21022f95164 100644
--- a/ace/README
+++ b/ace/README
@@ -79,6 +79,7 @@ ACE_HAS_SOCKIO_H Compiler/platform provides the sockio.h file
ACE_HAS_SPARCWORKS_401_SIGNALS Compiler has brain-damaged SPARCwork SunOS 4.x signal prototype...
ACE_HAS_SSIZE_T Compiler supports the ssize_t typedef
ACE_HAS_STHREADS Platform supports Solaris threads
+ACE_HAS_STL Platform/compiler supports STL
ACE_HAS_STRBUF_T Compiler/platform supports struct strbuf
ACE_HAS_STREAMS Platform supports STREAMS
ACE_HAS_STREAM_PIPES Platform supports STREAM pipes
diff --git a/ace/SOCK_Stream.cpp b/ace/SOCK_Stream.cpp
index 2ff53e4b33a..eac7daf021d 100644
--- a/ace/SOCK_Stream.cpp
+++ b/ace/SOCK_Stream.cpp
@@ -20,6 +20,6 @@ ACE_SOCK_Stream::close (void)
// close in order to avoid losing data.
this->close_writer ();
// Close down the socket.
- ACE_SOCK::close ();
+ return ACE_SOCK::close ();
}
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index d5d719b6658..a8caa32b165 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -553,9 +553,9 @@ ACE_Service_Config::open (const char program_name[])
{
ACE_TRACE ("ACE_Service_Config::open");
- // Only use STDERR if the users hasn't yet set the flags.
+ // Only use STDERR if the users hasn't already set the flags.
if (ACE_LOG_MSG->open (program_name,
- ACE_LOG_MSG->flags() ? ACE_LOG_MSG->flags() : (u_long) ACE_Log_Msg::STDERR,
+ ACE_LOG_MSG->flags () ? ACE_LOG_MSG->flags () : (u_long) ACE_Log_Msg::STDERR,
ACE_Service_Config::logger_key_) == -1)
return -1;
ACE_DEBUG ((LM_STARTUP, "starting up daemon %n\n"));
diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp
index 9d2f259daaa..ee93df24573 100644
--- a/ace/System_Time.cpp
+++ b/ace/System_Time.cpp
@@ -33,6 +33,7 @@ ACE_System_Time::get_local_system_time (ACE_Time_Value &time_out)
{
ACE_TRACE ("ACE_System_Time::get_local_system_time");
time_out.sec (ACE_OS::time (0));
+ return 0;
}
// Get the system time of the central time server.
diff --git a/ace/TLI.cpp b/ace/TLI.cpp
index d7724a87f6a..8f2ae8726b5 100644
--- a/ace/TLI.cpp
+++ b/ace/TLI.cpp
@@ -10,6 +10,16 @@
#if defined (ACE_HAS_TLI)
+#if defined (ACE_HAS_BROKEN_T_ERRNO)
+// We have to provide _terrno() ourselves.
+
+int *
+_terrno (void)
+{
+ return &t_errno;
+}
+#endif /* ACE_HAS_BROKEN_T_ERRNO */
+
ACE_ALLOC_HOOK_DEFINE(ACE_TLI)
void
diff --git a/ace/Time_Value.cpp b/ace/Time_Value.cpp
index c6aef0b8fa4..75406542c14 100644
--- a/ace/Time_Value.cpp
+++ b/ace/Time_Value.cpp
@@ -18,7 +18,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Time_Value)
ACE_Time_Value::ACE_Time_Value (const timeval &tv)
{
- ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
+ // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (tv);
}
@@ -27,7 +27,7 @@ ACE_Time_Value::ACE_Time_Value (const timeval &tv)
ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time)
{
- ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
+ // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (file_time);
}
@@ -46,7 +46,7 @@ void ACE_Time_Value::set (const FILETIME &file_time)
ACE_Time_Value::operator FILETIME () const
{
- ACE_TRACE ("ACE_Time_Value::operator FILETIME");
+ // ACE_TRACE ("ACE_Time_Value::operator FILETIME");
ACE_QWORD _100ns = ((ACE_QWORD) this->tv_sec_ * (1000 * 1000) + this->tv_usec_) * 10;
FILETIME file_time;
file_time.dwLowDateTime = ACE_LOW_DWORD (_100ns);
@@ -59,7 +59,7 @@ ACE_Time_Value::operator FILETIME () const
void
ACE_Time_Value::dump (void) const
{
- ACE_TRACE ("ACE_Time_Value::dump");
+ // ACE_TRACE ("ACE_Time_Value::dump");
#if 0
if (tv.usec () < 0 || tv.sec () < 0)
stream << "-";
@@ -76,14 +76,14 @@ ACE_Time_Value::dump (void) const
void
ACE_Time_Value::set (long sec, long usec)
{
- ACE_TRACE ("ACE_Time_Value::set");
+ // ACE_TRACE ("ACE_Time_Value::set");
this->tv_sec_ = sec;
this->tv_usec_ = usec;
}
ACE_Time_Value::ACE_Time_Value (long sec, long usec)
{
- ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
+ // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (sec, usec);
this->normalize ();
}
@@ -92,7 +92,7 @@ ACE_Time_Value::ACE_Time_Value (long sec, long usec)
ACE_Time_Value::operator timeval () const
{
- ACE_TRACE ("ACE_Time_Value::operator timeval");
+ // ACE_TRACE ("ACE_Time_Value::operator timeval");
timeval tv;
tv.tv_sec = this->tv_sec_;
tv.tv_usec = this->tv_usec_;
@@ -104,7 +104,7 @@ ACE_Time_Value::operator timeval () const
void
ACE_Time_Value::operator+= (const ACE_Time_Value &tv)
{
- ACE_TRACE ("ACE_Time_Value::operator+=");
+ // ACE_TRACE ("ACE_Time_Value::operator+=");
this->tv_sec_ += tv.tv_sec_;
this->tv_usec_ += tv.tv_usec_;
this->normalize ();
@@ -115,7 +115,7 @@ ACE_Time_Value::operator+= (const ACE_Time_Value &tv)
void
ACE_Time_Value::operator-= (const ACE_Time_Value &tv)
{
- ACE_TRACE ("ACE_Time_Value::operator-=");
+ // ACE_TRACE ("ACE_Time_Value::operator-=");
this->tv_sec_ -= tv.tv_sec_;
this->tv_usec_ -= tv.tv_usec_;
this->normalize ();
@@ -126,7 +126,7 @@ ACE_Time_Value::operator-= (const ACE_Time_Value &tv)
ACE_Time_Value
operator + (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator +");
+ // ACE_TRACE ("operator +");
ACE_Time_Value sum (tv1.tv_sec_ + tv2.tv_sec_,
tv1.tv_usec_ + tv2.tv_usec_);
@@ -139,7 +139,7 @@ operator + (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
ACE_Time_Value
operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator -");
+ // ACE_TRACE ("operator -");
ACE_Time_Value delta (tv1.tv_sec_ - tv2.tv_sec_,
tv1.tv_usec_ - tv2.tv_usec_);
delta.normalize ();
@@ -151,7 +151,7 @@ operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
int
operator > (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator >");
+ // ACE_TRACE ("operator >");
if (tv1.tv_sec_ > tv2.tv_sec_)
return 1;
else if (tv1.tv_sec_ == tv2.tv_sec_
@@ -166,7 +166,7 @@ operator > (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
int
operator >= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator >=");
+ // ACE_TRACE ("operator >=");
if (tv1.tv_sec_ > tv2.tv_sec_)
return 1;
else if (tv1.tv_sec_ == tv2.tv_sec_
@@ -179,7 +179,7 @@ operator >= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
void
ACE_Time_Value::normalize (void)
{
- ACE_TRACE ("ACE_Time_Value::normalize");
+ // ACE_TRACE ("ACE_Time_Value::normalize");
// New code from Hans Rohnert...
if (this->tv_usec_ >= ONE_SECOND)
diff --git a/ace/Time_Value.h b/ace/Time_Value.h
index 900c169eff6..7091d2c1e92 100644
--- a/ace/Time_Value.h
+++ b/ace/Time_Value.h
@@ -76,6 +76,10 @@
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
extern "C" {
#include <pthread.h>
+#if defined (DIGITAL_UNIX)
+#define pthread_self __pthread_self
+extern "C" pthread_t pthread_self (void);
+#endif /* DIGITAL_UNIX */
}
#endif /* ACE_HAS_DCETHREADS */
diff --git a/ace/Time_Value.i b/ace/Time_Value.i
index 9d88167b1c0..c2e8ec9bd9b 100644
--- a/ace/Time_Value.i
+++ b/ace/Time_Value.i
@@ -19,7 +19,7 @@ static const long ONE_SECOND = 1000000L;
ACE_INLINE void
ACE_Time_Value::set (const timestruc_t &tv)
{
- ACE_TRACE ("ACE_Time_Value::set");
+ // ACE_TRACE ("ACE_Time_Value::set");
this->tv_sec_ = tv.tv_sec;
this->tv_usec_ = tv.tv_nsec / 1000;
@@ -31,7 +31,7 @@ ACE_Time_Value::set (const timestruc_t &tv)
ACE_INLINE
ACE_Time_Value::operator timestruc_t () const
{
- ACE_TRACE ("ACE_Time_Value::operator timestruc_t");
+ // ACE_TRACE ("ACE_Time_Value::operator timestruc_t");
timestruc_t tv;
tv.tv_sec = this->tv_sec_;
tv.tv_nsec = this->tv_usec_ * 1000;
@@ -43,14 +43,14 @@ ACE_Time_Value::operator timestruc_t () const
ACE_INLINE
ACE_Time_Value::ACE_Time_Value (const timestruc_t &tv)
{
- ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
+ // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
this->set (tv);
}
ACE_INLINE void
ACE_Time_Value::set (const timeval &tv)
{
- ACE_TRACE ("ACE_Time_Value::set");
+ // ACE_TRACE ("ACE_Time_Value::set");
this->tv_sec_ = tv.tv_sec;
this->tv_usec_ = tv.tv_usec;
@@ -64,7 +64,7 @@ ACE_Time_Value::ACE_Time_Value (const ACE_Time_Value &tv)
: tv_sec_ (tv.tv_sec_),
tv_usec_ (tv.tv_usec_)
{
- ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
+ // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
}
// Returns number of seconds.
@@ -72,7 +72,7 @@ ACE_Time_Value::ACE_Time_Value (const ACE_Time_Value &tv)
ACE_INLINE long
ACE_Time_Value::sec (void) const
{
- ACE_TRACE ("ACE_Time_Value::sec");
+ // ACE_TRACE ("ACE_Time_Value::sec");
return this->tv_sec_;
}
@@ -81,7 +81,7 @@ ACE_Time_Value::sec (void) const
ACE_INLINE void
ACE_Time_Value::sec (long sec)
{
- ACE_TRACE ("ACE_Time_Value::sec");
+ // ACE_TRACE ("ACE_Time_Value::sec");
this->tv_sec_ = sec;
}
@@ -90,7 +90,7 @@ ACE_Time_Value::sec (long sec)
ACE_INLINE long
ACE_Time_Value::msec (void) const
{
- ACE_TRACE ("ACE_Time_Value::msec");
+ // ACE_TRACE ("ACE_Time_Value::msec");
return this->tv_sec_ * 1000 + this->tv_usec_ / 1000;
}
@@ -99,7 +99,7 @@ ACE_Time_Value::msec (void) const
ACE_INLINE void
ACE_Time_Value::msec (long milliseconds)
{
- ACE_TRACE ("ACE_Time_Value::msec");
+ // ACE_TRACE ("ACE_Time_Value::msec");
// Convert millisecond units to seconds;
this->tv_sec_ = milliseconds / 1000;
// Convert remainder to microseconds;
@@ -111,7 +111,7 @@ ACE_Time_Value::msec (long milliseconds)
ACE_INLINE long
ACE_Time_Value::usec (void) const
{
- ACE_TRACE ("ACE_Time_Value::usec");
+ // ACE_TRACE ("ACE_Time_Value::usec");
return this->tv_usec_;
}
@@ -120,7 +120,7 @@ ACE_Time_Value::usec (void) const
ACE_INLINE void
ACE_Time_Value::usec (long usec)
{
- ACE_TRACE ("ACE_Time_Value::usec");
+ // ACE_TRACE ("ACE_Time_Value::usec");
this->tv_usec_ = usec;
}
@@ -130,7 +130,7 @@ ACE_INLINE int
operator < (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator <");
+ // ACE_TRACE ("operator <");
return tv2 > tv1;
}
@@ -140,7 +140,7 @@ ACE_INLINE int
operator <= (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator <=");
+ // ACE_TRACE ("operator <=");
return tv2 >= tv1;
}
@@ -150,7 +150,7 @@ ACE_INLINE int
operator == (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator ==");
+ // ACE_TRACE ("operator ==");
return tv1.tv_sec_ == tv2.tv_sec_
&& tv1.tv_usec_ == tv2.tv_usec_;
}
@@ -161,6 +161,6 @@ ACE_INLINE int
operator != (const ACE_Time_Value &tv1,
const ACE_Time_Value &tv2)
{
- ACE_TRACE ("operator !=");
+ // ACE_TRACE ("operator !=");
return !(tv1 == tv2);
}
diff --git a/ace/Token_Request_Reply.cpp b/ace/Token_Request_Reply.cpp
index 1aa160466ad..fa5eb98ad33 100644
--- a/ace/Token_Request_Reply.cpp
+++ b/ace/Token_Request_Reply.cpp
@@ -12,8 +12,8 @@
// Default "do nothing" constructor.
ACE_Token_Request::ACE_Token_Request (void)
- : client_id_ (0),
- token_name_ (0)
+ : token_name_ (0),
+ client_id_ (0)
{
}
diff --git a/ace/UNIX_Addr.cpp b/ace/UNIX_Addr.cpp
index fdabb40c219..04775372d9b 100644
--- a/ace/UNIX_Addr.cpp
+++ b/ace/UNIX_Addr.cpp
@@ -73,14 +73,13 @@ ACE_UNIX_Addr::set (const char rendezvous_point[])
{
(void) ACE_OS::memset ((void *) &this->unix_addr_, 0,
sizeof this->unix_addr_);
- int len = ACE_OS::strlen (rendezvous_point);
-
this->unix_addr_.sun_family = AF_UNIX;
+ size_t len = ACE_OS::strlen (rendezvous_point);
if (len >= sizeof this->unix_addr_.sun_path)
{
- /* At this point, things are screwed up, so let's make sure we
- don't crash. */
+ // At this point, things are screwed up, so let's make sure we
+ // don't crash.
(void) ACE_OS::strncpy (this->unix_addr_.sun_path,
rendezvous_point,
sizeof this->unix_addr_.sun_path);
diff --git a/ace/config-aix-3.2.5.h b/ace/config-aix-3.2.5.h
index bdf3593f176..261d136f9c4 100644
--- a/ace/config-aix-3.2.5.h
+++ b/ace/config-aix-3.2.5.h
@@ -8,6 +8,8 @@
#define MAXNAMELEN 1024
+#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
+
#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
#define ACE_HAS_TEMPLATE_TYPEDEFS
diff --git a/ace/config-aix-4.1.x.h b/ace/config-aix-4.1.x.h
index 6250f5154d1..3f112248b52 100644
--- a/ace/config-aix-4.1.x.h
+++ b/ace/config-aix-4.1.x.h
@@ -9,6 +9,7 @@
// Compiling for AIX.
#define AIX
+#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
#define _BSD 43
#define ACE_HAS_UNION_WAIT
#define ACE_HAS_MULTICAST
diff --git a/ace/config-osf1-4.0-g++.h b/ace/config-osf1-4.0-g++.h
new file mode 100644
index 00000000000..6d844473c89
--- /dev/null
+++ b/ace/config-osf1-4.0-g++.h
@@ -0,0 +1,209 @@
+/* -*- C++ -*- */
+// $Id$
+
+// Digital UNIX V4.0a platforms with the G+C+compiler. It is
+// configured to use the IEEE Std 1003.1c-1995, POSIX System
+// Application Program Interface. By 4.0a the version is meant that
+// is called "V4.0 464" by uname -a.
+
+#if !defined (ACE_CONFIG_H)
+#define ACE_CONFIG_H
+
+/////////////////////////////////////////////////////////////////////////////
+/
+//
+// The following lines are copied from the sunos5.5-g+configuration.
+// (This is the GNU-specific part.)
+//
+// Must specialize templates due to G++'s lame parameterized type
+// support...
+#define ACE_TEMPLATES_REQUIRE_SPECIALIZATION
+
+// Compiler's template mechanism must see source code (i.e., .C
+// files).
+#define ACE_TEMPLATES_REQUIRE_SOURCE
+
+// Denotes that GNU has cstring.h as standard which redefines memchr()
+#define ACE_HAS_GNU_CSTRING_H
+
+// Compiler doesn't support static data member templates.
+#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
+
+// Define this file to keep /usr/include/memory.h from being included.
+#include <cstring>
+
+/////////////////////////////////////////////////////////////////////////////
+/
+
+// DJT removed this due to some minor issues related to the
+// definitions of timestruc_t and tid_t in procfs.h not sure what
+// functionality is lost? Platform supports <sys/procfs.h>
+//#define ACE_HAS_PROC_FS
+
+// Platform defines MAP_FAILED as a long constant.
+#define ACE_HAS_LONG_MAP_FAILED
+
+// DJT 6/10/96 All these broken macro's can now be removed with the
+// approporiate ordering of the include files. The Platinum release
+// now temporarily supports both forms. Platform's implementation of
+// sendmsg() has a non-const msgheader parameter.
+#define ACE_HAS_BROKEN_SENDMSG
+
+// Platform's implementation of writev() has a non-const iovec
+// parameter.
+#define ACE_HAS_BROKEN_WRITEV
+
+// Platform's implementation of setlrmit() has a non-const rlimit
+// parameter.
+#define ACE_HAS_BROKEN_SETRLIMIT
+
+// Platform supports System V IPC (most versions of UNIX, but not
+// Win32)
+#define ACE_HAS_SYSV_IPC
+
+// Platform supports recvmsg and sendmsg.
+#define ACE_HAS_MSG
+
+// Compiler/platform contains the <sys/syscall.h> file.
+#define ACE_HAS_SYSCALL_H
+
+// Compiler/platform correctly calls init()/fini().
+#define ACE_HAS_AUTOMATIC_INIT_FINI
+
+// Prototypes for both signal() and struct sigaction are consistent.
+#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+// ACE has no mktemp().
+//#define ACE_LACKS_MKTEMP
+
+// Compiler/platform has thread-specific storage
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
+// Platform supports C+headers
+#define ACE_HAS_CPLUSPLUS_HEADERS
+
+// Compiler/platform has the getrusage() system call.
+#define ACE_HAS_GETRUSAGE
+
+// Platform supports the OSF ACE_TLI timod STREAMS module.
+#define ACE_HAS_OSF_TIMOD_H
+
+// Platform supports IP multicast
+#define ACE_HAS_IP_MULTICAST
+
+// Sockets may be called in multi-threaded programs.
+#define ACE_HAS_MT_SAFE_SOCKETS
+
+// Platform contains <poll.h>.
+#define ACE_HAS_POLL
+
+// Platform supports POSIX timers via timestruc_t.
+#define ACE_HAS_POSIX_TIME
+
+// Platform defines struct timespec in <sys/timers.h>
+// #define ACE_HAS_BROKEN_POSIX_TIME
+// DJT added 6/5/96
+// #define ACE_HAS_SVR4_TIME
+//#define ACE_HAS_SVR4_TIME
+
+// Platform supports POSIX O_NONBLOCK semantics.
+#define ACE_HAS_POSIX_NONBLOCK
+
+// DJT modified 6/5/96
+// ACE supports POSIX Pthreads.
+//#define ACE_HAS_DCETHREADS
+#define ACE_HAS_PTHREADS
+// DJT 6/6/96 added
+// IEEE Std 1003.1c-1995, POSIX System Application Program Interface
+#define ACE_HAS_PTHREADS_1003_DOT_1C
+
+// Explicit dynamic linking permits "lazy" symbol resolution
+#define ACE_HAS_RTLD_LAZY_V
+
+// Compiler/platform defines the sig_atomic_t typedef.
+#define ACE_HAS_SIG_ATOMIC_T
+
+// Added 6/13/95, 1 line
+#define ACE_HAS_SIGINFO_T
+#define ACE_HAS_UCONTEXT_T
+
+// DJT added 6/7/96
+#define ACE_HAS_SIGWAIT
+
+// Compiler/platform has ssize_t.
+#define ACE_HAS_SSIZE_T
+
+// Compiler/platform supports struct strbuf.
+#define ACE_HAS_STRBUF_T
+
+// Platform supports STREAMS.
+#define ACE_HAS_STREAMS
+
+// Platform has 64bit longs and 32bit ints...
+#define ACE_HAS_64BIT_LONGS
+
+// Platform supports STREAM pipes.
+// #define ACE_HAS_STREAM_PIPES
+
+// Compiler/platform supports SVR4 dynamic linking semantics.
+#define ACE_HAS_SVR4_DYNAMIC_LINKING
+
+// Platform support OSF1 gettimeofday
+#define ACE_HAS_OSF1_GETTIMEOFDAY
+
+// Compiler/platform supports SVR4 signal typedef.
+#define ACE_HAS_SVR4_SIGNAL_T
+
+// Compiler/platform has strerror().
+#define ACE_HAS_STRERROR
+
+// ACE supports threads.
+#define ACE_HAS_THREADS
+
+// DJT modified 6/5/96
+// Platform defines the tid_t structure.
+//#define ACE_HAS_TID_T
+
+// Platform supports ACE_TLI tiuser header.
+#define ACE_HAS_TIUSER_H
+
+// Platform supports ACE_TLI timod STREAMS module.
+// #define ACE_HAS_TIMOD_H
+
+// Platform provides ACE_TLI function prototypes.
+#define ACE_HAS_TLI_PROTOTYPES
+
+// Platform supports ACE_TLI.
+#define ACE_HAS_TLI
+
+// DJT added 6/6/96
+#define ACE_LACKS_CONDATTR_PSHARED
+
+// DJT added 6/7/96
+#define ACE_LACKS_THREAD_STACK_ADDR
+
+// DJT added 7/10/96
+#define ACE_LACKS_THREAD_PROCESS_SCOPING
+
+// Compile using multi-thread libraries.
+#define ACE_MT_SAFE
+
+// Turns off the tracing feature.
+#if !defined (ACE_NTRACE)
+#define ACE_NTRACE 1
+#endif /* ACE_NTRACE */
+
+// DJT modified 6/5/96
+// Defines the page size of the system.
+//#define ACE_PAGE_SIZE 4096
+#define ACE_PAGE_SIZE 8192
+
+#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
+
+#define ACE_HAS_BROKEN_IF_HEADER
+#define ACE_HAS_REENTRANT_FUNCTIONS
+#define DIGITAL_UNIX
+#define ACE_LACKS_T_ERRNO
+#define ACE_HAS_BROKEN_T_ERRNO
+
+#endif /* ACE_CONFIG_H */
diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h
index 784a8673e2f..73c60fd46b9 100644
--- a/ace/config-osf1-4.0.h
+++ b/ace/config-osf1-4.0.h
@@ -2,10 +2,10 @@
// $Id$
// The following configuration file is designed to work for the
-// Digital UNIX V4.0 platforms with the DEC 5.4 C++ compiler. It is
+// Digital UNIX V4.0a platforms with the DEC 5.4 C++ compiler. It is
// configured to use the IEEE Std 1003.1c-1995, POSIX System
-// Application Program Interface. An early release Digital UNIX V4.0
-// was used for porting so additional minor changes may be required.
+// Application Program Interface. By 4.0a the version is meant that
+// is called "V4.0 464" by uname -a.
#if !defined (ACE_CONFIG_H)
#define ACE_CONFIG_H
@@ -178,5 +178,8 @@
#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
#define ACE_HAS_BROKEN_IF_HEADER
-
+#define ACE_HAS_REENTRANT_FUNCTIONS
+#define DIGITAL_UNIX
+#define ACE_LACKS_T_ERRNO
+#define ACE_HAS_BROKEN_T_ERRNO
#endif /* ACE_CONFIG_H */
diff --git a/ace/config-unixware-2.01-g++.h b/ace/config-unixware-2.01-g++.h
index 8e48ada35e2..1e0c3e2a643 100644
--- a/ace/config-unixware-2.01-g++.h
+++ b/ace/config-unixware-2.01-g++.h
@@ -14,6 +14,7 @@
#define ACE_HAS_GNU_CSTRING_H
#define ACE_HAS_INLINED_OSCALLS
#define ACE_HAS_MSG
+#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
// Not yet sure about threads
#define ACE_HAS_MT_SAFE_SOCKETS
#define ACE_HAS_NONCONST_GETBY
diff --git a/ace/config-win32-msvc4.0.h b/ace/config-win32-msvc4.0.h
index f4bd69f3136..f8f35f07c5c 100644
--- a/ace/config-win32-msvc4.0.h
+++ b/ace/config-win32-msvc4.0.h
@@ -47,7 +47,6 @@
#include <winsock.h>
#define ACE_HAS_UNICODE
-
#define ACE_HAS_STL
// Uncomment these if you want to integrate ACE and Orbix in Win32.