[uClibc] Re: uClibc++ Update
Peter S. Mazinger
ps.m at gmx.net
Mon Jan 10 09:39:47 UTC 2005
Hello!
building w/ gcc-3.4.3 fails.
Attached are:
a. patch to allow building string.cpp: pop_back(), I do not know if that
correction is ok
b. 2 patches that correct the diff occurences of USE_WCHAR and change to
__UCLIBCXX_HAS_WCHAR__ (I also define on the commandline
__UCLIBC_HAS_WCTYPE_H, if I enable wchar() support.
c. make test fails: see log + settest.cpp (something w/ unary, cant
recall)
If I build w/ gcc-3.4.x I also sed -i 's:_GLIBCPP_:_GLIBCXX_:g' the whole
sources. gcc-3.3 uses GLIBCPP, gcc-3.4 uses GLIBCXX.
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
-------------- next part --------------
maptest.cpp: In function `int main()':
maptest.cpp:65: error: request for member `first' in `(&ri)->std::reverse_iterator<Iterator>::operator* [with Iterator = std::__map_iter<std::string, double, std::less<std::string>, std::allocator<double> >]()', which is of non-class type `double'
maptest.cpp:65: error: request for member `second' in `(&ri)->std::reverse_iterator<Iterator>::operator* [with Iterator = std::__map_iter<std::string, double, std::less<std::string>, std::allocator<double> >]()', which is of non-class type `double'
/usr/lib/gcc/i386-linux-uclibc/3.4.3/../../../../include/c++/3.4.3/iterator_base: In member function `typename std::iterator_traits<Iterator>::reference std::reverse_iterator<Iterator>::operator*() const [with Iterator = std::__map_iter<std::string, double, std::less<std::string>, std::allocator<double> >]':
maptest.cpp:65: instantiated from here
/usr/lib/gcc/i386-linux-uclibc/3.4.3/../../../../include/c++/3.4.3/iterator_base:144: error: invalid initialization of non-const reference of type 'double&' from a temporary of type 'std::pair<std::string, double>'
make[1]: *** [maptest.o] Error 1
make: *** [tests] Error 2
-------------- next part --------------
--- include/streambuf.mps 2005-01-10 09:50:16.000000000 +0100
+++ include/streambuf 2005-01-10 09:50:37.000000000 +0100
@@ -232,7 +232,7 @@
typedef basic_streambuf<char> streambuf;
-#ifdef __UCLIBC_HAS_WCHAR__
+#ifdef __UCLIBCXX_HAS_WCHAR__
typedef basic_streambuf<wchar_t> wstreambuf;
#endif
--- include/string_iostream.mps 2005-01-10 09:51:07.000000000 +0100
+++ include/string_iostream 2005-01-10 09:51:44.000000000 +0100
@@ -21,10 +21,12 @@
#include <ostream>
#include <string>
-#ifdef __USE_WCHAR
+#ifdef __UCLIBCXX_HAS_WCHAR__
#include <wchar.h>
+#ifdef __UCLIBCXX_HAS_WCTYPE_H
#include <wctype.h>
#endif
+#endif
#ifndef __HEADER_STD_STRING_IOSTREAM
#define __HEADER_STD_STRING_IOSTREAM 1
-------------- next part --------------
--- include/streambuf.wchar~ 2004-09-01 22:56:21.000000000 +0200
+++ include/streambuf 2004-09-07 23:26:40.000000000 +0200
@@ -230,7 +230,7 @@ namespace std{
typedef basic_streambuf<char> streambuf;
-#ifdef USE_WCHAR
+#ifdef __UCLIBC_HAS_WCHAR__
typedef basic_streambuf<wchar_t> wstreambuf;
#endif
--- include/cwchar.wchar~ 2004-06-09 04:08:56.000000000 +0200
+++ include/cwchar 2004-09-07 23:27:36.000000000 +0200
@@ -50,7 +50,7 @@
#include <cstddef>
#include <ctime>
-#if _GLIBCPP_HAVE_WCHAR_H
+#ifdef __UCLIBCXX_HAS_WCHAR__
#include <wchar.h>
#endif
@@ -129,7 +129,7 @@ namespace std
#undef wprintf
#undef wscanf
-#if _GLIBCPP_USE_WCHAR_T
+#ifdef __UCLIBCXX_HAS_WCHAR__
namespace std
{
using ::wint_t;
@@ -252,6 +252,6 @@ namespace std
}
#endif
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //__UCLIBCXX_HAS_WCHAR__
#endif
--- include/fstream.wchar~ 2004-09-06 19:53:54.000000000 +0200
+++ include/fstream 2004-09-07 23:19:03.000000000 +0200
@@ -356,7 +356,9 @@ namespace std{
typedef basic_filebuf<char> filebuf;
+#ifdef __UCLIBCXX_HAS_WCHAR__
typedef basic_filebuf<wchar_t> wfilebuf;
+#endif
--- include/cwctype.wchar~ 2004-06-09 04:08:56.000000000 +0200
+++ include/cwctype 2004-09-07 23:29:01.000000000 +0200
@@ -48,9 +48,11 @@
#include <bits/c++config.h>
-#if _GLIBCPP_HAVE_WCTYPE_H
+#ifdef __UCLIBCXX_HAS_WCHAR__
+#ifdef __UCLIBCXX_HAS_WCTYPE_H
#include <wctype.h>
#endif
+#endif
// Get rid of those macros defined in <wctype.h> in lieu of real functions.
#undef iswalnum
@@ -73,7 +75,7 @@
#undef wctrans
#undef wctype
-#if _GLIBCPP_USE_WCHAR_T
+#if __UCLIBCXX_HAS_WCHAR__
namespace std
{
using ::wint_t; // cwchar
@@ -101,6 +103,6 @@ namespace std
using ::wctrans;
using ::wctype;
}
-#endif //_GLIBCPP_USE_WCHAR_T
+#endif //__ULIBCXX_HAS_WCHAR__
#endif
--- include/char_traits.wchar~ 2004-09-01 22:51:02.000000000 +0200
+++ include/char_traits 2004-09-07 23:27:09.000000000 +0200
@@ -21,10 +21,12 @@
#include <exception>
#include <memory>
-#ifdef __USE_WCHAR
+#ifdef __UCLIBCXX_HAS_WCHAR__
#include <wchar.h>
+#ifdef __UCLIBCXX_HAS_WCTYPE_H
#include <wctype.h>
#endif
+#endif
#ifndef __HEADER_CHAR_TRAITS
#define __HEADER_CHAR_TRAITS 1
@@ -119,7 +121,7 @@ namespace std{
};
-#ifdef __USE_WCHAR
+#ifdef __UCLIBCXX_HAS_WCHAR__
template<> struct char_traits<wchar_t> {
typedef wchar_t char_type;
typedef wint_t int_type;
--- include/string.wchar~ 2004-09-06 17:11:38.000000000 +0200
+++ include/string 2004-09-07 23:25:26.000000000 +0200
@@ -28,10 +28,12 @@
#include <iostream>
-#ifdef __USE_WCHAR
+#ifdef __UCLIBCXX_HAS_WCHAR__
#include <wchar.h>
+#ifdef __UCLIBCXX_HAS_WCTYPE_H
#include <wctype.h>
#endif
+#endif
#ifndef __HEADER_STD_STRING
#define __HEADER_STD_STRING 1
-------------- next part --------------
--- include/string.mps 2005-01-10 10:10:18.000000000 +0100
+++ include/string 2005-01-10 10:09:09.000000000 +0100
@@ -61,6 +61,8 @@
typedef char * iterator;
typedef char * const_iterator;
+ void pop_back();
+
typedef typename vector<Ch, A>::reverse_iterator iterator;
typedef typename vector<Ch, A>::const_reverse_iterator const_iterator;
More information about the uClibc
mailing list