On Wed, 07 Jul 2004 16:56:20 +0200
Ilja Booij <[EMAIL PROTECTED]> wrote:

> Matthew T. O'Connor wrote:
>
> Hmm, I thoought they did not exits on non-GNU systems. However,
> I found getopt_long on
> Mac OS X.
> 
> Is there anybody one *BSD that can check whether or not
> getopt_long is present there?
> 

On FreeBSD, it's not standard with the 4.x stable branch, but
it is in the 5.x devel branch:

GETOPT_LONG(3)         FreeBSD Library Functions Manual        

NAME
     getopt_long, getopt_long_only -- get long options from
command line argument list

LIBRARY
     Standard C Library (libc, -lc)

HISTORY
     The getopt_long() and getopt_long_only() functions first
appeared in GNU libiberty.  The first BSD implementation of
getopt_long() appeared in  NetBSD 1.5, the first BSD
implementation of getopt_long_only() in OpenBSD 3.3.  FreeBSD
first included getopt_long() in FreeBSD 5.0, getopt_long_only()
in FreeBSD 5.2.

So it appears FreeBSD stable is the only major one which does not
have it. It is however in the ports system under the name
devel/libgnugetopt, the description of which reads:"GNU getopt
library similar but more powerful than the standard getopt(3). It
includes the GNU-style getopt_long() function."

For those unfamiliar with the ports sytems, this is a no-brainer
to install: cd /usr/ports/devel/libgnugetopt && make install.
For users of the postgres port, it will have already been
installed as a requirement.


As noted, it's been in OpenBSD since 3.3 (May 2003) and
NetBSD since 1.5 (December 2000) so I would say, use it, and add
a note to the install docs for *BSD users advising them to check
for it's existence, and if not, install it. Any BSD admin who
can't install a port should be shot.

-fr.


-- 
Feargal Reilly, Codeshifter, Chrysalink Systems.
ICQ: 109837009 | YIM: ectoraige
PGP Key ID: 0xA6F82C96 (expires 09-Jun-2005)
Visit http://ie.bsd.net/ - BSDs presence in Ireland

Attachment: pgpz9aG5wemeU.pgp
Description: PGP signature

Reply via email to