Commit 282d42f2 by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/50888 (Bootstrap failure in libjava against latest git glibc)

	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: r181685
parent 1d551e4d
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> 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
* configure.ac: Fix FreeBSD 10 detection. * configure.ac: Fix FreeBSD 10 detection.
......
...@@ -38,7 +38,6 @@ details. */ ...@@ -38,7 +38,6 @@ details. */
#endif #endif
#ifndef DISABLE_GETENV_PROPERTIES #ifndef DISABLE_GETENV_PROPERTIES
#include <ctype.h>
#include <java-props.h> #include <java-props.h>
#define PROCESS_GCJ_PROPERTIES process_gcj_properties() #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
#else #else
...@@ -985,6 +984,8 @@ static java::lang::Thread *main_thread; ...@@ -985,6 +984,8 @@ static java::lang::Thread *main_thread;
#ifndef DISABLE_GETENV_PROPERTIES #ifndef DISABLE_GETENV_PROPERTIES
#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL)
static char * static char *
next_property_key (char *s, size_t *length) next_property_key (char *s, size_t *length)
{ {
...@@ -993,7 +994,7 @@ next_property_key (char *s, size_t *length) ...@@ -993,7 +994,7 @@ next_property_key (char *s, size_t *length)
JvAssert (s); JvAssert (s);
// Skip over whitespace // Skip over whitespace
while (isspace (*s)) while (c_isspace (*s))
s++; s++;
// If we've reached the end, return NULL. Also return NULL if for // 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) ...@@ -1005,7 +1006,7 @@ next_property_key (char *s, size_t *length)
// Determine the length of the property key. // Determine the length of the property key.
while (s[l] != 0 while (s[l] != 0
&& ! isspace (s[l]) && ! c_isspace (s[l])
&& s[l] != ':' && s[l] != ':'
&& s[l] != '=') && s[l] != '=')
{ {
...@@ -1027,19 +1028,19 @@ next_property_value (char *s, size_t *length) ...@@ -1027,19 +1028,19 @@ next_property_value (char *s, size_t *length)
JvAssert (s); JvAssert (s);
while (isspace (*s)) while (c_isspace (*s))
s++; s++;
if (*s == ':' if (*s == ':'
|| *s == '=') || *s == '=')
s++; s++;
while (isspace (*s)) while (c_isspace (*s))
s++; s++;
// Determine the length of the property value. // Determine the length of the property value.
while (s[l] != 0 while (s[l] != 0
&& ! isspace (s[l]) && ! c_isspace (s[l])
&& s[l] != ':' && s[l] != ':'
&& s[l] != '=') && s[l] != '=')
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment