summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsevan <sevan@pkgsrc.org>2019-07-08 22:09:22 +0000
committersevan <sevan@pkgsrc.org>2019-07-08 22:09:22 +0000
commit16db034220209113a7b7974c70791b6f9cd961e9 (patch)
treee1b54593aa8f0d78414cf0463446fc24fce14bae /mk
parenta272c36d9f9286b358bc51ee3f6f3725b8e56fa2 (diff)
downloadpkgsrc-16db034220209113a7b7974c70791b6f9cd961e9.tar.gz
Support USE_FEATURES=strnlen to provide an implementation of strnlen(3) via libnbcompat, should the host OS lack support
Diffstat (limited to 'mk')
-rw-r--r--mk/features/features-vars.mk11
-rw-r--r--mk/features/features.mk4
2 files changed, 10 insertions, 5 deletions
diff --git a/mk/features/features-vars.mk b/mk/features/features-vars.mk
index 001bf058d87..f32eb63702b 100644
--- a/mk/features/features-vars.mk
+++ b/mk/features/features-vars.mk
@@ -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 @@ MISSING_FEATURES+= ${_feature_}
. 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 --git a/mk/features/features.mk b/mk/features/features.mk
index 7822d793e51..debaecb0880 100644
--- a/mk/features/features.mk
+++ b/mk/features/features.mk
@@ -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 @@ LIBS+= ${FEATURE_LIBS}
# 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