diff options
author | Riku Voipio <riku.voipio@iki.fi> | 2009-05-05 12:10:04 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2009-06-16 16:56:29 +0300 |
commit | 099d6b0fe9e6d5855403d2d0a8ae800b7bdb24a7 (patch) | |
tree | 5261676792ad13d698cadf660227bbaed8679a31 /configure | |
parent | 4b627a236ada4c097cf8cb682a7ae393fb4a4e10 (diff) | |
download | qemu-099d6b0fe9e6d5855403d2d0a8ae800b7bdb24a7.tar.gz qemu-099d6b0fe9e6d5855403d2d0a8ae800b7bdb24a7.tar.bz2 qemu-099d6b0fe9e6d5855403d2d0a8ae800b7bdb24a7.zip |
linux-user: implement pipe2 [v3]
implement pipe2 syscall.
[v2] fix do_pipe on mips and sh4
[v3] use pipe2 to ensure atomicity, but only when it is available.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1304,6 +1304,24 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then utimens=yes fi +# check if pipe2 is there +pipe2=no +cat > $TMPC << EOF +#define _GNU_SOURCE +#include <unistd.h> +#include <fcntl.h> + +int main(void) +{ + int pipefd[2]; + pipe2(pipefd, O_CLOEXEC); + return 0; +} +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + pipe2=yes +fi + # Check if tools are available to build documentation. if test "$build_docs" = "yes" -a \( ! -x "`which texi2html 2>/dev/null`" -o ! -x "`which pod2man 2>/dev/null`" \) ; then build_docs="no" @@ -1704,6 +1722,9 @@ fi if test "$utimens" = "yes" ; then echo "#define CONFIG_UTIMENSAT 1" >> $config_h fi +if test "$pipe2" = "yes" ; then + echo "#define CONFIG_PIPE2 1" >> $config_h +fi if test "$inotify" = "yes" ; then echo "#define CONFIG_INOTIFY 1" >> $config_h fi |