summaryrefslogtreecommitdiff
path: root/misc/uClibc++/libxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-02 16:35:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-02 16:35:37 +0000
commit93e2ebb1e771bf5a4bfd250def96f61b3df91b04 (patch)
tree35260ec9ddc4541943a2106fed7ec8fc63e472b1 /misc/uClibc++/libxx
parent95682a5d15e5cb99ad3ff1713b2313ac81f4e125 (diff)
downloadnuttx-93e2ebb1e771bf5a4bfd250def96f61b3df91b04.tar.gz
nuttx-93e2ebb1e771bf5a4bfd250def96f61b3df91b04.tar.bz2
nuttx-93e2ebb1e771bf5a4bfd250def96f61b3df91b04.zip
More uClibc++ build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5299 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/uClibc++/libxx')
-rw-r--r--misc/uClibc++/libxx/uClibc++/Make.defs17
-rw-r--r--misc/uClibc++/libxx/uClibc++/eh_terminate.cxx4
-rw-r--r--misc/uClibc++/libxx/uClibc++/func_exception.cxx16
-rw-r--r--misc/uClibc++/libxx/uClibc++/stdexcept.cxx93
-rw-r--r--misc/uClibc++/libxx/uClibc++/string.cxx128
5 files changed, 125 insertions, 133 deletions
diff --git a/misc/uClibc++/libxx/uClibc++/Make.defs b/misc/uClibc++/libxx/uClibc++/Make.defs
index 2a877ee3e..b8f7a7092 100644
--- a/misc/uClibc++/libxx/uClibc++/Make.defs
+++ b/misc/uClibc++/libxx/uClibc++/Make.defs
@@ -37,13 +37,16 @@
CXXSRCS += algorithm.cxx associative_base.cxx bitset.cxx char_traits.cxx
CXXSRCS += complex.cxx del_op.cxx del_opnt.cxx del_opv.cxx del_opvnt.cxx
-CXXSRCS += deque.cxx exception.cxx fstream.cxx func_exception.cxx
-CXXSRCS += iomanip.cxx ios.cxx iostream.cxx istream.cxx iterator.cxx
-CXXSRCS += limits.cxx list.cxx locale.cxx map.cxx new_handler.cxx
-CXXSRCS += new_op.cxx new_opnt.cxx new_opv.cxx new_opvnt.cxx numeric.cxx
-CXXSRCS += ostream.cxx queue.cxx set.cxx sstream.cxx stack.cxx
-CXXSRCS += stdexcept.cxx streambuf.cxx string.cxx typeinfo.cxx utility.cxx
-CXXSRCS += valarray.cxx vector.cxx
+CXXSRCS += deque.cxx fstream.cxx iomanip.cxx ios.cxx iostream.cxx
+CXXSRCS += istream.cxx iterator.cxx limits.cxx list.cxx locale.cxx
+CXXSRCS += map.cxx new_handler.cxx new_op.cxx new_opnt.cxx new_opv.cxx
+CXXSRCS += new_opvnt.cxx numeric.cxx ostream.cxx queue.cxx set.cxx
+CXXSRCS += sstream.cxx stack.cxx streambuf.cxx string.cxx typeinfo.cxx
+CXXSRCS += utility.cxx valarray.cxx vector.cxx
+
+ifeq ($(CONFIG_UCLIBCXX_EXCEPTION),y)
+CXXSRCS += exception.cxx func_exception.cxx stdexcept.cxx
+endif
ifneq ($(CONFIG_UCLIBCXX_HAVE_LIBSUPCXX),y)
CXXSRCS += eh_alloc.cxx eh_globals.cxx eh_terminate.cxx
diff --git a/misc/uClibc++/libxx/uClibc++/eh_terminate.cxx b/misc/uClibc++/libxx/uClibc++/eh_terminate.cxx
index f64be60d9..1d1aa9eb7 100644
--- a/misc/uClibc++/libxx/uClibc++/eh_terminate.cxx
+++ b/misc/uClibc++/libxx/uClibc++/eh_terminate.cxx
@@ -20,8 +20,6 @@
#include <cstdlib>
#include <exception>
-#ifdef CONFIG_UCLIBCXX_EXCEPTION
-
namespace std
{
_UCXXEXPORT static terminate_handler __terminate_handler = abort;
@@ -71,5 +69,3 @@ namespace std
terminate();
}
}
-
-#endif
diff --git a/misc/uClibc++/libxx/uClibc++/func_exception.cxx b/misc/uClibc++/libxx/uClibc++/func_exception.cxx
index 9971871ef..d5bbe001f 100644
--- a/misc/uClibc++/libxx/uClibc++/func_exception.cxx
+++ b/misc/uClibc++/libxx/uClibc++/func_exception.cxx
@@ -22,8 +22,8 @@
#include <stdexcept>
#include <cstdlib>
-namespace std{
-
+namespace std
+{
#ifdef CONFIG_UCLIBCXX_EXCEPTION
_UCXXEXPORT void __throw_bad_alloc()
@@ -33,7 +33,7 @@ _UCXXEXPORT void __throw_bad_alloc()
_UCXXEXPORT void __throw_out_of_range(const char * message)
{
- if(message == 0)
+ if (message == 0)
{
throw out_of_range();
}
@@ -43,7 +43,7 @@ _UCXXEXPORT void __throw_out_of_range(const char * message)
_UCXXEXPORT void __throw_overflow_error(const char * message)
{
- if(message == 0)
+ if (message == 0)
{
throw overflow_error();
}
@@ -53,7 +53,7 @@ _UCXXEXPORT void __throw_overflow_error(const char * message)
_UCXXEXPORT void __throw_length_error(const char * message)
{
- if(message == 0)
+ if (message == 0)
{
throw length_error();
}
@@ -63,7 +63,7 @@ _UCXXEXPORT void __throw_length_error(const char * message)
_UCXXEXPORT void __throw_invalid_argument(const char * message)
{
- if(message == 0)
+ if (message == 0)
{
throw invalid_argument();
}
@@ -100,6 +100,4 @@ _UCXXEXPORT void __throw_invalid_argument(const char *)
#endif
-
-
-}
+} // namespace
diff --git a/misc/uClibc++/libxx/uClibc++/stdexcept.cxx b/misc/uClibc++/libxx/uClibc++/stdexcept.cxx
index d372c0b77..73238526f 100644
--- a/misc/uClibc++/libxx/uClibc++/stdexcept.cxx
+++ b/misc/uClibc++/libxx/uClibc++/stdexcept.cxx
@@ -1,63 +1,64 @@
-/* Copyright (C) 2004 Garrett A. Kajmowicz
-
- This file is part of the uClibc++ Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/* Copyright (C) 2004 Garrett A. Kajmowicz
+ *
+ * This file is part of the uClibc++ Library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include <exception>
#include <stdexcept>
#ifdef CONFIG_UCLIBCXX_EXCEPTION
-namespace std{
-
- _UCXXEXPORT logic_error::logic_error() throw() : mstring(){
-
- }
-
- _UCXXEXPORT logic_error::logic_error(const string& what_arg) : mstring(what_arg){
-
- }
-
- _UCXXEXPORT const char * logic_error::what() const throw(){
- return mstring.c_str();
- }
-
-
- _UCXXEXPORT out_of_range::out_of_range() : logic_error(){
+namespace std
+{
+ _UCXXEXPORT logic_error::logic_error() throw() : mstring()
+ {
+ }
- }
+ _UCXXEXPORT logic_error::logic_error(const string& what_arg) : mstring(what_arg)
+ {
+ }
- _UCXXEXPORT out_of_range::out_of_range(const string & what_arg) : logic_error(what_arg) {
-
- }
+ _UCXXEXPORT const char * logic_error::what() const throw()
+ {
+ return mstring.c_str();
+ }
- _UCXXEXPORT runtime_error::runtime_error() : mstring(){
+ _UCXXEXPORT out_of_range::out_of_range() : logic_error()
+ {
+ }
- }
+ _UCXXEXPORT out_of_range::out_of_range(const string & what_arg) : logic_error(what_arg)
+ {
+ }
- _UCXXEXPORT runtime_error::runtime_error(const string& what_arg) : mstring(what_arg){
+ _UCXXEXPORT runtime_error::runtime_error() : mstring()
+ {
+ }
- }
+ _UCXXEXPORT runtime_error::runtime_error(const string& what_arg) : mstring(what_arg)
+ {
+ }
- _UCXXEXPORT const char * runtime_error::what() const throw(){
- return mstring.c_str();
- }
+ _UCXXEXPORT const char * runtime_error::what() const throw()
+ {
+ return mstring.c_str();
+ }
-}
+} // namespace
#endif
diff --git a/misc/uClibc++/libxx/uClibc++/string.cxx b/misc/uClibc++/libxx/uClibc++/string.cxx
index 1edf69b5d..dc99fe29e 100644
--- a/misc/uClibc++/libxx/uClibc++/string.cxx
+++ b/misc/uClibc++/libxx/uClibc++/string.cxx
@@ -1,20 +1,20 @@
-/* Copyright (C) 2004 Garrett A. Kajmowicz
+/* Copyright (C) 2004 Garrett A. Kajmowicz
- This file is part of the uClibc++ Library.
+ This file is part of the uClibc++ Library.
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- This library 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
- Lesser General Public License for more details.
+ This library 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
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define __UCLIBCXX_COMPILE_STRING__ 1
@@ -26,87 +26,81 @@
#include <string.h>
#include <ostream>
-namespace std{
-
+namespace std
+{
#ifdef __UCLIBCXX_EXPAND_STRING_CHAR__
-
#ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
- template _UCXXEXPORT string::basic_string(const allocator<char> &);
- template _UCXXEXPORT string::basic_string(size_type n, char c, const allocator<char> & );
- template _UCXXEXPORT string::basic_string(const char* s, const allocator<char>& al);
- template _UCXXEXPORT string::basic_string(const basic_string& str, size_type pos, size_type n, const allocator<char>& al);
- template _UCXXEXPORT string::~basic_string();
+ template _UCXXEXPORT string::basic_string(const allocator<char> &);
+ template _UCXXEXPORT string::basic_string(size_type n, char c, const allocator<char> & );
+ template _UCXXEXPORT string::basic_string(const char* s, const allocator<char>& al);
+ template _UCXXEXPORT string::basic_string(const basic_string& str, size_type pos, size_type n, const allocator<char>& al);
+ template _UCXXEXPORT string::~basic_string();
#endif // __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
- template _UCXXEXPORT string & string::append(const char * s, size_type n);
+ template _UCXXEXPORT string & string::append(const char * s, size_type n);
- template _UCXXEXPORT string::size_type string::find(const string & str, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find(const char* s, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find (char c, size_type pos) const;
- template _UCXXEXPORT string::size_type string::rfind(const string & str, size_type pos) const;
- template _UCXXEXPORT string::size_type string::rfind(char c, size_type pos) const;
- template _UCXXEXPORT string::size_type string::rfind(const char* s, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find(const string & str, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find(const char* s, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find (char c, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::rfind(const string & str, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::rfind(char c, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::rfind(const char* s, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_first_of(const string &, size_type) const;
- template _UCXXEXPORT string::size_type string::find_first_of(const char *, size_type pos, size_type n) const;
- template _UCXXEXPORT string::size_type string::find_first_of(const char*, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_first_of(char c, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find_first_of(const string &, size_type) const;
+ template _UCXXEXPORT string::size_type string::find_first_of(const char *, size_type pos, size_type n) const;
+ template _UCXXEXPORT string::size_type string::find_first_of(const char*, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find_first_of(char c, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_last_of (const string & , size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos, size_type n) const;
- template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_last_of (char c, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find_last_of (const string & , size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos, size_type n) const;
+ template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos) const;
+ template _UCXXEXPORT string::size_type string::find_last_of (char c, size_type pos) const;
- template _UCXXEXPORT string::size_type string::find_first_not_of(const string &, size_type) const;
- template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type, size_type) const;
- template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type) const;
- template _UCXXEXPORT string::size_type string::find_first_not_of(char c, size_type) const;
+ template _UCXXEXPORT string::size_type string::find_first_not_of(const string &, size_type) const;
+ template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type, size_type) const;
+ template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type) const;
+ template _UCXXEXPORT string::size_type string::find_first_not_of(char c, size_type) const;
- template _UCXXEXPORT int string::compare(const string & str) const;
-// template _UCXXEXPORT int string::compare(size_type pos1, size_type n1, const string & str) const;
- template _UCXXEXPORT int string::compare(
- size_type pos1, size_type n1, const string & str, size_type pos2, size_type n2) const;
+ template _UCXXEXPORT int string::compare(const string & str) const;
+//template _UCXXEXPORT int string::compare(size_type pos1, size_type n1, const string & str) const;
+ template _UCXXEXPORT int string::compare(
+ size_type pos1, size_type n1, const string & str, size_type pos2, size_type n2) const;
- template _UCXXEXPORT string string::substr(size_type pos, size_type n) const;
+ template _UCXXEXPORT string string::substr(size_type pos, size_type n) const;
- template _UCXXEXPORT string & string::operator=(const string & str);
- template _UCXXEXPORT string & string::operator=(const char * s);
+ template _UCXXEXPORT string & string::operator=(const string & str);
+ template _UCXXEXPORT string & string::operator=(const char * s);
- template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
- template _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
- template _UCXXEXPORT bool operator==(const string & lhs, const char * rhs);
+ template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
+ template _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
+ template _UCXXEXPORT bool operator==(const string & lhs, const char * rhs);
- template _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
- template _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
- template _UCXXEXPORT bool operator!=(const string & lhs, const char * rhs);
+ template _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
+ template _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
+ template _UCXXEXPORT bool operator!=(const string & lhs, const char * rhs);
- template _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
- template _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
- template _UCXXEXPORT string operator+(const string & lhs, const string & rhs);
+ template _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
+ template _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
+ template _UCXXEXPORT string operator+(const string & lhs, const string & rhs);
- template _UCXXEXPORT bool operator> (const string & lhs, const string & rhs);
- template _UCXXEXPORT bool operator< (const string & lhs, const string & rhs);
+ template _UCXXEXPORT bool operator> (const string & lhs, const string & rhs);
+ template _UCXXEXPORT bool operator< (const string & lhs, const string & rhs);
+// Functions dependent upon OSTREAM
-//Functions dependent upon OSTREAM
#ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__
-
template _UCXXEXPORT ostream & operator<<(ostream & os, const string & str);
-
#endif
-//Functions dependent upon ISTREAM
-#ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__
+// Functions dependent upon ISTREAM
+#ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__
template _UCXXEXPORT istream & operator>>(istream & is, string & str);
-
-
#endif
-
#endif
-}
+} // namespace