diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-05-29 19:57:07 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2019-05-29 19:57:03 (GMT) |
commit | 43fdbd2729cb7cdbb5afb5d16352f6604859e564 (patch) | |
tree | 88cddedd14a456ffef515fa70718b1cb5ec33b31 /configure.ac | |
parent | 0c2f9305640f7655ba0cd5f478948b2763b376b3 (diff) | |
download | cpython-43fdbd2729cb7cdbb5afb5d16352f6604859e564.zip cpython-43fdbd2729cb7cdbb5afb5d16352f6604859e564.tar.gz cpython-43fdbd2729cb7cdbb5afb5d16352f6604859e564.tar.bz2 |
bpo-26836: Add os.memfd_create() (#13567)
* bpo-26836: Add os.memfd_create()
* Use the glibc wrapper for memfd_create()
Co-Authored-By: Christian Heimes <christian@python.org>
* Fix deletions caused by autoreconf.
* Use MFD_CLOEXEC as the default value for *flags*.
* Add memset_s to configure.ac.
* Revert memset_s changes.
* Apply the requested changes.
* Tweak the docs.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 864c0ab..1190b37 100644 --- a/configure.ac +++ b/configure.ac @@ -2133,7 +2133,7 @@ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ -sys/endian.h sys/sysmacros.h) +sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h) AC_HEADER_DIRENT AC_HEADER_MAJOR @@ -3626,6 +3626,20 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [AC_MSG_RESULT(no) ]) +AC_MSG_CHECKING(for memfd_create) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif +#ifdef HAVE_SYS_MEMFD_H +#include <sys/memfd.h> +#endif +]], [[void *x=memfd_create]])], + [AC_DEFINE(HAVE_MEMFD_CREATE, 1, Define if you have the 'memfd_create' function.) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) +]) + # On some systems (eg. FreeBSD 5), we would find a definition of the # functions ctermid_r, setgroups in the library, but no prototype # (e.g. because we use _XOPEN_SOURCE). See whether we can take their |