diff options
| author | djm <> | 2008-09-06 12:15:56 +0000 |
|---|---|---|
| committer | djm <> | 2008-09-06 12:15:56 +0000 |
| commit | 12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (patch) | |
| tree | b7a1f167ae5aeff4cfd8a18b598b68fe98a066fd /src/lib/libcrypto/o_str.c | |
| parent | f519f07de9bfb123f2b32aa3965e6f73c8364b80 (diff) | |
| parent | 5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80 (diff) | |
| download | openbsd-12867252827c8efaa8ddd1fa3b3d6e321e2bcdef.tar.gz openbsd-12867252827c8efaa8ddd1fa3b3d6e321e2bcdef.tar.bz2 openbsd-12867252827c8efaa8ddd1fa3b3d6e321e2bcdef.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to '')
| -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 | } | ||
