From f60b17cd56aed908b1a1bc792086fe95b6d7117b Mon Sep 17 00:00:00 2001 From: kleink Date: Sat, 10 Apr 1999 15:14:11 +0000 Subject: [PATCH] Correct comparison length botch in `deprecated unix' symbol check; fixes PR bin/7343. --- gnu/dist/gcc/cccp.c | 2 +- gnu/dist/gcc/cpphash.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/dist/gcc/cccp.c b/gnu/dist/gcc/cccp.c index fca6f1db4054..6e7ff1bda2b7 100644 --- a/gnu/dist/gcc/cccp.c +++ b/gnu/dist/gcc/cccp.c @@ -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"); } diff --git a/gnu/dist/gcc/cpphash.c b/gnu/dist/gcc/cpphash.c index 4706aa217897..dbfb90567721 100644 --- a/gnu/dist/gcc/cpphash.c +++ b/gnu/dist/gcc/cpphash.c @@ -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"); }