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
This commit is contained in:
parent
c0e4a357a2
commit
b396ac3d0f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215752
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user