linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #02761
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2346: revert 2302, causes crash on wine
------------------------------------------------------------
revno: 2346
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Thu 2010-12-16 22:59:31 +0100
message:
revert 2302, causes crash on wine
modified:
SConstruct
dwt/src/Application.cpp
win32/main.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'SConstruct'
--- SConstruct 2010-12-05 17:03:00 +0000
+++ SConstruct 2010-12-16 21:59:31 +0000
@@ -6,9 +6,9 @@
from build_util import Dev, gen_po_name
gcc_flags = {
- 'common': ['-g', '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-unused-value', '-Wno-missing-field-initializers', '-Wno-address', '-fexceptions', '-mthreads', '-mwindows'],
+ 'common': ['-g', '-Wall', '-Wextra', '-Wno-unused-parameter', '-Wno-unused-value', '-Wno-missing-field-initializers', '-Wno-address', '-fexceptions', '-mthreads'],
'debug': [],
- 'release' : ['-O3']
+ 'release' : ['-O3', '-mwindows']
}
gcc_xxflags = {
@@ -43,9 +43,9 @@
}
gcc_link_flags = {
- 'common' : ['-g', '-static-libgcc', '-static-libstdc++', '-Wl,--no-undefined', '-time', '-mthreads', '-mwindows'],
+ 'common' : ['-g', '-static-libgcc', '-static-libstdc++', '-Wl,--no-undefined', '-time', '-mthreads'],
'debug' : [],
- 'release' : []
+ 'release' : ['-mwindows']
}
msvc_link_flags = {
=== modified file 'dwt/src/Application.cpp'
--- dwt/src/Application.cpp 2010-11-23 16:38:12 +0000
+++ dwt/src/Application.cpp 2010-12-16 21:59:31 +0000
@@ -276,7 +276,7 @@
} // namespace dwt
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
unsigned int retVal = 0;
=== modified file 'win32/main.cpp'
--- win32/main.cpp 2010-11-23 16:38:12 +0000
+++ win32/main.cpp 2010-12-16 21:59:31 +0000
@@ -70,6 +70,8 @@
#endif
int SmartWinMain(dwt::Application& app) {
+ dcdebug("StartWinMain\n");
+
// http://www.kb.cert.org/vuls/id/707943 part III, "For Developers".
::SetDllDirectory(_T(""));
@@ -112,10 +114,10 @@
#ifdef _DEBUG
old_handler = set_terminate(&term_handler);
- // attach to the parent console, or create one
- if(!AttachConsole(ATTACH_PARENT_PROCESS))
- AllocConsole();
- freopen("conout$", "w", stdout);
+#ifdef __MINGW32__
+ // For debugging
+ ::LoadLibrary(_T("exchndl.dll"));
+#endif
#endif
// For SHBrowseForFolder, UPnP_COM