From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4153 invoked from network); 7 Oct 2004 15:27:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Oct 2004 15:27:07 -0000 Received: (qmail 33008 invoked from network); 7 Oct 2004 15:26:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Oct 2004 15:26:58 -0000 Received: (qmail 507 invoked by alias); 7 Oct 2004 15:26:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20465 Received: (qmail 493 invoked from network); 7 Oct 2004 15:26:42 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Oct 2004 15:26:42 -0000 Received: (qmail 32215 invoked from network); 7 Oct 2004 15:25:43 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 7 Oct 2004 15:25:42 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i97FPdPC087633; Thu, 7 Oct 2004 10:25:39 -0500 (CDT) (envelope-from dan) Date: Thu, 7 Oct 2004 10:25:39 -0500 From: Dan Nelson To: Peter Stephenson Cc: zsh-workers@sunsite.dk Subject: Re: bug with for and time Message-ID: <20041007152539.GA27081@dan.emsphone.com> References: <41616CDC.8020701@codesourcery.com> <200410041610.i94GAl92005952@news01.csr.com> <20041005113848.6f3715bd@buddha.localdomain.de> <20041005181820.GC30419@dan.emsphone.com> <20041006134818.089f5218@buddha.localdomain.de> <200410061706.i96H6LTO010315@news01.csr.com> <20041006175328.GB87634@dan.emsphone.com> <200410070937.i979bRaK027278@news01.csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410070937.i979bRaK027278@news01.csr.com> X-OS: FreeBSD 5.3-BETA7 X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 In the last episode (Oct 07), Peter Stephenson said: > I can vaguely remember that the getrusage() fields which didn't > correspond to times were dropped when we switched to autoconf, simply > because it became hard to test for all the fields. I didn't notice > getrusage() disappearing entirely then, but it certainly must have at > some point. I did some mailinglist searches, and back in 1999, workers-2526 says that getrusage was removed because it wasn't POSIX and the autoconf test was too complex. It is now, though, and was in SUS as far back as 1997. Unfortunately, only two struct members are defined: struct timeval ru_utime User time used. struct timeval ru_stime System time used. Fortunately, the remaining members defined by AIX, FreeBSD, Linux, Solaris, and Tru64 are identical. Solaris doesn't fill in ru_ixrss or ru_isrss (%X and %D), but they are in the struct. Testing for each member individually if you wanted to wouldn't be hard, anyway. One AC_CHECK_MEMBERS call with 14 arguments is all that's needed, plus the appropriate #if defined checks around each resource in the TIMEFMT expansion code. -- Dan Nelson dnelson@allantgroup.com