[10643] Update the ACE part we use to 5.8.2

Signed-off-by: Neo2003 <Neo.2003@Hotmail.fr>
This commit is contained in:
Neo2003 2010-10-25 20:36:51 +02:00
parent 8f71d95c0d
commit 23c920ca4b
739 changed files with 22031 additions and 40373 deletions

View file

@ -1,8 +1,10 @@
// $Id: OS_main.cpp 80826 2008-03-04 14:51:23Z wotte $
// $Id: OS_main.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/OS_main.h"
ACE_RCSID(ace, OS_main, "$Id: OS_main.cpp 80826 2008-03-04 14:51:23Z wotte $")
#if !defined (ACE_DOESNT_DEFINE_MAIN)
#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
@ -43,7 +45,8 @@ int ace_os_main_i (int argc, char *argv[]) /* user's entry point, e.g., main */
return vx_ace_main_i_ptr ? (*vx_ace_main_i_ptr) (argc, argv) : (-1); /* what the user calls "main" */
}
# else /* !ACE_VXWORKS && !__RTP__ */
int ace_os_main_i (int argc, char *argv[]) /* user's entry point, e.g., main */
ACE_Export int
ace_os_main_i (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" */
@ -100,23 +103,47 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// CE only gets a command line string; no argv. So we need to convert it
// when the main entrypoint expects argc/argv. ACE_ARGV supports this.
# include "ace/OS_NS_string.h"
# include "ace/OS_NS_ctype.h"
# include "ace/ACE.h"
# include "ace/ARGV.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Main_Base::~ACE_Main_Base ()
{
}
int ACE_Main_Base::run (HINSTANCE,
HINSTANCE,
LPWSTR lpCmdLine,
int)
{
ACE_TCHAR cmdline[1024];
ACE_OS::strcpy (cmdline, ACE_TEXT ("program "));
ACE_TCHAR msg_file [MAXPATHLEN];
if (ACE_TEXT_GetModuleFileName (0, msg_file, MAXPATHLEN))
{
bool quote = false;
for (size_t i(0); !quote && msg_file[i]; ++i)
{
if (ACE_OS::ace_isspace (msg_file[i])) quote = true;
}
ACE_TCHAR *cmd_iter = cmdline;
if (quote)
{
*cmd_iter++ = ACE_TEXT ('"');
}
ACE_OS::strcpy (cmd_iter, msg_file);
ACE_OS::strcat (cmd_iter, quote ? ACE_TEXT ("\" ") : ACE_TEXT (" "));
}
else
{
ACE_OS::strcpy (cmdline, ACE_TEXT ("program "));
}
ACE_OS::strcat (cmdline, ACE_TEXT_WCHAR_TO_TCHAR (lpCmdLine));
ACE_ARGV ce_argv (cmdline);
ACE::init ();
ACE_MAIN_OBJECT_MANAGER
int i = this->run_i (ce_argv.argc (), ce_argv.argv ());
int const i = this->run_i (ce_argv.argc (), ce_argv.argv ());
ACE::fini ();
return i;
}
@ -124,4 +151,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# endif /* !ACE_HAS_WINCE */
# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
#endif /* ACE_DOESNT_DEFINE_MAIN */