pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Re-allow building on Microsoft Visual Studio 2013. 4+ messages / 1 participants [nested] [flat]
* pgsql: Re-allow building on Microsoft Visual Studio 2013. @ 2022-11-10 15:24 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2022-11-10 15:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Re-allow building on Microsoft Visual Studio 2013. In commit 450ee7012 I supposed that all platforms we now care about have snprintf(), since that's required by C99. Turns out that Microsoft did not get around to adding that until VS2015. We've dropped support for VS2013 as of HEAD (cf 6203583b7), but not in the back branches, so add a hack for this in the back branches only. There's no easy shortcut to an exact emulation of standard snprintf in VS2013, but fortunately we don't need one: this code was just fine with using sprintf before 450ee7012, so we can make it do so again on that platform (and any others where the problem might crop up). Per bug #17681 from Daisuke Higuchi. Back-patch to v12, like the previous patch. Discussion: https://postgr.es/m/17681-485ba2ec13e7f392@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/576506303c2a1b38383dc905db5f6e11b13ce872 Modified Files -------------- src/port/snprintf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Re-allow building on Microsoft Visual Studio 2013. @ 2022-11-10 15:24 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2022-11-10 15:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Re-allow building on Microsoft Visual Studio 2013. In commit 450ee7012 I supposed that all platforms we now care about have snprintf(), since that's required by C99. Turns out that Microsoft did not get around to adding that until VS2015. We've dropped support for VS2013 as of HEAD (cf 6203583b7), but not in the back branches, so add a hack for this in the back branches only. There's no easy shortcut to an exact emulation of standard snprintf in VS2013, but fortunately we don't need one: this code was just fine with using sprintf before 450ee7012, so we can make it do so again on that platform (and any others where the problem might crop up). Per bug #17681 from Daisuke Higuchi. Back-patch to v12, like the previous patch. Discussion: https://postgr.es/m/17681-485ba2ec13e7f392@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/06dca17ad547ec7cf75d2e88436d28be9d1a51c9 Modified Files -------------- src/port/snprintf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Re-allow building on Microsoft Visual Studio 2013. @ 2022-11-10 15:24 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2022-11-10 15:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Re-allow building on Microsoft Visual Studio 2013. In commit 450ee7012 I supposed that all platforms we now care about have snprintf(), since that's required by C99. Turns out that Microsoft did not get around to adding that until VS2015. We've dropped support for VS2013 as of HEAD (cf 6203583b7), but not in the back branches, so add a hack for this in the back branches only. There's no easy shortcut to an exact emulation of standard snprintf in VS2013, but fortunately we don't need one: this code was just fine with using sprintf before 450ee7012, so we can make it do so again on that platform (and any others where the problem might crop up). Per bug #17681 from Daisuke Higuchi. Back-patch to v12, like the previous patch. Discussion: https://postgr.es/m/17681-485ba2ec13e7f392@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0942acb73efcff1564f8d1b1ae890c8135467eae Modified Files -------------- src/port/snprintf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Re-allow building on Microsoft Visual Studio 2013. @ 2022-11-10 15:24 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2022-11-10 15:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Re-allow building on Microsoft Visual Studio 2013. In commit 450ee7012 I supposed that all platforms we now care about have snprintf(), since that's required by C99. Turns out that Microsoft did not get around to adding that until VS2015. We've dropped support for VS2013 as of HEAD (cf 6203583b7), but not in the back branches, so add a hack for this in the back branches only. There's no easy shortcut to an exact emulation of standard snprintf in VS2013, but fortunately we don't need one: this code was just fine with using sprintf before 450ee7012, so we can make it do so again on that platform (and any others where the problem might crop up). Per bug #17681 from Daisuke Higuchi. Back-patch to v12, like the previous patch. Discussion: https://postgr.es/m/17681-485ba2ec13e7f392@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cf0f465c0d47769b65ed266a49c815ffe4d865cc Modified Files -------------- src/port/snprintf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-11-10 15:24 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-11-10 15:24 pgsql: Re-allow building on Microsoft Visual Studio 2013. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-10 15:24 pgsql: Re-allow building on Microsoft Visual Studio 2013. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-10 15:24 pgsql: Re-allow building on Microsoft Visual Studio 2013. Tom Lane <tgl@sss.pgh.pa.us> 2022-11-10 15:24 pgsql: Re-allow building on Microsoft Visual Studio 2013. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox