Re: Warning compiling pg_dump (MinGW, Windows XP) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Warning compiling pg_dump (MinGW, Windows XP)
Date
Msg-id 19867.1295295106@sss.pgh.pa.us
Whole thread Raw
In response to Re: Warning compiling pg_dump (MinGW, Windows XP)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Warning compiling pg_dump (MinGW, Windows XP)  (Pavel Golub <pavel@microolap.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> 2011/1/13 Pavel Golub <pavel@microolap.com>:
>> pg_dump.c: In function 'dumpSequence':
>> pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
>> pg_dump.c:11449:2: warning: too many arguments for format

> It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
> wrong answer on your machine, though I'm not sure why.

That configure check tests whether snprintf produces the right result at
runtime.  It doesn't check whether the compiler will generate a warning
about it.  It looks to me like Pavel has a compiler that is out of sync
with his libc; which is a platform configuration mistake that he needs
to fix.

Another possibility is that configure chose to not use the system
snprintf at all, in which case %lld is the correct syntax to use but gcc
might well have some different expectation.  Without seeing the
config.log results it's hard to be sure about that one; but in any case
it's hard to credit that there are any modern machines where snprintf
can't handle long long int, so this still suggests a platform problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: SSI patch version 12
Next
From: Simon Riggs
Date:
Subject: Re: We need to log aborted autovacuums