Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Change of funopen(3)

In article <>,
Takahiro Kambe  <> wrote:
>In message <>
>       on Thu, 2 Feb 2012 19:16:32 +0000,
>       David Laight <> wrote:
>> On Thu, Feb 02, 2012 at 03:23:22PM +0900, Takahiro Kambe wrote:
>>> What is the best way to modify (or writing portable) code using
>>> funopen(3) to deal with change of its 4th parameter?
>>>     fpos_t (*seekfn)(void *, fpos_t, int)
>>> v.s.
>>>     off_t (*seekfn)(void *, off_t, int)
>> Use off_t!
>> The change to seekfn() is to maintain binary compatibility
>> when fpos_t changed to a structure type.
>I know it.  But I wondered s/fpos_t/off_t/g cause problem on other
>operating systems.

This cannot be an issue, since fpos_t is an opaque type only known
to the guts of stdio, so it is unknown what a seekfn() function that
has not access to the type info can do with it. This has already been
handled in an ugly way so far, so it cannot get uglier.


Home | Main Index | Thread Index | Old Index