testsuite/27_io/filebuf.cc is nonportable

fenlason@clearway.com fenlason@clearway.com
Sat Apr 1 00:00:00 GMT 2000


CVS says the file is version:
/filebuf.cc/1.12/Wed Dec 22 04:27:27 1999//

As near as I can tell (C++ is not my first language), it reads ~BUFSIZ bytes
from "filebuf-1.txt", then expects the next character to be an 'i'.  On RedHat
x86 Linux 6.1, with a BUFSIZ of 1024, this is true.  On sparc-solaris2.7,
with a bufsiz of 8192, the next character is a 't', and the test fails.
Changing the constant to 't', makes the test pass on Solaris but fail on Linux.
(Of course.)

I'm not sure where BUFSIZ comes from here--if it is supposed to come from
libstdc++, then the real bug is in configuring/compiling libstdc++.  If it
is supposed to come from the OS, than filebuf.cc is broken.

			-- JF


More information about the Libstdc++ mailing list