postgresql/src/backend/utils
Tom Lane e1d19c902e Require a C99-compliant snprintf(), and remove related workarounds.
Since our substitute snprintf now returns a C99-compliant result,
there's no need anymore to have complicated code to cope with pre-C99
behavior.  We can just make configure substitute snprintf.c if it finds
that the system snprintf() is pre-C99.  (Note: I do not believe that
there are any platforms where this test will trigger that weren't
already being rejected due to our other C99-ish feature requirements for
snprintf.  But let's add the check for paranoia's sake.)  Then, simplify
the call sites that had logic to cope with the pre-C99 definition.

I also dropped some stuff that was being paranoid about the possibility
of snprintf overrunning the given buffer.  The only reports we've ever
heard of that being a problem were for Solaris 7, which is long dead,
and we've sure not heard any reports of these assertions triggering in
a long time.  So let's drop that complexity too.

Likewise, drop some code that wasn't trusting snprintf to set errno
when it returns -1.  That would be not-per-spec, and again there's
no real reason to believe it is a live issue, especially not for
snprintfs that pass all of configure's feature checks.

Discussion: https://postgr.es/m/17245.1534289329@sss.pgh.pa.us
2018-08-16 13:01:09 -04:00
..
adt Further fixes for quoted-list GUC values in pg_dump and ruleutils.c. 2018-07-31 13:00:14 -04:00
cache Handle parallel index builds on mapped relations. 2018-08-10 13:01:34 -07:00
error Update copyright for 2018 2018-01-02 23:30:12 -05:00
fmgr Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
hash Allow memory contexts to have both fixed and variable ident strings. 2018-03-27 16:46:51 -04:00
init Use a ResourceOwner to track buffer pins in all cases. 2018-07-18 12:15:16 -04:00
mb Avoid use of unportable hex constant in convutils.pm 2018-05-27 10:41:19 -04:00
misc Require a C99-compliant snprintf(), and remove related workarounds. 2018-08-16 13:01:09 -04:00
mmgr Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
resowner Use a ResourceOwner to track buffer pins in all cases. 2018-07-18 12:15:16 -04:00
sort Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
time Fix misc typos, mostly in comments. 2018-07-18 16:17:32 +03:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Update comment in header of errcodes.txt 2018-08-16 09:47:59 +02:00
Gen_dummy_probes.pl Clean up some perlcritic warnings 2018-05-07 15:35:32 -04:00
Gen_dummy_probes.sed Update copyright for 2018 2018-01-02 23:30:12 -05:00
Gen_fmgrtab.pl Assorted minor cleanups for bootstrap-data Perl scripts. 2018-05-19 16:04:47 -04:00
generate-errcodes.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Suppress compiler warnings when building with --enable-dtrace. 2018-05-07 13:44:09 -04:00
probes.d Support parallel btree index builds. 2018-02-02 13:32:44 -05:00