← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2396: fix GCC version guards

 

------------------------------------------------------------
revno: 2396
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Tue 2011-01-18 18:51:16 +0100
message:
  fix GCC version guards
added:
  dcpp/compiler.h
  win32/compiler.h
modified:
  Compile.txt
  dcpp/nullptr.h
  dcpp/stdinc.cpp
  dcpp/stdinc.h
  win32/stdafx.cpp
  win32/stdafx.h


--
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 'Compile.txt'
--- Compile.txt	2011-01-04 18:13:07 +0000
+++ Compile.txt	2011-01-18 17:51:16 +0000
@@ -54,19 +54,18 @@
 
 2. Compiler
 
-	a. MinGW (GCC 4.5.1 or later):
+	a. MinGW (GCC 4.5.2 or later):
 	<http://sourceforge.net/projects/mingw/files/>
 
-		You'll need w32api, binutils, mingw-runtime, gcc-core, gcc-g++, and some deps like libmpc.
-		See their site for installation instructions. I just untar the files into a folder named
-		MinGW and add MinGW\bin to my PATH.
-		Note; the sjlj variant is slower than the dwarf variant; the latter is recommended.
+		The easiest way to install is to run the mingw-get installer. Alternatively, the various
+		packages can be individually downloaded and extracted to C:\MinGW.
+		Unofficial pre-packaged MinGW sets can be found on <http://code.google.com/p/pcxprj/>.
+
+		Make sure that MinGW\bin is in your PATH environment variable.
 
 		Also grab natupnp.h from the .Net 1.1 SDK and place it in the root of the repository.
 		<http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&DisplayLang=en>
 
-		A pre-packaged MinGW set can be found on <http://code.google.com/p/pcxprj/>.
-
 	b. Microsoft Visual C++ 10 (2010):
 	<http://msdn.microsoft.com/en-us/visualc/default.aspx>
 

=== added file 'dcpp/compiler.h'
--- dcpp/compiler.h	1970-01-01 00:00:00 +0000
+++ dcpp/compiler.h	2011-01-18 17:51:16 +0000
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2001-2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if defined(__GNUC__)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+#error GCC 4.5 is required
+#endif
+
+#elif defined(_MSC_VER)
+#if _MSC_VER < 1600
+#error MSVC 10 (2010) is required
+#endif
+
+#else
+#error No supported compiler found
+
+#endif

=== modified file 'dcpp/nullptr.h'
--- dcpp/nullptr.h	2010-12-18 13:38:56 +0000
+++ dcpp/nullptr.h	2011-01-18 17:51:16 +0000
@@ -1,7 +1,7 @@
 // for compilers that don't support nullptr, use the workaround in section 1.1 of the proposal.
 
 #ifdef __GNUC__
-#if __GNUC__ <= 4 && __GNUC_MINOR__ < 6 // GCC 4.6 is the first GCC to implement nullptr.
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) // GCC 4.6 is the first GCC to implement nullptr.
 
 const // this is a const object...
 class {

=== modified file 'dcpp/stdinc.cpp'
--- dcpp/stdinc.cpp	2010-12-18 13:38:56 +0000
+++ dcpp/stdinc.cpp	2011-01-18 17:51:16 +0000
@@ -17,18 +17,3 @@
  */
 
 #include "stdinc.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ <= 4 && __GNUC_MINOR__ <= 5 && __GNUC_PATCHLEVEL__ < 1
-#error GCC 4.5.1 is required
-#endif
-
-#elif defined(_MSC_VER)
-#if _MSC_VER < 1600
-#error MSVC 10 (2010) is required
-#endif
-
-#else
-#error No supported compiler found
-
-#endif

=== modified file 'dcpp/stdinc.h'
--- dcpp/stdinc.h	2010-12-18 13:38:56 +0000
+++ dcpp/stdinc.h	2011-01-18 17:51:16 +0000
@@ -19,11 +19,7 @@
 #ifndef DCPLUSPLUS_DCPP_STDINC_H
 #define DCPLUSPLUS_DCPP_STDINC_H
 
-// This enables stlport's debug mode (and slows it down to a crawl...)
-//#define _STLP_DEBUG 1
-//#define _STLP_USE_NEWALLOC 1
-
-// --- Shouldn't have to change anything under here...
+#include "compiler.h"
 
 #ifndef _REENTRANT
 # define _REENTRANT 1

=== added file 'win32/compiler.h'
--- win32/compiler.h	1970-01-01 00:00:00 +0000
+++ win32/compiler.h	2011-01-18 17:51:16 +0000
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2001-2010 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if defined(__GNUC__)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5 || (__GNUC_MINOR__ == 5 && __GNUC_PATCHLEVEL__ < 2)))
+#error GCC 4.5.2 is required
+#endif
+
+#elif defined(_MSC_VER)
+#if _MSC_VER < 1600
+#error MSVC 10 (2010) is required
+#endif
+
+#else
+#error No supported compiler found
+
+#endif

=== modified file 'win32/stdafx.cpp'
--- win32/stdafx.cpp	2011-01-10 21:49:08 +0000
+++ win32/stdafx.cpp	2011-01-18 17:51:16 +0000
@@ -17,18 +17,3 @@
  */
 
 #include "stdafx.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ <= 4 && __GNUC_MINOR__ <= 5 && __GNUC_PATCHLEVEL__ < 1
-#error GCC 4.5.1 is required
-#endif
-
-#elif defined(_MSC_VER)
-#if _MSC_VER < 1600
-#error MSVC 10 (2010) is required
-#endif
-
-#else
-#error No supported compiler found
-
-#endif

=== modified file 'win32/stdafx.h'
--- win32/stdafx.h	2010-12-23 15:57:01 +0000
+++ win32/stdafx.h	2011-01-18 17:51:16 +0000
@@ -19,6 +19,8 @@
 #ifndef DCPLUSPLUS_WIN32_STDAFX_H
 #define DCPLUSPLUS_WIN32_STDAFX_H
 
+#include "compiler.h"
+
 #include <dcpp/stdinc.h>
 #include <dcpp/DCPlusPlus.h>