Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Use MAXPATHLEN, fix sunos build problem
@ 2002-01-19 16:43 Andrew Cagney
  2002-01-19 17:39 ` Jason R Thorpe
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-01-19 16:43 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 81 bytes --]

FYI,

I've checked in the attached to fix a build problem on SunOS 4.x.

	Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1007 bytes --]

2002-01-19  Andrew Cagney  <ac131313@redhat.com>

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

Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.55
diff -p -r1.55 utils.c
*** utils.c	2002/01/17 23:33:38	1.55
--- utils.c	2002/01/20 00:41:53
***************
*** 54,59 ****
--- 54,61 ----
  
  #include "inferior.h" /* for signed_pointer_to_address */
  
+ #include <sys/param.h>		/* For MAXPATHLEN */
+ 
  #include <readline/readline.h>
  
  #ifdef USE_MMALLOC
*************** char *
*** 2538,2544 ****
--- 2540,2552 ----
  gdb_realpath (const char *filename)
  {
  #ifdef HAVE_REALPATH
+ #if defined (PATH_MAX)
    char buf[PATH_MAX];
+ #elif defined (MAXPATHLEN)
+   char buf[MAXPATHLEN];
+ #else
+ #error "Neither PATH_MAX nor MAXPATHLEN defined"
+ #endif
    char *rp = realpath (filename, buf);
    return xstrdup (rp ? rp : filename);
  #else

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

end of thread, other threads:[~2002-02-10 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-19 16:43 [patch] Use MAXPATHLEN, fix sunos build problem Andrew Cagney
2002-01-19 17:39 ` Jason R Thorpe
2002-01-19 18:56   ` Andrew Cagney
2002-01-19 19:29     ` Jason R Thorpe
2002-02-10  8:39       ` Andrew Cagney

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