2002-02-27 Rodney Brown <rbrown64@csc.com.au>
authorRodney Brown <rbrown64@csc.com.au>
Wed, 27 Feb 2002 12:29:43 +0000 (12:29 +0000)
committerRodney Brown <rbrown64@csc.com.au>
Wed, 27 Feb 2002 12:29:43 +0000 (12:29 +0000)
      * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.

gdb/ChangeLog
gdb/utils.c

index e77bc1a..bb41c60 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-27  Rodney Brown  <rbrown64@csc.com.au>
+
+      * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.
+
 2002-02-27  Daniel Jacobowitz  <drow@mvista.com>
 
        * gdbserver/acconfig.h: New file.
index 5d64083..af1a103 100644 (file)
@@ -2533,6 +2533,8 @@ gdb_realpath (const char *filename)
   char buf[PATH_MAX];
 #elif defined (MAXPATHLEN)
   char buf[MAXPATHLEN];
+#elif defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA)
+  char *buf = alloca ((size_t)pathconf ("/", _PC_PATH_MAX));
 #else
 #error "Neither PATH_MAX nor MAXPATHLEN defined"
 #endif