Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 1 | /* |
| 2 | * U-boot - string.h String functions |
| 3 | * |
Aubrey Li | 314d22f | 2007-04-05 18:31:18 +0800 | [diff] [blame] | 4 | * Copyright (c) 2005-2007 Analog Devices Inc. |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | /* Changed by Lineo Inc. May 2001 */ |
| 10 | |
| 11 | #ifndef _BLACKFINNOMMU_STRING_H_ |
| 12 | #define _BLACKFINNOMMU_STRING_H_ |
| 13 | |
| 14 | #ifdef __KERNEL__ /* only set these up for kernel code */ |
| 15 | |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 16 | #define __HAVE_ARCH_STRCPY |
| 17 | #define __HAVE_ARCH_STRNCPY |
| 18 | #define __HAVE_ARCH_STRCMP |
| 19 | #define __HAVE_ARCH_STRNCMP |
| 20 | #define __HAVE_ARCH_MEMCPY |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 21 | #define __HAVE_ARCH_MEMCMP |
| 22 | #define __HAVE_ARCH_MEMSET |
| 23 | #define __HAVE_ARCH_MEMMOVE |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 24 | |
| 25 | extern char *strcpy(char *dest, const char *src); |
| 26 | extern char *strncpy(char *dest, const char *src, size_t n); |
| 27 | extern int strcmp(const char *cs, const char *ct); |
| 28 | extern int strncmp(const char *cs, const char *ct, size_t count); |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 29 | extern void *memcpy(void *dest, const void *src, size_t count); |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 30 | extern void *memset(void *s, int c, size_t count); |
Mike Frysinger | 0c1af60 | 2009-11-14 13:53:00 -0500 | [diff] [blame] | 31 | extern int memcmp(const void *, const void *, size_t); |
Aubrey.Li | 9da597f | 2007-03-09 13:38:44 +0800 | [diff] [blame] | 32 | extern void *memmove(void *dest, const void *src, size_t count); |
Wolfgang Denk | 97caf67 | 2006-03-12 02:12:27 +0100 | [diff] [blame] | 33 | |
| 34 | #else /* KERNEL */ |
| 35 | |
| 36 | /* |
| 37 | * let user libraries deal with these, |
| 38 | * IMHO the kernel has no place defining these functions for user apps |
| 39 | */ |
| 40 | |
| 41 | #define __HAVE_ARCH_STRCPY 1 |
| 42 | #define __HAVE_ARCH_STRNCPY 1 |
| 43 | #define __HAVE_ARCH_STRCAT 1 |
| 44 | #define __HAVE_ARCH_STRNCAT 1 |
| 45 | #define __HAVE_ARCH_STRCMP 1 |
| 46 | #define __HAVE_ARCH_STRNCMP 1 |
| 47 | #define __HAVE_ARCH_STRNICMP 1 |
| 48 | #define __HAVE_ARCH_STRCHR 1 |
| 49 | #define __HAVE_ARCH_STRRCHR 1 |
| 50 | #define __HAVE_ARCH_STRSTR 1 |
| 51 | #define __HAVE_ARCH_STRLEN 1 |
| 52 | #define __HAVE_ARCH_STRNLEN 1 |
| 53 | #define __HAVE_ARCH_MEMSET 1 |
| 54 | #define __HAVE_ARCH_MEMCPY 1 |
| 55 | #define __HAVE_ARCH_MEMMOVE 1 |
| 56 | #define __HAVE_ARCH_MEMSCAN 1 |
| 57 | #define __HAVE_ARCH_MEMCMP 1 |
| 58 | #define __HAVE_ARCH_MEMCHR 1 |
| 59 | #define __HAVE_ARCH_STRTOK 1 |
| 60 | |
| 61 | #endif /* KERNEL */ |
| 62 | |
| 63 | #endif /* _BLACKFIN_STRING_H_ */ |