diff options
author | Chris Cleeland <chris.cleeland@gmail.com> | 1997-08-13 02:33:18 +0000 |
---|---|---|
committer | Chris Cleeland <chris.cleeland@gmail.com> | 1997-08-13 02:33:18 +0000 |
commit | eacebd71b62e764c03083f7ef4bfc4793f120549 (patch) | |
tree | 0cf2dfa1d7c9fcc361527db7558561a5601fd2b1 /TAO | |
parent | d32aa2b45a6c1589792f75dae17fa44d3f58129e (diff) | |
download | ATCD-eacebd71b62e764c03083f7ef4bfc4793f120549.tar.gz |
TAO now compiles again on Linux/g++ after Andy's CORBA:: changes and
my service config work.
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-98c | 34 | ||||
-rw-r--r-- | TAO/tao/any.h | 3 | ||||
-rw-r--r-- | TAO/tao/any.i | 12 | ||||
-rw-r--r-- | TAO/tao/boa.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/client_factory.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/client_factory.i | 2 | ||||
-rw-r--r-- | TAO/tao/corbacom.h | 4 | ||||
-rw-r--r-- | TAO/tao/debug.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/decode.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/deep_copy.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/default_client.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/orbobj.cpp | 26 | ||||
-rw-r--r-- | TAO/tao/server_factory.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/typecode.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/typecode.h | 3 |
15 files changed, 107 insertions, 24 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 4bbec26a6e2..db136abd641 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,37 @@ +Tue Aug 12 16:23:17 1997 Chris Cleeland <cleeland@cs.wustl.edu> + + * tao/any.i: Added a missing replace() method used by overloaded + operators. + + * tao/{any,cdr}.h: Added conditional ACE_INLINE before the decl + for a few methods whose usage in other inlined methods appears + prior to their definition. + + * tao/default_client.cpp: Eliminated names of unused arguments to + stop the compiler from complaining. + + * tao/server_factory.cpp: Properly scoped return type names for + several methods. + + * tao/{typecode,decode,deep_copy,debug}.cpp: Bracketed unused + variables with #if defined(TAO_NEEDS_UNUSED_VARIABLES)/#endif; + this leaves them around for right now in case they're important. + + * tao/client_factory.i (connector): Properly scoped return type's + name. + + * tao/{client_factory,default_client}.cpp: Added necessary + template instantiations. + + * tao/{typecode,cdr}.h: Added conditional ACE_INLINE in front of + inlined methods to appease the compiler gods. + + * tao/boa.cpp (dispatch): Declared argument unused to get rid of + warnings. + + * tao/corbacom.h: Moved #include of sequence.h before the decl for + class CORBA. + Sun Aug 10 10:58:21 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * tao/client_factory: Moved the template specializations from the diff --git a/TAO/tao/any.h b/TAO/tao/any.h index e987f25cd5e..817ebb6c761 100644 --- a/TAO/tao/any.h +++ b/TAO/tao/any.h @@ -246,6 +246,9 @@ private: ACE_SYNCH_MUTEX lock_; // Serialize access to the reference count. +#if defined(__ACE_INLINE__) + ACE_INLINE +#endif /* __ACE_INLINE__ */ void replace (CORBA::TypeCode_ptr type, const void *value, CORBA::Boolean orb_owns_data); diff --git a/TAO/tao/any.i b/TAO/tao/any.i index f326a2c0a20..e2232bf0fc4 100644 --- a/TAO/tao/any.i +++ b/TAO/tao/any.i @@ -120,6 +120,18 @@ CORBA_Any::to_string::to_string (char *&s, CORBA::ULong b) // insertion from special types +// @@ Andy, please take a look at this method and make sure it's what +// you intended. I couldn't find it defined anywhere. --cjc +ACE_INLINE void +CORBA_Any::replace (CORBA::TypeCode_ptr type, + const void *value, + CORBA::Boolean orb_owns_data) +{ + CORBA_Environment e; + this->replace(type, value, orb_owns_data, e); +} + + ACE_INLINE void CORBA_Any::operator<<= (from_boolean b) { diff --git a/TAO/tao/boa.cpp b/TAO/tao/boa.cpp index f807fa76cad..6354ad381f0 100644 --- a/TAO/tao/boa.cpp +++ b/TAO/tao/boa.cpp @@ -133,15 +133,14 @@ void CORBA_BOA::dispatch (CORBA::OctetSeq &key, void *context, CORBA::Environment &env) { + ACE_UNUSED_ARG(context); + TAO_Skeleton skel; // pointer to function pointer for the operation CORBA::Object_ptr obj; // object that will be looked up based on the key CORBA::String opname; // Get the skeleton - // @@ Please add more comments here. This is a very important part - // of the code. - // Find the object based on the key if (this->find (key, obj) != -1) { diff --git a/TAO/tao/client_factory.cpp b/TAO/tao/client_factory.cpp index 8221dd16f17..64bdf4caffe 100644 --- a/TAO/tao/client_factory.cpp +++ b/TAO/tao/client_factory.cpp @@ -47,12 +47,25 @@ TAO_Client_Connection_Handler::open (void *) return 0; } +#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_Client_Connection_Handler> #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler>; template class ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; template class ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>; +template class ACE_Concurrency_Strategy<TAO_Client_Connection_Handler>; +template class ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; +template class TAO_SVC_TUPLE; +template class ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>; +template class ACE_Map_Entry<int, TAO_SVC_TUPLE*>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler> #pragma instantiate ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> #pragma instantiate ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler> +#pragma instantiate ACE_Concurrency_Strategy<TAO_Client_Connection_Handler> +#pragma instantiate ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> +#pragma instantiate TAO_SVC_TUPLE +#pragma instantiate ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Map_Entry<int, TAO_SVC_TUPLE*> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/client_factory.i b/TAO/tao/client_factory.i index 0144fa21ace..d6809f0fcee 100644 --- a/TAO/tao/client_factory.i +++ b/TAO/tao/client_factory.i @@ -15,7 +15,7 @@ TAO_Client_Connection_Handler::in_use (CORBA::Boolean flag) in_use_ = flag; } -ACE_INLINE CONNECTOR * +ACE_INLINE TAO_Client_Strategy_Factory::CONNECTOR * TAO_Client_Strategy_Factory::connector (void) { return 0; diff --git a/TAO/tao/corbacom.h b/TAO/tao/corbacom.h index e0eef773458..ec1c06a20b5 100644 --- a/TAO/tao/corbacom.h +++ b/TAO/tao/corbacom.h @@ -133,8 +133,12 @@ class CDR; // enum values defined in nvlist.hh, bitwise ORed. typedef u_int CORBA_Flags; +#if !defined(TAO_NEEDS_FULL_SEQUENCE_TEMPLATE) +# include "tao/sequence.h" +#else template <class T> struct CORBA_SEQUENCE; +#endif class ACE_Svc_Export CORBA { diff --git a/TAO/tao/debug.cpp b/TAO/tao/debug.cpp index 29b4083f6ed..503cd8c6351 100644 --- a/TAO/tao/debug.cpp +++ b/TAO/tao/debug.cpp @@ -25,7 +25,9 @@ u_int ACE_Svc_Export TAO_debug_level = 0; char * ACE_Svc_Export TAO_debug_filter = "l"; +#if defined(TAO_NEEDS_UNUSED_VARIABLES) static FILE *debug_stream = stderr; +#endif /* TAO_NEEDS_UNUSED_VARIABLES */ // The rest of this file is not needed without -DDEBUG, and unless the // vfprintf () call is available it can't work. diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index f19631e118c..7442ad1d3e7 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -430,7 +430,9 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr, case CORBA::tk_except: { CORBA::ULong length; +#if defined(TAO_NEEDS_UNUSED_VARIABLES) CORBA::Octet *buffer; +#endif continue_decoding = stream->get_ulong (length); if (!continue_decoding) diff --git a/TAO/tao/deep_copy.cpp b/TAO/tao/deep_copy.cpp index 9da7dc8b34b..fd3fdf397d4 100644 --- a/TAO/tao/deep_copy.cpp +++ b/TAO/tao/deep_copy.cpp @@ -295,7 +295,9 @@ TAO_Marshal_Struct::deep_copy (CORBA::TypeCode_ptr tc, if (env.exception () == 0) { // get the alignment of the field +#if defined(TAO_NEEDS_UNUSED_VARIABLES) CORBA::Long alignment = param->alignment (env); +#endif if (env.exception () == 0) { switch (param->_kind) diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index f2330d7fee3..2c00846508b 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -59,16 +59,27 @@ TAO_Default_Client_Strategy_Factory::connector (void) } int -TAO_Default_Client_Strategy_Factory::parse_args (int argc, char *argv[]) +TAO_Default_Client_Strategy_Factory::parse_args (int /* argc */, char **/*argv*/) { // no args to parse at this time return 0; } +#define TAO_HASH_ADDR ACE_Hash_Addr<ACE_INET_Addr, TAO_Client_Connection_Handler> #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>; +template class ACE_Creation_Strategy<TAO_Client_Connection_Handler>; +template class ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; +//template class TAO_HASH_ADDR; +template class ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>; +template class ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Creation_Strategy<TAO_Client_Connection_Handler> +#pragma instantiate ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> +//#pragma instantiate TAO_HASH_ADDR +#pragma instantiate ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ ACE_SVC_FACTORY_DEFINE (TAO_Default_Client_Strategy_Factory) diff --git a/TAO/tao/orbobj.cpp b/TAO/tao/orbobj.cpp index c2047a143cb..36d240075c8 100644 --- a/TAO/tao/orbobj.cpp +++ b/TAO/tao/orbobj.cpp @@ -127,7 +127,7 @@ CORBA_ORB::Release (void) // Little convenience function use in parsing arguments inline static void -argvec_shift (int& argc, char *argv[], int numslots) +argvec_shift (int& argc, char *const *argv, int numslots) { ACE_OS::memmove (&argv[0], &argv[numslots], @@ -181,12 +181,10 @@ CORBA::ORB_init (int &argc, // arguments in the vector? // Prepare a copy of the argument vector - // char *svc_config_argv[]; // @@ Should this be a data member? // XXXASG - compiler doesn't like this char **svc_config_argv; // @@ Should this be a data member? // Probably, but there's no object in which to scope it. int svc_config_argc = 0; -#if 0 // XXASG : Code is broken. ACE_NEW returns, arg type conflict in argvec_shift ACE_NEW_RETURN (svc_config_argv, char *[argc + 1], 0); // Be certain to copy the program name. @@ -205,23 +203,23 @@ CORBA::ORB_init (int &argc, // @@ Should we dup the string before assigning? svc_config_argv[svc_config_argc++] = argv[i + 1]; - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OAdaemon") == 0) { // Be a daemon svc_config_argv[svc_config_argc++] = "-b"; - argvec_shift (argc, argv[i], 1); + argvec_shift (argc, &argv[i], 1); } else if (ACE_OS::strcmp (argv[i], "-d") == 0) { // Turn on debugging svc_config_argv[svc_config_argc++] = "-d"; - argvec_shift (argc, argv[i], 1); + argvec_shift (argc, &argv[i], 1); } } -#endif /* 0 */ + #if defined (DEBUG) // Make it a little easier to debug programs using this code. { @@ -338,7 +336,6 @@ CORBA_ORB::BOA_init (int &argc, ACE_INET_Addr rendezvous; CORBA::Environment env; -#if 0 /* XXXASG- code is broken. argvec_shift arg2 in conflict */ for (int i = 0; i < argc; ) { // @@ Can you please add comments describing each of these options? --doug @@ -350,7 +347,7 @@ CORBA_ORB::BOA_init (int &argc, if (i + 1 < argc) id = CORBA::string_dup (argv[i + 1]); - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OAhost") == 0) { @@ -359,7 +356,7 @@ CORBA_ORB::BOA_init (int &argc, if (i + 1 < argc) host = CORBA::string_dup (argv[i + 1]); - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OAport") == 0) { @@ -368,7 +365,7 @@ CORBA_ORB::BOA_init (int &argc, // @@ We shouldn't limit this to being specified as an int! --cjc port = ACE_OS::atoi (argv[i + 1]); - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OAobjdemux") == 0) { @@ -377,7 +374,7 @@ CORBA_ORB::BOA_init (int &argc, if (i + 1 < argc) demux = CORBA::string_dup (argv[i+1]); - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OAtablesize") == 0) { @@ -385,7 +382,7 @@ CORBA_ORB::BOA_init (int &argc, if (i + 1 < argc) tablesize = ACE_OS::atoi (argv[i+1]); - argvec_shift (argc, argv[i], 2); + argvec_shift (argc, &argv[i], 2); } else if (ACE_OS::strcmp (argv[i], "-OArcvsock") == 0) { @@ -399,12 +396,11 @@ CORBA_ORB::BOA_init (int &argc, { // Specify whether or not threads should be used. use_threads = CORBA::B_TRUE; - argvec_shift (argc, argv[i], 1); + argvec_shift (argc, &argv[i], 1); } else i++; } -#endif /* 0 */ // create a INET_Addr if (ACE_OS::strlen (host) > 0) diff --git a/TAO/tao/server_factory.cpp b/TAO/tao/server_factory.cpp index 748081faf1d..19d8c7d5063 100644 --- a/TAO/tao/server_factory.cpp +++ b/TAO/tao/server_factory.cpp @@ -27,25 +27,25 @@ TAO_Server_Strategy_Factory::TAO_Server_Strategy_Factory (void) TAO_Server_Strategy_Factory::~TAO_Server_Strategy_Factory(void) {} -CREATION_STRATEGY * +TAO_Server_Strategy_Factory::CREATION_STRATEGY * TAO_Server_Strategy_Factory::creation_strategy (void) { return 0; } -ACCEPT_STRATEGY * +TAO_Server_Strategy_Factory::ACCEPT_STRATEGY * TAO_Server_Strategy_Factory::accept_strategy (void) { return 0; } -CONCURRENCY_STRATEGY * +TAO_Server_Strategy_Factory::CONCURRENCY_STRATEGY * TAO_Server_Strategy_Factory::concurrency_strategy (void) { return 0; } -SCHEDULING_STRATEGY * +TAO_Server_Strategy_Factory::SCHEDULING_STRATEGY * TAO_Server_Strategy_Factory::scheduling_strategy (void) { return 0; diff --git a/TAO/tao/typecode.cpp b/TAO/tao/typecode.cpp index b49ef173cff..f9e9cd635cb 100644 --- a/TAO/tao/typecode.cpp +++ b/TAO/tao/typecode.cpp @@ -881,7 +881,9 @@ CORBA::Long CORBA_TypeCode::private_length (CORBA::Environment &env) const { CDR stream; +#if defined(TAO_NEEDS_UNUSED_VARIABLES) CORBA::TypeCode_ptr tc = 0; +#endif /* TAO_NEEDS_UNUSED_VARIABLES */ stream.setup_encapsulation (_buffer, (size_t)_length); switch (_kind) diff --git a/TAO/tao/typecode.h b/TAO/tao/typecode.h index 00600ce6fc7..c65adab5c94 100644 --- a/TAO/tao/typecode.h +++ b/TAO/tao/typecode.h @@ -81,6 +81,9 @@ public: static CORBA::TypeCode_ptr _nil (void); // returns a NULL typecode +#if defined(__ACE_INLINE__) + ACE_INLINE +#endif CORBA::Boolean equal (const CORBA::TypeCode_ptr, CORBA::Environment &env) const; // compares two typecodes |