NetBSD Problem Report #51825
From www@NetBSD.org Wed Jan 11 09:04:49 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 C45BA7A0C4
for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Jan 2017 09:04:49 +0000 (UTC)
Message-Id: <20170111090448.E2B667A2AF@mollari.NetBSD.org>
Date: Wed, 11 Jan 2017 09:04:48 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of _S_IFDIR
X-Send-Pr-Version: www-1.0
>Number: 51825
>Category: bin
>Synopsis: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of _S_IFDIR
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 11 09:05:01 +0000 2017
>Closed-Date: Sun Jun 03 08:55:37 +0000 2018
>Last-Modified: Sun Jun 03 08:55:37 +0000 2018
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
Use S_IFDIR instead of _S_IFDIR as S_IFDIR is standard (and portable to FreeBSD at least).
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of
_S_IFDIR
Date: Wed, 11 Jan 2017 01:12:49 -0800
--Apple-Mail=_BBCAC769-FFEB-48AC-8480-B9CC5E04007B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
Also, use #include =E2=80=9Ch_macros.h=E2=80=9D and CPPFLAGS.t_glob.c to =
direct make/cc where to find the h_macros.h header (this diff reduces =
t_glob.c with FreeBSD a bit as h_macros.h is located in a separate =
directory path on FreeBSD).
Thanks!
-Ngie
--Apple-Mail=_BBCAC769-FFEB-48AC-8480-B9CC5E04007B
Content-Disposition: attachment;
filename=t_glob-use-S_IFDIR.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_glob-use-S_IFDIR.patch"
Content-Transfer-Encoding: 7bit
Index: Makefile
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/gen/Makefile,v
retrieving revision 1.50
diff -u -r1.50 Makefile
--- Makefile 9 Dec 2016 06:12:02 -0000 1.50
+++ Makefile 11 Jan 2017 09:10:58 -0000
@@ -40,6 +40,7 @@
TESTS_C+= t_ttyname
TESTS_C+= t_vis
+CPPFLAGS.t_glob.c+=-I${.CURDIR:H:H:H}
CPPFLAGS.t_siginfo.c+=-D__TEST_FENV
LDADD.t_siginfo+= -lm
Index: t_glob.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/gen/t_glob.c,v
retrieving revision 1.3
diff -u -r1.3 t_glob.c
--- t_glob.c 2 Jan 2013 11:28:48 -0000 1.3
+++ t_glob.c 11 Jan 2017 09:10:58 -0000
@@ -46,7 +46,7 @@
#include <string.h>
#include <errno.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#ifdef DEBUG
@@ -146,7 +146,7 @@
memset(st, 0, sizeof(*st));
if (strcmp(buf, "a") == 0 || strcmp(buf, "a/b") == 0) {
- st->st_mode |= _S_IFDIR;
+ st->st_mode |= S_IFDIR;
return 0;
}
--Apple-Mail=_BBCAC769-FFEB-48AC-8480-B9CC5E04007B--
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/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of _S_IFDIR
Date: Wed, 11 Jan 2017 13:17:48 -0500
On Jan 11, 9:15am, yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:
-- Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead
| Also, use #include =E2=80=9Ch_macros.h=E2=80=9D and CPPFLAGS.t_glob.c to =
| direct make/cc where to find the h_macros.h header (this diff reduces =
| t_glob.c with FreeBSD a bit as h_macros.h is located in a separate =
| directory path on FreeBSD).
| Thanks!
| -Ngie
This "../../../" business is in other places; let's decide how to fix it
properly... Ideally by getting rid of it and moving the functionality to
atf itself as appropriate.
christos
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of
_S_IFDIR
Date: Fri, 13 Jan 2017 17:02:55 -0800
--Apple-Mail=_D3C3D313-E562-417C-BD34-685916D3DEEA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
> On Jan 11, 2017, at 10:20 AM, Christos Zoulas <christos@zoulas.com> =
wrote:
>=20
> The following reply was made to PR bin/51825; it has been noted by =
GNATS.
>=20
> From: christos@zoulas.com (Christos Zoulas)
> To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, =
netbsd-bugs@netbsd.org,=20
> yaneurabeya@gmail.com
> Cc:=20
> Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR =
instead of _S_IFDIR
> Date: Wed, 11 Jan 2017 13:17:48 -0500
>=20
> On Jan 11, 9:15am, yaneurabeya@gmail.com ("Ngie Cooper =
(yaneurabeya)") wrote:
> -- Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR =
instead
>=20
> | Also, use #include =3DE2=3D80=3D9Ch_macros.h=3DE2=3D80=3D9D and =
CPPFLAGS.t_glob.c to =3D
> | direct make/cc where to find the h_macros.h header (this diff =
reduces =3D
> | t_glob.c with FreeBSD a bit as h_macros.h is located in a separate =
=3D
> | directory path on FreeBSD).
> | Thanks!
> | -Ngie
>=20
> This "../../../" business is in other places; let's decide how to fix =
it
> properly... Ideally by getting rid of it and moving the functionality =
to
> atf itself as appropriate.
Hi!
I noticed that the _S_IFDIR portion of the change wasn=E2=80=99t =
accepted =E2=80=94 was there a particular reason why the other form is =
preferred (_S_IFDIR)?
Thanks!
-Ngie
cvs diff -u lib/libc/gen/t_glob.c=20
Index: lib/libc/gen/t_glob.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/gen/t_glob.c,v
retrieving revision 1.4
diff -u -r1.4 t_glob.c
--- lib/libc/gen/t_glob.c 13 Jan 2017 21:30:41 -0000 1.4
+++ lib/libc/gen/t_glob.c 14 Jan 2017 01:02:02 -0000
@@ -146,7 +146,7 @@
memset(st, 0, sizeof(*st));
=20
if (strcmp(buf, "a") =3D=3D 0 || strcmp(buf, "a/b") =3D=3D 0) {
- st->st_mode |=3D _S_IFDIR;
+ st->st_mode |=3D S_IFDIR;
return 0;
}
=20
--Apple-Mail=_D3C3D313-E562-417C-BD34-685916D3DEEA
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 11, 2017, at 10:20 AM, Christos Zoulas <<a =
href=3D"mailto:christos@zoulas.com" class=3D"">christos@zoulas.com</a>>=
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">The following reply was made to PR bin/51825; it has been =
noted by GNATS.<br class=3D""><br class=3D"">From: <a =
href=3D"mailto:christos@zoulas.com" class=3D"">christos@zoulas.com</a> =
(Christos Zoulas)<br class=3D"">To: <a =
href=3D"mailto:gnats-bugs@NetBSD.org" =
class=3D"">gnats-bugs@NetBSD.org</a>, <a =
href=3D"mailto:gnats-admin@netbsd.org" =
class=3D"">gnats-admin@netbsd.org</a>, <a =
href=3D"mailto:netbsd-bugs@netbsd.org" =
class=3D"">netbsd-bugs@netbsd.org</a>, <br class=3D""><span =
class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><a =
href=3D"mailto:yaneurabeya@gmail.com" =
class=3D"">yaneurabeya@gmail.com</a><br class=3D"">Cc: <br =
class=3D"">Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use =
S_IFDIR instead of _S_IFDIR<br class=3D"">Date: Wed, 11 Jan 2017 =
13:17:48 -0500<br class=3D""><br class=3D""> On Jan 11, 9:15am, =
yaneurabeya@gmail.com ("Ngie Cooper (yaneurabeya)") wrote:<br class=3D""> =
-- Subject: Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR =
instead<br class=3D""><br class=3D""> | Also, use #include =
=3DE2=3D80=3D9Ch_macros.h=3DE2=3D80=3D9D and CPPFLAGS.t_glob.c to =3D<br =
class=3D""> | direct make/cc where to find the h_macros.h header =
(this diff reduces =3D<br class=3D""> | t_glob.c with FreeBSD a =
bit as h_macros.h is located in a separate =3D<br class=3D""> | =
directory path on FreeBSD).<br class=3D""> | Thanks!<br =
class=3D""> | -Ngie<br class=3D""><br class=3D""> This "../../../" =
business is in other places; let's decide how to fix it<br class=3D""> =
properly... Ideally by getting rid of it and moving the functionality =
to<br class=3D""> atf itself as appropriate.<br =
class=3D""></div></div></blockquote><br =
class=3D""></div><div>Hi!</div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span>I noticed that the _S_IFDIR =
portion of the change wasn=E2=80=99t accepted =E2=80=94 was there a =
particular reason why the other form is preferred =
(_S_IFDIR)?</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/gen/t_glob.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/gen/t_glob.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/gen/t_glob.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.4</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.4 t_glob.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/gen/t_glob.c 13 Jan 2017 21:30:41 =
-0000 1.4</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/gen/t_glob.c 14 Jan 2017 01:02:02 =
-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"">@@ =
-146,7 +146,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""> =
memset(st, 0, sizeof(*st));</span></div><p =
style=3D"margin: 0px; line-height: normal; font-family: 'Andale Mono'; =
color: rgb(40, 254, 20); background-color: rgba(0, 0, 0, 0.901961); =
min-height: 14px;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures" class=3D""> </span><br =
class=3D"webkit-block-placeholder"></p><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""> =
if (strcmp(buf, "a") =3D=3D 0 || strcmp(buf, "a/b") =
=3D=3D 0) {</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"">- =
st->st_mode |=3D =
_S_IFDIR;</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"">+ =
st->st_mode |=3D =
S_IFDIR;</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""> =
return =
0;</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""> =
}</span></div><p style=3D"margin: 0px; line-height: =
normal; font-family: 'Andale Mono'; color: rgb(40, 254, 20); =
background-color: rgba(0, 0, 0, 0.901961); min-height: 14px;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""> </span><br class=3D"webkit-block-placeholder"></p><div =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D""><br class=3D""></span></div></div></body></html>=
--Apple-Mail=_D3C3D313-E562-417C-BD34-685916D3DEEA--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51825 CVS commit: src/tests/lib/libc/gen
Date: Sat, 14 Jan 2017 15:47:42 -0500
Module Name: src
Committed By: christos
Date: Sat Jan 14 20:47:41 UTC 2017
Modified Files:
src/tests/lib/libc/gen: t_glob.c
Log Message:
PR/51825: Ngie Cooper: use the non _ version of the macro
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_glob.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 08:55:37 +0000
State-Changed-Why:
All parts fixed/committed by christos. thanks for the patch.
>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.