From a156a290642281359c8dc0c949fdd942826455a1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 20 Jul 2009 15:24:55 +0000 Subject: [PATCH] fix gdbtui build errors when pipe() is not available (e.g. mingw targets) * configure.ac (AC_CHECK_FUNCS): Check for pipe. * config.in, configure: Regenerate. * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE. --- gdb/ChangeLog | 6 ++++++ gdb/config.in | 3 +++ gdb/configure | 2 +- gdb/configure.ac | 2 +- gdb/tui/tui-io.c | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 161c27cd169..28a37db1e31 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-07-20 Mike Frysinger + + * configure.ac (AC_CHECK_FUNCS): Check for pipe. + * config.in, configure: Regenerate. + * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE. + 2009-07-20 Pedro Alves * gnu-nat.c: Include "inf-child.h". diff --git a/gdb/config.in b/gdb/config.in index d4d44692170..f2d56a0adae 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -279,6 +279,9 @@ /* Define if you support the personality syscall. */ #undef HAVE_PERSONALITY +/* Define to 1 if you have the `pipe' function. */ +#undef HAVE_PIPE + /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL diff --git a/gdb/configure b/gdb/configure index 13b30f850d4..30409c89dd5 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15868,7 +15868,7 @@ fi for ac_func in canonicalize_file_name realpath getrusage getuid \ - getgid poll pread64 sbrk setpgid setpgrp setsid \ + getgid pipe poll pread64 sbrk setpgid setpgrp setsid \ sigaction sigprocmask sigsetmask socketpair syscall \ ttrace wborder setlocale iconvlist libiconvlist btowc do diff --git a/gdb/configure.ac b/gdb/configure.ac index 1d91647e34a..77f8436235a 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -785,7 +785,7 @@ AC_FUNC_ALLOCA AC_FUNC_MMAP AC_FUNC_VFORK AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid \ - getgid poll pread64 sbrk setpgid setpgrp setsid \ + getgid pipe poll pread64 sbrk setpgid setpgrp setsid \ sigaction sigprocmask sigsetmask socketpair syscall \ ttrace wborder setlocale iconvlist libiconvlist btowc]) AM_LANGINFO_CODESET diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 56e9dbafecb..a597f372e0c 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -113,7 +113,9 @@ key_is_command_char (int ch) #undef TUI_USE_PIPE_FOR_READLINE. */ /* For gdb 5.3, prefer to continue the pipe hack as a backup wheel. */ +#ifdef HAVE_PIPE #define TUI_USE_PIPE_FOR_READLINE +#endif /* #undef TUI_USE_PIPE_FOR_READLINE */ /* TUI output files. */ -- 2.30.2