delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/10/29/15:15:46

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: getopt_long missing (or "More esoteric language fun: EsCo")
Date: Thu, 29 Oct 2009 13:02:00 -0700 (PDT)
Organization: http://groups.google.com
Lines: 49
Message-ID: <d499dedb-496c-40f6-9990-be3c0673087d@q40g2000prh.googlegroups.com>
References: <70015ce7-3ab3-4e2e-8784-3e83f2ef3650 AT d4g2000vbm DOT googlegroups DOT com>
<200910201813 DOT n9KIDspI006759 AT envy DOT delorie DOT com> <090b6a14-39ce-49f8-b601-ce6054405e8b AT o13g2000vbl DOT googlegroups DOT com>
<4f321dc9-7676-49cd-88f3-ce392fce98e9 AT 31g2000vbf DOT googlegroups DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1256846521 5706 127.0.0.1 (29 Oct 2009 20:02:01 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 29 Oct 2009 20:02:01 +0000 (UTC)
Cc: djgpp-workers AT delorie DOT com
Complaints-To: groups-abuse AT google DOT com
Injection-Info: q40g2000prh.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019