Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5
@ 2002-02-20  0:39 rbrown64
  2002-02-20  7:46 ` Andrew Cagney
  2002-02-20  7:47 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: rbrown64 @ 2002-02-20  0:39 UTC (permalink / raw)
  To: gdb-patches

This permits the 0211 snapshot to link & break in main on
i586-pc-sco3.2v5.0.2  (debugging itself).
Possibly this should be done with the configury and set a PATH_MAX
value in config.h using

$ getconf PATH_MAX /
1024

2002-02-20  Rodney Brown  <rbrown64@csc.com.au>

      * utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.

*** utils.c.orig Sun Feb 10 14:08:42 2002
--- utils.c Wed Feb 20 19:30:16 2002
***************
*** 2522,2527 ****
    char buf[PATH_MAX];
  #elif defined (MAXPATHLEN)
    char buf[MAXPATHLEN];
  #else
  #error "Neither PATH_MAX nor MAXPATHLEN defined"
  #endif
--- 2522,2529 ----
    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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-20 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20  0:39 RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5 rbrown64
2002-02-20  7:46 ` Andrew Cagney
2002-02-20  7:47 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox