Date: Sun, 31 Mar 2002 03:25:41 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Kris Kennaway <kris@obsecurity.org> Cc: current@FreeBSD.ORG Subject: Re: stdout changes break some ports Message-ID: <p05101538b8cc765525ce@[128.113.24.47]> In-Reply-To: <20020330224648.A93819@xor.obsecurity.org> References: <20020324173513.A75429@xor.obsecurity.org> <20020324.184313.30925676.imp@village.org> <20020324175436.A75804@xor.obsecurity.org> <20020330224648.A93819@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu 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?p05101538b8cc765525ce>