Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2001 11:35:44 +0200
From:      Yuri Karaban <ura@sphinx.univ.kiev.ua>
To:        Peter Wemm <peter@wemm.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: gnu getopt in libc
Message-ID:  <20011223093544.GA27632@sphinx.univ.kiev.ua>
In-Reply-To: <20011222201930.B9DEF38CC@overcee.netplex.com.au>
References:  <20011222132030.GA19596@sphinx.univ.kiev.ua> <20011222201930.B9DEF38CC@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 22, 2001 at 12:19:30PM -0800, Peter Wemm wrote:

> > gnu getopt supports long options and can reorder option keys
> > so i can write:
> > some_program -a -b -c file1 file2 -d -e -f
> > 
> > FreeBSD getopt in libc very simple it can recoginze only one letter
> > arguments, does not support optional arguments and arguments to
> > program may appear only at the beginning.
> > 
> > so why dont replace libc/stdlib/getopt.c by gnu version ?
> 
> 1) because it is nonstandard
You mean that some programs relies on the fact that -d -e -f are files
also ? There is a solution, if the NEW_GETOPT environment varaible is set, act
as gnu getopt, and people who want the old behavior (or their scripts/programs
require that) simply should not set this variable.
> 2) it is GPL contaminated which we cannot use in libc.
This is not the problem, someone (maybe me) can write it, getopt with the same
functionality.

PS. If I want to write a new getopt function, isn't  my work futile ?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011223093544.GA27632>