diff options
author | vibisreenivasan | 2009-05-16 15:02:41 +0200 |
---|---|---|
committer | Riku Voipio | 2009-06-16 15:58:07 +0200 |
commit | 3ce34dfb42e02225f2688ef8ad4b9664a4c98e46 (patch) | |
tree | 8d86132965ed6f5d5a7bc8a99e21c717c87c5cab /configure | |
parent | linux-user: implement pipe2 [v3] (diff) | |
download | qemu-3ce34dfb42e02225f2688ef8ad4b9664a4c98e46.tar.gz qemu-3ce34dfb42e02225f2688ef8ad4b9664a4c98e46.tar.xz qemu-3ce34dfb42e02225f2688ef8ad4b9664a4c98e46.zip |
linux-user: add tee, splice and vmsplice
Add support for tee, splice and vmsplice.
Originally from: vibi sreenivasan <vibi_sreenivasan@cms.com>
Riku: squashed patches together, added a test to configure
and removed compliler warning by picking up correct type for
splice param
Signed-off-by: vibisreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -1322,6 +1322,26 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then pipe2=yes fi +# check if tee/splice is there. vmsplice was added same time. +splice=no +cat > $TMPC << EOF +#define _GNU_SOURCE +#include <unistd.h> +#include <fcntl.h> +#include <limits.h> + +int main(void) +{ + int len, fd; + len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); + splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); + return 0; +} +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + splice=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" @@ -1725,6 +1745,9 @@ fi if test "$pipe2" = "yes" ; then echo "#define CONFIG_PIPE2 1" >> $config_h fi +if test "$splice" = "yes" ; then + echo "#define CONFIG_SPLICE 1" >> $config_h +fi if test "$inotify" = "yes" ; then echo "#define CONFIG_INOTIFY 1" >> $config_h fi |