www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/11/12:37:52

From: Andris Pavenis <pavenis AT latnet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Subject: Re: gcc-2.97: Problems building libio for targets i[3456]86-pc-msdosdjgpp
Date: Wed, 11 Oct 2000 18:37:04 +0200
X-Mailer: KMail [version 1.1.94]
Cc: gcc AT gcc DOT gnu DOT org
References: <00101112452200 DOT 31210 AT hal> <200010111120 DOT HAA06472 AT indy DOT delorie DOT com>
In-Reply-To: <200010111120.HAA06472@indy.delorie.com>
MIME-Version: 1.0
Message-Id: <00101118370500.01357@hal>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019