| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: features-vars.mk,v 1.24 2018/11/30 18:38:19 rillig Exp $ | | 1 | # $NetBSD: features-vars.mk,v 1.25 2019/07/08 22:09:22 sevan Exp $ |
2 | # | | 2 | # |
3 | # The platforms that are supported by pkgsrc differ in the amount of | | 3 | # The platforms that are supported by pkgsrc differ in the amount of |
4 | # functions they provide in the C library (libc). Functions that are | | 4 | # functions they provide in the C library (libc). Functions that are |
5 | # typically available on NetBSD are provided in the libnbcompat package. | | 5 | # typically available on NetBSD are provided in the libnbcompat package. |
6 | # | | 6 | # |
7 | # This file defines a set of "features" that some packages require. | | 7 | # This file defines a set of "features" that some packages require. |
8 | # Whenever a package makes use of them, it should list the features in | | 8 | # Whenever a package makes use of them, it should list the features in |
9 | # the USE_FEATURES variable. (It serves a similar purpose as USE_TOOLS.) | | 9 | # the USE_FEATURES variable. (It serves a similar purpose as USE_TOOLS.) |
10 | # | | 10 | # |
11 | # The *.c files that use the features must be patched a little. When | | 11 | # The *.c files that use the features must be patched a little. When |
12 | # there are missing features, the C preprocessor macro HAVE_NBCOMPAT_H | | 12 | # there are missing features, the C preprocessor macro HAVE_NBCOMPAT_H |
13 | # will be defined to 1. In this case, the headers from the nbcompat | | 13 | # will be defined to 1. In this case, the headers from the nbcompat |
14 | # directory must be included. | | 14 | # directory must be included. |
| @@ -36,42 +36,43 @@ | | | @@ -36,42 +36,43 @@ |
36 | # | | 36 | # |
37 | # Possible: | | 37 | # Possible: |
38 | # * asprintf: The functions asprintf and vasprintf. | | 38 | # * asprintf: The functions asprintf and vasprintf. |
39 | # * cdefs: The header sys/cdefs.h. | | 39 | # * cdefs: The header sys/cdefs.h. |
40 | # * err: The functions err, verr, errx, verrx. | | 40 | # * err: The functions err, verr, errx, verrx. |
41 | # * warn: The functions warn, vwarn, warnx, vwarnx. | | 41 | # * warn: The functions warn, vwarn, warnx, vwarnx. |
42 | # * fts_close, fts_open, fts_read, fts_set: Functions | | 42 | # * fts_close, fts_open, fts_read, fts_set: Functions |
43 | # for filesystem traversal. | | 43 | # for filesystem traversal. |
44 | # * getopt_long: The GNU version of getopt. | | 44 | # * getopt_long: The GNU version of getopt. |
45 | # * getprogname, setprogname | | 45 | # * getprogname, setprogname |
46 | # * glob | | 46 | # * glob |
47 | # * regcomp | | 47 | # * regcomp |
48 | # * snprintf, vsnprintf | | 48 | # * snprintf, vsnprintf |
| | | 49 | # * strnlen |
49 | # * utimes | | 50 | # * utimes |
50 | # * nbcompat: All of the above. | | 51 | # * nbcompat: All of the above. |
51 | # | | 52 | # |
52 | # Default value: undefined | | 53 | # Default value: undefined |
53 | # | | 54 | # |
54 | # === Variables defined by this file === | | 55 | # === Variables defined by this file === |
55 | # | | 56 | # |
56 | # MISSING_FEATURES | | 57 | # MISSING_FEATURES |
57 | # The features listed in USE_FEATURES that are missing on the | | 58 | # The features listed in USE_FEATURES that are missing on the |
58 | # current system. Also includes "inet6" if the system doesn't | | 59 | # current system. Also includes "inet6" if the system doesn't |
59 | # support IPv6. | | 60 | # support IPv6. |
60 | # | | 61 | # |
61 | # Keywords: feature features asprintf vasprintf cdefs err errx warn warnx | | 62 | # Keywords: feature features asprintf vasprintf cdefs err errx warn warnx |
62 | # Keywords: fts fts_open fts_read fts_set fts_close getopt_long | | 63 | # Keywords: fts fts_open fts_read fts_set fts_close getopt_long |
63 | # Keywords: getprogname setprogname glob regcomp setenv snprintf vsnprintf | | 64 | # Keywords: getprogname setprogname glob regcomp setenv snprintf strnlen |
64 | # Keywords: utimes libnbcompat nbcompat | | 65 | # Keywords: vsnprintf utimes libnbcompat nbcompat |
65 | | | 66 | |
66 | _VARGROUPS+= features | | 67 | _VARGROUPS+= features |
67 | _USER_VARS.features= # none | | 68 | _USER_VARS.features= # none |
68 | _PKG_VARS.features= USE_FEATURES | | 69 | _PKG_VARS.features= USE_FEATURES |
69 | _SYS_VARS.features= MISSING_FEATURES | | 70 | _SYS_VARS.features= MISSING_FEATURES |
70 | _SORTED_VARS.features= *S | | 71 | _SORTED_VARS.features= *S |
71 | | | 72 | |
72 | MISSING_FEATURES= # empty | | 73 | MISSING_FEATURES= # empty |
73 | USE_FEATURES?= # none | | 74 | USE_FEATURES?= # none |
74 | | | 75 | |
75 | # | | 76 | # |
76 | # Handle "inet6" feature specially -- we always add it to | | 77 | # Handle "inet6" feature specially -- we always add it to |
77 | # MISSING_FEATURES if the operating system doesn't support IPv6, | | 78 | # MISSING_FEATURES if the operating system doesn't support IPv6, |
| @@ -173,24 +174,28 @@ MISSING_FEATURES+= ${_feature_} | | | @@ -173,24 +174,28 @@ MISSING_FEATURES+= ${_feature_} |
173 | . endif | | 174 | . endif |
174 | . endif | | 175 | . endif |
175 | .endfor | | 176 | .endfor |
176 | | | 177 | |
177 | .for _feature_ in snprintf vsnprintf | | 178 | .for _feature_ in snprintf vsnprintf |
178 | . if !empty(USE_FEATURES:M${_feature_}) | | 179 | . if !empty(USE_FEATURES:M${_feature_}) |
179 | . if ${OPSYS} == "IRIX" || !empty(MACHINE_PLATFORM:MHPUX-11.11-hppa) \ | | 180 | . if ${OPSYS} == "IRIX" || !empty(MACHINE_PLATFORM:MHPUX-11.11-hppa) \ |
180 | || ${OS_VARIANT} == "SCOOSR5" | | 181 | || ${OS_VARIANT} == "SCOOSR5" |
181 | MISSING_FEATURES+= ${_feature_} | | 182 | MISSING_FEATURES+= ${_feature_} |
182 | . endif | | 183 | . endif |
183 | . endif | | 184 | . endif |
184 | .endfor | | 185 | .endfor |
185 | | | 186 | |
| | | 187 | .if !empty(USE_FEATURES:Mstrnlen) |
| | | 188 | MISSING_FEATURES+= strnlen |
| | | 189 | .endif |
| | | 190 | |
186 | .for _feature_ in utimes | | 191 | .for _feature_ in utimes |
187 | . if !empty(USE_FEATURES:M${_feature_}) | | 192 | . if !empty(USE_FEATURES:M${_feature_}) |
188 | . if ${OPSYS} == "Interix" | | 193 | . if ${OPSYS} == "Interix" |
189 | MISSING_FEATURES+= ${_feature_} | | 194 | MISSING_FEATURES+= ${_feature_} |
190 | . endif | | 195 | . endif |
191 | . endif | | 196 | . endif |
192 | .endfor | | 197 | .endfor |
193 | | | 198 | |
194 | .if !empty(USE_FEATURES:Mnbcompat) | | 199 | .if !empty(USE_FEATURES:Mnbcompat) |
195 | MISSING_FEATURES+= nbcompat | | 200 | MISSING_FEATURES+= nbcompat |
196 | .endif | | 201 | .endif |