summaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 666f49d26bd..652cf5b4aa5 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -38,8 +38,6 @@ details. */
#endif
#ifndef DISABLE_GETENV_PROPERTIES
-#define __NO_CTYPE 1
-#include <ctype.h>
#include <java-props.h>
#define PROCESS_GCJ_PROPERTIES process_gcj_properties()
#else
@@ -986,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)
{
@@ -994,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
@@ -1006,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] != '=')
{
@@ -1028,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] != '=')
{