Yakov Lerner wrote:

> > Surprisingly, changing ftell() to ftello() does not change anything.

On systems that support ftello() ftell() is defined to use ftello().

> > Casting ftell() to (off_t) doesn't change anything.
> > Funnily, casting ftell to (long) makes the problem go away
> > (as it ftell does not already return long, it does):
> >
> > 1628         search_info.curr_offset = (long)ftell(fp);
> > 1644         search_info.curr_offset = (long)ftell(fp);
> > 1651         search_info.match_offset = (long)ftell(fp);

This won't work correctly when off_t is bigger than long, e.g. long long.

> New developments:
> 
> It looks like -D_FILE_OFFSET_BITS=64 alone is wrong because
> it's not complete. Correct build settings are:
> 
>     gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> 
> This makes problem go away without any changes in the sources.

So gcc has an option to break your code?  That can't be right.

>    3. Thou shalt not use Google as a verb.
>    http://www.thechurchofgoogle.org/Scripture/10_Commandments.html

One of the (many) false statements found on the internet.  Google
objects to using googling for searching in general, it's OK to use for
searching with Google.

-- 
Veni, Vidi, VW -- I came, I saw, I drove around in a little car.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to