WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
164448
[MinGW] Fixed C99/C++11 format attributes in printf-like functions
https://bugs.webkit.org/show_bug.cgi?id=164448
Summary
[MinGW] Fixed C99/C++11 format attributes in printf-like functions
Konstantin Tokarev
Reported
2016-11-05 06:25:11 PDT
By default MinGW uses printf-like function provided in msvcrt.dll, however they miss support for C99/C++11 format attributes. Use MinGW implementations instead.
Attachments
Patch
(3.66 KB, patch)
2016-11-05 06:35 PDT
,
Konstantin Tokarev
mcatanzaro
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Konstantin Tokarev
Comment 1
2016-11-05 06:35:43 PDT
Created
attachment 293993
[details]
Patch
Michael Catanzaro
Comment 2
2016-11-05 07:59:22 PDT
Comment on
attachment 293993
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=293993&action=review
> Source/WTF/wtf/Assertions.h:55 > +#if COMPILER(MINGW) > +/* For __MINGW_PRINTF_FORMAT */ > +#include <stdio.h> > +#endif
stdio.h exists everywhere, so I think this isn't worth the preprocessor guards.
Konstantin Tokarev
Comment 3
2016-11-05 08:03:54 PDT
I was unsure if it gets included everywhere
Michael Catanzaro
Comment 4
2016-11-05 08:30:19 PDT
It probably does and it will probably slow things down very slightly, but honestly, I'd rather have fewer platform-specific #include differences. Anyone actually using mingw to develop is going to break the build by forgetting to include stdio.h now! But you know, maybe a better solution would be to eschew the header and just open-code the value of __MINGW_PRINTF_FORMAT instead.
Konstantin Tokarev
Comment 5
2016-11-05 08:41:58 PDT
__MINGW_PRINTF_FORMAT is defined as gnu_printf. I was following recommended usage of __USE_MINGW_ANSI_STDIO, however it seems that gnu_printf is not MinGW-specific so it should be safe to use it without macro
Konstantin Tokarev
Comment 6
2016-11-05 11:01:33 PDT
Committed
r208418
: <
http://trac.webkit.org/changeset/208418
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug