Mail Archives: djgpp-workers/2000/10/11/12:37:52
On Wed, 11 Oct 2000, Eli Zaretskii wrote:
> > From: Andris Pavenis <pavenis AT latnet DOT lv>
> > Date: Wed, 11 Oct 2000 12:45:22 +0200
> >
> > In current version of DJGPP type off_t is int and fpos_t is unsigned
> > long. As result libio/gen-params generates _G_config.h with
> >
> > typedef unsigned long _G_fpos_t;
> > typedef int _G_off_t;
>
> [snip]
>
> > ../../../egcs/libio/genops.c:472: conflicting types for
> > `_IO_default_seekpos' ../../../egcs/libio/libioP.h:349: previous
> > declaration of
> > `_IO_default_seekpos'
> > ../../../egcs/libio/genops.c:556: conflicting types for
> > `_IO_default_seekoff' ../../../egcs/libio/libioP.h:348: previous
> > declaration of
> > `_IO_default_seekoff'
> > ../../../egcs/libio/genops.c:887: conflicting types for
> > `_IO_default_seek' ../../../egcs/libio/libioP.h:358: previous declaration
> > of `_IO_default_seek' make[1]: *** [genops.o] Error 1
>
> Could you please show how _IO_default_seek, _IO_default_seekoff, and
> _IO_default_seekpos are defined (by libioP.h, so it seems), and how
> are they related to the typedef's you've shown above?
It seems to be conflict between libioP.and genops.c
in genops.c. (different return types which brokes libio build when
_IO_off_t and _IO_pos_t are different types). For example:
------------------- in libioP.h ---------------------------------
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *,
_IO_off64_t, int, int));
extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *,
_IO_off64_t, int));
#else
extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int));
------------------- in genops.c ---------------------------------
_IO_pos_t
_IO_default_seekpos (fp, pos, mode)
_IO_FILE *fp;
_IO_pos_t pos;
int mode;
{
return _IO_SEEKOFF (fp, _IO_pos_as_off (pos), 0, mode);
}
--------------------------------------------------------------
And some similar places. If we are changing to libstdc++-v3 soon then
perhaps this is not significant to fix. Otherwise it would be needed.
Andris
- Raw text -