summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Carlier <dcarlier@afilias.info>2019-05-29 10:58:11 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-05-29 10:58:11 (GMT)
commitd8b755167235e0621814eb5ac39163b3db6879bb (patch)
tree91f0f085d333ff12e72ff785b5b653ccc596922c
parent4dd3e3f9bbd320f0dd556688e04db0a6b55a7b52 (diff)
downloadcpython-d8b755167235e0621814eb5ac39163b3db6879bb.zip
cpython-d8b755167235e0621814eb5ac39163b3db6879bb.tar.gz
cpython-d8b755167235e0621814eb5ac39163b3db6879bb.tar.bz2
bpo-33164: blake2 fix for HP-UX (GH-13633)
-rw-r--r--Modules/_blake2/impl/blake2-impl.h3
-rw-r--r--configure.ac2
2 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_blake2/impl/blake2-impl.h b/Modules/_blake2/impl/blake2-impl.h
index 5bebd83..9d2fbb7 100644
--- a/Modules/_blake2/impl/blake2-impl.h
+++ b/Modules/_blake2/impl/blake2-impl.h
@@ -140,6 +140,9 @@ static inline void secure_zero_memory(void *v, size_t n)
{
#if defined(_WIN32) || defined(WIN32)
SecureZeroMemory(v, n);
+#elif defined(__hpux)
+ static void *(*const volatile memset_v)(void *, int, size_t) = &memset;
+ memset_v(v, 0, n);
#else
// prioritize first the general C11 call
#if defined(HAVE_MEMSET_S)
diff --git a/configure.ac b/configure.ac
index c743edf..864c0ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3527,6 +3527,8 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
if_nameindex \
+ initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
+ memrchr mbrtowc mkdirat mkfifo \
madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \