diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-03 20:45:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-03 20:45:40 +0000 |
commit | a27b691e2903a886be640db801677f6f988d3793 (patch) | |
tree | c68f25c9edef18954e9c5b3d74893f1df87b8871 /contrib/string/string_io.c | |
parent | 4d2a506526ceacab5f75df040596a5287ab40612 (diff) | |
download | postgresql-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 'contrib/string/string_io.c')
-rw-r--r-- | contrib/string/string_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c index c329fec1e9e..8c4e5b45e1a 100644 --- a/contrib/string/string_io.c +++ b/contrib/string/string_io.c @@ -28,9 +28,10 @@ #define DIGIT(val) ((val) + '0') #define ISOCTAL(c) (((c) >= '0') && ((c) <= '7')) #ifndef ISO8859 -#define NOTPRINTABLE(c) (!isprint(c)) +#define NOTPRINTABLE(c) (!isprint((unsigned char) (c))) #else -#define NOTPRINTABLE(c) (!isprint(c) && ((c) < 0xa0)) +#define NOTPRINTABLE(c) (!isprint((unsigned char) (c)) && \ + ((unsigned char) (c) < (unsigned char) 0xa0)) #endif /* |