summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-08-16 00:09:32 +0000
committerDavid Schleef <ds@schleef.org>2005-08-16 00:09:32 +0000
commit8b6b1130c0eb3bedb2361e28cf17a7329552efc9 (patch)
tree4c0743975c0b320c1a6b3f83cf38d2bca9461a2d
parentc823f1e1bcb79885d6bf2494882dd59619fa1357 (diff)
downloadliboil-8b6b1130c0eb3bedb2361e28cf17a7329552efc9.tar.gz
GCC complains on solaris when isspace() is called with a
char argument. Rather than argue about such stupidity, I'll play along. * liboil/liboilprototype.c: (oil_prototype_from_string), (parse_string), (oil_param_from_string): * testsuite/introspect.c: (parse_type), (parse_size), (parse_string), (parse_prototype): * testsuite/proto3.c: (check_param):
-rw-r--r--ChangeLog11
-rw-r--r--liboil/liboilprototype.c18
-rw-r--r--testsuite/introspect.c18
-rw-r--r--testsuite/proto3.c6
4 files changed, 32 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index e677ba5..6e7809a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2005-08-15 David Schleef <ds@schleef.org>
+ GCC complains on solaris when isspace() is called with a
+ char argument. Rather than argue about such stupidity,
+ I'll play along.
+ * liboil/liboilprototype.c: (oil_prototype_from_string),
+ (parse_string), (oil_param_from_string):
+ * testsuite/introspect.c: (parse_type), (parse_size),
+ (parse_string), (parse_prototype):
+ * testsuite/proto3.c: (check_param):
+
+2005-08-15 David Schleef <ds@schleef.org>
+
* liboil/powerpc/Makefile.am: disable fdct8x8theora_altivec.c,
because it doesn't compile.
* liboil/powerpc/recon8x8_ppc.c: (recon8x8_inter_ppc),
diff --git a/liboil/liboilprototype.c b/liboil/liboilprototype.c
index a694ad3..d137af4 100644
--- a/liboil/liboilprototype.c
+++ b/liboil/liboilprototype.c
@@ -119,26 +119,26 @@ OilPrototype *oil_prototype_from_string (const char *s)
proto = malloc (sizeof(OilPrototype));
memset (proto, 0, sizeof(OilPrototype));
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
while (*s) {
type_name = parse_string (s, &s);
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
ptr = FALSE;
if(s[0] == '*'){
ptr = TRUE;
s++;
}
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
parameter_name = parse_string (s, &s);
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
if(s[0] == ','){
s++;
}
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
param.type = oil_type_from_string (type_name, ptr);
param.type_name = type_name;
@@ -200,7 +200,7 @@ static char * parse_string (const char *s, const char **endptr)
const char *s0;
s0 = s;
- while(isalnum(*s) || *s=='_') {
+ while(isalnum((int)*s) || *s=='_') {
s++;
}
*endptr = s;
@@ -550,7 +550,7 @@ oil_param_from_string (OilParameter *p, char *s)
p->is_pointer = 1;
}
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
p->index = *s - '0';
s++;
} else {
@@ -563,7 +563,7 @@ oil_param_from_string (OilParameter *p, char *s)
s++;
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
length = strtoul (s, &s, 10);
var = 0;
} else if (*s == 'n') {
@@ -583,7 +583,7 @@ oil_param_from_string (OilParameter *p, char *s)
p->prestride_length = length;
p->prestride_var = var;
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
p->poststride_length = strtoul (s, &s, 10);
p->poststride_var = 0;
} else if (*s == 'n') {
diff --git a/testsuite/introspect.c b/testsuite/introspect.c
index 1232217..8b82386 100644
--- a/testsuite/introspect.c
+++ b/testsuite/introspect.c
@@ -108,7 +108,7 @@ static int parse_type (char *s, char **endptr)
{
int i;
- while(isspace(*s))s++;
+ while(isspace((int)*s))s++;
for(i=0;i<8;i++){
if(strncmp(typenames[i],s,strlen(typenames[i]))==0){
@@ -122,13 +122,13 @@ static int parse_type (char *s, char **endptr)
static int parse_size (const char *s, char **endptr)
{
- while(isspace(*s))s++;
+ while(isspace((int)*s))s++;
if(s[0] == 'n'){
*endptr = (char *)(s + 1);
return 0;
}
- if(isdigit(s[0])){
+ if(isdigit((int)s[0])){
return strtol(s,endptr,0);
}
@@ -156,7 +156,7 @@ static char * parse_string (const char *s, const char **endptr)
const char *s0;
s0 = s;
- while(isalnum(*s) || *s=='_') {
+ while(isalnum((int)*s) || *s=='_') {
s++;
}
*endptr = s;
@@ -170,25 +170,25 @@ void parse_prototype (const char *s)
char *name;
int ptr = 0;
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
while (*s) {
type = parse_string (s, &s);
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
if(s[0] == '*'){
ptr = 1;
s++;
}
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
name = parse_string (s, &s);
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
if(s[0] == ','){
s++;
}
- while (isspace(*s))s++;
+ while (isspace((int)*s))s++;
printf("%s %s\n", type, name);
}
diff --git a/testsuite/proto3.c b/testsuite/proto3.c
index 65fab1e..a5d37ad 100644
--- a/testsuite/proto3.c
+++ b/testsuite/proto3.c
@@ -129,7 +129,7 @@ int check_param (Param *p, char *s)
p->is_stride = 0;
}
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
p->index = *s - '0';
s++;
} else {
@@ -142,7 +142,7 @@ int check_param (Param *p, char *s)
s++;
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
length = strtoul (s, &s, 10);
var = 0;
} else if (*s == 'n') {
@@ -163,7 +163,7 @@ int check_param (Param *p, char *s)
p->prestride_length = length;
p->prestride_var = var;
- if (isdigit (*s)) {
+ if (isdigit ((int)*s)) {
p->poststride_length = strtoul (s, &s, 10);
p->poststride_var = 0;
} else if (*s == 'n') {