diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2010-11-23 15:08:56 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2010-11-23 15:08:56 +0000 |
commit | b396ac3d0f44fb406e6f69813318b9e9580cebbe (patch) | |
tree | 947ecc65293495e07f53a0b7e0410aeb6b278333 /usr.bin | |
parent | c0e4a357a2344b8f122e4c1d320a2448966b8307 (diff) | |
download | src-b396ac3d0f44fb406e6f69813318b9e9580cebbe.tar.gz src-b396ac3d0f44fb406e6f69813318b9e9580cebbe.zip |
Properly use SCHAR_MAX instead of CHAR_MAX for 0x7f. This fixes operation
of locate(1) on systems on which char is unsigned by default (ARM and
PowerPC).
Reported by: Paul Mather
MFC after: 4 days
Notes
Notes:
svn path=/head/; revision=215752
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/locate/locate/locate.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/locate/locate/locate.h b/usr.bin/locate/locate/locate.h index 24df8d4002be..c2f27fb33759 100644 --- a/usr.bin/locate/locate/locate.h +++ b/usr.bin/locate/locate/locate.h @@ -48,15 +48,15 @@ #define LDC_MAX 28 /* 128-255 bigram codes (128 most common, as determined by 'updatedb') */ -#define BIGRAM_MIN (UCHAR_MAX - CHAR_MAX) +#define BIGRAM_MIN (UCHAR_MAX - SCHAR_MAX) #define BIGRAM_MAX UCHAR_MAX /* 32-127 single character (printable) ascii residue (ie, literal) */ #define ASCII_MIN 32 -#define ASCII_MAX CHAR_MAX +#define ASCII_MAX SCHAR_MAX -/* #define TO7BIT(x) (x = ( ((u_char)x) & CHAR_MAX )) */ -#define TO7BIT(x) (x = x & CHAR_MAX ) +/* #define TO7BIT(x) (x = ( ((u_char)x) & SCHAR_MAX )) */ +#define TO7BIT(x) (x = x & SCHAR_MAX ) #if UCHAR_MAX >= 4096 |