Re: FYI: portability tweak for Tru64 V4.0.

2006-10-26 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> +static inline off_t ftello (FILE *stream) >> +{ >> + off_t off = ftell (stream); >> + if (off < 0) >> +return off; >> + if (off != (long int) off) >> +{ >> + errno = EOVERFLOW; >> + return

Re: FYI: portability tweak for Tru64 V4.0.

2006-10-25 Thread Paul Eggert
>> the ftello >> substitute needs to worry about overflow only on hosts where long int >> is wider than off_t. But I don't know of any such hosts and don't >> expect that there will ever be any. > > Too late, Windows is one. I assume you're talking about IA-64 Windows. But as I understand it, lo

Re: FYI: portability tweak for Tru64 V4.0.

2006-10-25 Thread Matthew Woehlke
Paul Eggert wrote: Jim Meyering <[EMAIL PROTECTED]> writes: +static inline off_t ftello (FILE *stream) +{ + off_t off = ftell (stream); + if (off < 0) +return off; + if (off != (long int) off) +{ + errno = EOVERFLOW; + return -1; +} + return off; +} Something's odd h

Re: FYI: portability tweak for Tru64 V4.0.

2006-10-25 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > +static inline off_t ftello (FILE *stream) > +{ > + off_t off = ftell (stream); > + if (off < 0) > +return off; > + if (off != (long int) off) > +{ > + errno = EOVERFLOW; > + return -1; > +} > + return off; > +} Something's odd