Hi Bruno,

On Sun, 11 Oct 2020, Bruno Haible wrote:

> What did you mean by "best not to use __base on these platforms",
> when 4 lines below, the code does
>  #  define _base __base

The define is because the FILE structure does have __base but not _base.
Now the comment next that member says /* the buffer (not really) */

This snip from an 2009 e-mail exchange with a SCO engineer about
GNU m4 1.4.12 may shed light on the "not really" comment.
....
Anything with the expression:

     fp->__ptr - fp__base

is wrong.    __base is a pointer to a hidden structure that contains
FILE details including the beginning of the
buffer.  It is hidden so that SCO/USL is free to change the internal
implementation with a rev of libc.so.1 and
not break everything out there......
....

Perhaps the warning I used could have been worded better but that
was the best I could come up with at the time.

-- 
Tim Rice                                Multitalents
t...@multitalents.net



Reply via email to