Re: [PATCH] Add use of asprintf() - Mailing list pgsql-hackers

From David Rowley
Subject Re: [PATCH] Add use of asprintf()
Date
Msg-id CAApHDvp_4=RRQJ=jDYWO+mrk1QVbTR7AAxFxG+emGgstDMegcA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add use of asprintf()  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: [PATCH] Add use of asprintf()  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Mon, Oct 14, 2013 at 9:45 PM, David Rowley <dgrowleyml@gmail.com> wrote:
On Sat, Oct 12, 2013 at 2:58 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Peter Eisentraut escribió:
> On Tue, 2013-09-17 at 15:13 +0500, Asif Naeem wrote:
> > I did put some time review the patch, please see my findings below
> > i.e.
>
> Updated patch for this.

Looks good to me.



This commit is has broken the visual studios windows build. I'm looking into it now

Looks like something like:

#ifndef WIN32
#define HAVE_VA_COPY 1
#endif

would need to be added to asprintf.c, but also some work needs to be done with mcxt.c as it uses va_copy unconditionally. Perhaps just defining a macro for va_copy would be better for windows. I was not quite sure the best header file for such a macro so I did not write a patch to fix it.

Regards

David Rowley

 
 
31 errors similar to:

"D:\Postgres\c\pgsql.sln" (default target) (1) ->
"D:\Postgres\c\pg_archivecleanup.vcxproj" (default target) (56) ->
  libpgport.lib(asprintf.obj) : error LNK2019: unresolved external symbol _va_copy referenced in function _vasprintf [D:\Postgres\c\pg_archivecleanup.vcxproj]
  .\Release\pg_archivecleanup\pg_archivecleanup.exe : fatal error LNK1120: 1 unresolved externals [D:\Postgres\c\pg_archivecleanup.vcxproj]

Regards

David Rowley


--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


pgsql-hackers by date:

Previous
From: mohsen soodkhah mohammadi
Date:
Subject: using testlo example of postgres source code
Next
From: Robert Haas
Date:
Subject: Re: dynamic shared memory