tags 417592 fixed-upstream
thanks

Hello Vincent,

Vincent Lefevre wrote:
> 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.

For 2.65, I will update the CONFORMING TO section to note the points you
mention:

   CONFORMING TO
       The  lgamma()  functions  are   specified   in   C99   and
       POSIX.1-2001.   signgam  is specified in POSIX.1-2001, but
       not in C99.  The lgamma_r()  functions  are  non-standard,
       but present on several other systems.

The points that you mention for regarding compilation options were fixed in
2.64:

   Feature  Test  Macro  Requirements   for   glibc   (see   fea-
   ture_test_macros(7)):

       lgamma(), lgammaf(), lgammal(): _BSD_SOURCE ||
       _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; or
       cc -std=c99
       lgamma_r(), lgammaf_r(), lgammal_r(): _BSD_SOURCE ||
       _SVID_SOURCE
       signgam: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE

Thanks for your report!

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to