pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
firefox netbsd-6/amd64 build failures
firefox 35 exploded with a batch of errors because of passing signed chars
to ctype(3) functions. I had to apply the following quick-and-dirty
patches to make it compile. It seems to work fine.
Unless I hear otherwise I'm going to commit them.
--chris
--- js/src/gc/Statistics.cpp.orig 2015-02-05 11:52:40.000000000 +0000
+++ js/src/gc/Statistics.cpp 2015-02-05 11:52:28.000000000 +0000
@@ -221,8 +221,8 @@
while (*c) {
if (*c == ' ' || *c == '\t')
p('_');
- else if (isupper(*c))
- p(tolower(*c));
+ else if (isupper((unsigned char)*c))
+ p(tolower((unsigned char)*c));
else if (*c == '+')
p("added_");
else if (*c == '-')
--- js/src/jit/LIR.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jit/LIR.cpp 2015-02-05 12:03:55.000000000 +0000
@@ -314,7 +314,7 @@
const char *name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- fprintf(fp, "%c", tolower(name[i]));
+ fprintf(fp, "%c", tolower(((unsigned char)name[i])));
}
void
--- js/src/jit/MIR.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jit/MIR.cpp 2015-02-05 12:06:56.000000000 +0000
@@ -68,7 +68,7 @@
const char *name = names[op];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++)
- fprintf(fp, "%c", tolower(name[i]));
+ fprintf(fp, "%c", tolower(((unsigned char)name[i])));
}
static MConstant *
--- js/src/jsapi.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jsapi.cpp 2015-02-05 12:13:20.000000000 +0000
@@ -236,7 +236,7 @@
assertSameCompartment(cx, args);
required = true;
while ((c = *format++) != '\0') {
- if (isspace(c))
+ if (isspace(((unsigned char)c)))
continue;
if (c == '/') {
required = false;
--- js/src/jsdate.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jsdate.cpp 2015-02-05 12:54:32.000000000 +0000
@@ -2651,11 +2651,11 @@
if (strcmp(format, "%x") == 0 && result_len >= 6 &&
/* Format %x means use OS settings, which may have 2-digit yr, so
hack end of 3/11/22 or 11.03.22 or 11Mar22 to use 4-digit yr...*/
- !isdigit(buf[result_len - 3]) &&
- isdigit(buf[result_len - 2]) && isdigit(buf[result_len - 1]) &&
+ !isdigit(((unsigned char)buf[result_len - 3])) &&
+ isdigit(((unsigned char)buf[result_len - 2])) && isdigit(((unsigned char)buf[result_len - 1])) &&
/* ...but not if starts with 4-digit year, like 2022/3/11. */
- !(isdigit(buf[0]) && isdigit(buf[1]) &&
- isdigit(buf[2]) && isdigit(buf[3]))) {
+ !(isdigit(((unsigned char)buf[0])) && isdigit(((unsigned char)buf[1])) &&
+ isdigit(((unsigned char)buf[2])) && isdigit(((unsigned char)buf[3])))) {
JS_snprintf(buf + (result_len - 2), (sizeof buf) - (result_len - 2),
"%d", js_DateGetYear(cx, obj));
}
--- js/src/jskwgen.cpp.orig 2015-01-23 06:00:01.000000000 +0000
+++ js/src/jskwgen.cpp 2015-02-05 11:42:30.000000000 +0000
@@ -181,7 +181,7 @@
*s++ = '\\';
break;
default:
- if (!isprint(c)) {
+ if (!isprint(((unsigned char)c))) {
*s++ = '\\';
*s++ = (char)('0' + (0x3 & (((unsigned char)c) >> 6)));
*s++ = (char)('0' + (0x7 & (((unsigned char)c) >> 3)));
--- js/src/shell/jsoptparse.cpp.orig 2015-01-23 06:00:02.000000000 +0000
+++ js/src/shell/jsoptparse.cpp 2015-02-05 13:10:47.000000000 +0000
@@ -94,7 +94,7 @@
/* Delimit the current token. */
const char *limit = it;
- while (!isspace(*limit) && *limit != '\0')
+ while (!isspace(((unsigned char)*limit)) && *limit != '\0')
++limit;
/*
Home |
Main Index |
Thread Index |
Old Index