]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/50888 (Bootstrap failure in libjava against latest git glibc)
authorJakub Jelinek <jakub@redhat.com>
Thu, 24 Nov 2011 07:24:43 +0000 (08:24 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Nov 2011 07:24:43 +0000 (08:24 +0100)
PR bootstrap/50888
* prims.cc: Don't include ctype.h.
(c_isspace): Define.
(next_property_key, next_property_value): Use it instead
of isspace.

From-SVN: r181688

libjava/ChangeLog
libjava/prims.cc

index 2c90af24a3a80cf22c5bc5b4f9465a24694c4c86..1f9c28133b972ca4dffc61c88c460c72c0073995 100644 (file)
@@ -1,3 +1,11 @@
+2011-11-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/50888
+       * prims.cc: Don't include ctype.h.
+       (c_isspace): Define.
+       (next_property_key, next_property_value): Use it instead
+       of isspace.
+
 2011-10-18  Uros Bizjak  <ubizjak@gmail.com>
            Eric Botcazou  <ebotcazou@adacore.com>
 
index d94cd92cbc73fbb852240290223386f77a916a22..c766370f8d2f4ddd64e223f0840c438eca39054a 100644 (file)
@@ -38,7 +38,6 @@ details.  */
 #endif
 
 #ifndef DISABLE_GETENV_PROPERTIES
-#include <ctype.h>
 #include <java-props.h>
 #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
 #else
@@ -985,6 +984,8 @@ static java::lang::Thread *main_thread;
 
 #ifndef DISABLE_GETENV_PROPERTIES
 
+#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL)
+
 static char *
 next_property_key (char *s, size_t *length)
 {
@@ -993,7 +994,7 @@ next_property_key (char *s, size_t *length)
   JvAssert (s);
 
   // Skip over whitespace
-  while (isspace (*s))
+  while (c_isspace (*s))
     s++;
 
   // If we've reached the end, return NULL.  Also return NULL if for
@@ -1005,7 +1006,7 @@ next_property_key (char *s, size_t *length)
 
   // Determine the length of the property key.
   while (s[l] != 0
-        && ! isspace (s[l])
+        && ! c_isspace (s[l])
         && s[l] != ':'
         && s[l] != '=')
     {
@@ -1027,19 +1028,19 @@ next_property_value (char *s, size_t *length)
 
   JvAssert (s);
 
-  while (isspace (*s))
+  while (c_isspace (*s))
     s++;
 
   if (*s == ':'
       || *s == '=')
     s++;
 
-  while (isspace (*s))
+  while (c_isspace (*s))
     s++;
 
   // Determine the length of the property value.
   while (s[l] != 0
-        && ! isspace (s[l])
+        && ! c_isspace (s[l])
         && s[l] != ':'
         && s[l] != '=')
     {