psql timing patch broke msvc build

Started by Magnus Haganderalmost 20 years ago2 messagespatches
Jump to latest
#1Magnus Hagander
magnus@hagander.net

This patch
(http://archives.postgresql.org/pgsql-committers/2006-12/msg00133.php)
broke the win32 MSVC build by reordering the definition vs includes.
Attached patch fixes this. (Most likely this didn't show up on MingW
because it uses an ancient version of the system headers)

//Magnus

Attachments:

psql_timing_win32.patchtext/plain; charset=us-asciiDownload+2-2
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Magnus Hagander (#1)
Re: psql timing patch broke msvc build

Apologies - fixed now.

cheers

andrew

Magnus Hagander wrote:

Show quoted text

This patch
(http://archives.postgresql.org/pgsql-committers/2006-12/msg00133.php)
broke the win32 MSVC build by reordering the definition vs includes.
Attached patch fixes this. (Most likely this didn't show up on MingW
because it uses an ancient version of the system headers)

//Magnus

------------------------------------------------------------------------

Index: src/bin/psql/common.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/common.h,v
retrieving revision 1.52
diff -c -r1.52 common.h
*** src/bin/psql/common.h	16 Dec 2006 00:38:43 -0000	1.52
--- src/bin/psql/common.h	18 Dec 2006 12:06:54 -0000
***************
*** 79,89 ****
((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0)
#else

- typedef struct _timeb TimevalStruct;
-
#include <sys/types.h>
#include <sys/timeb.h>

#define GETTIMEOFDAY(T) _ftime(T)
#define DIFF_MSEC(T, U) \
(((T)->time - (U)->time) * 1000.0 + \
--- 79,89 ----
((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0)
#else

#include <sys/types.h>
#include <sys/timeb.h>

+ typedef struct _timeb TimevalStruct;
+
#define GETTIMEOFDAY(T) _ftime(T)
#define DIFF_MSEC(T, U) \
(((T)->time - (U)->time) * 1000.0 + \

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq