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

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 22:08:55
Message-ID: Pine.LNX.4.10.10006251602030.2523-100000@excelsior.rkirkpat.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-ports
> > >  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;
> > 

	Ok, the above patch does indeed solve the problem. And this
appears to be the only place AbsoluteTime needs to be copied to a time_t
variable. I can't find any other casts of AbsoluteTime to time_t, and
with this patch applied all regression tests pass just fine (save for
geometry of course with its standard off by one in nth decimal place
difference).
	Additionally, I do not see how this patch could break other
platforms. At worst, it is a minor slow down that might even be optimized
out by some compiliers when they see that sizeof(AbsoluteTime) ==
sizeof(time_t). I will defer to the core developers on how you want to
apply this patch to the source tree (i.e. with #ifdef alpha && linux or as
above). Though probably best to add a bit of a comment beside it so
someone does not remove it later thinking they are "optimizing" the code.
:)
	At this point, Linux/Alpha should actually run out of the box! Let
me know when this patch is applied (in what ever form it ends up as) and I
will download a new snapshot and test it. 
	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

pgsql-ports by date

Next:From: Peter EisentrautDate: 2000-06-26 01:41:12
Subject: .exe extension on Windows
Previous:From: Ryan KirkpatrickDate: 2000-06-25 15:31:53
Subject: Re: [HACKERS] Re: Call for port testing on fmgr changes -- Results!

pgsql-hackers by date

Next:From: Oliver ElphickDate: 2000-06-25 22:26:16
Subject: TRUNCATE violates Referential Integrity
Previous:From: Denis PerchineDate: 2000-06-25 20:48:40
Subject: Maximum len of data fit into the tuple

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