summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-19 21:37:17 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-19 21:37:17 +0000
commit0bf81aee053629851cba34c8f0a6b4a8adcc74a2 (patch)
tree11a5f38947db04d37824c6e1e218ef159e9460ae
parent1ff65fbfc3e021092d3ecf3832ef75cd5f28fddf (diff)
downloadATCD-0bf81aee053629851cba34c8f0a6b4a8adcc74a2.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-97a26
-rw-r--r--README2
-rw-r--r--ace/Handle_Set.cpp16
-rw-r--r--ace/Handle_Set.h1
-rw-r--r--ace/Log_Msg.cpp4
-rw-r--r--ace/OS.cpp10
-rw-r--r--ace/OS.h6
-rw-r--r--ace/README1
-rw-r--r--ace/config-sunos4-g++.h2
-rw-r--r--ace/config-sunos4-lucid3.2.h2
-rw-r--r--ace/config-sunos4-sun3.x.h2
-rw-r--r--ace/config-sunos4-sun4.1.4.h2
-rw-r--r--ace/config-sunos4-sun4.x-orbix.h3
-rw-r--r--ace/config-sunos4-sun4.x.h3
14 files changed, 66 insertions, 14 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 0dc8218aaf2..9a6697733f3 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,3 +1,29 @@
+Wed Mar 19 15:02:09 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * ace/config-sunos4.*.h: Added #define ACE_HAS_UNION_WAIT based
+ on the recommendation of Kumar Neelakantan
+ <kneelaka@painewebber.com>.
+
+ * ace/Log_Msg.cpp (log_hexdump): Replaced the use of ::sprintf()
+ with ACE_OS::sprintf() so that the return value would be correct
+ on SunOS 4.x!
+
+ * ace/OS: Added ACE_HAS_CHARPTR_SPRINTF and ACE_SPRINTF_ADAPTER
+ to ACE_OS::sprintf() for SunOS 4.x platforms. Thanks to Kumar
+ Neelakantan <kneelaka@painewebber.com> for reporting this.
+
+ * ace/Handle_Set.cpp (ACE_Handle_Set_Iterator): If the bound was
+ reached in the following loop, we should set this->num_ =
+ this->handles_.max_handle_ + 1 rather than go into the 2nd loop.
+ Thanks to Michael Newton <michaeln@in.ot.com.au> for reporting
+ this.
+
+ * ace/Handle_Set.cpp (ACE_Handle_Set_Iterator):
+ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator did not work
+ properly if called with a zero handleset, as there was no bounds
+ check on the first loop therein. Thanks to Michael Newton
+ <michaeln@in.ot.com.au> for reporting this.
+
Wed Mar 19 07:33:42 1997 David L. Levine <levine@cs.wustl.edu>
* include/makeinclude/platform_osf1_4.0{,_g++}.GNU:
diff --git a/README b/README
index bbb8051691c..b3407d32a38 100644
--- a/README
+++ b/README
@@ -485,6 +485,8 @@ Jeff Morgan <jeff@audioactive.com>
Arturo <mitosys@colomsat.net.co>
Elliot Lau <eeklau@post1.com>
Mark Wright <markw@odi.com.au>
+Michael Newton <michaeln@in.ot.com.au>
+Kumar Neelakantan <kneelaka@painewebber.com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp
index c21378380cb..3eeb6032da5 100644
--- a/ace/Handle_Set.cpp
+++ b/ace/Handle_Set.cpp
@@ -204,14 +204,20 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &f)
{
ACE_TRACE ("ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator");
#if !defined(ACE_WIN32)
+ // Loop until we've found the first non-zero bit or we run off the
+ // end of the bitset.
for (;
- this->handles_.mask_.fds_bits[this->index_] == 0;
+ this->handles_.mask_.fds_bits[this->index_] == 0
+ && this->num_ < ACE_Handle_Set::MAXSIZE
this->index_++)
this->num_ += ACE_Handle_Set::WORDSIZE;
- for (this->val_ = this->handles_.mask_.fds_bits[this->index_];
- (ACE_BIT_DISABLED (this->val_, 1)) && this->num_ < ACE_Handle_Set::MAXSIZE;
- this->num_++)
- this->val_ = (this->val_ >> 1) & MSB_MASK;
+ if (this->num_ >= ACE_Handle_Set::MAXSIZE)
+ this->num_ = this->handles_.max_handle + 1;
+ else
+ for (this->val_ = this->handles_.mask_.fds_bits[this->index_];
+ (ACE_BIT_DISABLED (this->val_, 1)) && this->num_ < ACE_Handle_Set::MAXSIZE;
+ this->num_++)
+ this->val_ = (this->val_ >> 1) & MSB_MASK;
#endif /* !ACE_WIN32 */
}
diff --git a/ace/Handle_Set.h b/ace/Handle_Set.h
index 8789ddde300..ea2751419d2 100644
--- a/ace/Handle_Set.h
+++ b/ace/Handle_Set.h
@@ -1,7 +1,6 @@
/* -*- C++ -*- */
// $Id$
-
// ============================================================================
//
// = LIBRARY
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 58fa7159698..84bfa67056b 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -769,9 +769,9 @@ ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority,
int sz = 0;
if (text)
- sz = ::sprintf (msg_buf, "%s - ", text);
+ sz = ACE_OS::sprintf (msg_buf, "%s - ", text);
- sz += ::sprintf (msg_buf + sz, "HEXDUMP %d bytes", size);
+ sz += ACE_OS::sprintf (msg_buf + sz, "HEXDUMP %d bytes", size);
if (len < size)
::sprintf (msg_buf + sz, " (showing first %d bytes)", len);
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 4b2b0e42705..eb297daff8b 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -421,10 +421,10 @@ ACE_OS::inet_ntoa (const struct in_addr addr)
// the following storage is not thread-specific!
static char buf[32];
// assumes that addr is already in network byte order
- sprintf (buf, "%d.%d.%d.%d", addr.s_addr / (256*256*256) & 255,
- addr.s_addr / (256*256) & 255,
- addr.s_addr / 256 & 255,
- addr.s_addr & 255);
+ ::sprintf (buf, "%d.%d.%d.%d", addr.s_addr / (256*256*256) & 255,
+ addr.s_addr / (256*256) & 255,
+ addr.s_addr / 256 & 255,
+ addr.s_addr & 255);
return buf;
}
#endif /* VXWORKS */
@@ -497,7 +497,7 @@ ACE_OS::sprintf (char *buf, const char *format, ...)
int result;
va_list ap;
va_start (ap, format);
- ACE_OSCALL (::vsprintf (buf, format, ap), int, -1, result);
+ ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsprintf (buf, format, ap)), int, -1, result);
va_end (ap);
return result;
}
diff --git a/ace/OS.h b/ace/OS.h
index 9148ab79c57..ab28c4e2f12 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -190,6 +190,12 @@ typedef int key_t;
// configuration file (e.g., config-sunos5-sunc++-4.x.h).
#include "ace/config.h"
+#if defined (ACE_HAS_CHARPTR_SPRINTF)
+#define ACE_SPRINTF_ADAPTER(X) ::strlen (X)
+#else
+#define ACE_SPRINTF_ADAPTER(X) X
+#endif /* ACE_HAS_CHARPTR_SPRINTF */
+
#if defined (__ACE_INLINE__)
#define ACE_INLINE inline
#if !defined (ACE_HAS_INLINED_OSCALLS)
diff --git a/ace/README b/ace/README
index da41027f7f9..2605b871992 100644
--- a/ace/README
+++ b/ace/README
@@ -34,6 +34,7 @@ ACE_HAS_BSTRING Platform has <bstring.h> (which contains bzero() prototype)
ACE_HAS_CANCEL_IO Platform supports the Win32 CancelIO() function (WinNT 4.0 and beyond).
ACE_HAS_CHARPTR_DL OS/platform uses char * for dlopen/dlsym args, rather than const char *.
ACE_HAS_CHARPTR_SOCKOPT OS/platform uses char * for sockopt, rather than const char *
+ACE_HAS_CHARPTR_SPRINTF sprintf() returns char * rather than int (e.g., SunOS 4.x)
ACE_HAS_CLOCK_GETTIME Platform supports POSIX 1.b clock_gettime ()
ACE_HAS_COMPLEX_LOCK Platform supports non-standard readers/writer locks...
ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES Prototypes for both signal() and struct sigaction are consistent.
diff --git a/ace/config-sunos4-g++.h b/ace/config-sunos4-g++.h
index 60248926373..0f26b15e23b 100644
--- a/ace/config-sunos4-g++.h
+++ b/ace/config-sunos4-g++.h
@@ -11,6 +11,8 @@
#endif /* ! __ACE_INLINE__ */
#define ACE_NEEDS_SYSTIME_H
+#define ACE_HAS_CHARPTR_SPRINTF
+#define ACE_HAS_UNION_WAIT
// Must specialize templates due to G++'s lame parameterized type
// support...
diff --git a/ace/config-sunos4-lucid3.2.h b/ace/config-sunos4-lucid3.2.h
index fb8dcf90207..5ecf46eaf69 100644
--- a/ace/config-sunos4-lucid3.2.h
+++ b/ace/config-sunos4-lucid3.2.h
@@ -8,6 +8,8 @@
#define ACE_CONFIG_H
#define ACE_HAS_SYS_ERRLIST
+#define ACE_HAS_CHARPTR_SPRINTF
+#define ACE_HAS_UNION_WAIT
// Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC
diff --git a/ace/config-sunos4-sun3.x.h b/ace/config-sunos4-sun3.x.h
index 76979b4c7c0..84607a9520c 100644
--- a/ace/config-sunos4-sun3.x.h
+++ b/ace/config-sunos4-sun3.x.h
@@ -11,7 +11,7 @@
#define ACE_HAS_SYSV_SPRINTF
#define ACE_CONFIG_H
-
+#define ACE_HAS_CHARPTR_SPRINTF
#define ACE_HAS_SYS_ERRLIST
// Platform supports System V IPC (most versions of UNIX, but not Win32)
diff --git a/ace/config-sunos4-sun4.1.4.h b/ace/config-sunos4-sun4.1.4.h
index 2a27eff54ce..9701883d107 100644
--- a/ace/config-sunos4-sun4.1.4.h
+++ b/ace/config-sunos4-sun4.1.4.h
@@ -7,7 +7,9 @@
#if !defined (ACE_CONFIG_H)
#define ACE_CONFIG_H
+#define ACE_HAS_CHARPTR_SPRINTF
#define ACE_NEEDS_SYSTIME_H
+#define ACE_HAS_UNION_WAIT
// Special addition to handle sunOS 4.1 which is unable to
// handle POSIX Prototypes !
diff --git a/ace/config-sunos4-sun4.x-orbix.h b/ace/config-sunos4-sun4.x-orbix.h
index 5b3dff64382..66c3f559adc 100644
--- a/ace/config-sunos4-sun4.x-orbix.h
+++ b/ace/config-sunos4-sun4.x-orbix.h
@@ -7,6 +7,9 @@
#if !defined (ACE_CONFIG_H)
#define ACE_CONFIG_H
+#define ACE_HAS_CHARPTR_SPRINTF
+#define ACE_HAS_UNION_WAIT
+
// Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC
diff --git a/ace/config-sunos4-sun4.x.h b/ace/config-sunos4-sun4.x.h
index a901f01f35b..74c1f7bd554 100644
--- a/ace/config-sunos4-sun4.x.h
+++ b/ace/config-sunos4-sun4.x.h
@@ -7,6 +7,9 @@
#if !defined (ACE_CONFIG_H)
#define ACE_CONFIG_H
+#define ACE_HAS_CHARPTR_SPRINTF
+#define ACE_HAS_UNION_WAIT
+
// Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC