|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: getopt(3) differences OpenBSD/GNU
a.velichinsky
gmail.com
Date: Thu Jan 17 2008 - 02:13:28 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 16, 2008 at 10:35:01PM +0100, Sebastian Reitenbach wrote:
> Hi,
>
> I run into troubles with getopt(3). the test program below shows the
> problem. It produces different output on Linux and OpenBSD, when it is
> called like this on Linux it looks like this:
>
> ./a.out asdf -n
> option char: 110, n
>
> on OpenBSD, getopt returns -1 and no output is shown.
> what would be the best way to make it work on OpenBSD?
Use getopt_long(3) instead of getopt(3).
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]