From: | Ulrich Neumann<u_neumann(at)gne(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | GETTIMEOFDAY_1ARG change |
Date: | 2002-01-08 08:42:00 |
Message-ID: | a1eeu5$1koe$1@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello together,
i would like to add the following changes to the code so that postgres
doesnt have any problems if we compile it on machines that have
gettimeofday with 1 ARG and therefore dont need 'struct timezone xxx'
Im working on a System where timezone is defined in another way.
1. nabstime.c
Datum
timeofday(PG_FUNCTION_ARGS)
{
...
#ifndef GETTIMEOFDAY_1ARG
struct timezone tpz;
#endif
...
}
2.postgres.c
ResetUsage(void)
{
#ifndef GETTIMEOFDAY_1ARG
struct timezone tz;
#endif
getrusage(RUSAGE_SELF, &Save_r);
gettimeofday(&Save_t, &tz);
ResetBufferUsage();
/* ResetTupleCount(); */
}
void
ShowUsage(void)
{
...
#ifndef GETTIMEOFDAY_1ARG
struct timezone tz;
#endif
...
}
3. postmaster.c
static int
ServerLoop(void)
{
...
#ifndef GETTIMEOFDAY_1ARG
struct timezone tz;
#endif
...
}
4. vacuum.c
void
vac_init_rusage(VacRUsage *ru0)
{
#ifndef GETTIMEOFDAY_1ARG
struct timezone tz;
#endif
getrusage(RUSAGE_SELF, &ru0->ru);
gettimeofday(&ru0->tv, &tz);
}
Thanks
Ulrich Neumann
From | Date | Subject | |
---|---|---|---|
Next Message | Ulrich Neumann | 2002-01-08 08:43:00 | (void *) with shmat |
Previous Message | Holger Krug | 2002-01-08 07:59:15 | Re: ON ERROR triggers |