Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
warning: "nullptr" redefined when compile sdk\mozilla_chardet\src\nsSBCSGroupPro
oBFusCATed:
No, you're not allowed, yet.
Also -std=c++11 is the correct option.
stahta01:
--- Quote from: oBFusCATed on January 08, 2014, 07:35:36 pm ---No, you're not allowed, yet.
Also -std=c++11 is the correct option.
--- End quote ---
IIRC, CB Will NOT compile (on windows using MinGW TDM) with -std=c++11 because that hides too many things like _popen last time I tried about 4 months ago.
Possible patch; but, I am coughing and sneezing too much to test it.
--- Code: ---Index: src/include/mozilla_chardet/mfbt/mozilla/NullPtr.h
===================================================================
--- src/include/mozilla_chardet/mfbt/mozilla/NullPtr.h (revision 9544)
+++ src/include/mozilla_chardet/mfbt/mozilla/NullPtr.h (working copy)
@@ -12,6 +12,9 @@
#ifndef mozilla_NullPtr_h
#define mozilla_NullPtr_h
+// C::B patch: to fix multiple defines of nullptr
+#include "prep.h" // C::B Header that defines nullptr
+
#include "mozilla/Compiler.h"
#if defined(__clang__)
Index: src/include/prep.h
===================================================================
--- src/include/prep.h (revision 9544)
+++ src/include/prep.h (working copy)
@@ -39,6 +39,7 @@
const nullptr_t& operator=(const nullptr_t&);
} nullptr_;
#define nullptr nullptr_
+ #define MOZ_HAVE_CXX11_NULLPTR // prevents mozilla/NullPtr.h from defining nullptr.
template<typename T> inline bool operator==(const nullptr_t& lhs, T const& rhs) { return lhs.equals(rhs); }
template<typename T> inline bool operator==(T const& lhs, const nullptr_t& rhs) { return rhs.equals(lhs); }
--- End code ---
Tim S.
scarphin:
Tim: I can confirm your patch removes the warning.
ollydbg:
I commit the patch to rev9589, thanks for all your contribution.
Navigation
[0] Message Index
[*] Previous page
Go to full version