blob: aea4e29c9d9eb8088adc715e46d43e9eb5d788fd [file] [log] [blame]
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01001/*
2 * U-boot - string.h String functions
3 *
Aubrey Li155fd762007-04-05 18:31:18 +08004 * Copyright (c) 2005-2007 Analog Devices Inc.
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01005 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Wolfgang Denk6cb142f2006-03-12 02:12:27 +01007 */
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 Denk6cb142f2006-03-12 02:12:27 +010016#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.Li3f0606a2007-03-09 13:38:44 +080021#define __HAVE_ARCH_MEMCMP
22#define __HAVE_ARCH_MEMSET
23#define __HAVE_ARCH_MEMMOVE
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010024
25extern char *strcpy(char *dest, const char *src);
26extern char *strncpy(char *dest, const char *src, size_t n);
27extern int strcmp(const char *cs, const char *ct);
28extern int strncmp(const char *cs, const char *ct, size_t count);
Aubrey.Li3f0606a2007-03-09 13:38:44 +080029extern void *memcpy(void *dest, const void *src, size_t count);
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010030extern void *memset(void *s, int c, size_t count);
Mike Frysingerea693f22009-11-14 13:53:00 -050031extern int memcmp(const void *, const void *, size_t);
Aubrey.Li3f0606a2007-03-09 13:38:44 +080032extern void *memmove(void *dest, const void *src, size_t count);
Wolfgang Denk6cb142f2006-03-12 02:12:27 +010033
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_ */