diff options
| author | djm <> | 2008-09-06 12:15:56 +0000 |
|---|---|---|
| committer | djm <> | 2008-09-06 12:15:56 +0000 |
| commit | 5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80 (patch) | |
| tree | aba68249883aa9d2361d92eef69a81d0c4961732 /src/lib/libcrypto/o_str.c | |
| parent | f6198d4d0ab97685dc56be2d48715ed39fcc74b9 (diff) | |
| download | openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.gz openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.bz2 openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.zip | |
import of OpenSSL 0.9.8h
Diffstat (limited to 'src/lib/libcrypto/o_str.c')
| -rw-r--r-- | src/lib/libcrypto/o_str.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/libcrypto/o_str.c b/src/lib/libcrypto/o_str.c index da8860491d..59cc25094b 100644 --- a/src/lib/libcrypto/o_str.c +++ b/src/lib/libcrypto/o_str.c | |||
| @@ -60,6 +60,10 @@ | |||
| 60 | #include <e_os.h> | 60 | #include <e_os.h> |
| 61 | #include "o_str.h" | 61 | #include "o_str.h" |
| 62 | 62 | ||
| 63 | #if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && !defined(OPENSSL_SYSNAME_WIN32) | ||
| 64 | # include <strings.h> | ||
| 65 | #endif | ||
| 66 | |||
| 63 | int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n) | 67 | int OPENSSL_strncasecmp(const char *str1, const char *str2, size_t n) |
| 64 | { | 68 | { |
| 65 | #if defined(OPENSSL_IMPLEMENTS_strncasecmp) | 69 | #if defined(OPENSSL_IMPLEMENTS_strncasecmp) |
| @@ -94,3 +98,12 @@ int OPENSSL_strcasecmp(const char *str1, const char *str2) | |||
| 94 | #endif | 98 | #endif |
| 95 | } | 99 | } |
| 96 | 100 | ||
| 101 | int OPENSSL_memcmp(const void *v1,const void *v2,size_t n) | ||
| 102 | { | ||
| 103 | const unsigned char *c1=v1,*c2=v2; | ||
| 104 | int ret=0; | ||
| 105 | |||
| 106 | while(n && (ret=*c1-*c2)==0) n--,c1++,c2++; | ||
| 107 | |||
| 108 | return ret; | ||
| 109 | } | ||
