diff options
author | Werner Koch <wk@gnupg.org> | 1998-10-06 14:10:02 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-10-06 14:10:02 +0200 |
commit | f04db5631158b3856ea11f300d02a03c7e15ede4 (patch) | |
tree | 6cd9c2416b65118f4da0aeceb6be2a7f1763e258 /util/strgutil.c | |
parent | *** empty log message *** (diff) | |
download | gnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.tar.xz gnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.zip |
windoze version works again
Diffstat (limited to 'util/strgutil.c')
-rw-r--r-- | util/strgutil.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/util/strgutil.c b/util/strgutil.c index d19ba6e54..809b0c3f2 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -92,17 +92,6 @@ strlist_last( STRLIST node ) - -int -memicmp( const char *a, const char *b, size_t n ) -{ - for( ; n; n--, a++, b++ ) - if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) ) - return *(const byte *)a - *(const byte*)b; - return 0; -} - - /**************** * look for the substring SUB in buffer and return a pointer to that * substring in BUF or NULL if not found. @@ -217,3 +206,18 @@ strlwr(char *s) } #endif +/**************** + * mingw32/cpd has a memicmp() + */ +#ifndef HAVE_MEMICMP +int +memicmp( const char *a, const char *b, size_t n ) +{ + for( ; n; n--, a++, b++ ) + if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) ) + return *(const byte *)a - *(const byte*)b; + return 0; +} +#endif + + |