diff options
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/grep/regex/tre-fastmatch.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index 359954b..8b2fa0c 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -74,7 +74,7 @@ CFLAGS+= -DWITHOUT_BZIP2 .endif .if !defined(WITHOUT_GNU_COMPAT) -CFLAGS+= -I/usr/include/gnu +CFLAGS+= -I${DESTDIR}/usr/include/gnu LDADD+= -lgnuregex DPADD+= ${LIBGNUREGEX} .endif diff --git a/usr.bin/grep/regex/tre-fastmatch.c b/usr.bin/grep/regex/tre-fastmatch.c index b7a7c91..4b58900 100644 --- a/usr.bin/grep/regex/tre-fastmatch.c +++ b/usr.bin/grep/regex/tre-fastmatch.c @@ -395,7 +395,7 @@ static int fastcmp(const fastmatch_t *fg, const void *data, if (p == NULL) \ return REG_ESPACE; \ for (unsigned int i = 0; i < plen; i++) \ - p[i] = tolower(pat[i]); \ + p[i] = tolower((unsigned char)pat[i]); \ _CALC_BMGS(arr, p, plen); \ xfree(p); \ } \ @@ -1030,7 +1030,7 @@ fastcmp(const fastmatch_t *fg, const void *data, tre_str_type_t type) continue; /* Compare */ - if (fg->icase ? (tolower(pat_byte[i]) == tolower(str_byte[i])) + if (fg->icase ? (tolower((unsigned char)pat_byte[i]) == tolower((unsigned char)str_byte[i])) : (pat_byte[i] == str_byte[i])) continue; } |