← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2128: fixes for GCC 4.5

 

------------------------------------------------------------
revno: 2128
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Tue 2010-04-20 19:37:50 +0200
message:
  fixes for GCC 4.5
removed:
  dwt/include/dwt/Resource.h
  dwt/src/Resource.cpp
modified:
  SConstruct
  dwt/include/dwt/dwt.hpp
  win32/MainWindow.cpp
  win32/UPnP_COM.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-03-28 20:35:55 +0000
+++ SConstruct	2010-04-20 17:37:50 +0000
@@ -40,7 +40,7 @@
 }
 
 gcc_link_flags = {
-	'common' : ['-g', '-Wl,--no-undefined', '-time', '-mthreads'],
+	'common' : ['-g', '-static-libgcc', '-static-libstdc++', '-Wl,--no-undefined', '-time', '-mthreads'],
 	'debug' : [],
 	'release' : ['-mwindows']
 }

=== removed file 'dwt/include/dwt/Resource.h'
--- dwt/include/dwt/Resource.h	2010-02-11 21:44:13 +0000
+++ dwt/include/dwt/Resource.h	1970-01-01 00:00:00 +0000
@@ -1,64 +0,0 @@
-/*
-  DC++ Widget Toolkit
-
-  Copyright (c) 2007-2010, Jacek Sieka
-
-  SmartWin++
-
-  Copyright (c) 2005 Thomas Hansen
-
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without modification,
-  are permitted provided that the following conditions are met:
-
-      * Redistributions of source code must retain the above copyright notice,
-        this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice,
-        this list of conditions and the following disclaimer in the documentation
-        and/or other materials provided with the distribution.
-      * Neither the name of the DWT nor the names of its contributors
-        may be used to endorse or promote products derived from this software
-        without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef DWT_Resources_h
-#define DWT_Resources_h
-
-#include "WindowsHeaders.h"
-#include "tstring.h"
-
-namespace dwt {
-
-/// Class for encapsulating a Resource dll
-	/** Use this class for extracting resources from other DLLs
-	  */
-	class Resource
-	{
-		HINSTANCE itsInstanceHandle;
-	public:
-
-		/// Constructor taking path to a resource dll
-		/** Pass in the path to the DLL you wish to load resources from
-		  */
-		explicit Resource(const tstring & file);
-
-		tstring operator[] ( unsigned key );
-
-		// DTOR freeing the instance handle
-		virtual ~Resource();
-	};
-}
-
-#endif

=== modified file 'dwt/include/dwt/dwt.hpp'
--- dwt/include/dwt/dwt.hpp	2010-02-11 21:44:13 +0000
+++ dwt/include/dwt/dwt.hpp	2010-04-20 17:37:50 +0000
@@ -45,7 +45,6 @@
 #include "LibraryLoader.h"
 #include "Point.h"
 #include "Rectangle.h"
-#include "Resource.h"
 #include "Threads.h"
 #include "resources/Accelerator.h"
 #include "resources/Bitmap.h"

=== removed file 'dwt/src/Resource.cpp'
--- dwt/src/Resource.cpp	2010-02-11 21:44:13 +0000
+++ dwt/src/Resource.cpp	1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
-/*
-  DC++ Widget Toolkit
-
-  Copyright (c) 2007-2010, Jacek Sieka
-
-  SmartWin++
-
-  Copyright (c) 2005 Thomas Hansen
-
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without modification,
-  are permitted provided that the following conditions are met:
-
-      * Redistributions of source code must retain the above copyright notice,
-        this list of conditions and the following disclaimer.
-      * Redistributions in binary form must reproduce the above copyright notice,
-        this list of conditions and the following disclaimer in the documentation
-        and/or other materials provided with the distribution.
-      * Neither the name of the DWT nor SmartWin++ nor the names of its contributors
-        may be used to endorse or promote products derived from this software
-        without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <dwt/Resource.h>
-
-namespace dwt {
-
-Resource::Resource(const tstring & file)
-{
-	itsInstanceHandle = ::LoadLibrary(file.c_str());
-}
-
-Resource::~Resource()
-{
-	::FreeLibrary(itsInstanceHandle);
-}
-
-tstring Resource::operator[] ( unsigned key )
-{
-	TCHAR buffer[2000];
-	int success = ::LoadString(itsInstanceHandle, key, buffer, 1000);
-	return buffer;
-}
-
-}

=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp	2010-03-14 17:24:36 +0000
+++ win32/MainWindow.cpp	2010-04-20 17:37:50 +0000
@@ -471,7 +471,7 @@
 void MainWindow::initTray() {
 	dcdebug("initTray\n");
 	notify = dwt::NotificationPtr(new dwt::Notification(this));
-	notify->create(dwt::Notification::Seed::Seed(mainSmallIcon));
+	notify->create(dwt::Notification::Seed(mainSmallIcon));
 	notify->onContextMenu(std::tr1::bind(&MainWindow::handleTrayContextMenu, this));
 	notify->onIconClicked(std::tr1::bind(&MainWindow::handleTrayClicked, this));
 	notify->onUpdateTip(std::tr1::bind(&MainWindow::handleTrayUpdate, this));

=== modified file 'win32/UPnP_COM.cpp'
--- win32/UPnP_COM.cpp	2010-02-11 21:44:13 +0000
+++ win32/UPnP_COM.cpp	2010-04-20 17:37:50 +0000
@@ -97,7 +97,7 @@
 
 	IStaticPortMappingCollection* pSPMC = getStaticPortMappingCollection();
 	if(!pSPMC)
-		return false;
+		return Util::emptyString;
 
 	/// @todo use a BSTR wrapper
 	BSTR protocol_ = SysAllocString(Text::toT(protocols[lastProtocol]).c_str());