Pardon the ignorance

Dan Nelson dnelson at allantgroup.com
Thu May 15 21:25:12 PDT 2003


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 at allantgroup.com


More information about the freebsd-arch mailing list