From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22094 invoked by alias); 31 Dec 2006 11:58:28 -0000 Received: (qmail 22081 invoked by uid 22791); 31 Dec 2006 11:58:27 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 31 Dec 2006 11:58:23 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8) with ESMTP id kBVBw9q6017170; Sun, 31 Dec 2006 12:58:10 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.13.8/8.13.8/Submit) id kBVBw8x6021147; Sun, 31 Dec 2006 12:58:08 +0100 (CET) Date: Sun, 31 Dec 2006 11:58:00 -0000 Message-Id: <200612311158.kBVBw8x6021147@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: eliz@gnu.org CC: nickrob@snap.net.nz, gdb-patches@sourceware.org In-reply-to: (message from Eli Zaretskii on Sun, 31 Dec 2006 06:21:59 +0200) Subject: Re: [PATCH] MI: new timing command References: <17814.10139.269708.848818@kahikatea.snap.net.nz> <17814.58031.865155.682869@kahikatea.snap.net.nz> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00397.txt.bz2 > Date: Sun, 31 Dec 2006 06:21:59 +0200 > From: Eli Zaretskii > > > From: Nick Roberts > > Date: Sun, 31 Dec 2006 11:05:35 +1300 > > Cc: gdb-patches@sourceware.org > > > > > > diff -c -p -r1.86 mi-main.c > > > > *** mi-main.c 17 Nov 2006 19:30:41 -0000 1.86 > > > > --- mi-main.c 30 Dec 2006 08:42:29 -0000 > > > > *************** > > > > *** 49,54 **** > > > > --- 49,55 ---- > > > > > > > > #include > > > > #include > > > > + #include > > > > > > Is sys/resource.h guaranteed to be available on all supported > > > platforms? If not, we need to add a configure-time test and enable > > > this code only under HAVE_GETRUSAGE or some such. > > > > mi-main.c already uses sys/time.h. Is sys/resource.h any less widely > > distributed? > > I think sys/time.h is much more wide-spread, but I might be wrong. I > raised the issue because sys/resource.h is relatively seldom used, so > it might be less portable. > > > Is there any way of finding out e.g online database? > > Sorry, I don't know. Anyone? The OpenBSD getrusage(2) manpage says that the getrusage() function call appeared in 4.2BSD. Seventh Edition Unix doesn't have it (but doesn't have either). HP-UX 10.20 and Solaris 2.6 both have it, so I'm pretty sure all the UNIX-like systems we support have it. But POSIX marks it as an XSI extension, so I think we should not rely on it.