Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [patch] Use MAXPATHLEN, fix sunos build problem
Date: Sat, 19 Jan 2002 16:43:00 -0000	[thread overview]
Message-ID: <3C4A12B7.3040502@cygnus.com> (raw)

[-- 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

             reply	other threads:[~2002-01-20  0:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-19 16:43 Andrew Cagney [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C4A12B7.3040502@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox