Re: Does getopt() return "-1", or "EOF", at end?

Поиск
Список
Период
Сортировка
Искать
От
Doug Royer
Тема
Re: Does getopt() return "-1", or "EOF", at end?
Дата
Msg-id
3C3CCB48.548585B@Royer.com
Список
Дерево обсуждения
Does getopt() return "-1", or "EOF", at end? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does getopt() return "-1", or "EOF", at end? David Terrell <dbt@meat.net>
Re: Does getopt() return "-1", or "EOF", at end? Tom Lane <tgl@sss.pgh.pa.us>
Re: Does getopt() return "-1", or "EOF", at end? Bruce Momjian <pgman@candle.pha.pa.us>
Re: Does getopt() return "-1", or "EOF", at end? Richard Kuhns <rjk@grauel.com>
Re: Does getopt() return "-1", or "EOF", at end? Peter Eisentraut <peter_e@gmx.net>
Re: Does getopt() return "-1", or "EOF", at end? "Dominic J. Eidson" <sauron@the-infinite.org>
Tom Lane wrote:
> 
> Doug Royer  writes:
> > Would the correct question be, "what does POSIX define?". More
> > and more systems (at least Unix systems) are defining POSIX
> > interfaces. I don't have my POSIX CD here with me or I would
> > quote the getopt() definition. I ~think~ it says EOF, and
> > the target systems include files define what EOF means.
> 
> I looked at the Single Unix Specification at
> http://www.opengroup.org/onlinepubs/007908799/
> and their man page for getopt says "-1".
> I believe SUS is derived from POSIX among others.
> If POSIX does say EOF then we might have a conflict,
> but otherwise the tide seems to be running to -1.

It's probabily the same.

Tom Lane wrote:
> 
> Doug Royer  writes:
> > And if the default for int or char is unsigned as it can
> > be on some systems, the code does exactly that.
> 
> There are no systems where "int" means "unsigned int".  That would break
> (to a first approximation) every C program in existence, as well as
> violate the ANSI C specification.

Your right - oops.
В списке pgsql-hackers по дате отправления
От: Vince Vielhaber
Дата:
Сообщение: Re: RC1 time?
От: Marc G. Fournier
Дата:
Сообщение: Re: RC1 time?
FAQ