Moving contrib/libtests and contrib/tools to C99?
Cosmin Truta <[email protected]> Mon, 13 Aug 2018 00:24:51 -0400
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CAAoVtZxVgLTaBiBJaXC5U46NnBA5dHaK7MfCNRYuGhkaW40vAQ@mail.gmail.com> |
Hi, In the light of Theo's recent build fix for OpenBSD, I would like to know if anybody would oppose the move to C99, in a first phase, for contrib/libtests and contrib/tools. I am asking this because the C99 run-time library is already requested in some of these, by the means of #define _ISOC99_SOURCE From where I stand, I see all of the present-day platforms either in use with a C99 compiler available, or no longer in use. I'm not suggesting that we should upgrade the language requirements for libpng just yet (certainly not for libpng-1.6). But for contrib/ I think we can. To be specific: I am well aware that full C99 support is still not available. For example, on Windows up until VS2015, and also on MinGW, snprintf is broken. Moreover, C99/C11 and C++11 diverged a bit, and some compilers preferred to follow the C++ semantics. Therefore, I'm suggesting specifically moving to a readily-available and non-controversial subset of C99, for contrib/libtests and contrib/tools. Very specifically, they would have to compile with gcc (using options -std=gnu89 and -std=c99), and with Microsoft C (using default options). As far as POSIX is concerned, I propose moving up from POSIX-1995/1997 (SUSv2) to POSIX-2001 or later (SUSv3 or later). Any ideas? Anybody opposing? Sincerely, Cosmin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot