Blame sysdeps/s390/memmem-vx.c

Packit Service a9cffa
/* Default memmem implementation with vector string functions for S/390.
Packit Service a9cffa
   Copyright (C) 2018 Free Software Foundation, Inc.
Packit Service a9cffa
   This file is part of the GNU C Library.
Packit Service a9cffa
Packit Service a9cffa
   The GNU C Library is free software; you can redistribute it and/or
Packit Service a9cffa
   modify it under the terms of the GNU Lesser General Public
Packit Service a9cffa
   License as published by the Free Software Foundation; either
Packit Service a9cffa
   version 2.1 of the License, or (at your option) any later version.
Packit Service a9cffa
Packit Service a9cffa
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service a9cffa
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a9cffa
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a9cffa
   Lesser General Public License for more details.
Packit Service a9cffa
Packit Service a9cffa
   You should have received a copy of the GNU Lesser General Public
Packit Service a9cffa
   License along with the GNU C Library; if not, see
Packit Service a9cffa
   <http://www.gnu.org/licenses/>.  */
Packit Service a9cffa
Packit Service a9cffa
#include <ifunc-memmem.h>
Packit Service a9cffa
Packit Service a9cffa
#if HAVE_MEMMEM_Z13
Packit Service a9cffa
# include <string.h>
Packit Service a9cffa
# if HAVE_MEMMEM_IFUNC
Packit Service a9cffa
Packit Service a9cffa
#  ifndef _LIBC
Packit Service a9cffa
#   define memmem MEMMEM_Z13
Packit Service a9cffa
#  else
Packit Service a9cffa
#   define __memmem MEMMEM_Z13
Packit Service a9cffa
#  endif
Packit Service a9cffa
Packit Service a9cffa
#  if defined SHARED && IS_IN (libc)
Packit Service a9cffa
#   undef libc_hidden_def
Packit Service a9cffa
#   undef libc_hidden_weak
Packit Service a9cffa
Packit Service a9cffa
#   if HAVE_MEMMEM_C
Packit Service a9cffa
#    define libc_hidden_def(name)
Packit Service a9cffa
#    define libc_hidden_weak(name)
Packit Service a9cffa
#   else
Packit Service a9cffa
#    define libc_hidden_def(name)				\
Packit Service a9cffa
  strong_alias (__memmem_vx, __memmem_vx_1);			\
Packit Service a9cffa
  __hidden_ver1 (__memmem_vx, __GI___memmem, __memmem_vx);
Packit Service a9cffa
Packit Service a9cffa
#    define libc_hidden_weak(name)					\
Packit Service a9cffa
  __hidden_ver1 (__memmem_vx_1, __GI_memmem, __memmem_vx_1) __attribute__((weak));
Packit Service a9cffa
#   endif
Packit Service a9cffa
#  endif
Packit Service a9cffa
Packit Service a9cffa
#  undef weak_alias
Packit Service a9cffa
#  define weak_alias(a, b)
Packit Service a9cffa
# endif
Packit Service a9cffa
Packit Service a9cffa
# ifdef USE_MULTIARCH
Packit Service a9cffa
extern __typeof (memchr) __memchr_vx attribute_hidden;
Packit Service a9cffa
# define memchr __memchr_vx
Packit Service a9cffa
Packit Service a9cffa
extern __typeof (memcmp) __memcmp_z196 attribute_hidden;
Packit Service a9cffa
# define memcmp __memcmp_z196
Packit Service a9cffa
# endif
Packit Service a9cffa
Packit Service a9cffa
# include <string/memmem.c>
Packit Service a9cffa
#endif