summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/APG/Processes/Spawn.cpp2
-rw-r--r--examples/APG/Signals/SigAction.cpp5
-rw-r--r--examples/DLL/test_dll.cpp10
-rw-r--r--examples/Export/test.cpp6
-rw-r--r--examples/IOStream/server/iostream_server.cpp1
-rw-r--r--examples/Mem_Map/file-reverse/Mem_Map_File_Reverse.mpc1
-rw-r--r--examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp8
-rw-r--r--examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h10
-rw-r--r--examples/QOS/Change_Receiver_FlowSpec/receiver.cpp30
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp2
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp10
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h4
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i14
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp14
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h4
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp8
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h4
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i10
-rw-r--r--examples/Threads/cancel.cpp10
19 files changed, 69 insertions, 84 deletions
diff --git a/examples/APG/Processes/Spawn.cpp b/examples/APG/Processes/Spawn.cpp
index b7b51bde7d2..b3323ccfb8d 100644
--- a/examples/APG/Processes/Spawn.cpp
+++ b/examples/APG/Processes/Spawn.cpp
@@ -27,7 +27,7 @@ public:
// Spawn the new process; prepare() hook is called first.
ACE_Process_Options options;
pid_t pid = this->spawn (options);
- if (pid == ACE_INVALID_PID)
+ if (pid == -1)
ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("spawn")), -1);
diff --git a/examples/APG/Signals/SigAction.cpp b/examples/APG/Signals/SigAction.cpp
index b9d96c6b702..ccb484f7478 100644
--- a/examples/APG/Signals/SigAction.cpp
+++ b/examples/APG/Signals/SigAction.cpp
@@ -33,7 +33,7 @@ int ACE_TMAIN (int, ACE_TCHAR *[])
}
// Listing 1
#if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" {
+extern "C"
#endif
// Listing 3 code/ch11
static void my_sighandler (int signo)
@@ -49,9 +49,6 @@ static void my_sighandler (int signo)
ACE_OS::sleep (10);
}
-#if defined (ACE_HAS_SIG_C_FUNC)
-}
-#endif
// Listing 3
// Listing 2 code/ch11
static void register_actions ()
diff --git a/examples/DLL/test_dll.cpp b/examples/DLL/test_dll.cpp
index fce379da943..a0073158a2e 100644
--- a/examples/DLL/test_dll.cpp
+++ b/examples/DLL/test_dll.cpp
@@ -13,14 +13,14 @@ ACE_RCSID(DLL, test_dll, "$Id$")
typedef Magazine* (*Magazine_Creator) (void);
int
-ACE_TMAIN (int argc, ACE_TCHAR *argv[])
+main (int argc, char *argv[])
{
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
ACE_DLL dll;
- int retval = dll.open (ACE_TEXT("./") ACE_DLL_PREFIX ACE_TEXT("Today"));
+ int retval = dll.open ("./" ACE_DLL_PREFIX "Today");
if (retval != 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -29,7 +29,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
-1);
Magazine_Creator mc;
- mc = (Magazine_Creator) dll.symbol (ACE_TEXT("create_magazine"));
+ mc = (Magazine_Creator) dll.symbol ("create_magazine");
if (mc == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -46,7 +46,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// The other library is now loaded on demand.
- retval = dll.open (ACE_TEXT("./") ACE_DLL_PREFIX ACE_TEXT("Newsweek"));
+ retval = dll.open ("./" ACE_DLL_PREFIX "Newsweek");
if (retval != 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -54,7 +54,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
"dll.open"),
-1);
- mc = (Magazine_Creator) dll.symbol (ACE_TEXT("create_magazine"));
+ mc = (Magazine_Creator) dll.symbol ("create_magazine");
if (mc == 0)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/examples/Export/test.cpp b/examples/Export/test.cpp
index e447dbec3f5..69fe20158bf 100644
--- a/examples/Export/test.cpp
+++ b/examples/Export/test.cpp
@@ -3,8 +3,8 @@
#include "dll.h"
#include <iostream>
-int
-ACE_TMAIN (int, ACE_TCHAR *[])
+int
+main (int, char *[])
{
int failure_count = 0;
test_class my_test_class;
@@ -24,7 +24,7 @@ ACE_TMAIN (int, ACE_TCHAR *[])
// Test out the export of a function. Like above,
// I don't know how this can fail at runtime.
-
+
std::cout << "Function Test: ";
if (test_function () != RETVAL)
{
diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp
index fa80036a3ab..bd54098ac2d 100644
--- a/examples/IOStream/server/iostream_server.cpp
+++ b/examples/IOStream/server/iostream_server.cpp
@@ -10,7 +10,6 @@
#include "ace/Signal.h"
#include "iostream_server.h"
-#include "ace/OS_NS_unistd.h"
ACE_RCSID(server, iostream_server, "$Id$")
diff --git a/examples/Mem_Map/file-reverse/Mem_Map_File_Reverse.mpc b/examples/Mem_Map/file-reverse/Mem_Map_File_Reverse.mpc
index d648c60da40..ca6b8ee6622 100644
--- a/examples/Mem_Map/file-reverse/Mem_Map_File_Reverse.mpc
+++ b/examples/Mem_Map/file-reverse/Mem_Map_File_Reverse.mpc
@@ -2,5 +2,4 @@
// $Id$
project : aceexe {
- exename = file-reverse
} \ No newline at end of file
diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
index 0ef3b353248..4005b40a25a 100644
--- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
+++ b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp
@@ -12,7 +12,7 @@ ACE_RCSID(QOS, QoS_Util,"$Id$")
// constructor.
QoS_Util::QoS_Util (int argc,
- ACE_TCHAR *argv[])
+ char *argv[])
: argc_ (argc),
argv_ (argv),
source_port_ (SENDER_PORT),
@@ -36,7 +36,7 @@ QoS_Util::~QoS_Util (void)
int
QoS_Util::parse_args (void)
{
- ACE_Get_Opt get_opts (this->argc_, this->argv_, ACE_TEXT("m:n:p:P:c"));
+ ACE_Get_Opt get_opts (this->argc_, this->argv_, "m:n:p:P:c");
int c = 0;
while ((c = get_opts ()) != -1)
@@ -50,10 +50,10 @@ QoS_Util::parse_args (void)
this->dest_addr_->set (get_opts.opt_arg ());
break;
case 'p': // protocol.
- if (ACE_OS::strcasecmp (get_opts.opt_arg (), ACE_TEXT("tcp")) == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0)
this->protocol_ = IPPROTO_TCP;
else
- if (ACE_OS::strcasecmp (get_opts.opt_arg (), ACE_TEXT("udp")) == 0)
+ if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0)
this->protocol_ = IPPROTO_UDP;
else
ACE_DEBUG ((LM_DEBUG,
diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h
index ae347de68f6..6de6e2d24d3 100644
--- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h
+++ b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h
@@ -22,21 +22,21 @@
class QoS_Util
{
- // = TITLE
- // This class provides the utility functions like parse_args ()
+ // = TITLE
+ // This class provides the utility functions like parse_args ()
// required by a QoS enabled application.
public:
// constructor.
- QoS_Util (int argc, ACE_TCHAR *argv[]);
+ QoS_Util (int argc, char *argv[]);
// destructor.
~QoS_Util (void);
// Parse command-line arguments.
int parse_args (void);
-
+
// GET methods.
ACE_INET_Addr *mult_session_addr (void) const;
@@ -52,7 +52,7 @@ private:
// Command line arguments.
int argc_;
- ACE_TCHAR **argv_;
+ char **argv_;
// Multicast session address.
ACE_INET_Addr *mult_session_addr_;
diff --git a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp b/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp
index 8ef43514e9b..abeda6cd58e 100644
--- a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp
+++ b/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp
@@ -25,7 +25,7 @@
#include "Fill_ACE_QoS.h"
#include "QoS_Signal_Handler.h"
#include "Receiver_QoS_Event_Handler.h"
-
+
// To open QOS sockets administrative access is required on the
// machine. Fill in default values for QoS structure. The default
// values were simply choosen from existing QOS templates available
@@ -42,7 +42,7 @@
int
FillQoSParams (ACE_QoS_Params &qos_params,
- iovec* iov,
+ iovec* iov,
ACE_QoS* qos)
{
qos_params.callee_data (iov);
@@ -55,8 +55,8 @@ FillQoSParams (ACE_QoS_Params &qos_params,
}
int
-ACE_TMAIN (int argc, ACE_TCHAR * argv[])
-{
+main (int argc, char * argv[])
+{
QoS_Util qos_util(argc, argv);
@@ -87,7 +87,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
25,
1)))
{
- case 1 :
+ case 1 :
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to bind the new flow spec\n"
"The Flow Spec name already exists\n"),
@@ -99,7 +99,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
-1);
break;
}
-
+
ACE_DEBUG ((LM_DEBUG,
"g_711 Flow Spec bound successfully\n"));
@@ -116,12 +116,12 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
// Opening a new Multicast Datagram.
ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos;
-
+
// Multicast Session Address specified by user at command line.
- // If this address is not specified,
- // <localhost:ACE_DEFAULT_MULTICAST_PORT> is assumed.
+ // If this address is not specified,
+ // <localhost:ACE_DEFAULT_MULTICAST_PORT> is assumed.
ACE_INET_Addr mult_addr (*(qos_util.mult_session_addr ()));
-
+
// Fill the ACE_QoS_Params to be passed to the <ACE_OS::join_leaf>
// through subscribe.
@@ -132,7 +132,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
ACE_QoS_Session_Factory session_factory;
// Ask the factory to create a QoS session.
- ACE_QoS_Session *qos_session =
+ ACE_QoS_Session *qos_session =
session_factory.create_session ();
// Create a destination address for the QoS session. The same
@@ -167,7 +167,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
// subscribe call will fail. A more abstract version of
// subscribe will be added that constrains the various features
// of GQoS like different flags etc.
-
+
if (dgram_mcast_qos.subscribe (mult_addr,
qos_params,
1,
@@ -177,8 +177,8 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
0,
0, // ACE_Protocol_Info,
0,
- ACE_OVERLAPPED_SOCKET_FLAG
- | ACE_FLAG_MULTIPOINT_C_LEAF
+ ACE_OVERLAPPED_SOCKET_FLAG
+ | ACE_FLAG_MULTIPOINT_C_LEAF
| ACE_FLAG_MULTIPOINT_D_LEAF,
qos_session) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -191,7 +191,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[])
int nIP_TTL = 25;
char achInBuf [BUFSIZ];
u_long dwBytes;
-
+
// Should this be abstracted into QoS objects ?? Doesnt seem to have
// to do anything directly with QoS.
if (ACE_OS::ioctl (dgram_mcast_qos.get_handle (), // Socket.
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp
index 3985f9369a2..9753fd4a2ca 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp
@@ -15,7 +15,7 @@ Handle_L_Pipe::upper_case (char s[], int n)
{
while (--n >= 0)
if (ACE_OS::ace_islower (s[n]))
- s[n] = ACE_OS::ace_toupper (s[n]);
+ s[n] = ACE_OS::to_upper (s[n]);
return s;
}
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp
index 95553833e72..07373da7ef7 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp
@@ -5,7 +5,7 @@
ACE_RCSID(server, Handle_R_Stream, "$Id$")
#if defined (SunOS4)
-extern "C"
+extern "C"
{
int init (void);
int fini (void);
@@ -13,14 +13,14 @@ extern "C"
void __std__Handle_R_Stream_C_recv_n_();
}
-int
+int
init (void)
{
__sti__Handle_R_Stream_C_recv_n_();
return 0;
}
-int
+int
fini (void)
{
__std__Handle_R_Stream_C_recv_n_();
@@ -28,7 +28,7 @@ fini (void)
}
#endif /* SunOS4 */
-// Static variables.
+// Static variables.
u_short Handle_R_Stream::DEFAULT_PORT = ACE_DEFAULT_SERVER_PORT;
char *Handle_R_Stream::login_name = 0;
@@ -39,4 +39,4 @@ char Handle_R_Stream::login[ACE_MAX_USERID];
#endif /* __ACE_INLINE__ */
Handle_R_Stream remote_stream;
-ACE_Service_Object_Type rs (&remote_stream, ACE_TEXT("Remote_Stream"));
+ACE_Service_Object_Type rs (&remote_stream, "Remote_Stream");
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h
index d49d10ae4a5..2b7978cbff2 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h
@@ -24,8 +24,8 @@ class ACE_Svc_Export Handle_R_Stream : public ACE_Service_Object, public ACE_SOC
{
public:
Handle_R_Stream (void);
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **, size_t) const;
+ virtual int init (int argc, char *argv[]);
+ virtual int info (char **, size_t) const;
virtual int fini (void);
private:
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
index f126cd13aee..8f8912c8f63 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i
@@ -27,19 +27,19 @@ Handle_R_Stream::open (const ACE_INET_Addr &sia, int async)
}
ACE_INLINE int
-Handle_R_Stream::info (ACE_TCHAR **strp, size_t length) const
+Handle_R_Stream::info (char **strp, size_t length) const
{
- ACE_TCHAR buf[BUFSIZ];
+ char buf[BUFSIZ];
ACE_INET_Addr sa;
if (this->get_local_addr (sa) == -1)
return -1;
ACE_OS::sprintf (buf,
- ACE_TEXT("%d/%s %s"),
+ "%d/%s %s",
sa.get_port_number (),
- ACE_TEXT("tcp"),
- ACE_TEXT("# tests remote stream\n"));
+ "tcp",
+ "# tests remote stream\n");
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -49,10 +49,10 @@ Handle_R_Stream::info (ACE_TCHAR **strp, size_t length) const
}
ACE_INLINE int
-Handle_R_Stream::init (int argc, ACE_TCHAR *argv[])
+Handle_R_Stream::init (int argc, char *argv[])
{
ACE_INET_Addr sis (Handle_R_Stream::DEFAULT_PORT);
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("p:"), 0);
+ ACE_Get_Opt get_opt (argc, argv, "p:", 0);
for (int c; (c = get_opt ()) != -1; )
switch (c)
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
index ed914792c3e..8083f372b42 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp
@@ -40,17 +40,17 @@ Handle_Thr_Acceptor<SVH, PR_AC_2>::Handle_Thr_Acceptor (void)
}
template <class SVH, PR_AC_1> int
-Handle_Thr_Acceptor<SVH, PR_AC_2>::info (ACE_TCHAR **strp,
+Handle_Thr_Acceptor<SVH, PR_AC_2>::info (char **strp,
size_t length) const
{
- ACE_TCHAR buf[BUFSIZ];
+ char buf[BUFSIZ];
ACE_INET_Addr sa;
if (this->acceptor ().get_local_addr (sa) == -1)
return -1;
- ACE_OS::sprintf (buf, ACE_TEXT("%d/%s %s"), sa.get_port_number (), ACE_TEXT("tcp"),
- ACE_TEXT("# tests threaded remote stream\n"));
+ ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "tcp",
+ "# tests threaded remote stream\n");
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -60,12 +60,12 @@ Handle_Thr_Acceptor<SVH, PR_AC_2>::info (ACE_TCHAR **strp,
}
template <class SVH, PR_AC_1> int
-Handle_Thr_Acceptor<SVH, PR_AC_2>::init (int argc, ACE_TCHAR *argv[])
+Handle_Thr_Acceptor<SVH, PR_AC_2>::init (int argc, char *argv[])
{
ACE_INET_Addr local_addr (ACE_DEFAULT_THR_PORT);
int n_threads = ACE_DEFAULT_THREADS;
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("p:t:"), 0);
+ ACE_Get_Opt get_opt (argc, argv, "p:t:", 0);
for (int c; (c = get_opt ()) != -1; )
switch (c)
@@ -192,7 +192,7 @@ typedef Handle_Thr_Acceptor<CLI_STREAM, THR_ACCEPTOR> HANDLE_THR_ACCEPTOR;
// Service object.
HANDLE_THR_ACCEPTOR remote_thr_stream;
-ACE_Service_Object_Type rts (&remote_thr_stream, ACE_TEXT("Remote_Thr_Stream"));
+ACE_Service_Object_Type rts (&remote_thr_stream, "Remote_Thr_Stream");
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Acceptor<CLI_STREAM, THR_ACCEPTOR>;
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h
index 7b98b361869..da61b0357e4 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h
@@ -27,8 +27,8 @@ public:
~Handle_Thr_Acceptor (void);
// = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **, size_t) const;
+ virtual int init (int argc, char *argv[]);
+ virtual int info (char **, size_t) const;
virtual int fini (void);
private:
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp
index 9eccf88ef43..74081e1581e 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp
@@ -5,7 +5,7 @@
ACE_RCSID(server, Handle_Timeout, "$Id$")
#if defined (SunOS4)
-extern "C"
+extern "C"
{
int init (void);
int fini (void);
@@ -13,14 +13,14 @@ extern "C"
void __std__Handle_Timeout_C_init_();
}
-int
+int
init (void)
{
__sti__Handle_Timeout_C_init_();
return 0;
}
-int
+int
fini (void)
{
__std__Handle_Timeout_C_init_();
@@ -33,4 +33,4 @@ fini (void)
#endif /* __ACE_INLINE__ */
Handle_Timeout timer_1;
-ACE_Service_Object_Type t1 (&timer_1, ACE_TEXT("Timer_1"));
+ACE_Service_Object_Type t1 (&timer_1, "Timer_1");
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h
index 8f30199b480..1e3c82960fe 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h
@@ -21,8 +21,8 @@ class ACE_Svc_Export Handle_Timeout : public ACE_Service_Object
{
public:
Handle_Timeout (void);
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **, size_t) const;
+ virtual int init (int argc, char *argv[]);
+ virtual int info (char **, size_t) const;
virtual int fini (void);
private:
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
index fbea27d826c..efad9dd62b3 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
@@ -12,11 +12,11 @@ Handle_Timeout::Handle_Timeout (void): count (0)
}
ACE_INLINE int
-Handle_Timeout::info (ACE_TCHAR **strp, size_t length) const
+Handle_Timeout::info (char **strp, size_t length) const
{
- ACE_TCHAR buf[BUFSIZ];
+ char buf[BUFSIZ];
- ACE_OS::sprintf (buf, ACE_TEXT("%s"), ACE_TEXT("# tests timeout facility\n"));
+ ACE_OS::sprintf (buf, "%s", "# tests timeout facility\n");
if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
return -1;
@@ -26,11 +26,11 @@ Handle_Timeout::info (ACE_TCHAR **strp, size_t length) const
}
ACE_INLINE int
-Handle_Timeout::init (int argc, ACE_TCHAR *argv[])
+Handle_Timeout::init (int argc, char *argv[])
{
ACE_Time_Value delta (10);
ACE_Time_Value interval (1);
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("a:d:i:"), 0);
+ ACE_Get_Opt get_opt (argc, argv, "a:d:i:", 0);
int arg = 0;
for (int c; (c = get_opt ()) != -1; )
diff --git a/examples/Threads/cancel.cpp b/examples/Threads/cancel.cpp
index f10bb822580..4f3cabb73a9 100644
--- a/examples/Threads/cancel.cpp
+++ b/examples/Threads/cancel.cpp
@@ -13,15 +13,9 @@ ACE_RCSID(Threads, cancel, "$Id$")
#if defined (ACE_HAS_THREADS)
static void *
-#if ACE_SIZEOF_VOID_P==8 && ACE_SIZEOF_INT<ACE_SIZEOF_VOID_P
-worker (long iterations)
-{
- for (long i = 0; i < iterations; i++)
-#else
worker (int iterations)
{
for (int i = 0; i < iterations; i++)
-#endif
{
if ((i % 10) == 0
&& (ACE_Thread_Manager::instance ()->testcancel (ACE_Thread::self ()) != 0))
@@ -45,11 +39,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
daemon.open (argv[0]);
int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS;
-#if ACE_SIZEOF_VOID_P==8 && ACE_SIZEOF_INT<ACE_SIZEOF_VOID_P
- long n_iterations = (long)( argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS );
-#else
int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
-#endif
ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();