diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-03-06 21:48:04 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-03-06 21:48:04 +0000 |
commit | 7ea713c22bfdb04b1cd5be2dac34c83b1e83fd04 (patch) | |
tree | 5ec27b869b80ab5e84a381932afb8d7df29634aa /examples | |
parent | 168c3a342c5dfd5531d622f1ae142a2c762b6b5b (diff) | |
download | ATCD-7ea713c22bfdb04b1cd5be2dac34c83b1e83fd04.tar.gz |
ChangeLogTag:Wed Mar 6 14:43:34 2002 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'examples')
91 files changed, 134 insertions, 134 deletions
diff --git a/examples/IPC_SAP/ATM_SAP/CPP-client.cpp b/examples/IPC_SAP/ATM_SAP/CPP-client.cpp index c4ecf2f97ca..2a00d136e33 100644 --- a/examples/IPC_SAP/ATM_SAP/CPP-client.cpp +++ b/examples/IPC_SAP/ATM_SAP/CPP-client.cpp @@ -13,7 +13,7 @@ ACE_RCSID(ATM_SAP, CPP_client, "$Id$") /* ACE_ATM Client */ -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if ( argc < 2 ) ACE_ERROR_RETURN ((LM_ERROR, @@ -192,7 +192,7 @@ int main (int argc, ACE_TCHAR *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform isn't configured to support ATM\n"), diff --git a/examples/IPC_SAP/ATM_SAP/CPP-server.cpp b/examples/IPC_SAP/ATM_SAP/CPP-server.cpp index 8e0427c421a..57489b9b652 100644 --- a/examples/IPC_SAP/ATM_SAP/CPP-server.cpp +++ b/examples/IPC_SAP/ATM_SAP/CPP-server.cpp @@ -11,7 +11,7 @@ ACE_RCSID(ATM_SAP, CPP_ATM_server, "$Id$") // ACE_ATM Server int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); @@ -146,7 +146,7 @@ main (int argc, ACE_TCHAR *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform isn't configured to support ATM\n"), diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp index 87c12aa2f4e..d983556b2b6 100644 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp +++ b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp @@ -7,7 +7,7 @@ ACE_RCSID(FIFO_SAP, FIFO_Msg_client, "$Id$") #if defined (ACE_HAS_STREAM_PIPES) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_FIFO_Send_Msg client (ACE_DEFAULT_RENDEZVOUS); @@ -30,7 +30,7 @@ main (int, ACE_TCHAR *[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp index e55e0f36fdf..da38671afdc 100644 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp +++ b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp @@ -8,7 +8,7 @@ ACE_RCSID(FIFO_SAP, FIFO_Msg_server, "$Id$") #if defined (ACE_HAS_STREAM_PIPES) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::unlink (ACE_DEFAULT_RENDEZVOUS); ACE_FIFO_Recv_Msg server (ACE_DEFAULT_RENDEZVOUS); @@ -36,7 +36,7 @@ main (int, ACE_TCHAR *[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp index 95d7218a45b..dac5c740120 100644 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp +++ b/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp @@ -6,7 +6,7 @@ ACE_RCSID(FIFO_SAP, FIFO_client, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_FIFO_Send client (ACE_DEFAULT_RENDEZVOUS); ACE_TCHAR buf[BUFSIZ]; diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp index 6138a9cc786..8ef94e9e905 100644 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp +++ b/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp @@ -6,7 +6,7 @@ ACE_RCSID(FIFO_SAP, FIFO_server, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::unlink (ACE_DEFAULT_RENDEZVOUS); ACE_FIFO_Recv server (ACE_DEFAULT_RENDEZVOUS); diff --git a/examples/IPC_SAP/FILE_SAP/client.cpp b/examples/IPC_SAP/FILE_SAP/client.cpp index da93c39a776..8a708955724 100644 --- a/examples/IPC_SAP/FILE_SAP/client.cpp +++ b/examples/IPC_SAP/FILE_SAP/client.cpp @@ -8,7 +8,7 @@ ACE_RCSID(FILE_SAP, client, "$Id$") int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc < 3 || argc > 3) ACE_ERROR_RETURN ((LM_ERROR, diff --git a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp index 8c66dedfda8..d9c6ca3ac18 100644 --- a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp @@ -7,7 +7,7 @@ ACE_RCSID(SOCK_SAP, C_inclient, "$Id$") /* BSD socket client */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Initialize WinSock DLL on Win32... ACE_OS::socket_init (ACE_WSOCK_VERSION); diff --git a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp index bb9fc9d5711..6f53ab2db9d 100644 --- a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp @@ -6,7 +6,7 @@ ACE_RCSID(SOCK_SAP, C_inserver, "$Id$") /* BSD socket server. */ -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Initialize WinSock DLL on Win32... ACE_OS::socket_init (ACE_WSOCK_VERSION); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp index 98c01c2bfae..a0889dd7f32 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp @@ -402,7 +402,7 @@ run_client (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Initialize the logger. ACE_LOG_MSG->open (argv[0]); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp index c4d6d46cfa2..9e1356c45cd 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp @@ -566,7 +566,7 @@ Handler_Factory::handle_events (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { OPTIONS::instance ()->parse_args (argc, argv); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp index bbbd86d687a..a1d41fc5941 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp @@ -160,7 +160,7 @@ handle_connections (ACE_SOCK_Acceptor &peer_acceptor, } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { u_short port = ACE_DEFAULT_SERVER_PORT + 1; @@ -196,7 +196,7 @@ main (int, ACE_TCHAR *[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp index be327ca8c11..475cd02b99f 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp @@ -378,7 +378,7 @@ run_event_loop (u_short port) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { u_short port = ACE_DEFAULT_SERVER_PORT; diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp index ea75fb79c3e..9909bfa150d 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp @@ -60,7 +60,7 @@ main (int argc, char *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "this platform does not support UNIX-domain sockets\n"), -1); diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp index db7f1458d2c..4d0403279d6 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp @@ -150,7 +150,7 @@ main (int argc, char *argv[]) return run_event_loop (argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS); } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "this platform does not support UNIX-domain sockets\n"), -1); diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp index 4d516a4a422..e48b5a7afaf 100644 --- a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp @@ -49,7 +49,7 @@ main (int argc, char *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1); } diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp index 3f101cfb484..f12a376e163 100644 --- a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp @@ -87,7 +87,7 @@ main (int argc, char *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't not support UNIX domain sockets\n"), -1); } diff --git a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp b/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp index 92c4cfeb3b8..17ea66317e4 100644 --- a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp @@ -16,7 +16,7 @@ const int DEFAULT_SIZE = 8; const int DEFAULT_COUNT = 10000; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int size = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_SIZE; int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_COUNT; diff --git a/examples/IPC_SAP/SPIPE_SAP/client.cpp b/examples/IPC_SAP/SPIPE_SAP/client.cpp index 47dcd42ccc7..989a8ac3c49 100644 --- a/examples/IPC_SAP/SPIPE_SAP/client.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/client.cpp @@ -11,7 +11,7 @@ ACE_RCSID(SPIPE_SAP, client, "$Id$") #include "shared.h" int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc < 2) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s string [rendezvous]\n", argv[0]), 1); @@ -37,7 +37,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp index ba03cce374a..febcfeca0e0 100644 --- a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp @@ -11,7 +11,7 @@ ACE_RCSID(SPIPE_SAP, consumer_msg, "$Id$") #include "shared.h" int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_SPIPE_Acceptor peer_acceptor; ACE_SPIPE_Stream new_stream; @@ -47,7 +47,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp index ffd1da3e8fd..84f9e96ec05 100644 --- a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp @@ -11,7 +11,7 @@ ACE_RCSID(SPIPE_SAP, consumer_read, "$Id$") #include "shared.h" int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_SPIPE_Acceptor peer_acceptor; ACE_SPIPE_Stream new_stream; @@ -44,7 +44,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp index 7e0055ad9c6..088b7356a30 100644 --- a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp @@ -14,7 +14,7 @@ const int DEFAULT_SIZE = 4 * 1024; const int DEFAULT_COUNT = 100; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int size = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_SIZE; int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_COUNT; @@ -52,7 +52,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp index 45caa4324bf..fe7d23f9bf8 100644 --- a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp @@ -14,7 +14,7 @@ const int DEFAULT_SIZE = 8 * 1024; const int DEFAULT_COUNT = 100; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int size = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_SIZE; int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_COUNT; @@ -44,7 +44,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "this feature is not supported"), -1); } diff --git a/examples/IPC_SAP/SPIPE_SAP/server.cpp b/examples/IPC_SAP/SPIPE_SAP/server.cpp index 7cb8f6c3009..728eb824bf8 100644 --- a/examples/IPC_SAP/SPIPE_SAP/server.cpp +++ b/examples/IPC_SAP/SPIPE_SAP/server.cpp @@ -14,7 +14,7 @@ ACE_RCSID(SPIPE_SAP, server, "$Id$") const int MAX_HANDLES = 200; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_SPIPE_Acceptor peer_acceptor; ACE_SPIPE_Stream new_stream; @@ -112,7 +112,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else #include <stdio.h> -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_OS::fprintf (stderr, "This feature is not supported\n"); return 0; diff --git a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp b/examples/IPC_SAP/UPIPE_SAP/ex1.cpp index 96ad8f71845..7de8e7e100f 100644 --- a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp +++ b/examples/IPC_SAP/UPIPE_SAP/ex1.cpp @@ -156,7 +156,7 @@ peer2 (void *) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { // Spawn a peer2 thread. if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (peer2), @@ -172,7 +172,7 @@ main (int, ACE_TCHAR *[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), diff --git a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp b/examples/IPC_SAP/UPIPE_SAP/ex2.cpp index dfeec7d1ab4..d807f53857d 100644 --- a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp +++ b/examples/IPC_SAP/UPIPE_SAP/ex2.cpp @@ -149,7 +149,7 @@ consumer (void *) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { size = argc > 1 ? ACE_OS::atoi (argv[1]) : 32; iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16; @@ -168,7 +168,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), diff --git a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp index 6efc34b8c91..0ef3577f075 100644 --- a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp +++ b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp @@ -129,7 +129,7 @@ consumer (void *) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { size = argc > 1 ? ACE_OS::atoi (argv[1]) : 32; iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16; @@ -148,7 +148,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), diff --git a/examples/Log_Msg/test_callback.cpp b/examples/Log_Msg/test_callback.cpp index ae382a7da9f..958d3853369 100644 --- a/examples/Log_Msg/test_callback.cpp +++ b/examples/Log_Msg/test_callback.cpp @@ -99,7 +99,7 @@ Logger::log (ACE_Log_Record &log_record) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, diff --git a/examples/Log_Msg/test_log_msg.cpp b/examples/Log_Msg/test_log_msg.cpp index e3129117498..035520105d5 100644 --- a/examples/Log_Msg/test_log_msg.cpp +++ b/examples/Log_Msg/test_log_msg.cpp @@ -39,7 +39,7 @@ cause_error (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Note that the default behavior is to log to STDERR... diff --git a/examples/Log_Msg/test_ostream.cpp b/examples/Log_Msg/test_ostream.cpp index 535c1432215..6bc0bee4fa8 100644 --- a/examples/Log_Msg/test_ostream.cpp +++ b/examples/Log_Msg/test_ostream.cpp @@ -24,7 +24,7 @@ ACE_RCSID(Log_Msg, test_ostream, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { // This message should show up in stderr. ACE_DEBUG ((LM_DEBUG, diff --git a/examples/Map_Manager/test_hash_map_manager.cpp b/examples/Map_Manager/test_hash_map_manager.cpp index 9a094b78e42..dec80fc5488 100644 --- a/examples/Map_Manager/test_hash_map_manager.cpp +++ b/examples/Map_Manager/test_hash_map_manager.cpp @@ -12,7 +12,7 @@ const int MAX_KEY_LEN = 1000; typedef ACE_Hash_Map_Manager<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX> MAP_MANAGER; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc != 4) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s tablesize file1 file2\n", diff --git a/examples/Mem_Map/file-reverse/file-reverse.cpp b/examples/Mem_Map/file-reverse/file-reverse.cpp index 9817df77224..93893c412d7 100644 --- a/examples/Mem_Map/file-reverse/file-reverse.cpp +++ b/examples/Mem_Map/file-reverse/file-reverse.cpp @@ -35,7 +35,7 @@ print_array_in_reverse (char *array, } int -main (int argc, ACE_TCHAR **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { ACE_LOG_MSG->open (argv[0]); diff --git a/examples/Misc/test_XtReactor1.cpp b/examples/Misc/test_XtReactor1.cpp index 7475684fcbd..6dc02e9ea45 100644 --- a/examples/Misc/test_XtReactor1.cpp +++ b/examples/Misc/test_XtReactor1.cpp @@ -114,7 +114,7 @@ ActivateCB (Widget, XtPointer, XtPointer) } int -main (int argc, ACE_TCHAR**argv) +ACE_TMAIN (int argc, ACE_TCHAR**argv) { // The worlds most useless user interface Widget top_level = XtVaAppInitialize (NULL, @@ -166,7 +166,7 @@ main (int argc, ACE_TCHAR**argv) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "XT not configured for this platform\n"), diff --git a/examples/Misc/test_XtReactor2.cpp b/examples/Misc/test_XtReactor2.cpp index 50cef2e7cb2..973a4432e5b 100644 --- a/examples/Misc/test_XtReactor2.cpp +++ b/examples/Misc/test_XtReactor2.cpp @@ -46,7 +46,7 @@ ActivateCB (Widget w, XtPointer, XtPointer) } int -main (int argc, ACE_TCHAR**argv) +ACE_TMAIN (int argc, ACE_TCHAR**argv) { // The worlds most useless user interface Widget top_level = XtVaAppInitialize (NULL, @@ -95,7 +95,7 @@ main (int argc, ACE_TCHAR**argv) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "XT not configured for this platform\n"), diff --git a/examples/Misc/test_dump.cpp b/examples/Misc/test_dump.cpp index ffd683b14b6..3c18ad6c105 100644 --- a/examples/Misc/test_dump.cpp +++ b/examples/Misc/test_dump.cpp @@ -12,7 +12,7 @@ ACE_RCSID(Misc, test_dump, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { SOCK outer_sock; // Note that the SOCK superclass is *not* printed. diff --git a/examples/Misc/test_get_opt.cpp b/examples/Misc/test_get_opt.cpp index 69cf02a4059..0b5cc0e0d97 100644 --- a/examples/Misc/test_get_opt.cpp +++ b/examples/Misc/test_get_opt.cpp @@ -8,7 +8,7 @@ ACE_RCSID(Misc, test_get_opt, "$Id$") int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("ab:cd:ef:gh:")); int c; diff --git a/examples/Misc/test_profile_timer.cpp b/examples/Misc/test_profile_timer.cpp index 2ae794ead88..33ee7726ffc 100644 --- a/examples/Misc/test_profile_timer.cpp +++ b/examples/Misc/test_profile_timer.cpp @@ -8,7 +8,7 @@ ACE_RCSID(Misc, test_profile_timer, "$Id$") static const int DEFAULT_ITERATIONS = 100000000; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Profile_Timer timer; int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_ITERATIONS; diff --git a/examples/Misc/test_read_buffer.cpp b/examples/Misc/test_read_buffer.cpp index 095364130f7..e1d1cf0c0c8 100644 --- a/examples/Misc/test_read_buffer.cpp +++ b/examples/Misc/test_read_buffer.cpp @@ -6,7 +6,7 @@ ACE_RCSID(Misc, test_read_buffer, "$Id$") int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_HANDLE handle = argc > 1 ? ACE_OS::open (argv[1], O_RDONLY) : 0; int term = argc > 2 ? ACE_OS::atoi (argv[2]) : EOF; diff --git a/examples/Misc/test_set.cpp b/examples/Misc/test_set.cpp index cbb1ad0b305..919116b76c5 100644 --- a/examples/Misc/test_set.cpp +++ b/examples/Misc/test_set.cpp @@ -4,7 +4,7 @@ #include "ace/Log_Msg.h" int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_Unbounded_Set<int> s1; diff --git a/examples/Misc/test_sstring.cpp b/examples/Misc/test_sstring.cpp index e57e2a224f2..ef85290c1f7 100644 --- a/examples/Misc/test_sstring.cpp +++ b/examples/Misc/test_sstring.cpp @@ -6,7 +6,7 @@ ACE_RCSID(Misc, test_sstring, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_CString s1 ("hello"); ACE_CString s2 ("world"); diff --git a/examples/Misc/test_trace.cpp b/examples/Misc/test_trace.cpp index 2473f5aebf3..8491e6a4bc5 100644 --- a/examples/Misc/test_trace.cpp +++ b/examples/Misc/test_trace.cpp @@ -70,7 +70,7 @@ exithook (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { const size_t MAX_DEPTH = argc == 1 ? 10 : ACE_OS::atoi (argv[1]); @@ -79,7 +79,7 @@ main (int argc, ACE_TCHAR *argv[]) if (argc > 2) ACE_Trace::set_nesting_indent (ACE_OS::atoi (argv[2])); - ACE_Trace _ (ACE_TEXT("int main (int argc, ACE_TCHAR *argv[])"), + ACE_Trace _ (ACE_TEXT("int ACE_TMAIN (int argc, ACE_TCHAR *argv[])"), __LINE__, ACE_TEXT(__FILE__)); diff --git a/examples/NT_Service/main.cpp b/examples/NT_Service/main.cpp index de95db92bb2..6c8d51fea73 100644 --- a/examples/NT_Service/main.cpp +++ b/examples/NT_Service/main.cpp @@ -246,7 +246,7 @@ Process::run (int argc, ACE_TCHAR* argv[]) } int -main (int argc, ACE_TCHAR* argv[]) +ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { return PROCESS::instance ()->run (argc, argv); } diff --git a/examples/Naming/test_multiple_contexts.cpp b/examples/Naming/test_multiple_contexts.cpp index c1916eef154..b9a7b5969f8 100644 --- a/examples/Naming/test_multiple_contexts.cpp +++ b/examples/Naming/test_multiple_contexts.cpp @@ -5,7 +5,7 @@ ACE_RCSID(Naming, test_multiple_contexts, "$Id$") -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { static u_long ACE_DEFAULT_BASE_ADDR_1 = (1 * 64 * 1024 * 1024); static u_long ACE_DEFAULT_BASE_ADDR_2 = (2 * 64 * 1024 * 1024); diff --git a/examples/Naming/test_non_existent.cpp b/examples/Naming/test_non_existent.cpp index fdf709e5f64..8225555138f 100644 --- a/examples/Naming/test_non_existent.cpp +++ b/examples/Naming/test_non_existent.cpp @@ -5,7 +5,7 @@ ACE_RCSID(Naming, test_non_existent, "$Id$") -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { int i; diff --git a/examples/Naming/test_open.cpp b/examples/Naming/test_open.cpp index fa5c4897000..64166acc09d 100644 --- a/examples/Naming/test_open.cpp +++ b/examples/Naming/test_open.cpp @@ -6,7 +6,7 @@ ACE_RCSID(Naming, test_open, "$Id$") int -main (int argc, ACE_TCHAR **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { const ACE_TCHAR *host = argc > 1 ? argv[1] : ACE_TEXT("-hlocalhost"); const ACE_TCHAR *port = argc > 2 ? argv[2] : ACE_TEXT("-p20012"); diff --git a/examples/Naming/test_writers.cpp b/examples/Naming/test_writers.cpp index 1213c31b6f0..85249691abd 100644 --- a/examples/Naming/test_writers.cpp +++ b/examples/Naming/test_writers.cpp @@ -5,7 +5,7 @@ ACE_RCSID(Naming, test_writers, "$Id$") -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { int i; diff --git a/examples/RMCast/Send_File/Receiver.cpp b/examples/RMCast/Send_File/Receiver.cpp index 6cfc82c02fd..e905373b4b3 100644 --- a/examples/RMCast/Send_File/Receiver.cpp +++ b/examples/RMCast/Send_File/Receiver.cpp @@ -33,7 +33,7 @@ private: }; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc != 3) { diff --git a/examples/RMCast/Send_File/Sender.cpp b/examples/RMCast/Send_File/Sender.cpp index a3aaf4bdd08..61c40d438ac 100644 --- a/examples/RMCast/Send_File/Sender.cpp +++ b/examples/RMCast/Send_File/Sender.cpp @@ -9,7 +9,7 @@ ACE_RCSID(tests, RMCast_Examples_Sender, "$Id$") int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc != 3) { diff --git a/examples/Reactor/Dgram/CODgram.cpp b/examples/Reactor/Dgram/CODgram.cpp index 66b90cea1a9..dcf081892b6 100644 --- a/examples/Reactor/Dgram/CODgram.cpp +++ b/examples/Reactor/Dgram/CODgram.cpp @@ -187,7 +187,7 @@ run_test (u_short localport, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Estabish call backs and socket names. diff --git a/examples/Reactor/Dgram/Dgram.cpp b/examples/Reactor/Dgram/Dgram.cpp index 83be96377d1..ec0e02f4063 100644 --- a/examples/Reactor/Dgram/Dgram.cpp +++ b/examples/Reactor/Dgram/Dgram.cpp @@ -196,7 +196,7 @@ run_test (u_short localport, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Estabish call backs and socket names. diff --git a/examples/Reactor/Multicast/client.cpp b/examples/Reactor/Multicast/client.cpp index 2845d556cf0..4ffc8fc5ecb 100644 --- a/examples/Reactor/Multicast/client.cpp +++ b/examples/Reactor/Multicast/client.cpp @@ -49,7 +49,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { int user_prompt; diff --git a/examples/Reactor/Multicast/server.cpp b/examples/Reactor/Multicast/server.cpp index 4fc45ac1b8a..337b07aca36 100644 --- a/examples/Reactor/Multicast/server.cpp +++ b/examples/Reactor/Multicast/server.cpp @@ -207,7 +207,7 @@ Server_Events::handle_input (ACE_HANDLE) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { // Instantiate a server which will receive messages for DURATION // seconds. diff --git a/examples/Reactor/Ntalker/ntalker.cpp b/examples/Reactor/Ntalker/ntalker.cpp index e114876cfcb..8fd98097cef 100644 --- a/examples/Reactor/Ntalker/ntalker.cpp +++ b/examples/Reactor/Ntalker/ntalker.cpp @@ -199,7 +199,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); @@ -217,7 +217,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *argv[]) +ACE_TMAIN (int, ACE_TCHAR *argv[]) { ACE_ERROR_RETURN ((LM_ERROR, "error: %s must be run on a platform that support IP multicast\n", diff --git a/examples/Registry/test_registry_iterator.cpp b/examples/Registry/test_registry_iterator.cpp index 2ddecccc240..136a01fe795 100644 --- a/examples/Registry/test_registry_iterator.cpp +++ b/examples/Registry/test_registry_iterator.cpp @@ -26,7 +26,7 @@ static void print_context (ACE_Registry::Naming_Context &parent, static void indent (u_long indentation); int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result; ACE_Registry::Naming_Context naming_context; diff --git a/examples/Registry/test_registry_update.cpp b/examples/Registry/test_registry_update.cpp index 49728e097c5..c84e1fda13b 100644 --- a/examples/Registry/test_registry_update.cpp +++ b/examples/Registry/test_registry_update.cpp @@ -30,7 +30,7 @@ static int update_counter (HKEY predefined, static void setup_names (); int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { int result; u_long current_counter = 0; diff --git a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp index aeba5fbc4da..7cb5b719a1b 100644 --- a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp @@ -42,7 +42,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { program_name = argv[0]; parse_args (argc, argv); diff --git a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp index d36e916ec1f..39a49656914 100644 --- a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp @@ -53,7 +53,7 @@ parse_args (int argc, char *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { program_name = argv[0]; @@ -113,7 +113,7 @@ main (int argc, ACE_TCHAR *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), diff --git a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp index 2c6fdc7818e..51b566c24e9 100644 --- a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp @@ -61,7 +61,7 @@ parse_arguments (int argc, ACE_TCHAR *argv[]) } int -main(int argc, ACE_TCHAR *argv[]) +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { parse_arguments (argc, argv); diff --git a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp index 93216dca095..ca77c0b5faa 100644 --- a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp @@ -108,7 +108,7 @@ do_client_processing (ACE_LSOCK_Stream &sc) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); @@ -137,7 +137,7 @@ main (int argc, ACE_TCHAR *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), diff --git a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp index 706a857b3a9..a565c8b4f15 100644 --- a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp @@ -57,7 +57,7 @@ parse_arguments (int argc, char *argv[]) } int -main(int argc, ACE_TCHAR *argv[]) +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { parse_arguments (argc, argv); @@ -95,7 +95,7 @@ main(int argc, ACE_TCHAR *argv[]) #else #include <stdio.h> int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "This feature is not supported\n"), diff --git a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp index 350d3cdca4b..a010a28420d 100644 --- a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp @@ -49,7 +49,7 @@ parse_args (int argc, char *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); @@ -100,7 +100,7 @@ main (int argc, ACE_TCHAR *argv[]) return 0; } #else -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), diff --git a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp index 24ad5ac7f09..7640824a36e 100644 --- a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp @@ -56,7 +56,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); diff --git a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp index 18d1b23bff8..3c8bcdfab81 100644 --- a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp @@ -50,7 +50,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_LOG_MSG->open (argv[0]); diff --git a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp index 6684d67bd2c..636223e2349 100644 --- a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp @@ -57,7 +57,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); ACE_INET_Addr sa (port_number, host_name); diff --git a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp index 3a5a91facdf..6c0c3fb9d1d 100644 --- a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp @@ -57,7 +57,7 @@ parse_args (int argc, char *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { parse_args (argc, argv); void *cp; @@ -111,7 +111,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "you must have TLI to run this test\n"), diff --git a/examples/Service_Configurator/Misc/main.cpp b/examples/Service_Configurator/Misc/main.cpp index f3d3a04964b..971d80fb70b 100644 --- a/examples/Service_Configurator/Misc/main.cpp +++ b/examples/Service_Configurator/Misc/main.cpp @@ -31,7 +31,7 @@ ACE_RCSID(Misc, main, "$Id$") ACE_STATIC_SVC_REQUIRE (Timer_Service_1) int -main (int, ACE_TCHAR *argv[]) +ACE_TMAIN (int, ACE_TCHAR *argv[]) { // Set up an argument vector that we can add entries to! ACE_ARGV args; diff --git a/examples/Synch/proc_sema.cpp b/examples/Synch/proc_sema.cpp index 85d829c9d3c..4ee81f6f9c0 100644 --- a/examples/Synch/proc_sema.cpp +++ b/examples/Synch/proc_sema.cpp @@ -41,7 +41,7 @@ int consumer (ACE_SYNCH_PROCESS_SEMAPHORE &sema, return 0; } -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("csn:xi:d:")); diff --git a/examples/Threads/auto_event.cpp b/examples/Threads/auto_event.cpp index 43a1d26ae53..24260940a67 100644 --- a/examples/Threads/auto_event.cpp +++ b/examples/Threads/auto_event.cpp @@ -74,7 +74,7 @@ writer (void *arg) } int -main (int argc, ACE_TCHAR **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { // Shared data: set by writer, read by reader. int data; @@ -111,7 +111,7 @@ template class ACE_Singleton<ACE_Auto_Event, ACE_Thread_Mutex>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/barrier1.cpp b/examples/Threads/barrier1.cpp index 03e109c36b9..e6d8c8f17dc 100644 --- a/examples/Threads/barrier1.cpp +++ b/examples/Threads/barrier1.cpp @@ -50,7 +50,7 @@ tester (Tester_Args *args) static const int DEFAULT_ITERATIONS = 5; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Service_Config daemon (argv[0]); @@ -74,7 +74,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/barrier2.cpp b/examples/Threads/barrier2.cpp index ee2e094b83b..cdbe6ff95f3 100644 --- a/examples/Threads/barrier2.cpp +++ b/examples/Threads/barrier2.cpp @@ -278,7 +278,7 @@ Worker_Task<BARRIER>::input (ACE_Message_Block *mb) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; @@ -309,7 +309,7 @@ template class Worker_Task<ACE_Null_Barrier>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/cancel.cpp b/examples/Threads/cancel.cpp index 3754069cbef..05f56101f31 100644 --- a/examples/Threads/cancel.cpp +++ b/examples/Threads/cancel.cpp @@ -30,7 +30,7 @@ static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; static const int DEFAULT_ITERATIONS = 100000; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Service_Config daemon; @@ -67,7 +67,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); } diff --git a/examples/Threads/future1.cpp b/examples/Threads/future1.cpp index 213a3aa151f..6823b27625a 100644 --- a/examples/Threads/future1.cpp +++ b/examples/Threads/future1.cpp @@ -288,7 +288,7 @@ Scheduler::work (u_long newparam, static size_t n_loops = 100; int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { Scheduler *andres, *peter, *helmut, *matias; @@ -426,7 +426,7 @@ template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/future2.cpp b/examples/Threads/future2.cpp index 7e7339532b2..6178396ec61 100644 --- a/examples/Threads/future2.cpp +++ b/examples/Threads/future2.cpp @@ -498,7 +498,7 @@ test_timeout (int n_iterations) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { int n_iterations = determine_iterations (); @@ -547,7 +547,7 @@ template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/manual_event.cpp b/examples/Threads/manual_event.cpp index f843df4d614..6871fbadeea 100644 --- a/examples/Threads/manual_event.cpp +++ b/examples/Threads/manual_event.cpp @@ -79,7 +79,7 @@ worker (void *arg) } int -main (int argc, ACE_TCHAR **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { int n_threads = argc == 2 ? ACE_OS::atoi (argv[1]) : 5; @@ -111,7 +111,7 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/process_manager.cpp b/examples/Threads/process_manager.cpp index 7b5fcc19a49..94b5eb23b35 100644 --- a/examples/Threads/process_manager.cpp +++ b/examples/Threads/process_manager.cpp @@ -169,7 +169,7 @@ respawn_self (const ACE_TCHAR *myname, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Service_Config daemon; diff --git a/examples/Threads/process_mutex.cpp b/examples/Threads/process_mutex.cpp index ef6bdd19adb..61c27fd5cdb 100644 --- a/examples/Threads/process_mutex.cpp +++ b/examples/Threads/process_mutex.cpp @@ -21,7 +21,7 @@ handler (int) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { const ACE_TCHAR *name = argc > 1 ? argv[1] : ACE_TEXT("hello"); int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; @@ -64,7 +64,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "ACE doesn't support support threads on this platform (yet)\n"), diff --git a/examples/Threads/process_semaphore.cpp b/examples/Threads/process_semaphore.cpp index 4a7002de074..43e57dacd4c 100644 --- a/examples/Threads/process_semaphore.cpp +++ b/examples/Threads/process_semaphore.cpp @@ -19,7 +19,7 @@ handler (int) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { const ACE_TCHAR *name = argc == 1 ? ACE_TEXT("hello") : argv[1]; int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; diff --git a/examples/Threads/reader_writer.cpp b/examples/Threads/reader_writer.cpp index 34d4cc6ae57..8332eb93efa 100644 --- a/examples/Threads/reader_writer.cpp +++ b/examples/Threads/reader_writer.cpp @@ -155,7 +155,7 @@ writer (void *) // Spawn off threads. -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_LOG_MSG->open (argv[0]); parse_args (argc, argv); @@ -191,7 +191,7 @@ template class ACE_Write_Guard<ACE_RW_Mutex>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/recursive_mutex.cpp b/examples/Threads/recursive_mutex.cpp index 33a276207dd..ed7a602826c 100644 --- a/examples/Threads/recursive_mutex.cpp +++ b/examples/Threads/recursive_mutex.cpp @@ -85,7 +85,7 @@ worker (void *arg) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Service_Config daemon (argv[0]); @@ -101,7 +101,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "ACE doesn't support support process mutexes on this platform (yet)\n"), diff --git a/examples/Threads/task_five.cpp b/examples/Threads/task_five.cpp index e9c7a55994e..c43dd88f1b4 100644 --- a/examples/Threads/task_five.cpp +++ b/examples/Threads/task_five.cpp @@ -160,7 +160,7 @@ work (ACE_Thread_Manager *thr_mgr, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { size_t stack_size = argc > 1 ? ACE_OS::atoi (argv[1]) : default_stack_size; const int n_tasks = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_TASKS; diff --git a/examples/Threads/task_four.cpp b/examples/Threads/task_four.cpp index 687e6d99469..d13330b96df 100644 --- a/examples/Threads/task_four.cpp +++ b/examples/Threads/task_four.cpp @@ -251,7 +251,7 @@ static const size_t DEFAULT_TASKS = 4; static const size_t DEFAULT_ITERATIONS = 5; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { size_t n_tasks = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_TASKS; size_t n_threads = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_THREADS; @@ -296,7 +296,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); diff --git a/examples/Threads/task_one.cpp b/examples/Threads/task_one.cpp index 85f258f8824..e5e0b5e7234 100644 --- a/examples/Threads/task_one.cpp +++ b/examples/Threads/task_one.cpp @@ -75,7 +75,7 @@ Barrier_Task::svc (void) static const int DEFAULT_ITERATIONS = 5; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; diff --git a/examples/Threads/task_three.cpp b/examples/Threads/task_three.cpp index 7c2791b5964..23434dec97a 100644 --- a/examples/Threads/task_three.cpp +++ b/examples/Threads/task_three.cpp @@ -172,7 +172,7 @@ handler (int) } int -main (int argc, ACE_TCHAR **) +ACE_TMAIN (int argc, ACE_TCHAR **) { if (argc > 1) { @@ -242,7 +242,7 @@ main (int argc, ACE_TCHAR **) #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); diff --git a/examples/Threads/task_two.cpp b/examples/Threads/task_two.cpp index 95ce70f9c03..81d829f7990 100644 --- a/examples/Threads/task_two.cpp +++ b/examples/Threads/task_two.cpp @@ -85,7 +85,7 @@ Task_Test::svc (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : default_threads; int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : default_iterations; @@ -148,7 +148,7 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/thread_manager.cpp b/examples/Threads/thread_manager.cpp index 6d8a465d40e..37b017df439 100644 --- a/examples/Threads/thread_manager.cpp +++ b/examples/Threads/thread_manager.cpp @@ -47,7 +47,7 @@ static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; static const int DEFAULT_ITERATIONS = 100000; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Service_Config daemon; @@ -98,7 +98,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); } diff --git a/examples/Threads/thread_pool.cpp b/examples/Threads/thread_pool.cpp index 3e25b0071b1..bb45c652e90 100644 --- a/examples/Threads/thread_pool.cpp +++ b/examples/Threads/thread_pool.cpp @@ -226,7 +226,7 @@ producer (Thread_Pool &thread_pool) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : n_iterations; @@ -257,7 +257,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); diff --git a/examples/Threads/thread_specific.cpp b/examples/Threads/thread_specific.cpp index be94adb98ee..542f4fa25cf 100644 --- a/examples/Threads/thread_specific.cpp +++ b/examples/Threads/thread_specific.cpp @@ -185,7 +185,7 @@ handler (int signum) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // The Service_Config must be the first object defined in main... ACE_Service_Config daemon (argv[0]); @@ -224,7 +224,7 @@ template class ACE_TSS<Errno>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "ACE doesn't support support threads on this platform (yet)\n"), diff --git a/examples/Threads/token.cpp b/examples/Threads/token.cpp index 79ca3fdeaea..b87960ee072 100644 --- a/examples/Threads/token.cpp +++ b/examples/Threads/token.cpp @@ -61,7 +61,7 @@ My_Task::svc (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { My_Task tasks (argc > 1 ? ACE_OS::atoi (argv[1]) : 4); @@ -69,7 +69,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't support threads\n"), -1); } diff --git a/examples/Threads/tss1.cpp b/examples/Threads/tss1.cpp index 65ef76dfdad..b958a367396 100644 --- a/examples/Threads/tss1.cpp +++ b/examples/Threads/tss1.cpp @@ -117,7 +117,7 @@ template class Tester<ACE_MT_SYNCH>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { Tester<ACE_MT_SYNCH> tester; @@ -156,7 +156,7 @@ main (int, ACE_TCHAR *[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, "ACE doesn't support support threads on this platform (yet)\n"), diff --git a/examples/Threads/tss2.cpp b/examples/Threads/tss2.cpp index 38cca024ff0..4cc9a7198a0 100644 --- a/examples/Threads/tss2.cpp +++ b/examples/Threads/tss2.cpp @@ -115,7 +115,7 @@ Test_Task::open (void *arg) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { num_tasks = argc > 1 ? ACE_OS::atoi (argv[1]) : MAX_TASKS; @@ -199,7 +199,7 @@ template class ACE_TSS_Singleton<TSS_Data, ACE_SYNCH_MUTEX>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); return 0; diff --git a/examples/Threads/wfmo.cpp b/examples/Threads/wfmo.cpp index 18e7a2f6d9b..5739ce5d566 100644 --- a/examples/Threads/wfmo.cpp +++ b/examples/Threads/wfmo.cpp @@ -83,7 +83,7 @@ WFMO_Test::svc (void) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int thread_count = THREAD_COUNT; @@ -123,7 +123,7 @@ main (int argc, ACE_TCHAR *argv[]) } #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_DEBUG ((LM_DEBUG, "this test only runs on Win32\n")); } |