summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-12-05 02:52:28 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-12-05 02:52:28 +0000
commit9eb5ef9f999782a55d4b5e46d0302f2e4d93b996 (patch)
treeecb043450b6703858086ebec8666dbeeefe0c18d
parentcdcee0a5c8c3c1fc69c280602f61dcd75fc522ac (diff)
downloadATCD-9eb5ef9f999782a55d4b5e46d0302f2e4d93b996.tar.gz
*** empty log message ***
-rw-r--r--ACE-INSTALL.html11
-rw-r--r--ChangeLog-98a37
-rw-r--r--README1
-rw-r--r--ace/ACE.cpp2
-rw-r--r--ace/Addr.cpp16
-rw-r--r--ace/Addr.h8
-rw-r--r--ace/Asynch_Acceptor.cpp31
-rw-r--r--ace/Asynch_IO.cpp7
-rw-r--r--ace/Asynch_IO.h6
-rw-r--r--ace/Object_Manager.cpp11
-rw-r--r--ace/README1
-rw-r--r--ace/ace.idebin378212 -> 381948 bytes
-rw-r--r--ace/config-win32-common.h1
-rw-r--r--tests/SOCK_Connector_Test.cpp5
14 files changed, 108 insertions, 29 deletions
diff --git a/ACE-INSTALL.html b/ACE-INSTALL.html
index dc7c01d2db5..c5fe588787c 100644
--- a/ACE-INSTALL.html
+++ b/ACE-INSTALL.html
@@ -447,9 +447,14 @@ the following approach:
% make
</code></pre><P>
- at the root of the ACE source tree. This will build the static and
- shared object libraries and build the tests and the sample
- applications. <P>
+at the root of the ACE source tree. This will build the ACE library,
+tests, the examples, and the sample applications. Building the entire
+ACE release can take a long time, however. Therefore, you might
+consider cd'ing into the $ACE_ROOT/ace/ directory and running
+<CODE>make</CODE> there to build just the ACE library. As a sanity
+check, you might also want to build and run the automated <A
+HREF="ACE_wrappers/tests/README">``one-button'' tests</A> in
+$ACE_ROOT/tests/. <P>
<LI> If you need to regenerate the Svc_Conf_y.cpp file, you'll need to
get <A HREF="http://www.cs.wustl.edu/~schmidt/byacc.tar.gz">Berkeley
diff --git a/ChangeLog-98a b/ChangeLog-98a
index 7b28c72cad2..41e6b18ea8e 100644
--- a/ChangeLog-98a
+++ b/ChangeLog-98a
@@ -1,4 +1,39 @@
-Thu Dec 4 13:49:58 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+Thu Dec 4 19:45:04 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * ace/Object_Manager.cpp (ACE_Object_Manager_Destroyer): Fixed a
+ bug in the
+ ACE_Object_Manager_Destroyer::~ACE_Object_Manager_Destroyer
+ thread comparison routine. Thanks to Steven Coy for this. Also
+ renamed _saved_main_thread_id to saved_main_thread_id_, which is
+ proper ACE style.
+
+ * Updated the ACE-INSTALL.html file to explain why you don't need
+ to build everything all the time. Thanks to Dustin Laurence
+ <laurence@alice.wonderland.caltech.edu> for suggesting this.
+
+ * tests/SOCK_Connector_Test.cpp (fail_no_listener_nonblocking):
+ Added a check for ENETUNREACH. Thanks to Dustin Laurence
+ <laurence@alice.wonderland.caltech.edu> for reporting this.
+
+ * ace/Asynch_Acceptor.cpp (open): Changed the local variable named
+ sap_any to sa to avoid conflicts with the new sap_any macro.
+
+ * ace/Asynch_IO: Made the ACE_Service_Hanlder::open() method
+ non-virtual to work around bugs with Borland C++. Thanks to
+ Valik Solorzano Barboza <valik@geodan.nl> for suggesting this.
+
+ * ace/ACE.cpp (COMPUTE): Put parens around elements the COMPUTE
+ macros so that it will work on Borland C++. Thanks to Valik
+ Solorzano Barboza <valik@geodan.nl> for suggesting this.
+
+ * ace/config-win32-common.h: Added ACE_HAS_BROKEN_SAP_ANY to deal
+ with Borland C++ bugs. Thanks to Valik Solorzano Barboza
+ <valik@geodan.nl> for suggesting this.
+
+ * ace/Addr: Added a workaround for the Borland C++ problems. This
+ introduces a new global macro called sap_any. However, this is
+ only used for Borland, so it should be ok. Thanks to Valik
+ Solorzano Barboza <valik@geodan.nl> for suggesting this.
* ace/LSOCK.cpp (recv_handle): Make the code smarter if we've got
both STREAMS and 4_4BSD_SENDMSG_RECVMSG.
diff --git a/README b/README
index 223bd02bfa3..dca65c3e09b 100644
--- a/README
+++ b/README
@@ -487,6 +487,7 @@ Stephen Henry <shenry@mdc.com>
Dani Flexer <danif@ivory-sw.com>
Michael Hoffman <Hoffman_Michael@mac-mailserver.atc.ll.mit.edu>
John Lindal <jafl@cheshire-cat.caltech.edu>
+Dustin Laurence <laurence@alice.wonderland.caltech.edu>
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/ACE.cpp b/ace/ACE.cpp
index e5ffccecce9..7bcaeb23de8 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -341,7 +341,7 @@ u_long
ACE::crc32 (const char *string)
{
// #define COMPUTE(var, ch) (var) = (var) << (8 ^ ACE::crc_table_[(var) >> (24 ^ (ch))])
-#define COMPUTE(var, ch) (var) = (var) << 8 ^ ACE::crc_table_[(var) >> 24 ^ (ch)]
+#define COMPUTE(var, ch) (var) = ((var) << 8) ^ ACE::crc_table_[((var) >> 24) ^ (ch)]
register ACE_UINT32 crc = 0;
diff --git a/ace/Addr.cpp b/ace/Addr.cpp
index f91971a4c3b..e191f9caf4d 100644
--- a/ace/Addr.cpp
+++ b/ace/Addr.cpp
@@ -4,8 +4,22 @@
#define ACE_BUILD_DLL
#include "ace/Addr.h"
-// This is a static class variable.
+#if defined (ACE_HAS_BROKEN_SAP_ANY)
+#if defined (sap_any)
+#undef sap_any
+// This is a static class variable.
+const ACE_Addr ace_sap_any (AF_ANY, -1);
+
+const ACE_Addr ACE_Addr::sap_any (void)
+{
+ return ace_sap_any;
+}
+#define sap_any sap_any()
+#endif /* sap_any */
+#else
+// This is a static class variable.
const ACE_Addr ACE_Addr::sap_any (AF_ANY, -1);
+#endif /* ACE_HAS_BROKEN_SAP_ANY */
#if !defined (__ACE_INLINE__)
#include "ace/Addr.i"
diff --git a/ace/Addr.h b/ace/Addr.h
index e8a03e6ad13..331c4a4251f 100644
--- a/ace/Addr.h
+++ b/ace/Addr.h
@@ -62,8 +62,16 @@ public:
void base_set (int type, int size);
// Initializes instance variables.
+#if defined (ACE_HAS_BROKEN_SAP_ANY)
+ static const ACE_Addr sap_any (void);
+ // Wild-card address.
+
+ // This #define works around broken C++ compilers...
+#define sap_any sap_any()
+#else
static const ACE_Addr sap_any;
// Wild-card address.
+#endif /* ACE_HAS_BROKEN_SAP_ANY */
void dump (void) const;
// Dump the state of an object.
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
index 1d222a4d58a..9f0756d2be2 100644
--- a/ace/Asynch_Acceptor.cpp
+++ b/ace/Asynch_Acceptor.cpp
@@ -66,30 +66,35 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::setsockopt"), -1);
}
- // If port is not specified, bind to any port
- static ACE_INET_Addr sap_any ((const ACE_INET_Addr &) ACE_Addr::sap_any);
- if (address == sap_any &&
- ACE::bind_port (this->listen_handle_) == -1)
+ // If port is not specified, bind to any port.
+ static ACE_INET_Addr sa ((const ACE_INET_Addr &) ACE_Addr::sap_any);
+
+ if (address == sa && ACE::bind_port (this->listen_handle_) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE::bind_port"), -1);
// Bind to the specified port.
if (ACE_OS::bind (this->listen_handle_,
(sockaddr *) address.get_addr (),
address.get_size ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::bind"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "ACE_OS::bind"),
+ -1);
// Start listening
if (ACE_OS::listen (this->listen_handle_, backlog) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::listen"), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "ACE_OS::listen"), -1);
+
+ // For the number of <backlog>.
- // For the number of <backlog>
for (int i = 0; i < backlog; i++)
- {
- // Initiate accepts
- if (this->accept (bytes_to_read) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Acceptor::accept"), -1);
- }
-
+ // Initiate accepts.
+ if (this->accept (bytes_to_read) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "ACE_Asynch_Acceptor::accept"), -1);
return 0;
}
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 35c1ccba6d2..298704efd61 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -1012,4 +1012,11 @@ ACE_Service_Handler::addresses (const ACE_INET_Addr &remote_address,
ACE_DEBUG ((LM_DEBUG, "remote address %s\n", remote_address_buf));
}
+int
+ACE_Service_Handler::open (ACE_HANDLE,
+ ACE_Message_Block &)
+{
+ return 0;
+}
+
#endif /* ACE_WIN32 */
diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h
index 1a8a27b0f05..948ad1a5dbe 100644
--- a/ace/Asynch_IO.h
+++ b/ace/Asynch_IO.h
@@ -85,10 +85,10 @@ public:
ACE_HANDLE event,
u_long offset = 0,
u_long offset_high = 0);
- // Constructor
+ // Constructor.
virtual ~ACE_Asynch_Result (void);
- // Destructor
+ // Destructor.
protected:
virtual void complete (u_long bytes_transferred,
@@ -895,7 +895,7 @@ public:
// Virtual destruction.
virtual void open (ACE_HANDLE new_handle,
- ACE_Message_Block &message_block) = 0;
+ ACE_Message_Block &message_block);
// <open> is called by ACE_Asynch_Acceptor to initialize a new
// instance of ACE_Service_Handler that has been created after the a
// new connection is accepted. The handle for the new connection is
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
index fa99c33822d..1f41766b174 100644
--- a/ace/Object_Manager.cpp
+++ b/ace/Object_Manager.cpp
@@ -742,12 +742,12 @@ public:
~ACE_Object_Manager_Destroyer (void);
private:
- ACE_thread_t _saved_main_thread_id;
+ ACE_thread_t saved_main_thread_id_;
// Save the main thread ID, so that destruction can be suppressed.
};
ACE_Object_Manager_Destroyer::ACE_Object_Manager_Destroyer (void)
- : _saved_main_thread_id (ACE_OS::thr_self())
+ : saved_main_thread_id_ (ACE_OS::thr_self ())
{
// Ensure that the Object_Manager gets initialized before any
// application threads have been spawned. Because this will be called
@@ -758,13 +758,14 @@ ACE_Object_Manager_Destroyer::ACE_Object_Manager_Destroyer (void)
ACE_Object_Manager_Destroyer::~ACE_Object_Manager_Destroyer (void)
{
- if (ACE_OS::thr_self() == _saved_main_thread_id)
+ if (ACE_OS::thr_equal (ACE_OS::thr_self (),
+ saved_main_thread_id_))
{
delete ACE_Object_Manager::instance_;
ACE_Object_Manager::instance_ = 0;
}
- // else if this destructor is not called by the main thread, then
- // do not delete the ACE_Object_Manager. That causes problems, on
+ // else if this destructor is not called by the main thread, then do
+ // not delete the ACE_Object_Manager. That causes problems, on
// WIN32 at least.
}
diff --git a/ace/README b/ace/README
index 1052ad06434..de27035559e 100644
--- a/ace/README
+++ b/ace/README
@@ -50,6 +50,7 @@ ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS Platform has a bug with non-blocking connec
ACE_HAS_BROKEN_POSIX_TIME Platform defines struct timespec in <sys/timers.h>
ACE_HAS_BROKEN_RANDR OS/compiler's header files are inconsistent with libC definition of rand_r().
ACE_HAS_BROKEN_READV() OS/Compiler's header files are not consistent with readv() definition.
+ACE_HAS_BROKEN_SAP_ANY Compiler can't handle the static ACE_Addr::sap_any construct.
ACE_HAS_BROKEN_SENDMSG OS/compiler omits the const from the sendmsg() prototype.
ACE_HAS_BROKEN_SETRLIMIT OS/compiler omits the const from the rlimit parameter in the setrlimit() prototype.
ACE_HAS_BROKEN_TIMESPEC_MEMBERS platform define struct timespec members as ts_sec and ts_nsec instead of tv_sec and tv_nsec. This is highly non-portable. Currently only FreeBSD 2.1.x uses it.
diff --git a/ace/ace.ide b/ace/ace.ide
index b0c5f404aa2..a306e03b023 100644
--- a/ace/ace.ide
+++ b/ace/ace.ide
Binary files differ
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index 525e96d2e1c..10fdf601512 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -100,6 +100,7 @@
#define ACE_WIN32
#if defined (__BORLANDC__)
#define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
+#define ACE_HAS_BROKEN_SAP_ANY
#endif /* __BORLANDC__ */
//#define ACE_HAS_ALLOC_HOOKS
diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp
index 182b5ec356e..941bef2c410 100644
--- a/tests/SOCK_Connector_Test.cpp
+++ b/tests/SOCK_Connector_Test.cpp
@@ -93,8 +93,9 @@ fail_no_listener_nonblocking (void)
ACE_ASSERT (status == -1);
// On some systems, a failed connect to localhost will return
- // ECONNREFUSED directly, instead of EWOULDBLOCK. That is also fine.
- if (errno == EWOULDBLOCK || errno == ECONNREFUSED)
+ // ECONNREFUSED or ENETUNREACH directly, instead of
+ // EWOULDBLOCK. That is also fine.
+ if (errno == EWOULDBLOCK || errno == ECONNREFUSED || errno == ENETUNREACH)
{
if (sock.get_handle () != ACE_INVALID_HANDLE)
status = con.complete (sock);