Correct comparison length botch in `deprecated unix' symbol check;
fixes PR bin/7343.
This commit is contained in:
parent
ca88198b65
commit
f60b17cd56
2
gnu/dist/gcc/cccp.c
vendored
2
gnu/dist/gcc/cccp.c
vendored
@ -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");
|
||||
}
|
||||
|
2
gnu/dist/gcc/cpphash.c
vendored
2
gnu/dist/gcc/cpphash.c
vendored
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user