aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-07-01 11:24:17 +0000
committerPedro Alves <palves@redhat.com>2013-07-01 11:24:17 +0000
commite655c1a2f59367d66f81e446f39b84e9eeee1465 (patch)
tree4c75f9a3906cdc02983cb69d753acbbf1a410c38 /gdb/configure.ac
parent50dd979345279716cd38d11aa3b175f09b8adbdd (diff)
downloadgdb-e655c1a2f59367d66f81e446f39b84e9eeee1465.zip
gdb-e655c1a2f59367d66f81e446f39b84e9eeee1465.tar.gz
gdb-e655c1a2f59367d66f81e446f39b84e9eeee1465.tar.bz2
Reimplement DJGPP's .gdbinit -> gdb.ini renaming.
This simplifies the .gdbinit filename selection logic. We have a GDBINIT_FILENAME define that supposedly configurations would override, but none do so. Instead, the only configuration that wants a different file name instead of ".gdbinit", djgpp, does a strcpy over the gdbinit global array. This means the array needs to be sized, and the code that does that is doing the usual 'PATH_MAX/FILENAME_MAX/fallback constant/etc.' mess. Instead of all that, it's much simpler to have configure specificy the .gdbinit filename. As bonus, we can then make the "gdbinit" global array const. gdb/ 2013-07-01 Pedro Alves <palves@redhat.com> * configure.ac (GDBINIT): Define, depending on host. * go32-nat.c (init_go32_ops): Don't override gdbinit here. * top.c (PATH_MAX): Delete fallback definition. (GDBINIT_FILENAME): Delete. (gdbinit): Reimplement as const char array set to the GDBINIT string constant. * top.h (gdbinit): Make const.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 46a97bd..e378bde 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1881,6 +1881,17 @@ then
[Define if you support the personality syscall.])
fi
+dnl Set the host's .gdbinit filename.
+case $host_os in
+ go32* | *djgpp*)
+ gdbinit=gdb.ini
+ ;;
+ *)
+ gdbinit=.gdbinit
+ ;;
+esac
+AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
+
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,