diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-03-28 02:33:27 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-03-28 02:33:27 +0000 |
commit | ef4497bff2b2f8174e7e86a57ca4a4920fe0f39d (patch) | |
tree | cdd24e07476f49f1f8582d17e795760f4220672a /ace | |
parent | 316df31de5019b8ae60daf55f3f99968bbbe02c0 (diff) | |
download | ATCD-ef4497bff2b2f8174e7e86a57ca4a4920fe0f39d.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Connector.h | 5 | ||||
-rw-r--r-- | ace/OS.cpp | 170 | ||||
-rw-r--r-- | ace/OS.h | 108 | ||||
-rw-r--r-- | ace/OS.i | 180 | ||||
-rw-r--r-- | ace/SPIPE_Connector.h | 4 | ||||
-rw-r--r-- | ace/SPIPE_Stream.h | 3 | ||||
-rw-r--r-- | ace/Stream_Modules.cpp | 2 | ||||
-rw-r--r-- | ace/Stream_Modules.h | 2 | ||||
-rw-r--r-- | ace/Svc_Handler.cpp | 6 | ||||
-rw-r--r-- | ace/Task_T.cpp | 2 | ||||
-rw-r--r-- | ace/config-hpux-10.x-aCC.h | 6 |
11 files changed, 261 insertions, 227 deletions
diff --git a/ace/Connector.h b/ace/Connector.h index 8f800e8cb54..7c394145993 100644 --- a/ace/Connector.h +++ b/ace/Connector.h @@ -106,6 +106,9 @@ public: // = Initialization and termination methods. // typedef ACE_TYPENAME ACE_PEER_CONNECTOR_ADDR PEER_ADDR; +#if defined (ACE_HAS_TYPENAME_KEYWORD) + typedef ACE_PEER_CONNECTOR_ADDR ACE_PEER_ADDR_TYPEDEF; +#endif /* ACE_HAS_TYPENAME_KEYWORD */ ACE_Connector (ACE_Reactor *r = ACE_Service_Config::reactor ()); // Initialize a connector. @@ -122,7 +125,7 @@ public: const ACE_PEER_CONNECTOR_ADDR &remote_addr, const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults, const ACE_PEER_CONNECTOR_ADDR &local_addr - = (ACE_PEER_CONNECTOR_ADDR &) ACE_PEER_CONNECTOR_ADDR::sap_any, + = (ACE_PEER_CONNECTOR_ADDR &) ACE_PEER_CONNECTOR_ADDR_ANY, int reuse_addr = 0, int flags = O_RDWR, int perms = 0); diff --git a/ace/OS.cpp b/ace/OS.cpp index a5900bcd88b..f1ea4ad61bd 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -22,12 +22,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Time_Value) // Initializes the ACE_Time_Value object from a timeval. -ACE_Time_Value::ACE_Time_Value (const timeval &tv) -{ - // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value"); - this->set (tv); -} - #if defined(ACE_WIN32) // Initializes the ACE_Time_Value object from a Win32 FILETIME @@ -43,9 +37,9 @@ void ACE_Time_Value::set (const FILETIME &file_time) ACE_QWORD _100ns = ACE_MAKE_QWORD (file_time.dwLowDateTime, file_time.dwHighDateTime); // Convert 100ns units to seconds; - this->tv_sec_ = long (_100ns / (10000 * 1000)); + this->tv_.tv_sec = long (_100ns / (10000 * 1000)); // Convert remainder to microseconds; - this->tv_usec_ = long ((_100ns - (this->tv_sec_ * (10000 * 1000))) / 10); + this->tv_.tv_usec = long ((_100ns - (this->tv_.tv_sec * (10000 * 1000))) / 10); } // Returns the value of the object as a Win32 FILETIME. @@ -53,7 +47,7 @@ void ACE_Time_Value::set (const FILETIME &file_time) ACE_Time_Value::operator FILETIME () const { // ACE_TRACE ("ACE_Time_Value::operator FILETIME"); - ACE_QWORD _100ns = ((ACE_QWORD) this->tv_sec_ * (1000 * 1000) + this->tv_usec_) * 10; + ACE_QWORD _100ns = ((ACE_QWORD) this->tv_.tv_sec * (1000 * 1000) + this->tv_.tv_usec) * 10; FILETIME file_time; file_time.dwLowDateTime = ACE_LOW_DWORD (_100ns); file_time.dwHighDateTime = ACE_HIGH_DWORD (_100ns); @@ -80,170 +74,40 @@ ACE_Time_Value::dump (void) const } void -ACE_Time_Value::set (long sec, long usec) -{ - // ACE_TRACE ("ACE_Time_Value::set"); - this->tv_sec_ = sec; - this->tv_usec_ = usec; -} - -void -ACE_Time_Value::set (double d) -{ - // ACE_TRACE ("ACE_Time_Value::set"); - long l = (long) d; - this->tv_sec_ = l; - this->tv_usec_ = ((long) (d - (double) l)) * 1000000; - this->normalize (); -} - -ACE_Time_Value::ACE_Time_Value (long sec, long usec) -{ - // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value"); - this->set (sec, usec); - this->normalize (); -} - -// Returns the value of the object as a timeval. - -ACE_Time_Value::operator timeval () const -{ - // ACE_TRACE ("ACE_Time_Value::operator timeval"); - timeval tv; - tv.tv_sec = this->tv_sec_; - tv.tv_usec = this->tv_usec_; - return tv; -} - -// Add TV to this. - -void -ACE_Time_Value::operator+= (const ACE_Time_Value &tv) -{ - // ACE_TRACE ("ACE_Time_Value::operator+="); - this->tv_sec_ += tv.tv_sec_; - this->tv_usec_ += tv.tv_usec_; - this->normalize (); -} - -// Subtract TV to this. - -void -ACE_Time_Value::operator-= (const ACE_Time_Value &tv) -{ - // ACE_TRACE ("ACE_Time_Value::operator-="); - this->tv_sec_ -= tv.tv_sec_; - this->tv_usec_ -= tv.tv_usec_; - this->normalize (); -} - -// Adds two ACE_Time_Value objects together, returns the sum. - -ACE_Time_Value -operator + (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) -{ - // ACE_TRACE ("operator +"); - ACE_Time_Value sum (tv1.tv_sec_ + tv2.tv_sec_, - tv1.tv_usec_ + tv2.tv_usec_); - - sum.normalize (); - return sum; -} - -// Subtracts two ACE_Time_Value objects, returns the difference. - -ACE_Time_Value -operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) -{ - // ACE_TRACE ("operator -"); - ACE_Time_Value delta (tv1.tv_sec_ - tv2.tv_sec_, - tv1.tv_usec_ - tv2.tv_usec_); - delta.normalize (); - return delta; -} - -// True if tv1 > tv2. - -int -operator > (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) -{ - // ACE_TRACE ("operator >"); - if (tv1.tv_sec_ > tv2.tv_sec_) - return 1; - else if (tv1.tv_sec_ == tv2.tv_sec_ - && tv1.tv_usec_ > tv2.tv_usec_) - return 1; - else - return 0; -} - -// True if tv1 >= tv2. - -int -operator >= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) -{ - // ACE_TRACE ("operator >="); - if (tv1.tv_sec_ > tv2.tv_sec_) - return 1; - else if (tv1.tv_sec_ == tv2.tv_sec_ - && tv1.tv_usec_ >= tv2.tv_usec_) - return 1; - else - return 0; -} - -void ACE_Time_Value::normalize (void) { // ACE_TRACE ("ACE_Time_Value::normalize"); // New code from Hans Rohnert... - if (this->tv_usec_ >= ONE_SECOND) + if (this->tv_.tv_usec >= ONE_SECOND) { do { - this->tv_sec_++; - this->tv_usec_ -= ONE_SECOND; + this->tv_.tv_sec++; + this->tv_.tv_usec -= ONE_SECOND; } - while (this->tv_usec_ >= ONE_SECOND); + while (this->tv_.tv_usec >= ONE_SECOND); } - else if (this->tv_usec_ <= -ONE_SECOND) + else if (this->tv_.tv_usec <= -ONE_SECOND) { do { - this->tv_sec_--; - this->tv_usec_ += ONE_SECOND; + this->tv_.tv_sec--; + this->tv_.tv_usec += ONE_SECOND; } - while (this->tv_usec_ <= -ONE_SECOND); + while (this->tv_.tv_usec <= -ONE_SECOND); } - if (this->tv_sec_ >= 1 && this->tv_usec_ < 0) - { - this->tv_sec_--; - this->tv_usec_ += ONE_SECOND; - } - else if (this->tv_sec_ < 0 && this->tv_usec_ > 0) + if (this->tv_.tv_sec >= 1 && this->tv_.tv_usec < 0) { - this->tv_sec_++; - this->tv_usec_ -= ONE_SECOND; + this->tv_.tv_sec--; + this->tv_.tv_usec += ONE_SECOND; } - -#if 0 - // Old code... - while ((this->tv_usec_ >= ONE_SECOND) - || (this->tv_sec_ < 0 && this->tv_usec_ > 0 )) + else if (this->tv_.tv_sec < 0 && this->tv_.tv_usec > 0) { - this->tv_usec_ -= ONE_SECOND; - this->tv_sec_++; + this->tv_.tv_sec++; + this->tv_.tv_usec -= ONE_SECOND; } - - while ((this->tv_usec_ <= -ONE_SECOND) - || (this->tv_sec_ > 0 && this->tv_usec_ < 0)) - { - this->tv_usec_ += ONE_SECOND; - this->tv_sec_--; - } -#endif } int @@ -199,16 +199,6 @@ typedef int key_t; #include /**/ <vxWorks.h> #endif /* VXWORKS */ -#if !defined (ACE_HAS_IP_MULTICAST) -struct ip_mreq -{ - struct in_addr imr_multiaddr; - // IP multicast address of group - struct in_addr imr_interface; - // local IP address of interface -}; -#endif /* ACE_HAS_IP_MULTICAST */ - #if defined (ACE_HAS_CHARPTR_SPRINTF) #define ACE_SPRINTF_ADAPTER(X) ::strlen (X) #else @@ -401,6 +391,9 @@ public: operator timeval () const; // Returns the value of the object as a timeval. + operator timeval *() const; + // Returns a pointer to the object as a timeval. + #if defined(ACE_WIN32) operator FILETIME () const; // Returns the value of the object as a Win32 FILETIME. @@ -460,11 +453,8 @@ private: void normalize (void); // Put the timevalue into a canonical form. - long tv_sec_; - // Seconds. - - long tv_usec_; - // Microseconds. + timeval tv_; + // Store the values as a <timeval>. }; class ACE_Export ACE_Countdown_Time @@ -554,6 +544,29 @@ private: #define ACE_PEER_CONNECTOR_2 _ACE_PEER_CONNECTOR #define ACE_PEER_CONNECTOR _ACE_PEER_CONNECTOR #define ACE_PEER_CONNECTOR_ADDR ACE_TYPENAME _ACE_PEER_CONNECTOR::PEER_ADDR +#if !defined(ACE_HAS_TYPENAME_KEYWORD) +#define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_CONNECTOR_ADDR::sap_any +#else +// +// If the compiler supports 'typename' we cannot use +// +// PEER_CONNECTOR::PEER_ADDR::sap_any +// +// because PEER_CONNECTOR::PEER_ADDR is not considered a type. But: +// +// typename PEER_CONNECTOR::PEER_ADDR::sap_any +// +// will not work either, because now we are declaring sap_any a +// type, further: +// +// (typename PEER_CONNECTOR::PEER_ADDR)::sap_any +// +// is considered a casting expression. All I can think of is using a +// typedef, I tried PEER_ADDR but that was a source of trouble on +// some platforms. I will try: +// +#define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_ADDR_TYPEDEF::sap_any +#endif /* ACE_HAS_TYPENAME_KEYWORD */ // Handle ACE_SOCK_* #define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor @@ -618,6 +631,7 @@ private: #define ACE_PEER_CONNECTOR_2 _ACE_PEER_CONNECTOR, _ACE_PEER_ADDR #define ACE_PEER_CONNECTOR _ACE_PEER_CONNECTOR #define ACE_PEER_CONNECTOR_ADDR _ACE_PEER_ADDR +#define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_CONNECTOR_ADDR::sap_any // Handle ACE_SOCK_* #define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor, ACE_INET_Addr @@ -752,33 +766,6 @@ typedef struct rlimit ACE_SETRLIMIT_TYPE; typedef const struct rlimit ACE_SETRLIMIT_TYPE; #endif /* ACE_HAS_BROKEN_SETRLIMIT */ -#if !defined (ACE_HAS_STRBUF_T) -struct strbuf -{ - int maxlen; // no. of bytes in buffer. - int len; // no. of bytes returned. - void *buf; // pointer to data. -}; -#endif /* ACE_HAS_STRBUF_T */ - -struct ACE_Export ACE_Str_Buf - // = TITLE - // Simple wrapper for STREAM pipes strbuf. -{ - int maxlen; - // Number of bytes in buffer. - - int len; - // Number of bytes returned. - - void *buf; - // Pointer to data. - - // = Initialization method - ACE_Str_Buf (void *b = 0, int l = 0, int max = 0); - // Constructor. -}; - #if defined (ACE_MT_SAFE) #define ACE_MT(X) X #if !defined (_REENTRANT) @@ -1751,13 +1738,7 @@ extern "C" { #else #include /**/ <netdb.h> #endif /* VXWORKS */ -#if defined (HPUX) -#define volatile -#endif /* HPUX */ #include /**/ <net/if.h> -#if defined (HPUX) -#undef volatile -#endif /* HPUX */ #include /**/ <netinet/in.h> #include /**/ <arpa/inet.h> } @@ -2409,6 +2390,37 @@ struct flock }; #endif /* ACE_LACKS_FILELOCKS */ +#if !defined (ACE_HAS_IP_MULTICAST) +struct ip_mreq +{ + struct in_addr imr_multiaddr; + // IP multicast address of group + struct in_addr imr_interface; + // local IP address of interface +}; +#endif /* ACE_HAS_IP_MULTICAST */ + +#if !defined (ACE_HAS_STRBUF_T) +struct strbuf +{ + int maxlen; // no. of bytes in buffer. + int len; // no. of bytes returned. + void *buf; // pointer to data. +}; +#endif /* ACE_HAS_STRBUF_T */ + +struct ACE_Export ACE_Str_Buf : public strbuf + // = TITLE + // Simple wrapper for STREAM pipes strbuf. +{ + // = Initialization method + ACE_Str_Buf (void *b = 0, int l = 0, int max = 0); + // Constructor. + + ACE_Str_Buf (strbuf &); + // Constructor. +}; + class ACE_Export ACE_OS // = TITLE // This class defines an operating system independent @@ -100,7 +100,137 @@ typedef const struct timespec * ACE_TIMESPEC_PTR; // can't make this an enum due to compiler bugs on some platforms... static const long ONE_SECOND = 1000000L; -// Initializes the ACE_Time_Value object. +// Returns the value of the object as a timeval. + +ACE_INLINE +ACE_Time_Value::operator timeval () const +{ + // ACE_TRACE ("ACE_Time_Value::operator timeval"); + return this->tv_; +} + +// Returns a pointer to the object as a timeval. + +ACE_INLINE +ACE_Time_Value::operator timeval * () const +{ + // ACE_TRACE ("ACE_Time_Value::operator timeval"); + return (timeval *) &this->tv_; +} + +// Add TV to this. + +ACE_INLINE void +ACE_Time_Value::operator+= (const ACE_Time_Value &tv) +{ + // ACE_TRACE ("ACE_Time_Value::operator+="); + this->tv_.tv_sec += tv.tv_.tv_sec; + this->tv_.tv_usec += tv.tv_.tv_usec; + this->normalize (); +} + +// Subtract TV to this. + +ACE_INLINE void +ACE_Time_Value::operator-= (const ACE_Time_Value &tv) +{ + // ACE_TRACE ("ACE_Time_Value::operator-="); + this->tv_.tv_sec -= tv.tv_.tv_sec; + this->tv_.tv_usec -= tv.tv_.tv_usec; + this->normalize (); +} + +// Adds two ACE_Time_Value objects together, returns the sum. + +ACE_INLINE ACE_Time_Value +operator + (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2) +{ + // ACE_TRACE ("operator +"); + ACE_Time_Value sum (tv1.tv_.tv_sec + tv2.tv_.tv_sec, + tv1.tv_.tv_usec + tv2.tv_.tv_usec); + + sum.normalize (); + return sum; +} + +ACE_INLINE void +ACE_Time_Value::set (long sec, long usec) +{ + // ACE_TRACE ("ACE_Time_Value::set"); + this->tv_.tv_sec = sec; + this->tv_.tv_usec = usec; +} + +ACE_INLINE +ACE_Time_Value::ACE_Time_Value (const timeval &tv) +{ + // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value"); + this->set (tv); +} + +ACE_INLINE +ACE_Time_Value::ACE_Time_Value (long sec, long usec) +{ + // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value"); + this->set (sec, usec); + this->normalize (); +} + +ACE_INLINE void +ACE_Time_Value::set (double d) +{ + // ACE_TRACE ("ACE_Time_Value::set"); + long l = (long) d; + this->tv_.tv_sec = l; + this->tv_.tv_usec = ((long) (d - (double) l)) * 1000000; + this->normalize (); +} + +// Subtracts two ACE_Time_Value objects, returns the difference. + +ACE_INLINE ACE_Time_Value +operator - (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2) +{ + // ACE_TRACE ("operator -"); + ACE_Time_Value delta (tv1.tv_.tv_sec - tv2.tv_.tv_sec, + tv1.tv_.tv_usec - tv2.tv_.tv_usec); + delta.normalize (); + return delta; +} + +// True if tv1 > tv2. + +ACE_INLINE int +operator > (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2) +{ + // ACE_TRACE ("operator >"); + if (tv1.tv_.tv_sec > tv2.tv_.tv_sec) + return 1; + else if (tv1.tv_.tv_sec == tv2.tv_.tv_sec + && tv1.tv_.tv_usec > tv2.tv_.tv_usec) + return 1; + else + return 0; +} + +// True if tv1 >= tv2. + +ACE_INLINE int +operator >= (const ACE_Time_Value &tv1, + const ACE_Time_Value &tv2) +{ + // ACE_TRACE ("operator >="); + if (tv1.tv_.tv_sec > tv2.tv_.tv_sec) + return 1; + else if (tv1.tv_.tv_sec == tv2.tv_.tv_sec + && tv1.tv_.tv_usec >= tv2.tv_.tv_usec) + return 1; + else + return 0; +} // Initializes a timestruc_t. Note that this approach loses precision // since it converts the nano-seconds into micro-seconds. But then @@ -111,8 +241,8 @@ ACE_INLINE void ACE_Time_Value::set (const timestruc_t &tv) { // ACE_TRACE ("ACE_Time_Value::set"); - this->tv_sec_ = tv.tv_sec; - this->tv_usec_ = tv.tv_nsec / 1000; + this->tv_.tv_sec = tv.tv_sec; + this->tv_.tv_usec = tv.tv_nsec / 1000; this->normalize (); } @@ -124,8 +254,8 @@ ACE_Time_Value::operator timestruc_t () const { // ACE_TRACE ("ACE_Time_Value::operator timestruc_t"); timestruc_t tv; - tv.tv_sec = this->tv_sec_; - tv.tv_nsec = this->tv_usec_ * 1000; + tv.tv_sec = this->tv_.tv_sec; + tv.tv_nsec = this->tv_.tv_usec * 1000; return tv; } @@ -142,8 +272,8 @@ ACE_INLINE void ACE_Time_Value::set (const timeval &tv) { // ACE_TRACE ("ACE_Time_Value::set"); - this->tv_sec_ = tv.tv_sec; - this->tv_usec_ = tv.tv_usec; + this->tv_.tv_sec = tv.tv_sec; + this->tv_.tv_usec = tv.tv_usec; this->normalize (); } @@ -152,8 +282,7 @@ ACE_Time_Value::set (const timeval &tv) ACE_INLINE ACE_Time_Value::ACE_Time_Value (const ACE_Time_Value &tv) - : tv_sec_ (tv.tv_sec_), - tv_usec_ (tv.tv_usec_) + : tv_ (tv.tv_) { // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value"); } @@ -164,7 +293,7 @@ ACE_INLINE long ACE_Time_Value::sec (void) const { // ACE_TRACE ("ACE_Time_Value::sec"); - return this->tv_sec_; + return this->tv_.tv_sec; } // Sets the number of seconds. @@ -173,7 +302,7 @@ ACE_INLINE void ACE_Time_Value::sec (long sec) { // ACE_TRACE ("ACE_Time_Value::sec"); - this->tv_sec_ = sec; + this->tv_.tv_sec = sec; } // Converts from Time_Value format into milli-seconds format. @@ -182,7 +311,7 @@ ACE_INLINE long ACE_Time_Value::msec (void) const { // ACE_TRACE ("ACE_Time_Value::msec"); - return this->tv_sec_ * 1000 + this->tv_usec_ / 1000; + return this->tv_.tv_sec * 1000 + this->tv_.tv_usec / 1000; } // Converts from milli-seconds format into Time_Value format. @@ -192,9 +321,9 @@ ACE_Time_Value::msec (long milliseconds) { // ACE_TRACE ("ACE_Time_Value::msec"); // Convert millisecond units to seconds; - this->tv_sec_ = milliseconds / 1000; + this->tv_.tv_sec = milliseconds / 1000; // Convert remainder to microseconds; - this->tv_usec_ = (milliseconds - (this->tv_sec_ * 1000)) * 1000; + this->tv_.tv_usec = (milliseconds - (this->tv_.tv_sec * 1000)) * 1000; } // Returns number of micro-seconds. @@ -203,7 +332,7 @@ ACE_INLINE long ACE_Time_Value::usec (void) const { // ACE_TRACE ("ACE_Time_Value::usec"); - return this->tv_usec_; + return this->tv_.tv_usec; } // Sets the number of micro-seconds. @@ -212,7 +341,7 @@ ACE_INLINE void ACE_Time_Value::usec (long usec) { // ACE_TRACE ("ACE_Time_Value::usec"); - this->tv_usec_ = usec; + this->tv_.tv_usec = usec; } // True if tv1 < tv2. @@ -242,8 +371,8 @@ operator == (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) { // ACE_TRACE ("operator =="); - return tv1.tv_sec_ == tv2.tv_sec_ - && tv1.tv_usec_ == tv2.tv_usec_; + return tv1.tv_.tv_sec == tv2.tv_.tv_sec + && tv1.tv_.tv_usec == tv2.tv_.tv_usec; } // True if tv1 != tv2. @@ -262,7 +391,6 @@ operator != (const ACE_Time_Value &tv1, #include /**/ <rpc/rpc.h> #endif /* ACE_LACKS_RPC_H */ - // Matthew Stevens 7-10-95 Fix GNU GCC 2.7 for memchr() problem. #if defined (ACE_HAS_GNU_CSTRING_H) // Define this file to keep /usr/include/memory.h from being included. @@ -6063,10 +6191,18 @@ ACE_OS::getenv (const char *symbol) ACE_INLINE ACE_Str_Buf::ACE_Str_Buf (void *b, int l, int max) - : maxlen (max), - len (l), - buf (b) { + this->maxlen = max; + this->len = l; + this->buf = (char *) b; +} + +ACE_INLINE +ACE_Str_Buf::ACE_Str_Buf (strbuf &sb) +{ + this->maxlen = sb.maxlen; + this->len = sb.len; + this->buf = sb.buf; } #if defined (ACE_HAS_UNICODE) diff --git a/ace/SPIPE_Connector.h b/ace/SPIPE_Connector.h index bc659f9ae8e..282836552a9 100644 --- a/ace/SPIPE_Connector.h +++ b/ace/SPIPE_Connector.h @@ -76,6 +76,10 @@ public: // The <flags> and <perms> arguments are passed down to the open() // method. + // = Meta-type info + typedef ACE_SPIPE_Addr PEER_ADDR; + typedef ACE_SPIPE_Stream PEER_STREAM; + void dump (void) const; // Dump the state of an object. diff --git a/ace/SPIPE_Stream.h b/ace/SPIPE_Stream.h index 5b78bd1e148..3da98013637 100644 --- a/ace/SPIPE_Stream.h +++ b/ace/SPIPE_Stream.h @@ -103,6 +103,9 @@ public: ssize_t recv (void *buf, size_t n, ACE_OVERLAPPED *overlapped) const; // Recv <n> bytes via Win32 ReadFile using overlapped I/O. + // = Meta-type info + typedef ACE_SPIPE_Addr PEER_ADDR; + void dump (void) const; // Dump the state of an object. diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp index 7842eb55944..9bbea1b0ae2 100644 --- a/ace/Stream_Modules.cpp +++ b/ace/Stream_Modules.cpp @@ -288,7 +288,7 @@ ACE_Stream_Tail<ACE_SYNCH_2>::fini (void) return 0; } -// ACE_ALLOC_HOOK_DEFINE(ACE_Thru_Task) +ACE_ALLOC_HOOK_DEFINE(ACE_Thru_Task) template <ACE_SYNCH_1> ACE_Thru_Task<ACE_SYNCH_2>::ACE_Thru_Task (void) diff --git a/ace/Stream_Modules.h b/ace/Stream_Modules.h index 7bb102b82cb..26e3151ae1a 100644 --- a/ace/Stream_Modules.h +++ b/ace/Stream_Modules.h @@ -116,7 +116,7 @@ public: void dump (void) const; // Dump the state of an object. - // ACE_ALLOC_HOOK_DECLARE; + ACE_ALLOC_HOOK_DECLARE; // Declare the dynamic allocation hooks. }; diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp index 9673ce5a068..0fb42db14f2 100644 --- a/ace/Svc_Handler.cpp +++ b/ace/Svc_Handler.cpp @@ -77,7 +77,11 @@ template <PR_ST_1, ACE_SYNCH_1> void ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_2>::operator delete (void *obj) { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_2>::delete"); - ::delete obj; + // You cannot delete a 'void*' (X3J16/95-0087 5.3.5.3), but we know + // the pointer was created using new char[] (see operator new code), + // so we use a cast: + char *tmp = (char *) obj; + ::delete [] tmp; } // Default constructor. diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp index 489ec46371b..6626d19571c 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 (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Module.h" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ #include "ace/Service_Config.h" #if !defined (__ACE_INLINE__) diff --git a/ace/config-hpux-10.x-aCC.h b/ace/config-hpux-10.x-aCC.h index 1a4e6ddbb90..d22caadddbc 100644 --- a/ace/config-hpux-10.x-aCC.h +++ b/ace/config-hpux-10.x-aCC.h @@ -77,6 +77,12 @@ // Compiler/platform has thread-specific storage // #define ACE_HAS_THREAD_SPECIFIC_STORAGE +// Platform supports POSIX 1.b clock_gettime () +#define ACE_HAS_CLOCK_GETTIME + +// iostream header lacks ipfx (), isfx (), etc., declarations +#define ACE_LACKS_IOSTREAM_FX + // Compiler/platform supports struct strbuf. #define ACE_HAS_STRBUF_T #include /**/ <stropts.h> /* for struct strbuf */ |