NetBSD has its own unoptimizable memset version since 2013

checking presence of the function if older versions of NetBSD
This commit is contained in:
David Carlier 2018-01-15 22:10:58 +00:00 committed by Anatol Belski
parent 957b91b739
commit 7f51257c08
2 changed files with 4 additions and 1 deletions

View File

@ -608,6 +608,7 @@ chroot \
ctime_r \
cuserid \
crypt \
explicit_memset \
flock \
ftok \
funopen \

View File

@ -32,7 +32,9 @@
PHPAPI void php_explicit_bzero(void *dst, size_t siz)
{
#ifdef __GNUC__
#if HAVE_EXPLICIT_MEMSET
explicit_memset(dst, 0, siz);
#elif defined(__GNUC__)
memset(dst, 0, siz);
asm __volatile__("" :: "r"(dst) : "memory");
#else