Author: faridz
Date: Thu Apr 3 10:55:12 2008
New Revision: 644426
URL: http://svn.apache.org/viewvc?rev=644426&view=rev
Log:
2008-04-03 Farid Zaripov <[EMAIL PROTECTED]>
STDCXX-824
* src/num_get.cpp (__rw_get_num): If type == _C_pvoid, convert the data
in
buf using __rw_strtoull() instead of __rw_strtoul() on LLP64 platforms.
Modified:
stdcxx/trunk/src/num_get.cpp
Modified: stdcxx/trunk/src/num_get.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/src/num_get.cpp?rev=644426&r1=644425&r2=644426&view=diff
==============================================================================
--- stdcxx/trunk/src/num_get.cpp (original)
+++ stdcxx/trunk/src/num_get.cpp Thu Apr 3 10:55:12 2008
@@ -364,6 +364,15 @@
else if (type & __rw_facet::_C_signed || __rw_facet::_C_bool == type) {
val.l = _RW::__rw_strtol (buf, &err, base);
}
+ else if (__rw_facet::_C_pvoid == type) {
+
+#if defined (_RWSTD_LONG_LONG) && _RWSTD_PTR_SIZE > _RWSTD_LONG_SIZE
+ // assume pointers fit into long long
+ val.ull = _RW::__rw_strtoull (buf, &err, base);
+#else
+ val.ul = _RW::__rw_strtoul (buf, &err, base);
+#endif
+ }
else {
val.ul = _RW::__rw_strtoul (buf, &err, base);
}
@@ -489,7 +498,11 @@
case __rw_facet::_C_pvoid:
*_RWSTD_STATIC_CAST (void**, pval) =
+#if defined (_RWSTD_LONG_LONG) && _RWSTD_PTR_SIZE > _RWSTD_LONG_SIZE
+ _RWSTD_REINTERPRET_CAST (void*, val.ull);
+#else
_RWSTD_REINTERPRET_CAST (void*, val.ul);
+#endif
// disable grouping
grouping = "";