Re: [PATCH] Add use of asprintf()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add use of asprintf()
Date: 2013-10-14 10:08:10
Message-ID: CAApHDvp_4=RRQJ=jDYWO+mrk1QVbTR7AAxFxG+emGgstDMegcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 14, 2013 at 9:45 PM, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> On Sat, Oct 12, 2013 at 2:58 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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.
>>
>>
>
> http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5b6d08cd2992922b667564a49f19580f11676050
>
> 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(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-10-14 11:41:14 Re: dynamic shared memory
Previous Message mohsen soodkhah mohammadi 2013-10-14 09:07:56 using testlo example of postgres source code