mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Try to fix busted gettimeofday() code.
Per buildfarm, we have to match the _stdcall property of the system functions.
This commit is contained in:
parent
332f02f88b
commit
e9fd5545de
@ -30,8 +30,6 @@
|
|||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
static void init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
|
|
||||||
|
|
||||||
/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */
|
/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */
|
||||||
static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
|
static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
|
||||||
|
|
||||||
@ -49,6 +47,9 @@ static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
|
|||||||
*/
|
*/
|
||||||
typedef VOID (WINAPI *PgGetSystemTimeFn)(LPFILETIME);
|
typedef VOID (WINAPI *PgGetSystemTimeFn)(LPFILETIME);
|
||||||
|
|
||||||
|
/* One-time initializer function, must match that signature. */
|
||||||
|
static void WINAPI init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
|
||||||
|
|
||||||
/* Storage for the function we pick at runtime */
|
/* Storage for the function we pick at runtime */
|
||||||
static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday;
|
static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday;
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday;
|
|||||||
* is available and if so, plan to use it; if not, fall back to
|
* is available and if so, plan to use it; if not, fall back to
|
||||||
* GetSystemTimeAsFileTime.
|
* GetSystemTimeAsFileTime.
|
||||||
*/
|
*/
|
||||||
static void
|
static void WINAPI
|
||||||
init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
|
init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user