summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-02-18 18:31:12 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-02-18 18:31:12 +0000
commit1b189fd9ef5ec7466a8a2554284b812974cfe54f (patch)
tree8924631d83fec058bc66baa4261b190781550aab /netsvcs
parentd64b580eb38c1015906f40d276a08aa795e10cce (diff)
downloadATCD-1b189fd9ef5ec7466a8a2554284b812974cfe54f.tar.gz
ChangeLogTag:Sun Feb 18 09:59:18 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/clients/Tokens/collection/collection.cpp6
-rw-r--r--netsvcs/clients/Tokens/collection/rw_locks.cpp4
-rw-r--r--netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp6
-rw-r--r--netsvcs/clients/Tokens/invariant/invariant.cpp6
-rw-r--r--netsvcs/clients/Tokens/manual/manual.cpp5
-rw-r--r--netsvcs/clients/Tokens/mutex/test_mutex.cpp6
-rw-r--r--netsvcs/clients/Tokens/rw_lock/rw_locks.cpp6
-rw-r--r--netsvcs/lib/Token_Handler.cpp4
-rw-r--r--netsvcs/lib/Token_Handler.h3
-rw-r--r--netsvcs/servers/main.cpp2
-rw-r--r--netsvcs/servers/svc.conf3
11 files changed, 33 insertions, 18 deletions
diff --git a/netsvcs/clients/Tokens/collection/collection.cpp b/netsvcs/clients/Tokens/collection/collection.cpp
index 1e7ac2d8823..822240f6a9f 100644
--- a/netsvcs/clients/Tokens/collection/collection.cpp
+++ b/netsvcs/clients/Tokens/collection/collection.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// examples
@@ -29,7 +29,7 @@
ACE_RCSID(collection, collection, "$Id$")
-#if defined (ACE_HAS_THREADS)
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
static const char *server_host = ACE_DEFAULT_SERVER_HOST;
static int server_port = ACE_DEFAULT_SERVER_PORT;
@@ -208,4 +208,4 @@ main (int, char *[])
ACE_ERROR_RETURN ((LM_ERROR,
"threads not supported on this platform\n"), -1);
}
-#endif /* ACE_HAS_THREADS */
+#endif /* ACE_HAS_THREADS && ACE_HAS_TOKENS_LIBRARY */
diff --git a/netsvcs/clients/Tokens/collection/rw_locks.cpp b/netsvcs/clients/Tokens/collection/rw_locks.cpp
index dd35de3d9c2..e48f0e5db0d 100644
--- a/netsvcs/clients/Tokens/collection/rw_locks.cpp
+++ b/netsvcs/clients/Tokens/collection/rw_locks.cpp
@@ -6,9 +6,9 @@
#include "ace/Remote_Tokens.h"
#include "ace/Thread_Manager.h"
-ACE_RCSID(collection, rw_locks, "$Id$")
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
-#if defined (ACE_HAS_THREADS)
+ACE_RCSID(collection, rw_locks, "$Id$")
static ACE_Token_Proxy *global_rlock;
static ACE_Token_Proxy *global_wlock;
diff --git a/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp b/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
index 4a7b1bc5a39..9b4c12b77e1 100644
--- a/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
+++ b/netsvcs/clients/Tokens/deadlock/deadlock_detection_test.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// examples
@@ -23,9 +23,9 @@
#include "ace/Get_Opt.h"
#include "ace/Token_Invariants.h"
-ACE_RCSID(deadlock, deadlock_detection_test, "$Id$")
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
-#if defined (ACE_HAS_THREADS)
+ACE_RCSID(deadlock, deadlock_detection_test, "$Id$")
typedef ACE_Token_Invariant_Manager ACE_TOKEN_INVARIANTS;
diff --git a/netsvcs/clients/Tokens/invariant/invariant.cpp b/netsvcs/clients/Tokens/invariant/invariant.cpp
index b2b55df3605..f5c223c3568 100644
--- a/netsvcs/clients/Tokens/invariant/invariant.cpp
+++ b/netsvcs/clients/Tokens/invariant/invariant.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// examples
@@ -21,9 +21,9 @@
#include "ace/Thread_Manager.h"
#include "ace/Token_Invariants.h"
-ACE_RCSID(invariant, invariant, "$Id$")
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
-#if defined (ACE_HAS_THREADS)
+ACE_RCSID(invariant, invariant, "$Id$")
typedef ACE_Token_Invariant_Manager ACE_TOKEN_INVARIANTS;
diff --git a/netsvcs/clients/Tokens/manual/manual.cpp b/netsvcs/clients/Tokens/manual/manual.cpp
index c8435a9d461..3447b9306f7 100644
--- a/netsvcs/clients/Tokens/manual/manual.cpp
+++ b/netsvcs/clients/Tokens/manual/manual.cpp
@@ -1,4 +1,5 @@
// $Id$
+
// ============================================================================
//
// = LIBRARY
@@ -26,6 +27,8 @@
#include "ace/Map_Manager.h"
#include "ace/Service_Config.h"
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
+
ACE_RCSID(manual, manual, "$Id$")
typedef ACE_Token_Invariant_Manager ACE_TOKEN_INVARIANTS;
@@ -366,3 +369,5 @@ template class ACE_Map_Reverse_Iterator<STDIN_Token::TID, ACE_Token_Collection *
#pragma instantiate ACE_Map_Iterator<STDIN_Token::TID, ACE_Token_Collection *, ACE_Null_Mutex>
#pragma instantiate ACE_Map_Reverse_Iterator<STDIN_Token::TID, ACE_Token_Collection *, ACE_Null_Mutex>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+#endif /* ACE_HAS_THREADS && ACE_HAS_TOKENS_LIBRARY */
diff --git a/netsvcs/clients/Tokens/mutex/test_mutex.cpp b/netsvcs/clients/Tokens/mutex/test_mutex.cpp
index a6a29a9bed3..b15243dffba 100644
--- a/netsvcs/clients/Tokens/mutex/test_mutex.cpp
+++ b/netsvcs/clients/Tokens/mutex/test_mutex.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// examples
@@ -22,9 +22,9 @@
#include "ace/Thread.h"
#include "ace/Thread_Manager.h"
-ACE_RCSID(mutex, test_mutex, "$Id$")
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
-#if defined (ACE_HAS_THREADS)
+ACE_RCSID(mutex, test_mutex, "$Id$")
static ACE_Token_Proxy *mutex;
static int remote_mutexes = 0;
diff --git a/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp b/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
index 37e9d0e3886..f9d8da9eb9c 100644
--- a/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
+++ b/netsvcs/clients/Tokens/rw_lock/rw_locks.cpp
@@ -1,6 +1,6 @@
-// ============================================================================
// $Id$
+// ============================================================================
//
// = LIBRARY
// examples
@@ -24,9 +24,9 @@
#include "ace/Thread_Manager.h"
#include "ace/Token_Invariants.h"
-ACE_RCSID(rw_lock, rw_locks, "$Id$")
+#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREADS_LIBRARY)
-#if defined (ACE_HAS_THREADS)
+ACE_RCSID(rw_lock, rw_locks, "$Id$")
typedef ACE_Token_Invariant_Manager ACE_TOKEN_INVARIANTS;
diff --git a/netsvcs/lib/Token_Handler.cpp b/netsvcs/lib/Token_Handler.cpp
index c61e2825402..d15eda54610 100644
--- a/netsvcs/lib/Token_Handler.cpp
+++ b/netsvcs/lib/Token_Handler.cpp
@@ -5,6 +5,8 @@
#include "ace/Get_Opt.h"
#include "Token_Handler.h"
+#if defined (ACE_HAS_TOKENS_LIBRARY)
+
ACE_RCSID(lib, Token_Handler, "$Id$")
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
@@ -654,3 +656,5 @@ ACE_TS_WLock::clone (void) const
ACE_NEW_RETURN (temp, ACE_TS_WLock (*this), 0);
return temp;
}
+
+#endif /* ACE_HAS_TOKENS_LIBRARY */
diff --git a/netsvcs/lib/Token_Handler.h b/netsvcs/lib/Token_Handler.h
index 9a6234c4325..057336d79f7 100644
--- a/netsvcs/lib/Token_Handler.h
+++ b/netsvcs/lib/Token_Handler.h
@@ -29,6 +29,8 @@
#include "ace/Token_Collection.h"
#include "ace/Token_Request_Reply.h"
+#if defined (ACE_HAS_TOKENS_LIBRARY)
+
class ACE_Svc_Export ACE_Token_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
{
// = TITLE
@@ -257,4 +259,5 @@ private:
ACE_SVC_FACTORY_DECLARE (ACE_Token_Acceptor)
+#endif /* ACE_HAS_TOKENS_LIBRARY */
#endif /* ACE_TOKEN_HANDLER_H */
diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp
index d797058b55d..6c7503c88ba 100644
--- a/netsvcs/servers/main.cpp
+++ b/netsvcs/servers/main.cpp
@@ -82,6 +82,7 @@ main (int argc, char *argv[])
"TS Clerk Processor",
1));
+#if defined (ACE_HAS_TOKENS_LIBRARY)
char token_port[] = "-p " ACE_DEFAULT_TOKEN_SERVER_PORT_STR;
l_argv[0] = token_port;
l_argv[1] = 0;
@@ -92,6 +93,7 @@ main (int argc, char *argv[])
"%p\n%a",
"Token Service",
1));
+#endif /* ACE_HAS_TOKENS_LIBRARY */
char thr_logging_port[] = "-p " ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
l_argv[0] = thr_logging_port;
diff --git a/netsvcs/servers/svc.conf b/netsvcs/servers/svc.conf
index 4c1bf74fe18..6b18ec3921a 100644
--- a/netsvcs/servers/svc.conf
+++ b/netsvcs/servers/svc.conf
@@ -11,7 +11,8 @@
dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s foobar -f STDERR|OSTREAM|VERBOSE"
dynamic Time_Service Service_Object * netsvcs:_make_ACE_TS_Server_Acceptor() "-p 20222"
dynamic Name_Server Service_Object * netsvcs:_make_ACE_Name_Acceptor() "-p 20012"
-dynamic Token_Service Service_Object * netsvcs:_make_ACE_Token_Acceptor() "-p 20202"
+# This service is disabled by default -- only enable it ACE is compiled with ACE_HAS_TOKENS_LIBRARY.
+# dynamic Token_Service Service_Object * netsvcs:_make_ACE_Token_Acceptor() "-p 20202"
dynamic Server_Logging_Service Service_Object * netsvcs:_make_ACE_Server_Logging_Acceptor() active "-p 20009"
dynamic Thr_Server_Logging_Service Service_Object * netsvcs:_make_ACE_Thr_Server_Logging_Acceptor() active "-p 20020"
dynamic Client_Logging_Service Service_Object * netsvcs:_make_ACE_Client_Logging_Acceptor() active "-p 20009"