Debian Bug report logs -
#417592
lgamma(3) man page: references to standards are incorrect
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
Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#417592; Package manpages-dev.
(full text, mbox, link).
Acknowledgement sent to Vincent Lefevre <vincent@vinc17.org>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#417592; Package manpages-dev.
(full text, mbox, link).
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, mbox, link).
Message #12 received at 417592@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
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, mbox, link).
Message #17 received at 417592@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Reply sent to Thomas Huriaux <thomas.huriaux@gmail.com>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Vincent Lefevre <vincent@vinc17.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #24 received at 417592-close@bugs.debian.org (full text, mbox, reply):
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, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Mar 9 09:59:29 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.