diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-24 07:18:16 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-24 07:18:16 +0000 |
commit | 4a5d230ebda72f9b5642f821c94c1398e18c82f6 (patch) | |
tree | a49df1c45c238595b5457b87626c25e750ec197c /libjava | |
parent | 10a45226d1da501b9686f48463fbd451bd9655b1 (diff) | |
download | gcc-4a5d230ebda72f9b5642f821c94c1398e18c82f6.tar.gz |
PR bootstrap/50888
* prims.cc: Don't include ctype.h.
(c_isspace): Define.
(next_property_key, next_property_value): Use it instead
of isspace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181685 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 8 | ||||
-rw-r--r-- | libjava/prims.cc | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index af2622d955c..e856e4b65d7 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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-11-21 Andreas Tobler <andreast@fgznet.ch> * configure.ac: Fix FreeBSD 10 detection. diff --git a/libjava/prims.cc b/libjava/prims.cc index 90f8dc5ca23..652cf5b4aa5 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -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] != '=') { |