Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!

From: Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net>
To: pgsql-ports(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!
Date: 2000-06-25 15:31:53
Message-ID: Pine.LNX.4.10.10006250810570.10276-100000@excelsior.rkirkpat.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-ports

On Sun, 25 Jun 2000, Tom Lane wrote:

> Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> > Tamotsu Nakagawa has posted a fix for this to a local mail list in
> > Japan. Can someone comment on this? According to him, with the patch
> > now only the geometry test fails.
>
> > void
> > -abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
> > +abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char *tzn)
> > {
> > + time_t time = (time_t) _time;
> > #ifdef USE_POSIX_TIME
> > struct tm *tx;
>
> Hmm, that makes all kinds of sense if time_t is not the same size as
> AbsoluteTime --- which wouldn't surprise me at all on a 64-bit system.
> time_t *ought* to be 64-bits on such a machine. The casts in that
> routine,
> tx = localtime((time_t *) &time);
> are obviously bogus if so. Can anyone with an Alpha comment?

On Linux/Alpha, time_t is indeed 64 bit (i.e.
printf("%d\n",sizeof(time_t)) results in an '8'). If AbsoluteTime is only
32 bit, then that would definitely cause a problem.

> What surprises me more is the implication that this is the only place
> that makes such a bogus assumption about the size of time_t. I'd have
> guessed there are more places...

I will apply the above patch, check for other instances of time_t
size assumptions, and see what the result is this afternoon. TTYL.

---------------------------------------------------------------------------
| "For to me to live is Christ, and to die is gain." |
| --- Philippians 1:21 (KJV) |
---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |
---------------------------------------------------------------------------

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-06-25 16:40:27 Re: SQL_TEXT (Re: Re: Big 7.1 open items)
Previous Message Tatsuo Ishii 2000-06-25 12:21:27 Re: SQL_TEXT (Re: Re: Big 7.1 open items)

Browse pgsql-ports by date

  From Date Subject
Next Message Ryan Kirkpatrick 2000-06-25 22:08:55 Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!
Previous Message Adriaan Joubert 2000-06-25 07:17:52 Re: Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!