Re: psql timing patch broke msvc build - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: psql timing patch broke msvc build
Date
Msg-id 4586A32B.6080504@dunslane.net
Whole thread Raw
In response to psql timing patch broke msvc build  (Magnus Hagander <magnus@hagander.net>)
List pgsql-patches
Apologies - fixed now.

cheers

andrew

Magnus Hagander wrote:
> 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
>


pgsql-patches by date:

Previous
From: Magnus Hagander
Date:
Subject: psql timing patch broke msvc build
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] psql commandline conninfo