Re: add non-option reordering to in-tree getopt_long

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: add non-option reordering to in-tree getopt_long
Дата
Msg-id 20231219164452.GA832556@nathanxps13
обсуждение исходный текст
Ответ на Re: add non-option reordering to in-tree getopt_long  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Dec 18, 2023 at 09:31:54PM -0500, Tom Lane wrote:
> Agreed, if it actually is 19 years old.  I'm wondering a little bit
> if there could be some moderately-recent glibc behavior change
> involved.  I'm not excited enough about it to go trawl their change
> log, but we should keep our ears cocked for similar reports.

From a brief glance, I believe this is long-standing behavior.  Even though
we advance optind at the bottom of the loop, the next getopt_long() call
seems to reset it to the first non-option (which was saved in a previous
call).

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Nazir Bilal Yavuz
Дата:
Сообщение: Re: Remove MSVC scripts from the tree
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Add new for_each macros for iterating over a List that do not require ListCell pointer