On Mar 23, 2016 22:19, "Jan Ehrhardt" <php...@ehrhardt.nl> wrote: > > William A Rowe Jr in gmane.comp.apache.devel (Wed, 23 Mar 2016 08:00:19 > -0500): > >On Wed, Mar 23, 2016 at 7:42 AM, William A Rowe Jr <wr...@rowe-clan.net> > >wrote: > > > >> Again, a C89 regression breaking the candidate, but in an experimental > >> module that we don't promise will always build. nghttp2 is filled with C99 > >> code, AIUI - due to bad decisions about basic C types - that library can > >> only build. > >> > >Whoops, answering too quickly... > > > >that library can only build *correctly* under the latest MSVC 14 (aka > >Studio 2015) when you are compiling for 64-bits on Windows (not an issue > >with 32 bit builds). > > How do you define 'correctly'? nghttp2 (git head) builds with only a > single warning on VC14 x86: > > c:\php-sdk\prebuilt\nghttp2\lib\nghttp2_session.c(6767) : warning C4715: > 'nghttp2_session_get_remote_settings': not all control paths return a > value > > VC11 x86 and VC9 x86 builds of nghttp2 give a couple of extra warnings: > > nghttp2_session.c(160) : warning C4996: 'vsnprintf': This function or > variable may be unsafe. Consider using vsnprintf_s instead. To disable > deprecation, use _CRT_SECURE_NO_WARNINGS. > > All x64 builds issue many more warnings: > > cl -nologo -MD -W3 -Z7 -DBUILDING_NGHTTP2 -I./includes -Dssize_t=long > -D_U_="" -FoMSVC_obj /r_nghttp2_session.obj -c nghttp2_session.c > nghttp2_session.c > nghttp2_session.c(5092): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(5122): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(5477): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(5704): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(5888): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(5952): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(6082): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data > nghttp2_session.c(6191): warning C4244: 'return': conversion from > '__int64' to 'long', possible loss of data
Precisely, Jan. We don't know where these truncation errors lead - do they portentially open security holes? They cetainly interefere with serving huge resources such as .iso images. When I first tripped over this, I breifly pondered putting together a patch. PHP, httpd (through apr) dealt with all this long ago. But nghttp2 is a modern C99/POSIX app, why ask the author to code around Win32-isms, now that MS finally got these right with the VC14 release?