At 10:46 PM -0800 3/30/02, Kris Kennaway wrote:
>On Sun, Mar 24, 2002 at 05:54:36PM -0800, Kris Kennaway wrote:
>  > On Sun, Mar 24, 2002 at 06:43:13PM -0700, M. Warner Losh wrote:
>  > > No.  This isn't something that is guaranteed to work per
>  > > the standards, iirc.  The proper fix is to put the
>  > > initializer in main.
>  >
>>  OK.  Someone needs to go and fix those 84 ports then.
>How does one fix this in a library?  I've been moving the
>initialization to main() for applications.

If all else fails, have some global static variable, and check
the value in the routine(s) which care.  if the flag variable
is still zero, then initialize the stdout variable and change
the flag variable to 1.

I imagine there's plenty of smarter ways to do it though.

Garance Alistair Drosehn            =   [EMAIL PROTECTED]
Senior Systems Programmer           or  [EMAIL PROTECTED]
Rensselaer Polytechnic Institute    or  [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to