Subj : Re: file pratom.h not found when compiling with JS_THREADSAFE under MS VC++ 6 To : netscape.public.mozilla.jseng From : developir Date : Thu Jun 10 2004 10:35 pm Brendan Eich wrote in message news:<40C8C5C0.40101@meer.net>... > Chris Tchou wrote: > > Anyone have an implementation of the 12 NSPR functions under Win32, that > > works for SpiderMonkey? > > It appears as if writing condition variables correctly with Win32 > > synchronization objects is non-trivial. > > Why not just use NSPR? If you link against the static library, you'll > pick up only the needed implementation that you ask for here. > > /be Of course that's the natural solution, but you might roll your own 12 functions if you wanted to keep your program size down or you are supporting a platform that NSPR does not cover. Or maybe you already use another platform independent thread library (such as Apache Portable Runtime, Qt, GLib, Boost, ACE, RogueWave or other) and you don't want to use yet another third party library. If you only wish to have Spidermonkey functionality and you link against NSPR you drag in a lot of unnecessary functions that happen to be in the same .c file as the 12 functions mentioned. Those other NSPR functions that Spidermonkey does not require in turn drag in still more functions. This makes the code footprint bigger. Perhaps some compilers have smart linkers that logically put each function into a separate compilation unit. In such cases a Spidermonkey/NSPR statically linked program would be the same size and there would be no advantage to rolling your own. .