blob: 123d70f535fa21462ea175640b79970ceddc98ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-ak,v 1.1 2006/01/07 21:55:23 rillig Exp $
Prevent the macro expansion of toupper and tolower. Needed at least for
gcc 2.95 on NetBSD 1.6.2/i386.
--- indexlib/match.cpp.orig Tue Nov 8 23:33:31 2005
+++ indexlib/match.cpp Sun Jan 1 05:00:23 2006
@@ -54,8 +54,8 @@ indexlib::Match::Match( std::string str,
hot_bit_ = kMin( str.size(), sizeof( unsigned ) * 8 - 1 );
for ( unsigned i = 0; i != hot_bit_; ++i ) {
if ( caseinsensitive_ ) {
- setbit( masks_[ ( unsigned char )std::toupper( str[ i ] ) ], i );
- setbit( masks_[ ( unsigned char )std::tolower( str[ i ] ) ], i );
+ setbit( masks_[ ( unsigned char )(std::toupper)( str[ i ] ) ], i );
+ setbit( masks_[ ( unsigned char )(std::tolower)( str[ i ] ) ], i );
} else {
setbit( masks_[ ( unsigned char )str[ i ] ], i );
}
|