Debian Bug report logs - #417592
lgamma(3) man page: references to standards are incorrect

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: Vincent Lefevre <vincent@vinc17.org>

Date: Tue, 3 Apr 2007 15:36:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version manpages/2.43-0

Fixed in version manpages/2.65-1

Done: Thomas Huriaux <thomas.huriaux@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#417592; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.org>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: lgamma(3) man page: references to standards are incorrect
Date: Tue, 3 Apr 2007 17:12:05 +0200
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.

I don't know what SVr4 and 4.3BSD define.

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686-bigmem
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages manpages-dev depends on:
ii  manpages                      2.43-0     Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

-- no debconf information



Blocking bugs of 417596 added: 417592 Request was from Thomas Huriaux <thomas.huriaux@gmail.com> to control@bugs.debian.org. (Tue, 03 Apr 2007 19:54:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#417592; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #12 received at 417592@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.org>
To: 417592@bugs.debian.org
Subject: Re: lgamma(3) man page: references to standards are incorrect
Date: Sun, 15 Apr 2007 03:59:18 +0200
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 <vincent@vinc17.org> - 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)



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#417592; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #17 received at 417592@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk-manpages@gmx.net>
To: Vincent Lefevre <vincent@vinc17.org>, 417592@bugs.debian.org
Cc: debc <control@bugs.debian.org>
Subject: Re: Bug#417592: lgamma(3) man page: references to standards are incorrect
Date: Fri, 20 Jul 2007 08:32:24 +0200
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'.





Tags added: fixed-upstream Request was from Michael Kerrisk <mtk-manpages@gmx.net> to control@bugs.debian.org. (Fri, 20 Jul 2007 08:39:06 GMT) Full text and rfc822 format available.

Reply sent to Thomas Huriaux <thomas.huriaux@gmail.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Vincent Lefevre <vincent@vinc17.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #24 received at 417592-close@bugs.debian.org (full text, mbox):

From: Thomas Huriaux <thomas.huriaux@gmail.com>
To: 417592-close@bugs.debian.org
Subject: Fixed in 2.65
Date: Sat, 29 Dec 2007 11:41:51 +0100
Source: manpages
Source-Version: 2.65-1

-- 
Thomas Huriaux




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 27 Jan 2008 07:35:02 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 09:48:18 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.