NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51825: [PATCH] tests/lib/libc/t_glob: use S_IFDIR instead of _S_IFDIR
The following reply was made to PR bin/51825; it has been noted by GNATS.
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
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--
Home |
Main Index |
Thread Index |
Old Index