Re: [COMMITTERS] pgsql: Add include needed for new - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [COMMITTERS] pgsql: Add include needed for new
Date
Msg-id 200610082132.k98LWE521259@momjian.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add include needed for new getrusage() call.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > For me, 'struct timeval' is coming in via #include "libpq/libpq.h", but
> > of course that is _after_ the inclusion of resource.h.
> 
> Ah, that explains it.
> 
> > 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.
> 
> It was further down before.
> 
> There's still something pretty strange here, though, because AFAICS
> configure should have rejected sys/resource.h if it needs sys/time.h.

I did some research and it turns out the configure test for includes
uses the following source file, which includes <sys/stat.h>, which
itself includes <sys/time.h> on my BSD/OS machine, so that is why
configure has no problem finding resource.h usable.

---------------------------------------------------------------------------

/* confdefs.h.  */

#define PACKAGE_NAME "PostgreSQL"
#define PACKAGE_TARNAME "postgresql"
#define PACKAGE_VERSION "8.2beta1"
#define PACKAGE_STRING "PostgreSQL 8.2beta1"
#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
#define PG_VERSION "8.2beta1"
#define ENABLE_NLS 1
#define DEF_PGPORT 5432
#define DEF_PGPORT_STR "5432"
#define PG_VERSION_STR "PostgreSQL 8.2beta1 on i386-pc-bsdi4.3.1, compiled by GCC 2.95.3"
#define ENABLE_THREAD_SAFETY 1
#define PG_KRB_SRVNAM "postgres"
#define USE_SSL 1
#define PG_VERSION_NUM 80200
#define HAVE_LIBREADLINE 1
#define HAVE_LIBZ 1
#define HAVE_SPINLOCKS 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBSSL 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_UNISTD_H 1
#define HAVE_GETOPT_H 1
#define HAVE_IEEEFP_H 1
#define HAVE_PWD_H 1
#define HAVE_SYS_IPC_H 1
/* end confdefs.h.  */
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/resource.h>


--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Mark Wong
Date:
Subject: Re: continuing daily testing of dbt2 against postgresql
Next
From: Mark Wong
Date:
Subject: Re: continuing daily testing of dbt2 against postgresql