This is the mail archive of the gcc-bugs@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]

Re: libio in gcc in CVS is not compatible with glibc 2.2


On Tue, Jul 18, 2000 at 04:11:37PM -0300, Alexandre Oliva wrote:
> On Jul 18, 2000, Ulrich Drepper <drepper@redhat.com> wrote:
> 
> > Alexandre Oliva <aoliva@redhat.com> writes:
> >> Then why does the test fail?  Is it just a compiler error?  I had
> >> understood it was a run-time error, but maybe I just assumed too much.
> 
> > It's a compile-time problem.
> 
> Ok, so what can GCC for people to be able to build it with glibc 2.2
> as well as older versions of glibc?  Wouldn't changing the declaration
> and the definitio of _IO_seekoff in GCC's libio break builds with
> older releases of glibc?
> 

Please note that I believe _IO_off_t is the same as _IO_fpos_t on all
but glibc 2.2. I think it is safe. But someone has to test it on
other platforms.


H.J.
---
2000-07-17  H.J. Lu  (hjl@gnu.org)

	* libio.h (_IO_pos_BAD): Cast to _IO_off_t not _IO_fpos_t for
	glibc 2.2.

Index: libio/iolibio.h
===================================================================
RCS file: /work/cvs/gnu/egcs/libio/iolibio.h,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 iolibio.h
--- libio/iolibio.h	1998/02/28 03:57:33	1.1.1.3
+++ libio/iolibio.h	2000/07/18 06:52:53
@@ -38,7 +38,7 @@ extern int _IO_obstack_vprintf __P ((str
                                     _IO_va_list));
 extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
 #ifndef _IO_pos_BAD
-#define _IO_pos_BAD ((_IO_fpos_t)(-1))
+#define _IO_pos_BAD ((_IO_off_t)(-1))
 #endif
 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
 #define _IO_fseek(__fp, __offset, __whence) \

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