Replace is*() macros with our own IS*() ones.
Get rid of non ANSI/ISO isascii().
diff --git a/ares/adig.c b/ares/adig.c
index 80ee7f4..fb3a432 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -225,7 +225,7 @@
 
         case 'T':
           /* Set the TCP port number. */
-          if (!isdigit((unsigned char)*optarg))
+          if (!ISDIGIT(*optarg))
             usage();
           options.tcp_port = (unsigned short)strtol(optarg, NULL, 0);
           optmask |= ARES_OPT_TCP_PORT;
@@ -233,7 +233,7 @@
 
         case 'U':
           /* Set the UDP port number. */
-          if (!isdigit((unsigned char)*optarg))
+          if (!ISDIGIT(*optarg))
             usage();
           options.udp_port = (unsigned short)strtol(optarg, NULL, 0);
           optmask |= ARES_OPT_UDP_PORT;
diff --git a/ares/ares__get_hostent.c b/ares/ares__get_hostent.c
index ecfd52a..333cf50 100644
--- a/ares/ares__get_hostent.c
+++ b/ares/ares__get_hostent.c
@@ -54,7 +54,7 @@
 
       /* Get the address part. */
       p = line;
-      while (*p && !isspace((unsigned char)*p))
+      while (*p && !ISSPACE(*p))
         p++;
       if (!*p)
         continue;
@@ -76,12 +76,12 @@
 
       /* Get the canonical hostname. */
       p++;
-      while (isspace((unsigned char)*p))
+      while (ISSPACE(*p))
         p++;
       if (!*p)
         continue;
       q = p;
-      while (*q && !isspace((unsigned char)*q))
+      while (*q && !ISSPACE(*q))
         q++;
       end_at_hostname = (*q == 0);
       *q = 0;
@@ -92,13 +92,13 @@
         {
           /* Count the aliases. */
           p = q + 1;
-          while (isspace((unsigned char)*p))
+          while (ISSPACE(*p))
             p++;
           while (*p)
             {
-              while (*p && !isspace((unsigned char)*p))
+              while (*p && !ISSPACE(*p))
                 p++;
-              while (isspace((unsigned char)*p))
+              while (ISSPACE(*p))
                 p++;
               naliases++;
             }
@@ -128,12 +128,12 @@
       if (!end_at_hostname)
         {
           p = canonical + strlen(canonical) + 1;
-          while (isspace((unsigned char)*p))
+          while (ISSPACE(*p))
             p++;
           while (*p)
             {
               q = p;
-              while (*q && !isspace((unsigned char)*q))
+              while (*q && !ISSPACE(*q))
                 q++;
               hostent->h_aliases[naliases] = malloc(q - p + 1);
               if (hostent->h_aliases[naliases] == NULL)
@@ -141,7 +141,7 @@
               memcpy(hostent->h_aliases[naliases], p, q - p);
               hostent->h_aliases[naliases][q - p] = 0;
               p = q;
-              while (isspace((unsigned char)*p))
+              while (ISSPACE(*p))
                 p++;
               naliases++;
             }
diff --git a/ares/ares_init.c b/ares/ares_init.c
index a0c1865..a9fa8fb 100644
--- a/ares/ares_init.c
+++ b/ares/ares_init.c
@@ -750,7 +750,7 @@
 
   /* Set a single search domain. */
   q = str;
-  while (*q && !isspace((unsigned char)*q))
+  while (*q && !ISSPACE(*q))
     q++;
   *q = 0;
   return set_search(channel, str);
@@ -774,9 +774,9 @@
         if (*p == *bindch) *l++ = 'b';
         else *l++ = 'f';
       }
-      while (*p && !isspace((unsigned char)*p) && (*p != ','))
+      while (*p && !ISSPACE(*p) && (*p != ','))
         p++;
-      while (*p && (isspace((unsigned char)*p) || (*p == ',')))
+      while (*p && (ISSPACE(*p) || (*p == ',')))
         p++;
     }
   *l = 0;
@@ -801,7 +801,7 @@
   while (more)
   {
     more = 0;
-    while (*p && !isspace(*p) && *p != ',')
+    while (*p && !ISSPACE(*p) && *p != ',')
       p++;
 
     if (*p)
@@ -861,7 +861,7 @@
       char ipbuf[16], ipbufpfx[32];
       /* Find just the IP */
       q = str;
-      while (*q && *q != '/' && *q != ';' && !isspace((unsigned char)*q))
+      while (*q && *q != '/' && *q != ';' && !ISSPACE(*q))
         q++;
       memcpy(ipbuf, str, (int)(q-str));
       ipbuf[(int)(q-str)] = 0;
@@ -869,7 +869,7 @@
       if (*q == '/')
         {
           const char *str2 = q+1;
-          while (*q && *q != ';' && !isspace((unsigned char)*q))
+          while (*q && *q != ';' && !ISSPACE(*q))
             q++;
           memcpy(ipbufpfx, str, (int)(q-str));
           ipbufpfx[(int)(q-str)] = 0;
@@ -918,11 +918,11 @@
         }
       else
         {
-          while (*q && *q != ';' && !isspace((unsigned char)*q))
+          while (*q && *q != ';' && !ISSPACE(*q))
             q++;
         }
       str = q;
-      while (isspace((unsigned char)*str))
+      while (ISSPACE(*str))
         str++;
     }
 
@@ -948,9 +948,9 @@
   p = str;
   while (*p)
     {
-      while (*p && !isspace((unsigned char)*p))
+      while (*p && !ISSPACE(*p))
         p++;
-      while (isspace((unsigned char)*p))
+      while (ISSPACE(*p))
         p++;
       n++;
     }
@@ -966,7 +966,7 @@
     {
       channel->ndomains = n;
       q = p;
-      while (*q && !isspace((unsigned char)*q))
+      while (*q && !ISSPACE(*q))
         q++;
       channel->domains[n] = malloc(q - p + 1);
       if (!channel->domains[n])
@@ -974,7 +974,7 @@
       memcpy(channel->domains[n], p, q - p);
       channel->domains[n][q - p] = 0;
       p = q;
-      while (isspace((unsigned char)*p))
+      while (ISSPACE(*p))
         p++;
       n++;
     }
@@ -991,7 +991,7 @@
   while (*p)
     {
       q = p;
-      while (*q && !isspace((unsigned char)*q))
+      while (*q && !ISSPACE(*q))
         q++;
       val = try_option(p, q, "ndots:");
       if (val && channel->ndots == -1)
@@ -1003,7 +1003,7 @@
       if (val && channel->tries == -1)
         channel->tries = atoi(val);
       p = q;
-      while (isspace((unsigned char)*p))
+      while (ISSPACE(*p))
         p++;
     }
 
@@ -1016,10 +1016,10 @@
   size_t len;
 
   len = strlen(opt);
-  if (strncmp(s, opt, len) != 0 || !isspace((unsigned char)s[len]))
+  if (strncmp(s, opt, len) != 0 || !ISSPACE(s[len]))
     return NULL;
   s += len;
-  while (isspace((unsigned char)*s))
+  while (ISSPACE(*s))
     s++;
   return s;
 }
diff --git a/ares/ares_search.c b/ares/ares_search.c
index 099a7c7..b05b4a8 100644
--- a/ares/ares_search.c
+++ b/ares/ares_search.c
@@ -239,15 +239,15 @@
                      == ARES_SUCCESS)
                 {
                   if (strncasecmp(line, name, len) != 0 ||
-                      !isspace((unsigned char)line[len]))
+                      !ISSPACE(line[len]))
                     continue;
                   p = line + len;
-                  while (isspace((unsigned char)*p))
+                  while (ISSPACE(*p))
                     p++;
                   if (*p)
                     {
                       q = p + 1;
-                      while (*q && !isspace((unsigned char)*q))
+                      while (*q && !ISSPACE(*q))
                         q++;
                       *s = malloc(q - p + 1);
                       if (*s)
diff --git a/ares/inet_net_pton.c b/ares/inet_net_pton.c
index d3e672b..ef96741 100644
--- a/ares/inet_net_pton.c
+++ b/ares/inet_net_pton.c
@@ -79,14 +79,13 @@
 
   ch = *src++;
   if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
-      && isascii((unsigned char)(src[1]))
-      && isxdigit((unsigned char)(src[1]))) {
+      && ISXDIGIT(src[1])) {
     /* Hexadecimal: Eat nybble string. */
     if (size <= 0U)
       goto emsgsize;
     dirty = 0;
     src++;  /* skip x or X. */
-    while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) {
+    while ((ch = *src++) != '\0' && ISXDIGIT(ch)) {
       if (isupper(ch))
         ch = tolower(ch);
       n = (int)(strchr(xdigits, ch) - xdigits);
@@ -106,7 +105,7 @@
         goto emsgsize;
       *dst++ = (unsigned char) (tmp << 4);
     }
-  } else if (isascii(ch) && isdigit(ch)) {
+  } else if (ISDIGIT(ch)) {
     /* Decimal: eat dotted digit string. */
     for (;;) {
       tmp = 0;
@@ -117,7 +116,7 @@
         if (tmp > 255)
           goto enoent;
       } while ((ch = *src++) != '\0' &&
-               isascii(ch) && isdigit(ch));
+               ISDIGIT(ch));
       if (size-- <= 0U)
         goto emsgsize;
       *dst++ = (unsigned char) tmp;
@@ -126,15 +125,15 @@
       if (ch != '.')
         goto enoent;
       ch = *src++;
-      if (!isascii(ch) || !isdigit(ch))
+      if (!ISDIGIT(ch))
         goto enoent;
     }
   } else
     goto enoent;
 
   bits = -1;
-  if (ch == '/' && isascii((unsigned char)(src[0])) &&
-      isdigit((unsigned char)(src[0])) && dst > odst) {
+  if (ch == '/' &&
+      ISDIGIT(src[0]) && dst > odst) {
     /* CIDR width specifier.  Nothing can follow it. */
     ch = *src++;    /* Skip over the /. */
     bits = 0;
@@ -142,7 +141,7 @@
       n = (int)(strchr(digits, ch) - digits);
       bits *= 10;
       bits += n;
-    } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
+    } while ((ch = *src++) != '\0' && ISDIGIT(ch));
     if (ch != '\0')
       goto enoent;
     if (bits > 32)