1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
http://gcc.gnu.org/PR50888
fix building of gcj with glibc-2.15+
applied to gcc-4.6 branch:
http://gcc.gnu.org/viewcvs?view=revision&revision=181686
and to gcc-4.5 branch:
http://gcc.gnu.org/viewcvs?view=revision&revision=181687
and to gcc-4.4 branch:
http://gcc.gnu.org/viewcvs?view=revision&revision=181688
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.
--- branches/gcc-4_5-branch/libjava/prims.cc 2011/11/24 07:21:39 181686
+++ branches/gcc-4_5-branch/libjava/prims.cc 2011/11/24 07:23:16 181687
@@ -38,7 +38,6 @@
#endif
#ifndef DISABLE_GETENV_PROPERTIES
-#include <ctype.h>
#include <java-props.h>
#define PROCESS_GCJ_PROPERTIES process_gcj_properties()
#else
@@ -985,6 +984,8 @@
#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 @@
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 @@
// 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 @@
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] != '=')
{
|