logo       

Re: Re: Autoconf and differences between GNU getopt and OpenBSD getopt: msg#00022

Subject: Re: Re: Autoconf and differences between GNU getopt and OpenBSD getopt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Josefsson wrote:

>Derek Robert Price <derek@xxxxxxxxxxx> writes:
>
>>AC_DEFUN([gl_GETOPT],
>>[
>>  gl_PREREQ_GETOPT
>>                                                                          
 
>>
>>
>>  GETOPT_H=
>>  AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
>>  AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
>>                                                                          
 
>>
>>
>>  if test -n "$GETOPT_H"; then
>>     gl_GETOPT_SUBSTITUTE
>>  fi
>>])
>>
>>
>>So, it does make sense that, if Alex's version of BSD comes packaged
>>with a getopt.h header but an incompatible getopt() function, then the
>>latest gl_GETOPT would incorrectly choose to use the system getopt()
>>function rather than the GNULIB substitute.
>
>
>Do BSD really have getopt_long_only?  If so, then the getopt.m4 need
>to be improved...


According to Alex, yes, it does.  A quick google search on "bsd
getopt_long_only" brings up a patch submission from February and a bug
report from March, so I presume the patch was accepted.  Here's a link
to an email that claims getopt_long_only first appeared in OpenBSD 3.3
and FreeBSD 5.2:
<http://mailman.fastxs.net/pipermail/dbmail-dev/2004-July/004085.html>.

A more focused search of the FreeBSD site brings up a lot more bug
reports from March and the getopt_long.c file itself containing
getopt_long_only():
<http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/getopt_long.c?rev=1.12&content-type=text/x-cvsweb-markup>.

A search of openbsd.org brings up similar results.  Here's the
getopt.h from the CVS repo there, also showing a getopt_long_only():
<http://www.openbsd.org/cgi-bin/cvsweb/src/include/getopt.h?rev=1.1&content-type=text/x-cvsweb-markup>.

>>Something like Alex's test program should probably be added to
>>gl_GETOPT, unless someone can suggest a better way to detect or work
>>around the problem.
>
>
>...however, if BSD does not have getopt_long_only, it seems to me that
>the above test should work.


Yes, it should.

Cheers,

Derek

- --
                *8^)

Email: derek@xxxxxxxxxxx

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBcAMiLD1OTBfyMaQRApPyAKDmlpIh3GsHQAtygBXobJbcWgpeZACgtt8D
dTluhn9OI/zt47t9n7oKNEc=
=CnR7
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe