[Proj] Re: libproj4 thread safety

Ton Hospel proj at ton.iguana.be
Sun Apr 24 10:42:06 EDT 2005

In article <63b1d6082baec4d4dbdc3496de5ad030 at verizon.net>,
	Gerald Evenden <gerald.evenden at verizon.net> writes:
> My problem is as a matter of how I (and potentially others) use
> libproj4.  Like GSL (scientific library). I make the *.a and store it in
> /usr/local/lib, etc. and simply refer to it as '-l gsl' on the compile
> line.
> Thus, if pj_errno.o is part of libproj4.a then there is a problem as to
> whether it is or is not thread friendly---is '-l proj4' required to be
> followed

Shouldn't be doable if the .h file goes something like:

/* Have both of these in the .a */
extern int _pj_e_static;
extern int *_pj_e_ref(void);

#if THREADED (or whatever switch)
# define pj_errno *_pj_e_ref()
# define pj_errno _pj_e_static

More information about the Proj mailing list