aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/string.h')
-rw-r--r--include/asm-sh/string.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/asm-sh/string.h b/include/asm-sh/string.h
index 3e0cff04caec..95bc7db006b0 100644
--- a/include/asm-sh/string.h
+++ b/include/asm-sh/string.h
@@ -1,13 +1,15 @@
1#ifndef __ASM_SH_STRING_H 1#ifndef __ASM_SH_STRING_H
2#define __ASM_SH_STRING_H 2#define __ASM_SH_STRING_H
3 3
4#ifdef __KERNEL__
5
4/* 6/*
5 * Copyright (C) 1999 Niibe Yutaka 7 * Copyright (C) 1999 Niibe Yutaka
6 * But consider these trivial functions to be public domain. 8 * But consider these trivial functions to be public domain.
7 */ 9 */
8 10
9#define __HAVE_ARCH_STRCPY 11#define __HAVE_ARCH_STRCPY
10static __inline__ char *strcpy(char *__dest, const char *__src) 12static inline char *strcpy(char *__dest, const char *__src)
11{ 13{
12 register char *__xdest = __dest; 14 register char *__xdest = __dest;
13 unsigned long __dummy; 15 unsigned long __dummy;
@@ -26,7 +28,7 @@ static __inline__ char *strcpy(char *__dest, const char *__src)
26} 28}
27 29
28#define __HAVE_ARCH_STRNCPY 30#define __HAVE_ARCH_STRNCPY
29static __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) 31static inline char *strncpy(char *__dest, const char *__src, size_t __n)
30{ 32{
31 register char *__xdest = __dest; 33 register char *__xdest = __dest;
32 unsigned long __dummy; 34 unsigned long __dummy;
@@ -52,7 +54,7 @@ static __inline__ char *strncpy(char *__dest, const char *__src, size_t __n)
52} 54}
53 55
54#define __HAVE_ARCH_STRCMP 56#define __HAVE_ARCH_STRCMP
55static __inline__ int strcmp(const char *__cs, const char *__ct) 57static inline int strcmp(const char *__cs, const char *__ct)
56{ 58{
57 register int __res; 59 register int __res;
58 unsigned long __dummy; 60 unsigned long __dummy;
@@ -78,7 +80,7 @@ static __inline__ int strcmp(const char *__cs, const char *__ct)
78} 80}
79 81
80#define __HAVE_ARCH_STRNCMP 82#define __HAVE_ARCH_STRNCMP
81static __inline__ int strncmp(const char *__cs, const char *__ct, size_t __n) 83static inline int strncmp(const char *__cs, const char *__ct, size_t __n)
82{ 84{
83 register int __res; 85 register int __res;
84 unsigned long __dummy; 86 unsigned long __dummy;
@@ -124,4 +126,9 @@ extern void *memchr(const void *__s, int __c, size_t __n);
124#define __HAVE_ARCH_STRLEN 126#define __HAVE_ARCH_STRLEN
125extern size_t strlen(const char *); 127extern size_t strlen(const char *);
126 128
129/* arch/sh/lib/strcasecmp.c */
130extern int strcasecmp(const char *, const char *);
131
132#endif /* __KERNEL__ */
133
127#endif /* __ASM_SH_STRING_H */ 134#endif /* __ASM_SH_STRING_H */