Peter Eisentraut <pete...@gmx.net> writes:
> pg_upgrade's pg_scandir_internal() makes use of the non-standard %m
> format:
>
>     pg_log(PG_FATAL, "could not open directory \"%s\": %m\n", dirname);
>
> Is this an oversight, or is there an undocumented assumption that this
> code will only be used on platforms where %m works?

Surely an oversight; everywhere else in frontend code, we take care to
use strerror instead.  Is there a way to persuade gcc to complain about
such extensions when used in contexts where we don't know they work?

> (Which platforms don't have scandir() anyway?)

Hmmm ... my neolithic HPUX box has it, but OTOH the Open Group specs
seem to have added it only in Issue 7 (2008), so I'd not want to bet
money that any random Unix has got it.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to