Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Nov 2002 15:34:33 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        jdp@polstra.com, current@freebsd.org
Subject:   Re: [PATCH] note the __sF change in src/UPDATING
Message-ID:  <3DCAF889.BCEA341A@mindspring.com>
References:  <200211071640.gA7GeWJk065460@vashon.polstra.com> <20021107.104251.110765870.imp@bsdimp.com> <200211071926.gA7JQ5i3065752@vashon.polstra.com> <20021107.145225.104187142.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" wrote:
> Gotcha.  I'm thinking very seriously about keeping __sF support (but
> creating no new binaries with it in it) and the freeze on sizeof(FILE)
> through the 5.x series of releases because we botched the
> compatibility stuff so badly to give people a chance to catch their
> breaths before that reorg can happen.

Redefining stdio as:

#define stdin	(__stdio(0))
#define stdout	(__stdio(1))
#define stderr	(__stdio(2))

And then defining an __stdio() function that returns a pointer
to a struct FILE, would let you change the underlying implementation
however you wanted, later, without disrupting newly compiled programs.

This may not be entirely happy for static declarations:

FILE *fp = stdin;	/* default */

...but that's a compiler problem (I think).

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DCAF889.BCEA341A>