aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2005-05-12 21:23:17 +0000
committerEli Zaretskii <eliz@gnu.org>2005-05-12 21:23:17 +0000
commiteaae39195e3ebc6d1bd7d9d5750552184c32dc1f (patch)
tree7313fe0aa7ee49de3a376f5f7e7241e830ead407 /gdb/top.c
parente0ecbda10dcbd7c79487d31d70ca88658be05e30 (diff)
downloadgdb-eaae39195e3ebc6d1bd7d9d5750552184c32dc1f.zip
gdb-eaae39195e3ebc6d1bd7d9d5750552184c32dc1f.tar.gz
gdb-eaae39195e3ebc6d1bd7d9d5750552184c32dc1f.tar.bz2
* Makefile.in (go32-nat.o): Add $(top_h) to prerequisites.
* go32-nat.c: Include top.h. Update copyright years. (init_go32_ops): Override the default value of gdbinit[] with "gdb.ini". * cli/cli-cmds.c (init_cli_cmds): Use gdbinit[] instead of a compile-time literal string GDBINIT_FILENAME. * top.c (PATH_MAX): Define if not defined. (gdbinit): Declare with a constant size PATH_MAX. * config/i386/go32.mh (XM_FILE): Remove. * config/i386/xm-go32.h: Remove file.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/top.c b/gdb/top.c
index b56a3cf..1bd22e3 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -71,10 +71,18 @@
/* Initialization file name for gdb. This is overridden in some configs. */
+#ifndef PATH_MAX
+# ifdef FILENAME_MAX
+# define PATH_MAX FILENAME_MAX
+# else
+# define PATH_MAX 512
+# endif
+#endif
+
#ifndef GDBINIT_FILENAME
#define GDBINIT_FILENAME ".gdbinit"
#endif
-char gdbinit[] = GDBINIT_FILENAME;
+char gdbinit[PATH_MAX + 1] = GDBINIT_FILENAME;
int inhibit_gdbinit = 0;