You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/06/30 02:54:04 UTC
svn commit: r418159 - in /incubator/stdcxx/trunk/include: fstream.cc
loc/_messages.cc sstream.cc
Author: sebor
Date: Thu Jun 29 17:54:04 2006
New Revision: 418159
URL: http://svn.apache.org/viewvc?rev=418159&view=rev
Log:
2006-06-29 Martin Sebor <se...@roguewave.com>
STDCXX-245
STDCXX-247
* sstream.cc (seekpos): Used a typedef rather than the class name
(w/o a template argument list) to prevent invoking a virtual member
function overridden in a derived class to work around an HP aCC
3.27 bug.
* fstream.cc (overflow, xsputn): Same.
Replaced codecvt_base::result with plain old int to work around
yet another HP aCC 3.27 bug.
* _messages.cc (do_get): Same.
Modified:
incubator/stdcxx/trunk/include/fstream.cc
incubator/stdcxx/trunk/include/loc/_messages.cc
incubator/stdcxx/trunk/include/sstream.cc
Modified: incubator/stdcxx/trunk/include/fstream.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/fstream.cc?rev=418159&r1=418158&r2=418159&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/fstream.cc (original)
+++ incubator/stdcxx/trunk/include/fstream.cc Thu Jun 29 17:54:04 2006
@@ -361,7 +361,10 @@
__nchars = this->pptr () - this->pbase ();
}
- if (__nchars != basic_filebuf::xsputn (__buf, __nchars))
+ // typedef helps HP aCC 3.27
+ typedef basic_filebuf _FileBuf;
+
+ if (__nchars != _FileBuf::xsputn (__buf, __nchars))
return traits_type::eof (); // error while writing
}
@@ -417,8 +420,11 @@
// call self recursively to flush the controlled sequence first
const _RWSTD_STREAMSIZE __nwrite = this->pptr () - this->pbase ();
+ // typedef helps HP aCC 3.27
+ typedef basic_filebuf _FileBuf;
+
// return -1 on error to flush the controlled sequence
- if (__nwrite != basic_filebuf::xsputn (__special, __nwrite))
+ if (__nwrite != _FileBuf::xsputn (__special, __nwrite))
return -1;
}
@@ -466,7 +472,9 @@
for (const char_type* __base = __buf; __from_next != __end;
__base = __from_next) {
- const codecvt_base::result __res =
+ // avoid using const codecvt_base::result here
+ // to prevent HP aCC 3.27 errors
+ const int __res =
__cvt.out (__state, __base, __end, __from_next,
__xbuf, __xbuf_end, __to_next);
@@ -812,7 +820,7 @@
const char_type* __base = this->eback () + _C_pbacksize;
while (__from_next != __from_end) {
- const codecvt_base::result __res =
+ const int __res =
__cvt.out (__state, __base, __from_end, __from_next,
__xbuf, __xbuf_end, __to_next);
@@ -928,7 +936,7 @@
_StateT __state = _C_cur_pos.state ();
- const codecvt_base::result __res =
+ const int __res =
__cvt.unshift (__state, __useq, __useq + sizeof __useq, __useq_end);
const _RWSTD_STREAMSIZE __nbytes = __useq_end - __useq;
Modified: incubator/stdcxx/trunk/include/loc/_messages.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_messages.cc?rev=418159&r1=418158&r2=418159&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/loc/_messages.cc (original)
+++ incubator/stdcxx/trunk/include/loc/_messages.cc Thu Jun 29 17:54:04 2006
@@ -6,16 +6,22 @@
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0. Unless required by
- * applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License
- * for the specific language governing permissions and limitations under
- * the License.
+ * Copyright 2005-2006 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Copyright 2001-2006 Rogue Wave Software.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
**************************************************************************/
@@ -70,7 +76,9 @@
state_type __state = state_type ();
- const codecvt_base::result __res =
+ // avoid using const codecvt_base::result here
+ // to prevent HP aCC 3.27 errors
+ const int __res =
__codecvt.in (__state, __src_first, __src_last, __src_next,
__dst_first, __dst_last, __dst_next);
Modified: incubator/stdcxx/trunk/include/sstream.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/sstream.cc?rev=418159&r1=418158&r2=418159&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/sstream.cc (original)
+++ incubator/stdcxx/trunk/include/sstream.cc Thu Jun 29 17:54:04 2006
@@ -446,7 +446,10 @@
{
_RWSTD_ASSERT (this->_C_is_valid ());
- return pos_type (basic_stringbuf::seekoff (__pos, ios_base::beg, __which));
+ // typedef helps HP aCC 3.27
+ typedef basic_stringbuf _StringBuf;
+
+ return pos_type (_StringBuf::seekoff (__pos, ios_base::beg, __which));
}