aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/strcase.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-09-26 16:04:21 +1000
committerPaul Mackerras <paulus@samba.org>2005-09-26 16:04:21 +1000
commit14cf11af6cf608eb8c23e989ddb17a715ddce109 (patch)
tree271a97ce73e265f39c569cb159c195c5b4bb3f8c /arch/powerpc/lib/strcase.c
parente5baa396af7560382d2cf3f0871d616b61fc284c (diff)
downloadkernel_samsung_aries-14cf11af6cf608eb8c23e989ddb17a715ddce109.zip
kernel_samsung_aries-14cf11af6cf608eb8c23e989ddb17a715ddce109.tar.gz
kernel_samsung_aries-14cf11af6cf608eb8c23e989ddb17a715ddce109.tar.bz2
powerpc: Merge enough to start building in arch/powerpc.
This creates the directory structure under arch/powerpc and a bunch of Kconfig files. It does a first-cut merge of arch/powerpc/mm, arch/powerpc/lib and arch/powerpc/platforms/powermac. This is enough to build a 32-bit powermac kernel with ARCH=powerpc. For now we are getting some unmerged files from arch/ppc/kernel and arch/ppc/syslib, or arch/ppc64/kernel. This makes some minor changes to files in those directories and files outside arch/powerpc. The boot directory is still not merged. That's going to be interesting. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/lib/strcase.c')
-rw-r--r--arch/powerpc/lib/strcase.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/lib/strcase.c b/arch/powerpc/lib/strcase.c
new file mode 100644
index 0000000..36b5210
--- /dev/null
+++ b/arch/powerpc/lib/strcase.c
@@ -0,0 +1,23 @@
+#include <linux/ctype.h>
+
+int strcasecmp(const char *s1, const char *s2)
+{
+ int c1, c2;
+
+ do {
+ c1 = tolower(*s1++);
+ c2 = tolower(*s2++);
+ } while (c1 == c2 && c1 != 0);
+ return c1 - c2;
+}
+
+int strncasecmp(const char *s1, const char *s2, int n)
+{
+ int c1, c2;
+
+ do {
+ c1 = tolower(*s1++);
+ c2 = tolower(*s2++);
+ } while ((--n > 0) && c1 == c2 && c1 != 0);
+ return c1 - c2;
+}