Added a patch to prevent expansion of the toupper and tolower macros in

C++. Needed at least for NetBSD 1.6.2/i386.
This commit is contained in:
rillig 2006-01-07 21:55:23 +00:00
parent d6ec91875d
commit 6836cb6ed6
2 changed files with 20 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.37 2005/12/18 13:46:58 joerg Exp $
$NetBSD: distinfo,v 1.38 2006/01/07 21:55:23 rillig Exp $
SHA1 (kdepim-3.5.0.tar.bz2) = fb98ea719990bf1169289ca5012ad75ac261f488
RMD160 (kdepim-3.5.0.tar.bz2) = 8a41dedd61f8607520d9bcfe49baadeb2b47d845
@ -13,3 +13,4 @@ SHA1 (patch-ag) = 7c3974ddf207367015ffd1ac6ec2ceffa840febf
SHA1 (patch-ah) = ffe68d07a0d49555b30ccd322c14f646bf2972cd
SHA1 (patch-ai) = e323770b352d0a3876f8380bb31aa30615866dd4
SHA1 (patch-aj) = 1fd187c4c9ddb4f6380265853feb7eb04cf4b740
SHA1 (patch-ak) = cac11150a708f2f4258b9371f9aaa72b133a821d

View file

@ -0,0 +1,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 );
}