This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] preliminary fpos work


Something fun for a Friday.... 

This is an attempt to use fpos_t file positioning for C++ io. This isn't
completely done, but it works and is necessary for further filepos work.

1) Andreas and Paolo issues with 64 bit io, consultation with Ulrich
indicates that the best solution would probably be a
-D_FILE_OFFSET_BITS=64 define a la USE_GNU. This can be added later,
hopefully after the "C" compatibility work is finished, to a libstdc++
include, or not later, as another macro. I'm punting on this for now.

2) now a real filebuf::seekpos can happen. I leave that for Paolo! 

-benjamin

tested x86/linux
tested x86/linux x powerpc-eabisim


2003-07-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (target_headers): Add fpos.h
	(bits_headers): Remove.
	* include/Makefile.in: Regenerate.
	* configure.in: Add FPOS_INC_SRCDIR, substitute it.
	* configure: Regenerate.
	* configure.host: Add fpos_include_dir.
	* config/os/gnu-linux/fpos.h: New.
	* config/os/generic/fpos.h: Add.	
	* include/bits/fpos.h: Remove.	

	* config/io/c_io_stdio.h: Remove fpos_t typedef.

	* include/bits/fstream.tcc: Tweaks.
	* include/std/std_fstream.h: Same.
	
	* testsuite/27_io/fpos/1.cc (test01): Uncomment. Move to...
	* testsuite/27_io/fpos/mbstate_t/1.cc: ...here.
	* testsuite/27_io/fpos/mbstate_t/2.cc: Same.
	* testsuite/27_io/fpos/mbstate_t/3.cc: Same.
	* testsuite/27_io/fpos/1.cc: New.
	
2003-07-03  Benjamin Kosnik  <bkoz@redhat.com>
	    Petur Runolfsson  <peturr02@ru.is>
	
	* include/std/std_streambuf.h: Remove _M_pos.
	* config/io/basic_file_stdio.h: Use seekpos instead of seekoff.
	* config/io/basic_file_stdio.cc: Same, use fseek instead of lseek,
	use fread/fwrite instead of read/write.
	* testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc: Fix.
	* testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Close filebufs
	before reading again.
	* testsuite/27_io/objects/char/6.cc: Tweak.
	

Attachment: p.20030704
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]