Projects / GNU gengetopt / Comments

Comments for GNU gengetopt

01 Oct 2006 01:11 bettini

Re: Almost...


>

> % we aren't running Linux so we

> % don't have the GNU C library, and so

> we

> % don't have getopt_long. That,

>

>

> I just grabbed a netbsd libc and pulled

> getopt_long from that. Its a bit of

> work to remove all the references to the

> libc build framework common bits, bit a

> heck of a lot easier than writing a

> generator.

>

> I think pretty much any *BSD libc will

> do - most include the code from netbsd

> as far as I know.

>

> You should be able to use the CVS

> viewers to get the code without having a

> full distro handy.

>

gengetopt comes with a version of getopt.h getopt.c and getopt1.c and they are all you need to use getopt_long if it doesn't come with libc.

Also, in the manual, there's a chapter explaining how to deal with missing getopt_long.

Hope it helps.

25 Sep 2006 03:48 jmansion

Re: Almost...


> we aren't running Linux so we

> don't have the GNU C library, and so we

> don't have getopt_long. That,

I just grabbed a netbsd libc and pulled getopt_long from that. Its a bit of work to remove all the references to the libc build framework common bits, bit a heck of a lot easier than writing a generator.

I think pretty much any *BSD libc will do - most include the code from netbsd as far as I know.

You should be able to use the CVS viewers to get the code without having a full distro handy.

20 Dec 1999 20:05 devphil

Almost...
This is almost exactly what I was about to write myself. I haven't seen
the code, just the homepage. The only thing that makes it unsuitable for
use on my systems is that (heinous sin) we aren't running Linux so we
don't have the GNU C library, and so we don't have getopt_long. That,
and modifying main() isn't what I had in mind...

If I end up writing another option generator, I'll mention this one in the
documentation as an alternative that supports getopt_long.

Screenshot

Project Spotlight

ReciJournal

An open, cross-platform journaling program.

Screenshot

Project Spotlight

Veusz

A scientific plotting package.