summaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-10-06 14:10:02 +0200
committerWerner Koch <wk@gnupg.org>1998-10-06 14:10:02 +0200
commitf04db5631158b3856ea11f300d02a03c7e15ede4 (patch)
tree6cd9c2416b65118f4da0aeceb6be2a7f1763e258 /util/strgutil.c
parent*** empty log message *** (diff)
downloadgnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.tar.xz
gnupg2-f04db5631158b3856ea11f300d02a03c7e15ede4.zip
windoze version works again
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c26
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
+
+