This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/11378 (take2) + xsputn optmizations
>I think that means 64-bit streampos and streamoff types, mainly.
If -D_FILE_OFFSET_BITS=64 is added, as below, then streampos will be ok.
Streamoff can be fixed in config/io/c_io_stdio.h, by using long long
instead of long for non-64 bit targets.
If fseek/fgetpos/fsetpos were being used, then this would be all that
was necessary, as _FILE_OFFSET_BITS would switch fseek->fseek64,
fgetpos->fgetpos64, fsetpos->fsetpos64. With lseek, I don't think there
are as many options.
-benjamin
2003-07-08 Benjamin Kosnik <bkoz@redhat.com>
* config/linux.h (CPLUSPLUS_CPP_SPEC): Add _FILE_OFFSET_BITS.
Index: config/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/linux.h,v
retrieving revision 1.24
diff -c -p -r1.24 linux.h
*** config/linux.h 16 Jun 2003 02:41:50 -0000 1.24
--- config/linux.h 8 Jul 2003 16:16:41 -0000
*************** Boston, MA 02111-1307, USA. */
*** 80,86 ****
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
! #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
#undef LIB_SPEC
/* We no longer link with libc_p.a or libg.a by default. If you
--- 80,86 ----
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
! #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 %(cpp)"
#undef LIB_SPEC
/* We no longer link with libc_p.a or libg.a by default. If you