This is a bit more consistent with the naming of the other header files
(openlibm_complex.h and openlibm_fenv.h). Re-add an openlibm.h header
that includes all of the public headers as a shorthand.
Fix up all of the source files to include <openlibm_math.h> instead of
<openlibm.h>. While there, fix ordering of the includes.
Put external headers before internal ones. While there, replace a lot of
occurences of "openlibm.h" with <openlibm.h>. It should be thought of as
an external header, as it is installed along with the library.
We already provide lgammaf_r() and lgamma_r(). It's not hard to also add
lgammal_r(), for consistency.
I am currently working on porting openlibm to an environment where
global state, and thus signgam, is not available. By adding lgammal_r(),
I can trivially disable support for signgam by just patching up
src/e_lgamma{f,,l}.c. That way there is no need to patch up the actual
algorithms.
Letting tgammal() modify signgam has two disadvantages:
- It breaks valid code that assumes that the value of signgam is not
clobbered by calls to tgammal().
- It makes this function depend on the presence of signgam. signgam is
an X/Open System Interface. It is not part of the C standard.