aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-11-26 01:23:46 +0000
committerDaniel Jacobowitz <drow@false.org>2002-11-26 01:23:46 +0000
commiteb78484829c67075caaa4ac984dd8b50b5d750bc (patch)
tree5d1c675cdefdc0b97a2387453702bcb940af80f9 /gdb/configure.in
parentafbfa4076a55445d5e61f5c872b438d1ea997aeb (diff)
downloadgdb-eb78484829c67075caaa4ac984dd8b50b5d750bc.zip
gdb-eb78484829c67075caaa4ac984dd8b50b5d750bc.tar.gz
gdb-eb78484829c67075caaa4ac984dd8b50b5d750bc.tar.bz2
* acconfig.h (HAVE_PREAD64): Add.
* configure.in: Check for pread64. * config.in: Regenerated. * configure: Regenerated. * lin-lwp.c (lin_lwp_xfer_memory): Call linux_proc_xfer_memory. * linux-proc.c (linux_proc_xfer_memory): New function. * config/nm-linux.h (linux_proc_xfer_memory): Add prototype.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 4c2e063..f452dec 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -617,6 +617,23 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
+dnl linux-proc.c wants to use pread64, which may require special CFLAGS
+dnl -D_BSD_SOURCE is normally assumed but we have to specify it because of
+dnl -D_XOPEN_SOURCE=500.
+if test $host = $target; then
+ case $target in
+ *-linux*)
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+ AC_TRY_LINK([#include <unistd.h>],
+ [pread64 (0, NULL, 0, 0);],
+ [ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+ AC_DEFINE(HAVE_PREAD64)], [])
+ CFLAGS=$save_CFLAGS
+ ;;
+ esac
+fi
+
dnl The CLI cannot be disabled yet, but may be in the future
dnl Handle CLI sub-directory configury.