From a27b691e2903a886be640db801677f6f988d3793 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 3 Dec 2000 20:45:40 +0000 Subject: Ensure that all uses of functions are applied to unsigned-char values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00. --- src/include/regex/regex2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/regex/regex2.h') diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h index d6cb23a5d34..f655a1f2a27 100644 --- a/src/include/regex/regex2.h +++ b/src/include/regex/regex2.h @@ -207,8 +207,8 @@ struct re_guts #endif #ifdef MULTIBYTE -#define ISWORD(c) ((c >= 0 && c <= UCHAR_MAX) && \ - (isalnum(c) || (c) == '_')) +#define ISWORD(c) (((c) >= 0 && (c) <= UCHAR_MAX) && \ + (isalnum((unsigned char) (c)) || (c) == '_')) #else -#define ISWORD(c) (isalnum(c) || (c) == '_') +#define ISWORD(c) (isalnum((unsigned char) (c)) || (c) == '_') #endif -- cgit v1.2.3