GETTIMEOFDAY_1ARG change - Mailing list pgsql-hackers

From Ulrich Neumann
Subject GETTIMEOFDAY_1ARG change
Date
Msg-id a1eeu5$1koe$1@news.tht.net
Whole thread Raw
List pgsql-hackers
Hello together,

i would like to add the following changes to the code so that postgres
doesn�t have any problems if we compile it on machines that have
gettimeofday with 1 ARG and therefore don�t need 'struct timezone xxx'
I�m working on a System where timezone is defined in another way.

1. nabstime.c
Datum
timeofday(PG_FUNCTION_ARGS)
{
...
#ifndef GETTIMEOFDAY_1ARGstruct timezone tpz;
#endif
...
}

2.postgres.c
ResetUsage(void)
{
#ifndef GETTIMEOFDAY_1ARGstruct timezone tz;
#endif
getrusage(RUSAGE_SELF, &Save_r);gettimeofday(&Save_t, &tz);ResetBufferUsage();
/*      ResetTupleCount(); */
}


void
ShowUsage(void)
{
...
#ifndef GETTIMEOFDAY_1ARGstruct timezone tz;
#endif
...
}

3. postmaster.c
static int
ServerLoop(void)
{
...
#ifndef GETTIMEOFDAY_1ARGstruct timezone tz;
#endif
...
}

4. vacuum.c
void
vac_init_rusage(VacRUsage *ru0)
{
#ifndef GETTIMEOFDAY_1ARGstruct timezone tz;
#endif
getrusage(RUSAGE_SELF, &ru0->ru);gettimeofday(&ru0->tv, &tz);
}


Thanks

Ulrich Neumann



pgsql-hackers by date:

Previous
From: Holger Krug
Date:
Subject: Re: ON ERROR triggers
Next
From: Ulrich Neumann
Date:
Subject: (void *) with shmat