summaryrefslogtreecommitdiff
path: root/databases/rrdtool/patches
diff options
context:
space:
mode:
authordholland <dholland>2016-08-27 07:40:22 +0000
committerdholland <dholland>2016-08-27 07:40:22 +0000
commite7e425533a637de66fd66a4616e703bb4623adc3 (patch)
treea216b3c33af3709c970b1e12458081d31ba3da5e /databases/rrdtool/patches
parent3254ce5d1e52906f54bb321272acbde0806c9f0c (diff)
downloadpkgsrc-e7e425533a637de66fd66a4616e703bb4623adc3.tar.gz
Use <ctype.h> properly. Ride previous bump.
Diffstat (limited to 'databases/rrdtool/patches')
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__cgi.c30
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__graph.c15
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__restore.c15
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__strtod.c33
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__utils.c15
-rw-r--r--databases/rrdtool/patches/patch-src_rrd__xport.c33
6 files changed, 141 insertions, 0 deletions
diff --git a/databases/rrdtool/patches/patch-src_rrd__cgi.c b/databases/rrdtool/patches/patch-src_rrd__cgi.c
new file mode 100644
index 00000000000..36ae8058cad
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__cgi.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_rrd__cgi.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
+
+Use <ctype.h> correctly.
+
+--- src/rrd_cgi.c~ 2016-04-19 15:52:25.000000000 +0000
++++ src/rrd_cgi.c
+@@ -1223,7 +1223,7 @@ int parse(
+ return 0;
+ }
+ /* .. and match exactly (a whitespace following 'tag') */
+- if (!isspace(*((*buf) + i + taglen))) {
++ if (!isspace((unsigned char) *((*buf) + i + taglen))) {
+ return 0;
+ }
+ #ifdef DEBUG_PARSER
+@@ -1334,10 +1334,10 @@ char *rrdcgiDecodeString(
+ if (*cp == '%') {
+ if (strchr("0123456789ABCDEFabcdef", *(cp + 1))
+ && strchr("0123456789ABCDEFabcdef", *(cp + 2))) {
+- if (islower(*(cp + 1)))
+- *(cp + 1) = toupper(*(cp + 1));
+- if (islower(*(cp + 2)))
+- *(cp + 2) = toupper(*(cp + 2));
++ if (islower((unsigned char) *(cp + 1)))
++ *(cp + 1) = toupper((unsigned char) *(cp + 1));
++ if (islower((unsigned char) *(cp + 2)))
++ *(cp + 2) = toupper((unsigned char) *(cp + 2));
+ *(xp) =
+ (*(cp + 1) >=
+ 'A' ? *(cp + 1) - 'A' + 10 : *(cp + 1) - '0') * 16 +
diff --git a/databases/rrdtool/patches/patch-src_rrd__graph.c b/databases/rrdtool/patches/patch-src_rrd__graph.c
new file mode 100644
index 00000000000..c0af996fd61
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__graph.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_rrd__graph.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
+
+Use <ctype.h> correctly.
+
+--- src/rrd_graph.c~ 2016-04-19 15:52:25.000000000 +0000
++++ src/rrd_graph.c
+@@ -1704,7 +1704,7 @@ static int strfduration(char * const des
+ if ((zpad = *f == '0'))
+ f++;
+
+- if (isdigit(*f)) {
++ if (isdigit((unsigned char)*f)) {
+ int nread;
+ sscanf(f, "%d%n", &width, &nread);
+ f += nread;
diff --git a/databases/rrdtool/patches/patch-src_rrd__restore.c b/databases/rrdtool/patches/patch-src_rrd__restore.c
new file mode 100644
index 00000000000..a592a0c2030
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__restore.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_rrd__restore.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
+
+Use <ctype.h> correctly.
+
+--- src/rrd_restore.c~ 2016-04-19 15:52:26.000000000 +0000
++++ src/rrd_restore.c
+@@ -104,7 +104,7 @@ static xmlChar* get_xml_element (
+ }
+ /* strip whitespace from end of message */
+ for (c-- ; c != msgcpy ; c--) {
+- if (!isprint(*c)) {
++ if (!isprint((unsigned char)*c)) {
+ *c = 0;
+ }
+ }
diff --git a/databases/rrdtool/patches/patch-src_rrd__strtod.c b/databases/rrdtool/patches/patch-src_rrd__strtod.c
new file mode 100644
index 00000000000..d02b6e1cb3e
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__strtod.c
@@ -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++;
+ }
diff --git a/databases/rrdtool/patches/patch-src_rrd__utils.c b/databases/rrdtool/patches/patch-src_rrd__utils.c
new file mode 100644
index 00000000000..bda9c7eddfb
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__utils.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_rrd__utils.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
+
+Use <ctype.h> correctly.
+
+--- src/rrd_utils.c~ 2016-04-19 15:52:26.000000000 +0000
++++ src/rrd_utils.c
+@@ -238,7 +238,7 @@ const char * rrd_scaled_duration (const
+ char * ep = NULL;
+ unsigned long int value = strtoul(token, &ep, 10);
+ /* account for -1 => UMAXLONG which is not what we want */
+- if (! isdigit(token[0]))
++ if (! isdigit((unsigned char)token[0]))
+ return "value must be (suffixed) positive number";
+ /* Catch an internal error before we inhibit scaling */
+ if (0 == divisor)
diff --git a/databases/rrdtool/patches/patch-src_rrd__xport.c b/databases/rrdtool/patches/patch-src_rrd__xport.c
new file mode 100644
index 00000000000..b3843bacc6a
--- /dev/null
+++ b/databases/rrdtool/patches/patch-src_rrd__xport.c
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_rrd__xport.c,v 1.1 2016/08/27 07:40:23 dholland Exp $
+
+Use <ctype.h> correctly.
+
+--- src/rrd_xport.c~ 2016-04-19 15:52:26.000000000 +0000
++++ src/rrd_xport.c
+@@ -547,7 +547,7 @@ int rrd_xport_format_sv(char sep, string
+ if (addToBuffer(buffer,"\"time\"",6)) { return 1; }
+ for(unsigned long i=0;i<col_cnt;i++) {
+ /* strip leading spaces */
+- char *t=legend_v[i]; while (isspace(*t)) { t++;}
++ char *t=legend_v[i]; while (isspace((unsigned char)*t)) { t++;}
+ /* and print it */
+ snprintf(buf,255,"%c\"%s\"",sep,t);
+ if (addToBuffer(buffer,buf,0)) { return 1;}
+@@ -690,7 +690,7 @@ int rrd_xport_format_xmljson(int flags,s
+ for (unsigned long j = 0; j < col_cnt; j++) {
+ char *entry = legend_v[j];
+ /* I do not know why the legend is "spaced", but let us skip it */
+- while(isspace(*entry)){entry++;}
++ while(isspace((unsigned char)*entry)){entry++;}
+ /* now output it */
+ if (json){
+ snprintf(buf,sizeof(buf)," \"%s\"", entry);
+@@ -977,7 +977,7 @@ int rrd_xport_format_addprints(int flags
+ case GF_LINE:
+ entry = im->gdes[i].legend;
+ /* I do not know why the legend is "spaced", but let us skip it */
+- while(isspace(*entry)){entry++;}
++ while(isspace((unsigned char)*entry)){entry++;}
+ if (json) {
+ snprintf(buf,sizeof(buf),",\n { \"line\": \"%s\" }",entry);
+ } else {