Re: [pdf-devel] libcurl initialization requirements

2010-02-20 Thread jemarch
Hi Scott. 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. It looks fine. I

Re: [pdf-devel] libcurl initialization requirements

2010-02-18 Thread Scott Fohey
> >   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   >                  

Re: [pdf-devel] libcurl initialization requirements

2010-02-18 Thread Aleksander Morgado
> We already have that requirement in some base-layer modules, like >the text module or time module. The text module has a >pdf_text_context_init() which should be called once at program >startup, preferably when no other threads are running (so that no >other thread actually tries

Re: [pdf-devel] libcurl initialization requirements

2010-02-17 Thread jemarch
> We should not introduce that requirement! If pdf_init() is supposed > to be called only once in the lifetime of the application then we > should provide the user a way to determine if it has been called > before in an atomic way. > Well, a second call to pdf_text_init() for

Re: [pdf-devel] libcurl initialization requirements

2010-02-17 Thread jemarch
We already have that requirement in some base-layer modules, like the text module or time module. The text module has a pdf_text_context_init() which should be called once at program startup, preferably when no other threads are running (so that no other thread actually tries to cal

Re: [pdf-devel] libcurl initialization requirements

2010-02-17 Thread jemarch
I just noticed that libcurl requires a call to curl_global_init() while the program as a whole is single-threaded. The libcurl docs make this quite clear. Are we willing to impose this kind of an initialization requirement on any and all applications that would link with us? The

Re: [pdf-devel] libcurl initialization requirements

2010-02-17 Thread Aleksander Morgado
> I just noticed that libcurl requires a call to curl_global_init() while the > program as a whole is single-threaded. The libcurl docs make this > quite clear. > > Are we willing to impose this kind of an initialization requirement on > any and all applications that would link with us? The requ

[pdf-devel] libcurl initialization requirements

2010-02-16 Thread Scott Fohey
I just noticed that libcurl requires a call to curl_global_init() while the program as a whole is single-threaded. The libcurl docs make this quite clear. Are we willing to impose this kind of an initialization requirement on any and all applications that would link with us? The requirement woul