aboutsummaryrefslogtreecommitdiff
path: root/src/include/regex/regex2.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
commita27b691e2903a886be640db801677f6f988d3793 (patch)
treec68f25c9edef18954e9c5b3d74893f1df87b8871 /src/include/regex/regex2.h
parent4d2a506526ceacab5f75df040596a5287ab40612 (diff)
downloadpostgresql-a27b691e2903a886be640db801677f6f988d3793.tar.gz
postgresql-a27b691e2903a886be640db801677f6f988d3793.zip
Ensure that all uses of <ctype.h> 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.
Diffstat (limited to 'src/include/regex/regex2.h')
-rw-r--r--src/include/regex/regex2.h6
1 files changed, 3 insertions, 3 deletions
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