From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7660 invoked by alias); 20 Jan 2002 00:43:39 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7628 invoked from network); 20 Jan 2002 00:43:38 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sources.redhat.com with SMTP; 20 Jan 2002 00:43:38 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 0F4AA3F09 for ; Sat, 19 Jan 2002 19:43:35 -0500 (EST) Message-ID: <3C4A12B7.3040502@cygnus.com> Date: Sat, 19 Jan 2002 16:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch] Use MAXPATHLEN, fix sunos build problem Content-Type: multipart/mixed; boundary="------------010001000700010609040300" X-SW-Source: 2002-01/txt/msg00549.txt.bz2 This is a multi-part message in MIME format. --------------010001000700010609040300 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 81 FYI, I've checked in the attached to fix a build problem on SunOS 4.x. Andrew --------------010001000700010609040300 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1007 2002-01-19 Andrew Cagney * utils.c: Include 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 /* For MAXPATHLEN */ + #include #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 --------------010001000700010609040300--