I knew that you won't like it.
However I decided to patch our code (or a hack in your words) as some users were facing build issue. As this is a known problem we better accept it and make necessary changes in our code.
If you still dislike then you can apply the following patch which correctly fixes this issue.
Index: src/sdk/compiletargetbase.cpp
===================================================================
--- src/sdk/compiletargetbase.cpp (revision 9146)
+++ src/sdk/compiletargetbase.cpp (working copy)
@@ -264,7 +264,7 @@
{
wxString prefix = wxEmptyString;
// On linux, "lib" is the common prefix for this platform
- if (platform::Linux)
+ if (platform::linux)
prefix = wxT("lib");
// FIXME (mortenmacfly#5#): What about Mac (Windows is OK)?!
Index: src/sdk/compileoptionsbase.cpp
===================================================================
--- src/sdk/compileoptionsbase.cpp (revision 9146)
+++ src/sdk/compileoptionsbase.cpp (working copy)
@@ -64,7 +64,7 @@
{
if(platform::windows)
return m_Platform & spWindows;
- if(platform::Unix)
+ if(platform::unix)
return m_Platform & spUnix;
if(platform::macosx)
return m_Platform & spMac;
Index: src/sdk/configmanager.cpp
===================================================================
--- src/sdk/configmanager.cpp (revision 9146)
+++ src/sdk/configmanager.cpp (working copy)
@@ -262,11 +262,11 @@
if (platform::windows)
info.append(_T("\n\t Windows "));
- if (platform::Linux)
+ if (platform::linux)
info.append(_T("\n\t Linux "));
if (platform::macosx)
info.append(_T("\n\t Mac OS X "));
- if (platform::Unix)
+ if (platform::unix)
info.append(_T("\n\t Unix "));
info.append(platform::unicode ? _T("Unicode ") : _T("ANSI "));
Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 9146)
+++ src/sdk/compiler.cpp (working copy)
@@ -1144,7 +1144,7 @@
else if (test == wxT("macosx"))
val = platform::macosx;
else if (test == wxT("linux"))
- val = platform::Linux;
+ val = platform::linux;
else if (test == wxT("freebsd"))
val = platform::freebsd;
else if (test == wxT("netbsd"))
@@ -1156,7 +1156,7 @@
else if (test == wxT("solaris"))
val = platform::solaris;
else if (test == wxT("unix"))
- val = platform::Unix;
+ val = platform::unix;
}
else if (node->GetAttribute(wxT("exec"), &test))
{
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp (revision 9146)
+++ src/sdk/editormanager.cpp (working copy)
@@ -3219,7 +3219,7 @@
defines.Add(wxT("__WXOSX_MAC__"));
defines.Add(wxT("__APPLE__"));
}
- else if (platform::Linux)
+ else if (platform::linux)
{
defines.Add(wxT("LINUX"));
defines.Add(wxT("linux"));
@@ -3254,7 +3254,7 @@
defines.Add(wxT("__SUNOS__"));
defines.Add(wxT("__SOLARIS__"));
}
- if (platform::Unix)
+ if (platform::unix)
{
defines.Add(wxT("unix"));
defines.Add(wxT("__unix"));
Index: src/plugins/projectsimporter/msvc10loader.cpp
===================================================================
--- src/plugins/projectsimporter/msvc10loader.cpp (revision 9146)
+++ src/plugins/projectsimporter/msvc10loader.cpp (working copy)
@@ -50,7 +50,7 @@
//ctor
if (platform::windows)
m_PlatformName = _T("Win32");
- else if (platform::Linux)
+ else if (platform::linux)
m_PlatformName = _T("Linux");
else if (platform::macosx)
m_PlatformName = _T("MacOSX");
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 9146)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -919,7 +919,7 @@
else if (test == wxT("macosx"))
val = platform::macosx;
else if (test == wxT("linux"))
- val = platform::Linux;
+ val = platform::linux;
else if (test == wxT("freebsd"))
val = platform::freebsd;
else if (test == wxT("netbsd"))
@@ -931,7 +931,7 @@
else if (test == wxT("solaris"))
val = platform::solaris;
else if (test == wxT("unix"))
- val = platform::Unix;
+ val = platform::unix;
}
if (val)
CompilerFactory::RegisterCompiler(
Index: src/plugins/contrib/lib_finder/processingdlg.cpp
===================================================================
--- src/plugins/contrib/lib_finder/processingdlg.cpp (revision 9146)
+++ src/plugins/contrib/lib_finder/processingdlg.cpp (working copy)
@@ -423,7 +423,7 @@
}
}
- if ( platform::Linux )
+ if ( platform::linux )
{
if ( Platform==_T("lin") || Platform==_T("linux") )
{
@@ -477,7 +477,7 @@
}
}
- if ( platform::Unix )
+ if ( platform::unix )
{
if ( Platform==_T("unix") || Platform==_T("un*x") )
{
Index: src/include/prep.h
===================================================================
--- src/include/prep.h (revision 9146)
+++ src/include/prep.h (working copy)
@@ -135,9 +135,9 @@
platform::id
Value of type platform::identifier describing the target platform
- platform::windows, platform::macosx, platform::Linux
+ platform::windows, platform::macosx, platform::linux
platform::freebsd, platform::netbsd, platform::openbsd
- platform::darwin, platform::solaris, platform::Unix
+ platform::darwin, platform::solaris, platform::unix
Boolean value that evaluates to true if the target platform is the same as the variable's name, false otherwise.
Using the platform booleans is equivalent to using platform::id, but results in nicer code.
@@ -218,13 +218,13 @@
const bool windows = (id == platform_windows);
const bool macosx = (id == platform_macosx);
- const bool Linux = (id == platform_linux);
+ const bool linux = (id == platform_linux);
const bool freebsd = (id == platform_freebsd);
const bool netbsd = (id == platform_netbsd);
const bool openbsd = (id == platform_openbsd);
const bool darwin = (id == platform_darwin);
const bool solaris = (id == platform_solaris);
- const bool Unix = (Linux | freebsd | netbsd | openbsd | darwin | solaris);
+ const bool unix = (linux | freebsd | netbsd | openbsd | darwin | solaris);
const int bits = 8*sizeof(void*);
Index: configure.in
===================================================================
--- configure.in (revision 9146)
+++ configure.in (working copy)
@@ -279,7 +279,7 @@
esac
AC_MSG_RESULT($PIC_FLAGS)
-CPPFLAGS="$CPPFLAGS -DTIXML_USE_STL"
+CPPFLAGS="$CPPFLAGS -ansi -DTIXML_USE_STL"
CXXFLAGS="$CXXFLAGS $PCH_FLAGS $PIC_FLAGS -fexceptions"
AC_SUBST(codeblocks_PCH_FLAGS, "$PCH_FLAGS")
non-standard pre-processor macros.
Unfortunately we still have code, in our trunk, which relies on some non-standard macros. As a result this patch doesn't compile (build stops at depslib) at the moment. I'll explore it further when I have time.