--- a/secureswitools/makekeys/src/MAKEKEYS.CPP Tue Jun 15 13:36:10 2010 +0100
+++ b/secureswitools/makekeys/src/MAKEKEYS.CPP Thu Jul 22 16:35:01 2010 +0100
@@ -1,8 +1,8 @@
/*
-* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
+* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
@@ -56,7 +56,7 @@
:m_fVerbose(FALSE)
{ ; }
-int CMakeKeys::Run(const int argc, const _TCHAR *argv[], const _TCHAR *envp[])
+int CMakeKeys::Run(const int argc, const _TCHAR *argv[])
// Inputs : argc, argv, envp - The command line passed to the process
{
BOOL bValid = TRUE;
@@ -117,6 +117,7 @@
OUT << _T("Warning: the private key should be encrypted with the -password option") << endl;
OUT << _T("Do you want to use a password (y/n)? ");
+ OUT.flush();
cin >> Warn;
@@ -166,6 +167,7 @@
OUT << _T("Warning: the private key should be encrypted with the -password option") << endl;
OUT << _T("Do you want to use a password (y/n)? ");
+ OUT.flush();
cin >> Warn;
@@ -296,9 +298,13 @@
// main function - constructs a CMakeKeys object and calls it's run method
extern "C"
{
- int _tmain(int argc, const _TCHAR *argv[], const _TCHAR *envp[])
+ int main(int argc, const char *argv[], const char *envp[])
{
+ // MingW doesn't support _tmain(),
+ // so using GetCommandLineW() to get wide args.
+ wchar_t** argvW = CommandLineToArgvW( GetCommandLineW(), &argc);
+
CMakeKeys app;
- return app.Run(argc, argv, envp);
+ return app.Run(argc, argvW);
}
}