NetBSD Problem Report #51814
From www@NetBSD.org Tue Jan 10 10:45:04 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 725017A28E
for <gnats-bugs@gnats.NetBSD.org>; Tue, 10 Jan 2017 10:45:04 +0000 (UTC)
Message-Id: <20170110104503.4ACA57A2A3@mollari.NetBSD.org>
Date: Tue, 10 Jan 2017 10:45:03 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/string/t_strerror: add missing #include for strerror(3)
X-Send-Pr-Version: www-1.0
>Number: 51814
>Category: bin
>Synopsis: [PATCH] tests/lib/libc/string/t_strerror: add missing #include for strerror(3)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 10 10:50:00 +0000 2017
>Closed-Date: Sun Jun 03 09:15:18 +0000 2018
>Last-Modified: Sun Jun 03 09:15:18 +0000 2018
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
FreeBSD requires the stdio.h #include when referencing stdio.h. This works in NetBSD via header pollution.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add missing
#include for strerror(3)
Date: Tue, 10 Jan 2017 02:51:10 -0800
--Apple-Mail=_967DC634-67CF-4F3A-8202-FE9DC6FDE3BA
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
--Apple-Mail=_967DC634-67CF-4F3A-8202-FE9DC6FDE3BA
Content-Disposition: attachment;
filename=t_strerror-add-missing-stdio-h-header.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_strerror-add-missing-stdio-h-header.patch"
Content-Transfer-Encoding: 7bit
Index: t_strerror.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/string/t_strerror.c,v
retrieving revision 1.3
diff -u -p -r1.3 t_strerror.c
--- t_strerror.c 10 May 2011 06:55:27 -0000 1.3
+++ t_strerror.c 10 Jan 2017 10:38:30 -0000
@@ -35,6 +35,7 @@ __RCSID("$NetBSD: t_strerror.c,v 1.3 201
#include <errno.h>
#include <limits.h>
#include <locale.h>
+#include <stdio.h>
#include <string.h>
ATF_TC(strerror_basic);
--Apple-Mail=_967DC634-67CF-4F3A-8202-FE9DC6FDE3BA--
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
yaneurabeya@gmail.com
Cc:
Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add missing #include for strerror(3)
Date: Tue, 10 Jan 2017 10:36:38 -0500
On Jan 10, 10:55am, yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:
-- Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add miss
| Patch attached.
I don't get it. strerror(3) needs <string.h>. Please explain.
christos
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 10 Jan 2017 18:22:51 +0000
State-Changed-Why:
I see no uses of stdio in the test either...
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org,
dholland@NetBSD.org
Subject: Re: bin/51814 ([PATCH] tests/lib/libc/string/t_strerror: add missing
#include for strerror(3))
Date: Tue, 10 Jan 2017 12:13:03 -0800
> On Jan 10, 2017, at 10:22 AM, dholland@NetBSD.org wrote:
>=20
> Synopsis: [PATCH] tests/lib/libc/string/t_strerror: add missing =
#include for strerror(3)
>=20
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Tue, 10 Jan 2017 18:22:51 +0000
> State-Changed-Why:
> I see no uses of stdio in the test either...
Ah=E2=80=A6 Now I remember. sys_nerr is used in the tests, and =
it requires stdio.h.
Sorry for the misleading info in the summary!
-Ngie=
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51814 CVS commit: src/lib/libc/string
Date: Tue, 10 Jan 2017 15:25:48 -0500
Module Name: src
Committed By: christos
Date: Tue Jan 10 20:25:48 UTC 2017
Modified Files:
src/lib/libc/string: strerror_r.c
Log Message:
PR/51814: Ngie Cooper: add <stdio.h> since sys_nerr is declared there on
FreeBSD.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/string/strerror_r.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Ngie Cooper <yaneurabeya@gmail.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc: "gnats-admin@netbsd.org" <gnats-admin@netbsd.org>,
"netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add missing
#include for strerror(3)
Date: Mon, 20 Feb 2017 15:02:30 -0800
On Tue, Jan 10, 2017 at 7:40 AM, Christos Zoulas <christos@zoulas.com> wrote:
> The following reply was made to PR bin/51814; it has been noted by GNATS.
>
> From: christos@zoulas.com (Christos Zoulas)
> To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
> yaneurabeya@gmail.com
> Cc:
> Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add missing #include for strerror(3)
> Date: Tue, 10 Jan 2017 10:36:38 -0500
>
> On Jan 10, 10:55am, yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:
> -- Subject: Re: bin/51814: [PATCH] tests/lib/libc/string/t_strerror: add miss
>
> | Patch attached.
>
> I don't get it. strerror(3) needs <string.h>. Please explain.
You're right.. I'll have to double check why this was required (my
explanation might have been incorrect).
Thanks,
-Ngie
State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 09:15:18 +0000
State-Changed-Why:
All that's left in this bug is possibly adjusting freebsd's headers. We don't have the capacity to do that, so closing (after pinging someone to make it into a freebsd bug). A redundant include of stdio.h in a test case isn't really important to fix.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.