- few tweaks to get things compiling under mingw

This commit is contained in:
Mark Vejvoda
2011-12-25 03:09:39 +00:00
parent 7d0cf06fe1
commit 835c886705
13 changed files with 324 additions and 268 deletions

View File

@@ -1900,7 +1900,7 @@ void BroadCastClientSocketThread::execute() {
#else
setsockopt(bcfd, SOL_SOCKET, SO_REUSEADDR, (char *)&val, sizeof(val));
#endif
if(bind( bcfd, (struct sockaddr *)&bcaddr, sizeof(bcaddr) ) < 0 ) {
if(::bind( bcfd, (struct sockaddr *)&bcaddr, sizeof(bcaddr) ) < 0 ) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"bind failed: %s\n", getLastSocketErrorFormattedText().c_str());
}
else {

View File

@@ -257,7 +257,15 @@ void init_win32() {
HWND hwnd = wminfo.window;
::SetClassLong(hwnd, GCL_HICON, (LONG) icon);
#ifdef __MINGW32__
#define GCL_HICON -14
#endif
#ifndef __MINGW32__
LONG iconPtr = (LONG)icon;
::SetClassLong(hwnd, GCL_HICON, iconPtr);
#endif
}
void done_win32() {
::DestroyIcon(icon);