Correct comparison length botch in `deprecated unix' symbol check;

fixes PR bin/7343.
This commit is contained in:
kleink 1999-04-10 15:14:11 +00:00
parent ca88198b65
commit f60b17cd56
2 changed files with 2 additions and 2 deletions

2
gnu/dist/gcc/cccp.c vendored
View File

@ -9579,7 +9579,7 @@ lookup (name, len, hash)
bucket = bucket->next;
}
/* Lookups pass no hashcode. #define passes one. Look for no hashcode. */
if (islookup && !strncmp(name, "unix", len) && !warned_unix) {
if (islookup && len == 4 && bcmp(name, "unix", 4) == 0 && !warned_unix) {
warned_unix++;
warning("deprecated symbol \"unix\" is no longer predefined");
}

View File

@ -86,7 +86,7 @@ cpp_lookup (pfile, name, len, hash)
bucket = bucket->next;
}
/* Lookups pass no hashcode. #define passes one. Look for no hashcode. */
if (islookup && !strncmp(name, "unix", len) && !warned_unix) {
if (islookup && len == 4 && bcmp(name, "unix", 4) == 0 && !warned_unix) {
warned_unix++;
warning("deprecated symbol \"unix\" is no longer predefined");
}