This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] GDB fails to compile GNU/Hurd, MAXPATHELEN/PATH_MAX issues.

The following will make compiling GDB fail on GNU/Hurd, as it
doesn't define the MAXPATHLEN and PATH_MAX values.

2002-01-19  Andrew Cagney  <>

        * utils.c: Include <sys/param.h> for MAXPATHLEN.
	(gdb_realpath): Use MAXPATHLEN when PATH_MAX is not defined.

And here is the patch to fix the problem noted above. I didn't bother
sending the regenerate parts of configure and as it would just
make a lot of noise.

2002-02-22  Alfred M. Szmidt <>

	* (AC_CHECK_FUNCS) Added test for canonicalize_file_name
        * Regenerated.
        * utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is defined
        use canonicalize_file_name.
RCS file: /cvs/src/src/gdb/,v
retrieving revision 1.80
diff -u -p -r1.80
---	2002/02/14 05:31:45	1.80
+++	2002/02/22 17:19:01
@@ -131,8 +131,8 @@ AC_HEADER_STAT
-AC_CHECK_FUNCS(bcopy btowc bzero isascii poll realpath sbrk setpgid setpgrp \
-	sigaction sigprocmask sigsetmask)
+AC_CHECK_FUNCS(bcopy btowc bzero canonicalize_file_name isascii poll
+	realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask )
 dnl AC_FUNC_SETPGRP does not work when cross compiling
Index: utils.c
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.64
diff -u -p -r1.64 utils.c
--- utils.c	2002/02/13 06:06:26	1.64
+++ utils.c	2002/02/22 17:19:02
@@ -2526,7 +2526,9 @@ string_to_core_addr (const char *my_stri
 char *
 gdb_realpath (const char *filename)
+  return canonicalize_file_name (filename);
+#elif defined (HAVE_REALPATH)
 #if defined (PATH_MAX)
   char buf[PATH_MAX];
 #elif defined (MAXPATHLEN)

Alfred M. Szmidt

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]