On 2007-04-03 17:12:05 +0200, Vincent Lefevre wrote:
> Package: manpages-dev
> Version: 2.43-0
> Severity: normal
> 
> The lgamma(3) man page deals with lgamma and lgamma_r and says:
> 
> CONFORMING TO
>        C99, SVr4, 4.3BSD
> 
> There are two problems:
> 
> 1. Concerning lgamma, the man page mentions signgam, but this
> variable doesn't exist in C99. The man page should say that this
> variable is a POSIX extension[*].
> 
> [*] http://www.opengroup.org/onlinepubs/009695399/functions/lgamma.html
> 
> 2. The ISO C99 standard doesn't define lgamma_r. POSIX doesn't either.
> So, the man page should say that this function is a glibc extension.

This has a consequence. The man page says:

       Compile with -std=c99; link with -lm.

But to use the extensions (signgam and lgamma_r), -std=gnu99 must be
used instead of -std=c99. Otherwise one gets errors or warnings, e.g.

testlgamma.c:24: error: 'signgam' undeclared (first use in this function)
testlgamma.c:24: error: (Each undeclared identifier is reported only once
testlgamma.c:24: error: for each function it appears in.)
testlgamma.c:30: warning: implicit declaration of function 'lgamma_r'

So, the man page should say something like:

  Compile with -std=c99, or with -std=gnu99 if you need the extensions
  (signgam, lgamma_r...); link with -lm.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

Reply via email to