ftello are not available on mingw but fseeko64 and ftello64 are, interesting

--- Em qui, 26/5/11, Kai Tietz <ktietz70@googlemail.com> escreveu:

De: Kai Tietz <ktietz70@googlemail.com>
Assunto: Re: [Mingw-users] ftello() bug?
Para: "MinGW Users List" <mingw-users@lists.sourceforge.net>
Data: Quinta-feira, 26 de Maio de 2011, 8:14

2011/5/26 Marc-André Lureau <marcandre.lureau@gmail.com>:
> Hi,
> I was trying to complile libtasn1-2.9 with mingw (i686-w64-mingw32-gcc
> (GCC) 4.6.1 20110413 (Fedora MinGW 4.6.1-0.1.20110413.fc15_cross.2)
> but the build failed.
> It seems ftello() implementation is buggy according to gnulib test
> (http://git.savannah.gnu.org/gitweb/?p=libtasn1.git;a=blob;f=gl/m4/ftello.m4)
> The failing test is attached. Is this a mingw bug, a wine bug or a
> gnulib test bug?
> Thanks for your help!
> --
> Marc-André Lureau

No the ftello function is absolutely correct here.  Your code is for
your assumption on Windows native platform buggy.  Please consider
that it makes under Windows a difference if you create/open a file in
binary or textual form.  In the later the offsets might be different
due CR/LF expansion.

So, please use here "wb" instead of just "w".  And for open/creat
function use, please don't bis to specify _O_BINARY flag.


vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
MinGW-users mailing list

This list observes the Etiquette found at
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe