This is the mail archive of the gdb-patches@sources.redhat.com 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]

RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5


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


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