add HAVE_STRNSTR

This commit is contained in:
Michael Gehring
2016-01-26 14:11:10 +01:00
parent 041708f643
commit 0f56b68eac
2 changed files with 24 additions and 0 deletions

21
configure vendored
View File

@@ -474,6 +474,27 @@ else
fi
rm -f _$func.c _$func
#
# Check for strnstr().
func=strnstr
printf "Checking for $func() ... "
cat <<EOF > _$func.c
#include <string.h>
int main(void) {
const char big[] = "foo";
const char little[] = "f";
strnstr(big, little, 3);
return 0;
}
EOF
if $XCC _$func.c -o _$func 2>/dev/null; then
echo yes.
echo "CPPFLAGS += -DHAVE_STRNSTR" >>$CONFIG_MK
else
echo no.
fi
rm -f _$func.c _$func
#
# Check for humanize_number().
func=humanize_number