Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-src_rrd__strtod.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
Use <ctype.h> correctly.
--- src/rrd_strtod.c~ 2016-04-19 15:52:26.000000000 +0000
+++ src/rrd_strtod.c
@@ -117,7 +117,7 @@ double rrd_strtod(const char *str, char
num_decimals = 0;
// Process string of digits
- while (isdigit(*p)) {
+ while (isdigit((unsigned char)*p)) {
number = number * 10. + (*p - '0');
p++;
num_digits++;
@@ -127,7 +127,7 @@ double rrd_strtod(const char *str, char
if (*p == '.') {
p++;
- while (isdigit(*p)) {
+ while (isdigit((unsigned char)*p)) {
number = number * 10. + (*p - '0');
p++;
num_digits++;
@@ -156,7 +156,7 @@ double rrd_strtod(const char *str, char
// Process string of digits
n = 0;
- while (isdigit(*p)) {
+ while (isdigit((unsigned char)*p)) {
n = n * 10 + (*p - '0');
p++;
}