$NetBSD: patch-aa,v 1.4 2010/02/27 20:40:52 morr Exp $

Make it compile on NetBSD and Solaris. Patch taken from memcached git.

--- util.c.orig	2009-10-23 20:38:01.000000000 +0000
+++ util.c
@@ -8,6 +8,10 @@
 
 #include "memcached.h"
 
+/* Avoid warnings on solaris, where isspace() is an index into an array,
+ * and gcc uses signed chars */
+#define xisspace(c) isspace((unsigned char)c)
+
 bool safe_strtoull(const char *str, uint64_t *out) {
     assert(out != NULL);
     errno = 0;
@@ -16,7 +20,7 @@ bool safe_strtoull(const char *str, uint
     unsigned long long ull = strtoull(str, &endptr, 10);
     if (errno == ERANGE)
         return false;
-    if (isspace(*endptr) || (*endptr == '\0' && endptr != str)) {
+    if (xisspace(*endptr) || (*endptr == '\0' && endptr != str)) {
         if ((long long) ull < 0) {
             /* only check for negative signs in the uncommon case when
              * the unsigned number is so big that it's negative as a
@@ -39,7 +43,7 @@ bool safe_strtoll(const char *str, int64
     long long ll = strtoll(str, &endptr, 10);
     if (errno == ERANGE)
         return false;
-    if (isspace(*endptr) || (*endptr == '\0' && endptr != str)) {
+    if (xisspace(*endptr) || (*endptr == '\0' && endptr != str)) {
         *out = ll;
         return true;
     }
@@ -59,7 +63,7 @@ bool safe_strtoul(const char *str, uint3
         return false;
     }
 
-    if (isspace(*endptr) || (*endptr == '\0' && endptr != str)) {
+    if (xisspace(*endptr) || (*endptr == '\0' && endptr != str)) {
         if ((long) l < 0) {
             /* only check for negative signs in the uncommon case when
              * the unsigned number is so big that it's negative as a
@@ -83,7 +87,7 @@ bool safe_strtol(const char *str, int32_
     long l = strtol(str, &endptr, 10);
     if (errno == ERANGE)
         return false;
-    if (isspace(*endptr) || (*endptr == '\0' && endptr != str)) {
+    if (xisspace(*endptr) || (*endptr == '\0' && endptr != str)) {
         *out = l;
         return true;
     }
