git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 332f02f)
Try to fix busted gettimeofday() code.
2015年2月21日 22:15:13 +0000 (17:15 -0500)
2015年2月21日 22:15:13 +0000 (17:15 -0500)
Per buildfarm, we have to match the _stdcall property of the system
functions.


diff --git a/src/port/gettimeofday.c b/src/port/gettimeofday.c
index c700d997c9ccf8842da6e7076bdb3668af706fb0..3c602385188359c3cf9a6df37c417724142b4bbc 100644 (file)
--- a/src/port/gettimeofday.c
+++ b/src/port/gettimeofday.c
@@ -30,8 +30,6 @@
#include <sys/time.h>
-static void init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
-
/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */
static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
@@ -49,6 +47,9 @@ static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
*/
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 */
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
* GetSystemTimeAsFileTime.
*/
-static void
+static void WINAPI
init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
{
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /