summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2009-02-14 19:40:55 +0000
committerwtc%google.com <devnull@localhost>2009-02-14 19:40:55 +0000
commitcfb08bc9efd2917c60d9e07ef6776f335d0aeb10 (patch)
treed8b64bf94fff24ac122879b9dce62f8ecfd09288
parenta9a421c328ab4404e0f510bcf5f0c68573fb7a56 (diff)
downloadnss-hg-cfb08bc9efd2917c60d9e07ef6776f335d0aeb10.tar.gz
Bug 278132: 1. Carried over an ifparser.c change from mozilla-central:
Brad Lassey - bug 463561 - mkdepend crashes while compiling freetype 2. Renamed the 'emxinc' variable 'includepath'. r=nelson.
-rw-r--r--security/coreconf/mkdepend/ifparser.c2
-rw-r--r--security/coreconf/mkdepend/main.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/security/coreconf/mkdepend/ifparser.c b/security/coreconf/mkdepend/ifparser.c
index d8d9e76bc..0b184c263 100644
--- a/security/coreconf/mkdepend/ifparser.c
+++ b/security/coreconf/mkdepend/ifparser.c
@@ -296,6 +296,8 @@ parse_product (IfParser *g, const char *cp, long *valp)
case '/':
DO (cp = parse_product (g, cp + 1, &rightval));
+ if (rightval == 0)
+ return CALLFUNC(g, handle_error) (g, cp, "0");
*valp = (*valp / rightval);
break;
diff --git a/security/coreconf/mkdepend/main.c b/security/coreconf/mkdepend/main.c
index bec31d27e..d5485f75d 100644
--- a/security/coreconf/mkdepend/main.c
+++ b/security/coreconf/mkdepend/main.c
@@ -392,14 +392,14 @@ main(int argc, char *argv[])
#if defined(__UNIXOS2__) || defined(_MSC_VER)
{
#if defined(_MSC_VER)
- char *emxinc = getenv("INCLUDE");
+ char *includepath = getenv("INCLUDE");
#else
- char *emxinc = getenv("C_INCLUDE_PATH");
+ char *includepath = getenv("C_INCLUDE_PATH");
#endif
/* can have more than one component */
- if (emxinc) {
+ if (includepath) {
char *beg, *end;
- beg= (char*)strdup(emxinc);
+ beg= (char*)strdup(includepath);
for (;;) {
end = (char*)strchr(beg,';');
if (end) *end = 0;
@@ -411,7 +411,7 @@ main(int argc, char *argv[])
}
}
}
-#else /* !__UNIXOS2__, does not use INCLUDEDIR at all */
+#else /* !__UNIXOS2__ && !_MSC_VER, does not use INCLUDEDIR at all */
if (incp >= includedirs + MAXDIRS)
fatalerr("Too many -I flags.\n");
*incp++ = INCLUDEDIR;