* 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* Re: RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5 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 1 sibling, 0 replies; 3+ messages in thread From: Andrew Cagney @ 2002-02-20 7:46 UTC (permalink / raw) To: rbrown64; +Cc: 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 Jason Thorp pointed out similar issues with the code. We can't define PATH_MAX since that would polute the system name space (cf the true/false problem). However, a namespace proof GDB_PATH_MAX might just do the trick. Getting it via configury could be tricky though - it needs to be a compile time, rather than runtime, test. Hmm, perhaphs autoconf has already solved this problem? Anyway, yes ok to the change. Andrew ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5 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 1 sibling, 0 replies; 3+ messages in thread From: Andrew Cagney @ 2002-02-20 7:47 UTC (permalink / raw) To: rbrown64; +Cc: gdb-patches PS: Feel free to add yourself to the MAINTAINERS file under write-after-approval as a separate, obvious fix, patch. Andrew ^ 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