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 | 3ae167a5e9d819407fa4a05f0d518b25265d76bf (patch) | |
tree | 5ec27b869b80ab5e84a381932afb8d7df29634aa | |
parent | a7b3c4626215b3e743ad4a092ac8619f192a6437 (diff) | |
download | ATCD-3ae167a5e9d819407fa4a05f0d518b25265d76bf.tar.gz |
ChangeLogTag:Wed Mar 6 14:43:34 2002 Nanbor Wang <nanbor@cs.wustl.edu>
222 files changed, 593 insertions, 437 deletions
diff --git a/ACEXML/examples/SAXPrint/main.cpp b/ACEXML/examples/SAXPrint/main.cpp index 47dea304662..2d51dac2fec 100644 --- a/ACEXML/examples/SAXPrint/main.cpp +++ b/ACEXML/examples/SAXPrint/main.cpp @@ -7,7 +7,7 @@ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACEXML_DefaultHandler *handler = 0; { diff --git a/ACEXML/tests/NamespaceSupport_Test.cpp b/ACEXML/tests/NamespaceSupport_Test.cpp index 45509b21053..96bcfa7ab30 100644 --- a/ACEXML/tests/NamespaceSupport_Test.cpp +++ b/ACEXML/tests/NamespaceSupport_Test.cpp @@ -2,7 +2,7 @@ #include "ACEXML/common/NamespaceSupport.h" -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACEXML_NamespaceSupport xmlns; diff --git a/ACEXML/tests/Transcoder_Test.cpp b/ACEXML/tests/Transcoder_Test.cpp index ff66804b309..2e87a52a7e7 100644 --- a/ACEXML/tests/Transcoder_Test.cpp +++ b/ACEXML/tests/Transcoder_Test.cpp @@ -25,7 +25,7 @@ void dump_utf16 (const ACEXML_UTF16 *data, } int -main (int, ACE_TCHAR*[]) +ACE_TMAIN (int, ACE_TCHAR*[]) { ACEXML_UTF16 org [18]; // = { 1, 2, 4, 8, 0x10, 0x20, 0x40, diff --git a/ChangeLog b/ChangeLog index a7c657dcda6..af5d2b4ff67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +Wed Mar 6 14:43:34 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Reverted my previous "fix" to the argv argument type. + + Mon Jan 21 23:27:03 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + A program entry poing <code>main</code> can take any of the + three forms: + + int main (int argc, char *argv[]) + int wmain (int argc, wchar_t *argv[]) + int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) + + Of them, the entry point <code>main</code> always gives you + the command line arguemnt in char strings form. The entry + point <code>wmain</code> currently can only be used under + Win32 and it returns the command line arguments in wchar + strings format. Defining the <code>ACE_TMAIN</code> as the + program entry point is the more portable form. The command + line arguments are given in char strings in most cases, + or wchar strings when <code>ACE_USES_WCHAR</code> is defined. + See <code>$ACE_ROOT/docs/wchar.txt</code> for more information + on ACE support on wchar. + + * docs/ACE-guidelines.html: Added a new guideline explaining which + main entry point to use, as above. + + * bin/main2TMAIN.pl: Script to replace entry points of the form + + main (int, ACE_TCHAR *[]) + + to + + ACE_TMAIN (int, ACE_TCHAR *[]) + + * *.cpp: Changed to use the new ACE_TMAIN. + Tue Mar 06 14:30:12 2002 Johnny Willemsen <jwillemsen@remedy.nl> * tests/MEM_Stream_Test.cpp: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index a7c657dcda6..af5d2b4ff67 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,40 @@ +Wed Mar 6 14:43:34 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Reverted my previous "fix" to the argv argument type. + + Mon Jan 21 23:27:03 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + A program entry poing <code>main</code> can take any of the + three forms: + + int main (int argc, char *argv[]) + int wmain (int argc, wchar_t *argv[]) + int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) + + Of them, the entry point <code>main</code> always gives you + the command line arguemnt in char strings form. The entry + point <code>wmain</code> currently can only be used under + Win32 and it returns the command line arguments in wchar + strings format. Defining the <code>ACE_TMAIN</code> as the + program entry point is the more portable form. The command + line arguments are given in char strings in most cases, + or wchar strings when <code>ACE_USES_WCHAR</code> is defined. + See <code>$ACE_ROOT/docs/wchar.txt</code> for more information + on ACE support on wchar. + + * docs/ACE-guidelines.html: Added a new guideline explaining which + main entry point to use, as above. + + * bin/main2TMAIN.pl: Script to replace entry points of the form + + main (int, ACE_TCHAR *[]) + + to + + ACE_TMAIN (int, ACE_TCHAR *[]) + + * *.cpp: Changed to use the new ACE_TMAIN. + Tue Mar 06 14:30:12 2002 Johnny Willemsen <jwillemsen@remedy.nl> * tests/MEM_Stream_Test.cpp: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index a7c657dcda6..af5d2b4ff67 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,40 @@ +Wed Mar 6 14:43:34 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.h: Reverted my previous "fix" to the argv argument type. + + Mon Jan 21 23:27:03 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + A program entry poing <code>main</code> can take any of the + three forms: + + int main (int argc, char *argv[]) + int wmain (int argc, wchar_t *argv[]) + int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) + + Of them, the entry point <code>main</code> always gives you + the command line arguemnt in char strings form. The entry + point <code>wmain</code> currently can only be used under + Win32 and it returns the command line arguments in wchar + strings format. Defining the <code>ACE_TMAIN</code> as the + program entry point is the more portable form. The command + line arguments are given in char strings in most cases, + or wchar strings when <code>ACE_USES_WCHAR</code> is defined. + See <code>$ACE_ROOT/docs/wchar.txt</code> for more information + on ACE support on wchar. + + * docs/ACE-guidelines.html: Added a new guideline explaining which + main entry point to use, as above. + + * bin/main2TMAIN.pl: Script to replace entry points of the form + + main (int, ACE_TCHAR *[]) + + to + + ACE_TMAIN (int, ACE_TCHAR *[]) + + * *.cpp: Changed to use the new ACE_TMAIN. + Tue Mar 06 14:30:12 2002 Johnny Willemsen <jwillemsen@remedy.nl> * tests/MEM_Stream_Test.cpp: @@ -7089,6 +7089,16 @@ extern "C" ACE_OS_Export void ace_mutex_lock_cleanup_adapter (void *args); # define ACE_MAIN main # endif /* ! ACE_MAIN */ +# if !defined (ACE_WMAIN) +# define ACE_WMAIN wmain +# endif /* ! ACE_WMAIN */ + +# if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) +# define ACE_TMAIN wmain +# else +# define ACE_TMAIN main +# endif + # if defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER) # if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) # define ACE_HAS_NONSTATIC_OBJECT_MANAGER @@ -7155,29 +7165,29 @@ ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ \ } \ int \ ace_main_i -# elif defined (ACE_WIN32) && defined (UNICODE) -# define wmain \ -ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \ +# else +# define main \ +ace_main_i (int, char *[]); /* forward declaration */ \ int \ -wmain (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \ +ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., main */ \ { \ ACE_MAIN_OBJECT_MANAGER \ return ace_main_i (argc, argv); /* what the user calls "main" */ \ } \ int \ ace_main_i -# define main wmain -# else -# define main \ +# if defined (ACE_WIN32) +# define wmain \ ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \ int \ -ACE_MAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \ +ACE_WMAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \ { \ ACE_MAIN_OBJECT_MANAGER \ return ace_main_i (argc, argv); /* what the user calls "main" */ \ } \ int \ ace_main_i +# endif /* ACE_WIN32 && UNICODE */ # endif /* ACE_PSOSIM */ # endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp index 5c76230b920..fd381508382 100644 --- a/ace/Svc_Conf_y.cpp +++ b/ace/Svc_Conf_y.cpp @@ -4,20 +4,20 @@ #define ACE_YYBISON 1 /* Identify Bison output. */ -#define ACE_DYNAMIC 257 -#define ACE_STATIC 258 -#define ACE_SUSPEND 259 -#define ACE_RESUME 260 -#define ACE_REMOVE 261 -#define ACE_USTREAM 262 -#define ACE_MODULE_T 263 -#define ACE_STREAM_T 264 -#define ACE_SVC_OBJ_T 265 -#define ACE_ACTIVE 266 -#define ACE_INACTIVE 267 -#define ACE_PATHNAME 268 -#define ACE_IDENT 269 -#define ACE_STRING 270 +#define ACE_DYNAMIC 257 +#define ACE_STATIC 258 +#define ACE_SUSPEND 259 +#define ACE_RESUME 260 +#define ACE_REMOVE 261 +#define ACE_USTREAM 262 +#define ACE_MODULE_T 263 +#define ACE_STREAM_T 264 +#define ACE_SVC_OBJ_T 265 +#define ACE_ACTIVE 266 +#define ACE_INACTIVE 267 +#define ACE_PATHNAME 268 +#define ACE_IDENT 269 +#define ACE_STRING 270 // $Id$ @@ -55,9 +55,9 @@ int ace_yyerrno = 0; -#define ACE_YYFINAL 66 -#define ACE_YYFLAG -32768 -#define ACE_YYNTBASE 23 +#define ACE_YYFINAL 66 +#define ACE_YYFLAG -32768 +#define ACE_YYNTBASE 23 #define ACE_YYTRANSLATE(x) ((unsigned)(x) <= 270 ? ace_yytranslate[x] : 43) @@ -225,7 +225,7 @@ static const short ace_yypgoto[] = {-32768, }; -#define ACE_YYLAST 61 +#define ACE_YYLAST 61 static const short ace_yytable[] = { 23, @@ -298,7 +298,7 @@ static const short ace_yycheck[] = { 8, since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ + instead, just don't use alloca. */ #include <malloc.h> #endif #else /* not MSDOS, or __TURBOC__ */ @@ -311,7 +311,7 @@ static const short ace_yycheck[] = { 8, #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ + and on HPUX 10. Eventually we can turn this on. */ #define ACE_YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ @@ -333,50 +333,50 @@ static const short ace_yycheck[] = { 8, It is replaced by the list of actions, each action as one case of the switch. */ -#define ace_yyerrok (ace_yyerrstatus = 0) -#define ace_yyclearin (ace_yychar = ACE_YYEMPTY) -#define ACE_YYEMPTY -2 -#define ACE_YYEOF 0 -#define ACE_YYACCEPT goto ace_yyacceptlab -#define ACE_YYABORT goto ace_yyabortlab -#define ACE_YYERROR goto ace_yyerrlab1 +#define ace_yyerrok (ace_yyerrstatus = 0) +#define ace_yyclearin (ace_yychar = ACE_YYEMPTY) +#define ACE_YYEMPTY -2 +#define ACE_YYEOF 0 +#define ACE_YYACCEPT goto ace_yyacceptlab +#define ACE_YYABORT goto ace_yyabortlab +#define ACE_YYERROR goto ace_yyerrlab1 /* Like ACE_YYERROR except do call ace_yyerror. This remains here temporarily to ease the transition to the new meaning of ACE_YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ -#define ACE_YYFAIL goto ace_yyerrlab +#define ACE_YYFAIL goto ace_yyerrlab #define ACE_YYRECOVERING() (!!ace_yyerrstatus) #define ACE_YYBACKUP(token, value) \ -do \ - if (ace_yychar == ACE_YYEMPTY && ace_yylen == 1) \ - { ace_yychar = (token), ace_yylval = (value); \ - ace_yychar1 = ACE_YYTRANSLATE (ace_yychar); \ - ACE_YYPOPSTACK; \ - goto ace_yybackup; \ - } \ - else \ - { ace_yyerror (ACE_LIB_TEXT("syntax error: cannot back up")); ACE_YYERROR; } \ +do \ + if (ace_yychar == ACE_YYEMPTY && ace_yylen == 1) \ + { ace_yychar = (token), ace_yylval = (value); \ + ace_yychar1 = ACE_YYTRANSLATE (ace_yychar); \ + ACE_YYPOPSTACK; \ + goto ace_yybackup; \ + } \ + else \ + { ace_yyerror (ACE_LIB_TEXT("syntax error: cannot back up")); ACE_YYERROR; } \ while (0) -#define ACE_YYTERROR 1 -#define ACE_YYERRCODE 256 +#define ACE_YYTERROR 1 +#define ACE_YYERRCODE 256 #ifndef ACE_YYPURE -#define ACE_YYLEX ace_yylex() +#define ACE_YYLEX ace_yylex() #endif #ifdef ACE_YYPURE #ifdef ACE_YYLSP_NEEDED #ifdef ACE_YYLEX_PARAM -#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc, ACE_YYLEX_PARAM) +#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc, ACE_YYLEX_PARAM) #else -#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc) +#define ACE_YYLEX ace_yylex(&ace_yylval, &ace_yylloc) #endif #else /* not ACE_YYLSP_NEEDED */ #ifdef ACE_YYLEX_PARAM -#define ACE_YYLEX ace_yylex(&ace_yylval, ACE_YYLEX_PARAM) +#define ACE_YYLEX ace_yylex(&ace_yylval, ACE_YYLEX_PARAM) #else -#define ACE_YYLEX ace_yylex(&ace_yylval) +#define ACE_YYLEX ace_yylex(&ace_yylval) #endif #endif /* not ACE_YYLSP_NEEDED */ #endif @@ -385,27 +385,27 @@ while (0) #ifndef ACE_YYPURE -int ace_yychar; /* the lookahead symbol */ -ACE_YYSTYPE ace_yylval; /* the semantic value of the */ - /* lookahead symbol */ +int ace_yychar; /* the lookahead symbol */ +ACE_YYSTYPE ace_yylval; /* the semantic value of the */ + /* lookahead symbol */ #ifdef ACE_YYLSP_NEEDED -ACE_YYLTYPE ace_yylloc; /* location data for the lookahead */ - /* symbol */ +ACE_YYLTYPE ace_yylloc; /* location data for the lookahead */ + /* symbol */ #endif -int ace_yynerrs; /* number of parse errors so far */ +int ace_yynerrs; /* number of parse errors so far */ #endif /* not ACE_YYPURE */ #if ACE_YYDEBUG != 0 -int ace_yydebug; /* nonzero means print parse trace */ +int ace_yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif -/* ACE_YYINITDEPTH indicates the initial size of the parser's stacks */ +/* ACE_YYINITDEPTH indicates the initial size of the parser's stacks */ -#ifndef ACE_YYINITDEPTH +#ifndef ACE_YYINITDEPTH #define ACE_YYINITDEPTH 200 #endif @@ -425,9 +425,9 @@ int ace_yydebug; /* nonzero means print parse trace */ definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __ace_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __ace_yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities @@ -502,17 +502,17 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) register int ace_yyn; register short *ace_yyssp; register ACE_YYSTYPE *ace_yyvsp; - int ace_yyerrstatus; /* number of tokens to shift before error messages enabled */ - int ace_yychar1 = 0; /* lookahead token as an internal (translated) token number */ + int ace_yyerrstatus; /* number of tokens to shift before error messages enabled */ + int ace_yychar1 = 0; /* lookahead token as an internal (translated) token number */ - short ace_yyssa[ACE_YYINITDEPTH]; /* the state stack */ - ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH]; /* the semantic value stack */ + short ace_yyssa[ACE_YYINITDEPTH]; /* the state stack */ + ACE_YYSTYPE ace_yyvsa[ACE_YYINITDEPTH]; /* the semantic value stack */ - short *ace_yyss = ace_yyssa; /* refer to the stacks thru separate pointers */ - ACE_YYSTYPE *ace_yyvs = ace_yyvsa; /* to allow ace_yyoverflow to reallocate them elsewhere */ + short *ace_yyss = ace_yyssa; /* refer to the stacks thru separate pointers */ + ACE_YYSTYPE *ace_yyvs = ace_yyvsa; /* to allow ace_yyoverflow to reallocate them elsewhere */ #ifdef ACE_YYLSP_NEEDED - ACE_YYLTYPE ace_yylsa[ACE_YYINITDEPTH]; /* the location stack */ + ACE_YYLTYPE ace_yylsa[ACE_YYINITDEPTH]; /* the location stack */ ACE_YYLTYPE *ace_yyls = ace_yylsa; ACE_YYLTYPE *ace_yylsp; @@ -533,9 +533,9 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) #endif #endif - ACE_YYSTYPE ace_yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ + ACE_YYSTYPE ace_yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ int ace_yylen; @@ -547,7 +547,7 @@ ace_yyparse(ACE_YYPARSE_PARAM_ARG) ace_yystate = 0; ace_yyerrstatus = 0; ace_yynerrs = 0; - ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */ + ace_yychar = ACE_YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack @@ -582,20 +582,20 @@ ace_yynewstate: #ifdef ace_yyoverflow /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ + the data in use in that stack, in bytes. */ #ifdef ACE_YYLSP_NEEDED /* This used to be a conditional around just the two extra args, - but that might be undefined if ace_yyoverflow is a macro. */ + but that might be undefined if ace_yyoverflow is a macro. */ ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"), - &ace_yyss1, size * sizeof (*ace_yyssp), - &ace_yyvs1, size * sizeof (*ace_yyvsp), - &ace_yyls1, size * sizeof (*ace_yylsp), - &ace_yystacksize); + &ace_yyss1, size * sizeof (*ace_yyssp), + &ace_yyvs1, size * sizeof (*ace_yyvsp), + &ace_yyls1, size * sizeof (*ace_yylsp), + &ace_yystacksize); #else ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"), - &ace_yyss1, size * sizeof (*ace_yyssp), - &ace_yyvs1, size * sizeof (*ace_yyvsp), - &ace_yystacksize); + &ace_yyss1, size * sizeof (*ace_yyssp), + &ace_yyvs1, size * sizeof (*ace_yyvsp), + &ace_yystacksize); #endif ace_yyss = ace_yyss1; ace_yyvs = ace_yyvs1; @@ -605,34 +605,34 @@ ace_yynewstate: #else /* no ace_yyoverflow */ /* Extend the stack our own way. */ if (ace_yystacksize >= ACE_YYMAXDEPTH) - { - ace_yyerror(ACE_LIB_TEXT("parser stack overflow")); - if (ace_yyfree_stacks) - { - free (ace_yyss); - free (ace_yyvs); + { + ace_yyerror(ACE_LIB_TEXT("parser stack overflow")); + if (ace_yyfree_stacks) + { + free (ace_yyss); + free (ace_yyvs); #ifdef ACE_YYLSP_NEEDED - free (ace_yyls); + free (ace_yyls); #endif - } - return 2; - } + } + return 2; + } ace_yystacksize *= 2; if (ace_yystacksize > ACE_YYMAXDEPTH) - ace_yystacksize = ACE_YYMAXDEPTH; + ace_yystacksize = ACE_YYMAXDEPTH; #ifndef ACE_YYSTACK_USE_ALLOCA ace_yyfree_stacks = 1; #endif ace_yyss = (short *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyssp)); __ace_yy_memcpy ((ACE_TCHAR *)ace_yyss, (ACE_TCHAR *)ace_yyss1, - size * (unsigned int) sizeof (*ace_yyssp)); + size * (unsigned int) sizeof (*ace_yyssp)); ace_yyvs = (ACE_YYSTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyvsp)); __ace_yy_memcpy ((ACE_TCHAR *)ace_yyvs, (ACE_TCHAR *)ace_yyvs1, - size * (unsigned int) sizeof (*ace_yyvsp)); + size * (unsigned int) sizeof (*ace_yyvsp)); #ifdef ACE_YYLSP_NEEDED ace_yyls = (ACE_YYLTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yylsp)); __ace_yy_memcpy ((ACE_TCHAR *)ace_yyls, (ACE_TCHAR *)ace_yyls1, - size * (unsigned int) sizeof (*ace_yylsp)); + size * (unsigned int) sizeof (*ace_yylsp)); #endif #endif /* no ace_yyoverflow */ @@ -644,11 +644,11 @@ ace_yynewstate: #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Stack size increased to %d\n"), ace_yystacksize); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Stack size increased to %d\n"), ace_yystacksize); #endif if (ace_yyssp >= ace_yyss + ace_yystacksize - 1) - ACE_YYABORT; + ACE_YYABORT; } #if ACE_YYDEBUG != 0 @@ -678,21 +678,21 @@ ace_yynewstate: { #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Reading a token: ")); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Reading a token: ")); #endif ace_yychar = ACE_YYLEX; } /* Convert token to internal form (in ace_yychar1) for indexing tables with */ - if (ace_yychar <= 0) /* This means end of input. */ + if (ace_yychar <= 0) /* This means end of input. */ { ace_yychar1 = 0; - ace_yychar = ACE_YYEOF; /* Don't call ACE_YYLEX any more */ + ace_yychar = ACE_YYEOF; /* Don't call ACE_YYLEX any more */ #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Now at end of input.\n")); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Now at end of input.\n")); #endif } else @@ -701,15 +701,15 @@ ace_yynewstate: #if ACE_YYDEBUG != 0 if (ace_yydebug) - { - ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Next token is %d (%s"), ace_yychar, ace_yytname[ace_yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ + { + ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Next token is %d (%s"), ace_yychar, ace_yytname[ace_yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ #ifdef ACE_YYPRINT - ACE_YYPRINT (stderr, ace_yychar, ace_yylval); + ACE_YYPRINT (stderr, ace_yychar, ace_yylval); #endif - ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n")); - } + ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n")); + } #endif } @@ -729,7 +729,7 @@ ace_yynewstate: if (ace_yyn < 0) { if (ace_yyn == ACE_YYFLAG) - goto ace_yyerrlab; + goto ace_yyerrlab; ace_yyn = -ace_yyn; goto ace_yyreduce; } @@ -780,11 +780,11 @@ ace_yyreduce: int i; ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Reducing via rule %d (line %d), "), - ace_yyn, ace_yyrline[ace_yyn]); + ace_yyn, ace_yyrline[ace_yyn]); /* Print the symbols being reduced, and their result. */ for (i = ace_yyprhs[ace_yyn]; ace_yyrhs[i] > 0; i++) - ACE_OS::fprintf (stderr, ACE_LIB_TEXT("%s "), ace_yytname[ace_yyrhs[i]]); + ACE_OS::fprintf (stderr, ACE_LIB_TEXT("%s "), ace_yytname[ace_yyrhs[i]]); ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" -> %s\n"), ace_yytname[ace_yyr1[ace_yyn]]); } #endif @@ -1053,7 +1053,7 @@ case 41: short *ssp1 = ace_yyss - 1; ACE_OS::fprintf (stderr, ACE_LIB_TEXT("state stack now")); while (ssp1 != ace_yyssp) - ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1); + ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1); ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n")); } #endif @@ -1103,44 +1103,44 @@ ace_yyerrlab: /* here on detecting error */ ace_yyn = ace_yypact[ace_yystate]; if (ace_yyn > ACE_YYFLAG && ace_yyn < ACE_YYLAST) - { - int size = 0; - ACE_TCHAR *msg; - int x, count; - - count = 0; - /* Start X at -ace_yyn if nec to avoid negative indexes in ace_yycheck. */ - for (x = (ace_yyn < 0 ? -ace_yyn : 0); - x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++) - if (ace_yycheck[x + ace_yyn] == x) - size += ACE_OS::strlen(ace_yytname[x]) + 15, count++; - msg = new ACE_TCHAR[size + 15]; - if (msg != 0) - { - ACE_OS::strcpy(msg, ACE_LIB_TEXT("parse error")); - - if (count < 5) - { - count = 0; - for (x = (ace_yyn < 0 ? -ace_yyn : 0); - x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++) - if (ace_yycheck[x + ace_yyn] == x) - { - ACE_OS::strcat(msg, count == 0 ? ACE_LIB_TEXT(", expecting `") : ACE_LIB_TEXT(" or `")); - ACE_OS::strcat(msg, ACE_TEXT_CHAR_TO_TCHAR (ace_yytname[x])); - ACE_OS::strcat(msg, ACE_LIB_TEXT("'")); - count++; - } - } - ace_yyerror(msg); - delete [] msg; - } - else - ace_yyerror (ACE_LIB_TEXT("parse error; also virtual memory exceeded")); - } + { + int size = 0; + ACE_TCHAR *msg; + int x, count; + + count = 0; + /* Start X at -ace_yyn if nec to avoid negative indexes in ace_yycheck. */ + for (x = (ace_yyn < 0 ? -ace_yyn : 0); + x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++) + if (ace_yycheck[x + ace_yyn] == x) + size += ACE_OS::strlen(ace_yytname[x]) + 15, count++; + msg = new ACE_TCHAR[size + 15]; + if (msg != 0) + { + ACE_OS::strcpy(msg, ACE_LIB_TEXT("parse error")); + + if (count < 5) + { + count = 0; + for (x = (ace_yyn < 0 ? -ace_yyn : 0); + x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++) + if (ace_yycheck[x + ace_yyn] == x) + { + ACE_OS::strcat(msg, count == 0 ? ACE_LIB_TEXT(", expecting `") : ACE_LIB_TEXT(" or `")); + ACE_OS::strcat(msg, ACE_TEXT_CHAR_TO_TCHAR (ace_yytname[x])); + ACE_OS::strcat(msg, ACE_LIB_TEXT("'")); + count++; + } + } + ace_yyerror(msg); + delete [] msg; + } + else + ace_yyerror (ACE_LIB_TEXT("parse error; also virtual memory exceeded")); + } else #endif /* ACE_YYERROR_VERBOSE */ - ace_yyerror(ACE_LIB_TEXT("parse error")); + ace_yyerror(ACE_LIB_TEXT("parse error")); } goto ace_yyerrlab1; @@ -1152,11 +1152,11 @@ ace_yyerrlab1: /* here on error raised explicitly by an action */ /* return failure if at end of input */ if (ace_yychar == ACE_YYEOF) - ACE_YYABORT; + ACE_YYABORT; #if ACE_YYDEBUG != 0 if (ace_yydebug) - ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Discarding token %d (%s).\n"), ace_yychar, ace_yytname[ace_yychar1]); + ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Discarding token %d (%s).\n"), ace_yychar, ace_yytname[ace_yychar1]); #endif ace_yychar = ACE_YYEMPTY; @@ -1165,7 +1165,7 @@ ace_yyerrlab1: /* here on error raised explicitly by an action */ /* Else will try to reuse lookahead token after shifting the error token. */ - ace_yyerrstatus = 3; /* Each real token shifted decrements this */ + ace_yyerrstatus = 3; /* Each real token shifted decrements this */ goto ace_yyerrhandle; @@ -1193,7 +1193,7 @@ ace_yyerrpop: /* pop the current state because it cannot handle the error toke short *ssp1 = ace_yyss - 1; ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Error: state stack now")); while (ssp1 != ace_yyssp) - ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1); + ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1); ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n")); } #endif @@ -1212,7 +1212,7 @@ ace_yyerrhandle: if (ace_yyn < 0) { if (ace_yyn == ACE_YYFLAG) - goto ace_yyerrpop; + goto ace_yyerrpop; ace_yyn = -ace_yyn; goto ace_yyreduce; } @@ -1393,7 +1393,7 @@ ACE_TCHAR *program_name; // Main driver program. int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Svc_Conf_Param param (stdin); diff --git a/apps/JAWS/clients/Blobby/blobby.cpp b/apps/JAWS/clients/Blobby/blobby.cpp index 46e3854b266..cb2067e083d 100644 --- a/apps/JAWS/clients/Blobby/blobby.cpp +++ b/apps/JAWS/clients/Blobby/blobby.cpp @@ -27,7 +27,7 @@ ACE_RCSID(Blobby, blobby, "$Id$") int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Options is a singleton Options *options = Options::instance (); diff --git a/bin/main2TMAIN.pl b/bin/main2TMAIN.pl new file mode 100755 index 00000000000..bbbb558194b --- /dev/null +++ b/bin/main2TMAIN.pl @@ -0,0 +1,16 @@ +eval '(exit $?0)' && eval 'exec perl -pi -S $0 ${1+"$@"}' + & eval 'exec perl -pi -S $0 $argv:q' + if 0; + +# $Id$ +# +# You may want to run the "find" command with this script, which maybe +# something like this: +# +# find . -type f \( -name "*.C" -o -name "*.cc" -o -name "*.c" -o -name "*.cpp" \) -print | xargs $ACE_ROOT/bin/auto_ptr.perl + +# The first three lines above let this script run without specifying the +# full path to perl, as long as it is in the user's PATH. +# Taken from perlrun man page. + +s/main( *\(int[ A-Za-z]*, *ACE_TCHAR)/ACE_TMAIN$1/g; diff --git a/docs/ACE-guidelines.html b/docs/ACE-guidelines.html index 16dbc995d6d..70b50402bed 100644 --- a/docs/ACE-guidelines.html +++ b/docs/ACE-guidelines.html @@ -51,11 +51,29 @@ bgcolor="#ffffff"> <strong><code>-?</code></strong> command line argument, are provided to the program.<p> - <li>The program <strong><code>main</code></strong> function must + <li>A program entry poing <code>main</code> can take any of the + three forms: + <p><pre> + int main (int argc, char *argv[]) + int wmain (int argc, wchar_t *argv[]) + int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) + </pre></p> + Of them, the entry point <code>main</code> always gives you + the command line arguemnt in char strings form. The entry + point <code>wmain</code> currently can only be used under + Win32 and it returns the command line arguments in wchar + strings format. Defining the <code>ACE_TMAIN</code> as the + program entry point is the more portable form. The command + line arguments are given in char strings in most cases, + or wchar strings when <code>ACE_USES_WCHAR</code> is defined. + See <code>$ACE_ROOT/docs/wchar.txt</code> for more information + on ACE support on wchar. + + <li>The program entry point function, in any form mentioned above, must always be declared with arguments, <em>e.g.</em>, <pre> int - main (int argc, ACE_TCHAR *argv[]) + ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { [...] @@ -67,7 +85,7 @@ bgcolor="#ffffff"> arguments, don't declare them, <em>e.g.</em>, <pre> int - main (int, ACE_TCHAR *[]) + ACE_TMAIN (int, ACE_TCHAR *[]) { [...] @@ -76,7 +94,8 @@ bgcolor="#ffffff"> </pre><p> Please declare the second argument as <code>ACE_TCHAR *[]</code> - instead of <code>ACE_TCHAR **</code> or <code>char *[]</CODE>. Ancient versions of MSC + instead of <code>ACE_TCHAR **</code> or <code>char *[]</CODE>. + Ancient versions of MSC complained about <code>ACE_TCHAR **</code> and <code>char *[]</CODE> is not Unicode-compliant.<p> 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")); } diff --git a/performance-tests/Misc/basic_perf.cpp b/performance-tests/Misc/basic_perf.cpp index ea8a5bd4e16..6156ff6ce30 100644 --- a/performance-tests/Misc/basic_perf.cpp +++ b/performance-tests/Misc/basic_perf.cpp @@ -550,7 +550,7 @@ get_options (int argc, ACE_TCHAR *argv []) /////////////////////////////////////////////////////////////////////////////// int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (get_options (argc, argv)) ACE_OS::exit (-1); diff --git a/performance-tests/Misc/childbirth_time.cpp b/performance-tests/Misc/childbirth_time.cpp index a7942bd8966..8ca0de1a0f6 100644 --- a/performance-tests/Misc/childbirth_time.cpp +++ b/performance-tests/Misc/childbirth_time.cpp @@ -333,7 +333,7 @@ prof_mutex_base (size_t iteration) } int -main (int argc, ACE_TCHAR* argv[]) +ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("n:l:pftahmxe")); int c; diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp index bdb1b4692d0..78ee6289d47 100644 --- a/performance-tests/Misc/context_switch_time.cpp +++ b/performance-tests/Misc/context_switch_time.cpp @@ -1143,7 +1143,7 @@ get_options (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] > 0 ? argv[0] : ACE_TEXT("context_switch_time")); diff --git a/performance-tests/Misc/preempt.cpp b/performance-tests/Misc/preempt.cpp index 7a0ee743966..ff95d54d78e 100644 --- a/performance-tests/Misc/preempt.cpp +++ b/performance-tests/Misc/preempt.cpp @@ -356,7 +356,7 @@ get_options (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] ? argv[0] : ACE_TEXT("preempt")); diff --git a/performance-tests/Misc/test_mutex.cpp b/performance-tests/Misc/test_mutex.cpp index 7428ae48346..6c510dfc164 100644 --- a/performance-tests/Misc/test_mutex.cpp +++ b/performance-tests/Misc/test_mutex.cpp @@ -140,7 +140,7 @@ static Thread_Mutex_Derived thread_mutex_derived; static Mutex_Base *mutex_base = &thread_mutex_derived; 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; @@ -224,7 +224,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/performance-tests/Misc/test_naming.cpp b/performance-tests/Misc/test_naming.cpp index 6882a599a03..f8af5fc827d 100644 --- a/performance-tests/Misc/test_naming.cpp +++ b/performance-tests/Misc/test_naming.cpp @@ -177,7 +177,7 @@ void do_testing (int argc, ACE_TCHAR *argv[], int light) int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Do testing with SYNC on ACE_DEBUG ((LM_DEBUG, "SYNC is ON\n")); diff --git a/performance-tests/Misc/test_singleton.cpp b/performance-tests/Misc/test_singleton.cpp index 61cb38ff13d..bd76d58926a 100644 --- a/performance-tests/Misc/test_singleton.cpp +++ b/performance-tests/Misc/test_singleton.cpp @@ -91,7 +91,7 @@ DC_Singleton::instance (void) typedef ACE_Singleton <DC_Singleton, ACE_SYNCH_MUTEX> My_Singleton; 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; @@ -170,7 +170,7 @@ template class ACE_Singleton<DC_Singleton, 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/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp index 47e504591ed..963cce5109a 100644 --- a/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp +++ b/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp @@ -284,7 +284,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) // Entry point int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp index 5ac10dbfc8a..a045f3705b5 100644 --- a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp +++ b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp @@ -232,7 +232,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp index 1ff045b9b04..6a1a52ddd3a 100644 --- a/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp +++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp @@ -433,7 +433,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) /*******************************************************************/ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp index 48e220cf408..a05b2bdfbc6 100644 --- a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp +++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp @@ -274,7 +274,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result = parse_args (argc, argv); if (result != 0) diff --git a/performance-tests/TCP/tcp_test.cpp b/performance-tests/TCP/tcp_test.cpp index 9bcee4e1989..f93ba193c37 100644 --- a/performance-tests/TCP/tcp_test.cpp +++ b/performance-tests/TCP/tcp_test.cpp @@ -496,7 +496,7 @@ run_server (ACE_INET_Addr &addr) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int c, dstport = DEFPORT; int priority = diff --git a/performance-tests/UDP/udp_test.cpp b/performance-tests/UDP/udp_test.cpp index 2c6fa2373b0..2b0d8361da9 100644 --- a/performance-tests/UDP/udp_test.cpp +++ b/performance-tests/UDP/udp_test.cpp @@ -594,7 +594,7 @@ Server::handle_close (ACE_HANDLE, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int c, dstport = DEFPORT; int so_bufsz = 0; diff --git a/tests/ARGV_Test.cpp b/tests/ARGV_Test.cpp index cb233fa512b..f391880867a 100644 --- a/tests/ARGV_Test.cpp +++ b/tests/ARGV_Test.cpp @@ -20,7 +20,7 @@ ACE_RCSID(tests, ARGV_Test, "$Id$") int -main (int, ACE_TCHAR *argv[]) +ACE_TMAIN (int, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("ARGV_Test")); diff --git a/tests/Aio_Platform_Test.cpp b/tests/Aio_Platform_Test.cpp index a8eb439f22f..9fd24094c60 100644 --- a/tests/Aio_Platform_Test.cpp +++ b/tests/Aio_Platform_Test.cpp @@ -164,7 +164,7 @@ have_asynchio (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Aio_Platform_Test")); diff --git a/tests/Arg_Shifter_Test.cpp b/tests/Arg_Shifter_Test.cpp index 383e95b3edb..4a9d7d231e5 100644 --- a/tests/Arg_Shifter_Test.cpp +++ b/tests/Arg_Shifter_Test.cpp @@ -19,7 +19,7 @@ ACE_RCSID(tests, Arg_Shifter_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Arg_Shifter_Test")); diff --git a/tests/Atomic_Op_Test.cpp b/tests/Atomic_Op_Test.cpp index 1a63f9d561a..e2dd6dffff6 100644 --- a/tests/Atomic_Op_Test.cpp +++ b/tests/Atomic_Op_Test.cpp @@ -27,7 +27,7 @@ ACE_RCSID(tests, Atomic_Op_Test, "$Id$") #if defined (ACE_HAS_THREADS) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); @@ -64,7 +64,7 @@ template class ACE_Atomic_Op_Ex<ACE_Thread_Mutex, long>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Atomic_Op_Test")); diff --git a/tests/Auto_IncDec_Test.cpp b/tests/Auto_IncDec_Test.cpp index 07c97e9d10f..015a9da2a25 100644 --- a/tests/Auto_IncDec_Test.cpp +++ b/tests/Auto_IncDec_Test.cpp @@ -87,7 +87,7 @@ template class ACE_Auto_IncDec<int>; // Spawn off threads. int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Auto_IncDec_Test")); diff --git a/tests/Barrier_Test.cpp b/tests/Barrier_Test.cpp index 0d070d085fe..5421e17ed2a 100644 --- a/tests/Barrier_Test.cpp +++ b/tests/Barrier_Test.cpp @@ -64,7 +64,7 @@ tester (Tester_Args *args) #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Barrier_Test")); diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp index b0922c48320..81f30bf2abc 100644 --- a/tests/Basic_Types_Test.cpp +++ b/tests/Basic_Types_Test.cpp @@ -58,7 +58,7 @@ check (const ACE_TCHAR *message, u_int i, u_int j) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Basic_Types_Test")); diff --git a/tests/Bound_Ptr_Test.cpp b/tests/Bound_Ptr_Test.cpp index 8e01c7271ae..bd2f216f680 100644 --- a/tests/Bound_Ptr_Test.cpp +++ b/tests/Bound_Ptr_Test.cpp @@ -448,7 +448,7 @@ template class ACE_Weak_Bound_Ptr<Printer, ACE_Null_Mutex>; int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Bound_Ptr_Test")); diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index 9be7ca0e74d..3f15dc447b2 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -200,7 +200,7 @@ Consumer::svc (void) // Main driver function. int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Buffer_Stream_Test")); diff --git a/tests/CDR_Array_Test.cpp b/tests/CDR_Array_Test.cpp index 103fd7a9930..4ee99fe6d21 100644 --- a/tests/CDR_Array_Test.cpp +++ b/tests/CDR_Array_Test.cpp @@ -871,7 +871,7 @@ validiters (int n) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("CDR_Array_Test")); diff --git a/tests/CDR_File_Test.cpp b/tests/CDR_File_Test.cpp index cd3b5304778..bd8ef751f5c 100644 --- a/tests/CDR_File_Test.cpp +++ b/tests/CDR_File_Test.cpp @@ -293,7 +293,7 @@ usage (ACE_TCHAR *cmd) // Main function int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); @@ -432,7 +432,7 @@ main (int argc, ACE_TCHAR *argv[]) #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("CDR_File_Test")); diff --git a/tests/CDR_Test.cpp b/tests/CDR_Test.cpp index 36aa5b7fdf4..60e404b4775 100644 --- a/tests/CDR_Test.cpp +++ b/tests/CDR_Test.cpp @@ -371,7 +371,7 @@ CDR_Test_Types::test_get (ACE_InputCDR &cdr) const } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("CDR_Test")); diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp index c1d6ce31fc7..3b7937d4e8e 100644 --- a/tests/Cache_Map_Manager_Test.cpp +++ b/tests/Cache_Map_Manager_Test.cpp @@ -528,7 +528,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); diff --git a/tests/Capabilities_Test.cpp b/tests/Capabilities_Test.cpp index a6823c34be8..3ed291581b0 100644 --- a/tests/Capabilities_Test.cpp +++ b/tests/Capabilities_Test.cpp @@ -57,7 +57,7 @@ load_config (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Capabilities_Test")); diff --git a/tests/Collection_Test.cpp b/tests/Collection_Test.cpp index 2d4477d9cd1..4700b033e60 100644 --- a/tests/Collection_Test.cpp +++ b/tests/Collection_Test.cpp @@ -68,7 +68,7 @@ void iterate_const(const UNBOUNDED_SET& set) int dummyfunc() { return 0; } -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Collection_Test")); diff --git a/tests/Config_Test.cpp b/tests/Config_Test.cpp index 4f979354785..0613c83e6cc 100644 --- a/tests/Config_Test.cpp +++ b/tests/Config_Test.cpp @@ -1143,7 +1143,7 @@ Config_Test::get_section_boolean (ACE_Configuration& config, } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Config_Test")); diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index f06e2666f3f..6c450269fd6 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -811,7 +811,7 @@ spawn_threads (ACCEPTOR *acceptor, #endif /* ! ACE_LACKS_FORK && ACE_HAS_THREADS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Conn_Test")); int status = 0; diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp index bfb6823babc..02381044d48 100644 --- a/tests/DLL_Test.cpp +++ b/tests/DLL_Test.cpp @@ -39,7 +39,7 @@ ACE_RCSID(tests, DLL_Test, "$Id$") typedef Hello *(*Hello_Factory)(void); int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("DLL_Test")); diff --git a/tests/DLList_Test.cpp b/tests/DLList_Test.cpp index b2c686aa03f..0450349bf8a 100644 --- a/tests/DLList_Test.cpp +++ b/tests/DLList_Test.cpp @@ -108,7 +108,7 @@ run_test (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("DLList_Test")); diff --git a/tests/Date_Time_Test.cpp b/tests/Date_Time_Test.cpp index b4827747aaa..f22b5d401aa 100644 --- a/tests/Date_Time_Test.cpp +++ b/tests/Date_Time_Test.cpp @@ -19,7 +19,7 @@ ACE_RCSID(tests, Date_Time_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Date_Time_Test")); diff --git a/tests/Dirent_Test.cpp b/tests/Dirent_Test.cpp index ba3a63a2a01..dcd46f7bd21 100644 --- a/tests/Dirent_Test.cpp +++ b/tests/Dirent_Test.cpp @@ -132,7 +132,7 @@ dirent_test (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Dirent_Test")); diff --git a/tests/Dynamic_Priority_Test.cpp b/tests/Dynamic_Priority_Test.cpp index eb9c1b3adea..d07cac99313 100644 --- a/tests/Dynamic_Priority_Test.cpp +++ b/tests/Dynamic_Priority_Test.cpp @@ -693,7 +693,7 @@ run_performance_test (u_int min_load, #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Dynamic_Priority_Test")); diff --git a/tests/Enum_Interfaces_Test.cpp b/tests/Enum_Interfaces_Test.cpp index bbf9097f2b8..4be7b992129 100644 --- a/tests/Enum_Interfaces_Test.cpp +++ b/tests/Enum_Interfaces_Test.cpp @@ -34,7 +34,7 @@ ACE_RCSID(tests, Enum_Interfaces_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Enum_Interfaces_Test")); diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp index 82e08b524fe..e01e374fd4d 100644 --- a/tests/Env_Value_Test.cpp +++ b/tests/Env_Value_Test.cpp @@ -37,14 +37,14 @@ int // ACE_HAS_NONSTATIC_OBJECT_MANAGER only allows main to have two // arguments. And on platforms that lack fork (), we can't use spawn. -main (int argc, ACE_TCHAR* []) +ACE_TMAIN (int argc, ACE_TCHAR* []) { ACE_UNUSED_ARG (argc); ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_POSITIVE=10.2")); ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_NEGATIVE=-10.2")); #else /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */ -main (int argc, ACE_TCHAR * [], ACE_TCHAR *envp[]) +ACE_TMAIN (int argc, ACE_TCHAR * [], ACE_TCHAR *envp[]) { if (argc == 1) { diff --git a/tests/FlReactor_Test.cpp b/tests/FlReactor_Test.cpp index 70b5218429d..f981ed058e6 100644 --- a/tests/FlReactor_Test.cpp +++ b/tests/FlReactor_Test.cpp @@ -29,7 +29,7 @@ ACE_RCSID(tests, FlReactor_Test, "$Id$") #if !defined (ACE_HAS_FL) int -main (int, ACE_TCHAR*[]) +ACE_TMAIN (int, ACE_TCHAR*[]) { ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); @@ -229,7 +229,7 @@ Acceptor::make_svc_handler (Connection_Handler *&sh) return 0; } -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("FlReactor_Test")); diff --git a/tests/Framework_Component_Test.cpp b/tests/Framework_Component_Test.cpp index e35cb671e82..12bc8441baf 100644 --- a/tests/Framework_Component_Test.cpp +++ b/tests/Framework_Component_Test.cpp @@ -59,7 +59,7 @@ My_Singleton::instance (void) int -main (int, ACE_TCHAR *argv[]) +ACE_TMAIN (int, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_LIB_TEXT("Framework_Component_Test")); ACE_UNUSED_ARG (argv); diff --git a/tests/Future_Set_Test.cpp b/tests/Future_Set_Test.cpp index 15c196540e5..b0c5954eb94 100644 --- a/tests/Future_Set_Test.cpp +++ b/tests/Future_Set_Test.cpp @@ -440,7 +440,7 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<char_star_key, char_star_value, #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Future_Set_Test")); diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index 8c53783d09d..e6c8cb3fac2 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -411,7 +411,7 @@ template class ACE_Unbounded_Set_Iterator<ACE_Future_Observer<u_long> *>; #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Future_Test")); diff --git a/tests/Get_Opt_Test.cpp b/tests/Get_Opt_Test.cpp index ae81088e4d0..8108736ef6a 100644 --- a/tests/Get_Opt_Test.cpp +++ b/tests/Get_Opt_Test.cpp @@ -293,7 +293,7 @@ run_test (int& test_number, int ordering) } int -main (int, ACE_TCHAR *argv[]) +ACE_TMAIN (int, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Get_Opt_Test")); ACE_UNUSED_ARG (argv); diff --git a/tests/Handle_Set_Test.cpp b/tests/Handle_Set_Test.cpp index a8a2e172d12..cc5cafa3d92 100644 --- a/tests/Handle_Set_Test.cpp +++ b/tests/Handle_Set_Test.cpp @@ -203,7 +203,7 @@ test_performance (size_t max_handles, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Handle_Set_Test")); diff --git a/tests/Hash_Map_Bucket_Iterator_Test.cpp b/tests/Hash_Map_Bucket_Iterator_Test.cpp index 483043993de..55fc2f4b1ef 100644 --- a/tests/Hash_Map_Bucket_Iterator_Test.cpp +++ b/tests/Hash_Map_Bucket_Iterator_Test.cpp @@ -70,7 +70,7 @@ typedef ACE_Hash_Map_Bucket_Iterator<ACE_UINT32, ACE_SYNCH_NULL_MUTEX> HASH_MAP_BUCKET_ITERATOR; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Validate options. int result = parse_args (argc, argv); diff --git a/tests/Hash_Map_Manager_Test.cpp b/tests/Hash_Map_Manager_Test.cpp index 9d80d58930e..f302f8352a4 100644 --- a/tests/Hash_Map_Manager_Test.cpp +++ b/tests/Hash_Map_Manager_Test.cpp @@ -249,7 +249,7 @@ run_test (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Hash_Map_Manager_Test")); diff --git a/tests/High_Res_Timer_Test.cpp b/tests/High_Res_Timer_Test.cpp index 5d86f13b6d5..848b7f8a313 100644 --- a/tests/High_Res_Timer_Test.cpp +++ b/tests/High_Res_Timer_Test.cpp @@ -100,7 +100,7 @@ u_int intervals [] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000, 4000000}; /*usec*/ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("High_Res_Timer_Test")); diff --git a/tests/INET_Addr_Test.cpp b/tests/INET_Addr_Test.cpp index fb6c955cda0..f0d69907248 100644 --- a/tests/INET_Addr_Test.cpp +++ b/tests/INET_Addr_Test.cpp @@ -24,7 +24,7 @@ #include "ace/Log_Msg.h" -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_UNUSED_ARG (argc); ACE_UNUSED_ARG (argv); diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp index b45c3bfd7f6..3226f11a863 100644 --- a/tests/IOStream_Test.cpp +++ b/tests/IOStream_Test.cpp @@ -482,7 +482,7 @@ spawn (void) #endif /* !ACE_LACKS_ACE_IOSTREAM */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("IOStream_Test")); diff --git a/tests/Lazy_Map_Manager_Test.cpp b/tests/Lazy_Map_Manager_Test.cpp index 7cb31c3db1d..35f8ee728a6 100644 --- a/tests/Lazy_Map_Manager_Test.cpp +++ b/tests/Lazy_Map_Manager_Test.cpp @@ -317,7 +317,7 @@ active_map_test (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Lazy_Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp index c413263c566..a2142f00a92 100644 --- a/tests/Log_Msg_Test.cpp +++ b/tests/Log_Msg_Test.cpp @@ -513,7 +513,7 @@ test_format_specs (void) // Main function. int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Log_Msg_Test")); diff --git a/tests/Logging_Strategy_Test.cpp b/tests/Logging_Strategy_Test.cpp index 7fc0bdb5fc9..3adaff16576 100644 --- a/tests/Logging_Strategy_Test.cpp +++ b/tests/Logging_Strategy_Test.cpp @@ -393,7 +393,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) return 0; } -int main (int argc, ACE_TCHAR *argv []) +int ACE_TMAIN (int argc, ACE_TCHAR *argv []) { ACE_START_TEST (ACE_TEXT ("Logging_Strategy_Test")); diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp index 77c4f6781d0..7e9f8b0ee11 100644 --- a/tests/MEM_Stream_Test.cpp +++ b/tests/MEM_Stream_Test.cpp @@ -402,7 +402,7 @@ test_concurrent (const ACE_TCHAR *prog, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { u_short port = 0; @@ -506,7 +506,7 @@ template class ACE_Thread_Strategy<Echo_Handler>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("MEM_Stream_Test")); diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp index 163db5ff1de..5665dd699eb 100644 --- a/tests/MM_Shared_Memory_Test.cpp +++ b/tests/MM_Shared_Memory_Test.cpp @@ -188,7 +188,7 @@ spawn (void) #endif /* !ACE_LACKS_MMAP */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("MM_Shared_Memory_Test")); diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp index a506fe3fe5c..9026b5a6e98 100644 --- a/tests/MT_Reactor_Timer_Test.cpp +++ b/tests/MT_Reactor_Timer_Test.cpp @@ -263,7 +263,7 @@ Dispatch_Count_Handler::verify_results (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("MT_Reactor_Timer_Test")); diff --git a/tests/MT_SOCK_Test.cpp b/tests/MT_SOCK_Test.cpp index 7b0bc9ee90d..49f797f4fa6 100644 --- a/tests/MT_SOCK_Test.cpp +++ b/tests/MT_SOCK_Test.cpp @@ -335,7 +335,7 @@ spawn (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("MT_SOCK_Test")); diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp index 93b2800c0e5..d97a0388b52 100644 --- a/tests/Malloc_Test.cpp +++ b/tests/Malloc_Test.cpp @@ -313,7 +313,7 @@ get_base_addrs (void) #endif /* defined (ACE_WIN32) && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)) */ int -main (int argc, ACE_TCHAR *[]) +ACE_TMAIN (int argc, ACE_TCHAR *[]) { #if defined (ACE_WIN32) \ && (!defined (ACE_HAS_WINNT4) || (ACE_HAS_WINNT4 == 0)) @@ -421,7 +421,7 @@ template class ACE_Based_Pointer<Long_Test>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Malloc_Test")); ACE_ERROR ((LM_INFO, diff --git a/tests/Map_Manager_Test.cpp b/tests/Map_Manager_Test.cpp index d00218763c8..40f00a4c08a 100644 --- a/tests/Map_Manager_Test.cpp +++ b/tests/Map_Manager_Test.cpp @@ -900,7 +900,7 @@ run_test (void (*ptf) (size_t, size_t, int), } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Map_Manager_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); diff --git a/tests/Map_Test.cpp b/tests/Map_Test.cpp index 04e4a2e1f30..d269d3888c5 100644 --- a/tests/Map_Test.cpp +++ b/tests/Map_Test.cpp @@ -256,7 +256,7 @@ performance_test (void (*ptf) (MAP &, size_t, KEY *), } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Map_Test")); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE); diff --git a/tests/Max_Default_Port_Test.cpp b/tests/Max_Default_Port_Test.cpp index b70b09b7c05..bcc93dd2400 100644 --- a/tests/Max_Default_Port_Test.cpp +++ b/tests/Max_Default_Port_Test.cpp @@ -142,7 +142,7 @@ client (void *arg) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Max_Default_Port_Test")); diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp index c3a595e2a11..a483c3541e7 100644 --- a/tests/Mem_Map_Test.cpp +++ b/tests/Mem_Map_Test.cpp @@ -119,7 +119,7 @@ create_test_file (ACE_TCHAR *filename, int line_length, int num_lines) #endif /* !ACE_LACKS_MMAP */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Mem_Map_Test")); diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp index 376e77c9c1f..2971e25ba59 100644 --- a/tests/Message_Block_Test.cpp +++ b/tests/Message_Block_Test.cpp @@ -288,7 +288,7 @@ template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>; #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Message_Block_Test")); #if defined (ACE_HAS_THREADS) diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp index 08fe80a77ad..502b5557262 100644 --- a/tests/Message_Queue_Notifications_Test.cpp +++ b/tests/Message_Queue_Notifications_Test.cpp @@ -320,7 +320,7 @@ Watermark_Test::svc (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Message_Queue_Notifications_Test")); diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp index a718480230b..9d83a57568d 100644 --- a/tests/Message_Queue_Test.cpp +++ b/tests/Message_Queue_Test.cpp @@ -442,7 +442,7 @@ performance_test (int queue_type = 0) #endif /* ACE_HAS_THREADS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Message_Queue_Test")); diff --git a/tests/Message_Queue_Test_Ex.cpp b/tests/Message_Queue_Test_Ex.cpp index ecb8c17ea2a..46ca28ee143 100644 --- a/tests/Message_Queue_Test_Ex.cpp +++ b/tests/Message_Queue_Test_Ex.cpp @@ -281,7 +281,7 @@ performance_test (void) #endif /* ACE_HAS_THREADS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Message_Queue_Test_Ex")); diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp index 9acab24452c..cd273891d27 100644 --- a/tests/Naming_Test.cpp +++ b/tests/Naming_Test.cpp @@ -174,7 +174,7 @@ test_find (ACE_Naming_Context &ns_context, int sign, int result) int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Naming_Test")); ACE_TCHAR temp_file [BUFSIZ]; diff --git a/tests/New_Fail_Test.cpp b/tests/New_Fail_Test.cpp index f7a3065322d..cb3b3ea2c6d 100644 --- a/tests/New_Fail_Test.cpp +++ b/tests/New_Fail_Test.cpp @@ -69,7 +69,7 @@ try_ace_new_noreturn (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("New_Fail_Test")); int status = 0; diff --git a/tests/Notify_Performance_Test.cpp b/tests/Notify_Performance_Test.cpp index 59e1ae7f8bc..8bf031d4b5a 100644 --- a/tests/Notify_Performance_Test.cpp +++ b/tests/Notify_Performance_Test.cpp @@ -151,7 +151,7 @@ print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); @@ -246,7 +246,7 @@ template class ACE_Atomic_Op_Ex<ACE_Thread_Mutex, long>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Notify_Performance_Test")); diff --git a/tests/OS_Test.cpp b/tests/OS_Test.cpp index a76a89c1c37..5733be4633d 100644 --- a/tests/OS_Test.cpp +++ b/tests/OS_Test.cpp @@ -455,7 +455,7 @@ string_emulation_test (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("OS_Test")); diff --git a/tests/Object_Manager_Test.cpp b/tests/Object_Manager_Test.cpp index 1eb83b7f1b1..c68fb92d5ab 100644 --- a/tests/Object_Manager_Test.cpp +++ b/tests/Object_Manager_Test.cpp @@ -48,7 +48,7 @@ hook2 (void * /* object */, void *param) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE::init (); diff --git a/tests/OrdMultiSet_Test.cpp b/tests/OrdMultiSet_Test.cpp index 9a213c278d9..07709ce8b80 100644 --- a/tests/OrdMultiSet_Test.cpp +++ b/tests/OrdMultiSet_Test.cpp @@ -28,7 +28,7 @@ ACE_RCSID(tests, OrdMultiSet_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { int ret = 0; int *ptr = 0; diff --git a/tests/Pipe_Test.cpp b/tests/Pipe_Test.cpp index cad53d202e8..f6bf92f3728 100644 --- a/tests/Pipe_Test.cpp +++ b/tests/Pipe_Test.cpp @@ -78,7 +78,7 @@ open (ACE_Pipe &pipe, #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp index 8e660e7c4dc..b71a4c6084e 100644 --- a/tests/Priority_Buffer_Test.cpp +++ b/tests/Priority_Buffer_Test.cpp @@ -156,7 +156,7 @@ producer (void *args) // size of each line. int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Priority_Buffer_Test")); diff --git a/tests/Priority_Reactor_Test.cpp b/tests/Priority_Reactor_Test.cpp index d88adb36c74..1a0d2c1189a 100644 --- a/tests/Priority_Reactor_Test.cpp +++ b/tests/Priority_Reactor_Test.cpp @@ -237,7 +237,7 @@ client (void *arg) #endif int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Priority_Reactor_Test")); diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index 253d0773651..8d12c5a145e 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -156,7 +156,7 @@ Priority_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Priority_Task_Test")); diff --git a/tests/Proactor_Test.cpp b/tests/Proactor_Test.cpp index 6f656808da4..365ab668dda 100644 --- a/tests/Proactor_Test.cpp +++ b/tests/Proactor_Test.cpp @@ -1245,7 +1245,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Proactor_Test")); @@ -1342,7 +1342,7 @@ template class ACE_Asynch_Acceptor<Receiver>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Proactor_Test")); diff --git a/tests/Proactor_Timer_Test.cpp b/tests/Proactor_Timer_Test.cpp index 62ee8c047a2..d107e707c74 100644 --- a/tests/Proactor_Timer_Test.cpp +++ b/tests/Proactor_Timer_Test.cpp @@ -198,7 +198,7 @@ test_canceling_odd_timers (void) // If any command line arg is given, run the test with high res timer // queue. Else run it normally. int -main (int argc, ACE_TCHAR *[]) +ACE_TMAIN (int argc, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Proactor_Timer_Test")); @@ -228,7 +228,7 @@ main (int argc, ACE_TCHAR *[]) #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Proactor_Timer_Test")); diff --git a/tests/Process_Manager_Test.cpp b/tests/Process_Manager_Test.cpp index 4ac37ad4ccb..686024dc08f 100644 --- a/tests/Process_Manager_Test.cpp +++ b/tests/Process_Manager_Test.cpp @@ -96,7 +96,7 @@ spawn_child (const ACE_TCHAR *argv0, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_Get_Opt args (argc, argv, ACE_TEXT ("d")); @@ -304,7 +304,7 @@ main (int argc, ACE_TCHAR *argv[]) #else /* (!ACE_LACKS_FORK || ACE_WIN32) && ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Process_Manager_Test")); ACE_ERROR ((LM_ERROR, diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp index 7d4a2638571..cfea9cde337 100644 --- a/tests/Process_Mutex_Test.cpp +++ b/tests/Process_Mutex_Test.cpp @@ -123,7 +123,7 @@ acquire_release (void) #endif /* ! ACE_LACKS_FORK */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { #if defined (ACE_LACKS_FORK) ACE_UNUSED_ARG (argc); diff --git a/tests/Process_Strategy_Test.cpp b/tests/Process_Strategy_Test.cpp index 9df08889e69..e2e2e9145a1 100644 --- a/tests/Process_Strategy_Test.cpp +++ b/tests/Process_Strategy_Test.cpp @@ -635,7 +635,7 @@ server (void *) #endif /* !ACE_LACKS_FORK || ACE_HAS_THREADS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Process_Strategy_Test")); diff --git a/tests/RB_Tree_Test.cpp b/tests/RB_Tree_Test.cpp index c8f2fd8b153..37971cbd298 100644 --- a/tests/RB_Tree_Test.cpp +++ b/tests/RB_Tree_Test.cpp @@ -66,7 +66,7 @@ static int str_str_index [] = {4, 2, 1, 0, 3, 6, 5, 7}; // LR preorder int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("RB_Tree_Test")); diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp index 01346697ed8..ba5d7c41e9c 100644 --- a/tests/Reactor_Exceptions_Test.cpp +++ b/tests/Reactor_Exceptions_Test.cpp @@ -160,7 +160,7 @@ worker (void) #endif /* ACE_HAS_EXCEPTIONS */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Reactor_Exceptions_Test")); diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp index a3ce3f079e2..ecf133d6259 100644 --- a/tests/Reactor_Notify_Test.cpp +++ b/tests/Reactor_Notify_Test.cpp @@ -434,7 +434,7 @@ run_notify_purge_test (void) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Reactor_Notify_Test")); diff --git a/tests/Reactor_Performance_Test.cpp b/tests/Reactor_Performance_Test.cpp index 099135793e4..df3cab326fa 100644 --- a/tests/Reactor_Performance_Test.cpp +++ b/tests/Reactor_Performance_Test.cpp @@ -311,7 +311,7 @@ print_results (ACE_Profile_Timer::ACE_Elapsed_Time &et) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); @@ -440,7 +440,7 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Reactor_Performance_Test")); diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp index 62001142c91..16ec040248a 100644 --- a/tests/Reactor_Timer_Test.cpp +++ b/tests/Reactor_Timer_Test.cpp @@ -234,7 +234,7 @@ test_resetting_timer_intervals (void) // If any command line arg is given, run the test with high res timer // queue. Else run it normally. int -main (int argc, ACE_TCHAR *[]) +ACE_TMAIN (int argc, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Reactor_Timer_Test")); diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index 618912cb517..2dcbec7670f 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -211,7 +211,7 @@ template class ACE_Atomic_Op_Ex<ACE_Thread_Mutex, int>; #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Reactors_Test")); diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index 3484da4fb76..cdfb4e35e36 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -257,7 +257,7 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Reader_Writer_Test")); diff --git a/tests/Recursive_Mutex_Test.cpp b/tests/Recursive_Mutex_Test.cpp index 8cd882d53d5..637cffa3e7a 100644 --- a/tests/Recursive_Mutex_Test.cpp +++ b/tests/Recursive_Mutex_Test.cpp @@ -75,7 +75,7 @@ worker (void *arg) #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Recursive_Mutex_Test")); diff --git a/tests/Refcounted_Auto_Ptr_Test.cpp b/tests/Refcounted_Auto_Ptr_Test.cpp index e5a5ca96ef1..d04c1300d7f 100644 --- a/tests/Refcounted_Auto_Ptr_Test.cpp +++ b/tests/Refcounted_Auto_Ptr_Test.cpp @@ -310,7 +310,7 @@ template class ACE_Refcounted_Auto_Ptr<Printer, ACE_Null_Mutex>; int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Refcounted_Auto_Ptr_Test")); diff --git a/tests/Reverse_Lock_Test.cpp b/tests/Reverse_Lock_Test.cpp index 2c88f545d1b..95e01d5169b 100644 --- a/tests/Reverse_Lock_Test.cpp +++ b/tests/Reverse_Lock_Test.cpp @@ -25,7 +25,7 @@ ACE_RCSID(tests, Reverse_Lock_Test, "$Id$") typedef ACE_Reverse_Lock<ACE_SYNCH_MUTEX> REVERSE_MUTEX; int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Reverse_Lock_Test")); diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp index cb68b4fc1d7..4d39b5655c3 100644 --- a/tests/SOCK_Connector_Test.cpp +++ b/tests/SOCK_Connector_Test.cpp @@ -291,7 +291,7 @@ succeed_nonblocking (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SOCK_Connector_Test")); diff --git a/tests/SOCK_Send_Recv_Test.cpp b/tests/SOCK_Send_Recv_Test.cpp index 6505bb69f6f..bfc235bb8df 100644 --- a/tests/SOCK_Send_Recv_Test.cpp +++ b/tests/SOCK_Send_Recv_Test.cpp @@ -386,7 +386,7 @@ spawn (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SOCK_Send_Recv_Test")); diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp index c32cd1d87e1..5d497d0e039 100644 --- a/tests/SOCK_Test.cpp +++ b/tests/SOCK_Test.cpp @@ -257,7 +257,7 @@ spawn (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SOCK_Test")); diff --git a/tests/SPIPE_Test.cpp b/tests/SPIPE_Test.cpp index 401d548dbfb..ec493532f1a 100644 --- a/tests/SPIPE_Test.cpp +++ b/tests/SPIPE_Test.cpp @@ -105,7 +105,7 @@ server (void *) #endif /* TEST_HAS_STREAM_PIPES */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SPIPE_Test")); diff --git a/tests/SString_Test.cpp b/tests/SString_Test.cpp index 134b34cf1bb..68a1ad9479d 100644 --- a/tests/SString_Test.cpp +++ b/tests/SString_Test.cpp @@ -25,7 +25,7 @@ ACE_RCSID(tests, SString_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SString_Test")); diff --git a/tests/SV_Shared_Memory_Test.cpp b/tests/SV_Shared_Memory_Test.cpp index be9447150df..77dcee1ff07 100644 --- a/tests/SV_Shared_Memory_Test.cpp +++ b/tests/SV_Shared_Memory_Test.cpp @@ -142,7 +142,7 @@ template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_SYSV_IPC */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("SV_Shared_Memory_Test")); diff --git a/tests/Semaphore_Test.cpp b/tests/Semaphore_Test.cpp index a6308496a9e..55c73ba94e9 100644 --- a/tests/Semaphore_Test.cpp +++ b/tests/Semaphore_Test.cpp @@ -190,7 +190,7 @@ worker (void *) // Test semaphore functionality. -int main (int argc, ACE_TCHAR *argv[]) +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Semaphore_Test")); diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp index d47a0b661f9..d44c7fd7595 100644 --- a/tests/Service_Config_Test.cpp +++ b/tests/Service_Config_Test.cpp @@ -158,7 +158,7 @@ run_test (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Service_Config_Test")); diff --git a/tests/Signal_Test.cpp b/tests/Signal_Test.cpp index 063aea8addd..1353fd889a4 100644 --- a/tests/Signal_Test.cpp +++ b/tests/Signal_Test.cpp @@ -400,7 +400,7 @@ parse_args (int argc, char *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { if (argc > 1) { @@ -478,7 +478,7 @@ main (int argc, ACE_TCHAR *argv[]) #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Signal_Test")); ACE_ERROR ((LM_ERROR, diff --git a/tests/Sigset_Ops_Test.cpp b/tests/Sigset_Ops_Test.cpp index c64d1f06f2a..cb9fe4ab59c 100644 --- a/tests/Sigset_Ops_Test.cpp +++ b/tests/Sigset_Ops_Test.cpp @@ -46,7 +46,7 @@ siglistset(sigset_t x, int *sigset) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Sigset_Ops_Test")); diff --git a/tests/Simple_Message_Block_Test.cpp b/tests/Simple_Message_Block_Test.cpp index 1e17b86c3b1..1e6876cb584 100644 --- a/tests/Simple_Message_Block_Test.cpp +++ b/tests/Simple_Message_Block_Test.cpp @@ -26,7 +26,7 @@ ACE_RCSID(tests, Simple_Message_Block_Test, "$Id$") int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Simple_Message_Block_Test")); diff --git a/tests/Svc_Handler_Test.cpp b/tests/Svc_Handler_Test.cpp index 717a8fd5e40..bfa4ec647d5 100644 --- a/tests/Svc_Handler_Test.cpp +++ b/tests/Svc_Handler_Test.cpp @@ -74,7 +74,7 @@ run_test (SVC_HANDLER &svc_handler, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Svc_Handler_Test")); { diff --git a/tests/TP_Reactor_Test.cpp b/tests/TP_Reactor_Test.cpp index 37ef94cd036..0ff85869571 100644 --- a/tests/TP_Reactor_Test.cpp +++ b/tests/TP_Reactor_Test.cpp @@ -1148,7 +1148,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("TP_Reactor_Test")); diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 62acdd1315f..7f98fe32646 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -259,7 +259,7 @@ template class ACE_TSS<ACE_TSS_Type_Adapter<u_int> >; #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("TSS_Test")); diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp index 6c418d384f5..162b6693781 100644 --- a/tests/Task_Test.cpp +++ b/tests/Task_Test.cpp @@ -103,7 +103,7 @@ Barrier_Task::svc (void) #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Task_Test")); diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp index 4d12c028d88..424936639ee 100644 --- a/tests/Thread_Manager_Test.cpp +++ b/tests/Thread_Manager_Test.cpp @@ -249,7 +249,7 @@ test_task_record_keeping (ACE_Thread_Manager *mgr) #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Thread_Manager_Test")); int status = 0; diff --git a/tests/Thread_Mutex_Test.cpp b/tests/Thread_Mutex_Test.cpp index 8608833745f..37ce0896c6c 100644 --- a/tests/Thread_Mutex_Test.cpp +++ b/tests/Thread_Mutex_Test.cpp @@ -264,7 +264,7 @@ spawn (void) } int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Thread_Mutex_Test")); diff --git a/tests/Thread_Pool_Reactor_Resume_Test.cpp b/tests/Thread_Pool_Reactor_Resume_Test.cpp index cac1e673da2..bd55ab11688 100644 --- a/tests/Thread_Pool_Reactor_Resume_Test.cpp +++ b/tests/Thread_Pool_Reactor_Resume_Test.cpp @@ -349,7 +349,7 @@ worker (void *) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Resume_Test")); parse_arg (argc, argv); @@ -405,7 +405,7 @@ template class ACE_Lock_Adapter<ACE_SYNCH_MUTEX>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); diff --git a/tests/Thread_Pool_Reactor_Test.cpp b/tests/Thread_Pool_Reactor_Test.cpp index 846f686b591..c2fe410b2b7 100644 --- a/tests/Thread_Pool_Reactor_Test.cpp +++ b/tests/Thread_Pool_Reactor_Test.cpp @@ -293,7 +293,7 @@ worker (void *) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); parse_arg (argc, argv); @@ -345,7 +345,7 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>; #else int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Thread_Pool_Reactor_Test")); diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index fc0318edf08..86b53df36da 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -397,7 +397,7 @@ template class ACE_Lock_Adapter<ACE_Thread_Mutex>; #endif /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Thread_Pool_Test")); diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index 7bcb324a014..20b43b9a07c 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -34,7 +34,7 @@ ACE_TEXT ("main") ACE_PLATFORM_EXE_SUFFIX \ ACE_TEXT (" -f ") ACE_PLATFORM int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Time_Service_Test")); diff --git a/tests/Time_Value_Test.cpp b/tests/Time_Value_Test.cpp index 15e828257fc..212eb7e95c1 100644 --- a/tests/Time_Value_Test.cpp +++ b/tests/Time_Value_Test.cpp @@ -177,7 +177,7 @@ test_ace_u_longlong (void) int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { int ret = 0; diff --git a/tests/Timeprobe_Test.cpp b/tests/Timeprobe_Test.cpp index ec30b4af233..bf7d3f1da5b 100644 --- a/tests/Timeprobe_Test.cpp +++ b/tests/Timeprobe_Test.cpp @@ -96,7 +96,7 @@ int static_singleton_creator = create_singleton (); #endif /* ! ACE_HAS_PURIFY */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Timeprobe_Test")); diff --git a/tests/Timer_Queue_Test.cpp b/tests/Timer_Queue_Test.cpp index e37a0b1d2a9..5af87db2dea 100644 --- a/tests/Timer_Queue_Test.cpp +++ b/tests/Timer_Queue_Test.cpp @@ -436,7 +436,7 @@ public: }; int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Timer_Queue_Test")); diff --git a/tests/TkReactor_Test.cpp b/tests/TkReactor_Test.cpp index 16cae7b0842..df8b80b4114 100644 --- a/tests/TkReactor_Test.cpp +++ b/tests/TkReactor_Test.cpp @@ -31,7 +31,7 @@ ACE_RCSID(tests, TkReactor_Test, "$Id$") #if !defined (ACE_HAS_TK) -int main (int, ACE_TCHAR*[]) +int ACE_TMAIN (int, ACE_TCHAR*[]) { ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); @@ -265,7 +265,7 @@ init (Tcl_Interp *interp) } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("TkReactor_Test")); diff --git a/tests/Token_Strategy_Test.cpp b/tests/Token_Strategy_Test.cpp index 8b1cde45406..96a8c5f0981 100644 --- a/tests/Token_Strategy_Test.cpp +++ b/tests/Token_Strategy_Test.cpp @@ -209,7 +209,7 @@ int run_test (ACE_Token::QUEUEING_STRATEGY strategy, int threads = 5, } int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Token_Strategy_Test")); int retval = 0; @@ -258,7 +258,7 @@ template class ACE_Guard<ACE_Token>; #else /* ACE_HAS_THREADS */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Token_Strategy_Test: your platform doesn't support threads\n")), 1); } diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp index 05c511f0a7d..f4161c0687a 100644 --- a/tests/Tokens_Test.cpp +++ b/tests/Tokens_Test.cpp @@ -201,7 +201,7 @@ run_test (ACE_Token_Proxy *A, #endif /* ACE_HAS_THREADS && ACE_HAS_TOKENS_LIBRARY */ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Tokens_Test")); #if defined (ACE_HAS_THREADS) diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp index a6e6ae999c0..9487b724084 100644 --- a/tests/UPIPE_SAP_Test.cpp +++ b/tests/UPIPE_SAP_Test.cpp @@ -140,7 +140,7 @@ acceptor (void *args) #endif /* ACE_HAS_THREADS && defined ACE_HAS_STREAM_PIPES || (ACE_WIN32&&NT4)*/ int -main (int, ACE_TCHAR *[]) +ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("UPIPE_SAP_Test")); diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp index 76773302fa0..9b8cd9dffa1 100644 --- a/tests/Upgradable_RW_Test.cpp +++ b/tests/Upgradable_RW_Test.cpp @@ -357,7 +357,7 @@ template class ACE_Guard<ACE_RW_Mutex>; // Spawn off threads. int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("Upgradable_RW_Test")); int status = 0; diff --git a/tests/Vector_Test.cpp b/tests/Vector_Test.cpp index be883c5fcf6..69ac40a4b25 100644 --- a/tests/Vector_Test.cpp +++ b/tests/Vector_Test.cpp @@ -29,7 +29,7 @@ typedef ACE_Vector<DATA>::Iterator ITERATOR; const size_t TOP = 100; const size_t LEFT = 10; -int main (int, ACE_TCHAR *[]) +int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Vector_Test")); diff --git a/tests/XtReactor_Test.cpp b/tests/XtReactor_Test.cpp index d89e84e13de..27eaee4ce12 100644 --- a/tests/XtReactor_Test.cpp +++ b/tests/XtReactor_Test.cpp @@ -259,7 +259,7 @@ template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; #endif /* ACE_HAS_XT */ int -main (int argc, ACE_TCHAR *argv[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ACE_START_TEST (ACE_TEXT ("XtReactor_Test")); |