Subject: Re: src/gnu/usr.bin/egcs/common
To: Michael Graff <explorer@flame.org>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 12/21/1999 17:35:45
Michael Graff <explorer@flame.org> writes:
> Noriyuki Soda <soda@sra.co.jp> writes:
> > Oh, I see.
> > Perhaps the following is less tricky, BTW.
> > 
> > 	typedef struct __SFILE FILE;
> > 
> > 	extern FILE __sFstdin, __sFstdout, __sFstderr;
> > 
> > 	#define stdin &__sFstdin
> > 	#define stdout &__sFstdout
> > 	#define stderr &__sFstderr
> 
> This will help us in the future, but we still won't be able to change
> the size of FILE for a long time -- so long as we require backwards
> compatibility with NetBSD from three years ago.

If this is true, it's only true because of (dynamic) linker issues.
(some would say "bugs.")

if the data definitions of the variables are in the shared library,
and nothing uses their fields directly (or their fields can be used
in a 'safe' way directly), you should be fine.  Unless there are
linker issues that force the size of the data items to be consistent
between the program and the shared library.  (i seem to recall that
there have been such ... "issues" with the a.out dynamic linker, but,
as noted, one might call them bugs.  8-)



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.