On 2015-03-30 14:27:20 +0900, Michael Paquier wrote:
> INT64_MODIFIER is "l" on OSX, causing this warning. Perhaps there is
> something better to do instead of casting blindly to int64. Thoughts?
> --
> Michael
> diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
> index 7da5c41..a15c875 100644
> --- a/src/bin/pg_dump/pg_dump.c
> +++ b/src/bin/pg_dump/pg_dump.c
> @@ -14545,8 +14545,8 @@ dumpSequence(Archive *fout, DumpOptions *dopt, TableInfo *tbinfo)
> /* Make sure we are in proper schema */
> selectSourceSchema(fout, tbinfo->dobj.namespace->dobj.name);
>
> - snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
> - snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
> + snprintf(bufm, sizeof(bufm), INT64_FORMAT, (int64) SEQ_MINVALUE);
> + snprintf(bufx, sizeof(bufx), INT64_FORMAT, (int64) SEQ_MAXVALUE);
>
I think that's entirely the wrong approach. ISTM that, independent from
this patch, INT64CONST/HAVE_LL_CONSTANTS are wrong for your
environment. The HAVE_LL_CONSTANTS test is probably too simplistic.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services