Scott Taggart <taggart@taggarts.org> writes:
Last time I tracked this down, it came down to me having a static
defined in a function!!!
f()
{
static something x;
}
I moved x out of the function and the ref to atexit() went away. I
wrote it off to compiler weirdness and went on. This time, I can't go
through the dozens of source files doing a binary search with #ifdefs,
etc.
That makes a certain amount of sense, actually: with C++ running in a hosted environment (i.e. a normal user program), a static (or global?) object will have its destructor called when the program exits; the compiler, assuming a full C library, implements this with atexit(). These semantics of course make no sense for a KEXT, but apparently the compiler doesn't know that. --Jed -- #!/usr/bin/perl -- ## "But life wasn't yes-no, on-off. Life was shades of gray, sub f{(($n,$d,@_)=@_)?(substr(## and rainbows not in the order of the spectrum." " ExhortJavelinBus",$n&&$d/$n,1),$n?f($d## -- L. E. Modesitt, Jr., _Adiamante_ %$n,$n,@_):&f):("\n")}print f 1461,10324,55001,444162,1208,1341,5660480,79715997 _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.