Blame sysdeps/s390/strstr-vx.c

Packit Bot 38d9ae
/* Default strstr implementation with vector string functions for S/390.
Packit Bot 38d9ae
   Copyright (C) 2018 Free Software Foundation, Inc.
Packit Bot 38d9ae
   This file is part of the GNU C Library.
Packit Bot 38d9ae
Packit Bot 38d9ae
   The GNU C Library is free software; you can redistribute it and/or
Packit Bot 38d9ae
   modify it under the terms of the GNU Lesser General Public
Packit Bot 38d9ae
   License as published by the Free Software Foundation; either
Packit Bot 38d9ae
   version 2.1 of the License, or (at your option) any later version.
Packit Bot 38d9ae
Packit Bot 38d9ae
   The GNU C Library is distributed in the hope that it will be useful,
Packit Bot 38d9ae
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Bot 38d9ae
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Bot 38d9ae
   Lesser General Public License for more details.
Packit Bot 38d9ae
Packit Bot 38d9ae
   You should have received a copy of the GNU Lesser General Public
Packit Bot 38d9ae
   License along with the GNU C Library; if not, see
Packit Bot 38d9ae
   <http://www.gnu.org/licenses/>.  */
Packit Bot 38d9ae
Packit Bot 38d9ae
#include <ifunc-strstr.h>
Packit Bot 38d9ae
Packit Bot 38d9ae
#if HAVE_STRSTR_Z13
Packit Bot 38d9ae
# if HAVE_STRSTR_IFUNC
Packit Bot 38d9ae
#  define STRSTR STRSTR_Z13
Packit Bot 38d9ae
#  if defined SHARED && IS_IN (libc)
Packit Bot 38d9ae
#   undef libc_hidden_builtin_def
Packit Bot 38d9ae
#   if HAVE_STRSTR_C
Packit Bot 38d9ae
#    define libc_hidden_builtin_def(name)
Packit Bot 38d9ae
#   else
Packit Bot 38d9ae
#    define libc_hidden_builtin_def(name)		\
Packit Bot 38d9ae
  __hidden_ver1 (__strstr_vx, __GI_strstr, __strstr_vx);
Packit Bot 38d9ae
#   endif
Packit Bot 38d9ae
#  endif
Packit Bot 38d9ae
# endif
Packit Bot 38d9ae
Packit Bot 38d9ae
# include <string.h>
Packit Bot 38d9ae
Packit Bot 38d9ae
# ifdef USE_MULTIARCH
Packit Bot 38d9ae
extern __typeof (strchr) __strchr_vx attribute_hidden;
Packit Bot 38d9ae
#  define strchr __strchr_vx
Packit Bot 38d9ae
Packit Bot 38d9ae
extern __typeof (strlen) __strlen_vx attribute_hidden;
Packit Bot 38d9ae
#  define strlen __strlen_vx
Packit Bot 38d9ae
Packit Bot 38d9ae
extern __typeof (__strnlen) __strnlen_vx attribute_hidden;
Packit Bot 38d9ae
#  define __strnlen __strnlen_vx
Packit Bot 38d9ae
Packit Bot 38d9ae
extern __typeof (memcmp) __memcmp_z196 attribute_hidden;
Packit Bot 38d9ae
#  define memcmp __memcmp_z196
Packit Bot 38d9ae
# endif
Packit Bot 38d9ae
Packit Bot 38d9ae
# include <string/strstr.c>
Packit Bot 38d9ae
#endif