Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / crypto / hcrypto / kernel / strcasecmp.c
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 const char hckernel_strcasecmp_placeholder[] =
11 "This is not an empty compilation unit.";
12
13 #ifndef afs_strcasecmp
14 int
15 afs_strcasecmp(const char *s1, const char *s2)
16 {
17 while (*s1 && *s2) {
18 char c1, c2;
19
20 c1 = *s1++;
21 c2 = *s2++;
22 if (c1 >= 'A' && c1 <= 'Z')
23 c1 += 0x20;
24 if (c2 >= 'A' && c2 <= 'Z')
25 c2 += 0x20;
26 if (c1 != c2)
27 return c1 - c2;
28 }
29
30 return *s1 - *s2;
31 }
32 #endif