Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Add include needed for new

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add include needed for new
Date: 2006-10-08 18:14:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
Tom Lane wrote:
> momjian(at)postgresql(dot)org (Bruce Momjian) writes:
> > Add include needed for new getrusage() call.
> If that's actually needed, how did the code build before?  It's always
> included sys/resource.h, except possibly on machines without getrusage
> ... are there any?  I was thinking rusagestub was dead code, myself.

Uh, all I know is that it started failing yesterday.  The failure I got

	gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
	-fno-strict-aliasing -O1 -Wall -Wmissing-prototypes
	-Wmissing-declarations -Wpointer-arith -Wcast-align
	-I../../../src/include -I/usr/local/include/readline
	-I/usr/contrib/include -DWIN32_STACK_RLIMIT=4194304  -c -o postgres.o
	In file included from postgres.c:31:
	/usr/include/sys/resource.h:63: field `ru_utime' has incomplete type
	/usr/include/sys/resource.h:64: field `ru_stime' has incomplete type
	gmake: *** [postgres.o] Error 1

and resource.h has:

	struct  rusage {
	    struct timeval ru_utime;    /* user time used */
	    struct timeval ru_stime;    /* system time used */

so it is timeval it wanted. But I have:


For me, 'struct timeval' is coming in via #include "libpq/libpq.h", but
of course that is _after_ the inclusion of resource.h.  Not sure where
you see that sys/resource.h was always there.  Looking at the CVS diffs
I see it added only in the past day.

  Bruce Momjian   bruce(at)momjian(dot)us

  + If your life is a hard drive, Christ can be your backup. +

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2006-10-08 18:29:25
Subject: Re: Use non-deprecated APIs for dynloader/darwin.c
Previous:From: Bruce MomjianDate: 2006-10-08 18:03:55
Subject: Re: The improvement for psql of 8.2beta1 not

pgsql-committers by date

Next:From: Bruce MomjianDate: 2006-10-08 18:15:53
Subject: pgsql: In release notes, mention that multi-line history saving does not
Previous:From: Tom LaneDate: 2006-10-08 17:57:31
Subject: Re: [COMMITTERS] pgsql: Add include needed for new getrusage() call.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group