pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/features Support USE_FEATURES=strnlen to provide an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/06c1c687474d
branches:  trunk
changeset: 398017:06c1c687474d
user:      sevan <sevan%pkgsrc.org@localhost>
date:      Mon Jul 08 22:09:22 2019 +0000

description:
Support USE_FEATURES=strnlen to provide an implementation of strnlen(3) via libnbcompat, should the host OS lack support

diffstat:

 mk/features/features-vars.mk |  11 ++++++++---
 mk/features/features.mk      |   4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r ebb1cd143e72 -r 06c1c687474d mk/features/features-vars.mk
--- a/mk/features/features-vars.mk      Mon Jul 08 21:30:18 2019 +0000
+++ b/mk/features/features-vars.mk      Mon Jul 08 22:09:22 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: features-vars.mk,v 1.24 2018/11/30 18:38:19 rillig Exp $
+# $NetBSD: features-vars.mk,v 1.25 2019/07/08 22:09:22 sevan Exp $
 #
 # The platforms that are supported by pkgsrc differ in the amount of
 # functions they provide in the C library (libc). Functions that are
@@ -46,6 +46,7 @@
 #      * glob
 #      * regcomp
 #      * snprintf, vsnprintf
+#      * strnlen
 #      * utimes
 #      * nbcompat: All of the above.
 #
@@ -60,8 +61,8 @@
 #
 # Keywords: feature features asprintf vasprintf cdefs err errx warn warnx
 # Keywords: fts fts_open fts_read fts_set fts_close getopt_long
-# Keywords: getprogname setprogname glob regcomp setenv snprintf vsnprintf
-# Keywords: utimes libnbcompat nbcompat
+# Keywords: getprogname setprogname glob regcomp setenv snprintf strnlen
+# Keywords: vsnprintf utimes libnbcompat nbcompat
 
 _VARGROUPS+=           features
 _USER_VARS.features=   # none
@@ -183,6 +184,10 @@
 .  endif
 .endfor
 
+.if !empty(USE_FEATURES:Mstrnlen)
+MISSING_FEATURES+=     strnlen
+.endif
+
 .for _feature_ in utimes
 .  if !empty(USE_FEATURES:M${_feature_})
 .    if ${OPSYS} == "Interix"
diff -r ebb1cd143e72 -r 06c1c687474d mk/features/features.mk
--- a/mk/features/features.mk   Mon Jul 08 21:30:18 2019 +0000
+++ b/mk/features/features.mk   Mon Jul 08 22:09:22 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: features.mk,v 1.8 2015/01/01 07:51:47 dholland Exp $
+# $NetBSD: features.mk,v 1.9 2019/07/08 22:09:22 sevan Exp $
 #
 # This file is included by bsd.pkg.mk.
 #
@@ -36,7 +36,7 @@
 # libnbcompat provides many of the current features.
 #
 _FEATURE_USE_NBCOMPAT?=        no
-.  for f in asprintf cdefs err fts_close fts_open fts_read fts_set getopt_long glob nbcompat regcomp setenv snprintf utimes vsnprintf warn
+.  for f in asprintf cdefs err fts_close fts_open fts_read fts_set getopt_long glob nbcompat regcomp setenv snprintf strnlen utimes vsnprintf warn
 .    if !empty(MISSING_FEATURES:M${f})
 _FEATURE_USE_NBCOMPAT= yes
 .    endif



Home | Main Index | Thread Index | Old Index