cpython: 2f004cc84153 (original) (raw)
Mercurial > cpython
changeset 105759:2f004cc84153 3.5
add a specific configure check for sys/random.h (closes #28932) [#28932]
Benjamin Peterson benjamin@python.org | |
---|---|
date | Mon, 19 Dec 2016 23:54:25 -0800 |
parents | cc40470c10f8 |
children | bfd4140d9c5d 957091874ea0 |
files | Misc/NEWS Python/random.c configure configure.ac pyconfig.h.in |
diffstat | 5 files changed, 8 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 2 Python/random.c 2 configure 2 configure.ac 2 pyconfig.h.in 3 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ Release date: TBA Core and Builtins ----------------- +- Issue #28932: Do not include <sys/random.h> if it does not exist. +
- Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not convert combined table into split table.
--- a/Python/random.c +++ b/Python/random.c @@ -9,7 +9,7 @@
ifdef HAVE_LINUX_RANDOM_H
include <linux/random.h>
endif
-# if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY) +# ifdef HAVE_SYS_RANDOM_H
include <sys/random.h>
endif
if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)
--- a/configure +++ b/configure @@ -7714,7 +7714,7 @@ unistd.h utime.h [](#l3.3) poll.h sys/devpoll.h sys/epoll.h sys/poll.h [](#l3.4) sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h [](#l3.5) sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h [](#l3.6) -sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h [](#l3.7) +sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h [](#l3.8) sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h [](#l3.9) sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h [](#l3.10) libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h [](#l3.11)
--- a/configure.ac +++ b/configure.ac @@ -1946,7 +1946,7 @@ unistd.h utime.h [](#l4.3) poll.h sys/devpoll.h sys/epoll.h sys/poll.h [](#l4.4) sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h [](#l4.5) sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h [](#l4.6) -sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h [](#l4.7) +sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h [](#l4.8) sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h [](#l4.9) sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h [](#l4.10) libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h [](#l4.11)
--- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1005,6 +1005,9 @@ /* Define to 1 if you have the <sys/poll.h> header file. / #undef HAVE_SYS_POLL_H +/ Define to 1 if you have the <sys/random.h> header file. / +#undef HAVE_SYS_RANDOM_H + / Define to 1 if you have the <sys/resource.h> header file. */ #undef HAVE_SYS_RESOURCE_H