From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22653 invoked by alias); 20 Feb 2002 08:39:44 -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 22486 invoked from network); 20 Feb 2002 08:39:42 -0000 Received: from unknown (HELO sydmr01.au.aunz.csc.com) (20.139.1.26) by sources.redhat.com with SMTP; 20 Feb 2002 08:39:42 -0000 Received: from aus-syd11.int.csc.com.au (mailgw.int.csc.com.au [20.10.3.50] (may be forged)) by sydmr01.au.aunz.csc.com (Mirapoint) with ESMTP id AKX51664; Wed, 20 Feb 2002 20:04:11 +1100 (EST) Subject: RFA gdb/utils.c (gdb_realpath) fallback patch for sco3.2v5 To: gdb-patches@sources.redhat.com X-Mailer: Lotus Notes Release 5.0.4a July 24, 2000 Message-ID: From: rbrown64@csc.com.au Date: Wed, 20 Feb 2002 00:39:00 -0000 X-MIMETrack: Serialize by Router on AUS-SYD11/AUST/CSC(Release 5.0.9a |January 7, 2002) at 20-02-2002 19:42:18 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00522.txt.bz2 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 * 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