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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug Royer <Doug(at)royer(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does getopt() return "-1", or "EOF", at end?
Date: 2002-01-09 21:42:23
Message-ID: 15373.1010612543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Doug Royer <Doug(at)royer(dot)com> 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2002-01-09 22:09:38 Re: RC1 time?
Previous Message David Terrell 2002-01-09 21:29:49 Re: Does getopt() return "-1", or "EOF", at end?