Debian Bug report logs -
#729436
manpages-dev: please explain why strcasecmp(3) is defined in both <string.h> and <strings.h>
Reported by: Török Edwin <edwin@etorok.net>
Date: Tue, 12 Nov 2013 20:30:02 UTC
Severity: normal
Tags: fixed-upstream
Fixed in version manpages/3.71-1
Done: Simon Paillard <spaillard@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#729436; Package libc6-dev.
(Tue, 12 Nov 2013 20:30:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Török Edwin <edwin@etorok.net>:
New Bug report received and forwarded. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Tue, 12 Nov 2013 20:30:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libc6-dev
Version: 2.17-93
Severity: normal
--- Please enter the report below this line. ---
According to strcasecmp(3) and strcasecmp(3p) the function strcasecmp should be declared in strings.h.
However it is actually declared both in string.h and strings.h:
/usr/include/string.h:extern int strcasecmp (const char *__s1, const char *__s2)
/usr/include/string.h:extern int strcasecmp_l (const char *__s1, const char *__s2,
/usr/include/strings.h:extern int strcasecmp (const char *__s1, const char *__s2)
/usr/include/strings.h:extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc)
If the declaration in string.h is a typo, please remove it.
Otherwise please update the manpage to mention that on Linux the function is actually declared in both string.h and strings.h, and you should check yourself that you included strings.h because you won't get any warning from the compiler about implicit declarations.
--- System information. ---
Architecture: amd64
Kernel: Linux 3.12.0
Debian Release: jessie/sid
500 unstable ftp.ro.debian.org
500 stable security.debian.org
500 stable ftp.ro.debian.org
--- Package information. ---
Package's Depends field is empty.
Package's Recommends field is empty.
Package's Suggests field is empty.
Information forwarded
to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#729436; Package libc6-dev.
(Mon, 05 May 2014 15:57:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.
(Mon, 05 May 2014 15:57:08 GMT) (full text, mbox, link).
Message #10 received at 729436@bugs.debian.org (full text, mbox, reply):
reassign 729436 manpages-dev
retitle 729436 manpages-dev: please explain why strcasecmp(3) is defined in both <string.h> and <strings.h>
thanks
On Tue, Nov 12, 2013 at 10:26:56PM +0200, Török Edwin wrote:
> Package: libc6-dev
> Version: 2.17-93
> Severity: normal
>
> --- Please enter the report below this line. ---
>
> According to strcasecmp(3) and strcasecmp(3p) the function strcasecmp should be declared in strings.h.
>
> However it is actually declared both in string.h and strings.h:
> /usr/include/string.h:extern int strcasecmp (const char *__s1, const char *__s2)
> /usr/include/string.h:extern int strcasecmp_l (const char *__s1, const char *__s2,
> /usr/include/strings.h:extern int strcasecmp (const char *__s1, const char *__s2)
> /usr/include/strings.h:extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc)
>
> If the declaration in string.h is a typo, please remove it.
This is not a typo, but there for historical reasons. The strcasecmp()
and strncasecmp() functions first appeared in 4.4BSD and have been
introduced the same way in the GNU libc. Their prototypes existed
previously in <string.h> before they were moved to <strings.h> for
IEEE Std 1003.1-2001 (POSIX.1) compliance, as <string.h> is supposed to
be for ISO C functions, and strcasecmp() is not an ISO C function. The
prototype in <string.h> has been kept for compatibility reasons.
> Otherwise please update the manpage to mention that on Linux the function is actually declared in both string.h and strings.h, and you should check yourself that you included strings.h because you won't get any warning from the compiler about implicit declarations.
>
I am therefore reassigning this bug to the manpages-dev package to
update the corresponding manpage.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
Bug reassigned from package 'libc6-dev' to 'manpages-dev'.
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 05 May 2014 15:57:19 GMT) (full text, mbox, link).
No longer marked as found in versions eglibc/2.17-93.
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 05 May 2014 15:57:20 GMT) (full text, mbox, link).
Changed Bug title to 'manpages-dev: please explain why strcasecmp(3) is defined in both <string.h> and <strings.h>' from '[libc6-dev] strcasecmp declared twice'
Request was from Aurelien Jarno <aurelien@aurel32.net>
to control@bugs.debian.org.
(Mon, 05 May 2014 15:57:20 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#729436; Package manpages-dev.
(Thu, 08 May 2014 09:48:05 GMT) (full text, mbox, link).
Acknowledgement sent
to "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>.
(Thu, 08 May 2014 09:48:05 GMT) (full text, mbox, link).
Message #21 received at 729436@bugs.debian.org (full text, mbox, reply):
tags 729436 fixed-upstream
thanks
On 05/05/2014 05:53 PM, Aurelien Jarno wrote:
> reassign 729436 manpages-dev
> retitle 729436 manpages-dev: please explain why strcasecmp(3) is defined in both <string.h> and <strings.h>
> thanks
>
>
> On Tue, Nov 12, 2013 at 10:26:56PM +0200, Török Edwin wrote:
>> Package: libc6-dev
>> Version: 2.17-93
>> Severity: normal
>>
>> --- Please enter the report below this line. ---
>>
>> According to strcasecmp(3) and strcasecmp(3p) the function strcasecmp should be declared in strings.h.
>>
>> However it is actually declared both in string.h and strings.h:
>> /usr/include/string.h:extern int strcasecmp (const char *__s1, const char *__s2)
>> /usr/include/string.h:extern int strcasecmp_l (const char *__s1, const char *__s2,
>> /usr/include/strings.h:extern int strcasecmp (const char *__s1, const char *__s2)
>> /usr/include/strings.h:extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc)
>>
>> If the declaration in string.h is a typo, please remove it.
>
> This is not a typo, but there for historical reasons. The strcasecmp()
> and strncasecmp() functions first appeared in 4.4BSD and have been
> introduced the same way in the GNU libc. Their prototypes existed
> previously in <string.h> before they were moved to <strings.h> for
> IEEE Std 1003.1-2001 (POSIX.1) compliance, as <string.h> is supposed to
> be for ISO C functions, and strcasecmp() is not an ISO C function. The
> prototype in <string.h> has been kept for compatibility reasons.
>
>> Otherwise please update the manpage to mention that on Linux the function is actually declared in both string.h and strings.h, and you should check yourself that you included strings.h because you won't get any warning from the compiler about implicit declarations.
>>
>
> I am therefore reassigning this bug to the manpages-dev package to
> update the corresponding manpage.
Fair enough. Upstream, I have added the following text under NOTES:
The strcasecmp() and strncasecmp() functions first appeared
in 4.4BSD, where they were declared in <string.h>. Thus, for
reasons of historical compatibility, the glibc <string.h>
header file also declares these functions, if the
_DEFAULT_SOURCE (or, in glibc 2.19 and earlier, _BSD_SOURCE)
feature test macro is defined.
Okay?
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
Added tag(s) fixed-upstream.
Request was from "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
to control@bugs.debian.org.
(Thu, 08 May 2014 09:48:12 GMT) (full text, mbox, link).
Added tag(s) pending.
Request was from Simon Paillard <spaillard@debian.org>
to control@bugs.debian.org.
(Tue, 19 Aug 2014 20:33:10 GMT) (full text, mbox, link).
Reply sent
to Simon Paillard <spaillard@debian.org>:
You have taken responsibility.
(Thu, 21 Aug 2014 21:36:14 GMT) (full text, mbox, link).
Notification sent
to Török Edwin <edwin@etorok.net>:
Bug acknowledged by developer.
(Thu, 21 Aug 2014 21:36:14 GMT) (full text, mbox, link).
Message #30 received at 729436-close@bugs.debian.org (full text, mbox, reply):
Source: manpages
Source-Version: 3.71-1
We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 729436@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Simon Paillard <spaillard@debian.org> (supplier of updated manpages package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 21 Aug 2014 23:05:57 +0200
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 3.71-1
Distribution: unstable
Urgency: medium
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Simon Paillard <spaillard@debian.org>
Description:
manpages - Manual pages about using a GNU/Linux system
manpages-dev - Manual pages about using GNU/Linux for development
Closes: 708394 728240 729436 745775 746569 748887 754514 756602
Changes:
manpages (3.71-1) unstable; urgency=medium
.
* Imported Upstream version 3.71 (Closes: #754514)
. getrusage.2: _GNU_SOURCE must be defined to obtain RUSAGE_THREAD
definition (Closes: #746569)
. strcasecmp.3: Explain why defined in both <string.h>
and <strings.h> (Closes: #729436)
. stat.2: Describe feature test macro requirements for file type test
macro (Closes: #728240)
. connect.2: ERRORS: Add EADDRNOTAVAIL for ephemeral port range exhaustion
(Closes: #745775)
. stdio.3: typo fix (Closes: #748887)
. connect.2: ERRORS: add EPROTOTYPE (Closes: #708394)
. printf.3: details of the %n conversion specifier (Closes: #756602)
. new manpages:
fanotify.7 fanotify_init.2 fanotify_mark.2 group_member.3
iconv.1 iconvconfig.8 isfdtype.3 localedef.1 procfs.5 renameat2.2
repertoiremap.5 sched.7 sched_getattr.2 sched_setattr.2 sched_setattr.2
sprof.1
* d/control: Take over iconv.1 localedef.1 iconvconfig.8 from libc-bin,
and sprof.1 from libc-dev-bin
Checksums-Sha1:
042dc3096bc7356abfa14143ca28bfe0723d91b2 1930 manpages_3.71-1.dsc
e603af41f46fe730cb57dcd3d234512c088ddbdf 1272416 manpages_3.71.orig.tar.xz
d8152cc6b16e08ca2e7292d547191aeb647b24d4 62944 manpages_3.71-1.debian.tar.xz
da63378fc32465dc2e084ba925e1ce65d9ecfbb3 962042 manpages_3.71-1_all.deb
b58cb72db0d782f0b37001db102ee1701fad2db3 1860718 manpages-dev_3.71-1_all.deb
Checksums-Sha256:
94687097d1ae7e23c873879c19e1f339d10ed8ff876900c8c12d8fcac0072948 1930 manpages_3.71-1.dsc
981038ecffcf6db490c0bc4359f489c318654068a6ba5aa086962ac41b0d2894 1272416 manpages_3.71.orig.tar.xz
bbd4037f8de8599875338b971d07fb398487f198ff696278eae6013716873883 62944 manpages_3.71-1.debian.tar.xz
5b84cc01c51a481fe209f34963f64b9375c47e192415f9d40f9331ac5ba3c416 962042 manpages_3.71-1_all.deb
5925ac2346cdf03cbf82b9ae0c59e46d3cab76e3f0d8d015176b128625d92ec6 1860718 manpages-dev_3.71-1_all.deb
Files:
688fb0add5141ee029e32f359f55896d 962042 doc important manpages_3.71-1_all.deb
ae286d2f258ce8dce17d5d263a95e33a 1860718 doc optional manpages-dev_3.71-1_all.deb
b6b8555ae3c0a906c9d7c66acb08eb37 1930 doc important manpages_3.71-1.dsc
9a2a288f1e481045c991e0cb476127d8 1272416 doc important manpages_3.71.orig.tar.xz
9b99fa2fd1c714b9ebdbab182868899a 62944 doc important manpages_3.71-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJT9mS1AAoJEN/3OMLRbPuiVRUP/AsgrF1wnreXjO7dY8mjC4Ow
zki8TxJHW4yCEzEw/r60oTlxUYcK0okE9Kyee+t5mDDkE16IhYpsTlZEQxQ8nBmg
zhDrG1pJGwR3fIUm416MTA0zxaoVAYWZhbwgAGKy7DDEqjVietkQUW/xIemr30QE
s4EHeQclVelyOHkurMtvLPBPBZhJHQzKqg8XaZi6l1BMDXJCE5KNml3LTRPCAVEh
fsn9q30BeEQacBlv3JRz2W0Al3iMkSXCndFuIDgu4leHev+F/qIq1gxja13xNhcS
B4P+caeI/epvyqctXVDa3sVsa/57VyyQIzEXuYj6I2HGWulIYyTlj2c5RUgNefZg
gdb2Xu8fhYK4CUAcoHmqUgU0AFf2yw5+0VQthsfnUlSGJlrlacQbIiJLSwiS33vC
OxmGrOw0h86uYS6+BsgYa2KMlMRk+F/PcXKwkSyGi60F+wnOiVOFPmLuplMqL125
7VSc9F94rcXwQZBzCm0hX7dz+2GeZZrlttk+O8BO2MB4B/wUPF306zTpgyX3fgYr
DFLyd2aETX6B7mVxf/23bujewalzaJ1hpnc4o1cnupsiueP3qCL90uMjLwEsNN/B
819tG1LyOuzF9sRRqkIBJ6f0mNm/567Wxr0B5kpysP1bqOf05A09GlQ62bdZno4b
q1R3lz8k/UTmo3YRkSp1
=Z0ol
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 24 Sep 2014 07:30:20 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 10:02:19 2023;
Machine Name:
bembo
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.