Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2003 23:25:08 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Don Sullivan <sullivan@gaia.arc.nasa.gov>
Cc:        imp@freebsd.org
Subject:   Re: Pardon the ignorance
Message-ID:  <20030516042508.GC23782@dan.emsphone.com>
In-Reply-To: <Pine.OSX.4.55.0305152039360.10225@vishnu.arc.nasa.gov>
References:  <Pine.OSX.4.55.0305152039360.10225@vishnu.arc.nasa.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 15), Don Sullivan said:
> 
> In the change to stdio.h in FreeBSD 4.8, you say:
> "std{in,out,err} are no longer compile time constants."
> 
> Please pardon my incredible ignorance, but what does that mean ?
> Can you please point me to a reference ?
> 
> FILE *def_thing = stdout;
> 
> no longer works.
> apparently, it shouldn't. why ?

I think it was changed because the size of "struct file" aka FILE
needed to change, and the only way to be sure that stdin/out/err got
initialized to the right locations was to have libc do it instead of
the program.

Linux made this same change back in 6.0 ( see
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3137 )

-- 
	Dan Nelson
	dnelson@allantgroup.com



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