pgsql: Fix unportable usage of printf("%m").

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix unportable usage of printf("%m").
Дата
Msg-id E1fKWTZ-0000ri-Jo@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix unportable usage of printf("%m").

While glibc's version of printf accepts %m, most others do not;
to be portable, we have to do it the hard way with strerror(errno).
pg_verify_checksums evidently did not get that memo.

Noted while fooling around with NetBSD-current, which generates
a compiler warning for this mistake.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a13b47a59ffce6f3c13c8b777738a3aab1db10d3

Modified Files
--------------
src/bin/pg_verify_checksums/pg_verify_checksums.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: printf("%lf") is not portable, so omit the "l".
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unsafe usage of strerror(errno) within ereport().