Mail Archives: djgpp-workers/2009/10/29/16:21:25
Hi again,
> > On Oct 20, 1:13=A0pm, DJ Delorie <d DOT DOT DOT AT delorie DOT com> wrote:
>
> > > DJGPP's library is old; it might just be that getopt_long() wasn't
> > > even considered back then. =A0Feel free to add one, but keep in mind =
the
> > > licensing issues - GPL/LGPL is unacceptable in libc, BSD is OK.
>
> > even NetBSD (since 1.5) etc. have their own getopt_long. I honestly
> > doubt it would be too trivial to port to DJGPP, but hey, it's probably =
possible.
>
> Well, NetBSD seems to be harder to get working than FreeBSD.
>
> http://ftp6.tw.freebsd.org/FreeBSD/development/FreeBSD-CVS/src/contri...
>
> getopt_long.c,v
> mygetopt.h,v
>
> Both of those need very minor editing, but it seems to compile / work
> with EsCo, so I guess it would work okay for DJGPP in general.
Okay, maybe I was confused about it working in EsCo at the time (or
else forget how I did it), but I just now did barely hack it
(hopefully not too too incorrectly, heh) to work now for sure. Feel
free to take a look as it probably needs some massaging from you.
http://rugxulo.googlepages.com/getopt_l.zip
Archive: getopt_l.zip
Length Date Time Name
-------- ---- ---- ----
13911 10-26-09 14:05 getopt_long.c,v
3113 10-26-09 14:05 mygetopt.h,v
12821 10-29-09 14:42 getopt_long.c
9826 10-29-09 14:42 getopt_long.o
2763 10-29-09 14:41 mygetopt.h
-------- -------
42434 5 files
P.S. If you want to test with EsCo, you'll have to do the following:
a). manually fix the "\\r" typo to "\r" before running "sh configure"
b). put getopt_long.o in "esco\src"
c). edit src\escoconf.cpp and src\consoleface.cpp to refer to
"mygetopt.h" instead of <getopt.h>
d). edit src\makefile to put "getopt_long.o" after the line
"esco_OBJ.* =3D "
- Raw text -