Date: Thu, 07 Nov 2002 16:40:23 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: tlambert2@mindspring.com Cc: jdp@polstra.com, current@freebsd.org Subject: Re: [PATCH] note the __sF change in src/UPDATING Message-ID: <20021107.164023.40619416.imp@bsdimp.com> In-Reply-To: <3DCAF889.BCEA341A@mindspring.com> References: <200211071926.gA7JQ5i3065752@vashon.polstra.com> <20021107.145225.104187142.imp@bsdimp.com> <3DCAF889.BCEA341A@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <3DCAF889.BCEA341A@mindspring.com>
Terry Lambert <tlambert2@mindspring.com> writes:
: "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).
That's what __std{in,out,err}p do, and it saves function calls all
over the place. This patch just makes -stable more compatible with
current.
Warner
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?20021107.164023.40619416.imp>
