postgresql/src/common
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
..
unicode Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
base64.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
config_info.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
controldata_utils.c Add proper errcodes to new error messages for read() failures 2018-07-23 09:37:36 +09:00
exec.c Produce compiler errors if errno is referenced inside elog/ereport calls. 2018-08-11 11:23:41 -04:00
fe_memutils.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
file_perm.c Fix more wrong paths in header comments 2018-07-11 17:57:04 +03:00
file_utils.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
ip.c Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:31 -04:00
keywords.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
md5.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_lzcompress.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgfnames.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
psprintf.c Require a C99-compliant snprintf(), and remove related workarounds. 2018-08-16 13:01:09 -04:00
relpath.c Further cleanup of client dependencies on src/include/catalog headers. 2018-04-09 14:39:58 -04:00
restricted_token.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
rmtree.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
saslprep.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
scram-common.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sha2.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sha2_openssl.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
string.c restrict -> pg_restrict 2018-03-15 10:02:59 -03:00
unicode_norm.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
username.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
wait_error.c Update copyright for 2018 2018-01-02 23:30:12 -05:00