uboot/arch/blackfin/include/asm/string.h
<<
>>
Prefs
   1/*
   2 * U-Boot - string.h String functions
   3 *
   4 * Copyright (c) 2005-2007 Analog Devices Inc.
   5 *
   6 * SPDX-License-Identifier:     GPL-2.0+
   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
  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
  21#define __HAVE_ARCH_MEMCMP
  22#define __HAVE_ARCH_MEMSET
  23#define __HAVE_ARCH_MEMMOVE
  24
  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);
  29extern void *memcpy(void *dest, const void *src, size_t count);
  30extern void *memset(void *s, int c, size_t count);
  31extern int memcmp(const void *, const void *, size_t);
  32extern void *memmove(void *dest, const void *src, size_t count);
  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_ */
  64