summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2004-08-27 17:40:28 +0000
committerSteve Huston <shuston@riverace.com>2004-08-27 17:40:28 +0000
commit61eace73a60808c43cb914ebb71e392b9a9c76ab (patch)
tree3892c5798cac4b63e0e33f7113787704887a87da /netsvcs
parente8361fb4a9f83aac29ff081df3c86d0b3530d574 (diff)
downloadATCD-61eace73a60808c43cb914ebb71e392b9a9c76ab.tar.gz
ChangeLogTag:Fri Aug 27 13:38:25 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/Makefile.am20
-rw-r--r--netsvcs/clients/Logger/Makefile.am53
-rw-r--r--netsvcs/clients/Makefile.am18
-rw-r--r--netsvcs/clients/Naming/Client/Client_Test.cpp6
-rw-r--r--netsvcs/clients/Naming/Client/Makefile.am53
-rw-r--r--netsvcs/clients/Naming/Client/main.cpp24
-rw-r--r--netsvcs/clients/Naming/Dump_Restore/Dump_Restore.cpp106
-rw-r--r--netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h6
-rw-r--r--netsvcs/clients/Naming/Dump_Restore/Makefile.am57
-rw-r--r--netsvcs/clients/Naming/Dump_Restore/main.cpp6
-rw-r--r--netsvcs/clients/Naming/Makefile.am21
-rw-r--r--netsvcs/servers/Makefile.am36
-rw-r--r--netsvcs/servers/main.cpp91
13 files changed, 286 insertions, 211 deletions
diff --git a/netsvcs/Makefile.am b/netsvcs/Makefile.am
index 5bebeb4ea44..f3d559265e8 100644
--- a/netsvcs/Makefile.am
+++ b/netsvcs/Makefile.am
@@ -1,17 +1,15 @@
-##---------------------------------------------------------------------------
-## $Id$
-##
-## Makefile for the ACE network services
+## Process this file with automake to create Makefile.in
##
-##---------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
SUBDIRS = \
- lib \
- clients \
- servers
+ lib \
+ clients \
+ servers
-EXTRA_DIST = ACE-netsvcs.html
diff --git a/netsvcs/clients/Logger/Makefile.am b/netsvcs/clients/Logger/Makefile.am
index 70449c5e220..df6b705ea3f 100644
--- a/netsvcs/clients/Logger/Makefile.am
+++ b/netsvcs/clients/Logger/Makefile.am
@@ -1,24 +1,45 @@
-##----------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile for client logging applications
-##----------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
+
+ACE_BUILDDIR = $(top_builddir)
+
+## Makefile.direct_logging.am
+noinst_PROGRAMS = direct_logging
+
+direct_logging_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR)
+
+direct_logging_SOURCES = \
+ direct_logging.cpp
+
+direct_logging_LDADD = \
+ $(top_builddir)/ace/libnetsvcs.la $(top_builddir)/ace/libACE.la
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
+## Makefile.indirect_logging.am
+noinst_PROGRAMS += indirect_logging
-## LDFLAGS =
-## Libtool will automatically link against the "proper" library.
-## Do not change the "libACE.la." It is not a typographical error!
-LDADD = $(top_builddir)/ace/libACE.la
+indirect_logging_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR)
-noinst_PROGRAMS = \
- direct_logging \
- indirect_logging
+indirect_logging_SOURCES = \
+ indirect_logging.cpp
-direct_logging_SOURCES = direct_logging.cpp
+indirect_logging_LDADD = \
+ $(top_builddir)/ace/libnetsvcs.la $(top_builddir)/ace/libACE.la
-indirect_logging_SOURCES = indirect_logging.cpp
+## Clean up template repositories, etc.
+clean-local:
+ -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
+ -rm -f gcctemp.c gcctemp so_locations
+ -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/netsvcs/clients/Makefile.am b/netsvcs/clients/Makefile.am
index 6edac17be3d..595f146924e 100644
--- a/netsvcs/clients/Makefile.am
+++ b/netsvcs/clients/Makefile.am
@@ -1,14 +1,14 @@
-##----------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile for the client programs that test the ACE network services
-##----------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
SUBDIRS = \
- Logger \
- Naming \
- Tokens
+ Logger \
+ Naming
+
diff --git a/netsvcs/clients/Naming/Client/Client_Test.cpp b/netsvcs/clients/Naming/Client/Client_Test.cpp
index ce3e2942219..0f87432d246 100644
--- a/netsvcs/clients/Naming/Client/Client_Test.cpp
+++ b/netsvcs/clients/Naming/Client/Client_Test.cpp
@@ -381,7 +381,7 @@ Client_Test::set_proc_local (void)
{
// Close down original name space
NAMING_CONTEXT ()->close ();
- this->name_options_->nameserver_host ("localhost");
+ this->name_options_->nameserver_host (ACE_TEXT ("localhost"));
this->name_options_->context (ACE_Naming_Context::PROC_LOCAL);
return NAMING_CONTEXT ()->open (ACE_Naming_Context::PROC_LOCAL);
}
@@ -391,7 +391,7 @@ Client_Test::set_node_local (void)
{
// Close down original name space
NAMING_CONTEXT ()->close ();
- this->name_options_->nameserver_host ("localhost");
+ this->name_options_->nameserver_host (ACE_TEXT ("localhost"));
this->name_options_->context (ACE_Naming_Context::NODE_LOCAL);
return NAMING_CONTEXT ()->open (ACE_Naming_Context::NODE_LOCAL);
}
@@ -404,7 +404,7 @@ Client_Test::set_host (const char *hostname, int port)
this->name_options_->context (ACE_Naming_Context::NET_LOCAL);
// Set Name Options
- this->name_options_->nameserver_host (hostname);
+ this->name_options_->nameserver_host (ACE_TEXT_CHAR_TO_TCHAR (hostname));
this->name_options_->nameserver_port (port);
return NAMING_CONTEXT ()->open (ACE_Naming_Context::NET_LOCAL);
diff --git a/netsvcs/clients/Naming/Client/Makefile.am b/netsvcs/clients/Naming/Client/Makefile.am
index 95879536177..443804114a1 100644
--- a/netsvcs/clients/Naming/Client/Makefile.am
+++ b/netsvcs/clients/Naming/Client/Makefile.am
@@ -1,31 +1,50 @@
-##----------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile for the client programs that test the ACE network services
-##----------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
+
+ACE_BUILDDIR = $(top_builddir)
+
+## Makefile.Netsvsc_Client_Test_Lib.am
+noinst_LTLIBRARIES = libClient_Test.la
+
+libClient_Test_la_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR) \
+ -DACE_CLIENT_TEST_BUILD_DLL
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
+libClient_Test_la_SOURCES = \
+ Client_Test.cpp
-noinst_LIBRARIES = libClient_Test.a
+libClient_Test_la_LIBADD = \
+ $(top_builddir)/ace/libACE.la
-libClient_Test_a_SOURCES = Client_Test.cpp Client_Test.h
+noinst_HEADERS = \
+ Client_Test.h
-noinst_PROGRAMS = \
- main
+## Makefile.Netsvcs_Client_Test.am
+noinst_PROGRAMS = main
-main_SOURCES = main.cpp
-main_LDADD = libClient_Test.a \
- $(top_builddir)/ace/libACE.la
+main_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR)
-noinst_DATA = svc.conf svc2.conf
+main_SOURCES = \
+ main.cpp \
+ Client_Test.h
-EXTRA_DIST = $(noinst_DATA)
+main_LDADD = \
+ $(top_builddir)/ace/libClient_Test.la $(top_builddir)/ace/libACE.la
## Clean up template repositories, etc.
clean-local:
-rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
- -rm -rf ptrepository Templates.DB gcctemp.c gcctemp so_locations
+ -rm -f gcctemp.c gcctemp so_locations
+ -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/netsvcs/clients/Naming/Client/main.cpp b/netsvcs/clients/Naming/Client/main.cpp
index 75456ba8cad..25a87893d27 100644
--- a/netsvcs/clients/Naming/Client/main.cpp
+++ b/netsvcs/clients/Naming/Client/main.cpp
@@ -12,7 +12,7 @@
ACE_RCSID(Client, main, "$Id$")
int
-main (int, char *argv[])
+ACE_TMAIN (int, ACE_TCHAR *argv[])
{
ACE_Service_Config daemon;
ACE_ARGV new_args;
@@ -20,13 +20,13 @@ main (int, char *argv[])
// Load the existing <argv> into our new one.
new_args.add (argv);
// Enable loading of static services.
- new_args.add ("-y");
+ new_args.add (ACE_TEXT ("-y"));
// Enable debugging within dynamically linked services.
- new_args.add ("-d");
+ new_args.add (ACE_TEXT ("-d"));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("argc = %d\n"),
- ACE_TEXT (new_args.argc ())));
+ new_args.argc ()));
// Print the contents of the combined <ACE_ARGV>.
for (int i = 0; i < new_args.argc (); i++)
@@ -39,25 +39,23 @@ main (int, char *argv[])
new_args.argv ()) == -1)
{
if (errno != ENOENT)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "open",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open")),
+ 1);
else // Use static binding.
{
ACE_ARGV args;
args.add (argv[0]);
- args.add ("-p10011"); // Port number.
+ args.add (ACE_TEXT ("-p10011")); // Port number.
ACE_Service_Object *so =
ACE_SVC_INVOKE (ACE_Naming_Context);
if (so->init (args.argc (),
args.argv ()) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "ACE_Naming_Context",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Naming_Context")),
+ 1);
so = ACE_SVC_INVOKE (Client_Test);
diff --git a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.cpp b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.cpp
index f9a765d605e..bfda59cd09f 100644
--- a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.cpp
+++ b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.cpp
@@ -16,7 +16,7 @@
ACE_RCSID(Dump_Restore, Dump_Restore, "$Id$")
-Dump_Restore::Dump_Restore (int argc, char *argv[])
+Dump_Restore::Dump_Restore (int argc, ACE_TCHAR *argv[])
: infile_ (0)
{
ACE_NEW (this->ns_context_,
@@ -28,12 +28,12 @@ Dump_Restore::Dump_Restore (int argc, char *argv[])
//determine name context
if (ACE_OS::strcmp (this->name_options_->nameserver_host (),
- "localhost") == 0)
+ ACE_TEXT ("localhost")) == 0)
{
if (ns_context_->open (ACE_Naming_Context::PROC_LOCAL) == -1)
ACE_ERROR ((LM_ERROR,
- "%p\n",
- "ns_context_->open"));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->open")));
}
else
{
@@ -46,8 +46,8 @@ Dump_Restore::Dump_Restore (int argc, char *argv[])
if (this->ns_context_->open (ACE_Naming_Context::NET_LOCAL) == -1)
ACE_ERROR ((LM_ERROR,
- "%p\n",
- "ns_context_->open"));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->open")));
}
this->display_menu ();
@@ -56,8 +56,8 @@ Dump_Restore::Dump_Restore (int argc, char *argv[])
ACE_Reactor::instance (),
ACE_Thread_Manager::instance ()) == -1)
ACE_ERROR ((LM_ERROR,
- "%p\n",
- "register_stdin_handler"));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register_stdin_handler")));
}
Dump_Restore::~Dump_Restore (void)
@@ -80,7 +80,7 @@ Dump_Restore::handle_input (ACE_HANDLE)
if (::scanf ("%s", option) <= 0)
{
ACE_DEBUG ((LM_ERROR,
- "try again\n"));
+ ACE_TEXT ("try again\n")));
return 0;
}
@@ -98,7 +98,7 @@ Dump_Restore::handle_input (ACE_HANDLE)
case 'h' :
if (::scanf ("%s %hu", buf1, &port) <= 0)
break;
- set_host (buf1, port);
+ set_host (ACE_TEXT_CHAR_TO_TCHAR (buf1), port);
break;
case 'F':
case 'f':
@@ -131,7 +131,7 @@ Dump_Restore::handle_input (ACE_HANDLE)
quit ();
break;
default :
- ACE_DEBUG ((LM_DEBUG, "Unrecognized command.\n"));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Unrecognized command.\n")));
}
display_menu ();
@@ -142,59 +142,59 @@ void
Dump_Restore::display_menu (void)
{
ACE_DEBUG ((LM_DEBUG,
- "\n"));
+ ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG,
- "Name Service Main Menu\n"));
+ ACE_TEXT ("Name Service Main Menu\n")));
ACE_DEBUG ((LM_DEBUG,
- "----------------------\n"));
+ ACE_TEXT ("----------------------\n")));
// Check if using local name space or remote name space
if (ACE_OS::strcmp (this->name_options_->nameserver_host (),
- "localhost") == 0)
+ ACE_TEXT ("localhost")) == 0)
{
if (this->ns_scope_ == ACE_Naming_Context::PROC_LOCAL)
ACE_DEBUG ((LM_DEBUG,
- " *** Using Process Local Database ***\n\n"));
+ ACE_TEXT (" *** Using Process Local Database ***\n\n")));
else
ACE_DEBUG ((LM_DEBUG,
- " *** Using Node Local Database ***\n\n"));
+ ACE_TEXT (" *** Using Node Local Database ***\n\n")));
}
else
{
ACE_DEBUG ((LM_DEBUG,
- " Hostname: %s\n",
+ ACE_TEXT (" Hostname: %s\n"),
this->hostname_));
ACE_DEBUG ((LM_DEBUG,
- " Port Number: %d\n",
+ ACE_TEXT (" Port Number: %d\n"),
this->port_));
}
if (this->infile_)
ACE_DEBUG ((LM_DEBUG,
- "Input File: %s\n",
+ ACE_TEXT ("Input File: %C\n"),
this->filename_));
else
ACE_DEBUG ((LM_DEBUG,
- "** No Input File Specified **\n"));
+ ACE_TEXT ("** No Input File Specified **\n")));
ACE_DEBUG ((LM_DEBUG,
- "<P> Use Process Local Database\n"));
+ ACE_TEXT ("<P> Use Process Local Database\n")));
ACE_DEBUG ((LM_DEBUG,
- "<N> Use Node Local Database\n"));
+ ACE_TEXT ("<N> Use Node Local Database\n")));
ACE_DEBUG ((LM_DEBUG,
- "<H> Set Remote Name server <host> and <port>\n"));
+ ACE_TEXT ("<H> Set Remote Name server <host> and <port>\n")));
ACE_DEBUG ((LM_DEBUG,
- "<F> Set Input File <file name>\n"));
+ ACE_TEXT ("<F> Set Input File <file name>\n")));
ACE_DEBUG ((LM_DEBUG,
- "<B> Bind\n"));
+ ACE_TEXT ("<B> Bind\n")));
ACE_DEBUG ((LM_DEBUG,
- "<U> Unbind\n"));
+ ACE_TEXT ("<U> Unbind\n")));
ACE_DEBUG ((LM_DEBUG,
- "<R> Rebind\n"));
+ ACE_TEXT ("<R> Rebind\n")));
ACE_DEBUG ((LM_DEBUG,
- "<D> Dump <file name>\n"));
+ ACE_TEXT ("<D> Dump <file name>\n")));
ACE_DEBUG ((LM_DEBUG,
- "<Q> or ^C (exit) \n"));
+ ACE_TEXT ("<Q> or ^C (exit) \n")));
}
@@ -202,7 +202,7 @@ int
Dump_Restore::set_proc_local (void)
{
// Set Name Options
- this->name_options_->nameserver_host ("localhost");
+ this->name_options_->nameserver_host (ACE_TEXT ("localhost"));
this->name_options_->nameserver_port (0);
// Set Naming Context scope
@@ -219,8 +219,8 @@ Dump_Restore::set_proc_local (void)
if (this->ns_context_->open (ACE_Naming_Context::PROC_LOCAL) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->open"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->open")),
-1);
return 0;
@@ -230,7 +230,7 @@ int
Dump_Restore::set_node_local (void)
{
// Set Name Options
- this->name_options_->nameserver_host ("localhost");
+ this->name_options_->nameserver_host (ACE_TEXT ("localhost"));
this->name_options_->nameserver_port (0);
// Set Naming Context scope
@@ -246,14 +246,14 @@ Dump_Restore::set_node_local (void)
if (ns_context_->open (ACE_Naming_Context::NODE_LOCAL) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->open"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->open")),
-1);
return 0;
}
int
-Dump_Restore::set_host (const char *hostname,
+Dump_Restore::set_host (const ACE_TCHAR *hostname,
int port)
{
// Set Name Options
@@ -262,11 +262,9 @@ Dump_Restore::set_host (const char *hostname,
// Don't really need to do this but it's a hack to fix the problme
// of Display () not printing the right hostname
- ACE_OS::strcpy (this->hostname_,
- hostname);
+ ACE_OS::strcpy (this->hostname_, hostname);
this->port_ = port;
- this->ns_scope_ =
- ACE_Naming_Context::NET_LOCAL;
+ this->ns_scope_ = ACE_Naming_Context::NET_LOCAL;
// remove old naming context
delete this->ns_context_;
@@ -279,8 +277,8 @@ Dump_Restore::set_host (const char *hostname,
// assume net_local context
if (ns_context_->open (ACE_Naming_Context::NET_LOCAL) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->open"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->open")),
-1);
return 0;
}
@@ -382,8 +380,8 @@ Dump_Restore::populate (Dump_Restore::Operation_Type op)
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "populate"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("populate")),
-1);
/* NOTREACHED */
}
@@ -405,15 +403,15 @@ Dump_Restore::bind (const char *key,
type);
if (result == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->bind"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->bind")),
-1);
else if (result == 1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%s%s%s\n",
- "key <",
+ ACE_TEXT ("%s%s%s\n"),
+ ACE_TEXT ("key <"),
key,
- "> already bound"),
+ ACE_TEXT ("> already bound")),
1);
return 0;
}
@@ -425,8 +423,8 @@ Dump_Restore::unbind (const char *key)
if (result == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->unbind"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->unbind")),
-1);
return 0;
}
@@ -440,8 +438,8 @@ Dump_Restore::rebind (const char *key,
value,
type) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ns_context_->rebind"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ns_context_->rebind")),
-1);
return 0;
}
diff --git a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h
index 72651ff6ad0..1cdd2113f8e 100644
--- a/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h
+++ b/netsvcs/clients/Naming/Dump_Restore/Dump_Restore.h
@@ -21,7 +21,7 @@ public:
UNBIND,
REBIND
};
- Dump_Restore (int argc, char *argv[]);
+ Dump_Restore (int argc, ACE_TCHAR *argv[]);
// Initialize name options and naming context
~Dump_Restore (void);
@@ -32,7 +32,7 @@ public:
void dump (void);
private:
- char hostname_[MAXHOSTNAMELEN + 1];
+ ACE_TCHAR hostname_[MAXHOSTNAMELEN + 1];
// Cache the hostname and port number for remote case
void display_menu (void);
@@ -44,7 +44,7 @@ private:
int set_node_local (void);
// Set options to use NODE_LOCAL naming context.
- int set_host (const char *hostname,
+ int set_host (const ACE_TCHAR *hostname,
int port);
// Set options to use NET_LOCAL naming context specifying host name
// and port number.
diff --git a/netsvcs/clients/Naming/Dump_Restore/Makefile.am b/netsvcs/clients/Naming/Dump_Restore/Makefile.am
index 22a196c18fb..afe70a52511 100644
--- a/netsvcs/clients/Naming/Dump_Restore/Makefile.am
+++ b/netsvcs/clients/Naming/Dump_Restore/Makefile.am
@@ -1,27 +1,50 @@
-##----------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile for the ACE Dump-Restore Name_Server utility
-##----------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
+
+ACE_BUILDDIR = $(top_builddir)
+
+## Makefile.Netsvcs_Dump_Restore_Lib.am
+noinst_LTLIBRARIES = libDump_Restore.la
+
+libDump_Restore_la_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR) \
+ -DACE_BUILD_SVC_DLL
+
+libDump_Restore_la_SOURCES = \
+ Dump_Restore.cpp
+
+libDump_Restore_la_LIBADD = \
+ $(top_builddir)/ace/libACE.la
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
+noinst_HEADERS = \
+ Dump_Restore.h
-noinst_LIBRARIES = \
- libDump_Restore.a
+## Makefile.Netsvcs_Dump_Restore.am
+noinst_PROGRAMS = main
-libDump_Restore_a_SOURCES = Dump_Restore.cpp Dump_Restore.h
+main_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR)
-noinst_PROGRAMS = \
- main
+main_SOURCES = \
+ main.cpp \
+ Dump_Restore.h
-main_SOURCES = main.cpp
main_LDADD = \
- libDump_Restore.a \
- $(top_builddir)/ace/libACE.la
+ $(top_builddir)/ace/libDump_Restore.la $(top_builddir)/ace/libACE.la
-## ACE currently doesn't build this so we don't build it with automake either.
-EXTRA_DIST = createfile.cpp
+## Clean up template repositories, etc.
+clean-local:
+ -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
+ -rm -f gcctemp.c gcctemp so_locations
+ -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/netsvcs/clients/Naming/Dump_Restore/main.cpp b/netsvcs/clients/Naming/Dump_Restore/main.cpp
index 4d90427edda..46d298357bc 100644
--- a/netsvcs/clients/Naming/Dump_Restore/main.cpp
+++ b/netsvcs/clients/Naming/Dump_Restore/main.cpp
@@ -9,11 +9,11 @@
ACE_RCSID(Dump_Restore, main, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_Service_Config daemon (argv[0]);
- ACE_DEBUG ((LM_DEBUG, "entering main\n"));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("entering main\n")));
// Get a handler
Dump_Restore client_handler (argc, argv);
@@ -21,6 +21,6 @@ main (int argc, char *argv[])
ACE_Reactor::run_event_loop ();
/* NOTREACHED */
- ACE_DEBUG ((LM_DEBUG, "leaving main\n"));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("leaving main\n")));
return 0;
}
diff --git a/netsvcs/clients/Naming/Makefile.am b/netsvcs/clients/Naming/Makefile.am
index 09924790da5..ce115bb2cc7 100644
--- a/netsvcs/clients/Naming/Makefile.am
+++ b/netsvcs/clients/Naming/Makefile.am
@@ -1,19 +1,14 @@
-##---------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile for the Name Server test applications
+## $Id$
##
-##---------------------------------------------------------------------------
-
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
-## Process this file with automake to create Makefile.in
-##
-
-## The number in AUTOMAKE_OPTIONS is the minimum required version automake
-## needed to process this file.
-AUTOMAKE_OPTIONS = 1.4
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
SUBDIRS = \
- Client \
- Dump_Restore
+ Client \
+ Dump_Restore
diff --git a/netsvcs/servers/Makefile.am b/netsvcs/servers/Makefile.am
index 6e1c58949a2..f8d6ddcfe48 100644
--- a/netsvcs/servers/Makefile.am
+++ b/netsvcs/servers/Makefile.am
@@ -1,21 +1,33 @@
-##----------------------------------------------------------------------------
-## $Id$
+## Process this file with automake to create Makefile.in
##
-## Makefile.am for the netsvcs server example
-##----------------------------------------------------------------------------
-
+## $Id$
##
-## Process this file with automake to create Makefile.in
+## This file was generated by MPC. Any changes made directly to
+## this file will be lost the next time it is generated.
##
+## MPC Command:
+## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -hierarchy -make_coexistence -exclude build,Kokyu
-AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/netsvcs/lib
+ACE_ROOT = $(top_srcdir)
+ACE_BUILDDIR = $(top_builddir)
+## Makefile.Netsvcs_server.am
noinst_PROGRAMS = main
-main_SOURCES = main.cpp
-main_LDADD = $(top_builddir)/netsvcs/lib/libnetsvcs.la \
- $(top_builddir)/ace/libACE.la
+main_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(ACE_BUILDDIR) \
+ -I$(ACE_ROOT)/netsvcs/lib
+
+main_SOURCES = \
+ main.cpp
-noinst_DATA = svc.conf
+main_LDADD = \
+ $(top_builddir)/ace/libnetsvcs.la $(top_builddir)/ace/libACE.la
-EXTRA_DIST = $(noinst_DATA)
+## Clean up template repositories, etc.
+clean-local:
+ -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
+ -rm -f gcctemp.c gcctemp so_locations
+ -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/netsvcs/servers/main.cpp b/netsvcs/servers/main.cpp
index bd75b4e046f..b134b8db7c7 100644
--- a/netsvcs/servers/main.cpp
+++ b/netsvcs/servers/main.cpp
@@ -12,7 +12,7 @@
ACE_RCSID(servers, main, "$Id$")
int
-main (int argc, char *argv[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
// Try to link in the svc.conf entries dynamically.
@@ -25,8 +25,8 @@ main (int argc, char *argv[])
{
if (errno != ENOENT)
ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "open"),
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("open")),
1);
else // Use static linking.
{
@@ -39,76 +39,83 @@ main (int argc, char *argv[])
// ACE_Service_Object_Ptr which is an <auto_ptr> specialized
// for ACE_Service_Object.
- char *l_argv[3];
- char name_port[] = "-p " ACE_DEFAULT_NAME_SERVER_PORT_STR;
+ ACE_TCHAR *l_argv[3];
+ ACE_TCHAR name_port[] =
+ ACE_TEXT ("-p ") ACE_DEFAULT_NAME_SERVER_PORT_STR;
l_argv[0] = name_port;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_1 = ACE_SVC_INVOKE (ACE_Name_Acceptor);
if (sp_1->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Name Service",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Name Service")),
+ 1);
- char time_port[] = "-p " ACE_DEFAULT_TIME_SERVER_PORT_STR;
+ ACE_TCHAR time_port[] =
+ ACE_TEXT ("-p ") ACE_DEFAULT_TIME_SERVER_PORT_STR;
l_argv[0] = time_port;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_2 = ACE_SVC_INVOKE (ACE_TS_Server_Acceptor);
if (sp_2->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "TS Server Acceptor", 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("TS Server Acceptor")),
+ 1);
- char clerk_port[] = "-p 10011";
+ ACE_TCHAR clerk_port[] = ACE_TEXT ("-p 10011");
l_argv[0] = argv[0];
l_argv[1] = clerk_port;
l_argv[2] = 0;
ACE_Service_Object_Ptr sp_3 = ACE_SVC_INVOKE (ACE_TS_Clerk_Processor);
if (sp_3->init (2, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "TS Clerk Processor",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("TS Clerk Processor")),
+ 1);
#if defined (ACE_HAS_TOKENS_LIBRARY)
- char token_port[] = "-p " ACE_DEFAULT_TOKEN_SERVER_PORT_STR;
+ ACE_TCHAR token_port[] =
+ ACE_TEXT ("-p ") ACE_DEFAULT_TOKEN_SERVER_PORT_STR;
l_argv[0] = token_port;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_4 = ACE_SVC_INVOKE (ACE_Token_Acceptor);
if (sp_4->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Token Service",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Token Service")),
+ 1);
#endif /* ACE_HAS_TOKENS_LIBRARY */
- char thr_logging_port[] = "-p " ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
+ ACE_TCHAR thr_logging_port[] =
+ ACE_TEXT ("-p ") ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR;
l_argv[0] = thr_logging_port;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_5 =
ACE_SVC_INVOKE (ACE_Thr_Server_Logging_Acceptor);
if (sp_5->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Threaded Logging Server",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Threaded Logging Server")),
+ 1);
- char logging_port[] = "-p " ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
+ ACE_TCHAR logging_port[] =
+ ACE_TEXT ("-p ") ACE_DEFAULT_LOGGING_SERVER_PORT_STR;
l_argv[0] = logging_port;
l_argv[1] = 0;
ACE_Service_Object_Ptr sp_6 =
ACE_SVC_INVOKE (ACE_Server_Logging_Acceptor);
if (sp_6->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Logging Server", 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Logging Server")),
+ 1);
l_argv[0] = logging_port;
l_argv[1] = 0;
@@ -116,10 +123,10 @@ main (int argc, char *argv[])
ACE_SVC_INVOKE (ACE_Client_Logging_Acceptor);
if (sp_7->init (1, l_argv) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "Logging Client",
- 1));
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("Logging Client")),
+ 1);
// Run forever, performing the configured services until we
// are shut down by a SIGINT/SIGQUIT signal.
@@ -131,9 +138,11 @@ main (int argc, char *argv[])
sig_set.sig_add (SIGQUIT);
if (ACE_Reactor::instance ()->register_handler (sig_set,
&sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n")));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register signals")));
else
- ACE_Reactor::run_event_loop ();
+ ACE_Reactor::instance ()->run_reactor_event_loop ();
// Destructors of ACE_Service_Object_Ptr's automagically
// call fini().
@@ -158,9 +167,11 @@ main (int argc, char *argv[])
// gracefully.
if (ACE_Reactor::instance ()->register_handler (sig_set,
&sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n")));
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register signals2")));
else
- ACE_Reactor::run_event_loop ();
+ ACE_Reactor::instance ()->run_reactor_event_loop ();
}
return 0;