[webkit-gtk] TextCodec.cpp lacks include <cstdio> when compiling with clang-7.0

Adrian Perez de Castro aperez at igalia.com
Thu May 23 07:38:39 PDT 2019

On Thu, 23 May 2019 14:47:45 +0300, Konstantin Tokarev <annulen at yandex.ru> wrote:
> 23.05.2019, 12:01, "Adrian Perez de Castro" <aperez at igalia.com>:
> > On Wed, 22 May 2019 22:58:01 +0300, Denis Pronin <dannftk at yandex.ru> wrote:
> > Non-text part: text/html
> >
> >>  Actually, including <cstdio> would do because it declares 'using
> >>  std::snprinf' in global space. Moreover, there is a common recomendation
> >>  to use c++ wrappers starting from <c...> over c-headers ending with <.h>
> >>  in c++ code. I would rather you followed this recomendation to not break
> >>  the rule
> >
> > The WebKit coding style [1] does not specify what to do in this case where
> > both a plain C (stdio.h) and C++ headers (cstdio) are available, so I agree
> > with Denis here that it is better to use the latter (cstdio)
> However, most of existing sources include stdio.h (91 vs 4 for cstdio, excluding ThirdParty)

That's interesting, thanks for checking. In the end I settled on the “modern”
way of using <cstdio> and let's see how the review of the patch goes :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20190523/142c72e1/attachment-0001.bin>

More information about the webkit-gtk mailing list