Re: LFS problems with regex.h
On Mon, May 21, 2001 at 11:32:58AM -0400 , Christopher C. Chimelis wrote:
> On Mon, 21 May 2001, Petr Cech wrote:
>
> > I've been bitten by another LFS issue. As in apache case, the victim was
> > regex.h included in the package. The problem is
> >
> > typedef off_t regoff_t
> >
> > which is wrong. it should read
> >
> > typdef int regoff_t
> >
> > glibc is right, apache and php3 were fixed, php4 will in in next upload and
> > here are some packages, which may have this problem also. postgresql has the
> > wrong header, but I don't know if it uses it
>
> Assuming it should be 'int' is probably incorrect on 64-bit
> architectures. off_t on Alpha is a 'long'. Should I file a bug now?
The problem is not the size of it on different architectures, but that off_t
changes depending on LARGE_SOURCE and such. So this breaks when an DSO in my
case is compiled with LFS and the other one is not.
/usr/include/regex.h says
/* Type for byte offsets within the string. POSIX mandates this. */
typedef int regoff_t;
so this should be consistent accross all source code, or StrangeThings(TM)
will happen (like ereg not working in php3)
Petr Cech
--
Debian GNU/Linux maintainer - www.debian.{org,cz}
cech@atrey.karlin.mff.cuni.cz
<Myth> the UNIX trademark has changed hands so much no one is quite sure who really owns it anymore
Reply to: