We could try lobbying Microsoft to be more reasonable and standard
conforming ... 8^)>
Otherwsise this falls into the "ugly but unavoidable" bucket I suspect.
On Tue, 2011-03-01 at 22:06 +1100, nathans@xxxxxxxxxx wrote:
> Hi all,
>
> Moving toward a warning free build on Windows, the main remaining issue
> is the following class of problem:
>
> events.c: In function '__pmDumpEventRecords':
> events.c:120: warning: unknown conversion type character 'l' in format
> events.c:120: warning: too many arguments for format
> events.c:124: warning: unknown conversion type character 'l' in format
> events.c:124: warning: too many arguments for format
>
> googling suggests this is because the Windows printf implementation is
> not conforming to the same standards as most others players (%llu and
> %lld are the typical sources of the above warning). Evidentally, all
> platforms do have inttypes.h which seems to be recommended for solving
> this, Wikipedia states "ISO C99 includes the inttypes.h header file that
> includes a number of macros for use in platform-independent printf coding"
> in http://en.wikipedia.org/wiki/Printf#Format_placeholders ... this does
> indeed address the problem.
>
> Attached patch gives us a clean libpcp build (and importantly, correctly
> typed printf's on all platforms) ... does anyone object to this approach
> though? I've checked Win32, Linux, FreeBSD, Mac ... I think all will be
> OK with this (not sure about Solaris, but would expect it to be OK too).
>
> cheers.
>
> _______________________________________________
> pcp mailing list
> pcp@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/pcp
>
|