pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Asif Naeem <anaeem.it@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: gettimeofday cause crash on Windows
Date: Sun, 22 Feb 2015 00:07:02 +0500
Message-ID: <CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com> (raw)
In-Reply-To: <CA+Tgmoa-ec6xc_W0o5uAeV+=Hk5uLxQCg1ofQxOgH4ktH60AXg@mail.gmail.com>
References: <CAEB4t-NQ4gSnFC8GfDgAeLx-rKm4-LwtUQMp-TdC6u_xRZdv1A@mail.gmail.com>
	<CAB7nPqTUVZSz0JxvQ6wJT3LKd5hrNTeC7Kv=97pC=rPFJFPhFg@mail.gmail.com>
	<20150212125412.GA9449@alap3.anarazel.de>
	<CAB7nPqRwBtN-AZhXL=gqLipiq-ASDg=cYREDPQrsLQ0VA93ZAA@mail.gmail.com>
	<20150212131316.GB9449@alap3.anarazel.de>
	<CAEB4t-M7Ap2z8mNrE264yxwT4-0oqJ3acuKETFhZQ6gOzRi8yQ@mail.gmail.com>
	<20150212151403.GJ3391@alvh.no-ip.org>
	<20150212175305.GD9449@alap3.anarazel.de>
	<CAEB4t-Pv46Mvx9FxjYw8CumdUFFbuqn1BAJfjc7RHudfNn-nJw@mail.gmail.com>
	<CAB7nPqSfCEyPZRk40JUKvvOX==WgiDwsP75VMFRT8eRKZ+ak_A@mail.gmail.com>
	<CA+TgmobKLsyLZnShmAdQ=d+pSDE0iU+nkKt9DxQdeReSky97BQ@mail.gmail.com>
	<CA+TgmoaCzvaFEFLHGH=o4vi90zZooh_NtOt-uEu_NAex7QVfdA@mail.gmail.com>
	<CA+Tgmoa-ec6xc_W0o5uAeV+=Hk5uLxQCg1ofQxOgH4ktH60AXg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Thank you Robert. I have built latest source code (master branch) with MSVC
2013, it seem working fine i.e.

Build succeeded.
>     0 Warning(s)
>     0 Error(s)


I will try to mimic currawong environment (MSVC 2008) to reproduce the
issue. Thanks.


On Sat, Feb 21, 2015 at 11:59 PM, Robert Haas <robertmhaas@gmail.com> wrote:

> On Sat, Feb 21, 2015 at 1:00 PM, Robert Haas <robertmhaas@gmail.com>
> wrote:
> > On Sat, Feb 21, 2015 at 12:20 PM, Robert Haas <robertmhaas@gmail.com>
> wrote:
> >> On Thu, Feb 12, 2015 at 9:59 PM, Michael Paquier
> >> <michael.paquier@gmail.com> wrote:
> >>> I looked at your patch and tested it with msvc and it looks good to me.
> >>
> >> Committed with cosmetic adjustments.  Hopefully one of you fine
> >> gentlemen will jump in to help if this turns out to break, because I
> >> don't do Windows.
> >
> > currawong doesn't like this:
> >
> > "c:\prog\bf\root\HEAD\pgsql.build\pgsql.sln" (default target) (1) ->
> > (postgres target) ->
> >   .\src\port\gettimeofday.c(53): error C2440: 'initializing' : cannot
> > convert from 'void (__cdecl *)(LPFILETIME)' to 'PgGetSystemTimeFn'
> >
> >
> > "c:\prog\bf\root\HEAD\pgsql.build\pgsql.sln" (default target) (1) ->
> > (misc\libpgport target) ->
> >   .\src\port\gettimeofday.c(53): error C2440: 'initializing' : cannot
> > convert from 'void (__cdecl *)(LPFILETIME)' to 'PgGetSystemTimeFn'
> >
> >     0 Warning(s)
> >     2 Error(s)
>
> I assume that the problem here must be whatever secret sauce WINAPI
> pours on the declaration.  PgSystemTimeFn is declared like this:
>
> typedef VOID (WINAPI *PgGetSystemTimeFn)(LPFILETIME);
>
> ...and the function we're trying to assign to a variable of that type
> is declared like this:
>
> static void init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
>
> Either "void" does not mean the same thing as "VOID", which would be
> exceedingly evil, or the WINAPI in there matters, which is still evil,
> but somewhat more understandable.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

view thread (16+ messages)  latest in thread

Message-ID: <CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com>
Permalink:  ../CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com/
Also on:    postgresql.org/message-id/CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: anaeem.it@gmail.com, robertmhaas@gmail.com, michael.paquier@gmail.com, andres@2ndquadrant.com, alvherre@2ndquadrant.com
  Subject: Re: gettimeofday cause crash on Windows
  In-Reply-To: <CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com>
  References: <CAEB4t-NQ4gSnFC8GfDgAeLx-rKm4-LwtUQMp-TdC6u_xRZdv1A@mail.gmail.com> <CAB7nPqTUVZSz0JxvQ6wJT3LKd5hrNTeC7Kv=97pC=rPFJFPhFg@mail.gmail.com> <20150212125412.GA9449@alap3.anarazel.de> <CAB7nPqRwBtN-AZhXL=gqLipiq-ASDg=cYREDPQrsLQ0VA93ZAA@mail.gmail.com> <20150212131316.GB9449@alap3.anarazel.de> <CAEB4t-M7Ap2z8mNrE264yxwT4-0oqJ3acuKETFhZQ6gOzRi8yQ@mail.gmail.com> <20150212151403.GJ3391@alvh.no-ip.org> <20150212175305.GD9449@alap3.anarazel.de> <CAEB4t-Pv46Mvx9FxjYw8CumdUFFbuqn1BAJfjc7RHudfNn-nJw@mail.gmail.com> <CAB7nPqSfCEyPZRk40JUKvvOX==WgiDwsP75VMFRT8eRKZ+ak_A@mail.gmail.com> <CA+TgmobKLsyLZnShmAdQ=d+pSDE0iU+nkKt9DxQdeReSky97BQ@mail.gmail.com> <CA+TgmoaCzvaFEFLHGH=o4vi90zZooh_NtOt-uEu_NAex7QVfdA@mail.gmail.com> <CA+Tgmoa-ec6xc_W0o5uAeV+=Hk5uLxQCg1ofQxOgH4ktH60AXg@mail.gmail.com> <CAEB4t-MUFTXhVPXCVWJr3ddeXM1GecFeTthSyCtTEAvvHie22g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox