l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Mar 30 04:49

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] writing free getopt, ran into a dilemma...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] writing free getopt, ran into a dilemma...

The one I tried to link statically on Windows one time said it was GPL,
but according to Micah it's apparently LGPL with misdocumentation. :P

The reason I'm writing my own getopt is because I want static linkage.
Anyway, some options I'm thinking about:

   1. Get rid of optind altogether.
   2. Shuffle argv[] like LGPL getopt.
   3. Set optind to the beginning of the last set of non-option arguments.
   4. Set optind to the beginning of the first non-option argument.

I really don't want to shuffle argv[] (option #2)  because I can see how a
non-shuffling getopt could be useful on systems that won't let you shuffle
argv[].  Options #3 and #4 are direct opposites of each other, and each
can be beneficial at different times.  While #3 seems to make more sense
to me, it's nothing you can't handle by using the "-" option in "optstr".
And while #4 seems to make little sense, it can be useful if you're trying
to determine if there are any non-option arguments and throw an error,
which you can't do any other way that I can think of.


On Thu, 28 Mar 2002, nbs wrote:

> On Thu, Mar 28, 2002 at 12:35:05AM -0800, Mark K. Kim wrote:
> > Keywords: getopt, license issues, GPL, BSD, optind
> >
> > Hey guys,
> >
> > I mentioned some months ago about how I was using GPL's "getopt" library
> > in one of my company programs, and I was wondering about the GPL
> > distribution issues.[1]
> Woah... getopt library is GPL, not LGPL?
> -bill!
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

Mark K. Kim
PGP key available upon request.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.