pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/rrdtool Use <ctype.h> properly. Ride previou...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d9564d14d5bc
branches:  trunk
changeset: 351759:d9564d14d5bc
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Aug 27 07:40:22 2016 +0000

description:
Use <ctype.h> properly. Ride previous bump.

diffstat:

 databases/rrdtool/distinfo                         |  10 +++++-
 databases/rrdtool/patches/patch-src_rrd__cgi.c     |  30 ++++++++++++++++++++
 databases/rrdtool/patches/patch-src_rrd__graph.c   |  15 ++++++++++
 databases/rrdtool/patches/patch-src_rrd__restore.c |  15 ++++++++++
 databases/rrdtool/patches/patch-src_rrd__strtod.c  |  33 ++++++++++++++++++++++
 databases/rrdtool/patches/patch-src_rrd__utils.c   |  15 ++++++++++
 databases/rrdtool/patches/patch-src_rrd__xport.c   |  33 ++++++++++++++++++++++
 7 files changed, 149 insertions(+), 2 deletions(-)

diffs (187 lines):

diff -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/distinfo
--- a/databases/rrdtool/distinfo        Sat Aug 27 06:57:58 2016 +0000
+++ b/databases/rrdtool/distinfo        Sat Aug 27 07:40:22 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.51 2016/04/23 06:23:49 adam Exp $
+$NetBSD: distinfo,v 1.52 2016/08/27 07:40:22 dholland Exp $
 
 SHA1 (rrdtool-1.6.0.tar.gz) = 9866b41bda9416188f236d61d24f185b173fd571
 RMD160 (rrdtool-1.6.0.tar.gz) = 90bb6dc4a19c296fb67bb83094f6308396e591c0
@@ -8,5 +8,11 @@
 SHA1 (patch-ab) = 81131a74c8e9b81edfaa4b6746d4ab8508e82ac2
 SHA1 (patch-al) = 985e90539340c8bac9788e897c4b7b899fe9f6b1
 SHA1 (patch-am) = be06ac61b314e225d62f9f27da28c24fb6a1b84b
-SHA1 (patch-bindings_perl-shared_Makefile.PL) = 1704531ecfcac0aeb0da03f350d9a657e3d8535d
+SHA1 (patch-bindings_perl-shared_Makefile.PL) = f3b86e68a023ec9da5d600c8f803c93820195d53
 SHA1 (patch-src_gettext.h) = 1254beedc267d901e154ea98599bdfddbe49ddc0
+SHA1 (patch-src_rrd__cgi.c) = 2ea93cf6cd084638e9ae720fcb9c503631d31413
+SHA1 (patch-src_rrd__graph.c) = 799c5a666661054e4c32b8ed02cc09f2262dae03
+SHA1 (patch-src_rrd__restore.c) = e10312901fd6edfdcaf7cce932eb434cce8ef771
+SHA1 (patch-src_rrd__strtod.c) = 49ed57170777b8bcbd7c4e700c1f54d74e3a3a72
+SHA1 (patch-src_rrd__utils.c) = 58d10b1447c23268af119e525220a8d950a43dd4
+SHA1 (patch-src_rrd__xport.c) = 27671dc58affdcc0c8eab62b01f1edd65dc4a67f
diff -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__cgi.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__cgi.c    Sat Aug 27 07:40:22 2016 +0000
@@ -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 -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__graph.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__graph.c  Sat Aug 27 07:40:22 2016 +0000
@@ -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 -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__restore.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__restore.c        Sat Aug 27 07:40:22 2016 +0000
@@ -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 -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__strtod.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__strtod.c Sat Aug 27 07:40:22 2016 +0000
@@ -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 -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__utils.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__utils.c  Sat Aug 27 07:40:22 2016 +0000
@@ -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 -r d7eba30435a7 -r d9564d14d5bc databases/rrdtool/patches/patch-src_rrd__xport.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/patches/patch-src_rrd__xport.c  Sat Aug 27 07:40:22 2016 +0000
@@ -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 {



Home | Main Index | Thread Index | Old Index