> > Well, a second call to pdf_text_init() for example will not > re-initialize the text module. I guess we should just make sure things > are not initialized twice. > > Yes, much better. In that case we would have to use a mutex in > pdf_init. > > -- > Jose E. Marchesi <[email protected]> > http://www.jemarch.net > GNU Project http://www.gnu.org >
Attached you should find my pass at implementing the mutex-protected global init. Also attached are the necessary changes for conditional compiling of HTTP filesystem support, and a minimal pdf-fsys-http.* to allow testing of the conditional compiling. curl_global_init may be invoked multiple time, so that's not a problem - it just has to be done without colliding with dependant-library initializations between multiple threads. Please include these updates as you see fit - I'd like to start pushing up incremental updates to the HTTP implementation without drifting far from the mainline. --Scott
fsys_http.merge
Description: Binary data
