Re: psql timing patch broke msvc build

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: psql timing patch broke msvc build
Date: 2006-12-18 14:18:19
Message-ID: 4586A32B.6080504@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message ohp 2006-12-18 14:42:29 Re: unixware and --with-ldap
Previous Message Magnus Hagander 2006-12-18 12:12:57 psql timing patch broke msvc build