summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-16 19:10:37 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-16 19:10:37 +0000
commit0d037a70bca47416e7288991a30caba38074bc07 (patch)
treefdc94de91f08411109a8314e69a5ec83d0769509
parentfe12c8af55dd9f1c92e32df086c25e7db9aeb939 (diff)
downloadATCD-0d037a70bca47416e7288991a30caba38074bc07.tar.gz
Merging changes from the HEAD
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp4
-rw-r--r--TAO/tao/IORTable/Table_Adapter.cpp69
-rw-r--r--TAO/tao/IORTable/Table_Adapter.h20
-rw-r--r--TAO/tests/Bug_2683_Regression/IORTable.mpc18
-rw-r--r--TAO/tests/Bug_2683_Regression/Test.idl14
-rw-r--r--TAO/tests/Bug_2683_Regression/client.cpp143
-rwxr-xr-xTAO/tests/Bug_2683_Regression/run_test.pl61
-rw-r--r--TAO/tests/Bug_2683_Regression/server.cpp140
-rw-r--r--TAO/tests/Bug_2683_Regression/test_i.cpp41
-rw-r--r--TAO/tests/Bug_2683_Regression/test_i.h45
-rw-r--r--TAO/tests/MT_BiDir/Server_Task.cpp2
-rwxr-xr-xTAO/tests/Nested_Upcall_Crash/run_test.pl7
-rw-r--r--TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp2
-rw-r--r--THANKS1
-rw-r--r--ace/OS_NS_Thread.inl18
-rw-r--r--ace/OS_NS_netdb.cpp6
-rw-r--r--ace/OS_NS_netdb.inl32
-rw-r--r--ace/Sock_Connect.cpp48
-rw-r--r--ace/WFMO_Reactor.cpp2
-rw-r--r--ace/config-rtems.h36
-rw-r--r--ace/os_include/os_semaphore.h4
-rw-r--r--ace/os_include/sys/os_select.h5
-rw-r--r--ace/os_include/sys/os_types.h2
-rw-r--r--ace/os_include/sys/os_uio.h12
-rw-r--r--bin/MakeProjectCreator/config/ciao_static_dnc_app.mpb12
-rw-r--r--bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm2
-rwxr-xr-xbin/generate_compile_stats.sh117
-rwxr-xr-xbin/generate_rel_manpages6
-rw-r--r--bin/tao_orb_tests.lst1
-rw-r--r--examples/IOStream/client/.cvsignore1
-rw-r--r--examples/IOStream/client/IOStream_Client.mpc3
-rw-r--r--examples/IOStream/server/.cvsignore1
-rw-r--r--examples/IOStream/server/IOStream_Server.mpc3
-rw-r--r--examples/IOStream/server/iostream_server.cpp1
-rw-r--r--include/makeinclude/platform_rtems.x_g++.GNU42
35 files changed, 754 insertions, 167 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index b2c4e8ccf5c..742e63a5870 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -140,7 +140,7 @@ TAO_CodeGen::start_client_header (const char *fname)
this->gen_ident_string (this->client_header_);
ACE_CString pidl_checker (idl_global->filename ()->get_string ());
- bool got_pidl =
+ bool const got_pidl =
(pidl_checker.substr (pidl_checker.length () - 5) == ".pidl");
if (!got_pidl)
@@ -934,7 +934,7 @@ TAO_CodeGen::start_anyop_header (const char *fname)
idl_name_str.destroy ();
ACE_CString pidl_checker (idl_name);
- bool got_pidl =
+ bool const got_pidl =
(pidl_checker.substr (pidl_checker.length () - 5) == ".pidl");
// If we're here and we have a .pidl file, we need to generate
diff --git a/TAO/tao/IORTable/Table_Adapter.cpp b/TAO/tao/IORTable/Table_Adapter.cpp
index bf31f486a7b..fea2ec32cbd 100644
--- a/TAO/tao/IORTable/Table_Adapter.cpp
+++ b/TAO/tao/IORTable/Table_Adapter.cpp
@@ -10,6 +10,7 @@
#include "tao/IORTable/Table_Adapter.h"
#include "tao/IORTable/IOR_Table_Impl.h"
#include "tao/ORB_Core.h"
+#include "tao/Server_Strategy_Factory.h"
#include "tao/Object.h"
#include "tao/Stub.h"
#include "tao/ORB.h"
@@ -21,31 +22,68 @@ ACE_RCSID (IORTable,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_Table_Adapter::TAO_Table_Adapter (TAO_ORB_Core *orb_core)
- : orb_core_ (orb_core)
- , root_ (0)
+TAO_Table_Adapter::TAO_Table_Adapter (TAO_ORB_Core &orb_core)
+ : orb_core_ (orb_core),
+ root_ (),
+ closed_ (true),
+ enable_locking_ (orb_core_.server_factory ()->enable_poa_locking ()),
+ thread_lock_ (),
+ lock_ (TAO_Table_Adapter::create_lock (enable_locking_,
+ thread_lock_))
{
}
TAO_Table_Adapter::~TAO_Table_Adapter (void)
{
- ::CORBA::release (this->root_);
+ delete this->lock_;
+}
+
+/* static */
+ACE_Lock *
+TAO_Table_Adapter::create_lock (bool enable_locking,
+ TAO_SYNCH_MUTEX &thread_lock)
+{
+#if defined (ACE_HAS_THREADS)
+ if (enable_locking)
+ {
+ ACE_Lock *the_lock = 0;
+ ACE_NEW_RETURN (the_lock,
+ ACE_Lock_Adapter<TAO_SYNCH_MUTEX> (thread_lock),
+ 0);
+ return the_lock;
+ }
+#else
+ ACE_UNUSED_ARG (enable_locking);
+ ACE_UNUSED_ARG (thread_lock);
+#endif /* ACE_HAS_THREADS */
+
+ ACE_Lock *the_lock = 0;
+ ACE_NEW_RETURN (the_lock,
+ ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> (),
+ 0);
+ return the_lock;
}
void
TAO_Table_Adapter::open (ACE_ENV_SINGLE_ARG_DECL)
{
+ ACE_GUARD (ACE_Lock, ace_mon, *this->lock_);
+
ACE_NEW_THROW_EX (this->root_,
TAO_IOR_Table_Impl (),
CORBA::NO_MEMORY ());
ACE_CHECK;
+
+ this->closed_ = false;
}
void
TAO_Table_Adapter::close (int ACE_ENV_ARG_DECL_NOT_USED)
{
- ::CORBA::release (this->root_);
- this->root_ = 0;
+ ACE_GUARD (ACE_Lock, ace_mon, *this->lock_);
+ this->closed_ = true;
+ // no need to release the impl now, that will happen in the
+ // destructor.
}
void
@@ -66,6 +104,17 @@ TAO_Table_Adapter::dispatch (TAO::ObjectKey &key,
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ CORBA::Object_var rootref;
+ {
+ ACE_GUARD_RETURN (ACE_Lock,
+ ace_mon,
+ *this->lock_,
+ TAO_Adapter::DS_MISMATCHED_KEY);
+ if (this->closed_)
+ return TAO_Adapter::DS_MISMATCHED_KEY;
+ rootref = this->root();
+ }
+
return this->find_object (key, forward_to) ? TAO_Adapter::DS_FORWARD
: TAO_Adapter::DS_MISMATCHED_KEY;
}
@@ -79,7 +128,7 @@ TAO_Table_Adapter::name (void) const
CORBA::Object_ptr
TAO_Table_Adapter::root (void)
{
- return CORBA::Object::_duplicate (this->root_);
+ return CORBA::Object::_duplicate (this->root_.in());
}
CORBA::Object_ptr
@@ -152,11 +201,11 @@ TAO_Table_Adapter::find_object (TAO::ObjectKey &key,
ACE_TRY
{
CORBA::String_var ior =
- this->root_->find (object_key.in () ACE_ENV_ARG_PARAMETER);
+ dynamic_cast<TAO_IOR_Table_Impl*>(this->root_.in())->find (object_key.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
forward_to =
- this->orb_core_->orb ()->string_to_object (ior.in ()
+ this->orb_core_.orb ()->string_to_object (ior.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -179,7 +228,7 @@ TAO_Table_Adapter_Factory::create (TAO_ORB_Core *oc)
{
TAO_Adapter* ptr = 0;
ACE_NEW_RETURN (ptr,
- TAO_Table_Adapter (oc),
+ TAO_Table_Adapter (*oc),
0);
return ptr;
}
diff --git a/TAO/tao/IORTable/Table_Adapter.h b/TAO/tao/IORTable/Table_Adapter.h
index 9f6ad395279..6e7025f73d2 100644
--- a/TAO/tao/IORTable/Table_Adapter.h
+++ b/TAO/tao/IORTable/Table_Adapter.h
@@ -16,6 +16,7 @@
#include /**/ "ace/pre.h"
#include "tao/IORTable/iortable_export.h"
+#include "tao/IORTable/IORTable.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -24,16 +25,17 @@
#include "tao/Adapter.h"
#include "tao/Adapter_Factory.h"
#include "ace/Service_Config.h"
+#include "ace/Lock.h"
+#include "tao/ORB_Core.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-class TAO_IOR_Table_Impl;
-
class TAO_IORTable_Export TAO_Table_Adapter : public TAO_Adapter
{
public:
+
/// Constructor
- TAO_Table_Adapter (TAO_ORB_Core *orb_core);
+ TAO_Table_Adapter (TAO_ORB_Core &orb_core);
/// Destructor
virtual ~TAO_Table_Adapter (void);
@@ -51,13 +53,16 @@ public:
CORBA::Object_out foward_to
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
+
virtual const char *name (void) const;
virtual CORBA::Object_ptr root (void);
virtual CORBA::Object_ptr create_collocated_object (TAO_Stub *,
const TAO_MProfile &);
virtual CORBA::Long initialize_collocated_object (TAO_Stub *);
+
private:
+ static ACE_Lock * create_lock (bool enable_locking, TAO_SYNCH_MUTEX &l);
/// Helper method to find an object bound in the table.
/// @return 1 if found, 0 otherwise.
CORBA::Long find_object (TAO::ObjectKey &key,
@@ -66,10 +71,15 @@ private:
ACE_THROW_SPEC ((CORBA::SystemException));
/// The ORB Core we belong to
- TAO_ORB_Core * const orb_core_;
+ TAO_ORB_Core &orb_core_;
/// The table implementation
- TAO_IOR_Table_Impl *root_;
+ IORTable::Table_var root_;
+
+ bool closed_;
+ bool enable_locking_;
+ TAO_SYNCH_MUTEX thread_lock_;
+ ACE_Lock *lock_;
};
// ****************************************************************
diff --git a/TAO/tests/Bug_2683_Regression/IORTable.mpc b/TAO/tests/Bug_2683_Regression/IORTable.mpc
new file mode 100644
index 00000000000..669363e1eac
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/IORTable.mpc
@@ -0,0 +1,18 @@
+// -*- MPC -*-
+// $Id$
+
+project(*Server): taoserver, iortable {
+ idlflags += -Sa -St
+ Source_Files {
+ test_i.cpp
+ server.cpp
+ }
+}
+
+project(*Client): taoclient {
+ after += *Server
+ Source_Files {
+ TestC.cpp
+ client.cpp
+ }
+}
diff --git a/TAO/tests/Bug_2683_Regression/Test.idl b/TAO/tests/Bug_2683_Regression/Test.idl
new file mode 100644
index 00000000000..0adcaba0a70
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/Test.idl
@@ -0,0 +1,14 @@
+//
+// $Id$
+//
+
+/// Put the interfaces in a module, to avoid global namespace pollution
+module Test
+{
+ /// A very simple interface
+ interface IORTable_Shutdown_Race
+ {
+ void ping ();
+ oneway void shutdown ();
+ };
+};
diff --git a/TAO/tests/Bug_2683_Regression/client.cpp b/TAO/tests/Bug_2683_Regression/client.cpp
new file mode 100644
index 00000000000..31349e3b1b9
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/client.cpp
@@ -0,0 +1,143 @@
+// $Id$
+
+#include "TestC.h"
+#include "ace/Get_Opt.h"
+#include "ace/Task.h"
+#include "ace/OS_NS_unistd.h"
+
+class Pinger : public ACE_Task_Base
+{
+private:
+ const char * ior_;
+ CORBA::ORB_var orb_;
+ bool do_shutdown_;
+ bool stop_;
+
+public:
+ Pinger (CORBA::ORB_var &orb, const char *ior)
+ : ior_ (ior),
+ orb_(orb),
+ do_shutdown_ (false),
+ stop_ (false)
+ {
+ }
+
+ int svc (void)
+ {
+ bool keep_going = true;
+ while (keep_going && !this->stop_)
+ {
+ try
+ {
+ CORBA::Object_var tmp = this->orb_->string_to_object(this->ior_);
+
+ Test::IORTable_Shutdown_Race_var target =
+ Test::IORTable_Shutdown_Race::_narrow(tmp.in ());
+ if (CORBA::is_nil (target.in ()))
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "(%P|%t) Nil target reference <%s>\n",
+ this->ior_),
+ 1);
+ target->ping();
+ if (this->do_shutdown_)
+ {
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) Calling shutdown \n"));
+ this->do_shutdown_ = false;
+ target->shutdown ();
+ }
+ }
+ catch (CORBA::Exception &ex)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) caught an exception - %s\n",ex._name()));
+ keep_going = false;
+ }
+ }
+ return 0;
+ }
+
+ void killit()
+ {
+ do_shutdown_ = true;
+ }
+
+ void stop ()
+ {
+ stop_ = true;
+ }
+
+};
+
+int port = 0;
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "p:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'p':
+ port = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-p <server_port> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ char ior[100];
+ ACE_OS::sprintf (ior,"corbaloc::localhost:%d/Racer",port);
+
+ Pinger pinger(orb, ior);
+
+ ACE_OS::sleep (1);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) client - starting client threads\n"));
+
+ pinger.activate (THR_NEW_LWP | THR_JOINABLE, 5);
+
+ ACE_OS::sleep (1);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) client - All running, time to shutdown server\n"));
+ pinger.killit();
+
+ ACE_OS::sleep (2);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) client - Stopping client threads\n"));
+ pinger.stop ();
+
+ pinger.wait();
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) client done\n"));
+
+ }
+ catch (CORBA::Exception &ex)
+ {
+ ACE_DEBUG ((LM_DEBUG,"Main caught %s\n",ex._name()));
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/TAO/tests/Bug_2683_Regression/run_test.pl b/TAO/tests/Bug_2683_Regression/run_test.pl
new file mode 100755
index 00000000000..b47caa3c5bd
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/run_test.pl
@@ -0,0 +1,61 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::Run_Test;
+
+$status = 0;
+$iorfile = "test.ior";
+
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+unlink $iorfile;
+
+if (PerlACE::is_vxworks_test()) {
+ $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint iiop://localhost:43210");
+}
+else {
+ $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost:43210");
+}
+
+$CL = new PerlACE::Process ("client", " -p 43210");
+
+$server = $SV->Spawn ();
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ exit 1;
+}
+
+if (PerlACE::waitforfile_timed ($iorfile,
+ $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (30);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/Bug_2683_Regression/server.cpp b/TAO/tests/Bug_2683_Regression/server.cpp
new file mode 100644
index 00000000000..9a2846b4e82
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/server.cpp
@@ -0,0 +1,140 @@
+// $Id$
+
+#include "test_i.h"
+#include "tao/IORTable/IORTable.h"
+#include "ace/OS_NS_strings.h"
+#include "ace/OS_NS_stdio.h"
+#include "ace/Thread_Manager.h"
+#include "ace/Task.h"
+
+class ORB_Run_Task : public ACE_Task_Base
+{
+private:
+ CORBA::ORB_var orb_;
+
+public:
+ ORB_Run_Task (CORBA::ORB_var& orb)
+ : orb_(orb)
+ {
+ }
+
+ int svc (void)
+ {
+ try
+ {
+ this->orb_->run();
+ }
+ catch (CORBA::Exception &ex)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) server orb run thread caught %s\n",ex._name()));
+ }
+ return 0;
+ }
+
+};
+
+int
+main (int argc, char *argv[])
+{
+ try
+ {
+ int nthreads = 10;
+ const char *ior_file = "test.ior";
+ bool endpoint_found = false;
+ for (int i = 0; i < argc; i++)
+ {
+ if ((ACE_OS::strcasecmp (argv[i],"-ORBEndpoint") == 0) ||
+ (ACE_OS::strcasecmp (argv[i],"-ORBListenEndpoints") == 0))
+ endpoint_found = 1;
+ else if (ACE_OS::strcasecmp (argv[i],"-threads") == 0)
+ {
+ ++i;
+ nthreads = ACE_OS::atoi (argv[i]);
+ }
+ else if (ACE_OS::strcasecmp (argv[i],"-o") == 0)
+ {
+ ++i;
+ ior_file = argv[i];
+ }
+ }
+
+ if (!endpoint_found)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: %s requires an explicit endpoint!\n",
+ argv[0]), 1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) server started\n"));
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ CORBA::Object_var obj =
+ orb->resolve_initial_references("RootPOA");
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (obj.in ());
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil RootPOA\n"),
+ 1);
+
+ obj = orb->resolve_initial_references("IORTable");
+
+ IORTable::Table_var iortable =
+ IORTable::Table::_narrow(obj.in());
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil IORTable\n"),
+ 1);
+
+ ORB_Killer killer (orb);
+ test_i *servant;
+ ACE_NEW_RETURN (servant,
+ test_i (&killer),
+ 1);
+ PortableServer::ServantBase_var owner_transfer(servant);
+
+ Test::IORTable_Shutdown_Race_var target = servant->_this ();
+
+ CORBA::String_var ior =
+ orb->object_to_string (target.in ());
+
+ iortable->bind ("Racer",ior.in());
+
+ PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
+
+ poa_manager->activate ();
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) server - activating ORB threads\n"));
+
+ ORB_Run_Task ort (orb);
+ ort.activate (THR_NEW_LWP | THR_JOINABLE, 3);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) server - ORB running\n"));
+
+
+ // Output the IOR to the <ior_file> - to signal readiness.
+ FILE *output_file= ACE_OS::fopen (ior_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s\n",
+ ior_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+
+ ACE_Thread_Manager *tm = ort.thr_mgr();
+ tm->wait();
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
+
+ orb->destroy ();
+ }
+ catch (CORBA::Exception &ex)
+ {
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server main - caught %s\n",ex._name()));
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/TAO/tests/Bug_2683_Regression/test_i.cpp b/TAO/tests/Bug_2683_Regression/test_i.cpp
new file mode 100644
index 00000000000..f808568b8ea
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/test_i.cpp
@@ -0,0 +1,41 @@
+//
+// $Id$
+//
+#include "test_i.h"
+#include "ace/OS_NS_unistd.h"
+
+test_i::test_i (ORB_Killer *k)
+ : killer_ (k)
+{
+}
+
+void
+test_i::ping (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+
+}
+
+void
+test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) requesting shutdown \n"));
+ this->killer_->activate ();
+}
+
+
+ORB_Killer::ORB_Killer (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+{
+}
+
+int
+ORB_Killer::svc ()
+{
+ ACE_OS::sleep (1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) doing shutdown \n"));
+ orb_->shutdown(1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) shutdown complete\n"));
+ return 0;
+}
diff --git a/TAO/tests/Bug_2683_Regression/test_i.h b/TAO/tests/Bug_2683_Regression/test_i.h
new file mode 100644
index 00000000000..45c844846f8
--- /dev/null
+++ b/TAO/tests/Bug_2683_Regression/test_i.h
@@ -0,0 +1,45 @@
+// -*- C++ -*-
+//
+// $Id$
+//
+
+#ifndef TEST_I_H
+#define TEST_I_H
+#include /**/ "ace/pre.h"
+
+#include "TestS.h"
+#include "ace/Task.h"
+
+class ORB_Killer : public ACE_Task_Base
+{
+public:
+ /// Constructor
+ ORB_Killer (CORBA::ORB_ptr orb);
+ virtual int svc (void);
+private:
+ CORBA::ORB_var orb_;
+};
+
+/// Implement the Test::Hello interface
+class test_i
+ : public virtual POA_Test::IORTable_Shutdown_Race
+{
+public:
+ /// Constructor
+ test_i (ORB_Killer *k);
+
+ // = The skeleton methods
+ virtual void ping (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ /// Use an ORB reference to conver strings to objects and shutdown
+ /// the application.
+ ORB_Killer *killer_;
+};
+
+#include /**/ "ace/post.h"
+#endif /* IOR_RACE_I_H */
diff --git a/TAO/tests/MT_BiDir/Server_Task.cpp b/TAO/tests/MT_BiDir/Server_Task.cpp
index f01ddfd5518..846fde96ea4 100644
--- a/TAO/tests/MT_BiDir/Server_Task.cpp
+++ b/TAO/tests/MT_BiDir/Server_Task.cpp
@@ -77,7 +77,7 @@ Server_Task::svc (void)
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception in iteration \n");
+ "Caught exception in iteration.\n");
}
ACE_ENDTRY;
diff --git a/TAO/tests/Nested_Upcall_Crash/run_test.pl b/TAO/tests/Nested_Upcall_Crash/run_test.pl
index bc8d423012c..989ed322313 100755
--- a/TAO/tests/Nested_Upcall_Crash/run_test.pl
+++ b/TAO/tests/Nested_Upcall_Crash/run_test.pl
@@ -21,7 +21,12 @@ $CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
$CL2 = new PerlACE::Process ("client", "-k file://$iorfile");
$CL3 = new PerlACE::Process ("client", "-k file://$iorfile");
-$SV->Spawn ();
+$server_spawn = $SV->Spawn ();
+
+if ($server_spawn != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ exit 1
+}
if (PerlACE::waitforfile_timed ($iorfile,
$PerlACE::wait_interval_for_process_creation) == -1) {
diff --git a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
index e8259069e76..b14c292ffe6 100644
--- a/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
+++ b/TAO/tests/RTCORBA/Priority_Inversion_With_Bands/server.cpp
@@ -152,7 +152,7 @@ create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy,
servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
- int result =
+ int const result =
write_ior_to_file (orb,
test.in ()
ACE_ENV_ARG_PARAMETER);
diff --git a/THANKS b/THANKS
index 2f3067834ea..f35e51d5d5d 100644
--- a/THANKS
+++ b/THANKS
@@ -2152,6 +2152,7 @@ Aleksandar Vukajlovic <vukajlo at finsoft dot co dot yu>
Zhamak Dehghani <zhamakd at gmail dot com>
Charles Calkins <calkinsc at ociweb dot com>
Manuel Traut <manut dot de at googlemail dot com>
+Drew Reynaud <drewreynaud at hotmail dot com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile
diff --git a/ace/OS_NS_Thread.inl b/ace/OS_NS_Thread.inl
index 349fffa2318..e57cf46a7bf 100644
--- a/ace/OS_NS_Thread.inl
+++ b/ace/OS_NS_Thread.inl
@@ -1357,10 +1357,10 @@ ACE_OS::sema_destroy (ACE_sema_t *s)
ACE_OS_TRACE ("ACE_OS::sema_destroy");
# if defined (ACE_HAS_POSIX_SEM)
int result;
-# if !defined (ACE_HAS_POSIX_SEM_TIMEOUT)
+# if !defined (ACE_HAS_POSIX_SEM_TIMEOUT) && defined (ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION)
ACE_OS::mutex_destroy (&s->lock_);
ACE_OS::cond_destroy (&s->count_nonzero_);
-# endif /* !ACE_HAS_POSIX_SEM_TIMEOUT */
+# endif /* !ACE_HAS_POSIX_SEM_TIMEOUT && ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION */
# if defined (ACE_LACKS_NAMED_POSIX_SEM)
if (s->name_)
{
@@ -1447,7 +1447,7 @@ ACE_OS::sema_init (ACE_sema_t *s,
ACE_UNUSED_ARG (sa);
s->name_ = 0;
-# if defined (ACE_HAS_POSIX_SEM_TIMEOUT)
+# if defined (ACE_HAS_POSIX_SEM_TIMEOUT) || !defined (ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION)
ACE_UNUSED_ARG (arg);
# else
int result = -1;
@@ -1467,7 +1467,7 @@ ACE_OS::sema_init (ACE_sema_t *s,
ACE_OS::cond_destroy (&s->count_nonzero_);
return result;
}
-# endif /* ACE_HAS_POSIX_SEM_TIMEOUT */
+# endif /* ACE_HAS_POSIX_SEM_TIMEOUT || !ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION */
# if defined (ACE_LACKS_NAMED_POSIX_SEM)
s->new_sema_ = 0;
@@ -1833,7 +1833,7 @@ ACE_OS::sema_post (ACE_sema_t *s)
{
ACE_OS_TRACE ("ACE_OS::sema_post");
# if defined (ACE_HAS_POSIX_SEM)
-# if defined (ACE_HAS_POSIX_SEM_TIMEOUT)
+# if defined (ACE_HAS_POSIX_SEM_TIMEOUT) || !defined (ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION)
ACE_OSCALL_RETURN (::sem_post (s->sema_), int, -1);
# else
int result = -1;
@@ -1846,7 +1846,7 @@ ACE_OS::sema_post (ACE_sema_t *s)
ACE_OS::mutex_unlock (&s->lock_);
}
return result;
-# endif /* ACE_HAS_POSIX_SEM_TIMEOUT */
+# endif /* ACE_HAS_POSIX_SEM_TIMEOUT || !ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION */
# elif defined (ACE_USES_FIFO_SEM)
char c = 1;
if (ACE_OS::write (s->fd_[1], &c, sizeof (char)) == sizeof (char))
@@ -2174,6 +2174,7 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv)
errno = ETIME; /* POSIX returns ETIMEDOUT but we need ETIME */
return rc;
# else
+# if defined (ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION)
int result = 0;
bool expired = false;
ACE_Errno_Guard error (errno);
@@ -2220,6 +2221,11 @@ ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv)
ACE_OS::mutex_unlock (&s->lock_);
ACE_PTHREAD_CLEANUP_POP (0);
return result < 0 ? -1 : result;
+# else
+ ACE_UNUSED_ARG (s);
+ ACE_UNUSED_ARG (tv);
+ ACE_NOTSUP_RETURN (-1);
+# endif /* ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION */
# endif /* !ACE_HAS_POSIX_SEM_TIMEOUT */
# elif defined (ACE_USES_FIFO_SEM)
int rc;
diff --git a/ace/OS_NS_netdb.cpp b/ace/OS_NS_netdb.cpp
index 5d8c023f865..92a853b2895 100644
--- a/ace/OS_NS_netdb.cpp
+++ b/ace/OS_NS_netdb.cpp
@@ -127,6 +127,9 @@ ACE_OS::gethostbyname (const char *name)
static char *hostaddr[2];
static char *aliases[1];
+ if (0 == name || '\0' == name[0])
+ return 0;
+
ACE_OSCALL (::hostGetByName ((char *) name), int, -1, first_addr);
if (first_addr == -1)
return 0;
@@ -156,6 +159,9 @@ ACE_OS::gethostbyname_r (const char *name, hostent *result,
{
ACE_OS_TRACE ("ACE_OS::gethostbyname_r");
+ if (0 == name || '\0' == name[0])
+ return 0;
+
if (ACE_OS::netdb_acquire ())
return 0;
else
diff --git a/ace/OS_NS_netdb.inl b/ace/OS_NS_netdb.inl
index e496119bc32..74494b8a994 100644
--- a/ace/OS_NS_netdb.inl
+++ b/ace/OS_NS_netdb.inl
@@ -53,19 +53,25 @@ ACE_OS::gethostbyaddr (const char *addr, int length, int type)
ACE_UNUSED_ARG (length);
ACE_UNUSED_ARG (type);
ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_NONCONST_GETBY)
+# else
+
+ if (0 == addr || '\0' == addr[0])
+ return 0;
+
+# if defined (ACE_HAS_NONCONST_GETBY)
ACE_SOCKCALL_RETURN (::gethostbyaddr (const_cast<char *> (addr),
(ACE_SOCKET_LEN) length,
type),
struct hostent *,
0);
-# else
+# else
ACE_SOCKCALL_RETURN (::gethostbyaddr (addr,
(ACE_SOCKET_LEN) length,
type),
struct hostent *,
0);
-# endif /* ACE_HAS_NONCONST_GETBY */
+# endif /* ACE_HAS_NONCONST_GETBY */
+# endif /* !ACE_LACKS_GETHOSTBYADDR */
}
#endif
@@ -82,6 +88,10 @@ ACE_OS::gethostbyaddr_r (const char *addr,
{
ACE_OS_TRACE ("ACE_OS::gethostbyaddr_r");
# if defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
+
+ if (0 == addr || '\0' == addr[0])
+ return 0;
+
# if defined (AIX) || defined (DIGITAL_UNIX)
ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
@@ -155,15 +165,21 @@ ACE_OS::gethostbyname (const char *name)
# if defined (ACE_LACKS_GETHOSTBYNAME)
ACE_UNUSED_ARG (name);
ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_NONCONST_GETBY)
+# else
+
+ if (0 == name || '\0' == name[0])
+ return 0;
+
+# if defined (ACE_HAS_NONCONST_GETBY)
ACE_SOCKCALL_RETURN (::gethostbyname (const_cast<char *> (name)),
struct hostent *,
0);
-# else
+# else
ACE_SOCKCALL_RETURN (::gethostbyname (name),
struct hostent *,
0);
-# endif /* ACE_HAS_NONCONST_GETBY */
+# endif /* ACE_HAS_NONCONST_GETBY */
+# endif /* !ACE_LACKS_GETHOSTBYNAME */
}
#endif
@@ -184,6 +200,10 @@ ACE_OS::gethostbyname_r (const char *name,
ACE_UNUSED_ARG (h_errnop);
ACE_NOTSUP_RETURN (0);
# elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
+
+ if (0 == name || '\0' == name[0])
+ return (struct hostent *)0;
+
# if defined (DIGITAL_UNIX) || \
(defined (ACE_AIX_MINOR_VERS) && (ACE_AIX_MINOR_VERS > 2))
ACE_UNUSED_ARG (result);
diff --git a/ace/Sock_Connect.cpp b/ace/Sock_Connect.cpp
index b78c89c3524..1817f6d3372 100644
--- a/ace/Sock_Connect.cpp
+++ b/ace/Sock_Connect.cpp
@@ -570,15 +570,15 @@ ACE::get_ip_interfaces (size_t &count,
return -1;
n_interfaces = bytes / sizeof(INTERFACE_INFO);
- if (n_interfaces == 0)
- return 0;
// SIO_GET_INTERFACE_LIST does not work for IPv6
- // Instead recent versions of Winsock2 add the new opcode SIO_ADDRESS_LIST_QUERY.
+ // Instead recent versions of Winsock2 add the new opcode
+ // SIO_ADDRESS_LIST_QUERY.
// If this is not available forget about IPv6 local interfaces:-/
-# if defined (ACE_HAS_IPV6) && defined (SIO_ADDRESS_LIST_QUERY)
int n_v6_interfaces = 0;
+# if defined (ACE_HAS_IPV6) && defined (SIO_ADDRESS_LIST_QUERY)
+
LPSOCKET_ADDRESS_LIST v6info;
char *buffer;
DWORD buflen = sizeof (SOCKET_ADDRESS_LIST) + (63 * sizeof (SOCKET_ADDRESS));
@@ -590,38 +590,26 @@ ACE::get_ip_interfaces (size_t &count,
// Get an (overlapped) DGRAM socket to test with.
// If it fails only return IPv4 interfaces.
sock = socket (AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
- if (sock == INVALID_SOCKET)
+ if (sock != INVALID_SOCKET)
{
- delete [] buffer;
- return -1;
+ status = WSAIoctl(sock,
+ SIO_ADDRESS_LIST_QUERY,
+ 0,
+ 0,
+ v6info,
+ buflen,
+ &bytes,
+ 0,
+ 0);
+ closesocket (sock);
+ if (status != SOCKET_ERROR)
+ n_v6_interfaces = v6info->iAddressCount;
}
-
- status = WSAIoctl(sock,
- SIO_ADDRESS_LIST_QUERY,
- 0,
- 0,
- v6info,
- buflen,
- &bytes,
- 0,
- 0);
- closesocket (sock);
- if (status == SOCKET_ERROR)
- {
- delete [] buffer; // clean up
- return -1;
- }
-
- n_v6_interfaces = v6info->iAddressCount;
+# endif /* ACE_HAS_IPV6 */
ACE_NEW_RETURN (addrs,
ACE_INET_Addr[n_interfaces + n_v6_interfaces],
-1);
-# else /* ACE_HAS_IPV6 */
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[n_interfaces],
- -1);
-# endif /* !ACE_HAS_IPV6 */
// Now go through the list and transfer the good ones to the list of
// because they're down or don't have an IP address.
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
index 387ccb49bb0..c0deb2b65c2 100644
--- a/ace/WFMO_Reactor.cpp
+++ b/ace/WFMO_Reactor.cpp
@@ -1770,7 +1770,7 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time,
#elif defined (ACE_HAS_WINCE)
result = ::WaitForMultipleObjects (sizeof this->atomic_wait_array_ / sizeof (ACE_HANDLE),
this->atomic_wait_array_,
- TRUE,
+ FALSE, // Must be FALSE on WinCE
timeout);
break; // CE does not have WAIT_IO_COMPLETION defined.
#else
diff --git a/ace/config-rtems.h b/ace/config-rtems.h
index 61e0edf7337..ed8e8662361 100644
--- a/ace/config-rtems.h
+++ b/ace/config-rtems.h
@@ -8,10 +8,6 @@
#ifndef ACE_CONFIG_H
#define ACE_CONFIG_H
-// begin of linux-common.h
-
-/* #define ACE_HAS_BYTESEX_H */
-
#if ! defined (__ACE_INLINE__)
#define __ACE_INLINE__
#endif /* ! __ACE_INLINE__ */
@@ -30,11 +26,8 @@
// config-g-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
// this must appear before its #include.
# define ACE_HAS_STRING_CLASS
-# include "ace/config-g-common.h"
-#elif defined (__DECCXX)
-# define ACE_CONFIG_INCLUDE_CXX_COMMON
-# include "ace/config-cxx-common.h"
-#else /* ! __GNUG__ && ! __KCC && !__DECCXX */
+# include "ace/config-g++-common.h"
+#else /* ! __GNUG__ */
# ifdef __cplusplus /* Let it slide for C compilers. */
# error unsupported compiler in ace/config-rtems.h
# endif /* __cplusplus */
@@ -43,9 +36,24 @@
// Completely common part :-)
#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-# if !defined (ACE_MAIN)
-# define ACE_MAIN ace_main
-# endif /* ! ACE_MAIN */
+
+#if !defined (ACE_MAIN)
+# define ACE_MAIN ace_main
+#endif /* ! ACE_MAIN */
+
+#define ACE_LACKS_REGEX_H
+#define ACE_LACKS_STROPTS_H
+#define ACE_LACKS_DLFCN_H
+#define ACE_LACKS_SIGINFO_H
+#define ACE_LACKS_SYS_IPC_H
+#define ACE_LACKS_SYS_SEM_H
+#define ACE_LACKS_SUSECONDS_T
+#define ACE_LACKS_CUSERID
+#define ACE_LACKS_STRINGS_H
+#define ACE_LACKS_SYS_SHM_H
+#define ACE_LACKS_SETEGID
+#define ACE_LACKS_SETEUID
+#define ACE_LACKS_POLL_H
// Yes, we do have threads.
#define ACE_HAS_THREADS
@@ -62,10 +70,8 @@
#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
#define ACE_HAS_CLOCK_GETTIME
#define ACE_HAS_CLOCK_SETTIME
-/* #define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */
#define ACE_HAS_DIRENT
#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-/* #define ACE_HAS_LLSEEK */
#define ACE_HAS_MEMCHR
#define ACE_HAS_MSG
#define ACE_HAS_MT_SAFE_MKTIME
@@ -76,7 +82,6 @@
#define ACE_HAS_SIGINFO_T
#define ACE_HAS_SIGSUSPEND
#define ACE_HAS_SSIZE_T
-/* #define ACE_HAS_STANDARD_CPP_LIBRARY */
#define ACE_HAS_STRERROR
#define ACE_HAS_VOIDPTR_GETTIMEOFDAY
#define ACE_HAS_SYS_ERRLIST
@@ -116,7 +121,6 @@
#define ACE_LACKS_SYS_MSG_H
#define ACE_LACKS_SYSV_SHMEM
#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_UALARM_PROTOTYPE
#define ACE_LACKS_UCONTEXT_H
#define ACE_HAS_NONCONST_WRITEV
#define ACE_LACKS_WRITEV
diff --git a/ace/os_include/os_semaphore.h b/ace/os_include/os_semaphore.h
index 82524bdfd1b..62c049ba5a2 100644
--- a/ace/os_include/os_semaphore.h
+++ b/ace/os_include/os_semaphore.h
@@ -59,13 +59,13 @@ extern "C"
int new_sema_;
# endif /* ACE_LACKS_NAMED_POSIX_SEM */
-# if !defined (ACE_HAS_POSIX_SEM_TIMEOUT)
+# if !defined (ACE_HAS_POSIX_SEM_TIMEOUT) && defined (ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION)
/// Serialize access to internal state.
ACE_mutex_t lock_;
/// Block until there are no waiters.
ACE_cond_t count_nonzero_;
-# endif /* !ACE_HAS_POSIX_SEM_TIMEOUT */
+# endif /* !ACE_HAS_POSIX_SEM_TIMEOUT && ACE_HAS_POSIX_SEM_TIMEOUT_EMULATION */
} ACE_sema_t;
#endif /* ACE_HAS_POSIX_SEM */
diff --git a/ace/os_include/sys/os_select.h b/ace/os_include/sys/os_select.h
index e330e625a07..c6aa0e2ad3c 100644
--- a/ace/os_include/sys/os_select.h
+++ b/ace/os_include/sys/os_select.h
@@ -57,11 +57,6 @@ extern "C"
typedef fd_set ACE_FD_SET_TYPE;
#endif /* ACE_SELECT_USES_INT */
-#if defined (__rtems__)
- int select (int n, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, const struct timeval *timeout);
-#endif /* __rtems__ */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ace/os_include/sys/os_types.h b/ace/os_include/sys/os_types.h
index 30672051185..ebc04309b9a 100644
--- a/ace/os_include/sys/os_types.h
+++ b/ace/os_include/sys/os_types.h
@@ -74,7 +74,7 @@ typedef double ACE_timer_t;
#if defined (ACE_SIZEOF_LONG) && ACE_SIZEOF_LONG == 8
typedef off_t ACE_LOFF_T;
-#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) || \
+#elif defined (__rtems__) || defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) || \
(defined (ACE_OPENVMS) && defined (_LARGEFILE))
typedef off_t ACE_LOFF_T;
#elif defined (__sgi) || defined (AIX) || defined (HPUX) || defined (__QNX__)
diff --git a/ace/os_include/sys/os_uio.h b/ace/os_include/sys/os_uio.h
index 1a7fd505c39..da090a9665c 100644
--- a/ace/os_include/sys/os_uio.h
+++ b/ace/os_include/sys/os_uio.h
@@ -37,15 +37,7 @@ extern "C"
{
#endif /* __cplusplus */
-// todo: make this a regular ACE_LACKS macro test...
-#if defined(__rtems__)
- struct iovec {
- /// Base address.
- char *iov_base;
- /// Length.
- size_t iov_len;
- };
-#elif defined (ACE_WIN32)
+#if defined (ACE_WIN32)
/// The ordering of the fields in this struct is important. It has to
/// match those in WSABUF.
struct iovec
@@ -60,7 +52,7 @@ extern "C"
operator WSABUF &(void) { return *((WSABUF *) this); }
# endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
};
-#endif /* __rtems__ */
+#endif /* ACE_WIN32 */
# if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
diff --git a/bin/MakeProjectCreator/config/ciao_static_dnc_app.mpb b/bin/MakeProjectCreator/config/ciao_static_dnc_app.mpb
new file mode 100644
index 00000000000..5f2e5afd09f
--- /dev/null
+++ b/bin/MakeProjectCreator/config/ciao_static_dnc_app.mpb
@@ -0,0 +1,12 @@
+// -*- MPC -*-
+// $Id$
+
+project : ciao_component_dnc, iortable {
+
+ includes += $(CIAO_ROOT)/DAnCE/NodeApplicationManager
+ includes += $(CIAO_ROOT)/DAnCE/NodeManager
+ includes += $(CIAO_ROOT)/DAnCE/Interfaces
+
+ libs += NodeManager NodeManager_stub NodeApplicationManager TargetManager_stub
+ after += NodeManager NodeManager_stub NodeApplicationManager TargetManager_stub
+}
diff --git a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm
index 4d645b2411d..8ae76531b3c 100644
--- a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm
@@ -61,7 +61,7 @@ sub pre_workspace {
'# this file will be lost the next time it is generated.', $crlf,
'#', $crlf,
'# MPC Command:', $crlf,
- "# $0 @ARGV", $crlf,
+ '# ', $self->create_command_line_string($0, @ARGV), $crlf,
'#', $crlf,
'#-------------------------------------------------------------------------', $crlf,
'MAKEFILE = ', $self->get_modified_workspace_name($base, '', 1),
diff --git a/bin/generate_compile_stats.sh b/bin/generate_compile_stats.sh
index 754635d1161..079a2240fed 100755
--- a/bin/generate_compile_stats.sh
+++ b/bin/generate_compile_stats.sh
@@ -28,7 +28,22 @@
###############################################################################
usage ()
{
- echo "usage: $0 <input_file> <destination_directory> <target_file> {Footprint|Compilation} [<date> [<fudge_factor>]]"
+ echo "Usage: `basename $0` [--base=<dir>] [--title=<name>] <input_file>"
+ echo " <destination_directory> [target_file] [Footprint|Compilation]"
+ echo " [<date>] [<fudge_factor>]"
+ echo ""
+ echo "--base This option can be used to set the base root directory to"
+ echo " something other than the default \$ACE_ROOT."
+ echo "--title This option can be used to set the software title to something"
+ echo " other than the default ACE+TAO+CIAO."
+ echo "input_file This is the compilation log file."
+ echo "destination_directory This designates the location of the generated html."
+ echo "target_file This is similar to input_file, but should contain no errors."
+ echo "date Set the date used in all generated html pages."
+ echo "fudge_factor Add the specified number of seconds to the compilation time"
+ echo " for each target."
+ echo ""
+ echo "Options must be specified in the order shown above."
exit
}
@@ -134,6 +149,18 @@ strip_date ()
parse ()
{
echo "parse()"
+ while [ $# -gt 1 ]; do
+ if [ -n "`echo $1 | grep '^--base=.*'`" ]; then
+ BASE_ROOT=`echo $1 | sed 's/^--base=//'`
+ shift
+ elif [ -n "`echo $1 | grep '^--name=.*'`" ]; then
+ BASE_TITLE=`echo $1 | sed 's/^--name=//'`
+ shift
+ else
+ break
+ fi
+ done
+
# set input file and destination (required)
if [ $# -gt 1 ]; then
INFILE=$1
@@ -346,7 +373,7 @@ composite_list ()
if [ $INDEX -eq 3 ]; then
DIR="${i%?}" # strip off last "'"
- DIR="${DIR#*$ACE_ROOT/}" # strip off $ACE_ROOT
+ DIR="${DIR#*$BASE_ROOT/}" # strip off $BASE_ROOT
DIR="${DIR//\//___}___" # replace "/" with "___"
break
else
@@ -431,7 +458,7 @@ library_list ()
if [ $DIR_LINE -eq 1 ]; then
if [ $INDEX -eq 3 ]; then
DIR="${i%?}" # strip off last "'"
- DIR="${DIR#*$ACE_ROOT/}" # strip off $ACE_ROOT
+ DIR="${DIR#*$BASE_ROOT/}" # strip off $BASE_ROOT
DIR="${DIR//\//___}___" # replace "/" with "___"
break
else
@@ -533,7 +560,7 @@ footprint ()
# each dependent object and write it to a *.size file.
while read outfile colon infiles; do
# reconstitue file name
- FILE="$ACE_ROOT/${outfile//___//}"
+ FILE="$BASE_ROOT/${outfile//___//}"
if [ -e $FILE ]; then
#echo "inside if"
@@ -569,13 +596,13 @@ process_included ()
# while we are here, and have the info, go ahead and write out
# size dependencies for each library.
- LIBRARY="${LIBRARY#*$ACE_ROOT/}" # strip off $ACE_ROOT
+ LIBRARY="${LIBRARY#*$BASE_ROOT/}" # strip off $BASE_ROOT
LIBRARY="${LIBRARY//\//___}" # replace "/" with "___"
echo -n "$LIBRARY : " >> .metrics/size_composites.txt
while read size colon file; do
FILE=$fpath/$file
- OUTFILE="${FILE#*$ACE_ROOT/}" # strip off $ACE_ROOT
+ OUTFILE="${FILE#*$BASE_ROOT/}" # strip off $BASE_ROOT
OUTFILE="${OUTFILE//\//___}" # replace "/" with "___"
#echo "size = ($size)"
echo "$DATE $size" >> $lpath/${OUTFILE}.size
@@ -645,7 +672,7 @@ create_size_composites ()
while read outfile colon infiles; do
# reconstitue file name
- FILE="$ACE_ROOT/${outfile//___//}.map"
+ FILE="$BASE_ROOT/${outfile//___//}.map"
if [ -e $FILE ]; then
echo -n "$outfile : " >> .metrics/size_composites.txt
# only process lines that don't begin with a space
@@ -707,7 +734,7 @@ create_images ()
create_index_page ()
{
local TYPE="$1"
- local TITLE="$TYPE metrics for ACE+TAO+CIAO"
+ local TITLE="$TYPE metrics for $BASE_TITLE"
echo "<html>"
echo "<head><title>$TITLE</title></head>"
@@ -719,13 +746,21 @@ create_index_page ()
echo '</style>'
echo '<body text = "#000000" link="#000fff" vlink="#ff0f0f" bgcolor="#ffffff">'
echo "<br><center><h1>$TITLE</h1></center><br><hr>"
- echo '<p>One of the goals of the PCES-TENA project is to decrease compile times.
- In order to track our progress, metrics are gathered nightly on all
- objects in the ACE+TAO+CIAO distribution and displayed here.'
+ if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
+ echo '<p>One of the goals of the PCES-TENA project is to decrease compile times.'
+ else
+ echo '<p>'
+ fi
+ echo ' Metrics are gathered nightly on all
+ objects in the '$BASE_TITLE' distribution and displayed here.'
echo '<ul>'
- echo "<li><a href=\"ace_${TYPE}.html\">ACE</a>"
- echo "<li><a href=\"tao_${TYPE}.html\">TAO</a>"
- echo "<li><a href=\"ciao_${TYPE}.html\">CIAO</a>"
+ if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
+ echo "<li><a href=\"ace_${TYPE}.html\">ACE</a>"
+ echo "<li><a href=\"tao_${TYPE}.html\">TAO</a>"
+ echo "<li><a href=\"ciao_${TYPE}.html\">CIAO</a>"
+ else
+ echo "<li><a href=\"all_${TYPE}.html\">ALL</a>"
+ fi
echo '</ul>'
echo '<hr>'
@@ -745,17 +780,21 @@ create_index_page ()
/usr/bin/gcc -dumpversion > .metrics/gccversion.txt 2>&1
cat .metrics/gccversion.txt
- echo ' to compile ACE+TAO+CIAO. </P>'
+ echo ' to compile '$BASE_TITLE'. </P>'
- echo '<TABLE border="2"><TBODY><TR><TD>ACE+TAO+CIAO Configuration</TD><TD>config.h</TD></TR>'
- echo '<TR><TD colspan="2"><PRE>'
+ if [ -r $ACE_ROOT/ace/config.h ]; then
+ echo '<TABLE border="2"><TBODY><TR><TD>ACE+TAO+CIAO Configuration</TD><TD>config.h</TD></TR>'
+ echo '<TR><TD colspan="2"><PRE>'
- cat $ACE_ROOT/ace/config.h
+ cat $ACE_ROOT/ace/config.h
+ fi
- echo '</PRE></TD></TR><TR><TD>ACE+TAO+CIAO Configuration</TD><TD>platform_macros.GNU</TD></TR>'
- echo '<TR><TD colspan="2"><PRE>'
+ if [ -r $ACE_ROOT/include/makeinclude/platform_macros.GNU ]; then
+ echo '</PRE></TD></TR><TR><TD>ACE+TAO+CIAO Configuration</TD><TD>platform_macros.GNU</TD></TR>'
+ echo '<TR><TD colspan="2"><PRE>'
- cat $ACE_ROOT/include/makeinclude/platform_macros.GNU
+ cat $ACE_ROOT/include/makeinclude/platform_macros.GNU
+ fi
echo '</PRE></TD></TR><TR><TD>CPU Information</TD><TD>/proc/cpuinfo</TD></TR>'
echo '<TR><TD colspan="2"><PRE>'
@@ -831,8 +870,8 @@ create_page ()
echo "<center><h2>Detail (${DATE})</h2></center>"
echo '<TABLE border="2"><TBODY><TR><TD rowspan=2><b>Object</b></TD>'
- echo '<TD colspan="3"; align=center><b>Last Compile</b></TD></TR>'
- echo "<TD align=center><b>Date</b></TD><TD align=center><b>$UNITS</b></TD>"
+ echo '<TD colspan="3" align=center><b>Last Compile</b></TD></TR>'
+ echo "<TR><TD align=center><b>Date</b></TD><TD align=center><b>$UNITS</b></TD>"
echo '<TD align=center><b>%chg</b></TD></TR>'
while read i; do
if [ -e ".metrics/data/${i}.${EXT}" ]; then
@@ -951,18 +990,23 @@ create_html ()
cp .metrics/index.html ${DEST}/index.html
if [ "${TYPE}" = "Compilation" ] || [ "${TYPE}" = "Footprint" ]; then
- #echo "ace objects: $ACE_OBJS"
- name="ace_${TYPE}.html"
- sort_list ${ACE_OBJS} | create_page "ACE" ${TYPE} > .metrics/${name}
- cp .metrics/${name} ${DEST}/${name}
-
- name="tao_${TYPE}.html"
- sort_list ${TAO_OBJS} | create_page "TAO" ${TYPE} > .metrics/${name}
- cp .metrics/${name} ${DEST}/${name}
-
- name="ciao_${TYPE}.html"
- sort_list ${CIAO_OBJS} | create_page "CIAO" ${TYPE} > .metrics/${name}
- cp .metrics/${name} ${DEST}/${name}
+ if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
+ name="ace_${TYPE}.html"
+ sort_list ${ACE_OBJS} | create_page "ACE" ${TYPE} > .metrics/${name}
+ cp .metrics/${name} ${DEST}/${name}
+
+ name="tao_${TYPE}.html"
+ sort_list ${TAO_OBJS} | create_page "TAO" ${TYPE} > .metrics/${name}
+ cp .metrics/${name} ${DEST}/${name}
+
+ name="ciao_${TYPE}.html"
+ sort_list ${CIAO_OBJS} | create_page "CIAO" ${TYPE} > .metrics/${name}
+ cp .metrics/${name} ${DEST}/${name}
+ else
+ name="all_${TYPE}.html"
+ sort_list ${ACE_OBJS} | create_page $BASE_TITLE ${TYPE} > .metrics/${name}
+ cp .metrics/${name} ${DEST}/${name}
+ fi
fi
}
@@ -978,6 +1022,9 @@ TARGETS=""
DATE=""
METRIC="Compilation"
FUDGE_FACTOR=0
+BASE_ROOT=$ACE_ROOT
+DEFAULT_TITLE=ACE+TAO+CIAO
+BASE_TITLE=$DEFAULT_TITLE
parse $@
create_dirs ".metrics/"
diff --git a/bin/generate_rel_manpages b/bin/generate_rel_manpages
index f72a9956493..ce81980cce3 100755
--- a/bin/generate_rel_manpages
+++ b/bin/generate_rel_manpages
@@ -81,11 +81,11 @@ chomp ($release_files = `$make show_release_files`);
&& die "$0: failed to generate ACE man pages\n";
my $build_command =
- "$find html $release_filter | $cpio -o -H tar | " .
+ "$find ./html $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE-html.tar.gz && ".
- "$find html $release_filter | $cpio -o -H tar | " .
+ "$find ./html $release_filter | $cpio -o -H tar | " .
"$bzip -9 > ACE-html.tar.bz2 && ".
- "$find html $release_filter | $egrep -v $bin_files | " .
+ "$find ./html $release_filter | $egrep -v $bin_files | " .
"zip ACE-html.zip -q9@ &&" .
"$scp ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip $dest;";
diff --git a/bin/tao_orb_tests.lst b/bin/tao_orb_tests.lst
index 60e24407508..2525eb41389 100644
--- a/bin/tao_orb_tests.lst
+++ b/bin/tao_orb_tests.lst
@@ -72,6 +72,7 @@ TAO/tests/Bug_2542_Regression/run_test.pl:
TAO/tests/Bug_2560_Regression/run_test.pl: !ST
TAO/tests/Bug_2593_Regression/run_test.pl: !MINIMUM !STATIC !ACE_FOR_TAO
TAO/tests/Bug_2595_Regression/run_test.pl:
+TAO/tests/Bug_2683_Regression/run_test.pl:
TAO/tests/Bug_1476_Test/run_test.pl:
TAO/tests/RTCORBA/Banded_Connections/run_test.pl: !MINIMUM !ST
TAO/tests/RTCORBA/Client_Propagated/run_test.pl: !MINIMUM !ST
diff --git a/examples/IOStream/client/.cvsignore b/examples/IOStream/client/.cvsignore
index e5eeb0703df..957822b2487 100644
--- a/examples/IOStream/client/.cvsignore
+++ b/examples/IOStream/client/.cvsignore
@@ -1,2 +1 @@
iostream_client
-iostream_client
diff --git a/examples/IOStream/client/IOStream_Client.mpc b/examples/IOStream/client/IOStream_Client.mpc
index ca6b8ee6622..0f3b871b355 100644
--- a/examples/IOStream/client/IOStream_Client.mpc
+++ b/examples/IOStream/client/IOStream_Client.mpc
@@ -2,4 +2,5 @@
// $Id$
project : aceexe {
-} \ No newline at end of file
+ exename = iostream_client
+}
diff --git a/examples/IOStream/server/.cvsignore b/examples/IOStream/server/.cvsignore
index e37ecb3f31b..8cf9727e75f 100644
--- a/examples/IOStream/server/.cvsignore
+++ b/examples/IOStream/server/.cvsignore
@@ -1,2 +1 @@
iostream_server
-iostream_server
diff --git a/examples/IOStream/server/IOStream_Server.mpc b/examples/IOStream/server/IOStream_Server.mpc
index ca6b8ee6622..6048265757c 100644
--- a/examples/IOStream/server/IOStream_Server.mpc
+++ b/examples/IOStream/server/IOStream_Server.mpc
@@ -2,4 +2,5 @@
// $Id$
project : aceexe {
-} \ No newline at end of file
+ exename = iostream_server
+}
diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp
index 656b432a579..1cd6ca006de 100644
--- a/examples/IOStream/server/iostream_server.cpp
+++ b/examples/IOStream/server/iostream_server.cpp
@@ -8,6 +8,7 @@
#include "ace/SOCK_Acceptor.h"
#include "ace/Service_Config.h"
#include "ace/Signal.h"
+#include "ace/Sig_Adapter.h"
#include "iostream_server.h"
#include "ace/OS_NS_unistd.h"
diff --git a/include/makeinclude/platform_rtems.x_g++.GNU b/include/makeinclude/platform_rtems.x_g++.GNU
index 60d1ec0518c..8b335f832a2 100644
--- a/include/makeinclude/platform_rtems.x_g++.GNU
+++ b/include/makeinclude/platform_rtems.x_g++.GNU
@@ -1,13 +1,6 @@
# $Id$
#
-# RTEMS 4.5.0 and later with GNU g++.
-
-#### Notes:
-#### 1) This file requires that the WIND_BASE and WIND_HOST_TYPE environment
-#### variables be set. If the target CPU is not a PPC604, then your CPU
-#### environment variable must be set. If perl is not on your path,
-#### you'll also need to set your PERL_PATH environment variable to
-#### the full path to perl.
+# RTEMS 4.6.6 and later with GNU g++.
CROSS-COMPILE = 1
@@ -27,35 +20,31 @@ ifeq (,$(PERL_PATH))
PERL_PATH = perl
endif # ! PERL_PATH
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+#include $(RTEMS_CUSTOM)
+#include $(PROJECT_ROOT)/make/leaf.cfg
+
+CXX = $(CC_FOR_TARGET)
+AR = $(AR_FOR_TARGET)
+LD = $(LD_FOR_TARGET)
+NM = $(NM_FOR_TARGET)
+AS = $(AS_FOR_TARGET)
# Test for template instantiation.
-#
include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
#### BEGIN target CPU-specific settings
-
# look them up
-CFLAGS = $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cflags)
+#CFLAGS = $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cflags)
#CCFLAGS = $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cflags) -fno-implicit-templates
-CCFLAGS = $(TEMPLATES_FLAG)
-
+#CCFLAGS = $(TEMPLATES_FLAG)
#### END target CPU-specific settings
-CXX := $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cxx)
-
-ifndef ACE_CC
-ACE_CC := $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cc)
-endif # ! ACE_CC
-ifndef ACE_CC_VERSION
- ACE_CC_VERSION := $(shell $(ACE_CC) --version)
-endif # ! ACE_CC_VERSION
+#CXX := $(shell make --no-print-directory -f $(ACE_ROOT)/include/makeinclude/Makefile.rtems print_cxx)
-#CFLAGS += -D_REENTRANT -ansi -fno-builtin -fno-defer-pop \
-# -fvolatile $(PIPE_OPT) -W -Wall
-#CCFLAGS += $(CFLAGS)
+CFLAGS += -D_REENTRANT -ansi -fno-builtin -fno-defer-pop -fvolatile $(PIPE_OPT) -W -Wall
+CCFLAGS += $(CFLAGS) $(CPPFLAGS) -I$(RTEMS_MAKEFILE_PATH)/lib/include
ifeq (,$(rtti))
- #### Don't use RTTI even with egcs, because Tornado 1.0.x libraries
- #### don't support it.
CCFLAGS += -fno-rtti -DACE_LACKS_RTTI
endif # rtti
DCFLAGS += -g
@@ -71,7 +60,6 @@ LDFLAGS += #-Wl,-X -Wl,-r
OCFLAGS += -O
PIC =
-
#### ld can't handle INCLDIRS, so override LINK definitions.
LINK.c = override
LINK.c.override = $(LD) $(LDFLAGS) $(LDLIBS) $(LIBS)