NetBSD Problem Report #51840
From www@NetBSD.org Fri Jan 13 04:46:26 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 D40B77A265
for <gnats-bugs@gnats.NetBSD.org>; Fri, 13 Jan 2017 04:46:26 +0000 (UTC)
Message-Id: <20170113044604.171917A2A2@mollari.NetBSD.org>
Date: Fri, 13 Jan 2017 04:46:04 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/sys/t_write: portability fixes for FreeBSD, etc
X-Send-Pr-Version: www-1.0
>Number: 51840
>Category: bin
>Synopsis: [PATCH] tests/lib/libc/sys/t_write: portability fixes for FreeBSD, etc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 13 04:50:01 +0000 2017
>Closed-Date: Sun Jan 15 19:31:37 +0000 2017
>Last-Modified: Sun Jan 15 19:31:37 +0000 2017
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
- Use limits.h instead of sys/syslimits.h.
- Mark signo in sighandler __unused so the test builds with -Wunused.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51840: [PATCH] tests/lib/libc/sys/t_write: portability fixes
for FreeBSD, etc
Date: Thu, 12 Jan 2017 21:02:54 -0800
--Apple-Mail=_18E02C6B-3010-457C-BA3D-F6968A88FE2A
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
-Ngie
--Apple-Mail=_18E02C6B-3010-457C-BA3D-F6968A88FE2A
Content-Disposition: attachment;
filename*0=lib-libc-sys-t_write-use-limits_h-add-__unused-to-sighandler.pat;
filename*1=ch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="lib-libc-sys-t_write-use-limits_h-add-__unused-to-sighandler.patch"
Content-Transfer-Encoding: 7bit
Index: lib/libc/sys/t_write.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/t_write.c,v
retrieving revision 1.2
diff -u -r1.2 t_write.c
--- lib/libc/sys/t_write.c 19 Oct 2011 16:19:30 -0000 1.2
+++ lib/libc/sys/t_write.c 13 Jan 2017 04:43:48 -0000
@@ -32,11 +32,11 @@
__RCSID("$NetBSD: t_write.c,v 1.2 2011/10/19 16:19:30 jruoho Exp $");
#include <sys/uio.h>
-#include <sys/syslimits.h>
#include <atf-c.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdint.h>
@@ -49,7 +49,7 @@
static const char *path = "write";
static void
-sighandler(int signo)
+sighandler(int signo __unused)
{
fail = false;
}
--Apple-Mail=_18E02C6B-3010-457C-BA3D-F6968A88FE2A--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51840 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 14:27:23 -0500
Module Name: src
Committed By: christos
Date: Fri Jan 13 19:27:23 UTC 2017
Modified Files:
src/tests/lib/libc/sys: t_write.c
Log Message:
PR/51840: Ngie Cooper: portability fixes for FreeBSD, etc
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_write.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 15:14:08 -0800
--Apple-Mail=_B05214FB-8D70-4680-9A25-C37EBE38D909
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
> On Jan 13, 2017, at 11:30 AM, Christos Zoulas <christos@netbsd.org> =
wrote:
>=20
> The following reply was made to PR bin/51840; it has been noted by =
GNATS.
>=20
> From: "Christos Zoulas" <christos@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
> Cc:=20
> Subject: PR/51840 CVS commit: src/tests/lib/libc/sys
> Date: Fri, 13 Jan 2017 14:27:23 -0500
>=20
> Module Name: src
> Committed By: christos
> Date: Fri Jan 13 19:27:23 UTC 2017
>=20
> Modified Files:
> src/tests/lib/libc/sys: t_write.c
>=20
> Log Message:
> PR/51840: Ngie Cooper: portability fixes for FreeBSD, etc
>=20
>=20
> To generate a diff of this commit:
> cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_write.c
>=20
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
Is there a reason why the limits.h #include wasn=E2=80=99t added as =
well? It=E2=80=99s needed for SIZE_MAX on FreeBSD (at least).
Thanks,
-Ngie
$ cvs diff -u lib/libc/sys/t_write.c=20
Index: lib/libc/sys/t_write.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/tests/lib/libc/sys/t_write.c,v
retrieving revision 1.3
diff -u -r1.3 t_write.c
--- lib/libc/sys/t_write.c 13 Jan 2017 19:27:23 -0000 1.3
+++ lib/libc/sys/t_write.c 13 Jan 2017 23:13:48 -0000
@@ -36,6 +36,7 @@
#include <atf-c.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <signal.h>
#include <limits.h>
#include <stdio.h>=
--Apple-Mail=_B05214FB-8D70-4680-9A25-C37EBE38D909
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Jan 13, 2017, at 11:30 AM, Christos Zoulas <<a =
href=3D"mailto:christos@netbsd.org" class=3D"">christos@netbsd.org</a>>=
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">The following reply was made to PR bin/51840; it has been =
noted by GNATS.<br class=3D""><br class=3D"">From: "Christos Zoulas" =
<<a href=3D"mailto:christos@netbsd.org" =
class=3D"">christos@netbsd.org</a>><br class=3D"">To: <a =
href=3D"mailto:gnats-bugs@gnats.NetBSD.org" =
class=3D"">gnats-bugs@gnats.NetBSD.org</a><br class=3D"">Cc: <br =
class=3D"">Subject: PR/51840 CVS commit: src/tests/lib/libc/sys<br =
class=3D"">Date: Fri, 13 Jan 2017 14:27:23 -0500<br class=3D""><br =
class=3D""> Module Name:<span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span>src<br class=3D""> Committed =
By:<span class=3D"Apple-tab-span" style=3D"white-space:pre"> =
</span>christos<br class=3D""> Date:<span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span>Fri Jan 13 19:27:23 UTC 2017<br =
class=3D""><br class=3D""> Modified Files:<br class=3D""> <span =
class=3D"Apple-tab-span" style=3D"white-space:pre"> =
</span>src/tests/lib/libc/sys: t_write.c<br class=3D""><br class=3D""> =
Log Message:<br class=3D""> PR/51840: Ngie Cooper: portability fixes for =
FreeBSD, etc<br class=3D""><br class=3D""><br class=3D""> To generate a =
diff of this commit:<br class=3D""> cvs rdiff -u -r1.2 -r1.3 =
src/tests/lib/libc/sys/t_write.c<br class=3D""><br class=3D""> Please =
note that diffs are not public domain; they are subject to the<br =
class=3D""> copyright notices on the relevant files.<br =
class=3D""></div></div></blockquote><br class=3D""></div><div>Is there a =
reason why the limits.h #include wasn=E2=80=99t added as well? It=E2=80=99=
s needed for SIZE_MAX on FreeBSD (at =
least).</div><div>Thanks,</div><div>-Ngie</div><div><br =
class=3D""></div><div><div style=3D"margin: 0px; line-height: normal; =
font-family: 'Andale Mono'; color: rgb(40, 254, 20); background-color: =
rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">$ cvs =
diff -u lib/libc/sys/t_write.c </span></div><div style=3D"margin: =
0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(40, =
254, 20); background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">Index: =
lib/libc/sys/t_write.c</span></div><div style=3D"margin: 0px; =
line-height: normal; font-family: 'Andale Mono'; color: rgb(40, 254, =
20); background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</span></di=
v><div style=3D"margin: 0px; line-height: normal; font-family: 'Andale =
Mono'; color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, =
0.901961);" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D"">RCS file: =
/cvsroot/src/tests/lib/libc/sys/t_write.c,v</span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">retrieving revision 1.3</span></div><div style=3D"margin: =
0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(40, =
254, 20); background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">diff -u =
-r1.3 t_write.c</span></div><div style=3D"margin: 0px; line-height: =
normal; font-family: 'Andale Mono'; color: rgb(40, 254, 20); =
background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">--- =
lib/libc/sys/t_write.c 13 Jan 2017 19:27:23 =
-0000 1.3</span></div><div style=3D"margin: 0px; =
line-height: normal; font-family: 'Andale Mono'; color: rgb(40, 254, =
20); background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">+++ =
lib/libc/sys/t_write.c 13 Jan 2017 23:13:48 =
-0000</span></div><div style=3D"margin: 0px; line-height: normal; =
font-family: 'Andale Mono'; color: rgb(40, 254, 20); background-color: =
rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">@@ =
-36,6 +36,7 @@</span></div><div style=3D"margin: 0px; line-height: =
normal; font-family: 'Andale Mono'; color: rgb(40, 254, 20); =
background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include <atf-c.h></span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include <errno.h></span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include <fcntl.h></span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">+#include <limits.h></span></div><div style=3D"margin: =
0px; line-height: normal; font-family: 'Andale Mono'; color: rgb(40, =
254, 20); background-color: rgba(0, 0, 0, 0.901961);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include <signal.h></span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include <limits.h></span></div><div =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961);" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> #include =
<stdio.h></span></div></div></body></html>=
--Apple-Mail=_B05214FB-8D70-4680-9A25-C37EBE38D909--
From: christos@zoulas.com (Christos Zoulas)
To: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>,
gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 19:30:49 -0500
On Jan 13, 3:14pm, yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:
-- Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
|
| Is there a reason why the limits.h #include wasn=E2=80=99t added as well? I=
| t=E2=80=99s needed for SIZE_MAX on FreeBSD (at least).
| Thanks,
| -Ngie
I must have missed it. Let me add it.
christos
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: PR/51840 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 19:37:08 -0500
On Jan 14, 12:35am, christos@zoulas.com (Christos Zoulas) wrote:
-- Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
limits.h is there, what is it missing?
christos
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
Date: Fri, 13 Jan 2017 16:41:23 -0800
--Apple-Mail=_41998B42-4A61-44EC-8124-3F18CBB5FB38
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
> On Jan 13, 2017, at 16:40, Christos Zoulas <christos@zoulas.com> wrote:
>
> The following reply was made to PR bin/51840; 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: PR/51840 CVS commit: src/tests/lib/libc/sys
> Date: Fri, 13 Jan 2017 19:37:08 -0500
>
> On Jan 14, 12:35am, christos@zoulas.com (Christos Zoulas) wrote:
> -- Subject: Re: PR/51840 CVS commit: src/tests/lib/libc/sys
>
> limits.h is there, what is it missing?
Ah, I had sorted it. I see the copy you added now.
Thanks!
-Ngie
--Apple-Mail=_41998B42-4A61-44EC-8124-3F18CBB5FB38
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQIcBAEBCgAGBQJYeXOzAAoJEPWDqSZpMIYVNC8P+wQ2LY3j5pST2KJj+dMhj4bW
JQAXKxdNZcMcdr0EIV9Ii5fkUjFDF0v11v958qDuF+hdvwAho3ZzT2HjQcuydHkU
FzORQgDVE2AWvOt/V/SWfKkaXEQNjI6uTM1H8phIvSOtVUVzF4dI04tC798LpKIt
4VLc/KZ6xEEtlhCiAQ9SjeuIOunMEn6pOC+x7v/IE6r3wrusufImJG2ejIWEt0t1
0AUVx5MsBUkJGQzQSuwGd+tK4WmaCEOtXrpqP0SyfD5VPJmFwmW2HDUfc6uYcobD
oLKAr4m3lIuJXE9vsyr3DuqbKZWaUV8xC1REVMe87RayXJDMhMO9DtRadeF/VaOg
QljREx8Roh0ycN0UGrxhJmo8tqisS9UyTckCOUmE0dQcGxmpRcb22FUqyzHDave1
aaGE0m27hVgrqx/UBctwyA6RMW7ZyGpWaeRGFjJW9rURZxTSCdIBf7oHVbHalHUq
DG3LMLuobpUwg6ij6mKvcIXPyl5zThNXKyMT2q3MoFhqe0P+BtEoAKe7ubQyS1kk
GNCsJzUcWk2KSGfBiFugJ123z5szisoCX6f1bV+YFrYhmdD6lL/AQmdhSvmGrynf
PBQ4FFXwnC9WIjlFPgeyKDXX0ZJO9wAvO+Pa51wZ8dlp1+Bpxk/v0izSjvKHpogF
L1iabQbaV7b3IqwfecCK
=ygJb
-----END PGP SIGNATURE-----
--Apple-Mail=_41998B42-4A61-44EC-8124-3F18CBB5FB38--
State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sun, 15 Jan 2017 19:31:37 +0000
State-Changed-Why:
christos committed it. thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.