diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/ChangeLog | 6 | ||||
-rw-r--r-- | util/secmem.c | 4 | ||||
-rw-r--r-- | util/strgutil.c | 12 |
3 files changed, 20 insertions, 2 deletions
diff --git a/util/ChangeLog b/util/ChangeLog index 531de7c02..972214428 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 22 11:14:53 CET 1999 Werner Koch <[email protected]> + + * strgutil.c (strcasecmp): New. + + * secmem.c (pool_is_mmapped): Made volatile. + Sat Oct 9 20:34:41 CEST 1999 Werner Koch <[email protected]> * Makefile.am: Removed libtool. diff --git a/util/secmem.c b/util/secmem.c index db4ee4148..0ab218567 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -58,7 +58,7 @@ struct memblock_struct { static void *pool; static volatile int pool_okay; /* may be checked in an atexit function */ -static int pool_is_mmapped; +static volatile int pool_is_mmapped; static size_t poolsize; /* allocated length */ static size_t poollen; /* used length */ static MEMBLOCK *unused_blocks; @@ -380,7 +380,7 @@ m_is_secure( const void *p ) /**************** * Warning: This code might be called by an interrupt handler - * and frankly, thre should really be such a handler, + * and frankly, there should really be such a handler, * to make sure that the memory is wiped out. * We hope that the OS wipes out mlocked memory after * receiving a SIGKILL - it really should do so, otherwise diff --git a/util/strgutil.c b/util/strgutil.c index 9ab63a047..861bf0d6b 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -559,6 +559,18 @@ strlwr(char *s) } #endif +#ifndef HAVE_STRCASECMP +int +strcasecmp( const char *a, const char *b ) +{ + for( ; *a && *b; a++, b++ ) { + if( *a != *b && toupper(*a) != toupper(*b) ) + break; + } + return *(const byte*)a - *(const byte*)b; +} +#endif + /**************** * mingw32/cpd has a memicmp() */ |