|
Packit Service |
1af19e |
/* Multiple versions of memmem.
|
|
Packit Service |
1af19e |
Copyright (C) 2018 Free Software Foundation, Inc.
|
|
Packit Service |
1af19e |
This file is part of the GNU C Library.
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
1af19e |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1af19e |
License as published by the Free Software Foundation; either
|
|
Packit Service |
1af19e |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
1af19e |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1af19e |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1af19e |
Lesser General Public License for more details.
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1af19e |
License along with the GNU C Library; if not, see
|
|
Packit Service |
1af19e |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
#include <ifunc-memmem.h>
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
#if HAVE_MEMMEM_IFUNC
|
|
Packit Service |
1af19e |
# define memmem __redirect_memmem
|
|
Packit Service |
1af19e |
# define __memmem __redirect___memmem
|
|
Packit Service |
1af19e |
# include <string.h>
|
|
Packit Service |
1af19e |
# include <ifunc-resolve.h>
|
|
Packit Service |
1af19e |
# undef memmem
|
|
Packit Service |
1af19e |
# undef __memmem
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
# if HAVE_MEMMEM_C
|
|
Packit Service |
1af19e |
extern __typeof (__redirect_memmem) MEMMEM_C attribute_hidden;
|
|
Packit Service |
1af19e |
# endif
|
|
Packit Service |
1af19e |
|
|
Packit Service |
1af19e |
# if HAVE_MEMMEM_Z13
|
|
Packit Service |
1af19e |
extern __typeof (__redirect_memmem) MEMMEM_Z13 attribute_hidden;
|
|
Packit Service |
1af19e |
# endif
|
|
Packit Service |
1af19e |
|
|
Packit Service |
90971b |
# if HAVE_MEMMEM_ARCH13
|
|
Packit Service |
90971b |
extern __typeof (__redirect_memmem) MEMMEM_ARCH13 attribute_hidden;
|
|
Packit Service |
90971b |
# endif
|
|
Packit Service |
90971b |
|
|
Packit Service |
1af19e |
s390_libc_ifunc_expr (__redirect_memmem, __memmem,
|
|
Packit Service |
90971b |
(HAVE_MEMMEM_ARCH13 && (hwcap & HWCAP_S390_VXRS_EXT2))
|
|
Packit Service |
90971b |
? MEMMEM_ARCH13
|
|
Packit Service |
90971b |
: (HAVE_MEMMEM_Z13 && (hwcap & HWCAP_S390_VX))
|
|
Packit Service |
1af19e |
? MEMMEM_Z13
|
|
Packit Service |
1af19e |
: MEMMEM_DEFAULT
|
|
Packit Service |
1af19e |
)
|
|
Packit Service |
1af19e |
weak_alias (__memmem, memmem)
|
|
Packit Service |
1af19e |
#endif
|