aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-10-22 18:42:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-10-22 18:42:13 -0400
commit09a89cb5fc29b47c26d151e82293fd3bef592b7b (patch)
tree0ac288fac9c8b34730cca74bd90afa06752988ce /src/bin/psql/common.c
parent586a8fc75bf266214d635cdcf527176b80f808ea (diff)
downloadpostgresql-09a89cb5fc29b47c26d151e82293fd3bef592b7b.tar.gz
postgresql-09a89cb5fc29b47c26d151e82293fd3bef592b7b.zip
Get rid of use of asprintf() in favor of a more portable implementation.
asprintf(), aside from not being particularly portable, has a fundamentally badly-designed API; the psprintf() function that was added in passing in the previous patch has a much better API choice. Moreover, the NetBSD implementation that was borrowed for the previous patch doesn't work with non-C99-compliant vsnprintf, which is something we still have to cope with on some platforms; and it depends on va_copy which isn't all that portable either. Get rid of that code in favor of an implementation similar to what we've used for many years in stringinfo.c. Also, move it into libpgcommon since it's not really libpgport material. I think this patch will be enough to turn the buildfarm green again, but there's still cosmetic work left to do, namely get rid of pg_asprintf() in favor of using psprintf(). That will come in a followon patch.
Diffstat (limited to 'src/bin/psql/common.c')
0 files changed, 0 insertions, 0 deletions