Re: gettimeofday cause crash on Windows - Mailing list pgsql-bugs

From Tom Lane
Subject Re: gettimeofday cause crash on Windows
Date
Msg-id 18265.1423762964@sss.pgh.pa.us
Whole thread Raw
In response to Re: gettimeofday cause crash on Windows  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I wonder if it would work to set the function initially to the
> initialization function, so that on the first call the Precise version,
> if it exists, is detected (or the stock version otherwise) and set as
> the function to call for later -- without requiring a jump in every
> subsequent execution of gettimeofday(), of course.  The initialization
> function itself would have to return the value returned by
> GetSystemTimePreciseAsFileTime, of course.

+1.  The idea that we are going to alter the calling requirements around a
POSIX-standard function is utterly horrible.  It will break third-party
code, very probably.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: gettimeofday cause crash on Windows
Next
From: Andres Freund
Date:
Subject: Re: gettimeofday cause crash on Windows